code
stringlengths
1
1.49M
file_id
stringlengths
42
46
node_count
int64
0
7.38k
total_lines
int64
1
20.9k
vector_dim
int64
15
15
vector_labels
stringclasses
1 value
nodes
stringlengths
2
3.75M
connections
stringlengths
2
964k
import cv2.cv as cv import tesseract import sys api = tesseract.TessBaseAPI() api.Init(".","eng",tesseract.OEM_DEFAULT) api.SetPageSegMode(tesseract.PSM_AUTO) image=cv.LoadImage(sys.argv[1], cv.CV_LOAD_IMAGE_GRAYSCALE) tesseract.SetCvImage(image,api) text=api.GetUTF8Text() conf=api.MeanTextConf() print "scanned text: "+text
ajibawa-2023/Python-Code-Large/train/row_1406
11
13
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1406:Import_L1_C0", "label": "cv2.cv import cv", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0769, 0, 0.66, 0.0, 369, 0, 1, 0, 0, 369, 0, 0], "semantic": {"name": "cv2.cv", "arg_names": [], "import_names": ["cv"], "rhs_call_name": "", "annotation": ""}, "snippet": "import cv2.cv as cv"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1406:Import_L2_C0", "label": "tesseract import tesseract", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1538, 0.0769, 0, 0.66, 0.1, 332, 0, 1, 0, 0, 332, 0, 0], "semantic": {"name": "tesseract", "arg_names": [], "import_names": ["tesseract"], "rhs_call_name": "", "annotation": ""}, "snippet": "import tesseract"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1406:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.2308, 0.0769, 0, 0.66, 0.2, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1406:Assign_L5_C0", "label": "api = TessBaseAPI()", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.3846, 0.0769, 0, 0.66, 0.3, 976, 3, 0, 0, 0, 49, 10, 1], "semantic": {"name": "api", "arg_names": [], "import_names": [], "rhs_call_name": "TessBaseAPI", "annotation": ""}, "snippet": "api = tesseract.TessBaseAPI()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1406:Expr_L6_C0", "label": "Init()", "type": "expression", "loc": [6, 6], "level": 0, "parent": null, "vector": [8, 0, 0.4615, 0.0769, 0, 0.66, 0.4, 44, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "Init", "arg_names": [], "import_names": [], "rhs_call_name": "Init", "annotation": ""}, "snippet": "api.Init(\".\",\"eng\",tesseract.OEM_DEFAULT)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1406:Expr_L7_C0", "label": "SetPageSegMode()", "type": "expression", "loc": [7, 7], "level": 0, "parent": null, "vector": [8, 0, 0.5385, 0.0769, 0, 0.66, 0.5, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "SetPageSegMode", "arg_names": [], "import_names": [], "rhs_call_name": "SetPageSegMode", "annotation": ""}, "snippet": "api.SetPageSegMode(tesseract.PSM_AUTO)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1406:Assign_L9_C0", "label": "image = LoadImage()", "type": "assigned_variable", "loc": [9, 9], "level": 0, "parent": null, "vector": [14, 0, 0.6923, 0.0769, 0, 0.66, 0.6, 505, 3, 2, 0, 0, 512, 10, 1], "semantic": {"name": "image", "arg_names": [], "import_names": [], "rhs_call_name": "LoadImage", "annotation": ""}, "snippet": "image=cv.LoadImage(sys.argv[1], cv.CV_LOAD_IMAGE_GRAYSCALE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1406:Expr_L10_C0", "label": "SetCvImage()", "type": "expression", "loc": [10, 10], "level": 0, "parent": null, "vector": [8, 0, 0.7692, 0.0769, 0, 0.66, 0.7, 868, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "SetCvImage", "arg_names": [], "import_names": [], "rhs_call_name": "SetCvImage", "annotation": ""}, "snippet": "tesseract.SetCvImage(image,api)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1406:Assign_L11_C0", "label": "text = GetUTF8Text()", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.8462, 0.0769, 0, 0.66, 0.8, 439, 3, 0, 0, 0, 633, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "GetUTF8Text", "annotation": ""}, "snippet": "text=api.GetUTF8Text()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1406:Assign_L12_C0", "label": "conf = MeanTextConf()", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.9231, 0.0769, 0, 0.66, 0.9, 433, 3, 0, 0, 0, 690, 10, 1], "semantic": {"name": "conf", "arg_names": [], "import_names": [], "rhs_call_name": "MeanTextConf", "annotation": ""}, "snippet": "conf=api.MeanTextConf()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1406:Expr_L13_C0", "label": "print()", "type": "expression", "loc": [13, 13], "level": 0, "parent": null, "vector": [8, 0, 1.0, 0.0769, 0, 0.66, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"scanned text: \"+text)"}]
[]
#!/usr/bin/env python # -*- encoding:utf8 -*- # protoc-gen-erl # Google's Protocol Buffers project, ported to lua. # https://code.google.com/p/protoc-gen-lua/ # # Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com # All rights reserved. # # Use, modification and distribution are subject to the "New BSD License" # as listed at <url: http://www.opensource.org/licenses/bsd-license.php >. import sys import os.path as path from cStringIO import StringIO import plugin_pb2 import google.protobuf.descriptor_pb2 as descriptor_pb2 _packages = {} _files = {} _message = {} FDP = plugin_pb2.descriptor_pb2.FieldDescriptorProto if sys.platform == "win32": import msvcrt, os msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY) msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) class CppType: CPPTYPE_INT32 = 1 CPPTYPE_INT64 = 2 CPPTYPE_UINT32 = 3 CPPTYPE_UINT64 = 4 CPPTYPE_DOUBLE = 5 CPPTYPE_FLOAT = 6 CPPTYPE_BOOL = 7 CPPTYPE_ENUM = 8 CPPTYPE_STRING = 9 CPPTYPE_MESSAGE = 10 CPP_TYPE ={ FDP.TYPE_DOUBLE : CppType.CPPTYPE_DOUBLE, FDP.TYPE_FLOAT : CppType.CPPTYPE_FLOAT, FDP.TYPE_INT64 : CppType.CPPTYPE_INT64, FDP.TYPE_UINT64 : CppType.CPPTYPE_UINT64, FDP.TYPE_INT32 : CppType.CPPTYPE_INT32, FDP.TYPE_FIXED64 : CppType.CPPTYPE_UINT64, FDP.TYPE_FIXED32 : CppType.CPPTYPE_UINT32, FDP.TYPE_BOOL : CppType.CPPTYPE_BOOL, FDP.TYPE_STRING : CppType.CPPTYPE_STRING, FDP.TYPE_MESSAGE : CppType.CPPTYPE_MESSAGE, FDP.TYPE_BYTES : CppType.CPPTYPE_STRING, FDP.TYPE_UINT32 : CppType.CPPTYPE_UINT32, FDP.TYPE_ENUM : CppType.CPPTYPE_ENUM, FDP.TYPE_SFIXED32 : CppType.CPPTYPE_INT32, FDP.TYPE_SFIXED64 : CppType.CPPTYPE_INT64, FDP.TYPE_SINT32 : CppType.CPPTYPE_INT32, FDP.TYPE_SINT64 : CppType.CPPTYPE_INT64 } def printerr(*args): sys.stderr.write(" ".join(args)) sys.stderr.write("\n") sys.stderr.flush() class TreeNode(object): def __init__(self, name, parent=None, filename=None, package=None): super(TreeNode, self).__init__() self.child = [] self.parent = parent self.filename = filename self.package = package if parent: self.parent.add_child(self) self.name = name def add_child(self, child): self.child.append(child) def find_child(self, child_names): if child_names: for i in self.child: if i.name == child_names[0]: return i.find_child(child_names[1:]) raise StandardError else: return self def get_child(self, child_name): for i in self.child: if i.name == child_name: return i return None def get_path(self, end = None): pos = self out = [] while pos and pos != end: out.append(pos.name) pos = pos.parent out.reverse() return '.'.join(out) def get_global_name(self): return self.get_path() def get_local_name(self): pos = self while pos.parent: pos = pos.parent if self.package and pos.name == self.package[-1]: break return self.get_path(pos) def __str__(self): return self.to_string(0) def __repr__(self): return str(self) def to_string(self, indent = 0): return ' '*indent + '<TreeNode ' + self.name + '(\n' + \ ','.join([i.to_string(indent + 4) for i in self.child]) + \ ' '*indent +')>\n' class Env(object): filename = None package = None extend = None descriptor = None message = None context = None register = None def __init__(self): self.message_tree = TreeNode('') self.scope = self.message_tree def get_global_name(self): return self.scope.get_global_name() def get_local_name(self): return self.scope.get_local_name() def get_ref_name(self, type_name): try: node = self.lookup_name(type_name) except: # if the child doesn't be founded, it must be in this file return type_name[len('.'.join(self.package)) + 2:] if node.filename != self.filename: return node.filename + '_pb.' + node.get_local_name() return node.get_local_name() def lookup_name(self, name): names = name.split('.') if names[0] == '': return self.message_tree.find_child(names[1:]) else: return self.scope.parent.find_child(names) def enter_package(self, package): if not package: return self.message_tree names = package.split('.') pos = self.message_tree for i, name in enumerate(names): new_pos = pos.get_child(name) if new_pos: pos = new_pos else: return self._build_nodes(pos, names[i:]) return pos def enter_file(self, filename, package): self.filename = filename self.package = package.split('.') self._init_field() self.scope = self.enter_package(package) def exit_file(self): self._init_field() self.filename = None self.package = [] self.scope = self.scope.parent def enter(self, message_name): self.scope = TreeNode(message_name, self.scope, self.filename, self.package) def exit(self): self.scope = self.scope.parent def _init_field(self): self.descriptor = [] self.context = [] self.message = [] self.register = [] def _build_nodes(self, node, names): parent = node for i in names: parent = TreeNode(i, parent, self.filename, self.package) return parent class Writer(object): def __init__(self, prefix=None): self.io = StringIO() self.__indent = '' self.__prefix = prefix def getvalue(self): return self.io.getvalue() def __enter__(self): self.__indent += ' ' return self def __exit__(self, type, value, trackback): self.__indent = self.__indent[:-4] def __call__(self, data): self.io.write(self.__indent) if self.__prefix: self.io.write(self.__prefix) self.io.write(data) DEFAULT_VALUE = { FDP.TYPE_DOUBLE : '0.0', FDP.TYPE_FLOAT : '0.0', FDP.TYPE_INT64 : '0', FDP.TYPE_UINT64 : '0', FDP.TYPE_INT32 : '0', FDP.TYPE_FIXED64 : '0', FDP.TYPE_FIXED32 : '0', FDP.TYPE_BOOL : 'false', FDP.TYPE_STRING : '""', FDP.TYPE_MESSAGE : 'nil', FDP.TYPE_BYTES : '""', FDP.TYPE_UINT32 : '0', FDP.TYPE_ENUM : '1', FDP.TYPE_SFIXED32 : '0', FDP.TYPE_SFIXED64 : '0', FDP.TYPE_SINT32 : '0', FDP.TYPE_SINT64 : '0', } def code_gen_enum_item(index, enum_value, env): full_name = env.get_local_name() + '.' + enum_value.name obj_name = full_name.upper().replace('.', '_') + '_ENUM' env.descriptor.append( "local %s = protobuf.EnumValueDescriptor();\n"% obj_name ) context = Writer(obj_name) context('.name = "%s"\n' % enum_value.name) context('.index = %d\n' % index) context('.number = %d\n' % enum_value.number) env.context.append(context.getvalue()) return obj_name def code_gen_enum(enum_desc, env): env.enter(enum_desc.name) full_name = env.get_local_name() obj_name = full_name.upper().replace('.', '_') env.descriptor.append( "local %s = protobuf.EnumDescriptor();\n"% obj_name ) context = Writer(obj_name) context('.name = "%s"\n' % enum_desc.name) context('.full_name = "%s"\n' % env.get_global_name()) values = [] for i, enum_value in enumerate(enum_desc.value): values.append(code_gen_enum_item(i, enum_value, env)) context('.values = {%s}\n' % ','.join(values)) env.context.append(context.getvalue()) env.exit() return obj_name def code_gen_field(index, field_desc, env): full_name = env.get_local_name() + '.' + field_desc.name obj_name = full_name.upper().replace('.', '_') + '_FIELD' env.descriptor.append( "local %s = protobuf.FieldDescriptor();\n"% obj_name ) context = Writer(obj_name) context('.name = "%s"\n' % field_desc.name) context('.full_name = "%s"\n' % ( env.get_global_name() + '.' + field_desc.name)) context('.number = %d\n' % field_desc.number) context('.index = %d\n' % index) context('.label = %d\n' % field_desc.label) if field_desc.HasField("default_value"): context('.has_default_value = true\n') value = field_desc.default_value if field_desc.type == FDP.TYPE_STRING: context('.default_value = "%s"\n'%value) else: context('.default_value = %s\n'%value) else: context('.has_default_value = false\n') if field_desc.label == FDP.LABEL_REPEATED: default_value = "{}" elif field_desc.HasField('type_name'): default_value = "nil" else: default_value = DEFAULT_VALUE[field_desc.type] context('.default_value = %s\n' % default_value) if field_desc.HasField('type_name'): type_name = env.get_ref_name(field_desc.type_name).upper().replace('.', '_') if field_desc.type == FDP.TYPE_MESSAGE: context('.message_type = %s\n' % type_name) else: context('.enum_type = %s\n' % type_name) if field_desc.HasField('extendee'): type_name = env.get_ref_name(field_desc.extendee) env.register.append( "%s.RegisterExtension(%s)\n" % (type_name, obj_name) ) context('.type = %d\n' % field_desc.type) context('.cpp_type = %d\n\n' % CPP_TYPE[field_desc.type]) env.context.append(context.getvalue()) return obj_name def code_gen_message(message_descriptor, env, containing_type = None): env.enter(message_descriptor.name) full_name = env.get_local_name() obj_name = full_name.upper().replace('.', '_') env.descriptor.append( "local %s = protobuf.Descriptor();\n"% obj_name ) context = Writer(obj_name) context('.name = "%s"\n' % message_descriptor.name) context('.full_name = "%s"\n' % env.get_global_name()) nested_types = [] for msg_desc in message_descriptor.nested_type: msg_name = code_gen_message(msg_desc, env, obj_name) nested_types.append(msg_name) context('.nested_types = {%s}\n' % ', '.join(nested_types)) enums = [] for enum_desc in message_descriptor.enum_type: enums.append(code_gen_enum(enum_desc, env)) context('.enum_types = {%s}\n' % ', '.join(enums)) fields = [] for i, field_desc in enumerate(message_descriptor.field): fields.append(code_gen_field(i, field_desc, env)) context('.fields = {%s}\n' % ', '.join(fields)) if len(message_descriptor.extension_range) > 0: context('.is_extendable = true\n') else: context('.is_extendable = false\n') extensions = [] for i, field_desc in enumerate(message_descriptor.extension): extensions.append(code_gen_field(i, field_desc, env)) context('.extensions = {%s}\n' % ', '.join(extensions)) if containing_type: context('.containing_type = %s\n' % containing_type) env.message.append('%s = protobuf.Message(%s)\n' % (full_name, obj_name)) env.context.append(context.getvalue()) env.exit() return obj_name def write_header(writer): writer("""-- Generated By protoc-gen-lua Do not Edit """) def code_gen_file(proto_file, env, is_gen): filename = path.splitext(proto_file.name)[0] env.enter_file(filename, proto_file.package) includes = [] for f in proto_file.dependency: inc_file = path.splitext(f)[0] includes.append(inc_file) # for field_desc in proto_file.extension: # code_gen_extensions(field_desc, field_desc.name, env) for enum_desc in proto_file.enum_type: code_gen_enum(enum_desc, env) for enum_value in enum_desc.value: env.message.append('%s = %d\n' % (enum_value.name, enum_value.number)) for msg_desc in proto_file.message_type: code_gen_message(msg_desc, env) if is_gen: lua = Writer() write_header(lua) lua('local protobuf = require "protobuf"\n') for i in includes: lua('local %s_pb = require("%s_pb")\n' % (i, i)) lua("module('%s_pb')\n" % env.filename) lua('\n\n') map(lua, env.descriptor) lua('\n') map(lua, env.context) lua('\n') env.message.sort() map(lua, env.message) lua('\n') map(lua, env.register) _files[env.filename+ '_pb.lua'] = lua.getvalue() env.exit_file() def main(): plugin_require_bin = sys.stdin.read() code_gen_req = plugin_pb2.CodeGeneratorRequest() code_gen_req.ParseFromString(plugin_require_bin) env = Env() for proto_file in code_gen_req.proto_file: code_gen_file(proto_file, env, proto_file.name in code_gen_req.file_to_generate) code_generated = plugin_pb2.CodeGeneratorResponse() for k in _files: file_desc = code_generated.file.add() file_desc.name = k file_desc.content = _files[k] sys.stdout.write(code_generated.SerializeToString()) if __name__ == "__main__": main()
ajibawa-2023/Python-Code-Large/train/row_1407
295
450
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Import_L13_C0", "label": "sys import sys", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0289, 0.0022, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Import_L14_C0", "label": "os.path import path", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0311, 0.0022, 0, 0.66, 0.0417, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["path"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os.path as path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:ImportFrom_L15_C0", "label": "from cStringIO import StringIO", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0333, 0.0022, 0, 0.66, 0.0833, 764, 0, 1, 0, 0, 764, 0, 0], "semantic": {"name": "cStringIO", "arg_names": [], "import_names": ["StringIO"], "rhs_call_name": "", "annotation": ""}, "snippet": "from cStringIO import StringIO"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Import_L17_C0", "label": "plugin_pb2 import plugin_pb2", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.0378, 0.0022, 0, 0.66, 0.125, 5, 0, 1, 0, 0, 5, 0, 0], "semantic": {"name": "plugin_pb2", "arg_names": [], "import_names": ["plugin_pb2"], "rhs_call_name": "", "annotation": ""}, "snippet": "import plugin_pb2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Import_L18_C0", "label": "google.protobuf.descriptor_pb2 import descriptor_pb2", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.04, 0.0022, 0, 0.66, 0.1667, 35, 0, 1, 0, 0, 35, 0, 0], "semantic": {"name": "google.protobuf.descriptor_pb2", "arg_names": [], "import_names": ["descriptor_pb2"], "rhs_call_name": "", "annotation": ""}, "snippet": "import google.protobuf.descriptor_pb2 as descriptor_pb2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L20_C0", "label": "_packages =", "type": "assigned_variable", "loc": [20, 20], "level": 0, "parent": null, "vector": [14, 0, 0.0444, 0.0022, 0, 0.66, 0.2083, 932, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "_packages", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "_packages = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L21_C0", "label": "_files =", "type": "assigned_variable", "loc": [21, 21], "level": 0, "parent": null, "vector": [14, 0, 0.0467, 0.0022, 0, 0.66, 0.25, 743, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "_files", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "_files = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L22_C0", "label": "_message =", "type": "assigned_variable", "loc": [22, 22], "level": 0, "parent": null, "vector": [14, 0, 0.0489, 0.0022, 0, 0.66, 0.2917, 839, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "_message", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "_message = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L24_C0", "label": "FDP =", "type": "assigned_variable", "loc": [24, 24], "level": 0, "parent": null, "vector": [14, 0, 0.0533, 0.0022, 0, 0.66, 0.3333, 454, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "FDP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FDP = plugin_pb2.descriptor_pb2.FieldDescriptorProto"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L26_C0", "label": "if", "type": "if", "loc": [26, 29], "level": 0, "parent": null, "vector": [4, 0, 0.0611, 0.0089, 0, 0.66, 0.375, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if sys.platform == \"win32\":\n import msvcrt, os\n msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)\n msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Import_L27_C4", "label": "msvcrt import msvcrt, os", "type": "import", "loc": [27, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L26_C0", "vector": [1, 1, 0.06, 0.0022, 1, 0.9, 0.0, 521, 0, 2, 0, 0, 521, 0, 0], "semantic": {"name": "msvcrt", "arg_names": [], "import_names": ["msvcrt", "os"], "rhs_call_name": "", "annotation": ""}, "snippet": " import msvcrt, os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L28_C4", "label": "setmode()", "type": "expression", "loc": [28, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L26_C0", "vector": [8, 1, 0.0622, 0.0022, 1, 0.9, 0.5, 464, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "setmode", "arg_names": [], "import_names": [], "rhs_call_name": "setmode", "annotation": ""}, "snippet": " msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L29_C4", "label": "setmode()", "type": "expression", "loc": [29, 29], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L26_C0", "vector": [8, 1, 0.0644, 0.0022, 1, 0.9, 1.0, 464, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "setmode", "arg_names": [], "import_names": [], "rhs_call_name": "setmode", "annotation": ""}, "snippet": " msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "label": "CppType", "type": "class", "loc": [31, 41], "level": 0, "parent": null, "vector": [3, 0, 0.08, 0.0244, 0, 0.66, 0.4167, 637, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "CppType", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CppType:\n CPPTYPE_INT32 = 1\n CPPTYPE_INT64 = 2\n CPPTYPE_UINT32 = 3\n CPPTYPE_UINT64 = 4\n CPPTYPE_DOUBLE = 5\n CPPTYPE_FLOAT = 6\n CPPTYPE_BOOL = 7"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L32_C4", "label": "CPPTYPE_INT32 =", "type": "assigned_variable", "loc": [32, 32], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "vector": [14, 1, 0.0711, 0.0022, 1, 0.0, 0.0, 90, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "CPPTYPE_INT32", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " CPPTYPE_INT32 = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L33_C4", "label": "CPPTYPE_INT64 =", "type": "assigned_variable", "loc": [33, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "vector": [14, 1, 0.0733, 0.0022, 1, 0.0, 0.1111, 114, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "CPPTYPE_INT64", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " CPPTYPE_INT64 = 2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L34_C4", "label": "CPPTYPE_UINT32 =", "type": "assigned_variable", "loc": [34, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "vector": [14, 1, 0.0756, 0.0022, 1, 0.0, 0.2222, 927, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "CPPTYPE_UINT32", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " CPPTYPE_UINT32 = 3"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L35_C4", "label": "CPPTYPE_UINT64 =", "type": "assigned_variable", "loc": [35, 35], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "vector": [14, 1, 0.0778, 0.0022, 1, 0.0, 0.3333, 204, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "CPPTYPE_UINT64", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " CPPTYPE_UINT64 = 4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L36_C4", "label": "CPPTYPE_DOUBLE =", "type": "assigned_variable", "loc": [36, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "vector": [14, 1, 0.08, 0.0022, 1, 0.0, 0.4444, 558, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "CPPTYPE_DOUBLE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " CPPTYPE_DOUBLE = 5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L37_C4", "label": "CPPTYPE_FLOAT =", "type": "assigned_variable", "loc": [37, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "vector": [14, 1, 0.0822, 0.0022, 1, 0.0, 0.5556, 641, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "CPPTYPE_FLOAT", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " CPPTYPE_FLOAT = 6"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L38_C4", "label": "CPPTYPE_BOOL =", "type": "assigned_variable", "loc": [38, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "vector": [14, 1, 0.0844, 0.0022, 1, 0.0, 0.6667, 894, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "CPPTYPE_BOOL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " CPPTYPE_BOOL = 7"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L39_C4", "label": "CPPTYPE_ENUM =", "type": "assigned_variable", "loc": [39, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "vector": [14, 1, 0.0867, 0.0022, 1, 0.0, 0.7778, 180, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "CPPTYPE_ENUM", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " CPPTYPE_ENUM = 8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L40_C4", "label": "CPPTYPE_STRING =", "type": "assigned_variable", "loc": [40, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "vector": [14, 1, 0.0889, 0.0022, 1, 0.0, 0.8889, 180, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "CPPTYPE_STRING", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " CPPTYPE_STRING = 9"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L41_C4", "label": "CPPTYPE_MESSAGE =", "type": "assigned_variable", "loc": [41, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "vector": [14, 1, 0.0911, 0.0022, 1, 0.0, 1.0, 991, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "CPPTYPE_MESSAGE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " CPPTYPE_MESSAGE = 10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L43_C0", "label": "CPP_TYPE =", "type": "assigned_variable", "loc": [43, 61], "level": 0, "parent": null, "vector": [14, 0, 0.1156, 0.0422, 0, 0.66, 0.4583, 37, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "CPP_TYPE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CPP_TYPE ={\n FDP.TYPE_DOUBLE : CppType.CPPTYPE_DOUBLE,\n FDP.TYPE_FLOAT : CppType.CPPTYPE_FLOAT,\n FDP.TYPE_INT64 : CppType.CPPTYPE_INT64,\n FDP.TYPE_UINT64 : CppType.CPPTYPE_UINT64,\n FDP.TYPE_INT32 : CppType.CPPTYPE_INT32,\n FDP.TYPE_FIXED64 : CppType.CPPTYPE_UINT64,\n FDP.TYPE_FIXED32 : CppType.CPPTYPE_UINT32,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L63_C0", "label": "printerr", "type": "function", "loc": [63, 66], "level": 0, "parent": null, "vector": [2, 0, 0.1433, 0.0089, 0, 0.66, 0.5, 929, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "printerr", "arg_names": ["args"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def printerr(*args):\n sys.stderr.write(\" \".join(args))\n sys.stderr.write(\"\\n\")\n sys.stderr.flush()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L64_C4", "label": "write()", "type": "expression", "loc": [64, 64], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L63_C0", "vector": [8, 1, 0.1422, 0.0022, 1, 0.34, 0.0, 837, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stderr.write(\" \".join(args))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L65_C4", "label": "write()", "type": "expression", "loc": [65, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L63_C0", "vector": [8, 1, 0.1444, 0.0022, 1, 0.34, 0.5, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stderr.write(\"\\n\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L66_C4", "label": "flush()", "type": "expression", "loc": [66, 66], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L63_C0", "vector": [8, 1, 0.1467, 0.0022, 1, 0.34, 1.0, 439, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "flush", "arg_names": [], "import_names": [], "rhs_call_name": "flush", "annotation": ""}, "snippet": " sys.stderr.flush()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "label": "TreeNode", "type": "class", "loc": [68, 126], "level": 0, "parent": null, "vector": [3, 0, 0.2156, 0.1311, 0, 0.66, 0.5417, 30, 0, 10, 0, 0, 186, 0, 14], "semantic": {"name": "TreeNode", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TreeNode(object):\n def __init__(self, name, parent=None, filename=None, package=None):\n super(TreeNode, self).__init__()\n self.child = []\n self.parent = parent\n self.filename = filename\n self.package = package\n if parent:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L69_C4", "label": "__init__", "type": "function", "loc": [69, 77], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "vector": [2, 1, 0.1622, 0.02, 1, 0.84, 0.0, 555, 0, 5, 0, 0, 0, 0, 3], "semantic": {"name": "__init__", "arg_names": ["self", "name", "parent", "filename", "package"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, name, parent=None, filename=None, package=None):\n super(TreeNode, self).__init__()\n self.child = []\n self.parent = parent\n self.filename = filename\n self.package = package\n if parent:\n self.parent.add_child(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L70_C8", "label": "__init__()", "type": "expression", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L69_C4", "vector": [8, 2, 0.1556, 0.0022, 2, 0.87, 0.0, 555, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(TreeNode, self).__init__()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L71_C8", "label": "self.child =", "type": "assigned_variable", "loc": [71, 71], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L69_C4", "vector": [14, 2, 0.1578, 0.0022, 2, 0.87, 0.1667, 125, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.child", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.child = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L72_C8", "label": "self.parent =", "type": "assigned_variable", "loc": [72, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L69_C4", "vector": [14, 2, 0.16, 0.0022, 2, 0.87, 0.3333, 428, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.parent", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.parent = parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L73_C8", "label": "self.filename =", "type": "assigned_variable", "loc": [73, 73], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L69_C4", "vector": [14, 2, 0.1622, 0.0022, 2, 0.87, 0.5, 942, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.filename = filename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L74_C8", "label": "self.package =", "type": "assigned_variable", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L69_C4", "vector": [14, 2, 0.1644, 0.0022, 2, 0.87, 0.6667, 544, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.package", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.package = package"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L75_C8", "label": "if", "type": "if", "loc": [75, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L69_C4", "vector": [4, 2, 0.1678, 0.0044, 2, 0.87, 0.8333, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if parent:\n self.parent.add_child(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L76_C12", "label": "add_child()", "type": "expression", "loc": [76, 76], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L75_C8", "vector": [8, 3, 0.1689, 0.0022, 3, 0.15, 0.0, 279, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add_child", "arg_names": [], "import_names": [], "rhs_call_name": "add_child", "annotation": ""}, "snippet": " self.parent.add_child(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L77_C8", "label": "self.name =", "type": "assigned_variable", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L69_C4", "vector": [14, 2, 0.1711, 0.0022, 2, 0.87, 1.0, 689, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.name = name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L79_C4", "label": "add_child", "type": "function", "loc": [79, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "vector": [2, 1, 0.1767, 0.0044, 1, 0.84, 0.1111, 279, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "add_child", "arg_names": ["self", "child"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def add_child(self, child):\n self.child.append(child)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L80_C8", "label": "append()", "type": "expression", "loc": [80, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L79_C4", "vector": [8, 2, 0.1778, 0.0022, 2, 0.22, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.child.append(child)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L82_C4", "label": "find_child", "type": "function", "loc": [82, 89], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "vector": [2, 1, 0.19, 0.0178, 1, 0.84, 0.2222, 611, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "find_child", "arg_names": ["self", "child_names"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def find_child(self, child_names):\n if child_names:\n for i in self.child:\n if i.name == child_names[0]:\n return i.find_child(child_names[1:])\n raise StandardError\n else:\n return self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L83_C8", "label": "if", "type": "if", "loc": [83, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L82_C4", "vector": [4, 2, 0.1911, 0.0156, 2, 0.12, 0.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if child_names:\n for i in self.child:\n if i.name == child_names[0]:\n return i.find_child(child_names[1:])\n raise StandardError\n else:\n return self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L84_C12", "label": "for i", "type": "for", "loc": [84, 86], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L83_C8", "vector": [6, 3, 0.1889, 0.0067, 3, 0.19, 0.0, 826, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in self.child:\n if i.name == child_names[0]:\n return i.find_child(child_names[1:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L85_C16", "label": "if", "type": "if", "loc": [85, 86], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L84_C12", "vector": [4, 4, 0.19, 0.0044, 4, 0.04, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if i.name == child_names[0]:\n return i.find_child(child_names[1:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L86_C20", "label": "return", "type": "return", "loc": [86, 86], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L85_C16", "vector": [13, 5, 0.1911, 0.0022, 5, 0.85, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return i.find_child(child_names[1:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L89_C12", "label": "return", "type": "return", "loc": [89, 89], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L83_C8", "vector": [13, 3, 0.1978, 0.0022, 3, 0.19, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L91_C4", "label": "get_child", "type": "function", "loc": [91, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "vector": [2, 1, 0.2067, 0.0111, 1, 0.84, 0.3333, 799, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "get_child", "arg_names": ["self", "child_name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_child(self, child_name):\n for i in self.child:\n if i.name == child_name:\n return i\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L92_C8", "label": "for i", "type": "for", "loc": [92, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L91_C4", "vector": [6, 2, 0.2067, 0.0067, 2, 0.0, 0.0, 826, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in self.child:\n if i.name == child_name:\n return i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L93_C12", "label": "if", "type": "if", "loc": [93, 94], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L92_C8", "vector": [4, 3, 0.2078, 0.0044, 3, 0.74, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if i.name == child_name:\n return i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L94_C16", "label": "return", "type": "return", "loc": [94, 94], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L93_C12", "vector": [13, 4, 0.2089, 0.0022, 4, 0.62, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L95_C8", "label": "return", "type": "return", "loc": [95, 95], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L91_C4", "vector": [13, 2, 0.2111, 0.0022, 2, 0.0, 1.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L97_C4", "label": "get_path", "type": "function", "loc": [97, 104], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "vector": [2, 1, 0.2233, 0.0178, 1, 0.84, 0.4444, 601, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "get_path", "arg_names": ["self", "end"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_path(self, end = None):\n pos = self\n out = []\n while pos and pos != end:\n out.append(pos.name)\n pos = pos.parent\n out.reverse()\n return '.'.join(out)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L98_C8", "label": "pos =", "type": "assigned_variable", "loc": [98, 98], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L97_C4", "vector": [14, 2, 0.2178, 0.0022, 2, 0.55, 0.0, 627, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L99_C8", "label": "out =", "type": "assigned_variable", "loc": [99, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L97_C4", "vector": [14, 2, 0.22, 0.0022, 2, 0.55, 0.25, 434, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "out", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " out = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:While_L100_C8", "label": "while", "type": "while", "loc": [100, 102], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L97_C4", "vector": [5, 2, 0.2244, 0.0067, 2, 0.55, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while pos and pos != end:\n out.append(pos.name)\n pos = pos.parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L101_C12", "label": "append()", "type": "expression", "loc": [101, 101], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:While_L100_C8", "vector": [8, 3, 0.2244, 0.0022, 3, 0.78, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " out.append(pos.name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L102_C12", "label": "pos =", "type": "assigned_variable", "loc": [102, 102], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:While_L100_C8", "vector": [14, 3, 0.2267, 0.0022, 3, 0.78, 1.0, 627, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = pos.parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L103_C8", "label": "reverse()", "type": "expression", "loc": [103, 103], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L97_C4", "vector": [8, 2, 0.2289, 0.0022, 2, 0.55, 0.75, 109, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "reverse", "arg_names": [], "import_names": [], "rhs_call_name": "reverse", "annotation": ""}, "snippet": " out.reverse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L104_C8", "label": "return", "type": "return", "loc": [104, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L97_C4", "vector": [13, 2, 0.2311, 0.0022, 2, 0.55, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '.'.join(out)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L106_C4", "label": "get_global_name", "type": "function", "loc": [106, 107], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "vector": [2, 1, 0.2367, 0.0044, 1, 0.84, 0.5556, 36, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_global_name", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_global_name(self):\n return self.get_path()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L107_C8", "label": "return", "type": "return", "loc": [107, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L106_C4", "vector": [13, 2, 0.2378, 0.0022, 2, 0.15, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.get_path()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L109_C4", "label": "get_local_name", "type": "function", "loc": [109, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "vector": [2, 1, 0.2489, 0.0156, 1, 0.84, 0.6667, 996, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_local_name", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_local_name(self):\n pos = self\n while pos.parent:\n pos = pos.parent\n if self.package and pos.name == self.package[-1]:\n break\n return self.get_path(pos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L110_C8", "label": "pos =", "type": "assigned_variable", "loc": [110, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L109_C4", "vector": [14, 2, 0.2444, 0.0022, 2, 0.69, 0.0, 627, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:While_L111_C8", "label": "while", "type": "while", "loc": [111, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L109_C4", "vector": [5, 2, 0.25, 0.0089, 2, 0.69, 0.5, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while pos.parent:\n pos = pos.parent\n if self.package and pos.name == self.package[-1]:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L112_C12", "label": "pos =", "type": "assigned_variable", "loc": [112, 112], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:While_L111_C8", "vector": [14, 3, 0.2489, 0.0022, 3, 0.1, 0.0, 627, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = pos.parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L113_C12", "label": "if", "type": "if", "loc": [113, 114], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:While_L111_C8", "vector": [4, 3, 0.2522, 0.0044, 3, 0.1, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.package and pos.name == self.package[-1]:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L115_C8", "label": "return", "type": "return", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L109_C4", "vector": [13, 2, 0.2556, 0.0022, 2, 0.69, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.get_path(pos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L117_C4", "label": "__str__", "type": "function", "loc": [117, 118], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "vector": [2, 1, 0.2611, 0.0044, 1, 0.84, 0.7778, 527, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "__str__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __str__(self):\n return self.to_string(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L118_C8", "label": "return", "type": "return", "loc": [118, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L117_C4", "vector": [13, 2, 0.2622, 0.0022, 2, 0.06, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.to_string(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L120_C4", "label": "__repr__", "type": "function", "loc": [120, 121], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "vector": [2, 1, 0.2678, 0.0044, 1, 0.84, 0.8889, 204, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "__repr__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __repr__(self):\n return str(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L121_C8", "label": "return", "type": "return", "loc": [121, 121], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L120_C4", "vector": [13, 2, 0.2689, 0.0022, 2, 0.64, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return str(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L123_C4", "label": "to_string", "type": "function", "loc": [123, 126], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "vector": [2, 1, 0.2767, 0.0089, 1, 0.84, 1.0, 549, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "to_string", "arg_names": ["self", "indent"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def to_string(self, indent = 0):\n return ' '*indent + '<TreeNode ' + self.name + '(\\n' + \\\n ','.join([i.to_string(indent + 4) for i in self.child]) + \\\n ' '*indent +')>\\n'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L124_C8", "label": "return", "type": "return", "loc": [124, 126], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L123_C4", "vector": [13, 2, 0.2778, 0.0067, 2, 0.79, 0.0, 0, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ' '*indent + '<TreeNode ' + self.name + '(\\n' + \\\n ','.join([i.to_string(indent + 4) for i in self.child]) + \\\n ' '*indent +')>\\n'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "label": "Env", "type": "class", "loc": [128, 205], "level": 0, "parent": null, "vector": [3, 0, 0.37, 0.1733, 0, 0.66, 0.5833, 510, 0, 12, 0, 0, 186, 0, 21], "semantic": {"name": "Env", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Env(object):\n filename = None\n package = None\n extend = None\n descriptor = None\n message = None\n context = None\n register = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L129_C4", "label": "filename =", "type": "assigned_variable", "loc": [129, 129], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [14, 1, 0.2867, 0.0022, 1, 0.66, 0.0, 275, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " filename = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L130_C4", "label": "package =", "type": "assigned_variable", "loc": [130, 130], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [14, 1, 0.2889, 0.0022, 1, 0.66, 0.0556, 187, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "package", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " package = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L131_C4", "label": "extend =", "type": "assigned_variable", "loc": [131, 131], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [14, 1, 0.2911, 0.0022, 1, 0.66, 0.1111, 660, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "extend", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " extend = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L132_C4", "label": "descriptor =", "type": "assigned_variable", "loc": [132, 132], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [14, 1, 0.2933, 0.0022, 1, 0.66, 0.1667, 420, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "descriptor", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " descriptor = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L133_C4", "label": "message =", "type": "assigned_variable", "loc": [133, 133], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [14, 1, 0.2956, 0.0022, 1, 0.66, 0.2222, 635, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "message", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " message = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L134_C4", "label": "context =", "type": "assigned_variable", "loc": [134, 134], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [14, 1, 0.2978, 0.0022, 1, 0.66, 0.2778, 954, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " context = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L135_C4", "label": "register =", "type": "assigned_variable", "loc": [135, 135], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [14, 1, 0.3, 0.0022, 1, 0.66, 0.3333, 276, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "register", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " register = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L136_C4", "label": "__init__", "type": "function", "loc": [136, 138], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [2, 1, 0.3044, 0.0067, 1, 0.66, 0.3889, 555, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self):\n self.message_tree = TreeNode('')\n self.scope = self.message_tree"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L137_C8", "label": "self.message_tree = TreeNode()", "type": "assigned_variable", "loc": [137, 137], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L136_C4", "vector": [14, 2, 0.3044, 0.0022, 2, 0.38, 0.0, 121, 3, 1, 0, 0, 30, 10, 1], "semantic": {"name": "self.message_tree", "arg_names": [], "import_names": [], "rhs_call_name": "TreeNode", "annotation": ""}, "snippet": " self.message_tree = TreeNode('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L138_C8", "label": "self.scope =", "type": "assigned_variable", "loc": [138, 138], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L136_C4", "vector": [14, 2, 0.3067, 0.0022, 2, 0.38, 1.0, 550, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.scope", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.scope = self.message_tree"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L140_C4", "label": "get_global_name", "type": "function", "loc": [140, 141], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [2, 1, 0.3122, 0.0044, 1, 0.66, 0.4444, 36, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_global_name", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_global_name(self):\n return self.scope.get_global_name()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L141_C8", "label": "return", "type": "return", "loc": [141, 141], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L140_C4", "vector": [13, 2, 0.3133, 0.0022, 2, 0.96, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.scope.get_global_name()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L143_C4", "label": "get_local_name", "type": "function", "loc": [143, 144], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [2, 1, 0.3189, 0.0044, 1, 0.66, 0.5, 996, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_local_name", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_local_name(self):\n return self.scope.get_local_name()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L144_C8", "label": "return", "type": "return", "loc": [144, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L143_C4", "vector": [13, 2, 0.32, 0.0022, 2, 0.06, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.scope.get_local_name()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L146_C4", "label": "get_ref_name", "type": "function", "loc": [146, 154], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [2, 1, 0.3333, 0.02, 1, 0.66, 0.5556, 958, 0, 2, 1, 0, 0, 0, 5], "semantic": {"name": "get_ref_name", "arg_names": ["self", "type_name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_ref_name(self, type_name):\n try:\n node = self.lookup_name(type_name)\n except:\n # if the child doesn't be founded, it must be in this file\n return type_name[len('.'.join(self.package)) + 2:]\n if node.filename != self.filename:\n return node.filename + '_pb.' + node.get_local_name()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Try_L147_C8", "label": "try", "type": "try", "loc": [147, 151], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L146_C4", "vector": [7, 2, 0.3311, 0.0111, 2, 0.36, 0.0, 0, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n node = self.lookup_name(type_name)\n except:\n # if the child doesn't be founded, it must be in this file\n return type_name[len('.'.join(self.package)) + 2:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L148_C12", "label": "node = lookup_name()", "type": "assigned_variable", "loc": [148, 148], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:Try_L147_C8", "vector": [14, 3, 0.3289, 0.0022, 3, 0.74, 0.0, 772, 3, 1, 0, 0, 962, 10, 1], "semantic": {"name": "node", "arg_names": [], "import_names": [], "rhs_call_name": "lookup_name", "annotation": ""}, "snippet": " node = self.lookup_name(type_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L151_C12", "label": "return", "type": "return", "loc": [151, 151], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:Try_L147_C8", "vector": [13, 3, 0.3356, 0.0022, 3, 0.74, 0.0, 0, 6, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return type_name[len('.'.join(self.package)) + 2:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L152_C8", "label": "if", "type": "if", "loc": [152, 153], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L146_C4", "vector": [4, 2, 0.3389, 0.0044, 2, 0.36, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if node.filename != self.filename:\n return node.filename + '_pb.' + node.get_local_name()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L153_C12", "label": "return", "type": "return", "loc": [153, 153], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L152_C8", "vector": [13, 3, 0.34, 0.0022, 3, 0.95, 0.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return node.filename + '_pb.' + node.get_local_name()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L154_C8", "label": "return", "type": "return", "loc": [154, 154], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L146_C4", "vector": [13, 2, 0.3422, 0.0022, 2, 0.36, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return node.get_local_name()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L156_C4", "label": "lookup_name", "type": "function", "loc": [156, 161], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [2, 1, 0.3522, 0.0133, 1, 0.66, 0.6111, 962, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "lookup_name", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def lookup_name(self, name):\n names = name.split('.')\n if names[0] == '':\n return self.message_tree.find_child(names[1:])\n else:\n return self.scope.parent.find_child(names)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L157_C8", "label": "names = split()", "type": "assigned_variable", "loc": [157, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L156_C4", "vector": [14, 2, 0.3489, 0.0022, 2, 0.43, 0.0, 382, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "names", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " names = name.split('.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L158_C8", "label": "if", "type": "if", "loc": [158, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L156_C4", "vector": [4, 2, 0.3544, 0.0089, 2, 0.43, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if names[0] == '':\n return self.message_tree.find_child(names[1:])\n else:\n return self.scope.parent.find_child(names)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L159_C12", "label": "return", "type": "return", "loc": [159, 159], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L158_C8", "vector": [13, 3, 0.3533, 0.0022, 3, 0.79, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.message_tree.find_child(names[1:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L161_C12", "label": "return", "type": "return", "loc": [161, 161], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L158_C8", "vector": [13, 3, 0.3578, 0.0022, 3, 0.79, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.scope.parent.find_child(names)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L163_C4", "label": "enter_package", "type": "function", "loc": [163, 174], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [2, 1, 0.3744, 0.0267, 1, 0.66, 0.6667, 132, 0, 2, 1, 0, 0, 0, 4], "semantic": {"name": "enter_package", "arg_names": ["self", "package"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def enter_package(self, package):\n if not package:\n return self.message_tree\n names = package.split('.')\n pos = self.message_tree\n for i, name in enumerate(names):\n new_pos = pos.get_child(name)\n if new_pos:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L164_C8", "label": "if", "type": "if", "loc": [164, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L163_C4", "vector": [4, 2, 0.3656, 0.0044, 2, 0.57, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not package:\n return self.message_tree"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L165_C12", "label": "return", "type": "return", "loc": [165, 165], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L164_C8", "vector": [13, 3, 0.3667, 0.0022, 3, 0.95, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.message_tree"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L166_C8", "label": "names = split()", "type": "assigned_variable", "loc": [166, 166], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L163_C4", "vector": [14, 2, 0.3689, 0.0022, 2, 0.57, 0.25, 382, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "names", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " names = package.split('.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L167_C8", "label": "pos =", "type": "assigned_variable", "loc": [167, 167], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L163_C4", "vector": [14, 2, 0.3711, 0.0022, 2, 0.57, 0.5, 627, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = self.message_tree"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L168_C8", "label": "for i, name", "type": "for", "loc": [168, 173], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L163_C4", "vector": [6, 2, 0.3789, 0.0133, 2, 0.57, 0.75, 14, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "i, name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i, name in enumerate(names):\n new_pos = pos.get_child(name)\n if new_pos:\n pos = new_pos\n else:\n return self._build_nodes(pos, names[i:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L169_C12", "label": "new_pos = get_child()", "type": "assigned_variable", "loc": [169, 169], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L168_C8", "vector": [14, 3, 0.3756, 0.0022, 3, 0.35, 0.0, 414, 3, 1, 0, 0, 799, 10, 1], "semantic": {"name": "new_pos", "arg_names": [], "import_names": [], "rhs_call_name": "get_child", "annotation": ""}, "snippet": " new_pos = pos.get_child(name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L170_C12", "label": "if", "type": "if", "loc": [170, 173], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L168_C8", "vector": [4, 3, 0.3811, 0.0089, 3, 0.35, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if new_pos:\n pos = new_pos\n else:\n return self._build_nodes(pos, names[i:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L171_C16", "label": "pos =", "type": "assigned_variable", "loc": [171, 171], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L170_C12", "vector": [14, 4, 0.38, 0.0022, 4, 0.56, 0.0, 627, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = new_pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L173_C16", "label": "return", "type": "return", "loc": [173, 173], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L170_C12", "vector": [13, 4, 0.3844, 0.0022, 4, 0.56, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._build_nodes(pos, names[i:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L174_C8", "label": "return", "type": "return", "loc": [174, 174], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L163_C4", "vector": [13, 2, 0.3867, 0.0022, 2, 0.57, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L176_C4", "label": "enter_file", "type": "function", "loc": [176, 180], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [2, 1, 0.3956, 0.0111, 1, 0.66, 0.7222, 739, 0, 3, 0, 0, 0, 0, 3], "semantic": {"name": "enter_file", "arg_names": ["self", "filename", "package"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def enter_file(self, filename, package):\n self.filename = filename\n self.package = package.split('.')\n self._init_field()\n self.scope = self.enter_package(package)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L177_C8", "label": "self.filename =", "type": "assigned_variable", "loc": [177, 177], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L176_C4", "vector": [14, 2, 0.3933, 0.0022, 2, 0.39, 0.0, 942, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.filename = filename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L178_C8", "label": "self.package = split()", "type": "assigned_variable", "loc": [178, 178], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L176_C4", "vector": [14, 2, 0.3956, 0.0022, 2, 0.39, 0.3333, 544, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "self.package", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " self.package = package.split('.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L179_C8", "label": "_init_field()", "type": "expression", "loc": [179, 179], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L176_C4", "vector": [8, 2, 0.3978, 0.0022, 2, 0.39, 0.6667, 721, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_init_field", "arg_names": [], "import_names": [], "rhs_call_name": "_init_field", "annotation": ""}, "snippet": " self._init_field()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L180_C8", "label": "self.scope = enter_package()", "type": "assigned_variable", "loc": [180, 180], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L176_C4", "vector": [14, 2, 0.4, 0.0022, 2, 0.39, 1.0, 550, 3, 1, 0, 0, 132, 10, 1], "semantic": {"name": "self.scope", "arg_names": [], "import_names": [], "rhs_call_name": "enter_package", "annotation": ""}, "snippet": " self.scope = self.enter_package(package)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L182_C4", "label": "exit_file", "type": "function", "loc": [182, 186], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [2, 1, 0.4089, 0.0111, 1, 0.66, 0.7778, 520, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit_file", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def exit_file(self):\n self._init_field()\n self.filename = None\n self.package = []\n self.scope = self.scope.parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L183_C8", "label": "_init_field()", "type": "expression", "loc": [183, 183], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L182_C4", "vector": [8, 2, 0.4067, 0.0022, 2, 0.82, 0.0, 721, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_init_field", "arg_names": [], "import_names": [], "rhs_call_name": "_init_field", "annotation": ""}, "snippet": " self._init_field()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L184_C8", "label": "self.filename =", "type": "assigned_variable", "loc": [184, 184], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L182_C4", "vector": [14, 2, 0.4089, 0.0022, 2, 0.82, 0.3333, 942, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.filename = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L185_C8", "label": "self.package =", "type": "assigned_variable", "loc": [185, 185], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L182_C4", "vector": [14, 2, 0.4111, 0.0022, 2, 0.82, 0.6667, 544, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.package", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.package = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L186_C8", "label": "self.scope =", "type": "assigned_variable", "loc": [186, 186], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L182_C4", "vector": [14, 2, 0.4133, 0.0022, 2, 0.82, 1.0, 550, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.scope", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.scope = self.scope.parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L188_C4", "label": "enter", "type": "function", "loc": [188, 190], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [2, 1, 0.42, 0.0067, 1, 0.66, 0.8333, 196, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "enter", "arg_names": ["self", "message_name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def enter(self, message_name):\n self.scope = TreeNode(message_name, self.scope, self.filename,\n self.package)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L189_C8", "label": "self.scope = TreeNode()", "type": "assigned_variable", "loc": [189, 190], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L188_C4", "vector": [14, 2, 0.4211, 0.0044, 2, 0.74, 0.0, 550, 3, 4, 0, 0, 30, 10, 1], "semantic": {"name": "self.scope", "arg_names": [], "import_names": [], "rhs_call_name": "TreeNode", "annotation": ""}, "snippet": " self.scope = TreeNode(message_name, self.scope, self.filename,\n self.package)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L192_C4", "label": "exit", "type": "function", "loc": [192, 193], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [2, 1, 0.4278, 0.0044, 1, 0.66, 0.8889, 436, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "exit", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def exit(self):\n self.scope = self.scope.parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L193_C8", "label": "self.scope =", "type": "assigned_variable", "loc": [193, 193], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L192_C4", "vector": [14, 2, 0.4289, 0.0022, 2, 0.93, 0.0, 550, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.scope", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.scope = self.scope.parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L195_C4", "label": "_init_field", "type": "function", "loc": [195, 199], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [2, 1, 0.4378, 0.0111, 1, 0.66, 0.9444, 721, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "_init_field", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _init_field(self):\n self.descriptor = []\n self.context = []\n self.message = []\n self.register = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L196_C8", "label": "self.descriptor =", "type": "assigned_variable", "loc": [196, 196], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L195_C4", "vector": [14, 2, 0.4356, 0.0022, 2, 0.04, 0.0, 955, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.descriptor", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.descriptor = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L197_C8", "label": "self.context =", "type": "assigned_variable", "loc": [197, 197], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L195_C4", "vector": [14, 2, 0.4378, 0.0022, 2, 0.04, 0.3333, 249, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.context", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.context = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L198_C8", "label": "self.message =", "type": "assigned_variable", "loc": [198, 198], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L195_C4", "vector": [14, 2, 0.44, 0.0022, 2, 0.04, 0.6667, 709, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.message", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.message = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L199_C8", "label": "self.register =", "type": "assigned_variable", "loc": [199, 199], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L195_C4", "vector": [14, 2, 0.4422, 0.0022, 2, 0.04, 1.0, 105, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.register", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.register = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L201_C4", "label": "_build_nodes", "type": "function", "loc": [201, 205], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "vector": [2, 1, 0.4511, 0.0111, 1, 0.66, 1.0, 569, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "_build_nodes", "arg_names": ["self", "node", "names"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _build_nodes(self, node, names):\n parent = node\n for i in names:\n parent = TreeNode(i, parent, self.filename, self.package)\n return parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L202_C8", "label": "parent =", "type": "assigned_variable", "loc": [202, 202], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L201_C4", "vector": [14, 2, 0.4489, 0.0022, 2, 0.7, 0.0, 80, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "parent", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parent = node"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L203_C8", "label": "for i", "type": "for", "loc": [203, 204], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L201_C4", "vector": [6, 2, 0.4522, 0.0044, 2, 0.7, 0.5, 826, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in names:\n parent = TreeNode(i, parent, self.filename, self.package)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L204_C12", "label": "parent = TreeNode()", "type": "assigned_variable", "loc": [204, 204], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L203_C8", "vector": [14, 3, 0.4533, 0.0022, 3, 0.86, 0.0, 80, 3, 4, 0, 0, 30, 10, 1], "semantic": {"name": "parent", "arg_names": [], "import_names": [], "rhs_call_name": "TreeNode", "annotation": ""}, "snippet": " parent = TreeNode(i, parent, self.filename, self.package)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L205_C8", "label": "return", "type": "return", "loc": [205, 205], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L201_C4", "vector": [13, 2, 0.4556, 0.0022, 2, 0.7, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L207_C0", "label": "Writer", "type": "class", "loc": [207, 227], "level": 0, "parent": null, "vector": [3, 0, 0.4822, 0.0467, 0, 0.66, 0.625, 839, 0, 5, 0, 0, 186, 0, 5], "semantic": {"name": "Writer", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Writer(object):\n def __init__(self, prefix=None):\n self.io = StringIO()\n self.__indent = ''\n self.__prefix = prefix\n\n def getvalue(self):\n return self.io.getvalue()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L208_C4", "label": "__init__", "type": "function", "loc": [208, 211], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L207_C0", "vector": [2, 1, 0.4656, 0.0089, 1, 0.4, 0.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "prefix"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, prefix=None):\n self.io = StringIO()\n self.__indent = ''\n self.__prefix = prefix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L209_C8", "label": "self.io = StringIO()", "type": "assigned_variable", "loc": [209, 209], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L208_C4", "vector": [14, 2, 0.4644, 0.0022, 2, 0.45, 0.0, 250, 3, 0, 0, 0, 609, 10, 1], "semantic": {"name": "self.io", "arg_names": [], "import_names": [], "rhs_call_name": "StringIO", "annotation": ""}, "snippet": " self.io = StringIO()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L210_C8", "label": "self.__indent =", "type": "assigned_variable", "loc": [210, 210], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L208_C4", "vector": [14, 2, 0.4667, 0.0022, 2, 0.45, 0.5, 352, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.__indent", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.__indent = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L211_C8", "label": "self.__prefix =", "type": "assigned_variable", "loc": [211, 211], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L208_C4", "vector": [14, 2, 0.4689, 0.0022, 2, 0.45, 1.0, 584, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.__prefix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.__prefix = prefix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L213_C4", "label": "getvalue", "type": "function", "loc": [213, 214], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L207_C0", "vector": [2, 1, 0.4744, 0.0044, 1, 0.4, 0.25, 626, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "getvalue", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getvalue(self):\n return self.io.getvalue()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L214_C8", "label": "return", "type": "return", "loc": [214, 214], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L213_C4", "vector": [13, 2, 0.4756, 0.0022, 2, 0.28, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.io.getvalue()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L216_C4", "label": "__enter__", "type": "function", "loc": [216, 218], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L207_C0", "vector": [2, 1, 0.4822, 0.0067, 1, 0.4, 0.5, 230, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__enter__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __enter__(self):\n self.__indent += ' '\n return self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L218_C8", "label": "return", "type": "return", "loc": [218, 218], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L216_C4", "vector": [13, 2, 0.4844, 0.0022, 2, 0.6, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L220_C4", "label": "__exit__", "type": "function", "loc": [220, 221], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L207_C0", "vector": [2, 1, 0.49, 0.0044, 1, 0.4, 0.75, 12, 0, 4, 0, 0, 0, 0, 0], "semantic": {"name": "__exit__", "arg_names": ["self", "type", "value", "trackback"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __exit__(self, type, value, trackback):\n self.__indent = self.__indent[:-4]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L221_C8", "label": "self.__indent =", "type": "assigned_variable", "loc": [221, 221], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L220_C4", "vector": [14, 2, 0.4911, 0.0022, 2, 0.2, 0.0, 352, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.__indent", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.__indent = self.__indent[:-4]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L223_C4", "label": "__call__", "type": "function", "loc": [223, 227], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L207_C0", "vector": [2, 1, 0.5, 0.0111, 1, 0.4, 1.0, 319, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "__call__", "arg_names": ["self", "data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __call__(self, data):\n self.io.write(self.__indent)\n if self.__prefix:\n self.io.write(self.__prefix)\n self.io.write(data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L224_C8", "label": "write()", "type": "expression", "loc": [224, 224], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L223_C4", "vector": [8, 2, 0.4978, 0.0022, 2, 0.49, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " self.io.write(self.__indent)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L225_C8", "label": "if", "type": "if", "loc": [225, 226], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L223_C4", "vector": [4, 2, 0.5011, 0.0044, 2, 0.49, 0.5, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.__prefix:\n self.io.write(self.__prefix)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L226_C12", "label": "write()", "type": "expression", "loc": [226, 226], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L225_C8", "vector": [8, 3, 0.5022, 0.0022, 3, 0.81, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " self.io.write(self.__prefix)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L227_C8", "label": "write()", "type": "expression", "loc": [227, 227], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L223_C4", "vector": [8, 2, 0.5044, 0.0022, 2, 0.49, 1.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " self.io.write(data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L229_C0", "label": "DEFAULT_VALUE =", "type": "assigned_variable", "loc": [229, 247], "level": 0, "parent": null, "vector": [14, 0, 0.5289, 0.0422, 0, 0.66, 0.6667, 202, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "DEFAULT_VALUE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DEFAULT_VALUE = {\n FDP.TYPE_DOUBLE : '0.0',\n FDP.TYPE_FLOAT : '0.0',\n FDP.TYPE_INT64 : '0',\n FDP.TYPE_UINT64 : '0',\n FDP.TYPE_INT32 : '0',\n FDP.TYPE_FIXED64 : '0',\n FDP.TYPE_FIXED32 : '0',"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "label": "code_gen_enum_item", "type": "function", "loc": [249, 262], "level": 0, "parent": null, "vector": [2, 0, 0.5678, 0.0311, 0, 0.66, 0.7083, 746, 0, 3, 1, 0, 0, 0, 10], "semantic": {"name": "code_gen_enum_item", "arg_names": ["index", "enum_value", "env"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def code_gen_enum_item(index, enum_value, env):\n full_name = env.get_local_name() + '.' + enum_value.name\n obj_name = full_name.upper().replace('.', '_') + '_ENUM'\n env.descriptor.append(\n \"local %s = protobuf.EnumValueDescriptor();\\n\"% obj_name\n )\n\n context = Writer(obj_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L250_C4", "label": "full_name =", "type": "assigned_variable", "loc": [250, 250], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "vector": [14, 1, 0.5556, 0.0022, 1, 0.85, 0.0, 869, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "full_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " full_name = env.get_local_name() + '.' + enum_value.name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L251_C4", "label": "obj_name =", "type": "assigned_variable", "loc": [251, 251], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "vector": [14, 1, 0.5578, 0.0022, 1, 0.85, 0.125, 412, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "obj_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " obj_name = full_name.upper().replace('.', '_') + '_ENUM'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L252_C4", "label": "append()", "type": "expression", "loc": [252, 254], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "vector": [8, 1, 0.5622, 0.0067, 1, 0.85, 0.25, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " env.descriptor.append(\n \"local %s = protobuf.EnumValueDescriptor();\\n\"% obj_name\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L256_C4", "label": "context = Writer()", "type": "assigned_variable", "loc": [256, 256], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "vector": [14, 1, 0.5689, 0.0022, 1, 0.85, 0.375, 954, 3, 1, 0, 0, 839, 10, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "Writer", "annotation": ""}, "snippet": " context = Writer(obj_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L257_C4", "label": "context()", "type": "expression", "loc": [257, 257], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "vector": [8, 1, 0.5711, 0.0022, 1, 0.85, 0.5, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.name = \"%s\"\\n' % enum_value.name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L258_C4", "label": "context()", "type": "expression", "loc": [258, 258], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "vector": [8, 1, 0.5733, 0.0022, 1, 0.85, 0.625, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.index = %d\\n' % index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L259_C4", "label": "context()", "type": "expression", "loc": [259, 259], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "vector": [8, 1, 0.5756, 0.0022, 1, 0.85, 0.75, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.number = %d\\n' % enum_value.number)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L261_C4", "label": "append()", "type": "expression", "loc": [261, 261], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "vector": [8, 1, 0.58, 0.0022, 1, 0.85, 0.875, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " env.context.append(context.getvalue())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L262_C4", "label": "return", "type": "return", "loc": [262, 262], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "vector": [13, 1, 0.5822, 0.0022, 1, 0.85, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return obj_name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "label": "code_gen_enum", "type": "function", "loc": [264, 283], "level": 0, "parent": null, "vector": [2, 0, 0.6078, 0.0444, 0, 0.66, 0.75, 768, 0, 2, 1, 0, 0, 0, 17], "semantic": {"name": "code_gen_enum", "arg_names": ["enum_desc", "env"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def code_gen_enum(enum_desc, env):\n env.enter(enum_desc.name)\n full_name = env.get_local_name()\n obj_name = full_name.upper().replace('.', '_')\n env.descriptor.append(\n \"local %s = protobuf.EnumDescriptor();\\n\"% obj_name\n )\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L265_C4", "label": "enter()", "type": "expression", "loc": [265, 265], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "vector": [8, 1, 0.5889, 0.0022, 1, 0.07, 0.0, 196, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "enter", "arg_names": [], "import_names": [], "rhs_call_name": "enter", "annotation": ""}, "snippet": " env.enter(enum_desc.name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L266_C4", "label": "full_name = get_local_name()", "type": "assigned_variable", "loc": [266, 266], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "vector": [14, 1, 0.5911, 0.0022, 1, 0.07, 0.0833, 869, 3, 0, 0, 0, 996, 10, 1], "semantic": {"name": "full_name", "arg_names": [], "import_names": [], "rhs_call_name": "get_local_name", "annotation": ""}, "snippet": " full_name = env.get_local_name()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L267_C4", "label": "obj_name = replace()", "type": "assigned_variable", "loc": [267, 267], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "vector": [14, 1, 0.5933, 0.0022, 1, 0.07, 0.1667, 412, 3, 2, 0, 0, 293, 10, 2], "semantic": {"name": "obj_name", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " obj_name = full_name.upper().replace('.', '_')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L268_C4", "label": "append()", "type": "expression", "loc": [268, 270], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "vector": [8, 1, 0.5978, 0.0067, 1, 0.07, 0.25, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " env.descriptor.append(\n \"local %s = protobuf.EnumDescriptor();\\n\"% obj_name\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L272_C4", "label": "context = Writer()", "type": "assigned_variable", "loc": [272, 272], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "vector": [14, 1, 0.6044, 0.0022, 1, 0.07, 0.3333, 954, 3, 1, 0, 0, 839, 10, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "Writer", "annotation": ""}, "snippet": " context = Writer(obj_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L273_C4", "label": "context()", "type": "expression", "loc": [273, 273], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "vector": [8, 1, 0.6067, 0.0022, 1, 0.07, 0.4167, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.name = \"%s\"\\n' % enum_desc.name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L274_C4", "label": "context()", "type": "expression", "loc": [274, 274], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "vector": [8, 1, 0.6089, 0.0022, 1, 0.07, 0.5, 954, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.full_name = \"%s\"\\n' % env.get_global_name())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L276_C4", "label": "values =", "type": "assigned_variable", "loc": [276, 276], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "vector": [14, 1, 0.6133, 0.0022, 1, 0.07, 0.5833, 721, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "values", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " values = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L277_C4", "label": "for i, enum_value", "type": "for", "loc": [277, 278], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "vector": [6, 1, 0.6167, 0.0044, 1, 0.07, 0.6667, 466, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "i, enum_value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i, enum_value in enumerate(enum_desc.value):\n values.append(code_gen_enum_item(i, enum_value, env))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L278_C8", "label": "append()", "type": "expression", "loc": [278, 278], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L277_C4", "vector": [8, 2, 0.6178, 0.0022, 2, 0.31, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " values.append(code_gen_enum_item(i, enum_value, env))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L279_C4", "label": "context()", "type": "expression", "loc": [279, 279], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "vector": [8, 1, 0.62, 0.0022, 1, 0.07, 0.75, 954, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.values = {%s}\\n' % ','.join(values))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L281_C4", "label": "append()", "type": "expression", "loc": [281, 281], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "vector": [8, 1, 0.6244, 0.0022, 1, 0.07, 0.8333, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " env.context.append(context.getvalue())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L282_C4", "label": "exit()", "type": "expression", "loc": [282, 282], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "vector": [8, 1, 0.6267, 0.0022, 1, 0.07, 0.9167, 436, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " env.exit()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L283_C4", "label": "return", "type": "return", "loc": [283, 283], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "vector": [13, 1, 0.6289, 0.0022, 1, 0.07, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return obj_name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "label": "code_gen_field", "type": "function", "loc": [285, 334], "level": 0, "parent": null, "vector": [2, 0, 0.6878, 0.1111, 0, 0.66, 0.7917, 864, 0, 3, 1, 0, 0, 0, 31], "semantic": {"name": "code_gen_field", "arg_names": ["index", "field_desc", "env"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def code_gen_field(index, field_desc, env):\n full_name = env.get_local_name() + '.' + field_desc.name\n obj_name = full_name.upper().replace('.', '_') + '_FIELD'\n env.descriptor.append(\n \"local %s = protobuf.FieldDescriptor();\\n\"% obj_name\n )\n\n context = Writer(obj_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L286_C4", "label": "full_name =", "type": "assigned_variable", "loc": [286, 286], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "vector": [14, 1, 0.6356, 0.0022, 1, 0.6, 0.0, 869, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "full_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " full_name = env.get_local_name() + '.' + field_desc.name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L287_C4", "label": "obj_name =", "type": "assigned_variable", "loc": [287, 287], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "vector": [14, 1, 0.6378, 0.0022, 1, 0.6, 0.0667, 412, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "obj_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " obj_name = full_name.upper().replace('.', '_') + '_FIELD'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L288_C4", "label": "append()", "type": "expression", "loc": [288, 290], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "vector": [8, 1, 0.6422, 0.0067, 1, 0.6, 0.1333, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " env.descriptor.append(\n \"local %s = protobuf.FieldDescriptor();\\n\"% obj_name\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L292_C4", "label": "context = Writer()", "type": "assigned_variable", "loc": [292, 292], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "vector": [14, 1, 0.6489, 0.0022, 1, 0.6, 0.2, 954, 3, 1, 0, 0, 839, 10, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "Writer", "annotation": ""}, "snippet": " context = Writer(obj_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L294_C4", "label": "context()", "type": "expression", "loc": [294, 294], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "vector": [8, 1, 0.6533, 0.0022, 1, 0.6, 0.2667, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.name = \"%s\"\\n' % field_desc.name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L295_C4", "label": "context()", "type": "expression", "loc": [295, 296], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "vector": [8, 1, 0.6567, 0.0044, 1, 0.6, 0.3333, 954, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.full_name = \"%s\"\\n' % (\n env.get_global_name() + '.' + field_desc.name))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L297_C4", "label": "context()", "type": "expression", "loc": [297, 297], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "vector": [8, 1, 0.66, 0.0022, 1, 0.6, 0.4, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.number = %d\\n' % field_desc.number)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L298_C4", "label": "context()", "type": "expression", "loc": [298, 298], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "vector": [8, 1, 0.6622, 0.0022, 1, 0.6, 0.4667, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.index = %d\\n' % index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L299_C4", "label": "context()", "type": "expression", "loc": [299, 299], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "vector": [8, 1, 0.6644, 0.0022, 1, 0.6, 0.5333, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.label = %d\\n' % field_desc.label)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L301_C4", "label": "if", "type": "if", "loc": [301, 316], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "vector": [4, 1, 0.6856, 0.0356, 1, 0.6, 0.6, 0, 3, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if field_desc.HasField(\"default_value\"):\n context('.has_default_value = true\\n')\n value = field_desc.default_value\n if field_desc.type == FDP.TYPE_STRING:\n context('.default_value = \"%s\"\\n'%value)\n else:\n context('.default_value = %s\\n'%value)\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L302_C8", "label": "context()", "type": "expression", "loc": [302, 302], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L301_C4", "vector": [8, 2, 0.6711, 0.0022, 2, 0.32, 0.0, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.has_default_value = true\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L303_C8", "label": "value =", "type": "assigned_variable", "loc": [303, 303], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L301_C4", "vector": [14, 2, 0.6733, 0.0022, 2, 0.32, 0.2, 441, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " value = field_desc.default_value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L304_C8", "label": "if", "type": "if", "loc": [304, 307], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L301_C4", "vector": [4, 2, 0.6789, 0.0089, 2, 0.32, 0.4, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if field_desc.type == FDP.TYPE_STRING:\n context('.default_value = \"%s\"\\n'%value)\n else:\n context('.default_value = %s\\n'%value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L305_C12", "label": "context()", "type": "expression", "loc": [305, 305], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L304_C8", "vector": [8, 3, 0.6778, 0.0022, 3, 0.28, 0.0, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.default_value = \"%s\"\\n'%value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L307_C12", "label": "context()", "type": "expression", "loc": [307, 307], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L304_C8", "vector": [8, 3, 0.6822, 0.0022, 3, 0.28, 1.0, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.default_value = %s\\n'%value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L309_C8", "label": "context()", "type": "expression", "loc": [309, 309], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L301_C4", "vector": [8, 2, 0.6867, 0.0022, 2, 0.32, 0.6, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.has_default_value = false\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L310_C8", "label": "if", "type": "if", "loc": [310, 315], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L301_C4", "vector": [4, 2, 0.6944, 0.0133, 2, 0.32, 0.8, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if field_desc.label == FDP.LABEL_REPEATED:\n default_value = \"{}\"\n elif field_desc.HasField('type_name'):\n default_value = \"nil\"\n else:\n default_value = DEFAULT_VALUE[field_desc.type]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L311_C12", "label": "default_value =", "type": "assigned_variable", "loc": [311, 311], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L310_C8", "vector": [14, 3, 0.6911, 0.0022, 3, 0.35, 0.0, 876, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "default_value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " default_value = \"{}\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L312_C8", "label": "if", "type": "if", "loc": [312, 315], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L310_C8", "vector": [4, 3, 0.6967, 0.0089, 3, 0.35, 1.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif field_desc.HasField('type_name'):\n default_value = \"nil\"\n else:\n default_value = DEFAULT_VALUE[field_desc.type]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L313_C12", "label": "default_value =", "type": "assigned_variable", "loc": [313, 313], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L312_C8", "vector": [14, 4, 0.6956, 0.0022, 4, 0.95, 0.0, 876, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "default_value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " default_value = \"nil\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L315_C12", "label": "default_value =", "type": "assigned_variable", "loc": [315, 315], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L312_C8", "vector": [14, 4, 0.7, 0.0022, 4, 0.95, 1.0, 876, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "default_value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " default_value = DEFAULT_VALUE[field_desc.type]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L316_C8", "label": "context()", "type": "expression", "loc": [316, 316], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L301_C4", "vector": [8, 2, 0.7022, 0.0022, 2, 0.32, 1.0, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.default_value = %s\\n' % default_value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L318_C4", "label": "if", "type": "if", "loc": [318, 323], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "vector": [4, 1, 0.7122, 0.0133, 1, 0.6, 0.6667, 0, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if field_desc.HasField('type_name'):\n type_name = env.get_ref_name(field_desc.type_name).upper().replace('.', '_')\n if field_desc.type == FDP.TYPE_MESSAGE:\n context('.message_type = %s\\n' % type_name)\n else:\n context('.enum_type = %s\\n' % type_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L319_C8", "label": "type_name = replace()", "type": "assigned_variable", "loc": [319, 319], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L318_C4", "vector": [14, 2, 0.7089, 0.0022, 2, 0.27, 0.0, 81, 3, 2, 0, 0, 293, 10, 3], "semantic": {"name": "type_name", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " type_name = env.get_ref_name(field_desc.type_name).upper().replace('.', '_')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L320_C8", "label": "if", "type": "if", "loc": [320, 323], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L318_C4", "vector": [4, 2, 0.7144, 0.0089, 2, 0.27, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if field_desc.type == FDP.TYPE_MESSAGE:\n context('.message_type = %s\\n' % type_name)\n else:\n context('.enum_type = %s\\n' % type_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L321_C12", "label": "context()", "type": "expression", "loc": [321, 321], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L320_C8", "vector": [8, 3, 0.7133, 0.0022, 3, 0.94, 0.0, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.message_type = %s\\n' % type_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L323_C12", "label": "context()", "type": "expression", "loc": [323, 323], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L320_C8", "vector": [8, 3, 0.7178, 0.0022, 3, 0.94, 1.0, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.enum_type = %s\\n' % type_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L325_C4", "label": "if", "type": "if", "loc": [325, 329], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "vector": [4, 1, 0.7267, 0.0111, 1, 0.6, 0.7333, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if field_desc.HasField('extendee'):\n type_name = env.get_ref_name(field_desc.extendee)\n env.register.append(\n \"%s.RegisterExtension(%s)\\n\" % (type_name, obj_name)\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L326_C8", "label": "type_name = get_ref_name()", "type": "assigned_variable", "loc": [326, 326], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L325_C4", "vector": [14, 2, 0.7244, 0.0022, 2, 0.33, 0.0, 81, 3, 1, 0, 0, 958, 10, 1], "semantic": {"name": "type_name", "arg_names": [], "import_names": [], "rhs_call_name": "get_ref_name", "annotation": ""}, "snippet": " type_name = env.get_ref_name(field_desc.extendee)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L327_C8", "label": "append()", "type": "expression", "loc": [327, 329], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L325_C4", "vector": [8, 2, 0.7289, 0.0067, 2, 0.33, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " env.register.append(\n \"%s.RegisterExtension(%s)\\n\" % (type_name, obj_name)\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L331_C4", "label": "context()", "type": "expression", "loc": [331, 331], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "vector": [8, 1, 0.7356, 0.0022, 1, 0.6, 0.8, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.type = %d\\n' % field_desc.type)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L332_C4", "label": "context()", "type": "expression", "loc": [332, 332], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "vector": [8, 1, 0.7378, 0.0022, 1, 0.6, 0.8667, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.cpp_type = %d\\n\\n' % CPP_TYPE[field_desc.type])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L333_C4", "label": "append()", "type": "expression", "loc": [333, 333], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "vector": [8, 1, 0.74, 0.0022, 1, 0.6, 0.9333, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " env.context.append(context.getvalue())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L334_C4", "label": "return", "type": "return", "loc": [334, 334], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "vector": [13, 1, 0.7422, 0.0022, 1, 0.6, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return obj_name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "label": "code_gen_message", "type": "function", "loc": [336, 382], "level": 0, "parent": null, "vector": [2, 0, 0.7978, 0.1044, 0, 0.66, 0.8333, 937, 0, 3, 1, 0, 0, 0, 35], "semantic": {"name": "code_gen_message", "arg_names": ["message_descriptor", "env", "containing_type"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def code_gen_message(message_descriptor, env, containing_type = None):\n env.enter(message_descriptor.name)\n full_name = env.get_local_name()\n obj_name = full_name.upper().replace('.', '_')\n env.descriptor.append(\n \"local %s = protobuf.Descriptor();\\n\"% obj_name\n )\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L337_C4", "label": "enter()", "type": "expression", "loc": [337, 337], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [8, 1, 0.7489, 0.0022, 1, 0.08, 0.0, 196, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "enter", "arg_names": [], "import_names": [], "rhs_call_name": "enter", "annotation": ""}, "snippet": " env.enter(message_descriptor.name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L338_C4", "label": "full_name = get_local_name()", "type": "assigned_variable", "loc": [338, 338], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [14, 1, 0.7511, 0.0022, 1, 0.08, 0.0417, 869, 3, 0, 0, 0, 996, 10, 1], "semantic": {"name": "full_name", "arg_names": [], "import_names": [], "rhs_call_name": "get_local_name", "annotation": ""}, "snippet": " full_name = env.get_local_name()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L339_C4", "label": "obj_name = replace()", "type": "assigned_variable", "loc": [339, 339], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [14, 1, 0.7533, 0.0022, 1, 0.08, 0.0833, 412, 3, 2, 0, 0, 293, 10, 2], "semantic": {"name": "obj_name", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " obj_name = full_name.upper().replace('.', '_')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L340_C4", "label": "append()", "type": "expression", "loc": [340, 342], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [8, 1, 0.7578, 0.0067, 1, 0.08, 0.125, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " env.descriptor.append(\n \"local %s = protobuf.Descriptor();\\n\"% obj_name\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L344_C4", "label": "context = Writer()", "type": "assigned_variable", "loc": [344, 344], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [14, 1, 0.7644, 0.0022, 1, 0.08, 0.1667, 954, 3, 1, 0, 0, 839, 10, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "Writer", "annotation": ""}, "snippet": " context = Writer(obj_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L345_C4", "label": "context()", "type": "expression", "loc": [345, 345], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [8, 1, 0.7667, 0.0022, 1, 0.08, 0.2083, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.name = \"%s\"\\n' % message_descriptor.name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L346_C4", "label": "context()", "type": "expression", "loc": [346, 346], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [8, 1, 0.7689, 0.0022, 1, 0.08, 0.25, 954, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.full_name = \"%s\"\\n' % env.get_global_name())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L348_C4", "label": "nested_types =", "type": "assigned_variable", "loc": [348, 348], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [14, 1, 0.7733, 0.0022, 1, 0.08, 0.2917, 821, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "nested_types", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " nested_types = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L349_C4", "label": "for msg_desc", "type": "for", "loc": [349, 351], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [6, 1, 0.7778, 0.0067, 1, 0.08, 0.3333, 525, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "msg_desc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for msg_desc in message_descriptor.nested_type:\n msg_name = code_gen_message(msg_desc, env, obj_name)\n nested_types.append(msg_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L350_C8", "label": "msg_name = code_gen_message()", "type": "assigned_variable", "loc": [350, 350], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L349_C4", "vector": [14, 2, 0.7778, 0.0022, 2, 0.69, 0.0, 631, 3, 3, 0, 0, 937, 10, 1], "semantic": {"name": "msg_name", "arg_names": [], "import_names": [], "rhs_call_name": "code_gen_message", "annotation": ""}, "snippet": " msg_name = code_gen_message(msg_desc, env, obj_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L351_C8", "label": "append()", "type": "expression", "loc": [351, 351], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L349_C4", "vector": [8, 2, 0.78, 0.0022, 2, 0.69, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " nested_types.append(msg_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L352_C4", "label": "context()", "type": "expression", "loc": [352, 352], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [8, 1, 0.7822, 0.0022, 1, 0.08, 0.375, 954, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.nested_types = {%s}\\n' % ', '.join(nested_types))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L354_C4", "label": "enums =", "type": "assigned_variable", "loc": [354, 354], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [14, 1, 0.7867, 0.0022, 1, 0.08, 0.4167, 146, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "enums", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " enums = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L355_C4", "label": "for enum_desc", "type": "for", "loc": [355, 356], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [6, 1, 0.79, 0.0044, 1, 0.08, 0.4583, 211, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "enum_desc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for enum_desc in message_descriptor.enum_type:\n enums.append(code_gen_enum(enum_desc, env))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L356_C8", "label": "append()", "type": "expression", "loc": [356, 356], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L355_C4", "vector": [8, 2, 0.7911, 0.0022, 2, 0.7, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " enums.append(code_gen_enum(enum_desc, env))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L357_C4", "label": "context()", "type": "expression", "loc": [357, 357], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [8, 1, 0.7933, 0.0022, 1, 0.08, 0.5, 954, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.enum_types = {%s}\\n' % ', '.join(enums))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L359_C4", "label": "fields =", "type": "assigned_variable", "loc": [359, 359], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [14, 1, 0.7978, 0.0022, 1, 0.08, 0.5417, 358, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "fields", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " fields = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L360_C4", "label": "for i, field_desc", "type": "for", "loc": [360, 361], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [6, 1, 0.8011, 0.0044, 1, 0.08, 0.5833, 597, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "i, field_desc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i, field_desc in enumerate(message_descriptor.field):\n fields.append(code_gen_field(i, field_desc, env))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L361_C8", "label": "append()", "type": "expression", "loc": [361, 361], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L360_C4", "vector": [8, 2, 0.8022, 0.0022, 2, 0.77, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " fields.append(code_gen_field(i, field_desc, env))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L363_C4", "label": "context()", "type": "expression", "loc": [363, 363], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [8, 1, 0.8067, 0.0022, 1, 0.08, 0.625, 954, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.fields = {%s}\\n' % ', '.join(fields))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L364_C4", "label": "if", "type": "if", "loc": [364, 367], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [4, 1, 0.8122, 0.0089, 1, 0.08, 0.6667, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(message_descriptor.extension_range) > 0:\n context('.is_extendable = true\\n')\n else:\n context('.is_extendable = false\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L365_C8", "label": "context()", "type": "expression", "loc": [365, 365], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L364_C4", "vector": [8, 2, 0.8111, 0.0022, 2, 0.87, 0.0, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.is_extendable = true\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L367_C8", "label": "context()", "type": "expression", "loc": [367, 367], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L364_C4", "vector": [8, 2, 0.8156, 0.0022, 2, 0.87, 1.0, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.is_extendable = false\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L369_C4", "label": "extensions =", "type": "assigned_variable", "loc": [369, 369], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [14, 1, 0.82, 0.0022, 1, 0.08, 0.7083, 866, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "extensions", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " extensions = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L370_C4", "label": "for i, field_desc", "type": "for", "loc": [370, 371], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [6, 1, 0.8233, 0.0044, 1, 0.08, 0.75, 597, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "i, field_desc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i, field_desc in enumerate(message_descriptor.extension):\n extensions.append(code_gen_field(i, field_desc, env))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L371_C8", "label": "append()", "type": "expression", "loc": [371, 371], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L370_C4", "vector": [8, 2, 0.8244, 0.0022, 2, 0.88, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " extensions.append(code_gen_field(i, field_desc, env))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L372_C4", "label": "context()", "type": "expression", "loc": [372, 372], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [8, 1, 0.8267, 0.0022, 1, 0.08, 0.7917, 954, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.extensions = {%s}\\n' % ', '.join(extensions))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L374_C4", "label": "if", "type": "if", "loc": [374, 375], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [4, 1, 0.8322, 0.0044, 1, 0.08, 0.8333, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if containing_type:\n context('.containing_type = %s\\n' % containing_type)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L375_C8", "label": "context()", "type": "expression", "loc": [375, 375], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L374_C4", "vector": [8, 2, 0.8333, 0.0022, 2, 0.29, 0.0, 954, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "context", "arg_names": [], "import_names": [], "rhs_call_name": "context", "annotation": ""}, "snippet": " context('.containing_type = %s\\n' % containing_type)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L377_C4", "label": "append()", "type": "expression", "loc": [377, 378], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [8, 1, 0.8389, 0.0044, 1, 0.08, 0.875, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " env.message.append('%s = protobuf.Message(%s)\\n' % (full_name,\n obj_name))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L380_C4", "label": "append()", "type": "expression", "loc": [380, 380], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [8, 1, 0.8444, 0.0022, 1, 0.08, 0.9167, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " env.context.append(context.getvalue())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L381_C4", "label": "exit()", "type": "expression", "loc": [381, 381], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [8, 1, 0.8467, 0.0022, 1, 0.08, 0.9583, 436, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " env.exit()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L382_C4", "label": "return", "type": "return", "loc": [382, 382], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "vector": [13, 1, 0.8489, 0.0022, 1, 0.08, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return obj_name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L384_C0", "label": "write_header", "type": "function", "loc": [384, 386], "level": 0, "parent": null, "vector": [2, 0, 0.8556, 0.0067, 0, 0.66, 0.875, 152, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write_header", "arg_names": ["writer"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def write_header(writer):\n writer(\"\"\"-- Generated By protoc-gen-lua Do not Edit\n\"\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L385_C4", "label": "writer()", "type": "expression", "loc": [385, 386], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L384_C0", "vector": [8, 1, 0.8567, 0.0044, 1, 0.62, 0.0, 614, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "writer", "arg_names": [], "import_names": [], "rhs_call_name": "writer", "annotation": ""}, "snippet": " writer(\"\"\"-- Generated By protoc-gen-lua Do not Edit\n\"\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "label": "code_gen_file", "type": "function", "loc": [388, 428], "level": 0, "parent": null, "vector": [2, 0, 0.9067, 0.0911, 0, 0.66, 0.9167, 616, 0, 3, 0, 0, 0, 0, 23], "semantic": {"name": "code_gen_file", "arg_names": ["proto_file", "env", "is_gen"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def code_gen_file(proto_file, env, is_gen):\n filename = path.splitext(proto_file.name)[0]\n env.enter_file(filename, proto_file.package)\n\n includes = []\n for f in proto_file.dependency:\n inc_file = path.splitext(f)[0]\n includes.append(inc_file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L389_C4", "label": "filename =", "type": "assigned_variable", "loc": [389, 389], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "vector": [14, 1, 0.8644, 0.0022, 1, 0.03, 0.0, 275, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " filename = path.splitext(proto_file.name)[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L390_C4", "label": "enter_file()", "type": "expression", "loc": [390, 390], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "vector": [8, 1, 0.8667, 0.0022, 1, 0.03, 0.1429, 739, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "enter_file", "arg_names": [], "import_names": [], "rhs_call_name": "enter_file", "annotation": ""}, "snippet": " env.enter_file(filename, proto_file.package)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L392_C4", "label": "includes =", "type": "assigned_variable", "loc": [392, 392], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "vector": [14, 1, 0.8711, 0.0022, 1, 0.03, 0.2857, 671, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "includes", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " includes = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L393_C4", "label": "for f", "type": "for", "loc": [393, 395], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "vector": [6, 1, 0.8756, 0.0067, 1, 0.03, 0.4286, 899, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for f in proto_file.dependency:\n inc_file = path.splitext(f)[0]\n includes.append(inc_file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L394_C8", "label": "inc_file =", "type": "assigned_variable", "loc": [394, 394], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L393_C4", "vector": [14, 2, 0.8756, 0.0022, 2, 0.39, 0.0, 942, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "inc_file", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " inc_file = path.splitext(f)[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L395_C8", "label": "append()", "type": "expression", "loc": [395, 395], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L393_C4", "vector": [8, 2, 0.8778, 0.0022, 2, 0.39, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " includes.append(inc_file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L400_C4", "label": "for enum_desc", "type": "for", "loc": [400, 404], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "vector": [6, 1, 0.8933, 0.0111, 1, 0.03, 0.5714, 211, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "enum_desc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for enum_desc in proto_file.enum_type:\n code_gen_enum(enum_desc, env)\n for enum_value in enum_desc.value:\n env.message.append('%s = %d\\n' % (enum_value.name,\n enum_value.number))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L401_C8", "label": "code_gen_enum()", "type": "expression", "loc": [401, 401], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L400_C4", "vector": [8, 2, 0.8911, 0.0022, 2, 0.33, 0.0, 768, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "code_gen_enum", "arg_names": [], "import_names": [], "rhs_call_name": "code_gen_enum", "annotation": ""}, "snippet": " code_gen_enum(enum_desc, env)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L402_C8", "label": "for enum_value", "type": "for", "loc": [402, 404], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L400_C4", "vector": [6, 2, 0.8956, 0.0067, 2, 0.33, 1.0, 497, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "enum_value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for enum_value in enum_desc.value:\n env.message.append('%s = %d\\n' % (enum_value.name,\n enum_value.number))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L403_C12", "label": "append()", "type": "expression", "loc": [403, 404], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L402_C8", "vector": [8, 3, 0.8967, 0.0044, 3, 0.53, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " env.message.append('%s = %d\\n' % (enum_value.name,\n enum_value.number))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L406_C4", "label": "for msg_desc", "type": "for", "loc": [406, 407], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "vector": [6, 1, 0.9033, 0.0044, 1, 0.03, 0.7143, 525, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "msg_desc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for msg_desc in proto_file.message_type:\n code_gen_message(msg_desc, env)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L407_C8", "label": "code_gen_message()", "type": "expression", "loc": [407, 407], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L406_C4", "vector": [8, 2, 0.9044, 0.0022, 2, 0.3, 0.0, 937, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "code_gen_message", "arg_names": [], "import_names": [], "rhs_call_name": "code_gen_message", "annotation": ""}, "snippet": " code_gen_message(msg_desc, env)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "label": "if", "type": "if", "loc": [409, 427], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "vector": [4, 1, 0.9289, 0.0422, 1, 0.03, 0.8571, 0, 2, 0, 0, 0, 0, 0, 15], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if is_gen:\n lua = Writer()\n write_header(lua)\n lua('local protobuf = require \"protobuf\"\\n')\n for i in includes:\n lua('local %s_pb = require(\"%s_pb\")\\n' % (i, i))\n lua(\"module('%s_pb')\\n\" % env.filename)\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L410_C8", "label": "lua = Writer()", "type": "assigned_variable", "loc": [410, 410], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "vector": [14, 2, 0.9111, 0.0022, 2, 0.61, 0.0, 34, 3, 0, 0, 0, 839, 10, 1], "semantic": {"name": "lua", "arg_names": [], "import_names": [], "rhs_call_name": "Writer", "annotation": ""}, "snippet": " lua = Writer()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L411_C8", "label": "write_header()", "type": "expression", "loc": [411, 411], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "vector": [8, 2, 0.9133, 0.0022, 2, 0.61, 0.0714, 152, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write_header", "arg_names": [], "import_names": [], "rhs_call_name": "write_header", "annotation": ""}, "snippet": " write_header(lua)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L412_C8", "label": "lua()", "type": "expression", "loc": [412, 412], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "vector": [8, 2, 0.9156, 0.0022, 2, 0.61, 0.1429, 34, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "lua", "arg_names": [], "import_names": [], "rhs_call_name": "lua", "annotation": ""}, "snippet": " lua('local protobuf = require \"protobuf\"\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L413_C8", "label": "for i", "type": "for", "loc": [413, 414], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "vector": [6, 2, 0.9189, 0.0044, 2, 0.61, 0.2143, 826, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in includes:\n lua('local %s_pb = require(\"%s_pb\")\\n' % (i, i))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L414_C12", "label": "lua()", "type": "expression", "loc": [414, 414], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L413_C8", "vector": [8, 3, 0.92, 0.0022, 3, 0.26, 0.0, 34, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "lua", "arg_names": [], "import_names": [], "rhs_call_name": "lua", "annotation": ""}, "snippet": " lua('local %s_pb = require(\"%s_pb\")\\n' % (i, i))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L415_C8", "label": "lua()", "type": "expression", "loc": [415, 415], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "vector": [8, 2, 0.9222, 0.0022, 2, 0.61, 0.2857, 34, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "lua", "arg_names": [], "import_names": [], "rhs_call_name": "lua", "annotation": ""}, "snippet": " lua(\"module('%s_pb')\\n\" % env.filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L417_C8", "label": "lua()", "type": "expression", "loc": [417, 417], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "vector": [8, 2, 0.9267, 0.0022, 2, 0.61, 0.3571, 34, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "lua", "arg_names": [], "import_names": [], "rhs_call_name": "lua", "annotation": ""}, "snippet": " lua('\\n\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L418_C8", "label": "map()", "type": "expression", "loc": [418, 418], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "vector": [8, 2, 0.9289, 0.0022, 2, 0.61, 0.4286, 53, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "map", "arg_names": [], "import_names": [], "rhs_call_name": "map", "annotation": ""}, "snippet": " map(lua, env.descriptor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L419_C8", "label": "lua()", "type": "expression", "loc": [419, 419], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "vector": [8, 2, 0.9311, 0.0022, 2, 0.61, 0.5, 34, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "lua", "arg_names": [], "import_names": [], "rhs_call_name": "lua", "annotation": ""}, "snippet": " lua('\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L420_C8", "label": "map()", "type": "expression", "loc": [420, 420], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "vector": [8, 2, 0.9333, 0.0022, 2, 0.61, 0.5714, 53, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "map", "arg_names": [], "import_names": [], "rhs_call_name": "map", "annotation": ""}, "snippet": " map(lua, env.context)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L421_C8", "label": "lua()", "type": "expression", "loc": [421, 421], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "vector": [8, 2, 0.9356, 0.0022, 2, 0.61, 0.6429, 34, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "lua", "arg_names": [], "import_names": [], "rhs_call_name": "lua", "annotation": ""}, "snippet": " lua('\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L422_C8", "label": "sort()", "type": "expression", "loc": [422, 422], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "vector": [8, 2, 0.9378, 0.0022, 2, 0.61, 0.7143, 489, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "sort", "arg_names": [], "import_names": [], "rhs_call_name": "sort", "annotation": ""}, "snippet": " env.message.sort()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L423_C8", "label": "map()", "type": "expression", "loc": [423, 423], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "vector": [8, 2, 0.94, 0.0022, 2, 0.61, 0.7857, 53, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "map", "arg_names": [], "import_names": [], "rhs_call_name": "map", "annotation": ""}, "snippet": " map(lua, env.message)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L424_C8", "label": "lua()", "type": "expression", "loc": [424, 424], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "vector": [8, 2, 0.9422, 0.0022, 2, 0.61, 0.8571, 34, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "lua", "arg_names": [], "import_names": [], "rhs_call_name": "lua", "annotation": ""}, "snippet": " lua('\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L425_C8", "label": "map()", "type": "expression", "loc": [425, 425], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "vector": [8, 2, 0.9444, 0.0022, 2, 0.61, 0.9286, 53, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "map", "arg_names": [], "import_names": [], "rhs_call_name": "map", "annotation": ""}, "snippet": " map(lua, env.register)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L427_C8", "label": " = getvalue()", "type": "assigned_variable", "loc": [427, 427], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "vector": [14, 2, 0.9489, 0.0022, 2, 0.61, 1.0, 0, 3, 0, 0, 0, 626, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "getvalue", "annotation": ""}, "snippet": " _files[env.filename+ '_pb.lua'] = lua.getvalue()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L428_C4", "label": "exit_file()", "type": "expression", "loc": [428, 428], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "vector": [8, 1, 0.9511, 0.0022, 1, 0.03, 1.0, 520, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "exit_file", "arg_names": [], "import_names": [], "rhs_call_name": "exit_file", "annotation": ""}, "snippet": " env.exit_file()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "label": "main", "type": "function", "loc": [430, 446], "level": 0, "parent": null, "vector": [2, 0, 0.9733, 0.0378, 0, 0.66, 0.9583, 624, 0, 0, 0, 0, 0, 0, 9], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n plugin_require_bin = sys.stdin.read()\n code_gen_req = plugin_pb2.CodeGeneratorRequest()\n code_gen_req.ParseFromString(plugin_require_bin)\n\n env = Env()\n for proto_file in code_gen_req.proto_file:\n code_gen_file(proto_file, env,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L431_C4", "label": "plugin_require_bin = read()", "type": "assigned_variable", "loc": [431, 431], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "vector": [14, 1, 0.9578, 0.0022, 1, 0.06, 0.0, 938, 3, 0, 0, 0, 453, 10, 1], "semantic": {"name": "plugin_require_bin", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " plugin_require_bin = sys.stdin.read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L432_C4", "label": "code_gen_req = CodeGeneratorRequest()", "type": "assigned_variable", "loc": [432, 432], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "vector": [14, 1, 0.96, 0.0022, 1, 0.06, 0.1429, 573, 3, 0, 0, 0, 743, 10, 1], "semantic": {"name": "code_gen_req", "arg_names": [], "import_names": [], "rhs_call_name": "CodeGeneratorRequest", "annotation": ""}, "snippet": " code_gen_req = plugin_pb2.CodeGeneratorRequest()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L433_C4", "label": "ParseFromString()", "type": "expression", "loc": [433, 433], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "vector": [8, 1, 0.9622, 0.0022, 1, 0.06, 0.2857, 330, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "ParseFromString", "arg_names": [], "import_names": [], "rhs_call_name": "ParseFromString", "annotation": ""}, "snippet": " code_gen_req.ParseFromString(plugin_require_bin)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L435_C4", "label": "env = Env()", "type": "assigned_variable", "loc": [435, 435], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "vector": [14, 1, 0.9667, 0.0022, 1, 0.06, 0.4286, 803, 3, 0, 0, 0, 510, 10, 1], "semantic": {"name": "env", "arg_names": [], "import_names": [], "rhs_call_name": "Env", "annotation": ""}, "snippet": " env = Env()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L436_C4", "label": "for proto_file", "type": "for", "loc": [436, 438], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "vector": [6, 1, 0.9711, 0.0067, 1, 0.06, 0.5714, 176, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "proto_file", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for proto_file in code_gen_req.proto_file:\n code_gen_file(proto_file, env,\n proto_file.name in code_gen_req.file_to_generate)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L437_C8", "label": "code_gen_file()", "type": "expression", "loc": [437, 438], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L436_C4", "vector": [8, 2, 0.9722, 0.0044, 2, 0.87, 0.0, 616, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "code_gen_file", "arg_names": [], "import_names": [], "rhs_call_name": "code_gen_file", "annotation": ""}, "snippet": " code_gen_file(proto_file, env,\n proto_file.name in code_gen_req.file_to_generate)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L440_C4", "label": "code_generated = CodeGeneratorResponse()", "type": "assigned_variable", "loc": [440, 440], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "vector": [14, 1, 0.9778, 0.0022, 1, 0.06, 0.7143, 801, 3, 0, 0, 0, 513, 10, 1], "semantic": {"name": "code_generated", "arg_names": [], "import_names": [], "rhs_call_name": "CodeGeneratorResponse", "annotation": ""}, "snippet": " code_generated = plugin_pb2.CodeGeneratorResponse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L441_C4", "label": "for k", "type": "for", "loc": [441, 444], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "vector": [6, 1, 0.9833, 0.0089, 1, 0.06, 0.8571, 954, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "k", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for k in _files:\n file_desc = code_generated.file.add()\n file_desc.name = k\n file_desc.content = _files[k]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L442_C8", "label": "file_desc = add()", "type": "assigned_variable", "loc": [442, 442], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L441_C4", "vector": [14, 2, 0.9822, 0.0022, 2, 0.08, 0.0, 386, 3, 0, 0, 0, 241, 10, 1], "semantic": {"name": "file_desc", "arg_names": [], "import_names": [], "rhs_call_name": "add", "annotation": ""}, "snippet": " file_desc = code_generated.file.add()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L443_C8", "label": "file_desc.name =", "type": "assigned_variable", "loc": [443, 443], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L441_C4", "vector": [14, 2, 0.9844, 0.0022, 2, 0.08, 0.5, 543, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "file_desc.name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " file_desc.name = k"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L444_C8", "label": "file_desc.content =", "type": "assigned_variable", "loc": [444, 444], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L441_C4", "vector": [14, 2, 0.9867, 0.0022, 2, 0.08, 1.0, 385, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "file_desc.content", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " file_desc.content = _files[k]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L446_C4", "label": "write()", "type": "expression", "loc": [446, 446], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "vector": [8, 1, 0.9911, 0.0022, 1, 0.06, 1.0, 837, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stdout.write(code_generated.SerializeToString())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L448_C0", "label": "if", "type": "if", "loc": [448, 449], "level": 0, "parent": null, "vector": [4, 0, 0.9967, 0.0044, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == \"__main__\":\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L449_C4", "label": "main()", "type": "expression", "loc": [449, 449], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L448_C0", "vector": [8, 1, 0.9978, 0.0022, 1, 0.81, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Import_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L63_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L64_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L63_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L65_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L63_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L66_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L71_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L73_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L74_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L75_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L75_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L76_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L79_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L79_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L82_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L82_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L83_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L83_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L84_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L84_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L85_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L85_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L86_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L83_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L89_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L91_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L91_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L92_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L93_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L93_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L94_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L91_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L95_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L97_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L98_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L97_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L97_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:While_L100_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:While_L100_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L101_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:While_L100_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L102_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L97_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L103_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L97_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L106_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L106_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L109_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L110_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:While_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:While_L111_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L112_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:While_L111_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L113_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L117_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L118_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L120_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L120_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L121_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L123_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L123_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L124_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L129_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L130_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L131_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L132_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L133_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L134_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L135_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L136_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L136_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L137_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L136_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L138_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L140_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L140_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L143_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L143_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L144_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L146_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L146_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Try_L147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:Try_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L148_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:Try_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L151_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L146_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L152_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L153_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L146_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L154_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L156_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L156_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L157_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L156_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L158_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L158_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L159_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L158_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L161_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L163_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L164_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L164_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L165_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L166_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L167_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L168_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L168_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L169_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L168_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L170_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L170_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L171_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L170_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L173_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L174_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L176_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L177_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L178_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L180_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L182_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L182_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L183_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L182_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L184_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L182_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L185_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L182_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L186_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L188_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L188_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L189_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L192_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L192_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L193_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L195_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L195_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L196_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L195_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L197_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L195_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L198_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L195_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L199_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L201_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L201_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L202_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L201_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L203_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L203_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L204_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L201_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L205_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L207_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L208_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L208_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L209_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L208_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L210_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L208_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L211_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L207_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L213_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L213_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L214_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L207_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L216_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L216_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L218_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L207_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L220_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L220_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L221_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:ClassDef_L207_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L223_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L224_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L225_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L225_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L226_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L227_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L250_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L251_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L252_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L256_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L257_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L258_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L259_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L261_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L249_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L262_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L265_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L266_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L267_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L268_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L272_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L273_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L274_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L276_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L277_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L277_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L278_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L279_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L281_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L282_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L283_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L286_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L287_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L288_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L292_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L294_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L295_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L297_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L298_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L299_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L301_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L301_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L302_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L301_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L303_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L301_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L304_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L304_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L305_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L304_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L307_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L301_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L309_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L301_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L310_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L310_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L311_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L310_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L312_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L312_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L313_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L312_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L315_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L301_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L316_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L318_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L318_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L319_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L318_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L320_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L320_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L321_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L320_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L323_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L325_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L325_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L326_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L325_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L327_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L331_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L332_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L333_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L334_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L337_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L338_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L339_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L340_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L344_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L345_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L346_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L348_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L349_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L349_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L350_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L349_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L351_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L352_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L354_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L355_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L355_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L356_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L357_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L359_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L360_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L360_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L361_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L363_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L364_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L365_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L367_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L369_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L370_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L370_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L371_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L372_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L374_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L374_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L375_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L377_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L380_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L381_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L336_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Return_L382_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L384_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L385_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L389_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L390_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L392_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L393_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L393_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L394_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L393_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L395_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L400_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L400_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L401_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L400_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L402_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L402_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L403_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L406_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L406_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L407_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L410_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L411_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L412_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L413_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L413_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L414_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L415_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L417_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L418_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L419_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L420_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L421_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L422_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L423_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L424_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L425_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L409_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L427_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L388_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L428_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L431_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L432_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L433_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L435_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L436_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L436_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L437_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L440_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L441_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L441_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L442_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L441_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L443_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:For_L441_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Assign_L444_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:FunctionDef_L430_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L446_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1407:If_L448_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1407:Expr_L449_C4"}]
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Zdenko Podobný # Author: Zdenko Podobný # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ Simple python demo script of tesseract-ocr 3.02 c-api """ import os import sys import ctypes # Demo variables lang = "eng" filename = "../phototest.tif" libpath = "/usr/local/lib64/" libpath_w = "../vs2008/DLL_Release/" TESSDATA_PREFIX = os.environ.get('TESSDATA_PREFIX') if not TESSDATA_PREFIX: TESSDATA_PREFIX = "../" if sys.platform == "win32": libname = libpath_w + "libtesseract302.dll" libname_alt = "libtesseract302.dll" os.environ["PATH"] += os.pathsep + libpath_w else: libname = libpath + "libtesseract.so.3.0.2" libname_alt = "libtesseract.so.3" try: tesseract = ctypes.cdll.LoadLibrary(libname) except: try: tesseract = ctypes.cdll.LoadLibrary(libname_alt) except WindowsError, err: print("Trying to load '%s'..." % libname) print("Trying to load '%s'..." % libname_alt) print(err) exit(1) tesseract.TessVersion.restype = ctypes.c_char_p tesseract_version = tesseract.TessVersion()[:4] # We need to check library version because libtesseract.so.3 is symlink # and can point to other version than 3.02 if float(tesseract_version) < 3.02: print("Found tesseract-ocr library version %s." % tesseract_version) print("C-API is present only in version 3.02!") exit(2) api = tesseract.TessBaseAPICreate() rc = tesseract.TessBaseAPIInit3(api, TESSDATA_PREFIX, lang); if (rc): tesseract.TessBaseAPIDelete(api) print("Could not initialize tesseract.\n") exit(3) text_out = tesseract.TessBaseAPIProcessPages(api, filename, None , 0); result_text = ctypes.string_at(text_out) print result_text
ajibawa-2023/Python-Code-Large/train/row_1409
3
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1409:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1409:Import_L2_C0", "label": "sys import sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.25, 0, 0.66, 0.5, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1409:Import_L3_C0", "label": "ctypes import ctypes", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.75, 0.25, 0, 0.66, 1.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "rhs_call_name": "", "annotation": ""}, "snippet": "import ctypes"}]
[]
#!/usr/bin/python -u #-*- coding: UTF-8 -*- import subprocess import MySQLdb import os import re import sys import time import statvfs ip="114.80.213.44" ping = subprocess.Popen(["ping", "-c", "2", "-w", "500", ip], shell=False) ping.wait() if ping.returncode != 0: #print ping.returncode, "ERROR: failed to ping host. Please check." conn = MySQLdb.connect(host='localhost',port=3306,user='root',passwd='root') cursor=conn.cursor() conn.select_db('os') sql = "insert into down(datetime) values(%s)" param = (time.strftime('%Y-%m-%d',time.localtime(time.time()))) n = cursor.execute(sql,param) print n cursor.close() sys.exit(1) else: print "OK"
ajibawa-2023/Python-Code-Large/train/row_1410
21
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Import_L3_C0", "label": "subprocess import subprocess", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.037, 0, 0.66, 0.0, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ["subprocess"], "rhs_call_name": "", "annotation": ""}, "snippet": "import subprocess"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Import_L4_C0", "label": "MySQLdb import MySQLdb", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.1481, 0.037, 0, 0.66, 0.1, 838, 0, 1, 0, 0, 838, 0, 0], "semantic": {"name": "MySQLdb", "arg_names": [], "import_names": ["MySQLdb"], "rhs_call_name": "", "annotation": ""}, "snippet": "import MySQLdb"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Import_L5_C0", "label": "os import os", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1852, 0.037, 0, 0.66, 0.2, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Import_L6_C0", "label": "re import re", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.2222, 0.037, 0, 0.66, 0.3, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Import_L7_C0", "label": "sys import sys", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.2593, 0.037, 0, 0.66, 0.4, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Import_L8_C0", "label": "time import time", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.2963, 0.037, 0, 0.66, 0.5, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Import_L9_C0", "label": "statvfs import statvfs", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.037, 0, 0.66, 0.6, 684, 0, 1, 0, 0, 684, 0, 0], "semantic": {"name": "statvfs", "arg_names": [], "import_names": ["statvfs"], "rhs_call_name": "", "annotation": ""}, "snippet": "import statvfs"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Assign_L11_C0", "label": "ip =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.4074, 0.037, 0, 0.66, 0.7, 583, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ip", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ip=\"114.80.213.44\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Assign_L12_C0", "label": "ping = Popen()", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.4444, 0.037, 0, 0.66, 0.8, 496, 3, 2, 0, 0, 568, 10, 1], "semantic": {"name": "ping", "arg_names": [], "import_names": [], "rhs_call_name": "Popen", "annotation": ""}, "snippet": "ping = subprocess.Popen([\"ping\", \"-c\", \"2\", \"-w\", \"500\", ip], shell=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Expr_L13_C0", "label": "wait()", "type": "expression", "loc": [13, 13], "level": 0, "parent": null, "vector": [8, 0, 0.4815, 0.037, 0, 0.66, 0.9, 243, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "wait", "arg_names": [], "import_names": [], "rhs_call_name": "wait", "annotation": ""}, "snippet": "ping.wait()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "label": "if", "type": "if", "loc": [14, 26], "level": 0, "parent": null, "vector": [4, 0, 0.7407, 0.4815, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if ping.returncode != 0:\n #print ping.returncode, \"ERROR: failed to ping host. Please check.\"\n conn = MySQLdb.connect(host='localhost',port=3306,user='root',passwd='root')\n cursor=conn.cursor()\n conn.select_db('os')\n sql = \"insert into down(datetime) values(%s)\"\n param = (time.strftime('%Y-%m-%d',time.localtime(time.time())))\n n = cursor.execute(sql,param)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Assign_L16_C4", "label": "conn = connect()", "type": "assigned_variable", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "vector": [14, 1, 0.5926, 0.037, 1, 0.04, 0.0, 345, 3, 4, 0, 0, 242, 10, 1], "semantic": {"name": "conn", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " conn = MySQLdb.connect(host='localhost',port=3306,user='root',passwd='root')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Assign_L17_C4", "label": "cursor = cursor()", "type": "assigned_variable", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "vector": [14, 1, 0.6296, 0.037, 1, 0.04, 0.1111, 231, 3, 0, 0, 0, 231, 10, 1], "semantic": {"name": "cursor", "arg_names": [], "import_names": [], "rhs_call_name": "cursor", "annotation": ""}, "snippet": " cursor=conn.cursor()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Expr_L18_C4", "label": "select_db()", "type": "expression", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "vector": [8, 1, 0.6667, 0.037, 1, 0.04, 0.2222, 108, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "select_db", "arg_names": [], "import_names": [], "rhs_call_name": "select_db", "annotation": ""}, "snippet": " conn.select_db('os')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Assign_L19_C4", "label": "sql =", "type": "assigned_variable", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "vector": [14, 1, 0.7037, 0.037, 1, 0.04, 0.3333, 736, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "sql", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sql = \"insert into down(datetime) values(%s)\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Assign_L20_C4", "label": "param = strftime()", "type": "assigned_variable", "loc": [20, 20], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "vector": [14, 1, 0.7407, 0.037, 1, 0.04, 0.4444, 841, 3, 2, 0, 0, 668, 10, 3], "semantic": {"name": "param", "arg_names": [], "import_names": [], "rhs_call_name": "strftime", "annotation": ""}, "snippet": " param = (time.strftime('%Y-%m-%d',time.localtime(time.time())))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Assign_L21_C4", "label": "n = execute()", "type": "assigned_variable", "loc": [21, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "vector": [14, 1, 0.7778, 0.037, 1, 0.04, 0.5556, 773, 3, 2, 0, 0, 569, 10, 1], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "execute", "annotation": ""}, "snippet": " n = cursor.execute(sql,param)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Expr_L22_C4", "label": "print()", "type": "expression", "loc": [22, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "vector": [8, 1, 0.8148, 0.037, 1, 0.04, 0.6667, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Expr_L23_C4", "label": "close()", "type": "expression", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "vector": [8, 1, 0.8519, 0.037, 1, 0.04, 0.7778, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " cursor.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Expr_L24_C4", "label": "exit()", "type": "expression", "loc": [24, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "vector": [8, 1, 0.8889, 0.037, 1, 0.04, 0.8889, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1410:Expr_L26_C4", "label": "print()", "type": "expression", "loc": [26, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "vector": [8, 1, 0.963, 0.037, 1, 0.04, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"OK\")"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1410:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1410:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1410:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1410:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1410:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1410:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1410:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1410:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1410:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1410:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1410:Expr_L26_C4"}]
#!/usr/bin/python -u #-*- coding: UTF-8 -*- import subprocess import MySQLdb import os import re import sys import time import statvfs ip="114.80.213.44" ping = subprocess.Popen(["ping", "-c", "2", "-w", "500", ip], shell=False) ping.wait() if ping.returncode != 0: #print ping.returncode, "ERROR: failed to ping host. Please check." conn = MySQLdb.connect(host='localhost',port=3306,user='root',passwd='root') cursor=conn.cursor() conn.select_db('os') sql = "insert into down(datetime) values(%s)" param = (time.strftime('%Y-%m-%d',time.localtime(time.time()))) n = cursor.execute(sql,param) print n cursor.close() sys.exit(1) else: print "OK"
ajibawa-2023/Python-Code-Large/train/row_1412
21
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Import_L3_C0", "label": "subprocess import subprocess", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.037, 0, 0.66, 0.0, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ["subprocess"], "rhs_call_name": "", "annotation": ""}, "snippet": "import subprocess"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Import_L4_C0", "label": "MySQLdb import MySQLdb", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.1481, 0.037, 0, 0.66, 0.1, 838, 0, 1, 0, 0, 838, 0, 0], "semantic": {"name": "MySQLdb", "arg_names": [], "import_names": ["MySQLdb"], "rhs_call_name": "", "annotation": ""}, "snippet": "import MySQLdb"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Import_L5_C0", "label": "os import os", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1852, 0.037, 0, 0.66, 0.2, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Import_L6_C0", "label": "re import re", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.2222, 0.037, 0, 0.66, 0.3, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Import_L7_C0", "label": "sys import sys", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.2593, 0.037, 0, 0.66, 0.4, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Import_L8_C0", "label": "time import time", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.2963, 0.037, 0, 0.66, 0.5, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Import_L9_C0", "label": "statvfs import statvfs", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.037, 0, 0.66, 0.6, 684, 0, 1, 0, 0, 684, 0, 0], "semantic": {"name": "statvfs", "arg_names": [], "import_names": ["statvfs"], "rhs_call_name": "", "annotation": ""}, "snippet": "import statvfs"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Assign_L11_C0", "label": "ip =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.4074, 0.037, 0, 0.66, 0.7, 583, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ip", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ip=\"114.80.213.44\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Assign_L12_C0", "label": "ping = Popen()", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.4444, 0.037, 0, 0.66, 0.8, 496, 3, 2, 0, 0, 568, 10, 1], "semantic": {"name": "ping", "arg_names": [], "import_names": [], "rhs_call_name": "Popen", "annotation": ""}, "snippet": "ping = subprocess.Popen([\"ping\", \"-c\", \"2\", \"-w\", \"500\", ip], shell=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Expr_L13_C0", "label": "wait()", "type": "expression", "loc": [13, 13], "level": 0, "parent": null, "vector": [8, 0, 0.4815, 0.037, 0, 0.66, 0.9, 243, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "wait", "arg_names": [], "import_names": [], "rhs_call_name": "wait", "annotation": ""}, "snippet": "ping.wait()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "label": "if", "type": "if", "loc": [14, 26], "level": 0, "parent": null, "vector": [4, 0, 0.7407, 0.4815, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if ping.returncode != 0:\n #print ping.returncode, \"ERROR: failed to ping host. Please check.\"\n conn = MySQLdb.connect(host='localhost',port=3306,user='root',passwd='root')\n cursor=conn.cursor()\n conn.select_db('os')\n sql = \"insert into down(datetime) values(%s)\"\n param = (time.strftime('%Y-%m-%d',time.localtime(time.time())))\n n = cursor.execute(sql,param)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Assign_L16_C4", "label": "conn = connect()", "type": "assigned_variable", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "vector": [14, 1, 0.5926, 0.037, 1, 0.01, 0.0, 345, 3, 4, 0, 0, 242, 10, 1], "semantic": {"name": "conn", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " conn = MySQLdb.connect(host='localhost',port=3306,user='root',passwd='root')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Assign_L17_C4", "label": "cursor = cursor()", "type": "assigned_variable", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "vector": [14, 1, 0.6296, 0.037, 1, 0.01, 0.1111, 231, 3, 0, 0, 0, 231, 10, 1], "semantic": {"name": "cursor", "arg_names": [], "import_names": [], "rhs_call_name": "cursor", "annotation": ""}, "snippet": " cursor=conn.cursor()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Expr_L18_C4", "label": "select_db()", "type": "expression", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "vector": [8, 1, 0.6667, 0.037, 1, 0.01, 0.2222, 108, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "select_db", "arg_names": [], "import_names": [], "rhs_call_name": "select_db", "annotation": ""}, "snippet": " conn.select_db('os')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Assign_L19_C4", "label": "sql =", "type": "assigned_variable", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "vector": [14, 1, 0.7037, 0.037, 1, 0.01, 0.3333, 736, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "sql", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sql = \"insert into down(datetime) values(%s)\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Assign_L20_C4", "label": "param = strftime()", "type": "assigned_variable", "loc": [20, 20], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "vector": [14, 1, 0.7407, 0.037, 1, 0.01, 0.4444, 841, 3, 2, 0, 0, 668, 10, 3], "semantic": {"name": "param", "arg_names": [], "import_names": [], "rhs_call_name": "strftime", "annotation": ""}, "snippet": " param = (time.strftime('%Y-%m-%d',time.localtime(time.time())))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Assign_L21_C4", "label": "n = execute()", "type": "assigned_variable", "loc": [21, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "vector": [14, 1, 0.7778, 0.037, 1, 0.01, 0.5556, 773, 3, 2, 0, 0, 569, 10, 1], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "execute", "annotation": ""}, "snippet": " n = cursor.execute(sql,param)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Expr_L22_C4", "label": "print()", "type": "expression", "loc": [22, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "vector": [8, 1, 0.8148, 0.037, 1, 0.01, 0.6667, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Expr_L23_C4", "label": "close()", "type": "expression", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "vector": [8, 1, 0.8519, 0.037, 1, 0.01, 0.7778, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " cursor.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Expr_L24_C4", "label": "exit()", "type": "expression", "loc": [24, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "vector": [8, 1, 0.8889, 0.037, 1, 0.01, 0.8889, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1412:Expr_L26_C4", "label": "print()", "type": "expression", "loc": [26, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "vector": [8, 1, 0.963, 0.037, 1, 0.01, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"OK\")"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1412:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1412:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1412:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1412:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1412:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1412:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1412:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1412:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1412:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1412:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1412:Expr_L26_C4"}]
#!/usr/bin/python -u #-*- coding: UTF-8 -*- import subprocess import MySQLdb import os import re import sys import time import statvfs ip="114.80.213.44" ping = subprocess.Popen(["ping", "-c", "2", "-w", "500", ip], shell=False) ping.wait() if ping.returncode != 0: #print ping.returncode, "ERROR: failed to ping host. Please check." conn = MySQLdb.connect(host='localhost',port=3306,user='root',passwd='root') cursor=conn.cursor() conn.select_db('os') sql = "insert into down(datetime) values(%s)" param = (time.strftime('%Y-%m-%d',time.localtime(time.time()))) n = cursor.execute(sql,param) print n cursor.close() sys.exit(1) else: print "OK"
ajibawa-2023/Python-Code-Large/train/row_1414
21
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Import_L3_C0", "label": "subprocess import subprocess", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.037, 0, 0.66, 0.0, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ["subprocess"], "rhs_call_name": "", "annotation": ""}, "snippet": "import subprocess"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Import_L4_C0", "label": "MySQLdb import MySQLdb", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.1481, 0.037, 0, 0.66, 0.1, 838, 0, 1, 0, 0, 838, 0, 0], "semantic": {"name": "MySQLdb", "arg_names": [], "import_names": ["MySQLdb"], "rhs_call_name": "", "annotation": ""}, "snippet": "import MySQLdb"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Import_L5_C0", "label": "os import os", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1852, 0.037, 0, 0.66, 0.2, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Import_L6_C0", "label": "re import re", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.2222, 0.037, 0, 0.66, 0.3, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Import_L7_C0", "label": "sys import sys", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.2593, 0.037, 0, 0.66, 0.4, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Import_L8_C0", "label": "time import time", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.2963, 0.037, 0, 0.66, 0.5, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Import_L9_C0", "label": "statvfs import statvfs", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.037, 0, 0.66, 0.6, 684, 0, 1, 0, 0, 684, 0, 0], "semantic": {"name": "statvfs", "arg_names": [], "import_names": ["statvfs"], "rhs_call_name": "", "annotation": ""}, "snippet": "import statvfs"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Assign_L11_C0", "label": "ip =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.4074, 0.037, 0, 0.66, 0.7, 583, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ip", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ip=\"114.80.213.44\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Assign_L12_C0", "label": "ping = Popen()", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.4444, 0.037, 0, 0.66, 0.8, 496, 3, 2, 0, 0, 568, 10, 1], "semantic": {"name": "ping", "arg_names": [], "import_names": [], "rhs_call_name": "Popen", "annotation": ""}, "snippet": "ping = subprocess.Popen([\"ping\", \"-c\", \"2\", \"-w\", \"500\", ip], shell=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Expr_L13_C0", "label": "wait()", "type": "expression", "loc": [13, 13], "level": 0, "parent": null, "vector": [8, 0, 0.4815, 0.037, 0, 0.66, 0.9, 243, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "wait", "arg_names": [], "import_names": [], "rhs_call_name": "wait", "annotation": ""}, "snippet": "ping.wait()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "label": "if", "type": "if", "loc": [14, 26], "level": 0, "parent": null, "vector": [4, 0, 0.7407, 0.4815, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if ping.returncode != 0:\n #print ping.returncode, \"ERROR: failed to ping host. Please check.\"\n conn = MySQLdb.connect(host='localhost',port=3306,user='root',passwd='root')\n cursor=conn.cursor()\n conn.select_db('os')\n sql = \"insert into down(datetime) values(%s)\"\n param = (time.strftime('%Y-%m-%d',time.localtime(time.time())))\n n = cursor.execute(sql,param)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Assign_L16_C4", "label": "conn = connect()", "type": "assigned_variable", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "vector": [14, 1, 0.5926, 0.037, 1, 0.18, 0.0, 345, 3, 4, 0, 0, 242, 10, 1], "semantic": {"name": "conn", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " conn = MySQLdb.connect(host='localhost',port=3306,user='root',passwd='root')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Assign_L17_C4", "label": "cursor = cursor()", "type": "assigned_variable", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "vector": [14, 1, 0.6296, 0.037, 1, 0.18, 0.1111, 231, 3, 0, 0, 0, 231, 10, 1], "semantic": {"name": "cursor", "arg_names": [], "import_names": [], "rhs_call_name": "cursor", "annotation": ""}, "snippet": " cursor=conn.cursor()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Expr_L18_C4", "label": "select_db()", "type": "expression", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "vector": [8, 1, 0.6667, 0.037, 1, 0.18, 0.2222, 108, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "select_db", "arg_names": [], "import_names": [], "rhs_call_name": "select_db", "annotation": ""}, "snippet": " conn.select_db('os')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Assign_L19_C4", "label": "sql =", "type": "assigned_variable", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "vector": [14, 1, 0.7037, 0.037, 1, 0.18, 0.3333, 736, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "sql", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sql = \"insert into down(datetime) values(%s)\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Assign_L20_C4", "label": "param = strftime()", "type": "assigned_variable", "loc": [20, 20], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "vector": [14, 1, 0.7407, 0.037, 1, 0.18, 0.4444, 841, 3, 2, 0, 0, 668, 10, 3], "semantic": {"name": "param", "arg_names": [], "import_names": [], "rhs_call_name": "strftime", "annotation": ""}, "snippet": " param = (time.strftime('%Y-%m-%d',time.localtime(time.time())))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Assign_L21_C4", "label": "n = execute()", "type": "assigned_variable", "loc": [21, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "vector": [14, 1, 0.7778, 0.037, 1, 0.18, 0.5556, 773, 3, 2, 0, 0, 569, 10, 1], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "execute", "annotation": ""}, "snippet": " n = cursor.execute(sql,param)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Expr_L22_C4", "label": "print()", "type": "expression", "loc": [22, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "vector": [8, 1, 0.8148, 0.037, 1, 0.18, 0.6667, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Expr_L23_C4", "label": "close()", "type": "expression", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "vector": [8, 1, 0.8519, 0.037, 1, 0.18, 0.7778, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " cursor.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Expr_L24_C4", "label": "exit()", "type": "expression", "loc": [24, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "vector": [8, 1, 0.8889, 0.037, 1, 0.18, 0.8889, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1414:Expr_L26_C4", "label": "print()", "type": "expression", "loc": [26, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "vector": [8, 1, 0.963, 0.037, 1, 0.18, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"OK\")"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1414:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1414:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1414:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1414:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1414:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1414:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1414:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1414:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1414:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1414:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1414:Expr_L26_C4"}]
#!/usr/bin/python -u #-*- coding: UTF-8 -*- import subprocess import MySQLdb import os import re import sys import time import statvfs ip="114.80.213.44" ping = subprocess.Popen(["ping", "-c", "2", "-w", "500", ip], shell=False) ping.wait() if ping.returncode != 0: #print ping.returncode, "ERROR: failed to ping host. Please check." conn = MySQLdb.connect(host='localhost',port=3306,user='root',passwd='root') cursor=conn.cursor() conn.select_db('os') sql = "insert into down(datetime) values(%s)" param = (time.strftime('%Y-%m-%d',time.localtime(time.time()))) n = cursor.execute(sql,param) print n cursor.close() sys.exit(1) else: print "OK"
ajibawa-2023/Python-Code-Large/train/row_1416
21
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Import_L3_C0", "label": "subprocess import subprocess", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.037, 0, 0.66, 0.0, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ["subprocess"], "rhs_call_name": "", "annotation": ""}, "snippet": "import subprocess"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Import_L4_C0", "label": "MySQLdb import MySQLdb", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.1481, 0.037, 0, 0.66, 0.1, 838, 0, 1, 0, 0, 838, 0, 0], "semantic": {"name": "MySQLdb", "arg_names": [], "import_names": ["MySQLdb"], "rhs_call_name": "", "annotation": ""}, "snippet": "import MySQLdb"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Import_L5_C0", "label": "os import os", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1852, 0.037, 0, 0.66, 0.2, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Import_L6_C0", "label": "re import re", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.2222, 0.037, 0, 0.66, 0.3, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Import_L7_C0", "label": "sys import sys", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.2593, 0.037, 0, 0.66, 0.4, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Import_L8_C0", "label": "time import time", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.2963, 0.037, 0, 0.66, 0.5, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Import_L9_C0", "label": "statvfs import statvfs", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.037, 0, 0.66, 0.6, 684, 0, 1, 0, 0, 684, 0, 0], "semantic": {"name": "statvfs", "arg_names": [], "import_names": ["statvfs"], "rhs_call_name": "", "annotation": ""}, "snippet": "import statvfs"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Assign_L11_C0", "label": "ip =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.4074, 0.037, 0, 0.66, 0.7, 583, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ip", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ip=\"114.80.213.44\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Assign_L12_C0", "label": "ping = Popen()", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.4444, 0.037, 0, 0.66, 0.8, 496, 3, 2, 0, 0, 568, 10, 1], "semantic": {"name": "ping", "arg_names": [], "import_names": [], "rhs_call_name": "Popen", "annotation": ""}, "snippet": "ping = subprocess.Popen([\"ping\", \"-c\", \"2\", \"-w\", \"500\", ip], shell=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Expr_L13_C0", "label": "wait()", "type": "expression", "loc": [13, 13], "level": 0, "parent": null, "vector": [8, 0, 0.4815, 0.037, 0, 0.66, 0.9, 243, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "wait", "arg_names": [], "import_names": [], "rhs_call_name": "wait", "annotation": ""}, "snippet": "ping.wait()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "label": "if", "type": "if", "loc": [14, 26], "level": 0, "parent": null, "vector": [4, 0, 0.7407, 0.4815, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if ping.returncode != 0:\n #print ping.returncode, \"ERROR: failed to ping host. Please check.\"\n conn = MySQLdb.connect(host='localhost',port=3306,user='root',passwd='root')\n cursor=conn.cursor()\n conn.select_db('os')\n sql = \"insert into down(datetime) values(%s)\"\n param = (time.strftime('%Y-%m-%d',time.localtime(time.time())))\n n = cursor.execute(sql,param)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Assign_L16_C4", "label": "conn = connect()", "type": "assigned_variable", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "vector": [14, 1, 0.5926, 0.037, 1, 0.76, 0.0, 345, 3, 4, 0, 0, 242, 10, 1], "semantic": {"name": "conn", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " conn = MySQLdb.connect(host='localhost',port=3306,user='root',passwd='root')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Assign_L17_C4", "label": "cursor = cursor()", "type": "assigned_variable", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "vector": [14, 1, 0.6296, 0.037, 1, 0.76, 0.1111, 231, 3, 0, 0, 0, 231, 10, 1], "semantic": {"name": "cursor", "arg_names": [], "import_names": [], "rhs_call_name": "cursor", "annotation": ""}, "snippet": " cursor=conn.cursor()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Expr_L18_C4", "label": "select_db()", "type": "expression", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "vector": [8, 1, 0.6667, 0.037, 1, 0.76, 0.2222, 108, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "select_db", "arg_names": [], "import_names": [], "rhs_call_name": "select_db", "annotation": ""}, "snippet": " conn.select_db('os')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Assign_L19_C4", "label": "sql =", "type": "assigned_variable", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "vector": [14, 1, 0.7037, 0.037, 1, 0.76, 0.3333, 736, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "sql", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sql = \"insert into down(datetime) values(%s)\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Assign_L20_C4", "label": "param = strftime()", "type": "assigned_variable", "loc": [20, 20], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "vector": [14, 1, 0.7407, 0.037, 1, 0.76, 0.4444, 841, 3, 2, 0, 0, 668, 10, 3], "semantic": {"name": "param", "arg_names": [], "import_names": [], "rhs_call_name": "strftime", "annotation": ""}, "snippet": " param = (time.strftime('%Y-%m-%d',time.localtime(time.time())))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Assign_L21_C4", "label": "n = execute()", "type": "assigned_variable", "loc": [21, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "vector": [14, 1, 0.7778, 0.037, 1, 0.76, 0.5556, 773, 3, 2, 0, 0, 569, 10, 1], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "execute", "annotation": ""}, "snippet": " n = cursor.execute(sql,param)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Expr_L22_C4", "label": "print()", "type": "expression", "loc": [22, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "vector": [8, 1, 0.8148, 0.037, 1, 0.76, 0.6667, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Expr_L23_C4", "label": "close()", "type": "expression", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "vector": [8, 1, 0.8519, 0.037, 1, 0.76, 0.7778, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " cursor.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Expr_L24_C4", "label": "exit()", "type": "expression", "loc": [24, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "vector": [8, 1, 0.8889, 0.037, 1, 0.76, 0.8889, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1416:Expr_L26_C4", "label": "print()", "type": "expression", "loc": [26, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "vector": [8, 1, 0.963, 0.037, 1, 0.76, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"OK\")"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1416:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1416:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1416:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1416:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1416:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1416:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1416:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1416:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1416:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1416:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1416:Expr_L26_C4"}]
#!/usr/bin/python # Copyright 2011 Google, Inc. All Rights Reserved. # simple script to walk source tree looking for third-party licenses # dumps resulting html page to stdout import os, re, mimetypes, sys # read source directories to scan from command line SOURCE = sys.argv[1:] # regex to find /* */ style comment blocks COMMENT_BLOCK = re.compile(r"(/\*.+?\*/)", re.MULTILINE | re.DOTALL) # regex used to detect if comment block is a license COMMENT_LICENSE = re.compile(r"(license)", re.IGNORECASE) COMMENT_COPYRIGHT = re.compile(r"(copyright)", re.IGNORECASE) EXCLUDE_TYPES = [ "application/xml", "image/png", ] # list of known licenses; keys are derived by stripping all whitespace and # forcing to lowercase to help combine multiple files that have same license. KNOWN_LICENSES = {} class License: def __init__(self, license_text): self.license_text = license_text self.filenames = [] # add filename to the list of files that have the same license text def add_file(self, filename): if filename not in self.filenames: self.filenames.append(filename) LICENSE_KEY = re.compile(r"[^\w]") def find_license(license_text): # TODO(alice): a lot these licenses are almost identical Apache licenses. # Most of them differ in origin/modifications. Consider combining similar # licenses. license_key = LICENSE_KEY.sub("", license_text).lower() if license_key not in KNOWN_LICENSES: KNOWN_LICENSES[license_key] = License(license_text) return KNOWN_LICENSES[license_key] def discover_license(exact_path, filename): # when filename ends with LICENSE, assume applies to filename prefixed if filename.endswith("LICENSE"): with open(exact_path) as file: license_text = file.read() target_filename = filename[:-len("LICENSE")] if target_filename.endswith("."): target_filename = target_filename[:-1] find_license(license_text).add_file(target_filename) return None # try searching for license blocks in raw file mimetype = mimetypes.guess_type(filename) if mimetype in EXCLUDE_TYPES: return None with open(exact_path) as file: raw_file = file.read() # include comments that have both "license" and "copyright" in the text for comment in COMMENT_BLOCK.finditer(raw_file): comment = comment.group(1) if COMMENT_LICENSE.search(comment) is None: continue if COMMENT_COPYRIGHT.search(comment) is None: continue find_license(comment).add_file(filename) for source in SOURCE: for root, dirs, files in os.walk(source): for name in files: discover_license(os.path.join(root, name), name) print "<html><head><style> body { font-family: sans-serif; } pre { background-color: #eeeeee; padding: 1em; white-space: pre-wrap; } </style></head><body>" for license in KNOWN_LICENSES.values(): print "<h3>Notices for files:</h3><ul>" filenames = license.filenames filenames.sort() for filename in filenames: print "<li>%s</li>" % (filename) print "</ul>" print "<pre>%s</pre>" % license.license_text print "</body></html>"
ajibawa-2023/Python-Code-Large/train/row_1418
51
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Import_L8_C0", "label": "os import os, re, mimetypes\u2026", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0816, 0.0102, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "re", "mimetypes", "sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os, re, mimetypes, sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L12_C0", "label": "SOURCE =", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.1224, 0.0102, 0, 0.66, 0.0714, 792, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "SOURCE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "SOURCE = sys.argv[1:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L15_C0", "label": "COMMENT_BLOCK = compile()", "type": "assigned_variable", "loc": [15, 15], "level": 0, "parent": null, "vector": [14, 0, 0.1531, 0.0102, 0, 0.66, 0.1429, 629, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "COMMENT_BLOCK", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "COMMENT_BLOCK = re.compile(r\"(/\\*.+?\\*/)\", re.MULTILINE | re.DOTALL)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L17_C0", "label": "COMMENT_LICENSE = compile()", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.1735, 0.0102, 0, 0.66, 0.2143, 929, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "COMMENT_LICENSE", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "COMMENT_LICENSE = re.compile(r\"(license)\", re.IGNORECASE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L18_C0", "label": "COMMENT_COPYRIGHT = compile()", "type": "assigned_variable", "loc": [18, 18], "level": 0, "parent": null, "vector": [14, 0, 0.1837, 0.0102, 0, 0.66, 0.2857, 407, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "COMMENT_COPYRIGHT", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "COMMENT_COPYRIGHT = re.compile(r\"(copyright)\", re.IGNORECASE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L20_C0", "label": "EXCLUDE_TYPES =", "type": "assigned_variable", "loc": [20, 23], "level": 0, "parent": null, "vector": [14, 0, 0.2194, 0.0408, 0, 0.66, 0.3571, 265, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "EXCLUDE_TYPES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "EXCLUDE_TYPES = [\n \"application/xml\",\n \"image/png\",\n]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L28_C0", "label": "KNOWN_LICENSES =", "type": "assigned_variable", "loc": [28, 28], "level": 0, "parent": null, "vector": [14, 0, 0.2857, 0.0102, 0, 0.66, 0.4286, 144, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "KNOWN_LICENSES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "KNOWN_LICENSES = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:ClassDef_L31_C0", "label": "License", "type": "class", "loc": [31, 39], "level": 0, "parent": null, "vector": [3, 0, 0.3571, 0.0918, 0, 0.66, 0.5, 338, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "License", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class License:\n def __init__(self, license_text):\n self.license_text = license_text\n self.filenames = []\n\n # add filename to the list of files that have the same license text\n def add_file(self, filename):\n if filename not in self.filenames:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L32_C4", "label": "__init__", "type": "function", "loc": [32, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:ClassDef_L31_C0", "vector": [2, 1, 0.3367, 0.0306, 1, 0.14, 0.0, 555, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "license_text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, license_text):\n self.license_text = license_text\n self.filenames = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L33_C8", "label": "self.license_text =", "type": "assigned_variable", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L32_C4", "vector": [14, 2, 0.3367, 0.0102, 2, 0.03, 0.0, 103, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.license_text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.license_text = license_text"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L34_C8", "label": "self.filenames =", "type": "assigned_variable", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L32_C4", "vector": [14, 2, 0.3469, 0.0102, 2, 0.03, 1.0, 866, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.filenames", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.filenames = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L37_C4", "label": "add_file", "type": "function", "loc": [37, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:ClassDef_L31_C0", "vector": [2, 1, 0.3878, 0.0306, 1, 0.14, 1.0, 369, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "add_file", "arg_names": ["self", "filename"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def add_file(self, filename):\n if filename not in self.filenames:\n self.filenames.append(filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L38_C8", "label": "if", "type": "if", "loc": [38, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L37_C4", "vector": [4, 2, 0.3929, 0.0204, 2, 0.34, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if filename not in self.filenames:\n self.filenames.append(filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L39_C12", "label": "append()", "type": "expression", "loc": [39, 39], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L38_C8", "vector": [8, 3, 0.398, 0.0102, 3, 0.75, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.filenames.append(filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L42_C0", "label": "LICENSE_KEY = compile()", "type": "assigned_variable", "loc": [42, 42], "level": 0, "parent": null, "vector": [14, 0, 0.4286, 0.0102, 0, 0.66, 0.5714, 222, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "LICENSE_KEY", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "LICENSE_KEY = re.compile(r\"[^\\w]\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L44_C0", "label": "find_license", "type": "function", "loc": [44, 51], "level": 0, "parent": null, "vector": [2, 0, 0.4847, 0.0816, 0, 0.66, 0.6429, 149, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "find_license", "arg_names": ["license_text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def find_license(license_text):\n # TODO(alice): a lot these licenses are almost identical Apache licenses.\n # Most of them differ in origin/modifications. Consider combining similar\n # licenses.\n license_key = LICENSE_KEY.sub(\"\", license_text).lower()\n if license_key not in KNOWN_LICENSES:\n KNOWN_LICENSES[license_key] = License(license_text)\n return KNOWN_LICENSES[license_key]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L48_C4", "label": "license_key = lower()", "type": "assigned_variable", "loc": [48, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L44_C0", "vector": [14, 1, 0.4898, 0.0102, 1, 0.29, 0.0, 374, 3, 0, 0, 0, 432, 10, 2], "semantic": {"name": "license_key", "arg_names": [], "import_names": [], "rhs_call_name": "lower", "annotation": ""}, "snippet": " license_key = LICENSE_KEY.sub(\"\", license_text).lower()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L49_C4", "label": "if", "type": "if", "loc": [49, 50], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L44_C0", "vector": [4, 1, 0.5051, 0.0204, 1, 0.29, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if license_key not in KNOWN_LICENSES:\n KNOWN_LICENSES[license_key] = License(license_text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L50_C8", "label": " = License()", "type": "assigned_variable", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L49_C4", "vector": [14, 2, 0.5102, 0.0102, 2, 0.69, 0.0, 0, 3, 1, 0, 0, 338, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "License", "annotation": ""}, "snippet": " KNOWN_LICENSES[license_key] = License(license_text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Return_L51_C4", "label": "return", "type": "return", "loc": [51, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L44_C0", "vector": [13, 1, 0.5204, 0.0102, 1, 0.29, 1.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return KNOWN_LICENSES[license_key]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L55_C0", "label": "discover_license", "type": "function", "loc": [55, 77], "level": 0, "parent": null, "vector": [2, 0, 0.6735, 0.2347, 0, 0.66, 0.7143, 17, 0, 2, 1, 0, 0, 0, 16], "semantic": {"name": "discover_license", "arg_names": ["exact_path", "filename"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def discover_license(exact_path, filename):\n # when filename ends with LICENSE, assume applies to filename prefixed\n if filename.endswith(\"LICENSE\"):\n with open(exact_path) as file:\n license_text = file.read()\n target_filename = filename[:-len(\"LICENSE\")]\n if target_filename.endswith(\".\"): target_filename = target_filename[:-1]\n find_license(license_text).add_file(target_filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L57_C4", "label": "if", "type": "if", "loc": [57, 63], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L55_C0", "vector": [4, 1, 0.6122, 0.0714, 1, 0.53, 0.0, 0, 3, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if filename.endswith(\"LICENSE\"):\n with open(exact_path) as file:\n license_text = file.read()\n target_filename = filename[:-len(\"LICENSE\")]\n if target_filename.endswith(\".\"): target_filename = target_filename[:-1]\n find_license(license_text).add_file(target_filename)\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L59_C12", "label": "license_text = read()", "type": "assigned_variable", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L57_C4", "vector": [14, 2, 0.602, 0.0102, 2, 0.18, 0.0, 550, 3, 0, 0, 0, 453, 10, 1], "semantic": {"name": "license_text", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " license_text = file.read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L60_C8", "label": "target_filename =", "type": "assigned_variable", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L57_C4", "vector": [14, 2, 0.6122, 0.0102, 2, 0.18, 0.0, 439, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "target_filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " target_filename = filename[:-len(\"LICENSE\")]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L61_C8", "label": "if", "type": "if", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L57_C4", "vector": [4, 2, 0.6224, 0.0102, 2, 0.18, 0.3333, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if target_filename.endswith(\".\"): target_filename = target_filename[:-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L61_C42", "label": "target_filename =", "type": "assigned_variable", "loc": [61, 61], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L61_C8", "vector": [14, 3, 0.6224, 0.0102, 3, 0.95, 0.0, 439, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "target_filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if target_filename.endswith(\".\"): target_filename = target_filename[:-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L62_C8", "label": "add_file()", "type": "expression", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L57_C4", "vector": [8, 2, 0.6327, 0.0102, 2, 0.18, 0.6667, 369, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "add_file", "arg_names": [], "import_names": [], "rhs_call_name": "add_file", "annotation": ""}, "snippet": " find_license(license_text).add_file(target_filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Return_L63_C8", "label": "return", "type": "return", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L57_C4", "vector": [13, 2, 0.6429, 0.0102, 2, 0.18, 1.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L66_C4", "label": "mimetype = guess_type()", "type": "assigned_variable", "loc": [66, 66], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L55_C0", "vector": [14, 1, 0.6735, 0.0102, 1, 0.53, 0.3333, 290, 3, 1, 0, 0, 213, 10, 1], "semantic": {"name": "mimetype", "arg_names": [], "import_names": [], "rhs_call_name": "guess_type", "annotation": ""}, "snippet": " mimetype = mimetypes.guess_type(filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L67_C4", "label": "if", "type": "if", "loc": [67, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L55_C0", "vector": [4, 1, 0.6837, 0.0102, 1, 0.53, 0.6667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if mimetype in EXCLUDE_TYPES: return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Return_L67_C34", "label": "return", "type": "return", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L67_C4", "vector": [13, 2, 0.6837, 0.0102, 2, 0.55, 0.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if mimetype in EXCLUDE_TYPES: return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L70_C8", "label": "raw_file = read()", "type": "assigned_variable", "loc": [70, 70], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L55_C0", "vector": [14, 1, 0.7143, 0.0102, 1, 0.53, 0.0, 1, 3, 0, 0, 0, 453, 10, 1], "semantic": {"name": "raw_file", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " raw_file = file.read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L73_C4", "label": "for comment", "type": "for", "loc": [73, 77], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L55_C0", "vector": [6, 1, 0.7653, 0.051, 1, 0.53, 1.0, 34, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "comment", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for comment in COMMENT_BLOCK.finditer(raw_file):\n comment = comment.group(1)\n if COMMENT_LICENSE.search(comment) is None: continue\n if COMMENT_COPYRIGHT.search(comment) is None: continue\n find_license(comment).add_file(filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L74_C8", "label": "comment = group()", "type": "assigned_variable", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L73_C4", "vector": [14, 2, 0.7551, 0.0102, 2, 0.32, 0.0, 34, 3, 1, 0, 0, 43, 10, 1], "semantic": {"name": "comment", "arg_names": [], "import_names": [], "rhs_call_name": "group", "annotation": ""}, "snippet": " comment = comment.group(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L75_C8", "label": "if", "type": "if", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L73_C4", "vector": [4, 2, 0.7653, 0.0102, 2, 0.32, 0.3333, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if COMMENT_LICENSE.search(comment) is None: continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L76_C8", "label": "if", "type": "if", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L73_C4", "vector": [4, 2, 0.7755, 0.0102, 2, 0.32, 0.6667, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if COMMENT_COPYRIGHT.search(comment) is None: continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L77_C8", "label": "add_file()", "type": "expression", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L73_C4", "vector": [8, 2, 0.7857, 0.0102, 2, 0.32, 1.0, 369, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "add_file", "arg_names": [], "import_names": [], "rhs_call_name": "add_file", "annotation": ""}, "snippet": " find_license(comment).add_file(filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L80_C0", "label": "for source", "type": "for", "loc": [80, 83], "level": 0, "parent": null, "vector": [6, 0, 0.8316, 0.0408, 0, 0.66, 0.7857, 703, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for source in SOURCE:\n for root, dirs, files in os.walk(source):\n for name in files:\n discover_license(os.path.join(root, name), name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L81_C4", "label": "for root, dirs, files", "type": "for", "loc": [81, 83], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L80_C0", "vector": [6, 1, 0.8367, 0.0306, 1, 0.69, 0.0, 129, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "root, dirs, files", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for root, dirs, files in os.walk(source):\n for name in files:\n discover_license(os.path.join(root, name), name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L82_C8", "label": "for name", "type": "for", "loc": [82, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L81_C4", "vector": [6, 2, 0.8418, 0.0204, 2, 0.97, 0.0, 57, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for name in files:\n discover_license(os.path.join(root, name), name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L83_C12", "label": "discover_license()", "type": "expression", "loc": [83, 83], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L82_C8", "vector": [8, 3, 0.8469, 0.0102, 3, 0.12, 0.0, 17, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "discover_license", "arg_names": [], "import_names": [], "rhs_call_name": "discover_license", "annotation": ""}, "snippet": " discover_license(os.path.join(root, name), name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L86_C0", "label": "print()", "type": "expression", "loc": [86, 86], "level": 0, "parent": null, "vector": [8, 0, 0.8776, 0.0102, 0, 0.66, 0.8571, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"<html><head><style> body { font-family: sans-serif; } pre { background-color: #eeeeee; padding: 1em; white-space: pre-wrap; } </style></head><body>\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L88_C0", "label": "for license", "type": "for", "loc": [88, 96], "level": 0, "parent": null, "vector": [6, 0, 0.9388, 0.0918, 0, 0.66, 0.9286, 365, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "license", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for license in KNOWN_LICENSES.values():\n\n print(\"<h3>Notices for files:</h3><ul>\")\n filenames = license.filenames\n filenames.sort()\n for filename in filenames:\n print(\"<li>%s</li>\" % (filename))\n print(\"</ul>\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L90_C4", "label": "print()", "type": "expression", "loc": [90, 90], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L88_C0", "vector": [8, 1, 0.9184, 0.0102, 1, 0.55, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"<h3>Notices for files:</h3><ul>\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L91_C4", "label": "filenames =", "type": "assigned_variable", "loc": [91, 91], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L88_C0", "vector": [14, 1, 0.9286, 0.0102, 1, 0.55, 0.2, 94, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "filenames", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " filenames = license.filenames"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L92_C4", "label": "sort()", "type": "expression", "loc": [92, 92], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L88_C0", "vector": [8, 1, 0.9388, 0.0102, 1, 0.55, 0.4, 489, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "sort", "arg_names": [], "import_names": [], "rhs_call_name": "sort", "annotation": ""}, "snippet": " filenames.sort()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L93_C4", "label": "for filename", "type": "for", "loc": [93, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L88_C0", "vector": [6, 1, 0.9541, 0.0204, 1, 0.55, 0.6, 275, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for filename in filenames:\n print(\"<li>%s</li>\" % (filename))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L94_C8", "label": "print()", "type": "expression", "loc": [94, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L93_C4", "vector": [8, 2, 0.9592, 0.0102, 2, 0.48, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"<li>%s</li>\" % (filename))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L95_C4", "label": "print()", "type": "expression", "loc": [95, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L88_C0", "vector": [8, 1, 0.9694, 0.0102, 1, 0.55, 0.8, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"</ul>\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L96_C4", "label": "print()", "type": "expression", "loc": [96, 96], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L88_C0", "vector": [8, 1, 0.9796, 0.0102, 1, 0.55, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"<pre>%s</pre>\" % license.license_text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L98_C0", "label": "print()", "type": "expression", "loc": [98, 98], "level": 0, "parent": null, "vector": [8, 0, 1.0, 0.0102, 0, 0.66, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"</body></html>\")"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1418:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L38_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L39_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L49_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Return_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L59_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L61_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L61_C42"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Return_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L66_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Return_L67_C34"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L73_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L74_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L75_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:If_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L81_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L81_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L82_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L83_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L90_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Assign_L91_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L92_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L93_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1418:For_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1418:Expr_L96_C4"}]
#!/usr/bin/python # -*- coding: utf-8 -*- # Dieses Script kontrolliert eine Lösung. Es wird ausgegeben, wie viele Farben # verwendet wurden und wie groß das Dreieck ist. # Funktioniert nur mit korrekter Eingabedatei (keine Leerzeichen zum trennen der # Farben, neue Zeilen für eine neue Ebene des n-Traumrechtecks) import copy, os from optparse import OptionParser import psyco psyco.full() parser = OptionParser() parser.add_option("-i", "--input", dest="solutionfile", default= os.getcwd() + '/Beispiele/solution-4-errors.txt', help="Textdatei mit der Loesung", metavar="FILE") parser.add_option("-s", "--short", action="store_true", dest="short", default=False, help="Die Meldungen erscheinen in Kurzform.") parser.add_option("-e", "--errors", action="store_true", dest="display_errors", default=False, help="Die Fehler werden ausgegeben.") (options, args) = parser.parse_args() solutionfile = options.solutionfile display_errors=options.display_errors # 12345m = x # 2 # 3 # 4 # 5 # n = y # Get Data###################################################################### # my_data[ebene - startet oben ][position - startet links] def check_all_left_top(rectangle, x1, y1): # Auf Fehler überprüfen: # Die aktuelle kugel (x1, y1) ist links oben error_list = [] links_oben = rectangle[x1][y1] for x2 in xrange(x1+1, m): rechts_oben = rectangle[x2][y1] for y2 in xrange(y1+1, n): links_unten = rectangle[x1][y2] rechts_unten = rectangle[x2][y2] if links_oben == links_unten == rechts_oben == rechts_unten: error_list.append([(x1,y1),(x1,y2), (x2, y1), (x2, y2)]) return error_list def get_all_errors(rectangle): errors = [] for x1, ebene in enumerate(rectangle): for y1, farbe in enumerate(ebene): errors_tmp = check_all_left_top(rectangle, x1, y1) for line in errors_tmp: errors.append(line) return errors def get_data(filename): my_data = [] f = open(filename, 'r') lines = f.readlines() for line in lines: temp = line.strip() #temp = temp.split(' ') my_data.append(temp) return my_data def get_colors(my_data): colors = [] for liste in my_data: for color in liste: if not color in colors: colors.append(color) return colors rectangle = get_data(solutionfile) color_list = get_colors(rectangle) n = len(rectangle) m = len(rectangle[0]) error_list = get_all_errors(rectangle) print str(n) + "x" + str(m) print "Es wurden " + str(len(color_list)) + " Farben verwendet." print "Es wurden " + str(len(error_list))+ " Fehler gefunden." if display_errors: for error in error_list: print error
ajibawa-2023/Python-Code-Large/train/row_1419
56
94
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Import_L9_C0", "label": "copy import copy, os", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0957, 0.0106, 0, 0.66, 0.0, 739, 0, 2, 0, 0, 739, 0, 0], "semantic": {"name": "copy", "arg_names": [], "import_names": ["copy", "os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import copy, os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:ImportFrom_L10_C0", "label": "from optparse import OptionParser", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.1064, 0.0106, 0, 0.66, 0.0435, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "optparse", "arg_names": [], "import_names": ["OptionParser"], "rhs_call_name": "", "annotation": ""}, "snippet": "from optparse import OptionParser"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Import_L12_C0", "label": "psyco import psyco", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.1277, 0.0106, 0, 0.66, 0.087, 17, 0, 1, 0, 0, 17, 0, 0], "semantic": {"name": "psyco", "arg_names": [], "import_names": ["psyco"], "rhs_call_name": "", "annotation": ""}, "snippet": "import psyco"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L13_C0", "label": "full()", "type": "expression", "loc": [13, 13], "level": 0, "parent": null, "vector": [8, 0, 0.1383, 0.0106, 0, 0.66, 0.1304, 159, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "full", "arg_names": [], "import_names": [], "rhs_call_name": "full", "annotation": ""}, "snippet": "psyco.full()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L15_C0", "label": "parser = OptionParser()", "type": "assigned_variable", "loc": [15, 15], "level": 0, "parent": null, "vector": [14, 0, 0.1596, 0.0106, 0, 0.66, 0.1739, 968, 3, 0, 0, 0, 894, 10, 1], "semantic": {"name": "parser", "arg_names": [], "import_names": [], "rhs_call_name": "OptionParser", "annotation": ""}, "snippet": "parser = OptionParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L16_C0", "label": "add_option()", "type": "expression", "loc": [16, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1862, 0.0426, 0, 0.66, 0.2174, 176, 3, 6, 0, 0, 0, 0, 2], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": "parser.add_option(\"-i\", \"--input\", dest=\"solutionfile\", \n default= os.getcwd() + '/Beispiele/solution-4-errors.txt',\n help=\"Textdatei mit der Loesung\",\n metavar=\"FILE\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L20_C0", "label": "add_option()", "type": "expression", "loc": [20, 22], "level": 0, "parent": null, "vector": [8, 0, 0.2234, 0.0319, 0, 0.66, 0.2609, 176, 3, 6, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": "parser.add_option(\"-s\", \"--short\",\n action=\"store_true\", dest=\"short\", default=False,\n help=\"Die Meldungen erscheinen in Kurzform.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L23_C0", "label": "add_option()", "type": "expression", "loc": [23, 25], "level": 0, "parent": null, "vector": [8, 0, 0.2553, 0.0319, 0, 0.66, 0.3043, 176, 3, 6, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": "parser.add_option(\"-e\", \"--errors\",\n action=\"store_true\", dest=\"display_errors\", default=False,\n help=\"Die Fehler werden ausgegeben.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L26_C0", "label": "options, args = parse_args()", "type": "assigned_variable", "loc": [26, 26], "level": 0, "parent": null, "vector": [14, 0, 0.2766, 0.0106, 0, 0.66, 0.3478, 584, 3, 0, 0, 0, 187, 10, 1], "semantic": {"name": "options, args", "arg_names": [], "import_names": [], "rhs_call_name": "parse_args", "annotation": ""}, "snippet": "(options, args) = parser.parse_args()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L28_C0", "label": "solutionfile =", "type": "assigned_variable", "loc": [28, 28], "level": 0, "parent": null, "vector": [14, 0, 0.2979, 0.0106, 0, 0.66, 0.3913, 31, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "solutionfile", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "solutionfile = options.solutionfile"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L29_C0", "label": "display_errors =", "type": "assigned_variable", "loc": [29, 29], "level": 0, "parent": null, "vector": [14, 0, 0.3085, 0.0106, 0, 0.66, 0.4348, 996, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "display_errors", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "display_errors=options.display_errors"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L41_C0", "label": "check_all_left_top", "type": "function", "loc": [41, 54], "level": 0, "parent": null, "vector": [2, 0, 0.5053, 0.1489, 0, 0.66, 0.4783, 289, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "check_all_left_top", "arg_names": ["rectangle", "x1", "y1"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def check_all_left_top(rectangle, x1, y1):\n # Auf Fehler \u00fcberpr\u00fcfen:\n # Die aktuelle kugel (x1, y1) ist links oben\n error_list = []\n links_oben = rectangle[x1][y1]\n\n for x2 in xrange(x1+1, m):\n rechts_oben = rectangle[x2][y1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L44_C4", "label": "error_list =", "type": "assigned_variable", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L41_C0", "vector": [14, 1, 0.4681, 0.0106, 1, 0.25, 0.0, 285, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "error_list", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_list = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L45_C4", "label": "links_oben =", "type": "assigned_variable", "loc": [45, 45], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L41_C0", "vector": [14, 1, 0.4787, 0.0106, 1, 0.25, 0.3333, 112, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "links_oben", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " links_oben = rectangle[x1][y1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L47_C4", "label": "for x2", "type": "for", "loc": [47, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L41_C0", "vector": [6, 1, 0.5319, 0.0745, 1, 0.25, 0.6667, 837, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "x2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for x2 in xrange(x1+1, m):\n rechts_oben = rectangle[x2][y1]\n for y2 in xrange(y1+1, n):\n links_unten = rectangle[x1][y2]\n rechts_unten = rectangle[x2][y2]\n if links_oben == links_unten == rechts_oben == rechts_unten:\n error_list.append([(x1,y1),(x1,y2), (x2, y1), (x2, y2)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L48_C8", "label": "rechts_oben =", "type": "assigned_variable", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L47_C4", "vector": [14, 2, 0.5106, 0.0106, 2, 0.57, 0.0, 581, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "rechts_oben", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rechts_oben = rectangle[x2][y1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L49_C8", "label": "for y2", "type": "for", "loc": [49, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L47_C4", "vector": [6, 2, 0.5426, 0.0532, 2, 0.57, 1.0, 160, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "y2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for y2 in xrange(y1+1, n):\n links_unten = rectangle[x1][y2]\n rechts_unten = rectangle[x2][y2]\n if links_oben == links_unten == rechts_oben == rechts_unten:\n error_list.append([(x1,y1),(x1,y2), (x2, y1), (x2, y2)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L50_C12", "label": "links_unten =", "type": "assigned_variable", "loc": [50, 50], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L49_C8", "vector": [14, 3, 0.5319, 0.0106, 3, 0.36, 0.0, 43, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "links_unten", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " links_unten = rectangle[x1][y2]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L51_C12", "label": "rechts_unten =", "type": "assigned_variable", "loc": [51, 51], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L49_C8", "vector": [14, 3, 0.5426, 0.0106, 3, 0.36, 0.5, 838, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "rechts_unten", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rechts_unten = rectangle[x2][y2]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:If_L52_C12", "label": "if", "type": "if", "loc": [52, 53], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L49_C8", "vector": [4, 3, 0.5585, 0.0213, 3, 0.36, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if links_oben == links_unten == rechts_oben == rechts_unten:\n error_list.append([(x1,y1),(x1,y2), (x2, y1), (x2, y2)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L53_C16", "label": "append()", "type": "expression", "loc": [53, 53], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:If_L52_C12", "vector": [8, 4, 0.5638, 0.0106, 4, 0.9, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " error_list.append([(x1,y1),(x1,y2), (x2, y1), (x2, y2)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Return_L54_C4", "label": "return", "type": "return", "loc": [54, 54], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L41_C0", "vector": [13, 1, 0.5745, 0.0106, 1, 0.25, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return error_list"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L56_C0", "label": "get_all_errors", "type": "function", "loc": [56, 63], "level": 0, "parent": null, "vector": [2, 0, 0.633, 0.0851, 0, 0.66, 0.5217, 397, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "get_all_errors", "arg_names": ["rectangle"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_all_errors(rectangle):\n errors = []\n for x1, ebene in enumerate(rectangle):\n for y1, farbe in enumerate(ebene):\n errors_tmp = check_all_left_top(rectangle, x1, y1)\n for line in errors_tmp:\n errors.append(line)\n return errors"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L57_C4", "label": "errors =", "type": "assigned_variable", "loc": [57, 57], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L56_C0", "vector": [14, 1, 0.6064, 0.0106, 1, 0.49, 0.0, 841, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "errors", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " errors = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L58_C4", "label": "for x1, ebene", "type": "for", "loc": [58, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L56_C0", "vector": [6, 1, 0.6383, 0.0532, 1, 0.49, 0.5, 665, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "x1, ebene", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for x1, ebene in enumerate(rectangle):\n for y1, farbe in enumerate(ebene):\n errors_tmp = check_all_left_top(rectangle, x1, y1)\n for line in errors_tmp:\n errors.append(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L59_C8", "label": "for y1, farbe", "type": "for", "loc": [59, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L58_C4", "vector": [6, 2, 0.6436, 0.0426, 2, 0.99, 0.0, 950, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "y1, farbe", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for y1, farbe in enumerate(ebene):\n errors_tmp = check_all_left_top(rectangle, x1, y1)\n for line in errors_tmp:\n errors.append(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L60_C12", "label": "errors_tmp = check_all_left_top()", "type": "assigned_variable", "loc": [60, 60], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L59_C8", "vector": [14, 3, 0.6383, 0.0106, 3, 0.83, 0.0, 498, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "errors_tmp", "arg_names": [], "import_names": [], "rhs_call_name": "check_all_left_top", "annotation": ""}, "snippet": " errors_tmp = check_all_left_top(rectangle, x1, y1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L61_C12", "label": "for line", "type": "for", "loc": [61, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L59_C8", "vector": [6, 3, 0.6543, 0.0213, 3, 0.83, 1.0, 373, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in errors_tmp:\n errors.append(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L62_C16", "label": "append()", "type": "expression", "loc": [62, 62], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L61_C12", "vector": [8, 4, 0.6596, 0.0106, 4, 0.16, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " errors.append(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Return_L63_C4", "label": "return", "type": "return", "loc": [63, 63], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L56_C0", "vector": [13, 1, 0.6702, 0.0106, 1, 0.49, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return errors"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L65_C0", "label": "get_data", "type": "function", "loc": [65, 73], "level": 0, "parent": null, "vector": [2, 0, 0.734, 0.0957, 0, 0.66, 0.5652, 721, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "get_data", "arg_names": ["filename"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_data(filename):\n my_data = []\n f = open(filename, 'r')\n lines = f.readlines()\n for line in lines:\n temp = line.strip()\n #temp = temp.split(' ')\n my_data.append(temp)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L66_C4", "label": "my_data =", "type": "assigned_variable", "loc": [66, 66], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L65_C0", "vector": [14, 1, 0.7021, 0.0106, 1, 0.92, 0.0, 668, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "my_data", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " my_data = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L67_C4", "label": "f = open()", "type": "assigned_variable", "loc": [67, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L65_C0", "vector": [14, 1, 0.7128, 0.0106, 1, 0.92, 0.25, 899, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " f = open(filename, 'r')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L68_C4", "label": "lines = readlines()", "type": "assigned_variable", "loc": [68, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L65_C0", "vector": [14, 1, 0.7234, 0.0106, 1, 0.92, 0.5, 73, 3, 0, 0, 0, 841, 10, 1], "semantic": {"name": "lines", "arg_names": [], "import_names": [], "rhs_call_name": "readlines", "annotation": ""}, "snippet": " lines = f.readlines()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L69_C4", "label": "for line", "type": "for", "loc": [69, 72], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L65_C0", "vector": [6, 1, 0.75, 0.0426, 1, 0.92, 0.75, 373, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in lines:\n temp = line.strip()\n #temp = temp.split(' ')\n my_data.append(temp)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L70_C6", "label": "temp = strip()", "type": "assigned_variable", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L69_C4", "vector": [14, 2, 0.7447, 0.0106, 2, 0.59, 0.0, 915, 3, 0, 0, 0, 973, 10, 1], "semantic": {"name": "temp", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " temp = line.strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L72_C6", "label": "append()", "type": "expression", "loc": [72, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L69_C4", "vector": [8, 2, 0.766, 0.0106, 2, 0.59, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " my_data.append(temp)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Return_L73_C4", "label": "return", "type": "return", "loc": [73, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L65_C0", "vector": [13, 1, 0.7766, 0.0106, 1, 0.92, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return my_data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L75_C0", "label": "get_colors", "type": "function", "loc": [75, 81], "level": 0, "parent": null, "vector": [2, 0, 0.8298, 0.0745, 0, 0.66, 0.6087, 713, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_colors", "arg_names": ["my_data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_colors(my_data):\n colors = []\n for liste in my_data:\n for color in liste:\n if not color in colors:\n colors.append(color)\n return colors"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L76_C4", "label": "colors =", "type": "assigned_variable", "loc": [76, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L75_C0", "vector": [14, 1, 0.8085, 0.0106, 1, 0.19, 0.0, 656, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "colors", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " colors = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L77_C4", "label": "for liste", "type": "for", "loc": [77, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L75_C0", "vector": [6, 1, 0.8351, 0.0426, 1, 0.19, 0.5, 440, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "liste", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for liste in my_data:\n for color in liste:\n if not color in colors:\n colors.append(color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L78_C8", "label": "for color", "type": "for", "loc": [78, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L77_C4", "vector": [6, 2, 0.8404, 0.0319, 2, 0.67, 0.0, 776, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "color", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for color in liste:\n if not color in colors:\n colors.append(color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:If_L79_C12", "label": "if", "type": "if", "loc": [79, 80], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L78_C8", "vector": [4, 3, 0.8457, 0.0213, 3, 0.15, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not color in colors:\n colors.append(color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L80_C16", "label": "append()", "type": "expression", "loc": [80, 80], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:If_L79_C12", "vector": [8, 4, 0.8511, 0.0106, 4, 0.33, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " colors.append(color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Return_L81_C4", "label": "return", "type": "return", "loc": [81, 81], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L75_C0", "vector": [13, 1, 0.8617, 0.0106, 1, 0.19, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return colors"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L83_C0", "label": "rectangle = get_data()", "type": "assigned_variable", "loc": [83, 83], "level": 0, "parent": null, "vector": [14, 0, 0.883, 0.0106, 0, 0.66, 0.6522, 995, 3, 1, 0, 0, 721, 10, 1], "semantic": {"name": "rectangle", "arg_names": [], "import_names": [], "rhs_call_name": "get_data", "annotation": ""}, "snippet": "rectangle = get_data(solutionfile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L84_C0", "label": "color_list = get_colors()", "type": "assigned_variable", "loc": [84, 84], "level": 0, "parent": null, "vector": [14, 0, 0.8936, 0.0106, 0, 0.66, 0.6957, 570, 3, 1, 0, 0, 713, 10, 1], "semantic": {"name": "color_list", "arg_names": [], "import_names": [], "rhs_call_name": "get_colors", "annotation": ""}, "snippet": "color_list = get_colors(rectangle)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L85_C0", "label": "n = len()", "type": "assigned_variable", "loc": [85, 85], "level": 0, "parent": null, "vector": [14, 0, 0.9043, 0.0106, 0, 0.66, 0.7391, 773, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": "n = len(rectangle)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L86_C0", "label": "m = len()", "type": "assigned_variable", "loc": [86, 86], "level": 0, "parent": null, "vector": [14, 0, 0.9149, 0.0106, 0, 0.66, 0.7826, 711, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": "m = len(rectangle[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L87_C0", "label": "error_list = get_all_errors()", "type": "assigned_variable", "loc": [87, 87], "level": 0, "parent": null, "vector": [14, 0, 0.9255, 0.0106, 0, 0.66, 0.8261, 285, 3, 1, 0, 0, 397, 10, 1], "semantic": {"name": "error_list", "arg_names": [], "import_names": [], "rhs_call_name": "get_all_errors", "annotation": ""}, "snippet": "error_list = get_all_errors(rectangle)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L89_C0", "label": "print()", "type": "expression", "loc": [89, 89], "level": 0, "parent": null, "vector": [8, 0, 0.9468, 0.0106, 0, 0.66, 0.8696, 535, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(str(n) + \"x\" + str(m))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L90_C0", "label": "print()", "type": "expression", "loc": [90, 90], "level": 0, "parent": null, "vector": [8, 0, 0.9574, 0.0106, 0, 0.66, 0.913, 535, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"Es wurden \" + str(len(color_list)) + \" Farben verwendet.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L91_C0", "label": "print()", "type": "expression", "loc": [91, 91], "level": 0, "parent": null, "vector": [8, 0, 0.9681, 0.0106, 0, 0.66, 0.9565, 535, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"Es wurden \" + str(len(error_list))+ \" Fehler gefunden.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:If_L92_C0", "label": "if", "type": "if", "loc": [92, 94], "level": 0, "parent": null, "vector": [4, 0, 0.9894, 0.0319, 0, 0.66, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if display_errors:\n for error in error_list:\n print(error)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L93_C4", "label": "for error", "type": "for", "loc": [93, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:If_L92_C0", "vector": [6, 1, 0.9947, 0.0213, 1, 0.9, 0.0, 771, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "error", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for error in error_list:\n print(error)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L94_C8", "label": "print()", "type": "expression", "loc": [94, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L93_C4", "vector": [8, 2, 1.0, 0.0106, 2, 0.08, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(error)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L47_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L47_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L49_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L50_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L49_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L51_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L49_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:If_L52_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:If_L52_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L53_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Return_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L58_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L59_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L60_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L59_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L61_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L61_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L62_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Return_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L66_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L70_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L72_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Return_L73_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L75_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Assign_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L75_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L77_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L77_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L78_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:If_L79_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:If_L79_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L80_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:FunctionDef_L75_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Return_L81_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:If_L92_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1419:For_L93_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1419:Expr_L94_C8"}]
#!/usr/bin/python # -*- coding: utf-8 -*- # Dieses Script kontrolliert eine Lösung. Es wird ausgegeben, wie viele Farben # verwendet wurden und wie groß das Dreieck ist. # Funktioniert nur mit korrekter Eingabedatei (keine Leerzeichen zum trennen der # Farben, neue Zeilen für eine neue Ebene des n-Traumrechtecks) import copy, os from optparse import OptionParser import psyco psyco.full() parser = OptionParser() parser.add_option("-i", "--input", dest="solutionfile", default= os.getcwd() + '/Beispiele/solution-4-errors.txt', help="Textdatei mit der Loesung", metavar="FILE") parser.add_option("-s", "--short", action="store_true", dest="short", default=False, help="Die Meldungen erscheinen in Kurzform.") parser.add_option("-e", "--errors", action="store_true", dest="display_errors", default=False, help="Die Fehler werden ausgegeben.") (options, args) = parser.parse_args() solutionfile = options.solutionfile display_errors=options.display_errors # 12345m = x # 2 # 3 # 4 # 5 # n = y # Get Data###################################################################### # my_data[ebene - startet oben ][position - startet links] def check_all_left_top(rectangle, x1, y1): # Auf Fehler überprüfen: # Die aktuelle kugel (x1, y1) ist links oben error_list = [] links_oben = rectangle[x1][y1] for x2 in xrange(x1+1, m): rechts_oben = rectangle[x2][y1] for y2 in xrange(y1+1, n): links_unten = rectangle[x1][y2] rechts_unten = rectangle[x2][y2] if links_oben == links_unten == rechts_oben == rechts_unten: error_list.append([(x1,y1),(x1,y2), (x2, y1), (x2, y2)]) return error_list def get_all_errors(rectangle): errors = [] for x1, ebene in enumerate(rectangle): for y1, farbe in enumerate(ebene): errors_tmp = check_all_left_top(rectangle, x1, y1) for line in errors_tmp: errors.append(line) return errors def get_data(filename): my_data = [] f = open(filename, 'r') lines = f.readlines() for line in lines: temp = line.strip() #temp = temp.split(' ') my_data.append(temp) return my_data def get_colors(my_data): colors = [] for liste in my_data: for color in liste: if not color in colors: colors.append(color) return colors rectangle = get_data(solutionfile) color_list = get_colors(rectangle) n = len(rectangle) m = len(rectangle[0]) error_list = get_all_errors(rectangle) print str(n) + "x" + str(m) print "Es wurden " + str(len(color_list)) + " Farben verwendet." print "Es wurden " + str(len(error_list))+ " Fehler gefunden." if display_errors: for error in error_list: print error
ajibawa-2023/Python-Code-Large/train/row_1420
56
94
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Import_L9_C0", "label": "copy import copy, os", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0957, 0.0106, 0, 0.66, 0.0, 739, 0, 2, 0, 0, 739, 0, 0], "semantic": {"name": "copy", "arg_names": [], "import_names": ["copy", "os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import copy, os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:ImportFrom_L10_C0", "label": "from optparse import OptionParser", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.1064, 0.0106, 0, 0.66, 0.0435, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "optparse", "arg_names": [], "import_names": ["OptionParser"], "rhs_call_name": "", "annotation": ""}, "snippet": "from optparse import OptionParser"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Import_L12_C0", "label": "psyco import psyco", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.1277, 0.0106, 0, 0.66, 0.087, 17, 0, 1, 0, 0, 17, 0, 0], "semantic": {"name": "psyco", "arg_names": [], "import_names": ["psyco"], "rhs_call_name": "", "annotation": ""}, "snippet": "import psyco"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L13_C0", "label": "full()", "type": "expression", "loc": [13, 13], "level": 0, "parent": null, "vector": [8, 0, 0.1383, 0.0106, 0, 0.66, 0.1304, 159, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "full", "arg_names": [], "import_names": [], "rhs_call_name": "full", "annotation": ""}, "snippet": "psyco.full()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L15_C0", "label": "parser = OptionParser()", "type": "assigned_variable", "loc": [15, 15], "level": 0, "parent": null, "vector": [14, 0, 0.1596, 0.0106, 0, 0.66, 0.1739, 968, 3, 0, 0, 0, 894, 10, 1], "semantic": {"name": "parser", "arg_names": [], "import_names": [], "rhs_call_name": "OptionParser", "annotation": ""}, "snippet": "parser = OptionParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L16_C0", "label": "add_option()", "type": "expression", "loc": [16, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1862, 0.0426, 0, 0.66, 0.2174, 176, 3, 6, 0, 0, 0, 0, 2], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": "parser.add_option(\"-i\", \"--input\", dest=\"solutionfile\", \n default= os.getcwd() + '/Beispiele/solution-4-errors.txt',\n help=\"Textdatei mit der Loesung\",\n metavar=\"FILE\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L20_C0", "label": "add_option()", "type": "expression", "loc": [20, 22], "level": 0, "parent": null, "vector": [8, 0, 0.2234, 0.0319, 0, 0.66, 0.2609, 176, 3, 6, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": "parser.add_option(\"-s\", \"--short\",\n action=\"store_true\", dest=\"short\", default=False,\n help=\"Die Meldungen erscheinen in Kurzform.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L23_C0", "label": "add_option()", "type": "expression", "loc": [23, 25], "level": 0, "parent": null, "vector": [8, 0, 0.2553, 0.0319, 0, 0.66, 0.3043, 176, 3, 6, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": "parser.add_option(\"-e\", \"--errors\",\n action=\"store_true\", dest=\"display_errors\", default=False,\n help=\"Die Fehler werden ausgegeben.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L26_C0", "label": "options, args = parse_args()", "type": "assigned_variable", "loc": [26, 26], "level": 0, "parent": null, "vector": [14, 0, 0.2766, 0.0106, 0, 0.66, 0.3478, 584, 3, 0, 0, 0, 187, 10, 1], "semantic": {"name": "options, args", "arg_names": [], "import_names": [], "rhs_call_name": "parse_args", "annotation": ""}, "snippet": "(options, args) = parser.parse_args()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L28_C0", "label": "solutionfile =", "type": "assigned_variable", "loc": [28, 28], "level": 0, "parent": null, "vector": [14, 0, 0.2979, 0.0106, 0, 0.66, 0.3913, 31, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "solutionfile", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "solutionfile = options.solutionfile"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L29_C0", "label": "display_errors =", "type": "assigned_variable", "loc": [29, 29], "level": 0, "parent": null, "vector": [14, 0, 0.3085, 0.0106, 0, 0.66, 0.4348, 996, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "display_errors", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "display_errors=options.display_errors"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L41_C0", "label": "check_all_left_top", "type": "function", "loc": [41, 54], "level": 0, "parent": null, "vector": [2, 0, 0.5053, 0.1489, 0, 0.66, 0.4783, 289, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "check_all_left_top", "arg_names": ["rectangle", "x1", "y1"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def check_all_left_top(rectangle, x1, y1):\n # Auf Fehler \u00fcberpr\u00fcfen:\n # Die aktuelle kugel (x1, y1) ist links oben\n error_list = []\n links_oben = rectangle[x1][y1]\n\n for x2 in xrange(x1+1, m):\n rechts_oben = rectangle[x2][y1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L44_C4", "label": "error_list =", "type": "assigned_variable", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L41_C0", "vector": [14, 1, 0.4681, 0.0106, 1, 0.89, 0.0, 285, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "error_list", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_list = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L45_C4", "label": "links_oben =", "type": "assigned_variable", "loc": [45, 45], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L41_C0", "vector": [14, 1, 0.4787, 0.0106, 1, 0.89, 0.3333, 112, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "links_oben", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " links_oben = rectangle[x1][y1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L47_C4", "label": "for x2", "type": "for", "loc": [47, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L41_C0", "vector": [6, 1, 0.5319, 0.0745, 1, 0.89, 0.6667, 837, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "x2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for x2 in xrange(x1+1, m):\n rechts_oben = rectangle[x2][y1]\n for y2 in xrange(y1+1, n):\n links_unten = rectangle[x1][y2]\n rechts_unten = rectangle[x2][y2]\n if links_oben == links_unten == rechts_oben == rechts_unten:\n error_list.append([(x1,y1),(x1,y2), (x2, y1), (x2, y2)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L48_C8", "label": "rechts_oben =", "type": "assigned_variable", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L47_C4", "vector": [14, 2, 0.5106, 0.0106, 2, 0.04, 0.0, 581, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "rechts_oben", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rechts_oben = rectangle[x2][y1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L49_C8", "label": "for y2", "type": "for", "loc": [49, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L47_C4", "vector": [6, 2, 0.5426, 0.0532, 2, 0.04, 1.0, 160, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "y2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for y2 in xrange(y1+1, n):\n links_unten = rectangle[x1][y2]\n rechts_unten = rectangle[x2][y2]\n if links_oben == links_unten == rechts_oben == rechts_unten:\n error_list.append([(x1,y1),(x1,y2), (x2, y1), (x2, y2)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L50_C12", "label": "links_unten =", "type": "assigned_variable", "loc": [50, 50], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L49_C8", "vector": [14, 3, 0.5319, 0.0106, 3, 0.36, 0.0, 43, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "links_unten", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " links_unten = rectangle[x1][y2]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L51_C12", "label": "rechts_unten =", "type": "assigned_variable", "loc": [51, 51], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L49_C8", "vector": [14, 3, 0.5426, 0.0106, 3, 0.36, 0.5, 838, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "rechts_unten", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rechts_unten = rectangle[x2][y2]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:If_L52_C12", "label": "if", "type": "if", "loc": [52, 53], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L49_C8", "vector": [4, 3, 0.5585, 0.0213, 3, 0.36, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if links_oben == links_unten == rechts_oben == rechts_unten:\n error_list.append([(x1,y1),(x1,y2), (x2, y1), (x2, y2)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L53_C16", "label": "append()", "type": "expression", "loc": [53, 53], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:If_L52_C12", "vector": [8, 4, 0.5638, 0.0106, 4, 0.25, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " error_list.append([(x1,y1),(x1,y2), (x2, y1), (x2, y2)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Return_L54_C4", "label": "return", "type": "return", "loc": [54, 54], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L41_C0", "vector": [13, 1, 0.5745, 0.0106, 1, 0.89, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return error_list"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L56_C0", "label": "get_all_errors", "type": "function", "loc": [56, 63], "level": 0, "parent": null, "vector": [2, 0, 0.633, 0.0851, 0, 0.66, 0.5217, 397, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "get_all_errors", "arg_names": ["rectangle"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_all_errors(rectangle):\n errors = []\n for x1, ebene in enumerate(rectangle):\n for y1, farbe in enumerate(ebene):\n errors_tmp = check_all_left_top(rectangle, x1, y1)\n for line in errors_tmp:\n errors.append(line)\n return errors"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L57_C4", "label": "errors =", "type": "assigned_variable", "loc": [57, 57], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L56_C0", "vector": [14, 1, 0.6064, 0.0106, 1, 0.04, 0.0, 841, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "errors", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " errors = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L58_C4", "label": "for x1, ebene", "type": "for", "loc": [58, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L56_C0", "vector": [6, 1, 0.6383, 0.0532, 1, 0.04, 0.5, 665, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "x1, ebene", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for x1, ebene in enumerate(rectangle):\n for y1, farbe in enumerate(ebene):\n errors_tmp = check_all_left_top(rectangle, x1, y1)\n for line in errors_tmp:\n errors.append(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L59_C8", "label": "for y1, farbe", "type": "for", "loc": [59, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L58_C4", "vector": [6, 2, 0.6436, 0.0426, 2, 0.4, 0.0, 950, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "y1, farbe", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for y1, farbe in enumerate(ebene):\n errors_tmp = check_all_left_top(rectangle, x1, y1)\n for line in errors_tmp:\n errors.append(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L60_C12", "label": "errors_tmp = check_all_left_top()", "type": "assigned_variable", "loc": [60, 60], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L59_C8", "vector": [14, 3, 0.6383, 0.0106, 3, 0.59, 0.0, 498, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "errors_tmp", "arg_names": [], "import_names": [], "rhs_call_name": "check_all_left_top", "annotation": ""}, "snippet": " errors_tmp = check_all_left_top(rectangle, x1, y1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L61_C12", "label": "for line", "type": "for", "loc": [61, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L59_C8", "vector": [6, 3, 0.6543, 0.0213, 3, 0.59, 1.0, 373, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in errors_tmp:\n errors.append(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L62_C16", "label": "append()", "type": "expression", "loc": [62, 62], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L61_C12", "vector": [8, 4, 0.6596, 0.0106, 4, 0.72, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " errors.append(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Return_L63_C4", "label": "return", "type": "return", "loc": [63, 63], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L56_C0", "vector": [13, 1, 0.6702, 0.0106, 1, 0.04, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return errors"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L65_C0", "label": "get_data", "type": "function", "loc": [65, 73], "level": 0, "parent": null, "vector": [2, 0, 0.734, 0.0957, 0, 0.66, 0.5652, 721, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "get_data", "arg_names": ["filename"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_data(filename):\n my_data = []\n f = open(filename, 'r')\n lines = f.readlines()\n for line in lines:\n temp = line.strip()\n #temp = temp.split(' ')\n my_data.append(temp)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L66_C4", "label": "my_data =", "type": "assigned_variable", "loc": [66, 66], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L65_C0", "vector": [14, 1, 0.7021, 0.0106, 1, 0.81, 0.0, 668, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "my_data", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " my_data = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L67_C4", "label": "f = open()", "type": "assigned_variable", "loc": [67, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L65_C0", "vector": [14, 1, 0.7128, 0.0106, 1, 0.81, 0.25, 899, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " f = open(filename, 'r')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L68_C4", "label": "lines = readlines()", "type": "assigned_variable", "loc": [68, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L65_C0", "vector": [14, 1, 0.7234, 0.0106, 1, 0.81, 0.5, 73, 3, 0, 0, 0, 841, 10, 1], "semantic": {"name": "lines", "arg_names": [], "import_names": [], "rhs_call_name": "readlines", "annotation": ""}, "snippet": " lines = f.readlines()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L69_C4", "label": "for line", "type": "for", "loc": [69, 72], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L65_C0", "vector": [6, 1, 0.75, 0.0426, 1, 0.81, 0.75, 373, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in lines:\n temp = line.strip()\n #temp = temp.split(' ')\n my_data.append(temp)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L70_C6", "label": "temp = strip()", "type": "assigned_variable", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L69_C4", "vector": [14, 2, 0.7447, 0.0106, 2, 0.93, 0.0, 915, 3, 0, 0, 0, 973, 10, 1], "semantic": {"name": "temp", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " temp = line.strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L72_C6", "label": "append()", "type": "expression", "loc": [72, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L69_C4", "vector": [8, 2, 0.766, 0.0106, 2, 0.93, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " my_data.append(temp)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Return_L73_C4", "label": "return", "type": "return", "loc": [73, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L65_C0", "vector": [13, 1, 0.7766, 0.0106, 1, 0.81, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return my_data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L75_C0", "label": "get_colors", "type": "function", "loc": [75, 81], "level": 0, "parent": null, "vector": [2, 0, 0.8298, 0.0745, 0, 0.66, 0.6087, 713, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_colors", "arg_names": ["my_data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_colors(my_data):\n colors = []\n for liste in my_data:\n for color in liste:\n if not color in colors:\n colors.append(color)\n return colors"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L76_C4", "label": "colors =", "type": "assigned_variable", "loc": [76, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L75_C0", "vector": [14, 1, 0.8085, 0.0106, 1, 0.63, 0.0, 656, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "colors", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " colors = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L77_C4", "label": "for liste", "type": "for", "loc": [77, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L75_C0", "vector": [6, 1, 0.8351, 0.0426, 1, 0.63, 0.5, 440, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "liste", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for liste in my_data:\n for color in liste:\n if not color in colors:\n colors.append(color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L78_C8", "label": "for color", "type": "for", "loc": [78, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L77_C4", "vector": [6, 2, 0.8404, 0.0319, 2, 0.81, 0.0, 776, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "color", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for color in liste:\n if not color in colors:\n colors.append(color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:If_L79_C12", "label": "if", "type": "if", "loc": [79, 80], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L78_C8", "vector": [4, 3, 0.8457, 0.0213, 3, 0.43, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not color in colors:\n colors.append(color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L80_C16", "label": "append()", "type": "expression", "loc": [80, 80], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:If_L79_C12", "vector": [8, 4, 0.8511, 0.0106, 4, 0.35, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " colors.append(color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Return_L81_C4", "label": "return", "type": "return", "loc": [81, 81], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L75_C0", "vector": [13, 1, 0.8617, 0.0106, 1, 0.63, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return colors"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L83_C0", "label": "rectangle = get_data()", "type": "assigned_variable", "loc": [83, 83], "level": 0, "parent": null, "vector": [14, 0, 0.883, 0.0106, 0, 0.66, 0.6522, 995, 3, 1, 0, 0, 721, 10, 1], "semantic": {"name": "rectangle", "arg_names": [], "import_names": [], "rhs_call_name": "get_data", "annotation": ""}, "snippet": "rectangle = get_data(solutionfile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L84_C0", "label": "color_list = get_colors()", "type": "assigned_variable", "loc": [84, 84], "level": 0, "parent": null, "vector": [14, 0, 0.8936, 0.0106, 0, 0.66, 0.6957, 570, 3, 1, 0, 0, 713, 10, 1], "semantic": {"name": "color_list", "arg_names": [], "import_names": [], "rhs_call_name": "get_colors", "annotation": ""}, "snippet": "color_list = get_colors(rectangle)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L85_C0", "label": "n = len()", "type": "assigned_variable", "loc": [85, 85], "level": 0, "parent": null, "vector": [14, 0, 0.9043, 0.0106, 0, 0.66, 0.7391, 773, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": "n = len(rectangle)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L86_C0", "label": "m = len()", "type": "assigned_variable", "loc": [86, 86], "level": 0, "parent": null, "vector": [14, 0, 0.9149, 0.0106, 0, 0.66, 0.7826, 711, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": "m = len(rectangle[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L87_C0", "label": "error_list = get_all_errors()", "type": "assigned_variable", "loc": [87, 87], "level": 0, "parent": null, "vector": [14, 0, 0.9255, 0.0106, 0, 0.66, 0.8261, 285, 3, 1, 0, 0, 397, 10, 1], "semantic": {"name": "error_list", "arg_names": [], "import_names": [], "rhs_call_name": "get_all_errors", "annotation": ""}, "snippet": "error_list = get_all_errors(rectangle)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L89_C0", "label": "print()", "type": "expression", "loc": [89, 89], "level": 0, "parent": null, "vector": [8, 0, 0.9468, 0.0106, 0, 0.66, 0.8696, 535, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(str(n) + \"x\" + str(m))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L90_C0", "label": "print()", "type": "expression", "loc": [90, 90], "level": 0, "parent": null, "vector": [8, 0, 0.9574, 0.0106, 0, 0.66, 0.913, 535, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"Es wurden \" + str(len(color_list)) + \" Farben verwendet.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L91_C0", "label": "print()", "type": "expression", "loc": [91, 91], "level": 0, "parent": null, "vector": [8, 0, 0.9681, 0.0106, 0, 0.66, 0.9565, 535, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"Es wurden \" + str(len(error_list))+ \" Fehler gefunden.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:If_L92_C0", "label": "if", "type": "if", "loc": [92, 94], "level": 0, "parent": null, "vector": [4, 0, 0.9894, 0.0319, 0, 0.66, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if display_errors:\n for error in error_list:\n print(error)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L93_C4", "label": "for error", "type": "for", "loc": [93, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:If_L92_C0", "vector": [6, 1, 0.9947, 0.0213, 1, 0.86, 0.0, 771, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "error", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for error in error_list:\n print(error)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L94_C8", "label": "print()", "type": "expression", "loc": [94, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L93_C4", "vector": [8, 2, 1.0, 0.0106, 2, 0.62, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(error)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L47_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L47_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L49_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L50_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L49_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L51_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L49_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:If_L52_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:If_L52_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L53_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Return_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L58_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L59_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L60_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L59_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L61_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L61_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L62_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Return_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L66_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L70_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L72_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Return_L73_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L75_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Assign_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L75_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L77_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L77_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L78_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:If_L79_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:If_L79_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L80_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:FunctionDef_L75_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Return_L81_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:If_L92_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1420:For_L93_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1420:Expr_L94_C8"}]
''' Module which brings history information about files from Mercurial. @author: Rodrigo Damazio ''' import re import subprocess REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*') def _GetOutputLines(args): ''' Runs an external process and returns its output as a list of lines. @param args: the arguments to run ''' process = subprocess.Popen(args, stdout=subprocess.PIPE, universal_newlines = True, shell = False) output = process.communicate()[0] return output.splitlines() def FillMercurialRevisions(filename, parsed_file): ''' Fills the revs attribute of all strings in the given parsed file with a list of revisions that touched the lines corresponding to that string. @param filename: the name of the file to get history for @param parsed_file: the parsed file to modify ''' # Take output of hg annotate to get revision of each line output_lines = _GetOutputLines(['hg', 'annotate', '-c', filename]) # Create a map of line -> revision (key is list index, line 0 doesn't exist) line_revs = ['dummy'] for line in output_lines: rev_match = REVISION_REGEX.match(line) if not rev_match: raise 'Unexpected line of output from hg: %s' % line rev_hash = rev_match.group('hash') line_revs.append(rev_hash) for str in parsed_file.itervalues(): # Get the lines that correspond to each string start_line = str['startLine'] end_line = str['endLine'] # Get the revisions that touched those lines revs = [] for line_number in range(start_line, end_line + 1): revs.append(line_revs[line_number]) # Merge with any revisions that were already there # (for explict revision specification) if 'revs' in str: revs += str['revs'] # Assign the revisions to the string str['revs'] = frozenset(revs) def DoesRevisionSuperceed(filename, rev1, rev2): ''' Tells whether a revision superceeds another. This essentially means that the older revision is an ancestor of the newer one. This also returns True if the two revisions are the same. @param rev1: the revision that may be superceeding the other @param rev2: the revision that may be superceeded @return: True if rev1 superceeds rev2 or they're the same ''' if rev1 == rev2: return True # TODO: Add filename args = ['hg', 'log', '-r', 'ancestors(%s)' % rev1, '--template', '{node|short}\n', filename] output_lines = _GetOutputLines(args) return rev2 in output_lines def NewestRevision(filename, rev1, rev2): ''' Returns which of two revisions is closest to the head of the repository. If none of them is the ancestor of the other, then we return either one. @param rev1: the first revision @param rev2: the second revision ''' if DoesRevisionSuperceed(filename, rev1, rev2): return rev1 return rev2
ajibawa-2023/Python-Code-Large/train/row_1421
38
94
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0319, 0.0532, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nModule which brings history information about files from Mercurial.\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Import_L7_C0", "label": "re import re", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0745, 0.0106, 0, 0.66, 0.1429, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Import_L8_C0", "label": "subprocess import subprocess", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0851, 0.0106, 0, 0.66, 0.2857, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ["subprocess"], "rhs_call_name": "", "annotation": ""}, "snippet": "import subprocess"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L10_C0", "label": "REVISION_REGEX = compile()", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.1064, 0.0106, 0, 0.66, 0.4286, 883, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "REVISION_REGEX", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L12_C0", "label": "_GetOutputLines", "type": "function", "loc": [12, 23], "level": 0, "parent": null, "vector": [2, 0, 0.1862, 0.1277, 0, 0.66, 0.5714, 359, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "_GetOutputLines", "arg_names": ["args"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def _GetOutputLines(args):\n '''\n Runs an external process and returns its output as a list of lines.\n\n @param args: the arguments to run\n '''\n process = subprocess.Popen(args,\n stdout=subprocess.PIPE,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Expr_L13_C2", "label": "expression", "type": "expression", "loc": [13, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L12_C0", "vector": [8, 1, 0.1596, 0.0532, 1, 0.3, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Runs an external process and returns its output as a list of lines.\n\n @param args: the arguments to run\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L18_C2", "label": "process = Popen()", "type": "assigned_variable", "loc": [18, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L12_C0", "vector": [14, 1, 0.2074, 0.0426, 1, 0.3, 0.3333, 712, 3, 4, 0, 0, 568, 10, 1], "semantic": {"name": "process", "arg_names": [], "import_names": [], "rhs_call_name": "Popen", "annotation": ""}, "snippet": " process = subprocess.Popen(args,\n stdout=subprocess.PIPE,\n universal_newlines = True,\n shell = False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L22_C2", "label": "output =", "type": "assigned_variable", "loc": [22, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L12_C0", "vector": [14, 1, 0.234, 0.0106, 1, 0.3, 0.6667, 886, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "output", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " output = process.communicate()[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Return_L23_C2", "label": "return", "type": "return", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L12_C0", "vector": [13, 1, 0.2447, 0.0106, 1, 0.3, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return output.splitlines()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L26_C0", "label": "FillMercurialRevisions", "type": "function", "loc": [26, 62], "level": 0, "parent": null, "vector": [2, 0, 0.4681, 0.3936, 0, 0.66, 0.7143, 942, 0, 2, 0, 0, 0, 0, 8], "semantic": {"name": "FillMercurialRevisions", "arg_names": ["filename", "parsed_file"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def FillMercurialRevisions(filename, parsed_file):\n '''\n Fills the revs attribute of all strings in the given parsed file with\n a list of revisions that touched the lines corresponding to that string.\n \n @param filename: the name of the file to get history for\n @param parsed_file: the parsed file to modify\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Expr_L27_C2", "label": "expression", "type": "expression", "loc": [27, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L26_C0", "vector": [8, 1, 0.3191, 0.0745, 1, 0.08, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Fills the revs attribute of all strings in the given parsed file with\n a list of revisions that touched the lines corresponding to that string.\n \n @param filename: the name of the file to get history for\n @param parsed_file: the parsed file to modify\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L35_C2", "label": "output_lines = _GetOutputLines()", "type": "assigned_variable", "loc": [35, 35], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L26_C0", "vector": [14, 1, 0.3723, 0.0106, 1, 0.08, 0.25, 574, 3, 1, 0, 0, 359, 10, 1], "semantic": {"name": "output_lines", "arg_names": [], "import_names": [], "rhs_call_name": "_GetOutputLines", "annotation": ""}, "snippet": " output_lines = _GetOutputLines(['hg', 'annotate', '-c', filename])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L38_C2", "label": "line_revs =", "type": "assigned_variable", "loc": [38, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L26_C0", "vector": [14, 1, 0.4043, 0.0106, 1, 0.08, 0.5, 348, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "line_revs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " line_revs = ['dummy']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L39_C2", "label": "for line", "type": "for", "loc": [39, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L26_C0", "vector": [6, 1, 0.4415, 0.0638, 1, 0.08, 0.75, 373, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in output_lines:\n rev_match = REVISION_REGEX.match(line)\n if not rev_match:\n raise 'Unexpected line of output from hg: %s' % line\n rev_hash = rev_match.group('hash')\n line_revs.append(rev_hash)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L40_C4", "label": "rev_match = match()", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L39_C2", "vector": [14, 2, 0.4255, 0.0106, 2, 0.42, 0.0, 931, 3, 1, 0, 0, 36, 10, 1], "semantic": {"name": "rev_match", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " rev_match = REVISION_REGEX.match(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:If_L41_C4", "label": "if", "type": "if", "loc": [41, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L39_C2", "vector": [4, 2, 0.4415, 0.0213, 2, 0.42, 0.3333, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not rev_match:\n raise 'Unexpected line of output from hg: %s' % line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L43_C4", "label": "rev_hash = group()", "type": "assigned_variable", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L39_C2", "vector": [14, 2, 0.4574, 0.0106, 2, 0.42, 0.6667, 682, 3, 1, 0, 0, 43, 10, 1], "semantic": {"name": "rev_hash", "arg_names": [], "import_names": [], "rhs_call_name": "group", "annotation": ""}, "snippet": " rev_hash = rev_match.group('hash')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Expr_L44_C4", "label": "append()", "type": "expression", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L39_C2", "vector": [8, 2, 0.4681, 0.0106, 2, 0.42, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " line_revs.append(rev_hash)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L46_C2", "label": "for str", "type": "for", "loc": [46, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L26_C0", "vector": [6, 1, 0.5745, 0.1809, 1, 0.08, 1.0, 52, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "str", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for str in parsed_file.itervalues():\n # Get the lines that correspond to each string\n start_line = str['startLine']\n end_line = str['endLine']\n\n # Get the revisions that touched those lines\n revs = []\n for line_number in range(start_line, end_line + 1):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L48_C4", "label": "start_line =", "type": "assigned_variable", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L46_C2", "vector": [14, 2, 0.5106, 0.0106, 2, 0.19, 0.0, 501, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "start_line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " start_line = str['startLine']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L49_C4", "label": "end_line =", "type": "assigned_variable", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L46_C2", "vector": [14, 2, 0.5213, 0.0106, 2, 0.19, 0.2, 54, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "end_line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end_line = str['endLine']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L52_C4", "label": "revs =", "type": "assigned_variable", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L46_C2", "vector": [14, 2, 0.5532, 0.0106, 2, 0.19, 0.4, 848, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "revs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " revs = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L53_C4", "label": "for line_number", "type": "for", "loc": [53, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L46_C2", "vector": [6, 2, 0.5691, 0.0213, 2, 0.19, 0.6, 490, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "line_number", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line_number in range(start_line, end_line + 1):\n revs.append(line_revs[line_number])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Expr_L54_C6", "label": "append()", "type": "expression", "loc": [54, 54], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L53_C4", "vector": [8, 3, 0.5745, 0.0106, 3, 0.29, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " revs.append(line_revs[line_number])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:If_L58_C4", "label": "if", "type": "if", "loc": [58, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L46_C2", "vector": [4, 2, 0.6223, 0.0213, 2, 0.19, 0.8, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'revs' in str:\n revs += str['revs']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L62_C4", "label": " = frozenset()", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L46_C2", "vector": [14, 2, 0.6596, 0.0106, 2, 0.19, 1.0, 0, 3, 1, 0, 0, 80, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "frozenset", "annotation": ""}, "snippet": " str['revs'] = frozenset(revs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L64_C0", "label": "DoesRevisionSuperceed", "type": "function", "loc": [64, 82], "level": 0, "parent": null, "vector": [2, 0, 0.7766, 0.2021, 0, 0.66, 0.8571, 330, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "DoesRevisionSuperceed", "arg_names": ["filename", "rev1", "rev2"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def DoesRevisionSuperceed(filename, rev1, rev2):\n '''\n Tells whether a revision superceeds another.\n This essentially means that the older revision is an ancestor of the newer\n one.\n This also returns True if the two revisions are the same.\n\n @param rev1: the revision that may be superceeding the other"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Expr_L65_C2", "label": "expression", "type": "expression", "loc": [65, 74], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L64_C0", "vector": [8, 1, 0.7394, 0.1064, 1, 0.55, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Tells whether a revision superceeds another.\n This essentially means that the older revision is an ancestor of the newer\n one.\n This also returns True if the two revisions are the same.\n\n @param rev1: the revision that may be superceeding the other\n @param rev2: the revision that may be superceeded"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:If_L75_C2", "label": "if", "type": "if", "loc": [75, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L64_C0", "vector": [4, 1, 0.8032, 0.0213, 1, 0.55, 0.25, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if rev1 == rev2:\n return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Return_L76_C4", "label": "return", "type": "return", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:If_L75_C2", "vector": [13, 2, 0.8085, 0.0106, 2, 0.55, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L79_C2", "label": "args =", "type": "assigned_variable", "loc": [79, 79], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L64_C0", "vector": [14, 1, 0.8404, 0.0106, 1, 0.55, 0.5, 805, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "args", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " args = ['hg', 'log', '-r', 'ancestors(%s)' % rev1, '--template', '{node|short}\\n', filename]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L80_C2", "label": "output_lines = _GetOutputLines()", "type": "assigned_variable", "loc": [80, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L64_C0", "vector": [14, 1, 0.8511, 0.0106, 1, 0.55, 0.75, 574, 3, 1, 0, 0, 359, 10, 1], "semantic": {"name": "output_lines", "arg_names": [], "import_names": [], "rhs_call_name": "_GetOutputLines", "annotation": ""}, "snippet": " output_lines = _GetOutputLines(args)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Return_L82_C2", "label": "return", "type": "return", "loc": [82, 82], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L64_C0", "vector": [13, 1, 0.8723, 0.0106, 1, 0.55, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return rev2 in output_lines"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L84_C0", "label": "NewestRevision", "type": "function", "loc": [84, 94], "level": 0, "parent": null, "vector": [2, 0, 0.9468, 0.117, 0, 0.66, 1.0, 256, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "NewestRevision", "arg_names": ["filename", "rev1", "rev2"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def NewestRevision(filename, rev1, rev2):\n '''\n Returns which of two revisions is closest to the head of the repository.\n If none of them is the ancestor of the other, then we return either one.\n\n @param rev1: the first revision\n @param rev2: the second revision\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Expr_L85_C2", "label": "expression", "type": "expression", "loc": [85, 91], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L84_C0", "vector": [8, 1, 0.9362, 0.0745, 1, 0.14, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Returns which of two revisions is closest to the head of the repository.\n If none of them is the ancestor of the other, then we return either one.\n\n @param rev1: the first revision\n @param rev2: the second revision\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:If_L92_C2", "label": "if", "type": "if", "loc": [92, 93], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L84_C0", "vector": [4, 1, 0.984, 0.0213, 1, 0.14, 0.5, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if DoesRevisionSuperceed(filename, rev1, rev2):\n return rev1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Return_L93_C4", "label": "return", "type": "return", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:If_L92_C2", "vector": [13, 2, 0.9894, 0.0106, 2, 0.15, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return rev1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1421:Return_L94_C2", "label": "return", "type": "return", "loc": [94, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L84_C0", "vector": [13, 1, 1.0, 0.0106, 1, 0.14, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return rev2"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Return_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Expr_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L39_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L39_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:If_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L39_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L39_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Expr_L54_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:If_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Expr_L65_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:If_L75_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:If_L75_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Return_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L79_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Assign_L80_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Return_L82_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L84_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L84_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:If_L92_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:If_L92_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Return_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1421:FunctionDef_L84_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1421:Return_L94_C2"}]
#!/usr/bin/python ''' Entry point for My Tracks i18n tool. @author: Rodrigo Damazio ''' import mytracks.files import mytracks.translate import mytracks.validate import sys def Usage(): print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0] print 'Commands are:' print ' cleanup' print ' translate' print ' validate' sys.exit(1) def Translate(languages): ''' Asks the user to interactively translate any missing or oudated strings from the files for the given languages. @param languages: the languages to translate ''' validator = mytracks.validate.Validator(languages) validator.Validate() missing = validator.missing_in_lang() outdated = validator.outdated_in_lang() for lang in languages: untranslated = missing[lang] + outdated[lang] if len(untranslated) == 0: continue translator = mytracks.translate.Translator(lang) translator.Translate(untranslated) def Validate(languages): ''' Computes and displays errors in the string files for the given languages. @param languages: the languages to compute for ''' validator = mytracks.validate.Validator(languages) validator.Validate() error_count = 0 if (validator.valid()): print 'All files OK' else: for lang, missing in validator.missing_in_master().iteritems(): print 'Missing in master, present in %s: %s:' % (lang, str(missing)) error_count = error_count + len(missing) for lang, missing in validator.missing_in_lang().iteritems(): print 'Missing in %s, present in master: %s:' % (lang, str(missing)) error_count = error_count + len(missing) for lang, outdated in validator.outdated_in_lang().iteritems(): print 'Outdated in %s: %s:' % (lang, str(outdated)) error_count = error_count + len(outdated) return error_count if __name__ == '__main__': argv = sys.argv argc = len(argv) if argc < 2: Usage() languages = mytracks.files.GetAllLanguageFiles() if argc == 3: langs = set(argv[2:]) if not langs.issubset(languages): raise 'Language(s) not found' # Filter just to the languages specified languages = dict((lang, lang_file) for lang, lang_file in languages.iteritems() if lang in langs or lang == 'en' ) cmd = argv[1] if cmd == 'translate': Translate(languages) elif cmd == 'validate': error_count = Validate(languages) else: Usage() error_count = 0 print '%d errors found.' % error_count
ajibawa-2023/Python-Code-Large/train/row_1422
58
96
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0521, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nEntry point for My Tracks i18n tool.\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Import_L8_C0", "label": "mytracks.files import mytracks.files", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0104, 0, 0.66, 0.125, 640, 0, 1, 0, 0, 640, 0, 0], "semantic": {"name": "mytracks.files", "arg_names": [], "import_names": ["mytracks.files"], "rhs_call_name": "", "annotation": ""}, "snippet": "import mytracks.files"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Import_L9_C0", "label": "mytracks.translate import mytracks.translate", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0938, 0.0104, 0, 0.66, 0.25, 802, 0, 1, 0, 0, 802, 0, 0], "semantic": {"name": "mytracks.translate", "arg_names": [], "import_names": ["mytracks.translate"], "rhs_call_name": "", "annotation": ""}, "snippet": "import mytracks.translate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Import_L10_C0", "label": "mytracks.validate import mytracks.validate", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.1042, 0.0104, 0, 0.66, 0.375, 355, 0, 1, 0, 0, 355, 0, 0], "semantic": {"name": "mytracks.validate", "arg_names": [], "import_names": ["mytracks.validate"], "rhs_call_name": "", "annotation": ""}, "snippet": "import mytracks.validate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Import_L11_C0", "label": "sys import sys", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.1146, 0.0104, 0, 0.66, 0.5, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L13_C0", "label": "Usage", "type": "function", "loc": [13, 19], "level": 0, "parent": null, "vector": [2, 0, 0.1667, 0.0729, 0, 0.66, 0.625, 208, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "Usage", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def Usage():\n print('Usage: %s <command> [<language> ...]\\n' % sys.argv[0])\n print('Commands are:')\n print(' cleanup')\n print(' translate')\n print(' validate')\n sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L14_C2", "label": "print()", "type": "expression", "loc": [14, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L13_C0", "vector": [8, 1, 0.1458, 0.0104, 1, 0.82, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Usage: %s <command> [<language> ...]\\n' % sys.argv[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L15_C2", "label": "print()", "type": "expression", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L13_C0", "vector": [8, 1, 0.1562, 0.0104, 1, 0.82, 0.2, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Commands are:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L16_C2", "label": "print()", "type": "expression", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L13_C0", "vector": [8, 1, 0.1667, 0.0104, 1, 0.82, 0.4, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(' cleanup')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L17_C2", "label": "print()", "type": "expression", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L13_C0", "vector": [8, 1, 0.1771, 0.0104, 1, 0.82, 0.6, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(' translate')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L18_C2", "label": "print()", "type": "expression", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L13_C0", "vector": [8, 1, 0.1875, 0.0104, 1, 0.82, 0.8, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(' validate')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L19_C2", "label": "exit()", "type": "expression", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L13_C0", "vector": [8, 1, 0.1979, 0.0104, 1, 0.82, 1.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L22_C0", "label": "Translate", "type": "function", "loc": [22, 41], "level": 0, "parent": null, "vector": [2, 0, 0.3281, 0.2083, 0, 0.66, 0.75, 749, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "Translate", "arg_names": ["languages"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def Translate(languages):\n '''\n Asks the user to interactively translate any missing or oudated strings from\n the files for the given languages.\n\n @param languages: the languages to translate\n '''\n validator = mytracks.validate.Validator(languages)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L23_C2", "label": "expression", "type": "expression", "loc": [23, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L22_C0", "vector": [8, 1, 0.2656, 0.0625, 1, 0.23, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Asks the user to interactively translate any missing or oudated strings from\n the files for the given languages.\n\n @param languages: the languages to translate\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L29_C2", "label": "validator = Validator()", "type": "assigned_variable", "loc": [29, 29], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L22_C0", "vector": [14, 1, 0.3021, 0.0104, 1, 0.23, 0.2, 145, 3, 1, 0, 0, 957, 10, 1], "semantic": {"name": "validator", "arg_names": [], "import_names": [], "rhs_call_name": "Validator", "annotation": ""}, "snippet": " validator = mytracks.validate.Validator(languages)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L30_C2", "label": "Validate()", "type": "expression", "loc": [30, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L22_C0", "vector": [8, 1, 0.3125, 0.0104, 1, 0.23, 0.4, 60, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "Validate", "arg_names": [], "import_names": [], "rhs_call_name": "Validate", "annotation": ""}, "snippet": " validator.Validate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L31_C2", "label": "missing = missing_in_lang()", "type": "assigned_variable", "loc": [31, 31], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L22_C0", "vector": [14, 1, 0.3229, 0.0104, 1, 0.23, 0.6, 249, 3, 0, 0, 0, 449, 10, 1], "semantic": {"name": "missing", "arg_names": [], "import_names": [], "rhs_call_name": "missing_in_lang", "annotation": ""}, "snippet": " missing = validator.missing_in_lang()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L32_C2", "label": "outdated = outdated_in_lang()", "type": "assigned_variable", "loc": [32, 32], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L22_C0", "vector": [14, 1, 0.3333, 0.0104, 1, 0.23, 0.8, 362, 3, 0, 0, 0, 862, 10, 1], "semantic": {"name": "outdated", "arg_names": [], "import_names": [], "rhs_call_name": "outdated_in_lang", "annotation": ""}, "snippet": " outdated = validator.outdated_in_lang()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L34_C2", "label": "for lang", "type": "for", "loc": [34, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L22_C0", "vector": [6, 1, 0.3906, 0.0833, 1, 0.23, 1.0, 312, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "lang", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang in languages:\n untranslated = missing[lang] + outdated[lang]\n \n if len(untranslated) == 0:\n continue\n\n translator = mytracks.translate.Translator(lang)\n translator.Translate(untranslated)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L35_C4", "label": "untranslated =", "type": "assigned_variable", "loc": [35, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L34_C2", "vector": [14, 2, 0.3646, 0.0104, 2, 0.21, 0.0, 493, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "untranslated", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " untranslated = missing[lang] + outdated[lang]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L37_C4", "label": "if", "type": "if", "loc": [37, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L34_C2", "vector": [4, 2, 0.3906, 0.0208, 2, 0.21, 0.3333, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(untranslated) == 0:\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L40_C4", "label": "translator = Translator()", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L34_C2", "vector": [14, 2, 0.4167, 0.0104, 2, 0.21, 0.6667, 380, 3, 1, 0, 0, 229, 10, 1], "semantic": {"name": "translator", "arg_names": [], "import_names": [], "rhs_call_name": "Translator", "annotation": ""}, "snippet": " translator = mytracks.translate.Translator(lang)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L41_C4", "label": "Translate()", "type": "expression", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L34_C2", "vector": [8, 2, 0.4271, 0.0104, 2, 0.21, 1.0, 749, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "Translate", "arg_names": [], "import_names": [], "rhs_call_name": "Translate", "annotation": ""}, "snippet": " translator.Translate(untranslated)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L44_C0", "label": "Validate", "type": "function", "loc": [44, 67], "level": 0, "parent": null, "vector": [2, 0, 0.5781, 0.25, 0, 0.66, 0.875, 60, 0, 1, 1, 0, 0, 0, 19], "semantic": {"name": "Validate", "arg_names": ["languages"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def Validate(languages):\n '''\n Computes and displays errors in the string files for the given languages.\n\n @param languages: the languages to compute for\n '''\n validator = mytracks.validate.Validator(languages)\n validator.Validate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L45_C2", "label": "expression", "type": "expression", "loc": [45, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L44_C0", "vector": [8, 1, 0.4896, 0.0521, 1, 0.01, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Computes and displays errors in the string files for the given languages.\n\n @param languages: the languages to compute for\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L50_C2", "label": "validator = Validator()", "type": "assigned_variable", "loc": [50, 50], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L44_C0", "vector": [14, 1, 0.5208, 0.0104, 1, 0.01, 0.2, 145, 3, 1, 0, 0, 957, 10, 1], "semantic": {"name": "validator", "arg_names": [], "import_names": [], "rhs_call_name": "Validator", "annotation": ""}, "snippet": " validator = mytracks.validate.Validator(languages)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L51_C2", "label": "Validate()", "type": "expression", "loc": [51, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L44_C0", "vector": [8, 1, 0.5312, 0.0104, 1, 0.01, 0.4, 60, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "Validate", "arg_names": [], "import_names": [], "rhs_call_name": "Validate", "annotation": ""}, "snippet": " validator.Validate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L53_C2", "label": "error_count =", "type": "assigned_variable", "loc": [53, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L44_C0", "vector": [14, 1, 0.5521, 0.0104, 1, 0.01, 0.6, 59, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L54_C2", "label": "if", "type": "if", "loc": [54, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L44_C0", "vector": [4, 1, 0.6198, 0.125, 1, 0.01, 0.8, 0, 3, 0, 0, 0, 0, 0, 17], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (validator.valid()):\n print('All files OK')\n else:\n for lang, missing in validator.missing_in_master().iteritems():\n print('Missing in master, present in %s: %s:' % (lang, str(missing)))\n error_count = error_count + len(missing)\n for lang, missing in validator.missing_in_lang().iteritems():\n print('Missing in %s, present in master: %s:' % (lang, str(missing)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L55_C4", "label": "print()", "type": "expression", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L54_C2", "vector": [8, 2, 0.5729, 0.0104, 2, 0.06, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('All files OK')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L57_C4", "label": "for lang, missing", "type": "for", "loc": [57, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L54_C2", "vector": [6, 2, 0.6042, 0.0312, 2, 0.06, 0.3333, 399, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "lang, missing", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, missing in validator.missing_in_master().iteritems():\n print('Missing in master, present in %s: %s:' % (lang, str(missing)))\n error_count = error_count + len(missing)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L58_C6", "label": "print()", "type": "expression", "loc": [58, 58], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L57_C4", "vector": [8, 3, 0.6042, 0.0104, 3, 0.44, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Missing in master, present in %s: %s:' % (lang, str(missing)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L59_C6", "label": "error_count =", "type": "assigned_variable", "loc": [59, 59], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L57_C4", "vector": [14, 3, 0.6146, 0.0104, 3, 0.44, 1.0, 59, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_count = error_count + len(missing)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L60_C4", "label": "for lang, missing", "type": "for", "loc": [60, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L54_C2", "vector": [6, 2, 0.6354, 0.0312, 2, 0.06, 0.6667, 399, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "lang, missing", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, missing in validator.missing_in_lang().iteritems():\n print('Missing in %s, present in master: %s:' % (lang, str(missing)))\n error_count = error_count + len(missing)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L61_C6", "label": "print()", "type": "expression", "loc": [61, 61], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L60_C4", "vector": [8, 3, 0.6354, 0.0104, 3, 0.41, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Missing in %s, present in master: %s:' % (lang, str(missing)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L62_C6", "label": "error_count =", "type": "assigned_variable", "loc": [62, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L60_C4", "vector": [14, 3, 0.6458, 0.0104, 3, 0.41, 1.0, 59, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_count = error_count + len(missing)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L63_C4", "label": "for lang, outdated", "type": "for", "loc": [63, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L54_C2", "vector": [6, 2, 0.6667, 0.0312, 2, 0.06, 1.0, 928, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "lang, outdated", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, outdated in validator.outdated_in_lang().iteritems():\n print('Outdated in %s: %s:' % (lang, str(outdated)))\n error_count = error_count + len(outdated)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L64_C6", "label": "print()", "type": "expression", "loc": [64, 64], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L63_C4", "vector": [8, 3, 0.6667, 0.0104, 3, 0.52, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Outdated in %s: %s:' % (lang, str(outdated)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L65_C6", "label": "error_count =", "type": "assigned_variable", "loc": [65, 65], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L63_C4", "vector": [14, 3, 0.6771, 0.0104, 3, 0.52, 1.0, 59, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_count = error_count + len(outdated)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Return_L67_C2", "label": "return", "type": "return", "loc": [67, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L44_C0", "vector": [13, 1, 0.6979, 0.0104, 1, 0.01, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return error_count"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "label": "if", "type": "if", "loc": [70, 96], "level": 0, "parent": null, "vector": [4, 0, 0.8646, 0.2812, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n argv = sys.argv\n argc = len(argv)\n if argc < 2:\n Usage()\n\n languages = mytracks.files.GetAllLanguageFiles()\n if argc == 3:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L71_C2", "label": "argv =", "type": "assigned_variable", "loc": [71, 71], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "vector": [14, 1, 0.7396, 0.0104, 1, 0.43, 0.0, 612, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "argv", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " argv = sys.argv"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L72_C2", "label": "argc = len()", "type": "assigned_variable", "loc": [72, 72], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "vector": [14, 1, 0.75, 0.0104, 1, 0.43, 0.1429, 123, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "argc", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " argc = len(argv)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L73_C2", "label": "if", "type": "if", "loc": [73, 74], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "vector": [4, 1, 0.7656, 0.0208, 1, 0.43, 0.2857, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if argc < 2:\n Usage()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L74_C4", "label": "Usage()", "type": "expression", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L73_C2", "vector": [8, 2, 0.7708, 0.0104, 2, 0.48, 0.0, 208, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "Usage", "arg_names": [], "import_names": [], "rhs_call_name": "Usage", "annotation": ""}, "snippet": " Usage()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L76_C2", "label": "languages = GetAllLanguageFiles()", "type": "assigned_variable", "loc": [76, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "vector": [14, 1, 0.7917, 0.0104, 1, 0.43, 0.4286, 126, 3, 0, 0, 0, 438, 10, 1], "semantic": {"name": "languages", "arg_names": [], "import_names": [], "rhs_call_name": "GetAllLanguageFiles", "annotation": ""}, "snippet": " languages = mytracks.files.GetAllLanguageFiles()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L77_C2", "label": "if", "type": "if", "loc": [77, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "vector": [4, 1, 0.8438, 0.0938, 1, 0.43, 0.5714, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if argc == 3:\n langs = set(argv[2:])\n if not langs.issubset(languages):\n raise 'Language(s) not found'\n\n # Filter just to the languages specified\n languages = dict((lang, lang_file)\n for lang, lang_file in languages.iteritems()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L78_C4", "label": "langs = set()", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L77_C2", "vector": [14, 2, 0.8125, 0.0104, 2, 0.75, 0.0, 986, 3, 1, 0, 0, 21, 10, 1], "semantic": {"name": "langs", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " langs = set(argv[2:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L79_C4", "label": "if", "type": "if", "loc": [79, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L77_C2", "vector": [4, 2, 0.8281, 0.0208, 2, 0.75, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not langs.issubset(languages):\n raise 'Language(s) not found'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L83_C4", "label": "languages = dict()", "type": "assigned_variable", "loc": [83, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L77_C2", "vector": [14, 2, 0.875, 0.0312, 2, 0.75, 1.0, 126, 3, 1, 0, 0, 827, 10, 2], "semantic": {"name": "languages", "arg_names": [], "import_names": [], "rhs_call_name": "dict", "annotation": ""}, "snippet": " languages = dict((lang, lang_file)\n for lang, lang_file in languages.iteritems()\n if lang in langs or lang == 'en' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L87_C2", "label": "cmd =", "type": "assigned_variable", "loc": [87, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "vector": [14, 1, 0.9062, 0.0104, 1, 0.43, 0.7143, 604, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cmd", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cmd = argv[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L88_C2", "label": "if", "type": "if", "loc": [88, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "vector": [4, 1, 0.9479, 0.0729, 1, 0.43, 0.8571, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if cmd == 'translate':\n Translate(languages)\n elif cmd == 'validate':\n error_count = Validate(languages)\n else:\n Usage()\n error_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L89_C4", "label": "Translate()", "type": "expression", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L88_C2", "vector": [8, 2, 0.9271, 0.0104, 2, 0.54, 0.0, 749, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "Translate", "arg_names": [], "import_names": [], "rhs_call_name": "Translate", "annotation": ""}, "snippet": " Translate(languages)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L90_C2", "label": "if", "type": "if", "loc": [90, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L88_C2", "vector": [4, 2, 0.9583, 0.0521, 2, 0.54, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif cmd == 'validate':\n error_count = Validate(languages)\n else:\n Usage()\n error_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L91_C4", "label": "error_count = Validate()", "type": "assigned_variable", "loc": [91, 91], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L90_C2", "vector": [14, 3, 0.9479, 0.0104, 3, 0.31, 0.0, 59, 3, 1, 0, 0, 60, 10, 1], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "Validate", "annotation": ""}, "snippet": " error_count = Validate(languages)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L93_C4", "label": "Usage()", "type": "expression", "loc": [93, 93], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L90_C2", "vector": [8, 3, 0.9688, 0.0104, 3, 0.31, 0.5, 208, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "Usage", "arg_names": [], "import_names": [], "rhs_call_name": "Usage", "annotation": ""}, "snippet": " Usage()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L94_C4", "label": "error_count =", "type": "assigned_variable", "loc": [94, 94], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L90_C2", "vector": [14, 3, 0.9792, 0.0104, 3, 0.31, 1.0, 59, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L96_C2", "label": "print()", "type": "expression", "loc": [96, 96], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "vector": [8, 1, 1.0, 0.0104, 1, 0.43, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('%d errors found.' % error_count)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L34_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L34_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L34_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L34_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L45_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L54_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L54_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L54_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L58_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L59_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L54_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L61_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L62_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L54_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L64_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:For_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L65_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Return_L67_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L72_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L73_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L73_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L76_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L77_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L78_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L79_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L87_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L88_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L88_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L88_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L90_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L90_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L91_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L90_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L90_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Assign_L94_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1422:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1422:Expr_L96_C2"}]
''' Module which prompts the user for translations and saves them. TODO: implement @author: Rodrigo Damazio ''' class Translator(object): ''' classdocs ''' def __init__(self, language): ''' Constructor ''' self._language = language def Translate(self, string_names): print string_names
ajibawa-2023/Python-Code-Large/train/row_1423
8
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1423:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1905, 0.3333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nModule which prompts the user for translations and saves them.\n\nTODO: implement\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1423:ClassDef_L9_C0", "label": "Translator", "type": "class", "loc": [9, 21], "level": 0, "parent": null, "vector": [3, 0, 0.7143, 0.619, 0, 0.66, 1.0, 229, 0, 2, 0, 0, 186, 0, 1], "semantic": {"name": "Translator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Translator(object):\n '''\n classdocs\n '''\n\n def __init__(self, language):\n '''\n Constructor"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1423:Expr_L10_C2", "label": "expression", "type": "expression", "loc": [10, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1423:ClassDef_L9_C0", "vector": [8, 1, 0.5238, 0.1429, 1, 0.61, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n classdocs\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1423:FunctionDef_L14_C2", "label": "__init__", "type": "function", "loc": [14, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1423:ClassDef_L9_C0", "vector": [2, 1, 0.7619, 0.2381, 1, 0.61, 0.5, 555, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "language"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, language):\n '''\n Constructor\n '''\n self._language = language"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1423:Expr_L15_C4", "label": "expression", "type": "expression", "loc": [15, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1423:FunctionDef_L14_C2", "vector": [8, 2, 0.7619, 0.1429, 2, 0.76, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Constructor\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1423:Assign_L18_C4", "label": "self._language =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1423:FunctionDef_L14_C2", "vector": [14, 2, 0.8571, 0.0476, 2, 0.76, 1.0, 494, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._language", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._language = language"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1423:FunctionDef_L20_C2", "label": "Translate", "type": "function", "loc": [20, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1423:ClassDef_L9_C0", "vector": [2, 1, 0.9762, 0.0952, 1, 0.61, 1.0, 749, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "Translate", "arg_names": ["self", "string_names"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Translate(self, string_names):\n print(string_names)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1423:Expr_L21_C4", "label": "print()", "type": "expression", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1423:FunctionDef_L20_C2", "vector": [8, 2, 1.0, 0.0476, 2, 0.99, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(string_names)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1423:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1423:Expr_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1423:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1423:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1423:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1423:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1423:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1423:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1423:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1423:FunctionDef_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1423:FunctionDef_L20_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1423:Expr_L21_C4"}]
''' Module which compares languague files to the master file and detects issues. @author: Rodrigo Damazio ''' import os from mytracks.parser import StringsParser import mytracks.history class Validator(object): def __init__(self, languages): ''' Builds a strings file validator. Params: @param languages: a dictionary mapping each language to its corresponding directory ''' self._langs = {} self._master = None self._language_paths = languages parser = StringsParser() for lang, lang_dir in languages.iteritems(): filename = os.path.join(lang_dir, 'strings.xml') parsed_file = parser.Parse(filename) mytracks.history.FillMercurialRevisions(filename, parsed_file) if lang == 'en': self._master = parsed_file else: self._langs[lang] = parsed_file self._Reset() def Validate(self): ''' Computes whether all the data in the files for the given languages is valid. ''' self._Reset() self._ValidateMissingKeys() self._ValidateOutdatedKeys() def valid(self): return (len(self._missing_in_master) == 0 and len(self._missing_in_lang) == 0 and len(self._outdated_in_lang) == 0) def missing_in_master(self): return self._missing_in_master def missing_in_lang(self): return self._missing_in_lang def outdated_in_lang(self): return self._outdated_in_lang def _Reset(self): # These are maps from language to string name list self._missing_in_master = {} self._missing_in_lang = {} self._outdated_in_lang = {} def _ValidateMissingKeys(self): ''' Computes whether there are missing keys on either side. ''' master_keys = frozenset(self._master.iterkeys()) for lang, file in self._langs.iteritems(): keys = frozenset(file.iterkeys()) missing_in_master = keys - master_keys missing_in_lang = master_keys - keys if len(missing_in_master) > 0: self._missing_in_master[lang] = missing_in_master if len(missing_in_lang) > 0: self._missing_in_lang[lang] = missing_in_lang def _ValidateOutdatedKeys(self): ''' Computers whether any of the language keys are outdated with relation to the master keys. ''' for lang, file in self._langs.iteritems(): outdated = [] for key, str in file.iteritems(): # Get all revisions that touched master and language files for this # string. master_str = self._master[key] master_revs = master_str['revs'] lang_revs = str['revs'] if not master_revs or not lang_revs: print 'WARNING: No revision for %s in %s' % (key, lang) continue master_file = os.path.join(self._language_paths['en'], 'strings.xml') lang_file = os.path.join(self._language_paths[lang], 'strings.xml') # Assume that the repository has a single head (TODO: check that), # and as such there is always one revision which superceeds all others. master_rev = reduce( lambda r1, r2: mytracks.history.NewestRevision(master_file, r1, r2), master_revs) lang_rev = reduce( lambda r1, r2: mytracks.history.NewestRevision(lang_file, r1, r2), lang_revs) # If the master version is newer than the lang version if mytracks.history.DoesRevisionSuperceed(lang_file, master_rev, lang_rev): outdated.append(key) if len(outdated) > 0: self._outdated_in_lang[lang] = outdated
ajibawa-2023/Python-Code-Large/train/row_1424
65
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0304, 0.0522, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nModule which compares languague files to the master file and detects\nissues.\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Import_L8_C0", "label": "os import os", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0696, 0.0087, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:ImportFrom_L9_C0", "label": "from mytracks.parser import StringsParser", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0783, 0.0087, 0, 0.66, 0.5, 161, 0, 1, 0, 0, 161, 0, 0], "semantic": {"name": "mytracks.parser", "arg_names": [], "import_names": ["StringsParser"], "rhs_call_name": "", "annotation": ""}, "snippet": "from mytracks.parser import StringsParser"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Import_L10_C0", "label": "mytracks.history import mytracks.history", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.087, 0.0087, 0, 0.66, 0.75, 247, 0, 1, 0, 0, 247, 0, 0], "semantic": {"name": "mytracks.history", "arg_names": [], "import_names": ["mytracks.history"], "rhs_call_name": "", "annotation": ""}, "snippet": "import mytracks.history "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "label": "Validator", "type": "class", "loc": [12, 115], "level": 0, "parent": null, "vector": [3, 0, 0.5522, 0.9043, 0, 0.66, 1.0, 957, 0, 9, 0, 0, 186, 0, 31], "semantic": {"name": "Validator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Validator(object):\n\n def __init__(self, languages):\n '''\n Builds a strings file validator.\n \n Params:\n @param languages: a dictionary mapping each language to its corresponding directory"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L14_C2", "label": "__init__", "type": "function", "loc": [14, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "vector": [2, 1, 0.2174, 0.2, 1, 0.08, 0.0, 555, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "__init__", "arg_names": ["self", "languages"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, languages):\n '''\n Builds a strings file validator.\n \n Params:\n @param languages: a dictionary mapping each language to its corresponding directory\n '''\n self._langs = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L15_C4", "label": "expression", "type": "expression", "loc": [15, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L14_C2", "vector": [8, 2, 0.1522, 0.0522, 2, 0.93, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Builds a strings file validator.\n \n Params:\n @param languages: a dictionary mapping each language to its corresponding directory\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L21_C4", "label": "self._langs =", "type": "assigned_variable", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L14_C2", "vector": [14, 2, 0.1826, 0.0087, 2, 0.93, 0.1667, 591, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._langs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._langs = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L22_C4", "label": "self._master =", "type": "assigned_variable", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L14_C2", "vector": [14, 2, 0.1913, 0.0087, 2, 0.93, 0.3333, 265, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._master", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._master = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L23_C4", "label": "self._language_paths =", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L14_C2", "vector": [14, 2, 0.2, 0.0087, 2, 0.93, 0.5, 356, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._language_paths", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._language_paths = languages"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L25_C4", "label": "parser = StringsParser()", "type": "assigned_variable", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L14_C2", "vector": [14, 2, 0.2174, 0.0087, 2, 0.93, 0.6667, 968, 3, 0, 0, 0, 282, 10, 1], "semantic": {"name": "parser", "arg_names": [], "import_names": [], "rhs_call_name": "StringsParser", "annotation": ""}, "snippet": " parser = StringsParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L26_C4", "label": "for lang, lang_dir", "type": "for", "loc": [26, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L14_C2", "vector": [6, 2, 0.2609, 0.0783, 2, 0.93, 0.8333, 114, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "lang, lang_dir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, lang_dir in languages.iteritems():\n filename = os.path.join(lang_dir, 'strings.xml')\n parsed_file = parser.Parse(filename)\n mytracks.history.FillMercurialRevisions(filename, parsed_file)\n\n if lang == 'en':\n self._master = parsed_file\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L27_C6", "label": "filename = join()", "type": "assigned_variable", "loc": [27, 27], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L26_C4", "vector": [14, 3, 0.2348, 0.0087, 3, 0.14, 0.0, 275, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "filename", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " filename = os.path.join(lang_dir, 'strings.xml')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L28_C6", "label": "parsed_file = Parse()", "type": "assigned_variable", "loc": [28, 28], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L26_C4", "vector": [14, 3, 0.2435, 0.0087, 3, 0.14, 0.3333, 76, 3, 1, 0, 0, 291, 10, 1], "semantic": {"name": "parsed_file", "arg_names": [], "import_names": [], "rhs_call_name": "Parse", "annotation": ""}, "snippet": " parsed_file = parser.Parse(filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L29_C6", "label": "FillMercurialRevisions()", "type": "expression", "loc": [29, 29], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L26_C4", "vector": [8, 3, 0.2522, 0.0087, 3, 0.14, 0.6667, 942, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "FillMercurialRevisions", "arg_names": [], "import_names": [], "rhs_call_name": "FillMercurialRevisions", "annotation": ""}, "snippet": " mytracks.history.FillMercurialRevisions(filename, parsed_file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L31_C6", "label": "if", "type": "if", "loc": [31, 34], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L26_C4", "vector": [4, 3, 0.2826, 0.0348, 3, 0.14, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if lang == 'en':\n self._master = parsed_file\n else:\n self._langs[lang] = parsed_file"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L32_C8", "label": "self._master =", "type": "assigned_variable", "loc": [32, 32], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L31_C6", "vector": [14, 4, 0.2783, 0.0087, 4, 0.54, 0.0, 265, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._master", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._master = parsed_file"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L34_C8", "label": "assign", "type": "assigned_variable", "loc": [34, 34], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L31_C6", "vector": [14, 4, 0.2957, 0.0087, 4, 0.54, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._langs[lang] = parsed_file"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L36_C4", "label": "_Reset()", "type": "expression", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L14_C2", "vector": [8, 2, 0.313, 0.0087, 2, 0.93, 1.0, 412, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_Reset", "arg_names": [], "import_names": [], "rhs_call_name": "_Reset", "annotation": ""}, "snippet": " self._Reset()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L38_C2", "label": "Validate", "type": "function", "loc": [38, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "vector": [2, 1, 0.3565, 0.0609, 1, 0.08, 0.125, 60, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "Validate", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Validate(self):\n '''\n Computes whether all the data in the files for the given languages is valid.\n '''\n self._Reset()\n self._ValidateMissingKeys()\n self._ValidateOutdatedKeys()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L39_C4", "label": "expression", "type": "expression", "loc": [39, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L38_C2", "vector": [8, 2, 0.3478, 0.0261, 2, 0.93, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Computes whether all the data in the files for the given languages is valid.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L42_C4", "label": "_Reset()", "type": "expression", "loc": [42, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L38_C2", "vector": [8, 2, 0.3652, 0.0087, 2, 0.93, 0.3333, 412, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_Reset", "arg_names": [], "import_names": [], "rhs_call_name": "_Reset", "annotation": ""}, "snippet": " self._Reset()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L43_C4", "label": "_ValidateMissingKeys()", "type": "expression", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L38_C2", "vector": [8, 2, 0.3739, 0.0087, 2, 0.93, 0.6667, 427, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_ValidateMissingKeys", "arg_names": [], "import_names": [], "rhs_call_name": "_ValidateMissingKeys", "annotation": ""}, "snippet": " self._ValidateMissingKeys()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L44_C4", "label": "_ValidateOutdatedKeys()", "type": "expression", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L38_C2", "vector": [8, 2, 0.3826, 0.0087, 2, 0.93, 1.0, 676, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_ValidateOutdatedKeys", "arg_names": [], "import_names": [], "rhs_call_name": "_ValidateOutdatedKeys", "annotation": ""}, "snippet": " self._ValidateOutdatedKeys()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L46_C2", "label": "valid", "type": "function", "loc": [46, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "vector": [2, 1, 0.413, 0.0348, 1, 0.08, 0.25, 552, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "valid", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def valid(self):\n return (len(self._missing_in_master) == 0 and\n len(self._missing_in_lang) == 0 and\n len(self._outdated_in_lang) == 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Return_L47_C4", "label": "return", "type": "return", "loc": [47, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L46_C2", "vector": [13, 2, 0.4174, 0.0261, 2, 0.05, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return (len(self._missing_in_master) == 0 and\n len(self._missing_in_lang) == 0 and\n len(self._outdated_in_lang) == 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L51_C2", "label": "missing_in_master", "type": "function", "loc": [51, 52], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "vector": [2, 1, 0.4478, 0.0174, 1, 0.08, 0.375, 277, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "missing_in_master", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def missing_in_master(self):\n return self._missing_in_master"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Return_L52_C4", "label": "return", "type": "return", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L51_C2", "vector": [13, 2, 0.4522, 0.0087, 2, 0.39, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._missing_in_master"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L54_C2", "label": "missing_in_lang", "type": "function", "loc": [54, 55], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "vector": [2, 1, 0.4739, 0.0174, 1, 0.08, 0.5, 449, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "missing_in_lang", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def missing_in_lang(self):\n return self._missing_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Return_L55_C4", "label": "return", "type": "return", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L54_C2", "vector": [13, 2, 0.4783, 0.0087, 2, 0.33, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._missing_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L57_C2", "label": "outdated_in_lang", "type": "function", "loc": [57, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "vector": [2, 1, 0.5, 0.0174, 1, 0.08, 0.625, 862, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "outdated_in_lang", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def outdated_in_lang(self):\n return self._outdated_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Return_L58_C4", "label": "return", "type": "return", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L57_C2", "vector": [13, 2, 0.5043, 0.0087, 2, 0.04, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._outdated_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L60_C2", "label": "_Reset", "type": "function", "loc": [60, 64], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "vector": [2, 1, 0.5391, 0.0435, 1, 0.08, 0.75, 412, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "_Reset", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _Reset(self):\n # These are maps from language to string name list\n self._missing_in_master = {}\n self._missing_in_lang = {}\n self._outdated_in_lang = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L62_C4", "label": "self._missing_in_master =", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L60_C2", "vector": [14, 2, 0.5391, 0.0087, 2, 0.27, 0.0, 252, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._missing_in_master", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._missing_in_master = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L63_C4", "label": "self._missing_in_lang =", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L60_C2", "vector": [14, 2, 0.5478, 0.0087, 2, 0.27, 0.5, 473, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._missing_in_lang", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._missing_in_lang = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L64_C4", "label": "self._outdated_in_lang =", "type": "assigned_variable", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L60_C2", "vector": [14, 2, 0.5565, 0.0087, 2, 0.27, 1.0, 575, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._outdated_in_lang", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._outdated_in_lang = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L66_C2", "label": "_ValidateMissingKeys", "type": "function", "loc": [66, 79], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "vector": [2, 1, 0.6304, 0.1217, 1, 0.08, 0.875, 427, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "_ValidateMissingKeys", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _ValidateMissingKeys(self):\n '''\n Computes whether there are missing keys on either side.\n '''\n master_keys = frozenset(self._master.iterkeys())\n for lang, file in self._langs.iteritems():\n keys = frozenset(file.iterkeys())\n missing_in_master = keys - master_keys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L67_C4", "label": "expression", "type": "expression", "loc": [67, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L66_C2", "vector": [8, 2, 0.5913, 0.0261, 2, 0.4, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Computes whether there are missing keys on either side.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L70_C4", "label": "master_keys = frozenset()", "type": "assigned_variable", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L66_C2", "vector": [14, 2, 0.6087, 0.0087, 2, 0.4, 0.5, 468, 3, 1, 0, 0, 80, 10, 2], "semantic": {"name": "master_keys", "arg_names": [], "import_names": [], "rhs_call_name": "frozenset", "annotation": ""}, "snippet": " master_keys = frozenset(self._master.iterkeys())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L71_C4", "label": "for lang, file", "type": "for", "loc": [71, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L66_C2", "vector": [6, 2, 0.6522, 0.0783, 2, 0.4, 1.0, 275, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "lang, file", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, file in self._langs.iteritems():\n keys = frozenset(file.iterkeys())\n missing_in_master = keys - master_keys\n missing_in_lang = master_keys - keys\n\n if len(missing_in_master) > 0:\n self._missing_in_master[lang] = missing_in_master\n if len(missing_in_lang) > 0:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L72_C6", "label": "keys = frozenset()", "type": "assigned_variable", "loc": [72, 72], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L71_C4", "vector": [14, 3, 0.6261, 0.0087, 3, 0.3, 0.0, 204, 3, 1, 0, 0, 80, 10, 2], "semantic": {"name": "keys", "arg_names": [], "import_names": [], "rhs_call_name": "frozenset", "annotation": ""}, "snippet": " keys = frozenset(file.iterkeys())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L73_C6", "label": "missing_in_master =", "type": "assigned_variable", "loc": [73, 73], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L71_C4", "vector": [14, 3, 0.6348, 0.0087, 3, 0.3, 0.25, 277, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "missing_in_master", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " missing_in_master = keys - master_keys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L74_C6", "label": "missing_in_lang =", "type": "assigned_variable", "loc": [74, 74], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L71_C4", "vector": [14, 3, 0.6435, 0.0087, 3, 0.3, 0.5, 449, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "missing_in_lang", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " missing_in_lang = master_keys - keys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L76_C6", "label": "if", "type": "if", "loc": [76, 77], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L71_C4", "vector": [4, 3, 0.6652, 0.0174, 3, 0.3, 0.75, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(missing_in_master) > 0:\n self._missing_in_master[lang] = missing_in_master"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L77_C8", "label": "assign", "type": "assigned_variable", "loc": [77, 77], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L76_C6", "vector": [14, 4, 0.6696, 0.0087, 4, 0.57, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._missing_in_master[lang] = missing_in_master"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L78_C6", "label": "if", "type": "if", "loc": [78, 79], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L71_C4", "vector": [4, 3, 0.6826, 0.0174, 3, 0.3, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(missing_in_lang) > 0:\n self._missing_in_lang[lang] = missing_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L79_C8", "label": "assign", "type": "assigned_variable", "loc": [79, 79], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L78_C6", "vector": [14, 4, 0.687, 0.0087, 4, 0.72, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._missing_in_lang[lang] = missing_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L81_C2", "label": "_ValidateOutdatedKeys", "type": "function", "loc": [81, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "vector": [2, 1, 0.8522, 0.3043, 1, 0.08, 1.0, 676, 0, 1, 0, 0, 0, 0, 12], "semantic": {"name": "_ValidateOutdatedKeys", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _ValidateOutdatedKeys(self):\n '''\n Computers whether any of the language keys are outdated with relation to the\n master keys.\n '''\n for lang, file in self._langs.iteritems():\n outdated = []\n for key, str in file.iteritems():"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L82_C4", "label": "expression", "type": "expression", "loc": [82, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L81_C2", "vector": [8, 2, 0.7261, 0.0348, 2, 0.72, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Computers whether any of the language keys are outdated with relation to the\n master keys.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L86_C4", "label": "for lang, file", "type": "for", "loc": [86, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L81_C2", "vector": [6, 2, 0.8739, 0.2609, 2, 0.72, 1.0, 275, 3, 0, 0, 0, 0, 0, 12], "semantic": {"name": "lang, file", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, file in self._langs.iteritems():\n outdated = []\n for key, str in file.iteritems():\n # Get all revisions that touched master and language files for this\n # string.\n master_str = self._master[key]\n master_revs = master_str['revs']\n lang_revs = str['revs']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L87_C6", "label": "outdated =", "type": "assigned_variable", "loc": [87, 87], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L86_C4", "vector": [14, 3, 0.7565, 0.0087, 3, 0.64, 0.0, 362, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "outdated", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " outdated = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "label": "for key, str", "type": "for", "loc": [88, 112], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L86_C4", "vector": [6, 3, 0.8696, 0.2174, 3, 0.64, 0.5, 83, 3, 0, 0, 0, 0, 0, 10], "semantic": {"name": "key, str", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for key, str in file.iteritems():\n # Get all revisions that touched master and language files for this\n # string.\n master_str = self._master[key]\n master_revs = master_str['revs']\n lang_revs = str['revs']\n if not master_revs or not lang_revs:\n print('WARNING: No revision for %s in %s' % (key, lang))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L91_C8", "label": "master_str =", "type": "assigned_variable", "loc": [91, 91], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "vector": [14, 4, 0.7913, 0.0087, 4, 0.18, 0.0, 440, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "master_str", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " master_str = self._master[key]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L92_C8", "label": "master_revs =", "type": "assigned_variable", "loc": [92, 92], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "vector": [14, 4, 0.8, 0.0087, 4, 0.18, 0.125, 616, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "master_revs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " master_revs = master_str['revs']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L93_C8", "label": "lang_revs =", "type": "assigned_variable", "loc": [93, 93], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "vector": [14, 4, 0.8087, 0.0087, 4, 0.18, 0.25, 522, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "lang_revs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " lang_revs = str['revs']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L94_C8", "label": "if", "type": "if", "loc": [94, 96], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "vector": [4, 4, 0.8261, 0.0261, 4, 0.18, 0.375, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not master_revs or not lang_revs:\n print('WARNING: No revision for %s in %s' % (key, lang))\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L95_C10", "label": "print()", "type": "expression", "loc": [95, 95], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L94_C8", "vector": [8, 5, 0.8261, 0.0087, 5, 0.35, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('WARNING: No revision for %s in %s' % (key, lang))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L98_C8", "label": "master_file = join()", "type": "assigned_variable", "loc": [98, 98], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "vector": [14, 4, 0.8522, 0.0087, 4, 0.18, 0.5, 377, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "master_file", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " master_file = os.path.join(self._language_paths['en'], 'strings.xml')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L99_C8", "label": "lang_file = join()", "type": "assigned_variable", "loc": [99, 99], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "vector": [14, 4, 0.8609, 0.0087, 4, 0.18, 0.625, 906, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "lang_file", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " lang_file = os.path.join(self._language_paths[lang], 'strings.xml')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L103_C8", "label": "master_rev = reduce()", "type": "assigned_variable", "loc": [103, 105], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "vector": [14, 4, 0.9043, 0.0261, 4, 0.18, 0.75, 609, 3, 2, 0, 0, 622, 10, 2], "semantic": {"name": "master_rev", "arg_names": [], "import_names": [], "rhs_call_name": "reduce", "annotation": ""}, "snippet": " master_rev = reduce(\n lambda r1, r2: mytracks.history.NewestRevision(master_file, r1, r2),\n master_revs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L106_C8", "label": "lang_rev = reduce()", "type": "assigned_variable", "loc": [106, 108], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "vector": [14, 4, 0.9304, 0.0261, 4, 0.18, 0.875, 74, 3, 2, 0, 0, 622, 10, 2], "semantic": {"name": "lang_rev", "arg_names": [], "import_names": [], "rhs_call_name": "reduce", "annotation": ""}, "snippet": " lang_rev = reduce(\n lambda r1, r2: mytracks.history.NewestRevision(lang_file, r1, r2),\n lang_revs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L111_C8", "label": "if", "type": "if", "loc": [111, 112], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "vector": [4, 4, 0.9696, 0.0174, 4, 0.18, 1.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if mytracks.history.DoesRevisionSuperceed(lang_file, master_rev, lang_rev):\n outdated.append(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L112_C10", "label": "append()", "type": "expression", "loc": [112, 112], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L111_C8", "vector": [8, 5, 0.9739, 0.0087, 5, 0.61, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " outdated.append(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L114_C6", "label": "if", "type": "if", "loc": [114, 115], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L86_C4", "vector": [4, 3, 0.9957, 0.0174, 3, 0.64, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(outdated) > 0:\n self._outdated_in_lang[lang] = outdated"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L115_C8", "label": "assign", "type": "assigned_variable", "loc": [115, 115], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L114_C6", "vector": [14, 4, 1.0, 0.0087, 4, 0.45, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._outdated_in_lang[lang] = outdated"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L27_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L28_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L29_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L31_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L31_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L31_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L38_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L38_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L38_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L38_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Return_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L51_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Return_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L54_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L54_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Return_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L57_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L57_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Return_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L60_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L60_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L60_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L64_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L66_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L66_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L66_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L70_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L66_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L72_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L73_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L74_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L76_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L76_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L78_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L78_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L79_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L81_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L81_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L82_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:FunctionDef_L81_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L86_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L87_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L91_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L93_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L94_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L95_C10"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L98_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L103_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L111_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Expr_L112_C10"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:For_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L114_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1424:If_L114_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1424:Assign_L115_C8"}]
''' Module for dealing with resource files (but not their contents). @author: Rodrigo Damazio ''' import os.path from glob import glob import re MYTRACKS_RES_DIR = 'MyTracks/res' ANDROID_MASTER_VALUES = 'values' ANDROID_VALUES_MASK = 'values-*' def GetMyTracksDir(): ''' Returns the directory in which the MyTracks directory is located. ''' path = os.getcwd() while not os.path.isdir(os.path.join(path, MYTRACKS_RES_DIR)): if path == '/': raise 'Not in My Tracks project' # Go up one level path = os.path.split(path)[0] return path def GetAllLanguageFiles(): ''' Returns a mapping from all found languages to their respective directories. ''' mytracks_path = GetMyTracksDir() res_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_VALUES_MASK) language_dirs = glob(res_dir) master_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_MASTER_VALUES) if len(language_dirs) == 0: raise 'No languages found!' if not os.path.isdir(master_dir): raise 'Couldn\'t find master file' language_tuples = [(re.findall(r'.*values-([A-Za-z-]+)', dir)[0],dir) for dir in language_dirs] language_tuples.append(('en', master_dir)) return dict(language_tuples)
ajibawa-2023/Python-Code-Large/train/row_1425
25
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nModule for dealing with resource files (but not their contents).\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Import_L6_C0", "label": "os.path import os.path", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.1333, 0.0222, 0, 0.66, 0.125, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os.path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:ImportFrom_L7_C0", "label": "from glob import glob", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.1556, 0.0222, 0, 0.66, 0.25, 958, 0, 1, 0, 0, 958, 0, 0], "semantic": {"name": "glob", "arg_names": [], "import_names": ["glob"], "rhs_call_name": "", "annotation": ""}, "snippet": "from glob import glob"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Import_L8_C0", "label": "re import re", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.1778, 0.0222, 0, 0.66, 0.375, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L10_C0", "label": "MYTRACKS_RES_DIR =", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.2222, 0.0222, 0, 0.66, 0.5, 40, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MYTRACKS_RES_DIR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MYTRACKS_RES_DIR = 'MyTracks/res'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L11_C0", "label": "ANDROID_MASTER_VALUES =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.2444, 0.0222, 0, 0.66, 0.625, 918, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ANDROID_MASTER_VALUES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ANDROID_MASTER_VALUES = 'values'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L12_C0", "label": "ANDROID_VALUES_MASK =", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.2667, 0.0222, 0, 0.66, 0.75, 115, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ANDROID_VALUES_MASK", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ANDROID_VALUES_MASK = 'values-*'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L15_C0", "label": "GetMyTracksDir", "type": "function", "loc": [15, 27], "level": 0, "parent": null, "vector": [2, 0, 0.4667, 0.2889, 0, 0.66, 0.875, 854, 0, 0, 1, 0, 0, 0, 4], "semantic": {"name": "GetMyTracksDir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def GetMyTracksDir():\n '''\n Returns the directory in which the MyTracks directory is located.\n '''\n path = os.getcwd()\n while not os.path.isdir(os.path.join(path, MYTRACKS_RES_DIR)):\n if path == '/':\n raise 'Not in My Tracks project'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Expr_L16_C2", "label": "expression", "type": "expression", "loc": [16, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L15_C0", "vector": [8, 1, 0.3778, 0.0667, 1, 0.24, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Returns the directory in which the MyTracks directory is located.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L19_C2", "label": "path = getcwd()", "type": "assigned_variable", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L15_C0", "vector": [14, 1, 0.4222, 0.0222, 1, 0.24, 0.3333, 358, 3, 0, 0, 0, 320, 10, 1], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "getcwd", "annotation": ""}, "snippet": " path = os.getcwd()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:While_L20_C2", "label": "while", "type": "while", "loc": [20, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L15_C0", "vector": [5, 1, 0.5, 0.1333, 1, 0.24, 0.6667, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while not os.path.isdir(os.path.join(path, MYTRACKS_RES_DIR)):\n if path == '/':\n raise 'Not in My Tracks project'\n\n # Go up one level\n path = os.path.split(path)[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:If_L21_C4", "label": "if", "type": "if", "loc": [21, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1425:While_L20_C2", "vector": [4, 2, 0.4778, 0.0444, 2, 0.11, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if path == '/':\n raise 'Not in My Tracks project'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L25_C4", "label": "path =", "type": "assigned_variable", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1425:While_L20_C2", "vector": [14, 2, 0.5556, 0.0222, 2, 0.11, 1.0, 358, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = os.path.split(path)[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Return_L27_C2", "label": "return", "type": "return", "loc": [27, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L15_C0", "vector": [13, 1, 0.6, 0.0222, 1, 0.24, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "label": "GetAllLanguageFiles", "type": "function", "loc": [30, 45], "level": 0, "parent": null, "vector": [2, 0, 0.8333, 0.3556, 0, 0.66, 1.0, 438, 0, 0, 1, 0, 0, 0, 9], "semantic": {"name": "GetAllLanguageFiles", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def GetAllLanguageFiles():\n '''\n Returns a mapping from all found languages to their respective directories.\n '''\n mytracks_path = GetMyTracksDir()\n res_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_VALUES_MASK)\n language_dirs = glob(res_dir)\n master_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_MASTER_VALUES)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Expr_L31_C2", "label": "expression", "type": "expression", "loc": [31, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "vector": [8, 1, 0.7111, 0.0667, 1, 0.42, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Returns a mapping from all found languages to their respective directories.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L34_C2", "label": "mytracks_path = GetMyTracksDir()", "type": "assigned_variable", "loc": [34, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "vector": [14, 1, 0.7556, 0.0222, 1, 0.42, 0.1111, 720, 3, 0, 0, 0, 854, 10, 1], "semantic": {"name": "mytracks_path", "arg_names": [], "import_names": [], "rhs_call_name": "GetMyTracksDir", "annotation": ""}, "snippet": " mytracks_path = GetMyTracksDir()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L35_C2", "label": "res_dir = join()", "type": "assigned_variable", "loc": [35, 35], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "vector": [14, 1, 0.7778, 0.0222, 1, 0.42, 0.2222, 400, 3, 3, 0, 0, 933, 10, 1], "semantic": {"name": "res_dir", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " res_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_VALUES_MASK)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L36_C2", "label": "language_dirs = glob()", "type": "assigned_variable", "loc": [36, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "vector": [14, 1, 0.8, 0.0222, 1, 0.42, 0.3333, 191, 3, 1, 0, 0, 958, 10, 1], "semantic": {"name": "language_dirs", "arg_names": [], "import_names": [], "rhs_call_name": "glob", "annotation": ""}, "snippet": " language_dirs = glob(res_dir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L37_C2", "label": "master_dir = join()", "type": "assigned_variable", "loc": [37, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "vector": [14, 1, 0.8222, 0.0222, 1, 0.42, 0.4444, 493, 3, 3, 0, 0, 933, 10, 1], "semantic": {"name": "master_dir", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " master_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_MASTER_VALUES)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:If_L38_C2", "label": "if", "type": "if", "loc": [38, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "vector": [4, 1, 0.8556, 0.0444, 1, 0.42, 0.5556, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(language_dirs) == 0:\n raise 'No languages found!'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:If_L40_C2", "label": "if", "type": "if", "loc": [40, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "vector": [4, 1, 0.9, 0.0444, 1, 0.42, 0.6667, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not os.path.isdir(master_dir):\n raise 'Couldn\\'t find master file'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L43_C2", "label": "language_tuples =", "type": "assigned_variable", "loc": [43, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "vector": [14, 1, 0.9556, 0.0222, 1, 0.42, 0.7778, 966, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "language_tuples", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " language_tuples = [(re.findall(r'.*values-([A-Za-z-]+)', dir)[0],dir) for dir in language_dirs]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Expr_L44_C2", "label": "append()", "type": "expression", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "vector": [8, 1, 0.9778, 0.0222, 1, 0.42, 0.8889, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " language_tuples.append(('en', master_dir))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1425:Return_L45_C2", "label": "return", "type": "return", "loc": [45, 45], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "vector": [13, 1, 1.0, 0.0222, 1, 0.42, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return dict(language_tuples)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1425:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1425:While_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1425:While_L20_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1425:If_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1425:While_L20_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1425:Return_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1425:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1425:If_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1425:If_L40_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1425:Assign_L43_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1425:Expr_L44_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1425:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1425:Return_L45_C2"}]
''' Module which parses a string XML file. @author: Rodrigo Damazio ''' from xml.parsers.expat import ParserCreate import re #import xml.etree.ElementTree as ET class StringsParser(object): ''' Parser for string XML files. This object is not thread-safe and should be used for parsing a single file at a time, only. ''' def Parse(self, file): ''' Parses the given file and returns a dictionary mapping keys to an object with attributes for that key, such as the value, start/end line and explicit revisions. In addition to the standard XML format of the strings file, this parser supports an annotation inside comments, in one of these formats: <!-- KEEP_PARENT name="bla" --> <!-- KEEP_PARENT name="bla" rev="123456789012" --> Such an annotation indicates that we're explicitly inheriting form the master file (and the optional revision says that this decision is compatible with the master file up to that revision). @param file: the name of the file to parse ''' self._Reset() # Unfortunately expat is the only parser that will give us line numbers self._xml_parser = ParserCreate() self._xml_parser.StartElementHandler = self._StartElementHandler self._xml_parser.EndElementHandler = self._EndElementHandler self._xml_parser.CharacterDataHandler = self._CharacterDataHandler self._xml_parser.CommentHandler = self._CommentHandler file_obj = open(file) self._xml_parser.ParseFile(file_obj) file_obj.close() return self._all_strings def _Reset(self): self._currentString = None self._currentStringName = None self._currentStringValue = None self._all_strings = {} def _StartElementHandler(self, name, attrs): if name != 'string': return if 'name' not in attrs: return assert not self._currentString assert not self._currentStringName self._currentString = { 'startLine' : self._xml_parser.CurrentLineNumber, } if 'rev' in attrs: self._currentString['revs'] = [attrs['rev']] self._currentStringName = attrs['name'] self._currentStringValue = '' def _EndElementHandler(self, name): if name != 'string': return assert self._currentString assert self._currentStringName self._currentString['value'] = self._currentStringValue self._currentString['endLine'] = self._xml_parser.CurrentLineNumber self._all_strings[self._currentStringName] = self._currentString self._currentString = None self._currentStringName = None self._currentStringValue = None def _CharacterDataHandler(self, data): if not self._currentString: return self._currentStringValue += data _KEEP_PARENT_REGEX = re.compile(r'\s*KEEP_PARENT\s+' r'name\s*=\s*[\'"]?(?P<name>[a-z0-9_]+)[\'"]?' r'(?:\s+rev=[\'"]?(?P<rev>[0-9a-f]{12})[\'"]?)?\s*', re.MULTILINE | re.DOTALL) def _CommentHandler(self, data): keep_parent_match = self._KEEP_PARENT_REGEX.match(data) if not keep_parent_match: return name = keep_parent_match.group('name') self._all_strings[name] = { 'keepParent' : True, 'startLine' : self._xml_parser.CurrentLineNumber, 'endLine' : self._xml_parser.CurrentLineNumber } rev = keep_parent_match.group('rev') if rev: self._all_strings[name]['revs'] = [rev]
ajibawa-2023/Python-Code-Large/train/row_1426
54
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0261, 0.0435, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nModule which parses a string XML file.\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:ImportFrom_L7_C0", "label": "from xml.parsers.expat import ParserCreate", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0609, 0.0087, 0, 0.66, 0.3333, 573, 0, 1, 0, 0, 573, 0, 0], "semantic": {"name": "xml.parsers.expat", "arg_names": [], "import_names": ["ParserCreate"], "rhs_call_name": "", "annotation": ""}, "snippet": "from xml.parsers.expat import ParserCreate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Import_L8_C0", "label": "re import re", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0696, 0.0087, 0, 0.66, 0.6667, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "label": "StringsParser", "type": "class", "loc": [11, 115], "level": 0, "parent": null, "vector": [3, 0, 0.5478, 0.913, 0, 0.66, 1.0, 282, 0, 6, 0, 0, 186, 0, 9], "semantic": {"name": "StringsParser", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class StringsParser(object):\n '''\n Parser for string XML files.\n\n This object is not thread-safe and should be used for parsing a single file at\n a time, only.\n '''\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Expr_L12_C2", "label": "expression", "type": "expression", "loc": [12, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "vector": [8, 1, 0.1261, 0.0522, 1, 0.84, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Parser for string XML files.\n\n This object is not thread-safe and should be used for parsing a single file at\n a time, only.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "label": "Parse", "type": "function", "loc": [19, 50], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "vector": [2, 1, 0.3, 0.2783, 1, 0.84, 0.1429, 291, 0, 2, 1, 0, 0, 0, 5], "semantic": {"name": "Parse", "arg_names": ["self", "file"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Parse(self, file):\n '''\n Parses the given file and returns a dictionary mapping keys to an object\n with attributes for that key, such as the value, start/end line and explicit\n revisions.\n \n In addition to the standard XML format of the strings file, this parser\n supports an annotation inside comments, in one of these formats:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Expr_L20_C4", "label": "expression", "type": "expression", "loc": [20, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "vector": [8, 2, 0.2435, 0.1478, 2, 0.72, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Parses the given file and returns a dictionary mapping keys to an object\n with attributes for that key, such as the value, start/end line and explicit\n revisions.\n \n In addition to the standard XML format of the strings file, this parser\n supports an annotation inside comments, in one of these formats:\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Expr_L37_C4", "label": "_Reset()", "type": "expression", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "vector": [8, 2, 0.3217, 0.0087, 2, 0.72, 0.1, 412, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_Reset", "arg_names": [], "import_names": [], "rhs_call_name": "_Reset", "annotation": ""}, "snippet": " self._Reset()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L40_C4", "label": "self._xml_parser = ParserCreate()", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "vector": [14, 2, 0.3478, 0.0087, 2, 0.72, 0.2, 822, 3, 0, 0, 0, 684, 10, 1], "semantic": {"name": "self._xml_parser", "arg_names": [], "import_names": [], "rhs_call_name": "ParserCreate", "annotation": ""}, "snippet": " self._xml_parser = ParserCreate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L41_C4", "label": "self._xml_parser.StartElementHandler =", "type": "assigned_variable", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "vector": [14, 2, 0.3565, 0.0087, 2, 0.72, 0.3, 260, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._xml_parser.StartElementHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._xml_parser.StartElementHandler = self._StartElementHandler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L42_C4", "label": "self._xml_parser.EndElementHandler =", "type": "assigned_variable", "loc": [42, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "vector": [14, 2, 0.3652, 0.0087, 2, 0.72, 0.4, 744, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._xml_parser.EndElementHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._xml_parser.EndElementHandler = self._EndElementHandler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L43_C4", "label": "self._xml_parser.CharacterDataHandler =", "type": "assigned_variable", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "vector": [14, 2, 0.3739, 0.0087, 2, 0.72, 0.5, 144, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._xml_parser.CharacterDataHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._xml_parser.CharacterDataHandler = self._CharacterDataHandler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L44_C4", "label": "self._xml_parser.CommentHandler =", "type": "assigned_variable", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "vector": [14, 2, 0.3826, 0.0087, 2, 0.72, 0.6, 403, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._xml_parser.CommentHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._xml_parser.CommentHandler = self._CommentHandler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L46_C4", "label": "file_obj = open()", "type": "assigned_variable", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "vector": [14, 2, 0.4, 0.0087, 2, 0.72, 0.7, 425, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "file_obj", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " file_obj = open(file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Expr_L47_C4", "label": "ParseFile()", "type": "expression", "loc": [47, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "vector": [8, 2, 0.4087, 0.0087, 2, 0.72, 0.8, 341, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "ParseFile", "arg_names": [], "import_names": [], "rhs_call_name": "ParseFile", "annotation": ""}, "snippet": " self._xml_parser.ParseFile(file_obj)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Expr_L48_C4", "label": "close()", "type": "expression", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "vector": [8, 2, 0.4174, 0.0087, 2, 0.72, 0.9, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " file_obj.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Return_L50_C4", "label": "return", "type": "return", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "vector": [13, 2, 0.4348, 0.0087, 2, 0.72, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._all_strings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L52_C2", "label": "_Reset", "type": "function", "loc": [52, 56], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "vector": [2, 1, 0.4696, 0.0435, 1, 0.84, 0.2857, 412, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "_Reset", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _Reset(self):\n self._currentString = None\n self._currentStringName = None\n self._currentStringValue = None\n self._all_strings = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L53_C4", "label": "self._currentString =", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L52_C2", "vector": [14, 2, 0.4609, 0.0087, 2, 0.89, 0.0, 654, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentString", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L54_C4", "label": "self._currentStringName =", "type": "assigned_variable", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L52_C2", "vector": [14, 2, 0.4696, 0.0087, 2, 0.89, 0.3333, 294, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentStringName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringName = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L55_C4", "label": "self._currentStringValue =", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L52_C2", "vector": [14, 2, 0.4783, 0.0087, 2, 0.89, 0.6667, 884, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentStringValue", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringValue = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L56_C4", "label": "self._all_strings =", "type": "assigned_variable", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L52_C2", "vector": [14, 2, 0.487, 0.0087, 2, 0.89, 1.0, 463, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._all_strings", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._all_strings = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L58_C2", "label": "_StartElementHandler", "type": "function", "loc": [58, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "vector": [2, 1, 0.5783, 0.1565, 1, 0.84, 0.4286, 355, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "_StartElementHandler", "arg_names": ["self", "name", "attrs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _StartElementHandler(self, name, attrs):\n if name != 'string':\n return\n\n if 'name' not in attrs:\n return\n\n assert not self._currentString"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L59_C4", "label": "if", "type": "if", "loc": [59, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L58_C2", "vector": [4, 2, 0.5174, 0.0174, 2, 0.88, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name != 'string':\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Return_L60_C6", "label": "return", "type": "return", "loc": [60, 60], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L59_C4", "vector": [13, 3, 0.5217, 0.0087, 3, 0.06, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L62_C4", "label": "if", "type": "if", "loc": [62, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L58_C2", "vector": [4, 2, 0.5435, 0.0174, 2, 0.88, 0.2, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'name' not in attrs:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Return_L63_C6", "label": "return", "type": "return", "loc": [63, 63], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L62_C4", "vector": [13, 3, 0.5478, 0.0087, 3, 0.16, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L67_C4", "label": "self._currentString =", "type": "assigned_variable", "loc": [67, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L58_C2", "vector": [14, 2, 0.5913, 0.0261, 2, 0.88, 0.4, 654, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._currentString", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString = {\n 'startLine' : self._xml_parser.CurrentLineNumber,\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L71_C4", "label": "if", "type": "if", "loc": [71, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L58_C2", "vector": [4, 2, 0.6217, 0.0174, 2, 0.88, 0.6, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'rev' in attrs:\n self._currentString['revs'] = [attrs['rev']]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L72_C6", "label": "assign", "type": "assigned_variable", "loc": [72, 72], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L71_C4", "vector": [14, 3, 0.6261, 0.0087, 3, 0.42, 0.0, 0, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString['revs'] = [attrs['rev']]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L74_C4", "label": "self._currentStringName =", "type": "assigned_variable", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L58_C2", "vector": [14, 2, 0.6435, 0.0087, 2, 0.88, 0.8, 294, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._currentStringName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringName = attrs['name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L75_C4", "label": "self._currentStringValue =", "type": "assigned_variable", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L58_C2", "vector": [14, 2, 0.6522, 0.0087, 2, 0.88, 1.0, 884, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self._currentStringValue", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringValue = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L77_C2", "label": "_EndElementHandler", "type": "function", "loc": [77, 89], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "vector": [2, 1, 0.7217, 0.113, 1, 0.84, 0.5714, 486, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "_EndElementHandler", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _EndElementHandler(self, name):\n if name != 'string':\n return\n\n assert self._currentString\n assert self._currentStringName\n self._currentString['value'] = self._currentStringValue\n self._currentString['endLine'] = self._xml_parser.CurrentLineNumber"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L78_C4", "label": "if", "type": "if", "loc": [78, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L77_C2", "vector": [4, 2, 0.6826, 0.0174, 2, 0.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name != 'string':\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Return_L79_C6", "label": "return", "type": "return", "loc": [79, 79], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L78_C4", "vector": [13, 3, 0.687, 0.0087, 3, 0.12, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L83_C4", "label": "assign", "type": "assigned_variable", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L77_C2", "vector": [14, 2, 0.7217, 0.0087, 2, 0.5, 0.1667, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString['value'] = self._currentStringValue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L84_C4", "label": "assign", "type": "assigned_variable", "loc": [84, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L77_C2", "vector": [14, 2, 0.7304, 0.0087, 2, 0.5, 0.3333, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString['endLine'] = self._xml_parser.CurrentLineNumber"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L85_C4", "label": "assign", "type": "assigned_variable", "loc": [85, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L77_C2", "vector": [14, 2, 0.7391, 0.0087, 2, 0.5, 0.5, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._all_strings[self._currentStringName] = self._currentString"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L87_C4", "label": "self._currentString =", "type": "assigned_variable", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L77_C2", "vector": [14, 2, 0.7565, 0.0087, 2, 0.5, 0.6667, 654, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentString", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L88_C4", "label": "self._currentStringName =", "type": "assigned_variable", "loc": [88, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L77_C2", "vector": [14, 2, 0.7652, 0.0087, 2, 0.5, 0.8333, 294, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentStringName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringName = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L89_C4", "label": "self._currentStringValue =", "type": "assigned_variable", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L77_C2", "vector": [14, 2, 0.7739, 0.0087, 2, 0.5, 1.0, 884, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentStringValue", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringValue = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L91_C2", "label": "_CharacterDataHandler", "type": "function", "loc": [91, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "vector": [2, 1, 0.8087, 0.0435, 1, 0.84, 0.7143, 825, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "_CharacterDataHandler", "arg_names": ["self", "data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _CharacterDataHandler(self, data):\n if not self._currentString:\n return\n\n self._currentStringValue += data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L92_C4", "label": "if", "type": "if", "loc": [92, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L91_C2", "vector": [4, 2, 0.8043, 0.0174, 2, 0.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self._currentString:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Return_L93_C6", "label": "return", "type": "return", "loc": [93, 93], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L92_C4", "vector": [13, 3, 0.8087, 0.0087, 3, 0.45, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L97_C2", "label": "_KEEP_PARENT_REGEX = compile()", "type": "assigned_variable", "loc": [97, 100], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "vector": [14, 1, 0.8565, 0.0348, 1, 0.84, 0.8571, 591, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "_KEEP_PARENT_REGEX", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " _KEEP_PARENT_REGEX = re.compile(r'\\s*KEEP_PARENT\\s+'\n r'name\\s*=\\s*[\\'\"]?(?P<name>[a-z0-9_]+)[\\'\"]?'\n r'(?:\\s+rev=[\\'\"]?(?P<rev>[0-9a-f]{12})[\\'\"]?)?\\s*',\n re.MULTILINE | re.DOTALL)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L102_C2", "label": "_CommentHandler", "type": "function", "loc": [102, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "vector": [2, 1, 0.9435, 0.1217, 1, 0.84, 1.0, 562, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "_CommentHandler", "arg_names": ["self", "data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _CommentHandler(self, data):\n keep_parent_match = self._KEEP_PARENT_REGEX.match(data)\n if not keep_parent_match:\n return\n\n name = keep_parent_match.group('name')\n self._all_strings[name] = {\n 'keepParent' : True,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L103_C4", "label": "keep_parent_match = match()", "type": "assigned_variable", "loc": [103, 103], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L102_C2", "vector": [14, 2, 0.8957, 0.0087, 2, 0.18, 0.0, 885, 3, 1, 0, 0, 36, 10, 1], "semantic": {"name": "keep_parent_match", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " keep_parent_match = self._KEEP_PARENT_REGEX.match(data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L104_C4", "label": "if", "type": "if", "loc": [104, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L102_C2", "vector": [4, 2, 0.9087, 0.0174, 2, 0.18, 0.2, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not keep_parent_match:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Return_L105_C6", "label": "return", "type": "return", "loc": [105, 105], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L104_C4", "vector": [13, 3, 0.913, 0.0087, 3, 0.78, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L107_C4", "label": "name = group()", "type": "assigned_variable", "loc": [107, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L102_C2", "vector": [14, 2, 0.9304, 0.0087, 2, 0.18, 0.4, 57, 3, 1, 0, 0, 43, 10, 1], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "group", "annotation": ""}, "snippet": " name = keep_parent_match.group('name')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L108_C4", "label": "assign", "type": "assigned_variable", "loc": [108, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L102_C2", "vector": [14, 2, 0.9565, 0.0435, 2, 0.18, 0.6, 0, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._all_strings[name] = {\n 'keepParent' : True,\n 'startLine' : self._xml_parser.CurrentLineNumber,\n 'endLine' : self._xml_parser.CurrentLineNumber\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L113_C4", "label": "rev = group()", "type": "assigned_variable", "loc": [113, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L102_C2", "vector": [14, 2, 0.9826, 0.0087, 2, 0.18, 0.8, 337, 3, 1, 0, 0, 43, 10, 1], "semantic": {"name": "rev", "arg_names": [], "import_names": [], "rhs_call_name": "group", "annotation": ""}, "snippet": " rev = keep_parent_match.group('rev')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L114_C4", "label": "if", "type": "if", "loc": [114, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L102_C2", "vector": [4, 2, 0.9957, 0.0174, 2, 0.18, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if rev:\n self._all_strings[name]['revs'] = [rev]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L115_C6", "label": "assign", "type": "assigned_variable", "loc": [115, 115], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L114_C4", "vector": [14, 3, 1.0, 0.0087, 3, 0.22, 0.0, 0, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._all_strings[name]['revs'] = [rev]"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Expr_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Expr_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Expr_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Return_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L52_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L52_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L52_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L52_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L52_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Return_L60_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Return_L63_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L72_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L77_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L78_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L78_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Return_L79_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L84_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L85_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L87_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L88_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L91_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L91_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L92_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L92_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Return_L93_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L97_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L102_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L103_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L104_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L104_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Return_L105_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L107_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L108_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L113_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L114_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1426:If_L114_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1426:Assign_L115_C6"}]
''' Created on 18 avr. 12 @author: peterd ''' class CalculationError: pass def get_1d_cutting_plan(stock_piece_length, custom_pieces, cut_thickness): num_custom_pieces = len(custom_pieces) cutting_schema = {} i = 0 while i < num_custom_pieces: num_elem = 1 prev_custom_packs = [] while num_elem <= num_custom_pieces - i: k = num_elem - 1 n_elem_custom_packs = [] custom_pack = [] if num_elem == 1: custom_pack.append((i + k, custom_pieces[i + k])) n_elem_custom_packs.append(custom_pack) # TODO: move to function custom_pack_waste = stock_piece_length - custom_pieces[i + k] if cutting_schema.has_key(custom_pack_waste): if custom_pack not in cutting_schema[custom_pack_waste]: cutting_schema[custom_pack_waste].append(custom_pack) else: cutting_schema[custom_pack_waste] = [custom_pack] else: for prev_custom_pack in prev_custom_packs: l = k while l < num_custom_pieces: custom_pack = list(prev_custom_pack) custom_pack_used_length = 0 for custom_piece in custom_pack: custom_pack_used_length = custom_pack_used_length + custom_piece[1] n = l if i + n < num_custom_pieces: while len(custom_pack) < num_elem: try: if custom_pack_used_length + custom_pieces[i + n] > stock_piece_length: break except IndexError: pass custom_pack.append((i + n, custom_pieces[i + n])) custom_pack_used_length = custom_pack_used_length + custom_pieces[i + n] n = n + 1 if i + n == num_custom_pieces: break n_elem_custom_packs.append(custom_pack) custom_pack_waste = stock_piece_length - custom_pack_used_length # TODO: move to function if cutting_schema.has_key(custom_pack_waste): if custom_pack not in cutting_schema[custom_pack_waste]: cutting_schema[custom_pack_waste].append(custom_pack) else: cutting_schema[custom_pack_waste] = [custom_pack] l = l + 1 k = k + 1 num_elem = num_elem + 1 prev_custom_packs = list(n_elem_custom_packs) i = i + 1 custom_pieces_ids = [] bestfit_cutting_schema = {} for waste in sorted(cutting_schema.iterkeys()): for custom_pack in cutting_schema[waste]: already_packed = False for custom_piece in custom_pack: custom_piece_id = custom_piece[0] if custom_piece_id in custom_pieces_ids: already_packed = True break if not already_packed: custom_piece_lengths = [] custom_pack_length = 0 for custom_piece in custom_pack: custom_piece_id = custom_piece[0] custom_piece_length = custom_piece[1] custom_pieces_ids.append(custom_piece_id) # use remaining length from any of the previous schemas if possible reused_bestfit_custom_pack = [] remaining_waste = 0 for bestfit_waste in sorted(bestfit_cutting_schema.iterkeys()): i = 0 for bestfit_custom_pack in bestfit_cutting_schema[bestfit_waste]: if custom_piece_length <= bestfit_waste: bestfit_custom_pack.append(custom_piece_length) reused_bestfit_custom_pack = list(bestfit_custom_pack) remaining_waste = bestfit_waste - custom_piece_length waste = waste + custom_piece_length break i = i + 1 if reused_bestfit_custom_pack: break if not reused_bestfit_custom_pack: custom_piece_lengths.append(custom_piece_length) custom_pack_length = custom_pack_length + custom_piece_length else: custom_packs = bestfit_cutting_schema[bestfit_waste] if len(custom_packs) == 1: del bestfit_cutting_schema[bestfit_waste] else: del bestfit_cutting_schema[bestfit_waste][i] if bestfit_cutting_schema.has_key(remaining_waste): bestfit_cutting_schema[remaining_waste].append(reused_bestfit_custom_pack) else: bestfit_cutting_schema[remaining_waste] = [reused_bestfit_custom_pack] if custom_piece_lengths: if bestfit_cutting_schema.has_key(waste): bestfit_cutting_schema[waste].append(custom_piece_lengths) else: bestfit_cutting_schema[waste] = [custom_piece_lengths] if len(custom_pieces_ids) != num_custom_pieces: raise CalculationError() cutting_plan = {'schema': [] } i = 1 total_waste = 0 for bestfit_waste in sorted(bestfit_cutting_schema.iterkeys()): for bestfit_custom_pack in bestfit_cutting_schema[bestfit_waste]: augmented_custom_pack = [] for piece in bestfit_custom_pack: if piece == stock_piece_length: augmented_custom_pack.append(piece) else: augmented_custom_pack.append(piece - cut_thickness) cutting_plan['schema'].append({'id': i, 'pack': augmented_custom_pack, 'waste': bestfit_waste}) total_waste = total_waste + bestfit_waste i = i + 1 cutting_plan['total_stock_num'] = i - 1 cutting_plan['total_waste'] = total_waste return cutting_plan
ajibawa-2023/Python-Code-Large/train/row_1427
105
155
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0194, 0.0323, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nCreated on 18 avr. 12\n\n@author: peterd\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:ClassDef_L7_C0", "label": "CalculationError", "type": "class", "loc": [7, 8], "level": 0, "parent": null, "vector": [3, 0, 0.0484, 0.0129, 0, 0.66, 0.5, 246, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "CalculationError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CalculationError:\n\tpass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "label": "get_1d_cutting_plan", "type": "function", "loc": [11, 147], "level": 0, "parent": null, "vector": [2, 0, 0.5097, 0.8839, 0, 0.66, 1.0, 667, 0, 3, 1, 0, 0, 0, 32], "semantic": {"name": "get_1d_cutting_plan", "arg_names": ["stock_piece_length", "custom_pieces", "cut_thickness"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_1d_cutting_plan(stock_piece_length, custom_pieces, cut_thickness):\n\tnum_custom_pieces = len(custom_pieces)\t\n\tcutting_schema = {}\t\n\ti = 0\n\t\n\twhile i < num_custom_pieces:\n\t\tnum_elem = 1\t\n\t\tprev_custom_packs = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L12_C1", "label": "num_custom_pieces = len()", "type": "assigned_variable", "loc": [12, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "vector": [14, 1, 0.0774, 0.0065, 1, 0.24, 0.0, 494, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "num_custom_pieces", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": "\tnum_custom_pieces = len(custom_pieces)\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L13_C1", "label": "cutting_schema =", "type": "assigned_variable", "loc": [13, 13], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "vector": [14, 1, 0.0839, 0.0065, 1, 0.24, 0.0714, 263, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "cutting_schema", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tcutting_schema = {}\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L14_C1", "label": "i =", "type": "assigned_variable", "loc": [14, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "vector": [14, 1, 0.0903, 0.0065, 1, 0.24, 0.1429, 826, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\ti = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L16_C1", "label": "while", "type": "while", "loc": [16, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "vector": [5, 1, 0.271, 0.3419, 1, 0.24, 0.2143, 0, 0, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\twhile i < num_custom_pieces:\n\t\tnum_elem = 1\t\n\t\tprev_custom_packs = []\n\t\twhile num_elem <= num_custom_pieces - i:\n\t\t\tk = num_elem - 1\t\t\t\n\t\t\tn_elem_custom_packs = []\n\t\t\tcustom_pack = []\n\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L17_C2", "label": "num_elem =", "type": "assigned_variable", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L16_C1", "vector": [14, 2, 0.1097, 0.0065, 2, 0.34, 0.0, 943, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "num_elem", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tnum_elem = 1\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L18_C2", "label": "prev_custom_packs =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L16_C1", "vector": [14, 2, 0.1161, 0.0065, 2, 0.34, 0.3333, 753, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "prev_custom_packs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tprev_custom_packs = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L19_C2", "label": "while", "type": "while", "loc": [19, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L16_C1", "vector": [5, 2, 0.2774, 0.3161, 2, 0.34, 0.6667, 0, 0, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\twhile num_elem <= num_custom_pieces - i:\n\t\t\tk = num_elem - 1\t\t\t\n\t\t\tn_elem_custom_packs = []\n\t\t\tcustom_pack = []\n\t\n\t\t\tif num_elem == 1:\n\t\t\t\tcustom_pack.append((i + k, custom_pieces[i + k]))\n\t\t\t\tn_elem_custom_packs.append(custom_pack)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L20_C3", "label": "k =", "type": "assigned_variable", "loc": [20, 20], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L19_C2", "vector": [14, 3, 0.129, 0.0065, 3, 0.55, 0.0, 954, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "k", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tk = num_elem - 1\t\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L21_C3", "label": "n_elem_custom_packs =", "type": "assigned_variable", "loc": [21, 21], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L19_C2", "vector": [14, 3, 0.1355, 0.0065, 3, 0.55, 0.2, 487, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "n_elem_custom_packs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tn_elem_custom_packs = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L22_C3", "label": "custom_pack =", "type": "assigned_variable", "loc": [22, 22], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L19_C2", "vector": [14, 3, 0.1419, 0.0065, 3, 0.55, 0.4, 488, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "custom_pack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tcustom_pack = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L24_C3", "label": "if", "type": "if", "loc": [24, 64], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L19_C2", "vector": [4, 3, 0.2839, 0.2645, 3, 0.55, 0.6, 0, 0, 0, 0, 0, 0, 0, 10], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif num_elem == 1:\n\t\t\t\tcustom_pack.append((i + k, custom_pieces[i + k]))\n\t\t\t\tn_elem_custom_packs.append(custom_pack)\n\t\t\t\t# TODO: move to function\n\t\t\t\tcustom_pack_waste = stock_piece_length - custom_pieces[i + k]\n\t\t\t\tif cutting_schema.has_key(custom_pack_waste):\n\t\t\t\t\tif custom_pack not in cutting_schema[custom_pack_waste]:\n\t\t\t\t\t\tcutting_schema[custom_pack_waste].append(custom_pack)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L25_C4", "label": "append()", "type": "expression", "loc": [25, 25], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L24_C3", "vector": [8, 4, 0.1613, 0.0065, 4, 0.45, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\t\t\tcustom_pack.append((i + k, custom_pieces[i + k]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L26_C4", "label": "append()", "type": "expression", "loc": [26, 26], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L24_C3", "vector": [8, 4, 0.1677, 0.0065, 4, 0.45, 0.25, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\t\t\tn_elem_custom_packs.append(custom_pack)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L28_C4", "label": "custom_pack_waste =", "type": "assigned_variable", "loc": [28, 28], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L24_C3", "vector": [14, 4, 0.1806, 0.0065, 4, 0.45, 0.5, 542, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "custom_pack_waste", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tcustom_pack_waste = stock_piece_length - custom_pieces[i + k]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L29_C4", "label": "if", "type": "if", "loc": [29, 33], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L24_C3", "vector": [4, 4, 0.2, 0.0323, 4, 0.45, 0.75, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tif cutting_schema.has_key(custom_pack_waste):\n\t\t\t\t\tif custom_pack not in cutting_schema[custom_pack_waste]:\n\t\t\t\t\t\tcutting_schema[custom_pack_waste].append(custom_pack)\n\t\t\t\telse:\n\t\t\t\t\tcutting_schema[custom_pack_waste] = [custom_pack]\t\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L30_C5", "label": "if", "type": "if", "loc": [30, 31], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L29_C4", "vector": [4, 5, 0.1968, 0.0129, 5, 0.09, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\tif custom_pack not in cutting_schema[custom_pack_waste]:\n\t\t\t\t\t\tcutting_schema[custom_pack_waste].append(custom_pack)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L31_C6", "label": "append()", "type": "expression", "loc": [31, 31], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L30_C5", "vector": [8, 6, 0.2, 0.0065, 6, 0.8, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\t\t\t\t\tcutting_schema[custom_pack_waste].append(custom_pack)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L33_C5", "label": "assign", "type": "assigned_variable", "loc": [33, 33], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L29_C4", "vector": [14, 5, 0.2129, 0.0065, 5, 0.09, 1.0, 0, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\tcutting_schema[custom_pack_waste] = [custom_pack]\t\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L35_C4", "label": "for prev_custom_pack", "type": "for", "loc": [35, 64], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L24_C3", "vector": [6, 4, 0.3194, 0.1935, 4, 0.45, 1.0, 605, 2, 0, 0, 0, 0, 0, 6], "semantic": {"name": "prev_custom_pack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tfor prev_custom_pack in prev_custom_packs:\n\t\t\t\t\tl = k\n\t\t\t\t\twhile l < num_custom_pieces:\n\t\t\t\t\t\tcustom_pack = list(prev_custom_pack)\n\t\t\t\t\t\tcustom_pack_used_length = 0\n\t\t\t\t\t\tfor custom_piece in custom_pack:\n\t\t\t\t\t\t\tcustom_pack_used_length = custom_pack_used_length + custom_piece[1] \t\t\n\t\t\t\t\t\tn = l\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L36_C5", "label": "l =", "type": "assigned_variable", "loc": [36, 36], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L35_C4", "vector": [14, 5, 0.2323, 0.0065, 5, 0.39, 0.0, 810, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "l", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\tl = k"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L37_C5", "label": "while", "type": "while", "loc": [37, 63], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L35_C4", "vector": [5, 5, 0.3226, 0.1742, 5, 0.39, 0.5, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\twhile l < num_custom_pieces:\n\t\t\t\t\t\tcustom_pack = list(prev_custom_pack)\n\t\t\t\t\t\tcustom_pack_used_length = 0\n\t\t\t\t\t\tfor custom_piece in custom_pack:\n\t\t\t\t\t\t\tcustom_pack_used_length = custom_pack_used_length + custom_piece[1] \t\t\n\t\t\t\t\t\tn = l\t\t\n\t\t\t\t\t\tif i + n < num_custom_pieces:\n\t\t\t\t\t\t\twhile len(custom_pack) < num_elem:\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L38_C6", "label": "custom_pack = list()", "type": "assigned_variable", "loc": [38, 38], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L37_C5", "vector": [14, 6, 0.2452, 0.0065, 6, 0.08, 0.0, 488, 3, 1, 0, 0, 430, 10, 1], "semantic": {"name": "custom_pack", "arg_names": [], "import_names": [], "rhs_call_name": "list", "annotation": ""}, "snippet": "\t\t\t\t\t\tcustom_pack = list(prev_custom_pack)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L39_C6", "label": "custom_pack_used_length =", "type": "assigned_variable", "loc": [39, 39], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L37_C5", "vector": [14, 6, 0.2516, 0.0065, 6, 0.08, 0.2, 43, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "custom_pack_used_length", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\tcustom_pack_used_length = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L40_C6", "label": "for custom_piece", "type": "for", "loc": [40, 41], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L37_C5", "vector": [6, 6, 0.2613, 0.0129, 6, 0.08, 0.4, 257, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "custom_piece", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\tfor custom_piece in custom_pack:\n\t\t\t\t\t\t\tcustom_pack_used_length = custom_pack_used_length + custom_piece[1] \t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L41_C7", "label": "custom_pack_used_length =", "type": "assigned_variable", "loc": [41, 41], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L40_C6", "vector": [14, 7, 0.2645, 0.0065, 7, 0.62, 0.0, 43, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "custom_pack_used_length", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\t\tcustom_pack_used_length = custom_pack_used_length + custom_piece[1] \t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L42_C6", "label": "n =", "type": "assigned_variable", "loc": [42, 42], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L37_C5", "vector": [14, 6, 0.271, 0.0065, 6, 0.08, 0.6, 773, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\tn = l\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L43_C6", "label": "if", "type": "if", "loc": [43, 62], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L37_C5", "vector": [4, 6, 0.3387, 0.129, 6, 0.08, 0.8, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\tif i + n < num_custom_pieces:\n\t\t\t\t\t\t\twhile len(custom_pack) < num_elem:\t\n\t\t\t\t\t\t\t\ttry:\t\n\t\t\t\t\t\t\t\t\tif custom_pack_used_length + custom_pieces[i + n] > stock_piece_length:\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\texcept IndexError:\n\t\t\t\t\t\t\t\t\tpass\n\t\t\t\t\t\t\t\tcustom_pack.append((i + n, custom_pieces[i + n]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L44_C7", "label": "while", "type": "while", "loc": [44, 54], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L43_C6", "vector": [5, 7, 0.3161, 0.071, 7, 0.27, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\t\twhile len(custom_pack) < num_elem:\t\n\t\t\t\t\t\t\t\ttry:\t\n\t\t\t\t\t\t\t\t\tif custom_pack_used_length + custom_pieces[i + n] > stock_piece_length:\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\texcept IndexError:\n\t\t\t\t\t\t\t\t\tpass\n\t\t\t\t\t\t\t\tcustom_pack.append((i + n, custom_pieces[i + n]))\n\t\t\t\t\t\t\t\tcustom_pack_used_length = custom_pack_used_length + custom_pieces[i + n]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Try_L45_C8", "label": "try", "type": "try", "loc": [45, 49], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L44_C7", "vector": [7, 8, 0.3032, 0.0323, 8, 0.95, 0.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\t\t\ttry:\t\n\t\t\t\t\t\t\t\t\tif custom_pack_used_length + custom_pieces[i + n] > stock_piece_length:\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\texcept IndexError:\n\t\t\t\t\t\t\t\t\tpass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L46_C9", "label": "if", "type": "if", "loc": [46, 47], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:Try_L45_C8", "vector": [4, 9, 0.3, 0.0129, 9, 0.27, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\t\t\t\tif custom_pack_used_length + custom_pieces[i + n] > stock_piece_length:\n\t\t\t\t\t\t\t\t\t\tbreak"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L50_C8", "label": "append()", "type": "expression", "loc": [50, 50], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L44_C7", "vector": [8, 8, 0.3226, 0.0065, 8, 0.95, 0.25, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\t\t\t\t\t\t\tcustom_pack.append((i + n, custom_pieces[i + n]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L51_C8", "label": "custom_pack_used_length =", "type": "assigned_variable", "loc": [51, 51], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L44_C7", "vector": [14, 8, 0.329, 0.0065, 8, 0.95, 0.5, 43, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "custom_pack_used_length", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\t\t\tcustom_pack_used_length = custom_pack_used_length + custom_pieces[i + n]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L52_C8", "label": "n =", "type": "assigned_variable", "loc": [52, 52], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L44_C7", "vector": [14, 8, 0.3355, 0.0065, 8, 0.95, 0.75, 773, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\t\t\tn = n + 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L53_C8", "label": "if", "type": "if", "loc": [53, 54], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L44_C7", "vector": [4, 8, 0.3452, 0.0129, 8, 0.95, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\t\t\tif i + n == num_custom_pieces:\n\t\t\t\t\t\t\t\t\tbreak"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L55_C7", "label": "append()", "type": "expression", "loc": [55, 55], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L43_C6", "vector": [8, 7, 0.3548, 0.0065, 7, 0.27, 0.3333, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\t\t\t\t\t\tn_elem_custom_packs.append(custom_pack)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L56_C7", "label": "custom_pack_waste =", "type": "assigned_variable", "loc": [56, 56], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L43_C6", "vector": [14, 7, 0.3613, 0.0065, 7, 0.27, 0.6667, 542, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "custom_pack_waste", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\t\tcustom_pack_waste = stock_piece_length - custom_pack_used_length"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L58_C7", "label": "if", "type": "if", "loc": [58, 62], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L43_C6", "vector": [4, 7, 0.3871, 0.0323, 7, 0.27, 1.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\t\tif cutting_schema.has_key(custom_pack_waste):\n\t\t\t\t\t\t\t\tif custom_pack not in cutting_schema[custom_pack_waste]:\n\t\t\t\t\t\t\t\t\tcutting_schema[custom_pack_waste].append(custom_pack)\n\t\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t\tcutting_schema[custom_pack_waste] = [custom_pack]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L59_C8", "label": "if", "type": "if", "loc": [59, 60], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L58_C7", "vector": [4, 8, 0.3839, 0.0129, 8, 0.41, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\t\t\tif custom_pack not in cutting_schema[custom_pack_waste]:\n\t\t\t\t\t\t\t\t\tcutting_schema[custom_pack_waste].append(custom_pack)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L60_C9", "label": "append()", "type": "expression", "loc": [60, 60], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L59_C8", "vector": [8, 9, 0.3871, 0.0065, 9, 0.05, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\t\t\t\t\t\t\t\tcutting_schema[custom_pack_waste].append(custom_pack)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L62_C8", "label": "assign", "type": "assigned_variable", "loc": [62, 62], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L58_C7", "vector": [14, 8, 0.4, 0.0065, 8, 0.41, 1.0, 0, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\t\t\tcutting_schema[custom_pack_waste] = [custom_pack]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L63_C6", "label": "l =", "type": "assigned_variable", "loc": [63, 63], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L37_C5", "vector": [14, 6, 0.4065, 0.0065, 6, 0.08, 1.0, 810, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "l", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\tl = l + 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L64_C5", "label": "k =", "type": "assigned_variable", "loc": [64, 64], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L35_C4", "vector": [14, 5, 0.4129, 0.0065, 5, 0.39, 1.0, 954, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "k", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\tk = k + 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L66_C3", "label": "num_elem =", "type": "assigned_variable", "loc": [66, 66], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L19_C2", "vector": [14, 3, 0.4258, 0.0065, 3, 0.55, 0.8, 943, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "num_elem", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tnum_elem = num_elem + 1\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L67_C3", "label": "prev_custom_packs = list()", "type": "assigned_variable", "loc": [67, 67], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L19_C2", "vector": [14, 3, 0.4323, 0.0065, 3, 0.55, 1.0, 753, 3, 1, 0, 0, 430, 10, 1], "semantic": {"name": "prev_custom_packs", "arg_names": [], "import_names": [], "rhs_call_name": "list", "annotation": ""}, "snippet": "\t\t\tprev_custom_packs = list(n_elem_custom_packs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L68_C2", "label": "i =", "type": "assigned_variable", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L16_C1", "vector": [14, 2, 0.4387, 0.0065, 2, 0.34, 1.0, 826, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\ti = i + 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L70_C1", "label": "custom_pieces_ids =", "type": "assigned_variable", "loc": [70, 70], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "vector": [14, 1, 0.4516, 0.0065, 1, 0.24, 0.2857, 616, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "custom_pieces_ids", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tcustom_pieces_ids = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L71_C1", "label": "bestfit_cutting_schema =", "type": "assigned_variable", "loc": [71, 71], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "vector": [14, 1, 0.4581, 0.0065, 1, 0.24, 0.3571, 326, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "bestfit_cutting_schema", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tbestfit_cutting_schema = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L73_C1", "label": "for waste", "type": "for", "loc": [73, 125], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "vector": [6, 1, 0.6387, 0.3419, 1, 0.24, 0.4286, 480, 3, 0, 0, 0, 0, 0, 13], "semantic": {"name": "waste", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tfor waste in sorted(cutting_schema.iterkeys()):\n\t\tfor custom_pack in cutting_schema[waste]:\n\t\t\talready_packed = False\t\t\n\t\t\tfor custom_piece in custom_pack:\n\t\t\t\tcustom_piece_id = custom_piece[0] \n\t\t\t\tif custom_piece_id in custom_pieces_ids:\n\t\t\t\t\talready_packed = True\n\t\t\t\t\tbreak"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L74_C2", "label": "for custom_pack", "type": "for", "loc": [74, 125], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L73_C1", "vector": [6, 2, 0.6419, 0.3355, 2, 0.79, 0.0, 488, 6, 0, 0, 0, 0, 0, 11], "semantic": {"name": "custom_pack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tfor custom_pack in cutting_schema[waste]:\n\t\t\talready_packed = False\t\t\n\t\t\tfor custom_piece in custom_pack:\n\t\t\t\tcustom_piece_id = custom_piece[0] \n\t\t\t\tif custom_piece_id in custom_pieces_ids:\n\t\t\t\t\talready_packed = True\n\t\t\t\t\tbreak\n\t\t\tif not already_packed:\t\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L75_C3", "label": "already_packed =", "type": "assigned_variable", "loc": [75, 75], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L74_C2", "vector": [14, 3, 0.4839, 0.0065, 3, 0.53, 0.0, 966, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "already_packed", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\talready_packed = False\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L76_C3", "label": "for custom_piece", "type": "for", "loc": [76, 80], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L74_C2", "vector": [6, 3, 0.5032, 0.0323, 3, 0.53, 0.5, 257, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "custom_piece", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tfor custom_piece in custom_pack:\n\t\t\t\tcustom_piece_id = custom_piece[0] \n\t\t\t\tif custom_piece_id in custom_pieces_ids:\n\t\t\t\t\talready_packed = True\n\t\t\t\t\tbreak"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L77_C4", "label": "custom_piece_id =", "type": "assigned_variable", "loc": [77, 77], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L76_C3", "vector": [14, 4, 0.4968, 0.0065, 4, 0.02, 0.0, 786, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "custom_piece_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tcustom_piece_id = custom_piece[0] "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L78_C4", "label": "if", "type": "if", "loc": [78, 80], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L76_C3", "vector": [4, 4, 0.5097, 0.0194, 4, 0.02, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tif custom_piece_id in custom_pieces_ids:\n\t\t\t\t\talready_packed = True\n\t\t\t\t\tbreak"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L79_C5", "label": "already_packed =", "type": "assigned_variable", "loc": [79, 79], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L78_C4", "vector": [14, 5, 0.5097, 0.0065, 5, 0.43, 0.0, 966, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "already_packed", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\talready_packed = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L81_C3", "label": "if", "type": "if", "loc": [81, 125], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L74_C2", "vector": [4, 3, 0.6645, 0.2903, 3, 0.53, 1.0, 0, 0, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif not already_packed:\t\t\t\n\t\t\t\tcustom_piece_lengths = []\n\t\t\t\tcustom_pack_length = 0\n\t\t\t\tfor custom_piece in custom_pack:\n\t\t\t\t\tcustom_piece_id = custom_piece[0]\n\t\t\t\t\tcustom_piece_length = custom_piece[1]\n\t\t\t\t\tcustom_pieces_ids.append(custom_piece_id)\n\t\t\t\t\t# use remaining length from any of the previous schemas if possible"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L82_C4", "label": "custom_piece_lengths =", "type": "assigned_variable", "loc": [82, 82], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L81_C3", "vector": [14, 4, 0.529, 0.0065, 4, 0.54, 0.0, 780, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "custom_piece_lengths", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tcustom_piece_lengths = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L83_C4", "label": "custom_pack_length =", "type": "assigned_variable", "loc": [83, 83], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L81_C3", "vector": [14, 4, 0.5355, 0.0065, 4, 0.54, 0.3333, 538, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "custom_pack_length", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tcustom_pack_length = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L84_C4", "label": "for custom_piece", "type": "for", "loc": [84, 117], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L81_C3", "vector": [6, 4, 0.6484, 0.2194, 4, 0.54, 0.6667, 257, 2, 0, 0, 0, 0, 0, 9], "semantic": {"name": "custom_piece", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tfor custom_piece in custom_pack:\n\t\t\t\t\tcustom_piece_id = custom_piece[0]\n\t\t\t\t\tcustom_piece_length = custom_piece[1]\n\t\t\t\t\tcustom_pieces_ids.append(custom_piece_id)\n\t\t\t\t\t# use remaining length from any of the previous schemas if possible\n\t\t\t\t\treused_bestfit_custom_pack = []\n\t\t\t\t\tremaining_waste = 0\n\t\t\t\t\tfor bestfit_waste in sorted(bestfit_cutting_schema.iterkeys()):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L85_C5", "label": "custom_piece_id =", "type": "assigned_variable", "loc": [85, 85], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L84_C4", "vector": [14, 5, 0.5484, 0.0065, 5, 0.67, 0.0, 786, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "custom_piece_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\tcustom_piece_id = custom_piece[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L86_C5", "label": "custom_piece_length =", "type": "assigned_variable", "loc": [86, 86], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L84_C4", "vector": [14, 5, 0.5548, 0.0065, 5, 0.67, 0.1667, 555, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "custom_piece_length", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\tcustom_piece_length = custom_piece[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L87_C5", "label": "append()", "type": "expression", "loc": [87, 87], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L84_C4", "vector": [8, 5, 0.5613, 0.0065, 5, 0.67, 0.3333, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\t\t\t\tcustom_pieces_ids.append(custom_piece_id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L89_C5", "label": "reused_bestfit_custom_pack =", "type": "assigned_variable", "loc": [89, 89], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L84_C4", "vector": [14, 5, 0.5742, 0.0065, 5, 0.67, 0.5, 898, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "reused_bestfit_custom_pack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\treused_bestfit_custom_pack = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L90_C5", "label": "remaining_waste =", "type": "assigned_variable", "loc": [90, 90], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L84_C4", "vector": [14, 5, 0.5806, 0.0065, 5, 0.67, 0.6667, 739, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "remaining_waste", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\tremaining_waste = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L91_C5", "label": "for bestfit_waste", "type": "for", "loc": [91, 102], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L84_C4", "vector": [6, 5, 0.6226, 0.0774, 5, 0.67, 0.8333, 674, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "bestfit_waste", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\tfor bestfit_waste in sorted(bestfit_cutting_schema.iterkeys()):\n\t\t\t\t\t\ti = 0\n\t\t\t\t\t\tfor bestfit_custom_pack in bestfit_cutting_schema[bestfit_waste]:\n\t\t\t\t\t\t\tif custom_piece_length <= bestfit_waste:\n\t\t\t\t\t\t\t\tbestfit_custom_pack.append(custom_piece_length)\n\t\t\t\t\t\t\t\treused_bestfit_custom_pack = list(bestfit_custom_pack)\n\t\t\t\t\t\t\t\tremaining_waste = bestfit_waste - custom_piece_length\n\t\t\t\t\t\t\t\twaste = waste + custom_piece_length "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L92_C6", "label": "i =", "type": "assigned_variable", "loc": [92, 92], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L91_C5", "vector": [14, 6, 0.5935, 0.0065, 6, 0.61, 0.0, 826, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\ti = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L93_C6", "label": "for bestfit_custom_pack", "type": "for", "loc": [93, 100], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L91_C5", "vector": [6, 6, 0.6226, 0.0516, 6, 0.61, 0.5, 831, 6, 0, 0, 0, 0, 0, 2], "semantic": {"name": "bestfit_custom_pack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\tfor bestfit_custom_pack in bestfit_cutting_schema[bestfit_waste]:\n\t\t\t\t\t\t\tif custom_piece_length <= bestfit_waste:\n\t\t\t\t\t\t\t\tbestfit_custom_pack.append(custom_piece_length)\n\t\t\t\t\t\t\t\treused_bestfit_custom_pack = list(bestfit_custom_pack)\n\t\t\t\t\t\t\t\tremaining_waste = bestfit_waste - custom_piece_length\n\t\t\t\t\t\t\t\twaste = waste + custom_piece_length \n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\ti = i + 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L94_C7", "label": "if", "type": "if", "loc": [94, 99], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L93_C6", "vector": [4, 7, 0.6226, 0.0387, 7, 0.62, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\t\tif custom_piece_length <= bestfit_waste:\n\t\t\t\t\t\t\t\tbestfit_custom_pack.append(custom_piece_length)\n\t\t\t\t\t\t\t\treused_bestfit_custom_pack = list(bestfit_custom_pack)\n\t\t\t\t\t\t\t\tremaining_waste = bestfit_waste - custom_piece_length\n\t\t\t\t\t\t\t\twaste = waste + custom_piece_length \n\t\t\t\t\t\t\t\tbreak"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L95_C8", "label": "append()", "type": "expression", "loc": [95, 95], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L94_C7", "vector": [8, 8, 0.6129, 0.0065, 8, 0.88, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\t\t\t\t\t\t\tbestfit_custom_pack.append(custom_piece_length)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L96_C8", "label": "reused_bestfit_custom_pack = list()", "type": "assigned_variable", "loc": [96, 96], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L94_C7", "vector": [14, 8, 0.6194, 0.0065, 8, 0.88, 0.3333, 898, 3, 1, 0, 0, 430, 10, 1], "semantic": {"name": "reused_bestfit_custom_pack", "arg_names": [], "import_names": [], "rhs_call_name": "list", "annotation": ""}, "snippet": "\t\t\t\t\t\t\t\treused_bestfit_custom_pack = list(bestfit_custom_pack)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L97_C8", "label": "remaining_waste =", "type": "assigned_variable", "loc": [97, 97], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L94_C7", "vector": [14, 8, 0.6258, 0.0065, 8, 0.88, 0.6667, 739, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "remaining_waste", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\t\t\tremaining_waste = bestfit_waste - custom_piece_length"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L98_C8", "label": "waste =", "type": "assigned_variable", "loc": [98, 98], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L94_C7", "vector": [14, 8, 0.6323, 0.0065, 8, 0.88, 1.0, 480, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "waste", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\t\t\twaste = waste + custom_piece_length "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L100_C7", "label": "i =", "type": "assigned_variable", "loc": [100, 100], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L93_C6", "vector": [14, 7, 0.6452, 0.0065, 7, 0.62, 1.0, 826, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\t\ti = i + 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L101_C6", "label": "if", "type": "if", "loc": [101, 102], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L91_C5", "vector": [4, 6, 0.6548, 0.0129, 6, 0.61, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\tif reused_bestfit_custom_pack:\n\t\t\t\t\t\t\tbreak"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L104_C5", "label": "if", "type": "if", "loc": [104, 117], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L84_C4", "vector": [4, 5, 0.7129, 0.0903, 5, 0.67, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\tif not reused_bestfit_custom_pack:\t\t\t\t\t\n\t\t\t\t\t\tcustom_piece_lengths.append(custom_piece_length)\n\t\t\t\t\t\tcustom_pack_length = custom_pack_length + custom_piece_length\n\t\t\t\t\telse:\n\t\t\t\t\t\tcustom_packs = bestfit_cutting_schema[bestfit_waste]\n\t\t\t\t\t\tif len(custom_packs) == 1:\n\t\t\t\t\t\t\tdel bestfit_cutting_schema[bestfit_waste]\n\t\t\t\t\t\telse:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L105_C6", "label": "append()", "type": "expression", "loc": [105, 105], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L104_C5", "vector": [8, 6, 0.6774, 0.0065, 6, 0.33, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\t\t\t\t\tcustom_piece_lengths.append(custom_piece_length)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L106_C6", "label": "custom_pack_length =", "type": "assigned_variable", "loc": [106, 106], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L104_C5", "vector": [14, 6, 0.6839, 0.0065, 6, 0.33, 0.25, 538, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "custom_pack_length", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\tcustom_pack_length = custom_pack_length + custom_piece_length"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L108_C6", "label": "custom_packs =", "type": "assigned_variable", "loc": [108, 108], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L104_C5", "vector": [14, 6, 0.6968, 0.0065, 6, 0.33, 0.5, 554, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "custom_packs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\tcustom_packs = bestfit_cutting_schema[bestfit_waste]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L109_C6", "label": "if", "type": "if", "loc": [109, 112], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L104_C5", "vector": [4, 6, 0.7129, 0.0258, 6, 0.33, 0.75, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\tif len(custom_packs) == 1:\n\t\t\t\t\t\t\tdel bestfit_cutting_schema[bestfit_waste]\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\tdel bestfit_cutting_schema[bestfit_waste][i]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L114_C6", "label": "if", "type": "if", "loc": [114, 117], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L104_C5", "vector": [4, 6, 0.7452, 0.0258, 6, 0.33, 1.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\tif bestfit_cutting_schema.has_key(remaining_waste):\n\t\t\t\t\t\t\tbestfit_cutting_schema[remaining_waste].append(reused_bestfit_custom_pack)\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\tbestfit_cutting_schema[remaining_waste] = [reused_bestfit_custom_pack]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L115_C7", "label": "append()", "type": "expression", "loc": [115, 115], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L114_C6", "vector": [8, 7, 0.7419, 0.0065, 7, 0.08, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\t\t\t\t\t\tbestfit_cutting_schema[remaining_waste].append(reused_bestfit_custom_pack)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L117_C7", "label": "assign", "type": "assigned_variable", "loc": [117, 117], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L114_C6", "vector": [14, 7, 0.7548, 0.0065, 7, 0.08, 1.0, 0, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\t\tbestfit_cutting_schema[remaining_waste] = [reused_bestfit_custom_pack]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L121_C4", "label": "if", "type": "if", "loc": [121, 125], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L81_C3", "vector": [4, 4, 0.7935, 0.0323, 4, 0.54, 1.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tif custom_piece_lengths:\n\t\t\t\t\tif bestfit_cutting_schema.has_key(waste):\n\t\t\t\t\t\tbestfit_cutting_schema[waste].append(custom_piece_lengths)\n\t\t\t\t\telse:\n\t\t\t\t\t\tbestfit_cutting_schema[waste] = [custom_piece_lengths]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L122_C5", "label": "if", "type": "if", "loc": [122, 125], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L121_C4", "vector": [4, 5, 0.7968, 0.0258, 5, 0.22, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\tif bestfit_cutting_schema.has_key(waste):\n\t\t\t\t\t\tbestfit_cutting_schema[waste].append(custom_piece_lengths)\n\t\t\t\t\telse:\n\t\t\t\t\t\tbestfit_cutting_schema[waste] = [custom_piece_lengths]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L123_C6", "label": "append()", "type": "expression", "loc": [123, 123], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L122_C5", "vector": [8, 6, 0.7935, 0.0065, 6, 0.37, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\t\t\t\t\tbestfit_cutting_schema[waste].append(custom_piece_lengths)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L125_C6", "label": "assign", "type": "assigned_variable", "loc": [125, 125], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L122_C5", "vector": [14, 6, 0.8065, 0.0065, 6, 0.37, 1.0, 0, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\t\tbestfit_cutting_schema[waste] = [custom_piece_lengths]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L127_C1", "label": "if", "type": "if", "loc": [127, 128], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "vector": [4, 1, 0.8226, 0.0129, 1, 0.24, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tif len(custom_pieces_ids) != num_custom_pieces:\n\t\traise CalculationError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L130_C1", "label": "cutting_plan =", "type": "assigned_variable", "loc": [130, 130], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "vector": [14, 1, 0.8387, 0.0065, 1, 0.24, 0.5714, 413, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "cutting_plan", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tcutting_plan = {'schema': [] }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L131_C1", "label": "i =", "type": "assigned_variable", "loc": [131, 131], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "vector": [14, 1, 0.8452, 0.0065, 1, 0.24, 0.6429, 826, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\ti = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L132_C1", "label": "total_waste =", "type": "assigned_variable", "loc": [132, 132], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "vector": [14, 1, 0.8516, 0.0065, 1, 0.24, 0.7143, 247, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "total_waste", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\ttotal_waste = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L133_C1", "label": "for bestfit_waste", "type": "for", "loc": [133, 143], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "vector": [6, 1, 0.8903, 0.071, 1, 0.24, 0.7857, 674, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "bestfit_waste", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tfor bestfit_waste in sorted(bestfit_cutting_schema.iterkeys()):\n\t\tfor bestfit_custom_pack in bestfit_cutting_schema[bestfit_waste]:\n\t\t\taugmented_custom_pack = []\n\t\t\tfor piece in bestfit_custom_pack:\n\t\t\t\tif piece == stock_piece_length:\n\t\t\t\t\taugmented_custom_pack.append(piece)\n\t\t\t\telse:\n\t\t\t\t\taugmented_custom_pack.append(piece - cut_thickness)\t\t\t\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L134_C2", "label": "for bestfit_custom_pack", "type": "for", "loc": [134, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L133_C1", "vector": [6, 2, 0.8935, 0.0645, 2, 0.58, 0.0, 831, 6, 0, 0, 0, 0, 0, 3], "semantic": {"name": "bestfit_custom_pack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tfor bestfit_custom_pack in bestfit_cutting_schema[bestfit_waste]:\n\t\t\taugmented_custom_pack = []\n\t\t\tfor piece in bestfit_custom_pack:\n\t\t\t\tif piece == stock_piece_length:\n\t\t\t\t\taugmented_custom_pack.append(piece)\n\t\t\t\telse:\n\t\t\t\t\taugmented_custom_pack.append(piece - cut_thickness)\t\t\t\t\t\n\t\t\tcutting_plan['schema'].append({'id': i, 'pack': augmented_custom_pack, 'waste': bestfit_waste})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L135_C3", "label": "augmented_custom_pack =", "type": "assigned_variable", "loc": [135, 135], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L134_C2", "vector": [14, 3, 0.871, 0.0065, 3, 0.25, 0.0, 234, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "augmented_custom_pack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\taugmented_custom_pack = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L136_C3", "label": "for piece", "type": "for", "loc": [136, 140], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L134_C2", "vector": [6, 3, 0.8903, 0.0323, 3, 0.25, 0.25, 973, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "piece", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tfor piece in bestfit_custom_pack:\n\t\t\t\tif piece == stock_piece_length:\n\t\t\t\t\taugmented_custom_pack.append(piece)\n\t\t\t\telse:\n\t\t\t\t\taugmented_custom_pack.append(piece - cut_thickness)\t\t\t\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L137_C4", "label": "if", "type": "if", "loc": [137, 140], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L136_C3", "vector": [4, 4, 0.8935, 0.0258, 4, 0.96, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tif piece == stock_piece_length:\n\t\t\t\t\taugmented_custom_pack.append(piece)\n\t\t\t\telse:\n\t\t\t\t\taugmented_custom_pack.append(piece - cut_thickness)\t\t\t\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L138_C5", "label": "append()", "type": "expression", "loc": [138, 138], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L137_C4", "vector": [8, 5, 0.8903, 0.0065, 5, 0.54, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\t\t\t\taugmented_custom_pack.append(piece)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L140_C5", "label": "append()", "type": "expression", "loc": [140, 140], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L137_C4", "vector": [8, 5, 0.9032, 0.0065, 5, 0.54, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\t\t\t\taugmented_custom_pack.append(piece - cut_thickness)\t\t\t\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L141_C3", "label": "append()", "type": "expression", "loc": [141, 141], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L134_C2", "vector": [8, 3, 0.9097, 0.0065, 3, 0.25, 0.5, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\t\tcutting_plan['schema'].append({'id': i, 'pack': augmented_custom_pack, 'waste': bestfit_waste})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L142_C3", "label": "total_waste =", "type": "assigned_variable", "loc": [142, 142], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L134_C2", "vector": [14, 3, 0.9161, 0.0065, 3, 0.25, 0.75, 247, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "total_waste", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\ttotal_waste = total_waste + bestfit_waste"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L143_C3", "label": "i =", "type": "assigned_variable", "loc": [143, 143], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L134_C2", "vector": [14, 3, 0.9226, 0.0065, 3, 0.25, 1.0, 826, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\ti = i + 1 \t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L144_C1", "label": "assign", "type": "assigned_variable", "loc": [144, 144], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "vector": [14, 1, 0.929, 0.0065, 1, 0.24, 0.8571, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tcutting_plan['total_stock_num'] = i - 1\t\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L145_C1", "label": "assign", "type": "assigned_variable", "loc": [145, 145], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "vector": [14, 1, 0.9355, 0.0065, 1, 0.24, 0.9286, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tcutting_plan['total_waste'] = total_waste"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1427:Return_L147_C1", "label": "return", "type": "return", "loc": [147, 147], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "vector": [13, 1, 0.9484, 0.0065, 1, 0.24, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\treturn cutting_plan"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L12_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L13_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L14_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L20_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L21_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L22_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L24_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L24_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L24_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L24_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L24_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L30_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L30_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L31_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L33_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L24_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L36_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L37_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L37_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L38_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L37_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L39_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L37_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L40_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L40_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L41_C7"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L37_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L42_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L37_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L43_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L43_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L44_C7"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L44_C7", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Try_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:Try_L45_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L46_C9"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L44_C7", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L44_C7", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L44_C7", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L44_C7", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L43_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L55_C7"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L43_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L56_C7"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L43_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L58_C7"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L58_C7", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L59_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L60_C9"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L58_C7", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L37_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L63_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L64_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L66_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L67_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:While_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L68_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L70_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L71_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L73_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L73_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L74_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L74_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L75_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L74_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L76_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L76_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L77_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L76_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L78_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L78_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L79_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L74_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L81_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L81_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L82_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L81_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L81_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L84_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L84_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L85_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L84_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L86_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L84_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L87_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L84_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L89_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L84_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L90_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L84_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L91_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L91_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L92_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L91_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L93_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L93_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L94_C7"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L94_C7", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L95_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L94_C7", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L94_C7", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L94_C7", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L98_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L93_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L100_C7"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L91_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L101_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L84_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L104_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L104_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L105_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L104_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L106_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L104_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L108_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L104_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L109_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L104_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L114_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L114_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L115_C7"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L114_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L117_C7"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L81_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L121_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L121_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L122_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L122_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L123_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L122_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L125_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L127_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L130_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L131_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L132_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L133_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L133_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L134_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L134_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L135_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L134_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L136_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L136_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L137_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L137_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L138_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:If_L137_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L140_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L134_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Expr_L141_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L134_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L142_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:For_L134_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L143_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L144_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Assign_L145_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1427:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1427:Return_L147_C1"}]
#!/usr/bin/env python from django.core.management import execute_manager import imp try: imp.find_module('settings') # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__) sys.exit(1) import settings if __name__ == "__main__": execute_manager(settings)
ajibawa-2023/Python-Code-Large/train/row_1428
10
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1428:ImportFrom_L2_C0", "label": "from django.core.management import execute_manager", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.0714, 0, 0.66, 0.0, 879, 0, 1, 0, 0, 879, 0, 0], "semantic": {"name": "django.core.management", "arg_names": [], "import_names": ["execute_manager"], "rhs_call_name": "", "annotation": ""}, "snippet": "from django.core.management import execute_manager"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1428:Import_L3_C0", "label": "imp import imp", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.2143, 0.0714, 0, 0.66, 0.25, 201, 0, 1, 0, 0, 201, 0, 0], "semantic": {"name": "imp", "arg_names": [], "import_names": ["imp"], "rhs_call_name": "", "annotation": ""}, "snippet": "import imp"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1428:Try_L4_C0", "label": "try", "type": "try", "loc": [4, 9], "level": 0, "parent": null, "vector": [7, 0, 0.4643, 0.4286, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n imp.find_module('settings') # Assumed to be in the same directory.\nexcept ImportError:\n import sys\n sys.stderr.write(\"Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\\nYou'll have to run django-admin.py, passing it your settings module.\\n\" % __file__)\n sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1428:Expr_L5_C4", "label": "find_module()", "type": "expression", "loc": [5, 5], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1428:Try_L4_C0", "vector": [8, 1, 0.3571, 0.0714, 1, 0.09, 0.0, 222, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "find_module", "arg_names": [], "import_names": [], "rhs_call_name": "find_module", "annotation": ""}, "snippet": " imp.find_module('settings') # Assumed to be in the same directory."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1428:Import_L7_C4", "label": "sys import sys", "type": "import", "loc": [7, 7], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1428:Try_L4_C0", "vector": [1, 1, 0.5, 0.0714, 1, 0.09, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": " import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1428:Expr_L8_C4", "label": "write()", "type": "expression", "loc": [8, 8], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1428:Try_L4_C0", "vector": [8, 1, 0.5714, 0.0714, 1, 0.09, 0.5, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stderr.write(\"Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\\nYou'll have to run django-admin.py, passing it your settings module.\\n\" % __file__)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1428:Expr_L9_C4", "label": "exit()", "type": "expression", "loc": [9, 9], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1428:Try_L4_C0", "vector": [8, 1, 0.6429, 0.0714, 1, 0.09, 1.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1428:Import_L11_C0", "label": "settings import settings", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.7857, 0.0714, 0, 0.66, 0.75, 168, 0, 1, 0, 0, 168, 0, 0], "semantic": {"name": "settings", "arg_names": [], "import_names": ["settings"], "rhs_call_name": "", "annotation": ""}, "snippet": "import settings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1428:If_L13_C0", "label": "if", "type": "if", "loc": [13, 14], "level": 0, "parent": null, "vector": [4, 0, 0.9643, 0.1429, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == \"__main__\":\n execute_manager(settings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1428:Expr_L14_C4", "label": "execute_manager()", "type": "expression", "loc": [14, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1428:If_L13_C0", "vector": [8, 1, 1.0, 0.0714, 1, 0.94, 0.0, 383, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "execute_manager", "arg_names": [], "import_names": [], "rhs_call_name": "execute_manager", "annotation": ""}, "snippet": " execute_manager(settings)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1428:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1428:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1428:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1428:Import_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1428:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1428:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1428:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1428:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1428:If_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1428:Expr_L14_C4"}]
from django.conf.urls.defaults import patterns, include, url # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', url(r'^solver$', '1d-cutter.views.cutting_plan_solver'), url(r'^1d-cutter/solver', '1d-cutter.views.cutting_plan_solver'), url(r'^1d-cutter$', '1d-cutter.views.init'), url(r'^1d-cutter/', '1d-cutter.views.init'), )
ajibawa-2023/Python-Code-Large/train/row_1429
2
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1429:ImportFrom_L1_C0", "label": "from django.conf.urls.defaults import patterns, include, url", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 341, 0, 3, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "arg_names": [], "import_names": ["patterns", "include", "url"], "rhs_call_name": "", "annotation": ""}, "snippet": "from django.conf.urls.defaults import patterns, include, url"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1429:Assign_L7_C0", "label": "urlpatterns = patterns()", "type": "assigned_variable", "loc": [7, 12], "level": 0, "parent": null, "vector": [14, 0, 0.7917, 0.5, 0, 0.66, 1.0, 990, 3, 5, 0, 0, 75, 10, 5], "semantic": {"name": "urlpatterns", "arg_names": [], "import_names": [], "rhs_call_name": "patterns", "annotation": ""}, "snippet": "urlpatterns = patterns('',\n\turl(r'^solver$', '1d-cutter.views.cutting_plan_solver'),\n url(r'^1d-cutter/solver', '1d-cutter.views.cutting_plan_solver'), \n url(r'^1d-cutter$', '1d-cutter.views.init'),\n url(r'^1d-cutter/', '1d-cutter.views.init'),\n)"}]
[]
# Django settings for app project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '', # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. # On Unix systems, a value of None will cause Django to use the same # timezone as the operating system. # If running in a Windows environment this must be set to the same as your # system time zone. TIME_ZONE = 'America/Chicago' # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE = 'en-us' SITE_ID = 1 # If you set this to False, Django will make some optimizations so as not # to load the internationalization machinery. USE_I18N = True # If you set this to False, Django will not format dates, numbers and # calendars according to the current locale USE_L10N = True # Absolute filesystem path to the directory that will hold user-uploaded files. # Example: "/home/media/media.lawrence.com/media/" MEDIA_ROOT = '' # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash. # Examples: "http://media.lawrence.com/media/", "http://example.com/media/" MEDIA_URL = '' # Absolute path to the directory static files should be collected to. # Don't put anything in this directory yourself; store your static files # in apps' "static/" subdirectories and in STATICFILES_DIRS. # Example: "/home/media/media.lawrence.com/static/" STATIC_ROOT = '' # URL prefix for static files. # Example: "http://media.lawrence.com/static/" STATIC_URL = '/static/' # URL prefix for admin static files -- CSS, JavaScript and images. # Make sure to use a trailing slash. # Examples: "http://foo.com/static/admin/", "/static/admin/". ADMIN_MEDIA_PREFIX = '/static/admin/' # Additional locations of static files STATICFILES_DIRS = ( # Put strings here, like "/home/html/static" or "C:/www/django/static". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. ) # List of finder classes that know how to find static files in # various locations. STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', # 'django.contrib.staticfiles.finders.DefaultStorageFinder', ) # Make this unique, and don't share it with anybody. SECRET_KEY = 'd_@#2nc9-&05aacj5r=z*$_lru)@c2ir%^8tb-t1qwpk6a&h+8' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', # 'django.template.loaders.eggs.Loader', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ) ROOT_URLCONF = '1d-cutter.urls' TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. "c:/job_stuff/prj/1d-cutter/templates", ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', '1d-cutter', # Uncomment the next line to enable the admin: # 'django.contrib.admin', # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', ) # A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error. # See http://docs.djangoproject.com/en/dev/topics/logging for # more details on how to customize your logging configuration. LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'mail_admins': { 'level': 'ERROR', 'class': 'django.utils.log.AdminEmailHandler' } }, 'loggers': { 'django.request': { 'handlers': ['mail_admins'], 'level': 'ERROR', 'propagate': True, }, } }
ajibawa-2023/Python-Code-Large/train/row_1430
24
147
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L3_C0", "label": "DEBUG =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.0204, 0.0068, 0, 0.66, 0.0, 309, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "DEBUG", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DEBUG = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L4_C0", "label": "TEMPLATE_DEBUG =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.0272, 0.0068, 0, 0.66, 0.0435, 7, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "TEMPLATE_DEBUG", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TEMPLATE_DEBUG = DEBUG"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L6_C0", "label": "ADMINS =", "type": "assigned_variable", "loc": [6, 8], "level": 0, "parent": null, "vector": [14, 0, 0.0476, 0.0204, 0, 0.66, 0.087, 223, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "ADMINS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ADMINS = (\n # ('Your Name', 'your_email@example.com'),\n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L10_C0", "label": "MANAGERS =", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.068, 0.0068, 0, 0.66, 0.1304, 275, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "MANAGERS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MANAGERS = ADMINS"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L12_C0", "label": "DATABASES =", "type": "assigned_variable", "loc": [12, 21], "level": 0, "parent": null, "vector": [14, 0, 0.1122, 0.068, 0, 0.66, 0.1739, 12, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "DATABASES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.\n 'NAME': '', # Or path to database file if using sqlite3.\n 'USER': '', # Not used with sqlite3.\n 'PASSWORD': '', # Not used with sqlite3.\n 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.\n 'PORT': '', # Set to empty string for default. Not used with sqlite3."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L30_C0", "label": "TIME_ZONE =", "type": "assigned_variable", "loc": [30, 30], "level": 0, "parent": null, "vector": [14, 0, 0.2041, 0.0068, 0, 0.66, 0.2174, 774, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "TIME_ZONE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TIME_ZONE = 'America/Chicago'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L34_C0", "label": "LANGUAGE_CODE =", "type": "assigned_variable", "loc": [34, 34], "level": 0, "parent": null, "vector": [14, 0, 0.2313, 0.0068, 0, 0.66, 0.2609, 450, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "LANGUAGE_CODE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "LANGUAGE_CODE = 'en-us'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L36_C0", "label": "SITE_ID =", "type": "assigned_variable", "loc": [36, 36], "level": 0, "parent": null, "vector": [14, 0, 0.2449, 0.0068, 0, 0.66, 0.3043, 122, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "SITE_ID", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "SITE_ID = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L40_C0", "label": "USE_I18N =", "type": "assigned_variable", "loc": [40, 40], "level": 0, "parent": null, "vector": [14, 0, 0.2721, 0.0068, 0, 0.66, 0.3478, 547, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "USE_I18N", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "USE_I18N = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L44_C0", "label": "USE_L10N =", "type": "assigned_variable", "loc": [44, 44], "level": 0, "parent": null, "vector": [14, 0, 0.2993, 0.0068, 0, 0.66, 0.3913, 754, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "USE_L10N", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "USE_L10N = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L48_C0", "label": "MEDIA_ROOT =", "type": "assigned_variable", "loc": [48, 48], "level": 0, "parent": null, "vector": [14, 0, 0.3265, 0.0068, 0, 0.66, 0.4348, 764, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MEDIA_ROOT", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MEDIA_ROOT = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L53_C0", "label": "MEDIA_URL =", "type": "assigned_variable", "loc": [53, 53], "level": 0, "parent": null, "vector": [14, 0, 0.3605, 0.0068, 0, 0.66, 0.4783, 120, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MEDIA_URL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MEDIA_URL = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L59_C0", "label": "STATIC_ROOT =", "type": "assigned_variable", "loc": [59, 59], "level": 0, "parent": null, "vector": [14, 0, 0.4014, 0.0068, 0, 0.66, 0.5217, 828, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "STATIC_ROOT", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "STATIC_ROOT = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L63_C0", "label": "STATIC_URL =", "type": "assigned_variable", "loc": [63, 63], "level": 0, "parent": null, "vector": [14, 0, 0.4286, 0.0068, 0, 0.66, 0.5652, 18, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "STATIC_URL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "STATIC_URL = '/static/'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L68_C0", "label": "ADMIN_MEDIA_PREFIX =", "type": "assigned_variable", "loc": [68, 68], "level": 0, "parent": null, "vector": [14, 0, 0.4626, 0.0068, 0, 0.66, 0.6087, 396, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ADMIN_MEDIA_PREFIX", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ADMIN_MEDIA_PREFIX = '/static/admin/'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L71_C0", "label": "STATICFILES_DIRS =", "type": "assigned_variable", "loc": [71, 75], "level": 0, "parent": null, "vector": [14, 0, 0.4966, 0.034, 0, 0.66, 0.6522, 743, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "STATICFILES_DIRS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "STATICFILES_DIRS = (\n # Put strings here, like \"/home/html/static\" or \"C:/www/django/static\".\n # Always use forward slashes, even on Windows.\n # Don't forget to use absolute paths, not relative paths.\n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L79_C0", "label": "STATICFILES_FINDERS =", "type": "assigned_variable", "loc": [79, 83], "level": 0, "parent": null, "vector": [14, 0, 0.551, 0.034, 0, 0.66, 0.6957, 94, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "STATICFILES_FINDERS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "STATICFILES_FINDERS = (\n 'django.contrib.staticfiles.finders.FileSystemFinder',\n 'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n# 'django.contrib.staticfiles.finders.DefaultStorageFinder',\n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L86_C0", "label": "SECRET_KEY =", "type": "assigned_variable", "loc": [86, 86], "level": 0, "parent": null, "vector": [14, 0, 0.585, 0.0068, 0, 0.66, 0.7391, 112, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "SECRET_KEY", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "SECRET_KEY = 'd_@#2nc9-&05aacj5r=z*$_lru)@c2ir%^8tb-t1qwpk6a&h+8'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L89_C0", "label": "TEMPLATE_LOADERS =", "type": "assigned_variable", "loc": [89, 93], "level": 0, "parent": null, "vector": [14, 0, 0.619, 0.034, 0, 0.66, 0.7826, 473, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "TEMPLATE_LOADERS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TEMPLATE_LOADERS = (\n 'django.template.loaders.filesystem.Loader',\n 'django.template.loaders.app_directories.Loader',\n# 'django.template.loaders.eggs.Loader',\n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L95_C0", "label": "MIDDLEWARE_CLASSES =", "type": "assigned_variable", "loc": [95, 101], "level": 0, "parent": null, "vector": [14, 0, 0.6667, 0.0476, 0, 0.66, 0.8261, 641, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "MIDDLEWARE_CLASSES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MIDDLEWARE_CLASSES = (\n 'django.middleware.common.CommonMiddleware',\n 'django.contrib.sessions.middleware.SessionMiddleware',\n 'django.middleware.csrf.CsrfViewMiddleware',\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\n 'django.contrib.messages.middleware.MessageMiddleware',\n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L103_C0", "label": "ROOT_URLCONF =", "type": "assigned_variable", "loc": [103, 103], "level": 0, "parent": null, "vector": [14, 0, 0.7007, 0.0068, 0, 0.66, 0.8696, 281, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ROOT_URLCONF", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ROOT_URLCONF = '1d-cutter.urls'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L105_C0", "label": "TEMPLATE_DIRS =", "type": "assigned_variable", "loc": [105, 110], "level": 0, "parent": null, "vector": [14, 0, 0.7313, 0.0408, 0, 0.66, 0.913, 910, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "TEMPLATE_DIRS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TEMPLATE_DIRS = (\n # Put strings here, like \"/home/html/django_templates\" or \"C:/www/django/templates\".\n # Always use forward slashes, even on Windows.\n # Don't forget to use absolute paths, not relative paths.\n \"c:/job_stuff/prj/1d-cutter/templates\",\n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L112_C0", "label": "INSTALLED_APPS =", "type": "assigned_variable", "loc": [112, 124], "level": 0, "parent": null, "vector": [14, 0, 0.8027, 0.0884, 0, 0.66, 0.9565, 648, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "INSTALLED_APPS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "INSTALLED_APPS = (\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.sites',\n 'django.contrib.messages',\n 'django.contrib.staticfiles',\n '1d-cutter',"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1430:Assign_L131_C0", "label": "LOGGING =", "type": "assigned_variable", "loc": [131, 147], "level": 0, "parent": null, "vector": [14, 0, 0.9456, 0.1156, 0, 0.66, 1.0, 136, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "LOGGING", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "LOGGING = {\n 'version': 1,\n 'disable_existing_loggers': False,\n 'handlers': {\n 'mail_admins': {\n 'level': 'ERROR',\n 'class': 'django.utils.log.AdminEmailHandler'\n }"}]
[]
from django.views.generic.simple import direct_to_template from solver import * def init(request): return direct_to_template(request, '1d-cutter/1d_cutting_plan_form.html', {}) def cutting_plan_solver(request): order_num = request.GET['order_num'] stock_type = request.GET['stock_type'] stock_length = int(request.GET['stock_length']) cut_thickness = int(request.GET['cut_thickness']) custom_lengths = [] custom_lengths_str = request.GET['custom_lengths'].replace(',', ' ') for custom_length in custom_lengths_str.split(' '): try: custom_length_ext = int(custom_length) + cut_thickness if custom_length_ext > stock_length: custom_length_ext = stock_length custom_lengths.append(custom_length_ext) except ValueError: pass try: cutting_plan = get_1d_cutting_plan(stock_length, custom_lengths, cut_thickness) return direct_to_template(request, '1d-cutter/1d_cutting_plan_result.html', {'order_num': order_num, 'stock_type': stock_type, 'cutting_plan': cutting_plan}) except CalculationError: return direct_to_template(request, '1d-cutter/1d_cutting_plan_error.html', {'error': 'CalculationError'}) except Exception, e: return direct_to_template(request, '1d-cutter/1d_cutting_plan_error.html', {'error': e})
ajibawa-2023/Python-Code-Large/train/row_1431
22
34
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1431:ImportFrom_L1_C0", "label": "from django.views.generic.simple import direct_to_template", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0294, 0.0294, 0, 0.66, 0.0, 956, 0, 1, 0, 0, 956, 0, 0], "semantic": {"name": "django.views.generic.simple", "arg_names": [], "import_names": ["direct_to_template"], "rhs_call_name": "", "annotation": ""}, "snippet": "from django.views.generic.simple import direct_to_template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:ImportFrom_L3_C0", "label": "from solver import *", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0882, 0.0294, 0, 0.66, 0.3333, 186, 0, 1, 0, 0, 186, 0, 0], "semantic": {"name": "solver", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from solver import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L5_C0", "label": "init", "type": "function", "loc": [5, 6], "level": 0, "parent": null, "vector": [2, 0, 0.1618, 0.0588, 0, 0.66, 0.6667, 319, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "init", "arg_names": ["request"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def init(request):\n\treturn direct_to_template(request, '1d-cutter/1d_cutting_plan_form.html', {})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:Return_L6_C1", "label": "return", "type": "return", "loc": [6, 6], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L5_C0", "vector": [13, 1, 0.1765, 0.0294, 1, 0.73, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\treturn direct_to_template(request, '1d-cutter/1d_cutting_plan_form.html', {})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "label": "cutting_plan_solver", "type": "function", "loc": [9, 33], "level": 0, "parent": null, "vector": [2, 0, 0.6176, 0.7353, 0, 0.66, 1.0, 377, 0, 1, 1, 0, 0, 0, 10], "semantic": {"name": "cutting_plan_solver", "arg_names": ["request"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def cutting_plan_solver(request):\n\torder_num = request.GET['order_num']\n\tstock_type = request.GET['stock_type']\t\n\tstock_length = int(request.GET['stock_length'])\n\tcut_thickness = int(request.GET['cut_thickness'])\n\tcustom_lengths = []\n\tcustom_lengths_str = request.GET['custom_lengths'].replace(',', ' ')\t\n\tfor custom_length in custom_lengths_str.split(' '):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L10_C1", "label": "order_num =", "type": "assigned_variable", "loc": [10, 10], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "vector": [14, 1, 0.2941, 0.0294, 1, 0.38, 0.0, 897, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "order_num", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\torder_num = request.GET['order_num']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L11_C1", "label": "stock_type =", "type": "assigned_variable", "loc": [11, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "vector": [14, 1, 0.3235, 0.0294, 1, 0.38, 0.1429, 395, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "stock_type", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tstock_type = request.GET['stock_type']\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L12_C1", "label": "stock_length = int()", "type": "assigned_variable", "loc": [12, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "vector": [14, 1, 0.3529, 0.0294, 1, 0.38, 0.2857, 871, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "stock_length", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": "\tstock_length = int(request.GET['stock_length'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L13_C1", "label": "cut_thickness = int()", "type": "assigned_variable", "loc": [13, 13], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "vector": [14, 1, 0.3824, 0.0294, 1, 0.38, 0.4286, 792, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "cut_thickness", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": "\tcut_thickness = int(request.GET['cut_thickness'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L14_C1", "label": "custom_lengths =", "type": "assigned_variable", "loc": [14, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "vector": [14, 1, 0.4118, 0.0294, 1, 0.38, 0.5714, 675, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "custom_lengths", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tcustom_lengths = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L15_C1", "label": "custom_lengths_str = replace()", "type": "assigned_variable", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "vector": [14, 1, 0.4412, 0.0294, 1, 0.38, 0.7143, 305, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "custom_lengths_str", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": "\tcustom_lengths_str = request.GET['custom_lengths'].replace(',', ' ')\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:For_L16_C1", "label": "for custom_length", "type": "for", "loc": [16, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "vector": [6, 1, 0.5735, 0.2353, 1, 0.38, 0.8571, 363, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "custom_length", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tfor custom_length in custom_lengths_str.split(' '):\n\t\ttry:\t\t\t\n\t\t\tcustom_length_ext = int(custom_length) + cut_thickness\n\t\t\tif custom_length_ext > stock_length:\n\t\t\t\tcustom_length_ext = stock_length\t\t\t\n\t\t\tcustom_lengths.append(custom_length_ext)\n\t\texcept ValueError:\n\t\t\tpass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L17_C2", "label": "try", "type": "try", "loc": [17, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:For_L16_C1", "vector": [7, 2, 0.5882, 0.2059, 2, 0.96, 0.0, 0, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\ttry:\t\t\t\n\t\t\tcustom_length_ext = int(custom_length) + cut_thickness\n\t\t\tif custom_length_ext > stock_length:\n\t\t\t\tcustom_length_ext = stock_length\t\t\t\n\t\t\tcustom_lengths.append(custom_length_ext)\n\t\texcept ValueError:\n\t\t\tpass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L18_C3", "label": "custom_length_ext =", "type": "assigned_variable", "loc": [18, 18], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L17_C2", "vector": [14, 3, 0.5294, 0.0294, 3, 0.17, 0.0, 664, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "custom_length_ext", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tcustom_length_ext = int(custom_length) + cut_thickness"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:If_L19_C3", "label": "if", "type": "if", "loc": [19, 20], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L17_C2", "vector": [4, 3, 0.5735, 0.0588, 3, 0.17, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif custom_length_ext > stock_length:\n\t\t\t\tcustom_length_ext = stock_length\t\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L20_C4", "label": "custom_length_ext =", "type": "assigned_variable", "loc": [20, 20], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:If_L19_C3", "vector": [14, 4, 0.5882, 0.0294, 4, 0.67, 0.0, 664, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "custom_length_ext", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tcustom_length_ext = stock_length\t\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:Expr_L21_C3", "label": "append()", "type": "expression", "loc": [21, 21], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L17_C2", "vector": [8, 3, 0.6176, 0.0294, 3, 0.17, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\t\tcustom_lengths.append(custom_length_ext)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L25_C1", "label": "try", "type": "try", "loc": [25, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "vector": [7, 1, 0.8529, 0.2647, 1, 0.38, 1.0, 0, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\ttry:\n\t\tcutting_plan = get_1d_cutting_plan(stock_length, custom_lengths, cut_thickness)\n\t\treturn direct_to_template(request, '1d-cutter/1d_cutting_plan_result.html', \n\t\t {'order_num': order_num,\n\t\t 'stock_type': stock_type,\n\t\t\t'cutting_plan': cutting_plan})\n\texcept CalculationError:\t\t\t\t\n\t\treturn direct_to_template(request, '1d-cutter/1d_cutting_plan_error.html', {'error': 'CalculationError'})\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L26_C2", "label": "cutting_plan = get_1d_cutting_plan()", "type": "assigned_variable", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L25_C1", "vector": [14, 2, 0.7647, 0.0294, 2, 0.32, 0.0, 413, 3, 3, 0, 0, 667, 10, 1], "semantic": {"name": "cutting_plan", "arg_names": [], "import_names": [], "rhs_call_name": "get_1d_cutting_plan", "annotation": ""}, "snippet": "\t\tcutting_plan = get_1d_cutting_plan(stock_length, custom_lengths, cut_thickness)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:Return_L27_C2", "label": "return", "type": "return", "loc": [27, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L25_C1", "vector": [13, 2, 0.8382, 0.1176, 2, 0.32, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn direct_to_template(request, '1d-cutter/1d_cutting_plan_result.html', \n\t\t {'order_num': order_num,\n\t\t 'stock_type': stock_type,\n\t\t\t'cutting_plan': cutting_plan})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:Return_L32_C2", "label": "return", "type": "return", "loc": [32, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L25_C1", "vector": [13, 2, 0.9412, 0.0294, 2, 0.32, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn direct_to_template(request, '1d-cutter/1d_cutting_plan_error.html', {'error': 'CalculationError'})\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1431:Return_L33_C2", "label": "return", "type": "return", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L25_C1", "vector": [13, 2, 0.9706, 0.0294, 2, 0.32, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn direct_to_template(request, '1d-cutter/1d_cutting_plan_error.html', {'error': e})"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:Return_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L12_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L13_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L14_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:For_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:For_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L18_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:If_L19_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:If_L19_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:Expr_L21_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L25_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L25_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:Assign_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L25_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:Return_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L25_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:Return_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1431:Try_L25_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_1431:Return_L33_C2"}]
import time, urllib , sys, threading workers = [] pendingurls = [] def ex(line): if "http://" in line: #and (".pls" in line.lower() or ".m3u" in line.lower()): url = line.split("'")[1].replace("''", "") pendingurls.append(url) class Worker(threading.Thread): def run(self): while pendingurls: try: ok = False url = pendingurls.pop() target = urllib.urlopen(url) if target.getcode() == 200: ok = True for line in target: if ("<html" in line.lower()): ok = False break if not ok: print "-------------------" print url print "-------------------" #else: # print self.n ,"ok" except: print "-------------------" print url print "-------------------" workers.remove(self) pendingurls = [] print "parsing file" plsfile = open("radios.pas") for line in plsfile: ex(line) plsfile.close() print "starting threads" for i in range(10): worker = Worker() workers.append(worker) worker.start() print "waiting threads" while workers: time.sleep(1) print len(pendingurls),"remaining" print "done!!!" raw_input()
ajibawa-2023/Python-Code-Large/train/row_1432
44
62
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Import_L1_C0", "label": "time import time, urllib, sys\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0161, 0.0161, 0, 0.66, 0.0, 654, 0, 4, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time", "urllib", "sys", "threading"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time, urllib , sys, threading"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L3_C0", "label": "workers =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.0484, 0.0161, 0, 0.66, 0.0667, 181, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "workers", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "workers = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L4_C0", "label": "pendingurls =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.0645, 0.0161, 0, 0.66, 0.1333, 868, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "pendingurls", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "pendingurls = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:FunctionDef_L6_C0", "label": "ex", "type": "function", "loc": [6, 9], "level": 0, "parent": null, "vector": [2, 0, 0.121, 0.0645, 0, 0.66, 0.2, 212, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "ex", "arg_names": ["line"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def ex(line):\n if \"http://\" in line: #and (\".pls\" in line.lower() or \".m3u\" in line.lower()):\n url = line.split(\"'\")[1].replace(\"''\", \"\")\n pendingurls.append(url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L7_C4", "label": "if", "type": "if", "loc": [7, 9], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:FunctionDef_L6_C0", "vector": [4, 1, 0.129, 0.0484, 1, 0.43, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if \"http://\" in line: #and (\".pls\" in line.lower() or \".m3u\" in line.lower()):\n url = line.split(\"'\")[1].replace(\"''\", \"\")\n pendingurls.append(url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L8_C8", "label": "url = replace()", "type": "assigned_variable", "loc": [8, 8], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L7_C4", "vector": [14, 2, 0.129, 0.0161, 2, 0.84, 0.0, 789, 3, 2, 0, 0, 293, 10, 2], "semantic": {"name": "url", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " url = line.split(\"'\")[1].replace(\"''\", \"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L9_C8", "label": "append()", "type": "expression", "loc": [9, 9], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L7_C4", "vector": [8, 2, 0.1452, 0.0161, 2, 0.84, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " pendingurls.append(url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:ClassDef_L12_C0", "label": "Worker", "type": "class", "loc": [12, 36], "level": 0, "parent": null, "vector": [3, 0, 0.3871, 0.4032, 0, 0.66, 0.2667, 570, 0, 1, 0, 0, 634, 0, 11], "semantic": {"name": "Worker", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Worker(threading.Thread):\n def run(self):\n while pendingurls:\n try:\n ok = False\n url = pendingurls.pop()\n target = urllib.urlopen(url)\n if target.getcode() == 200:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:FunctionDef_L13_C4", "label": "run", "type": "function", "loc": [13, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:ClassDef_L12_C0", "vector": [2, 1, 0.3952, 0.3871, 1, 0.83, 0.0, 679, 0, 1, 0, 0, 0, 0, 11], "semantic": {"name": "run", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def run(self):\n while pendingurls:\n try:\n ok = False\n url = pendingurls.pop()\n target = urllib.urlopen(url)\n if target.getcode() == 200:\n ok = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:While_L14_C8", "label": "while", "type": "while", "loc": [14, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:FunctionDef_L13_C4", "vector": [5, 2, 0.3952, 0.3548, 2, 0.55, 0.0, 0, 2, 0, 0, 0, 0, 0, 10], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while pendingurls:\n try:\n ok = False\n url = pendingurls.pop()\n target = urllib.urlopen(url)\n if target.getcode() == 200:\n ok = True\n for line in target:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "label": "try", "type": "try", "loc": [15, 35], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:While_L14_C8", "vector": [7, 3, 0.4032, 0.3387, 3, 0.63, 0.0, 0, 0, 1, 0, 0, 0, 0, 10], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n ok = False\n url = pendingurls.pop()\n target = urllib.urlopen(url)\n if target.getcode() == 200:\n ok = True\n for line in target:\n if (\"<html\" in line.lower()):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L16_C16", "label": "ok =", "type": "assigned_variable", "loc": [16, 16], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "vector": [14, 4, 0.2581, 0.0161, 4, 0.81, 0.0, 208, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "ok", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ok = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L17_C16", "label": "url = pop()", "type": "assigned_variable", "loc": [17, 17], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "vector": [14, 4, 0.2742, 0.0161, 4, 0.81, 0.25, 789, 3, 0, 0, 0, 969, 10, 1], "semantic": {"name": "url", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " url = pendingurls.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L18_C16", "label": "target = urlopen()", "type": "assigned_variable", "loc": [18, 18], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "vector": [14, 4, 0.2903, 0.0161, 4, 0.81, 0.5, 766, 3, 1, 0, 0, 687, 10, 1], "semantic": {"name": "target", "arg_names": [], "import_names": [], "rhs_call_name": "urlopen", "annotation": ""}, "snippet": " target = urllib.urlopen(url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L19_C16", "label": "if", "type": "if", "loc": [19, 24], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "vector": [4, 4, 0.3468, 0.0968, 4, 0.81, 0.75, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if target.getcode() == 200:\n ok = True\n for line in target:\n if (\"<html\" in line.lower()):\n ok = False\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L20_C20", "label": "ok =", "type": "assigned_variable", "loc": [20, 20], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L19_C16", "vector": [14, 5, 0.3226, 0.0161, 5, 0.43, 0.0, 208, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "ok", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ok = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:For_L21_C20", "label": "for line", "type": "for", "loc": [21, 24], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L19_C16", "vector": [6, 5, 0.3629, 0.0645, 5, 0.43, 1.0, 373, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in target:\n if (\"<html\" in line.lower()):\n ok = False\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L22_C24", "label": "if", "type": "if", "loc": [22, 24], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:For_L21_C20", "vector": [4, 6, 0.371, 0.0484, 6, 0.18, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (\"<html\" in line.lower()):\n ok = False\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L23_C28", "label": "ok =", "type": "assigned_variable", "loc": [23, 23], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L22_C24", "vector": [14, 7, 0.371, 0.0161, 7, 0.87, 0.0, 208, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "ok", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ok = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L25_C16", "label": "if", "type": "if", "loc": [25, 28], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "vector": [4, 4, 0.4274, 0.0645, 4, 0.81, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not ok:\n print(\"-------------------\")\n print(url)\n print(\"-------------------\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L26_C20", "label": "print()", "type": "expression", "loc": [26, 26], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L25_C16", "vector": [8, 5, 0.4194, 0.0161, 5, 0.71, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"-------------------\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L27_C20", "label": "print()", "type": "expression", "loc": [27, 27], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L25_C16", "vector": [8, 5, 0.4355, 0.0161, 5, 0.71, 0.5, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L28_C20", "label": "print()", "type": "expression", "loc": [28, 28], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L25_C16", "vector": [8, 5, 0.4516, 0.0161, 5, 0.71, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"-------------------\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L33_C16", "label": "print()", "type": "expression", "loc": [33, 33], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "vector": [8, 4, 0.5323, 0.0161, 4, 0.81, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"-------------------\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L34_C16", "label": "print()", "type": "expression", "loc": [34, 34], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "vector": [8, 4, 0.5484, 0.0161, 4, 0.81, 0.5, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L35_C16", "label": "print()", "type": "expression", "loc": [35, 35], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "vector": [8, 4, 0.5645, 0.0161, 4, 0.81, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"-------------------\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L36_C8", "label": "remove()", "type": "expression", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:FunctionDef_L13_C4", "vector": [8, 2, 0.5806, 0.0161, 2, 0.55, 1.0, 185, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove", "arg_names": [], "import_names": [], "rhs_call_name": "remove", "annotation": ""}, "snippet": " workers.remove(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L39_C0", "label": "pendingurls =", "type": "assigned_variable", "loc": [39, 39], "level": 0, "parent": null, "vector": [14, 0, 0.629, 0.0161, 0, 0.66, 0.3333, 868, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "pendingurls", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "pendingurls = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L41_C0", "label": "print()", "type": "expression", "loc": [41, 41], "level": 0, "parent": null, "vector": [8, 0, 0.6613, 0.0161, 0, 0.66, 0.4, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"parsing file\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L42_C0", "label": "plsfile = open()", "type": "assigned_variable", "loc": [42, 42], "level": 0, "parent": null, "vector": [14, 0, 0.6774, 0.0161, 0, 0.66, 0.4667, 56, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "plsfile", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": "plsfile = open(\"radios.pas\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:For_L43_C0", "label": "for line", "type": "for", "loc": [43, 44], "level": 0, "parent": null, "vector": [6, 0, 0.7016, 0.0323, 0, 0.66, 0.5333, 373, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for line in plsfile:\n ex(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L44_C4", "label": "ex()", "type": "expression", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:For_L43_C0", "vector": [8, 1, 0.7097, 0.0161, 1, 0.28, 0.0, 212, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "ex", "arg_names": [], "import_names": [], "rhs_call_name": "ex", "annotation": ""}, "snippet": " ex(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L45_C0", "label": "close()", "type": "expression", "loc": [45, 45], "level": 0, "parent": null, "vector": [8, 0, 0.7258, 0.0161, 0, 0.66, 0.6, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": "plsfile.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L47_C0", "label": "print()", "type": "expression", "loc": [47, 47], "level": 0, "parent": null, "vector": [8, 0, 0.7581, 0.0161, 0, 0.66, 0.6667, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"starting threads\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:For_L48_C0", "label": "for i", "type": "for", "loc": [48, 51], "level": 0, "parent": null, "vector": [6, 0, 0.7984, 0.0645, 0, 0.66, 0.7333, 826, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for i in range(10):\n worker = Worker()\n workers.append(worker)\n worker.start()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L49_C4", "label": "worker = Worker()", "type": "assigned_variable", "loc": [49, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:For_L48_C0", "vector": [14, 1, 0.7903, 0.0161, 1, 0.53, 0.0, 814, 3, 0, 0, 0, 570, 10, 1], "semantic": {"name": "worker", "arg_names": [], "import_names": [], "rhs_call_name": "Worker", "annotation": ""}, "snippet": " worker = Worker()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L50_C4", "label": "append()", "type": "expression", "loc": [50, 50], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:For_L48_C0", "vector": [8, 1, 0.8065, 0.0161, 1, 0.53, 0.5, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " workers.append(worker)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L51_C4", "label": "start()", "type": "expression", "loc": [51, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:For_L48_C0", "vector": [8, 1, 0.8226, 0.0161, 1, 0.53, 1.0, 511, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "start", "annotation": ""}, "snippet": " worker.start()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L53_C0", "label": "print()", "type": "expression", "loc": [53, 53], "level": 0, "parent": null, "vector": [8, 0, 0.8548, 0.0161, 0, 0.66, 0.8, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"waiting threads\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:While_L55_C0", "label": "while", "type": "while", "loc": [55, 57], "level": 0, "parent": null, "vector": [5, 0, 0.9032, 0.0484, 0, 0.66, 0.8667, 0, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "while workers:\n time.sleep(1)\n print(len(pendingurls),\"remaining\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L56_C4", "label": "sleep()", "type": "expression", "loc": [56, 56], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:While_L55_C0", "vector": [8, 1, 0.9032, 0.0161, 1, 0.47, 0.0, 476, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "sleep", "arg_names": [], "import_names": [], "rhs_call_name": "sleep", "annotation": ""}, "snippet": " time.sleep(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L57_C4", "label": "print()", "type": "expression", "loc": [57, 57], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1432:While_L55_C0", "vector": [8, 1, 0.9194, 0.0161, 1, 0.47, 1.0, 535, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(len(pendingurls),\"remaining\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L59_C0", "label": "print()", "type": "expression", "loc": [59, 59], "level": 0, "parent": null, "vector": [8, 0, 0.9516, 0.0161, 0, 0.66, 0.9333, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"done!!!\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L60_C0", "label": "raw_input()", "type": "expression", "loc": [60, 60], "level": 0, "parent": null, "vector": [8, 0, 0.9677, 0.0161, 0, 0.66, 1.0, 821, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "raw_input", "arg_names": [], "import_names": [], "rhs_call_name": "raw_input", "annotation": ""}, "snippet": "raw_input()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1432:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:While_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:While_L14_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L16_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L17_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L18_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L19_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L19_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L20_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L19_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:For_L21_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:For_L21_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L22_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L22_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L23_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L25_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L25_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L26_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L25_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L27_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:If_L25_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L28_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L33_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L34_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:Try_L15_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L35_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:For_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:For_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Assign_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:For_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:For_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:While_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1432:While_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1432:Expr_L57_C4"}]
import struct, string, time, os pasw = 704 dst = [] def crypt(text): text = text.replace("http://", "") key = len(text) % 10 result = "" for i in xrange(len(text)): result += chr( ( ord(text[i]) ^ ( (pasw * (i+1)) + key ) ) % 256) return result def writeint8(num): data = struct.pack("B",num) dst.append(data) def writestring(text): l = len(text) data = struct.pack("B" + str(l) + "s",l,text) dst.append(data) def getarraysize(line): return int(line[line.find("..") + 2 : line.find("]")]) + 1 def getarraycontent(line): return line[line.find("'") + 1 : line.rfind("'")].replace("''","'") def error(msg): print 'Houston, we have a problem' print msg raw_input() bParse = False iLevel = -2 genres = [] chn = [] pls = [] totalcount = 0 tStart = time.clock() srcfile = open("radios.pas", "r") # -2 genrelist array # -1 content # 0 chn_ array # 1 content # 2 pls_ array # 3 content for line in srcfile: if "// " in line: # comented line continue if "const" in line: bParse = True elif ");" in line: bParse = False if iLevel < 3: iLevel += 1 else: iLevel = 0 # check if both lists have same size if len(chn) <> len(pls): error("%s chn=%d pls=%d" % (genres[0], len(chn), len(pls))) slist = [] # a list that we will sort for i1, i2 in zip(chn,pls): slist.append((i1,i2)) chn = [] pls = [] slist.sort() totalcount += len(slist) print "%s %d" % (genres[0], len(slist)) # write to file dst.append('\n'); dst.append('+' + genres.pop(0) + '\n') for i1, i2 in slist: dst.append('-' + i1 + '\n') dst.append('1' + i2 + '\n') elif bParse: if iLevel == -2: size = getarraysize(line) print "%d genres" % size iLevel += 1 elif iLevel == -1: genres.append(getarraycontent(line)) elif iLevel in (0,2): iLevel += 1 elif iLevel == 1: chn.append(getarraycontent(line)) elif iLevel == 3: pls.append(getarraycontent(line)) dst = "".join(dst) srcfile.close() dstfile = open("result.txt","w") dstfile.writelines(dst) dstfile.close() print "OK, %d radios converted and saved in %fs" % (totalcount, time.clock() - tStart) raw_input()
ajibawa-2023/Python-Code-Large/train/row_1433
70
113
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Import_L1_C0", "label": "struct import struct, string, time\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0088, 0.0088, 0, 0.66, 0.0, 399, 0, 4, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "import_names": ["struct", "string", "time", "os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import struct, string, time, os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L3_C0", "label": "pasw =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.0265, 0.0088, 0, 0.66, 0.0417, 292, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "pasw", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "pasw = 704"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L5_C0", "label": "dst =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.0442, 0.0088, 0, 0.66, 0.0833, 856, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "dst", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "dst = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L7_C0", "label": "crypt", "type": "function", "loc": [7, 13], "level": 0, "parent": null, "vector": [2, 0, 0.0885, 0.0619, 0, 0.66, 0.125, 100, 0, 1, 1, 0, 0, 0, 6], "semantic": {"name": "crypt", "arg_names": ["text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def crypt(text):\n text = text.replace(\"http://\", \"\")\n key = len(text) % 10\n result = \"\"\n for i in xrange(len(text)):\n result += chr( ( ord(text[i]) ^ ( (pasw * (i+1)) + key ) ) % 256)\n return result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L8_C4", "label": "text = replace()", "type": "assigned_variable", "loc": [8, 8], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L7_C0", "vector": [14, 1, 0.0708, 0.0088, 1, 0.17, 0.0, 439, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " text = text.replace(\"http://\", \"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L9_C4", "label": "key =", "type": "assigned_variable", "loc": [9, 9], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L7_C0", "vector": [14, 1, 0.0796, 0.0088, 1, 0.17, 0.25, 230, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key = len(text) % 10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L10_C4", "label": "result =", "type": "assigned_variable", "loc": [10, 10], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L7_C0", "vector": [14, 1, 0.0885, 0.0088, 1, 0.17, 0.5, 51, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " result = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L11_C4", "label": "for i", "type": "for", "loc": [11, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L7_C0", "vector": [6, 1, 0.1018, 0.0177, 1, 0.17, 0.75, 826, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in xrange(len(text)):\n result += chr( ( ord(text[i]) ^ ( (pasw * (i+1)) + key ) ) % 256)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Return_L13_C4", "label": "return", "type": "return", "loc": [13, 13], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L7_C0", "vector": [13, 1, 0.115, 0.0088, 1, 0.17, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L15_C0", "label": "writeint8", "type": "function", "loc": [15, 17], "level": 0, "parent": null, "vector": [2, 0, 0.1416, 0.0265, 0, 0.66, 0.1667, 960, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "writeint8", "arg_names": ["num"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def writeint8(num):\n data = struct.pack(\"B\",num)\n dst.append(data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L16_C4", "label": "data = pack()", "type": "assigned_variable", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L15_C0", "vector": [14, 1, 0.1416, 0.0088, 1, 0.09, 0.0, 929, 3, 2, 0, 0, 742, 10, 1], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "pack", "annotation": ""}, "snippet": " data = struct.pack(\"B\",num)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L17_C4", "label": "append()", "type": "expression", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L15_C0", "vector": [8, 1, 0.1504, 0.0088, 1, 0.09, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " dst.append(data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L19_C0", "label": "writestring", "type": "function", "loc": [19, 22], "level": 0, "parent": null, "vector": [2, 0, 0.1814, 0.0354, 0, 0.66, 0.2083, 253, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "writestring", "arg_names": ["text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def writestring(text):\n l = len(text)\n data = struct.pack(\"B\" + str(l) + \"s\",l,text)\n dst.append(data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L20_C4", "label": "l = len()", "type": "assigned_variable", "loc": [20, 20], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L19_C0", "vector": [14, 1, 0.177, 0.0088, 1, 0.9, 0.0, 810, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "l", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " l = len(text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L21_C4", "label": "data = pack()", "type": "assigned_variable", "loc": [21, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L19_C0", "vector": [14, 1, 0.1858, 0.0088, 1, 0.9, 0.5, 929, 3, 3, 0, 0, 742, 10, 2], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "pack", "annotation": ""}, "snippet": " data = struct.pack(\"B\" + str(l) + \"s\",l,text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L22_C4", "label": "append()", "type": "expression", "loc": [22, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L19_C0", "vector": [8, 1, 0.1947, 0.0088, 1, 0.9, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " dst.append(data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L24_C0", "label": "getarraysize", "type": "function", "loc": [24, 25], "level": 0, "parent": null, "vector": [2, 0, 0.2168, 0.0177, 0, 0.66, 0.25, 389, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "getarraysize", "arg_names": ["line"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def getarraysize(line):\n return int(line[line.find(\"..\") + 2 : line.find(\"]\")]) + 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Return_L25_C4", "label": "return", "type": "return", "loc": [25, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L24_C0", "vector": [13, 1, 0.2212, 0.0088, 1, 0.89, 0.0, 0, 4, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return int(line[line.find(\"..\") + 2 : line.find(\"]\")]) + 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L27_C0", "label": "getarraycontent", "type": "function", "loc": [27, 28], "level": 0, "parent": null, "vector": [2, 0, 0.2434, 0.0177, 0, 0.66, 0.2917, 289, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "getarraycontent", "arg_names": ["line"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def getarraycontent(line):\n return line[line.find(\"'\") + 1 : line.rfind(\"'\")].replace(\"''\",\"'\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Return_L28_C4", "label": "return", "type": "return", "loc": [28, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L27_C0", "vector": [13, 1, 0.2478, 0.0088, 1, 0.18, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return line[line.find(\"'\") + 1 : line.rfind(\"'\")].replace(\"''\",\"'\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L30_C0", "label": "error", "type": "function", "loc": [30, 33], "level": 0, "parent": null, "vector": [2, 0, 0.2788, 0.0354, 0, 0.66, 0.3333, 771, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "error", "arg_names": ["msg"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def error(msg):\n\tprint('Houston, we have a problem')\n\tprint(msg)\n\traw_input()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L31_C1", "label": "print()", "type": "expression", "loc": [31, 31], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L30_C0", "vector": [8, 1, 0.2743, 0.0088, 1, 0.32, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\tprint('Houston, we have a problem')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L32_C1", "label": "print()", "type": "expression", "loc": [32, 32], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L30_C0", "vector": [8, 1, 0.2832, 0.0088, 1, 0.32, 0.5, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\tprint(msg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L33_C1", "label": "raw_input()", "type": "expression", "loc": [33, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L30_C0", "vector": [8, 1, 0.292, 0.0088, 1, 0.32, 1.0, 821, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "raw_input", "arg_names": [], "import_names": [], "rhs_call_name": "raw_input", "annotation": ""}, "snippet": "\traw_input()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L35_C0", "label": "bParse =", "type": "assigned_variable", "loc": [35, 35], "level": 0, "parent": null, "vector": [14, 0, 0.3097, 0.0088, 0, 0.66, 0.375, 95, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "bParse", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "bParse = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L36_C0", "label": "iLevel =", "type": "assigned_variable", "loc": [36, 36], "level": 0, "parent": null, "vector": [14, 0, 0.3186, 0.0088, 0, 0.66, 0.4167, 175, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "iLevel", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "iLevel = -2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L37_C0", "label": "genres =", "type": "assigned_variable", "loc": [37, 37], "level": 0, "parent": null, "vector": [14, 0, 0.3274, 0.0088, 0, 0.66, 0.4583, 475, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "genres", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "genres = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L38_C0", "label": "chn =", "type": "assigned_variable", "loc": [38, 38], "level": 0, "parent": null, "vector": [14, 0, 0.3363, 0.0088, 0, 0.66, 0.5, 433, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "chn", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "chn = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L39_C0", "label": "pls =", "type": "assigned_variable", "loc": [39, 39], "level": 0, "parent": null, "vector": [14, 0, 0.3451, 0.0088, 0, 0.66, 0.5417, 792, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "pls", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "pls = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L40_C0", "label": "totalcount =", "type": "assigned_variable", "loc": [40, 40], "level": 0, "parent": null, "vector": [14, 0, 0.354, 0.0088, 0, 0.66, 0.5833, 509, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "totalcount", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "totalcount = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L41_C0", "label": "tStart = clock()", "type": "assigned_variable", "loc": [41, 41], "level": 0, "parent": null, "vector": [14, 0, 0.3628, 0.0088, 0, 0.66, 0.625, 154, 3, 0, 0, 0, 937, 10, 1], "semantic": {"name": "tStart", "arg_names": [], "import_names": [], "rhs_call_name": "clock", "annotation": ""}, "snippet": "tStart = time.clock()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L43_C0", "label": "srcfile = open()", "type": "assigned_variable", "loc": [43, 43], "level": 0, "parent": null, "vector": [14, 0, 0.3805, 0.0088, 0, 0.66, 0.6667, 181, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "srcfile", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": "srcfile = open(\"radios.pas\", \"r\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L54_C0", "label": "for line", "type": "for", "loc": [54, 101], "level": 0, "parent": null, "vector": [6, 0, 0.6858, 0.4248, 0, 0.66, 0.7083, 373, 2, 0, 0, 0, 0, 0, 19], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for line in srcfile:\n if \"// \" in line: # comented line\n continue\n \n if \"const\" in line:\n bParse = True\n\n elif \");\" in line:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L55_C4", "label": "if", "type": "if", "loc": [55, 56], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L54_C0", "vector": [4, 1, 0.4912, 0.0177, 1, 0.34, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if \"// \" in line: # comented line\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L58_C4", "label": "if", "type": "if", "loc": [58, 101], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L54_C0", "vector": [4, 1, 0.7035, 0.3894, 1, 0.34, 1.0, 0, 0, 0, 0, 0, 0, 0, 19], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if \"const\" in line:\n bParse = True\n\n elif \");\" in line:\n bParse = False\n if iLevel < 3:\n iLevel += 1\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L59_C8", "label": "bParse =", "type": "assigned_variable", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L58_C4", "vector": [14, 2, 0.5221, 0.0088, 2, 0.41, 0.0, 95, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "bParse", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " bParse = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L61_C4", "label": "if", "type": "if", "loc": [61, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L58_C4", "vector": [4, 2, 0.7168, 0.3628, 2, 0.41, 1.0, 0, 0, 0, 0, 0, 0, 0, 19], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif \");\" in line:\n bParse = False\n if iLevel < 3:\n iLevel += 1\n else:\n iLevel = 0\n \n\t # check if both lists have same size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L62_C8", "label": "bParse =", "type": "assigned_variable", "loc": [62, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L61_C4", "vector": [14, 3, 0.5487, 0.0088, 3, 0.57, 0.0, 95, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "bParse", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " bParse = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "label": "if", "type": "if", "loc": [63, 87], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L61_C4", "vector": [4, 3, 0.6637, 0.2212, 3, 0.57, 0.5, 0, 0, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if iLevel < 3:\n iLevel += 1\n else:\n iLevel = 0\n \n\t # check if both lists have same size\n\n slist = [] # a list that we will sort"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L66_C12", "label": "iLevel =", "type": "assigned_variable", "loc": [66, 66], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "vector": [14, 4, 0.5841, 0.0088, 4, 0.51, 0.0, 175, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "iLevel", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " iLevel = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L70_C12", "label": "slist =", "type": "assigned_variable", "loc": [70, 70], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "vector": [14, 4, 0.6195, 0.0088, 4, 0.51, 0.1111, 186, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "slist", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " slist = [] # a list that we will sort"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L71_C12", "label": "for i1, i2", "type": "for", "loc": [71, 72], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "vector": [6, 4, 0.6327, 0.0177, 4, 0.51, 0.2222, 236, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i1, i2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i1, i2 in zip(chn,pls):\n slist.append((i1,i2))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L72_C16", "label": "append()", "type": "expression", "loc": [72, 72], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L71_C12", "vector": [8, 5, 0.6372, 0.0088, 5, 0.94, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " slist.append((i1,i2))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L74_C12", "label": "chn =", "type": "assigned_variable", "loc": [74, 74], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "vector": [14, 4, 0.6549, 0.0088, 4, 0.51, 0.3333, 433, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "chn", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " chn = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L75_C12", "label": "pls =", "type": "assigned_variable", "loc": [75, 75], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "vector": [14, 4, 0.6637, 0.0088, 4, 0.51, 0.4444, 792, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "pls", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pls = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L76_C12", "label": "sort()", "type": "expression", "loc": [76, 76], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "vector": [8, 4, 0.6726, 0.0088, 4, 0.51, 0.5556, 489, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "sort", "arg_names": [], "import_names": [], "rhs_call_name": "sort", "annotation": ""}, "snippet": " slist.sort()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L80_C12", "label": "print()", "type": "expression", "loc": [80, 80], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "vector": [8, 4, 0.708, 0.0088, 4, 0.51, 0.6667, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"%s %d\" % (genres[0], len(slist)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L83_C12", "label": "append()", "type": "expression", "loc": [83, 83], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "vector": [8, 4, 0.7345, 0.0088, 4, 0.51, 0.7778, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " dst.append('\\n');"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L84_C12", "label": "append()", "type": "expression", "loc": [84, 84], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "vector": [8, 4, 0.7434, 0.0088, 4, 0.51, 0.8889, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " dst.append('+' + genres.pop(0) + '\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L85_C12", "label": "for i1, i2", "type": "for", "loc": [85, 87], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "vector": [6, 4, 0.7611, 0.0265, 4, 0.51, 1.0, 236, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i1, i2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i1, i2 in slist:\n dst.append('-' + i1 + '\\n')\n dst.append('1' + i2 + '\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L86_C16", "label": "append()", "type": "expression", "loc": [86, 86], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L85_C12", "vector": [8, 5, 0.7611, 0.0088, 5, 0.5, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " dst.append('-' + i1 + '\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L87_C16", "label": "append()", "type": "expression", "loc": [87, 87], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L85_C12", "vector": [8, 5, 0.7699, 0.0088, 5, 0.5, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " dst.append('1' + i2 + '\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L89_C4", "label": "if", "type": "if", "loc": [89, 101], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L61_C4", "vector": [4, 3, 0.8407, 0.115, 3, 0.57, 1.0, 0, 2, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif bParse:\n if iLevel == -2:\n size = getarraysize(line)\n print(\"%d genres\" % size)\n iLevel += 1\n elif iLevel == -1:\n genres.append(getarraycontent(line))\n elif iLevel in (0,2):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L90_C8", "label": "if", "type": "if", "loc": [90, 101], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L89_C4", "vector": [4, 4, 0.8451, 0.1062, 4, 0.16, 0.0, 0, 0, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if iLevel == -2:\n size = getarraysize(line)\n print(\"%d genres\" % size)\n iLevel += 1\n elif iLevel == -1:\n genres.append(getarraycontent(line))\n elif iLevel in (0,2):\n iLevel += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L91_C12", "label": "size = getarraysize()", "type": "assigned_variable", "loc": [91, 91], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L90_C8", "vector": [14, 5, 0.8053, 0.0088, 5, 0.69, 0.0, 714, 3, 1, 0, 0, 389, 10, 1], "semantic": {"name": "size", "arg_names": [], "import_names": [], "rhs_call_name": "getarraysize", "annotation": ""}, "snippet": " size = getarraysize(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L92_C12", "label": "print()", "type": "expression", "loc": [92, 92], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L90_C8", "vector": [8, 5, 0.8142, 0.0088, 5, 0.69, 0.5, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"%d genres\" % size)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L94_C8", "label": "if", "type": "if", "loc": [94, 101], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L90_C8", "vector": [4, 5, 0.8628, 0.0708, 5, 0.69, 1.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif iLevel == -1:\n genres.append(getarraycontent(line))\n elif iLevel in (0,2):\n iLevel += 1\n elif iLevel == 1:\n chn.append(getarraycontent(line))\n elif iLevel == 3:\n pls.append(getarraycontent(line))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L95_C12", "label": "append()", "type": "expression", "loc": [95, 95], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L94_C8", "vector": [8, 6, 0.8407, 0.0088, 6, 0.16, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " genres.append(getarraycontent(line))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L96_C8", "label": "if", "type": "if", "loc": [96, 101], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L94_C8", "vector": [4, 6, 0.8717, 0.0531, 6, 0.16, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif iLevel in (0,2):\n iLevel += 1\n elif iLevel == 1:\n chn.append(getarraycontent(line))\n elif iLevel == 3:\n pls.append(getarraycontent(line))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L98_C8", "label": "if", "type": "if", "loc": [98, 101], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L96_C8", "vector": [4, 7, 0.8805, 0.0354, 7, 0.74, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif iLevel == 1:\n chn.append(getarraycontent(line))\n elif iLevel == 3:\n pls.append(getarraycontent(line))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L99_C12", "label": "append()", "type": "expression", "loc": [99, 99], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L98_C8", "vector": [8, 8, 0.8761, 0.0088, 8, 0.29, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " chn.append(getarraycontent(line))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L100_C8", "label": "if", "type": "if", "loc": [100, 101], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L98_C8", "vector": [4, 8, 0.8894, 0.0177, 8, 0.29, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif iLevel == 3:\n pls.append(getarraycontent(line))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L101_C12", "label": "append()", "type": "expression", "loc": [101, 101], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L100_C8", "vector": [8, 9, 0.8938, 0.0088, 9, 0.33, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " pls.append(getarraycontent(line))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L103_C0", "label": "dst = join()", "type": "assigned_variable", "loc": [103, 103], "level": 0, "parent": null, "vector": [14, 0, 0.9115, 0.0088, 0, 0.66, 0.75, 856, 3, 1, 0, 0, 933, 10, 1], "semantic": {"name": "dst", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": "dst = \"\".join(dst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L104_C0", "label": "close()", "type": "expression", "loc": [104, 104], "level": 0, "parent": null, "vector": [8, 0, 0.9204, 0.0088, 0, 0.66, 0.7917, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": "srcfile.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L106_C0", "label": "dstfile = open()", "type": "assigned_variable", "loc": [106, 106], "level": 0, "parent": null, "vector": [14, 0, 0.9381, 0.0088, 0, 0.66, 0.8333, 588, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "dstfile", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": "dstfile = open(\"result.txt\",\"w\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L108_C0", "label": "writelines()", "type": "expression", "loc": [108, 108], "level": 0, "parent": null, "vector": [8, 0, 0.9558, 0.0088, 0, 0.66, 0.875, 290, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "writelines", "arg_names": [], "import_names": [], "rhs_call_name": "writelines", "annotation": ""}, "snippet": "dstfile.writelines(dst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L110_C0", "label": "close()", "type": "expression", "loc": [110, 110], "level": 0, "parent": null, "vector": [8, 0, 0.9735, 0.0088, 0, 0.66, 0.9167, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": "dstfile.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L112_C0", "label": "print()", "type": "expression", "loc": [112, 112], "level": 0, "parent": null, "vector": [8, 0, 0.9912, 0.0088, 0, 0.66, 0.9583, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"OK, %d radios converted and saved in %fs\" % (totalcount, time.clock() - tStart))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L113_C0", "label": "raw_input()", "type": "expression", "loc": [113, 113], "level": 0, "parent": null, "vector": [8, 0, 1.0, 0.0088, 0, 0.66, 1.0, 821, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "raw_input", "arg_names": [], "import_names": [], "rhs_call_name": "raw_input", "annotation": ""}, "snippet": "raw_input()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Return_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Return_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Return_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L31_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L32_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L33_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L58_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L58_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L66_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L70_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L71_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L71_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L72_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L74_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L75_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L76_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L80_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L83_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L84_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L63_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L85_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L85_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L86_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:For_L85_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L87_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L89_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L90_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L90_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Assign_L91_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L90_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L92_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L90_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L94_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L95_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L94_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L96_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L98_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L98_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L99_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L98_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L100_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1433:If_L100_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1433:Expr_L101_C12"}]
import struct, string, time, os pasw = 704 dst = [] def crypt(text): text = text.replace("http://", "") return text #key = len(text) % 10 #result = "" #for i in xrange(len(text)): # result += chr( ( ord(text[i]) ^ ( (pasw * (i+1)) + key ) ) % 256) #return result def writeint8(num): data = struct.pack("B",num) dst.append(data) def writestring(text): l = len(text) data = struct.pack("B" + str(l) + "s",l,text) dst.append(data) def getarraysize(line): return int(line[line.find("..") + 2 : line.find("]")]) + 1 def getarraycontent(line): return line[line.find("'") + 1 : line.rfind("'")].replace("''","'") def error(msg): print 'Houston, we have a problem' print msg raw_input() bParse = False iLevel = -2 genres = [] chn = [] pls = [] totalcount = 0 tStart = time.clock() srcfile = open("radios.pas", "r") dstfile = open("db.dat", "wb") # -2 genrelist array # -1 content # 0 chn_ array # 1 content # 2 pls_ array # 3 content for line in srcfile: if "// " in line: # comented line continue if "const" in line: bParse = True elif ");" in line: bParse = False if iLevel < 3: iLevel += 1 else: iLevel = 0 # check if both lists have same size if len(chn) <> len(pls): error("%s chn=%d pls=%d" % (genres[0], len(chn), len(pls))) slist = [] # a list that we will sort for i1, i2 in zip(chn,pls): slist.append((i1,i2)) chn = [] pls = [] slist.sort() totalcount += len(slist) print "%s %d" % (genres[0], len(slist)) # write to file writestring(genres.pop(0)) writeint8(len(slist)) for i1, i2 in slist: writestring(i1) writestring(crypt(i2)) elif bParse: if iLevel == -2: size = getarraysize(line) print "%d genres" % size writeint8(size) iLevel += 1 elif iLevel == -1: genres.append(getarraycontent(line)) elif iLevel in (0,2): iLevel += 1 elif iLevel == 1: chn.append(getarraycontent(line)) elif iLevel == 3: pls.append(getarraycontent(line)) dst = "".join(dst) dstfile.write(dst) dstfile.close() srcfile.close() dstsize = len(dst) dstfile = open("../engine/db.inc","w") dstfile.write("const dbdata : array[0..%d] of Byte = (\n" % (dstsize -1 ,)) srcpos = 0 for c in dst: if srcpos > 0: dstfile.write(",") if srcpos % 12 == 0: dstfile.write("\n") dstfile.write(str(ord(c))) srcpos += 1 dstfile.write("\n);"); dstfile.close() print "OK, %d radios sorted and saved in %fs" % (totalcount, time.clock() - tStart) raw_input()
ajibawa-2023/Python-Code-Large/train/row_1434
80
130
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Import_L1_C0", "label": "struct import struct, string, time\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0077, 0.0077, 0, 0.66, 0.0, 399, 0, 4, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "import_names": ["struct", "string", "time", "os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import struct, string, time, os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L3_C0", "label": "pasw =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.0231, 0.0077, 0, 0.66, 0.0323, 292, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "pasw", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "pasw = 704"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L5_C0", "label": "dst =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.0385, 0.0077, 0, 0.66, 0.0645, 856, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "dst", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "dst = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L7_C0", "label": "crypt", "type": "function", "loc": [7, 9], "level": 0, "parent": null, "vector": [2, 0, 0.0615, 0.0231, 0, 0.66, 0.0968, 100, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "crypt", "arg_names": ["text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def crypt(text):\n text = text.replace(\"http://\", \"\")\n return text"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L8_C4", "label": "text = replace()", "type": "assigned_variable", "loc": [8, 8], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L7_C0", "vector": [14, 1, 0.0615, 0.0077, 1, 0.03, 0.0, 439, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " text = text.replace(\"http://\", \"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Return_L9_C4", "label": "return", "type": "return", "loc": [9, 9], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L7_C0", "vector": [13, 1, 0.0692, 0.0077, 1, 0.03, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return text"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L16_C0", "label": "writeint8", "type": "function", "loc": [16, 18], "level": 0, "parent": null, "vector": [2, 0, 0.1308, 0.0231, 0, 0.66, 0.129, 960, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "writeint8", "arg_names": ["num"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def writeint8(num):\n data = struct.pack(\"B\",num)\n dst.append(data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L17_C4", "label": "data = pack()", "type": "assigned_variable", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L16_C0", "vector": [14, 1, 0.1308, 0.0077, 1, 0.71, 0.0, 929, 3, 2, 0, 0, 742, 10, 1], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "pack", "annotation": ""}, "snippet": " data = struct.pack(\"B\",num)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L18_C4", "label": "append()", "type": "expression", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L16_C0", "vector": [8, 1, 0.1385, 0.0077, 1, 0.71, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " dst.append(data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L20_C0", "label": "writestring", "type": "function", "loc": [20, 23], "level": 0, "parent": null, "vector": [2, 0, 0.1654, 0.0308, 0, 0.66, 0.1613, 253, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "writestring", "arg_names": ["text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def writestring(text):\n l = len(text)\n data = struct.pack(\"B\" + str(l) + \"s\",l,text)\n dst.append(data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L21_C4", "label": "l = len()", "type": "assigned_variable", "loc": [21, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L20_C0", "vector": [14, 1, 0.1615, 0.0077, 1, 0.77, 0.0, 810, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "l", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " l = len(text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L22_C4", "label": "data = pack()", "type": "assigned_variable", "loc": [22, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L20_C0", "vector": [14, 1, 0.1692, 0.0077, 1, 0.77, 0.5, 929, 3, 3, 0, 0, 742, 10, 2], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "pack", "annotation": ""}, "snippet": " data = struct.pack(\"B\" + str(l) + \"s\",l,text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L23_C4", "label": "append()", "type": "expression", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L20_C0", "vector": [8, 1, 0.1769, 0.0077, 1, 0.77, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " dst.append(data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L25_C0", "label": "getarraysize", "type": "function", "loc": [25, 26], "level": 0, "parent": null, "vector": [2, 0, 0.1962, 0.0154, 0, 0.66, 0.1935, 389, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "getarraysize", "arg_names": ["line"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def getarraysize(line):\n return int(line[line.find(\"..\") + 2 : line.find(\"]\")]) + 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Return_L26_C4", "label": "return", "type": "return", "loc": [26, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L25_C0", "vector": [13, 1, 0.2, 0.0077, 1, 0.1, 0.0, 0, 4, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return int(line[line.find(\"..\") + 2 : line.find(\"]\")]) + 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L28_C0", "label": "getarraycontent", "type": "function", "loc": [28, 29], "level": 0, "parent": null, "vector": [2, 0, 0.2192, 0.0154, 0, 0.66, 0.2258, 289, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "getarraycontent", "arg_names": ["line"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def getarraycontent(line):\n return line[line.find(\"'\") + 1 : line.rfind(\"'\")].replace(\"''\",\"'\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Return_L29_C4", "label": "return", "type": "return", "loc": [29, 29], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L28_C0", "vector": [13, 1, 0.2231, 0.0077, 1, 0.85, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return line[line.find(\"'\") + 1 : line.rfind(\"'\")].replace(\"''\",\"'\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L31_C0", "label": "error", "type": "function", "loc": [31, 34], "level": 0, "parent": null, "vector": [2, 0, 0.25, 0.0308, 0, 0.66, 0.2581, 771, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "error", "arg_names": ["msg"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def error(msg):\n\tprint('Houston, we have a problem')\n\tprint(msg)\n\traw_input()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L32_C1", "label": "print()", "type": "expression", "loc": [32, 32], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L31_C0", "vector": [8, 1, 0.2462, 0.0077, 1, 0.95, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\tprint('Houston, we have a problem')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L33_C1", "label": "print()", "type": "expression", "loc": [33, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L31_C0", "vector": [8, 1, 0.2538, 0.0077, 1, 0.95, 0.5, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\tprint(msg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L34_C1", "label": "raw_input()", "type": "expression", "loc": [34, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L31_C0", "vector": [8, 1, 0.2615, 0.0077, 1, 0.95, 1.0, 821, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "raw_input", "arg_names": [], "import_names": [], "rhs_call_name": "raw_input", "annotation": ""}, "snippet": "\traw_input()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L36_C0", "label": "bParse =", "type": "assigned_variable", "loc": [36, 36], "level": 0, "parent": null, "vector": [14, 0, 0.2769, 0.0077, 0, 0.66, 0.2903, 95, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "bParse", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "bParse = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L37_C0", "label": "iLevel =", "type": "assigned_variable", "loc": [37, 37], "level": 0, "parent": null, "vector": [14, 0, 0.2846, 0.0077, 0, 0.66, 0.3226, 175, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "iLevel", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "iLevel = -2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L38_C0", "label": "genres =", "type": "assigned_variable", "loc": [38, 38], "level": 0, "parent": null, "vector": [14, 0, 0.2923, 0.0077, 0, 0.66, 0.3548, 475, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "genres", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "genres = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L39_C0", "label": "chn =", "type": "assigned_variable", "loc": [39, 39], "level": 0, "parent": null, "vector": [14, 0, 0.3, 0.0077, 0, 0.66, 0.3871, 433, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "chn", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "chn = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L40_C0", "label": "pls =", "type": "assigned_variable", "loc": [40, 40], "level": 0, "parent": null, "vector": [14, 0, 0.3077, 0.0077, 0, 0.66, 0.4194, 792, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "pls", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "pls = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L41_C0", "label": "totalcount =", "type": "assigned_variable", "loc": [41, 41], "level": 0, "parent": null, "vector": [14, 0, 0.3154, 0.0077, 0, 0.66, 0.4516, 509, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "totalcount", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "totalcount = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L42_C0", "label": "tStart = clock()", "type": "assigned_variable", "loc": [42, 42], "level": 0, "parent": null, "vector": [14, 0, 0.3231, 0.0077, 0, 0.66, 0.4839, 154, 3, 0, 0, 0, 937, 10, 1], "semantic": {"name": "tStart", "arg_names": [], "import_names": [], "rhs_call_name": "clock", "annotation": ""}, "snippet": "tStart = time.clock()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L44_C0", "label": "srcfile = open()", "type": "assigned_variable", "loc": [44, 44], "level": 0, "parent": null, "vector": [14, 0, 0.3385, 0.0077, 0, 0.66, 0.5161, 181, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "srcfile", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": "srcfile = open(\"radios.pas\", \"r\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L45_C0", "label": "dstfile = open()", "type": "assigned_variable", "loc": [45, 45], "level": 0, "parent": null, "vector": [14, 0, 0.3462, 0.0077, 0, 0.66, 0.5484, 588, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "dstfile", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": "dstfile = open(\"db.dat\", \"wb\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L56_C0", "label": "for line", "type": "for", "loc": [56, 104], "level": 0, "parent": null, "vector": [6, 0, 0.6154, 0.3769, 0, 0.66, 0.5806, 373, 2, 0, 0, 0, 0, 0, 22], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for line in srcfile:\n if \"// \" in line: # comented line\n continue\n \n if \"const\" in line:\n bParse = True\n\n elif \");\" in line:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L57_C4", "label": "if", "type": "if", "loc": [57, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L56_C0", "vector": [4, 1, 0.4423, 0.0154, 1, 0.05, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if \"// \" in line: # comented line\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L60_C4", "label": "if", "type": "if", "loc": [60, 104], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L56_C0", "vector": [4, 1, 0.6308, 0.3462, 1, 0.05, 1.0, 0, 0, 0, 0, 0, 0, 0, 22], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if \"const\" in line:\n bParse = True\n\n elif \");\" in line:\n bParse = False\n if iLevel < 3:\n iLevel += 1\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L61_C8", "label": "bParse =", "type": "assigned_variable", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L60_C4", "vector": [14, 2, 0.4692, 0.0077, 2, 0.7, 0.0, 95, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "bParse", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " bParse = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L63_C4", "label": "if", "type": "if", "loc": [63, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L60_C4", "vector": [4, 2, 0.6423, 0.3231, 2, 0.7, 1.0, 0, 0, 0, 0, 0, 0, 0, 22], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif \");\" in line:\n bParse = False\n if iLevel < 3:\n iLevel += 1\n else:\n iLevel = 0\n \n\t # check if both lists have same size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L64_C8", "label": "bParse =", "type": "assigned_variable", "loc": [64, 64], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L63_C4", "vector": [14, 3, 0.4923, 0.0077, 3, 0.05, 0.0, 95, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "bParse", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " bParse = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "label": "if", "type": "if", "loc": [65, 89], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L63_C4", "vector": [4, 3, 0.5923, 0.1923, 3, 0.05, 0.5, 0, 0, 0, 0, 0, 0, 0, 13], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if iLevel < 3:\n iLevel += 1\n else:\n iLevel = 0\n \n\t # check if both lists have same size\n\n slist = [] # a list that we will sort"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L68_C12", "label": "iLevel =", "type": "assigned_variable", "loc": [68, 68], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "vector": [14, 4, 0.5231, 0.0077, 4, 0.38, 0.0, 175, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "iLevel", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " iLevel = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L72_C12", "label": "slist =", "type": "assigned_variable", "loc": [72, 72], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "vector": [14, 4, 0.5538, 0.0077, 4, 0.38, 0.1111, 186, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "slist", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " slist = [] # a list that we will sort"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L73_C12", "label": "for i1, i2", "type": "for", "loc": [73, 74], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "vector": [6, 4, 0.5654, 0.0154, 4, 0.38, 0.2222, 236, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i1, i2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i1, i2 in zip(chn,pls):\n slist.append((i1,i2))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L74_C16", "label": "append()", "type": "expression", "loc": [74, 74], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L73_C12", "vector": [8, 5, 0.5692, 0.0077, 5, 0.99, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " slist.append((i1,i2))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L76_C12", "label": "chn =", "type": "assigned_variable", "loc": [76, 76], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "vector": [14, 4, 0.5846, 0.0077, 4, 0.38, 0.3333, 433, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "chn", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " chn = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L77_C12", "label": "pls =", "type": "assigned_variable", "loc": [77, 77], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "vector": [14, 4, 0.5923, 0.0077, 4, 0.38, 0.4444, 792, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "pls", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pls = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L78_C12", "label": "sort()", "type": "expression", "loc": [78, 78], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "vector": [8, 4, 0.6, 0.0077, 4, 0.38, 0.5556, 489, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "sort", "arg_names": [], "import_names": [], "rhs_call_name": "sort", "annotation": ""}, "snippet": " slist.sort()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L82_C12", "label": "print()", "type": "expression", "loc": [82, 82], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "vector": [8, 4, 0.6308, 0.0077, 4, 0.38, 0.6667, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"%s %d\" % (genres[0], len(slist)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L85_C12", "label": "writestring()", "type": "expression", "loc": [85, 85], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "vector": [8, 4, 0.6538, 0.0077, 4, 0.38, 0.7778, 253, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "writestring", "arg_names": [], "import_names": [], "rhs_call_name": "writestring", "annotation": ""}, "snippet": " writestring(genres.pop(0))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L86_C12", "label": "writeint8()", "type": "expression", "loc": [86, 86], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "vector": [8, 4, 0.6615, 0.0077, 4, 0.38, 0.8889, 960, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "writeint8", "arg_names": [], "import_names": [], "rhs_call_name": "writeint8", "annotation": ""}, "snippet": " writeint8(len(slist))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L87_C12", "label": "for i1, i2", "type": "for", "loc": [87, 89], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "vector": [6, 4, 0.6769, 0.0231, 4, 0.38, 1.0, 236, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "i1, i2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i1, i2 in slist:\n writestring(i1)\n writestring(crypt(i2))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L88_C16", "label": "writestring()", "type": "expression", "loc": [88, 88], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L87_C12", "vector": [8, 5, 0.6769, 0.0077, 5, 0.85, 0.0, 253, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "writestring", "arg_names": [], "import_names": [], "rhs_call_name": "writestring", "annotation": ""}, "snippet": " writestring(i1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L89_C16", "label": "writestring()", "type": "expression", "loc": [89, 89], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L87_C12", "vector": [8, 5, 0.6846, 0.0077, 5, 0.85, 1.0, 253, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "writestring", "arg_names": [], "import_names": [], "rhs_call_name": "writestring", "annotation": ""}, "snippet": " writestring(crypt(i2))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L91_C4", "label": "if", "type": "if", "loc": [91, 104], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L63_C4", "vector": [4, 3, 0.75, 0.1077, 3, 0.05, 1.0, 0, 2, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif bParse:\n if iLevel == -2:\n size = getarraysize(line)\n print(\"%d genres\" % size)\n writeint8(size)\n iLevel += 1\n elif iLevel == -1:\n genres.append(getarraycontent(line))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L92_C8", "label": "if", "type": "if", "loc": [92, 104], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L91_C4", "vector": [4, 4, 0.7538, 0.1, 4, 0.51, 0.0, 0, 0, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if iLevel == -2:\n size = getarraysize(line)\n print(\"%d genres\" % size)\n writeint8(size)\n iLevel += 1\n elif iLevel == -1:\n genres.append(getarraycontent(line))\n elif iLevel in (0,2):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L93_C12", "label": "size = getarraysize()", "type": "assigned_variable", "loc": [93, 93], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L92_C8", "vector": [14, 5, 0.7154, 0.0077, 5, 0.06, 0.0, 714, 3, 1, 0, 0, 389, 10, 1], "semantic": {"name": "size", "arg_names": [], "import_names": [], "rhs_call_name": "getarraysize", "annotation": ""}, "snippet": " size = getarraysize(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L94_C12", "label": "print()", "type": "expression", "loc": [94, 94], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L92_C8", "vector": [8, 5, 0.7231, 0.0077, 5, 0.06, 0.3333, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"%d genres\" % size)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L95_C12", "label": "writeint8()", "type": "expression", "loc": [95, 95], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L92_C8", "vector": [8, 5, 0.7308, 0.0077, 5, 0.06, 0.6667, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "writeint8", "arg_names": [], "import_names": [], "rhs_call_name": "writeint8", "annotation": ""}, "snippet": " writeint8(size)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L97_C8", "label": "if", "type": "if", "loc": [97, 104], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L92_C8", "vector": [4, 5, 0.7731, 0.0615, 5, 0.06, 1.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif iLevel == -1:\n genres.append(getarraycontent(line))\n elif iLevel in (0,2):\n iLevel += 1\n elif iLevel == 1:\n chn.append(getarraycontent(line))\n elif iLevel == 3:\n pls.append(getarraycontent(line))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L98_C12", "label": "append()", "type": "expression", "loc": [98, 98], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L97_C8", "vector": [8, 6, 0.7538, 0.0077, 6, 0.62, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " genres.append(getarraycontent(line))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L99_C8", "label": "if", "type": "if", "loc": [99, 104], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L97_C8", "vector": [4, 6, 0.7808, 0.0462, 6, 0.62, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif iLevel in (0,2):\n iLevel += 1\n elif iLevel == 1:\n chn.append(getarraycontent(line))\n elif iLevel == 3:\n pls.append(getarraycontent(line))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L101_C8", "label": "if", "type": "if", "loc": [101, 104], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L99_C8", "vector": [4, 7, 0.7885, 0.0308, 7, 0.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif iLevel == 1:\n chn.append(getarraycontent(line))\n elif iLevel == 3:\n pls.append(getarraycontent(line))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L102_C12", "label": "append()", "type": "expression", "loc": [102, 102], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L101_C8", "vector": [8, 8, 0.7846, 0.0077, 8, 0.34, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " chn.append(getarraycontent(line))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L103_C8", "label": "if", "type": "if", "loc": [103, 104], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L101_C8", "vector": [4, 8, 0.7962, 0.0154, 8, 0.34, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif iLevel == 3:\n pls.append(getarraycontent(line))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L104_C12", "label": "append()", "type": "expression", "loc": [104, 104], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L103_C8", "vector": [8, 9, 0.8, 0.0077, 9, 0.81, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " pls.append(getarraycontent(line))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L106_C0", "label": "dst = join()", "type": "assigned_variable", "loc": [106, 106], "level": 0, "parent": null, "vector": [14, 0, 0.8154, 0.0077, 0, 0.66, 0.6129, 856, 3, 1, 0, 0, 933, 10, 1], "semantic": {"name": "dst", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": "dst = \"\".join(dst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L107_C0", "label": "write()", "type": "expression", "loc": [107, 107], "level": 0, "parent": null, "vector": [8, 0, 0.8231, 0.0077, 0, 0.66, 0.6452, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": "dstfile.write(dst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L108_C0", "label": "close()", "type": "expression", "loc": [108, 108], "level": 0, "parent": null, "vector": [8, 0, 0.8308, 0.0077, 0, 0.66, 0.6774, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": "dstfile.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L109_C0", "label": "close()", "type": "expression", "loc": [109, 109], "level": 0, "parent": null, "vector": [8, 0, 0.8385, 0.0077, 0, 0.66, 0.7097, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": "srcfile.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L111_C0", "label": "dstsize = len()", "type": "assigned_variable", "loc": [111, 111], "level": 0, "parent": null, "vector": [14, 0, 0.8538, 0.0077, 0, 0.66, 0.7419, 845, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "dstsize", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": "dstsize = len(dst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L112_C0", "label": "dstfile = open()", "type": "assigned_variable", "loc": [112, 112], "level": 0, "parent": null, "vector": [14, 0, 0.8615, 0.0077, 0, 0.66, 0.7742, 588, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "dstfile", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": "dstfile = open(\"../engine/db.inc\",\"w\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L114_C0", "label": "write()", "type": "expression", "loc": [114, 114], "level": 0, "parent": null, "vector": [8, 0, 0.8769, 0.0077, 0, 0.66, 0.8065, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": "dstfile.write(\"const dbdata : array[0..%d] of Byte = (\\n\" % (dstsize -1 ,))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L116_C0", "label": "srcpos =", "type": "assigned_variable", "loc": [116, 116], "level": 0, "parent": null, "vector": [14, 0, 0.8923, 0.0077, 0, 0.66, 0.8387, 857, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "srcpos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "srcpos = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L117_C0", "label": "for c", "type": "for", "loc": [117, 123], "level": 0, "parent": null, "vector": [6, 0, 0.9231, 0.0538, 0, 0.66, 0.871, 411, 2, 0, 0, 0, 0, 0, 5], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for c in dst:\n if srcpos > 0:\n dstfile.write(\",\")\n if srcpos % 12 == 0:\n dstfile.write(\"\\n\")\n dstfile.write(str(ord(c)))\n srcpos += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L118_C4", "label": "if", "type": "if", "loc": [118, 121], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L117_C0", "vector": [4, 1, 0.9192, 0.0308, 1, 0.05, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if srcpos > 0:\n dstfile.write(\",\")\n if srcpos % 12 == 0:\n dstfile.write(\"\\n\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L119_C8", "label": "write()", "type": "expression", "loc": [119, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L118_C4", "vector": [8, 2, 0.9154, 0.0077, 2, 0.22, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " dstfile.write(\",\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L120_C8", "label": "if", "type": "if", "loc": [120, 121], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L118_C4", "vector": [4, 2, 0.9269, 0.0154, 2, 0.22, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if srcpos % 12 == 0:\n dstfile.write(\"\\n\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L121_C12", "label": "write()", "type": "expression", "loc": [121, 121], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L120_C8", "vector": [8, 3, 0.9308, 0.0077, 3, 0.9, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " dstfile.write(\"\\n\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L122_C4", "label": "write()", "type": "expression", "loc": [122, 122], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L117_C0", "vector": [8, 1, 0.9385, 0.0077, 1, 0.05, 1.0, 837, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " dstfile.write(str(ord(c)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L125_C0", "label": "write()", "type": "expression", "loc": [125, 125], "level": 0, "parent": null, "vector": [8, 0, 0.9615, 0.0077, 0, 0.66, 0.9032, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": "dstfile.write(\"\\n);\");"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L127_C0", "label": "close()", "type": "expression", "loc": [127, 127], "level": 0, "parent": null, "vector": [8, 0, 0.9769, 0.0077, 0, 0.66, 0.9355, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": "dstfile.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L129_C0", "label": "print()", "type": "expression", "loc": [129, 129], "level": 0, "parent": null, "vector": [8, 0, 0.9923, 0.0077, 0, 0.66, 0.9677, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"OK, %d radios sorted and saved in %fs\" % (totalcount, time.clock() - tStart))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L130_C0", "label": "raw_input()", "type": "expression", "loc": [130, 130], "level": 0, "parent": null, "vector": [8, 0, 1.0, 0.0077, 0, 0.66, 1.0, 821, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "raw_input", "arg_names": [], "import_names": [], "rhs_call_name": "raw_input", "annotation": ""}, "snippet": "raw_input()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Return_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Return_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Return_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L32_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L33_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L34_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L68_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L72_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L73_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L73_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L74_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L76_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L77_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L78_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L82_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L85_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L86_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L87_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L87_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L88_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L87_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L89_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L91_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L91_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L92_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Assign_L93_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L92_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L94_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L92_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L95_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L92_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L97_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L98_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L97_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L99_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L101_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L101_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L102_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L101_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L103_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L103_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L104_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L117_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L118_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L119_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L120_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:If_L120_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L121_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1434:For_L117_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1434:Expr_L122_C4"}]
extlist = [".bk1",".bk2",".$$$",".local",".a",".tmp",".drc",".o",".cfg",".ddp", ".stat",".pec2bac",".identcache",".dcu",".ppu",".depend",".layout",".win"] #put extensions to delete import sys, os, subprocess print "START THE CLEARING PROCESS" print "DELETING FILES WITH THE FOLLOWING EXT" print extlist i = 0 for root, dirs, files in os.walk(os.getcwd()): for file in files: #for ext in extlist: fileext = os.path.splitext(file)[1] if fileext in extlist: filepath = os.path.join(root,file) print filepath os.remove(filepath) i+=1 print "%d files found and deleted" % i print "Exiting..."
ajibawa-2023/Python-Code-Large/train/row_1435
15
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1435:Assign_L1_C0", "label": "extlist =", "type": "assigned_variable", "loc": [1, 2], "level": 0, "parent": null, "vector": [14, 0, 0.0714, 0.0952, 0, 0.66, 0.0, 699, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "extlist", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "extlist = [\".bk1\",\".bk2\",\".$$$\",\".local\",\".a\",\".tmp\",\".drc\",\".o\",\".cfg\",\".ddp\",\n \".stat\",\".pec2bac\",\".identcache\",\".dcu\",\".ppu\",\".depend\",\".layout\",\".win\"] #put extensions to delete"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1435:Import_L4_C0", "label": "sys import sys, os, subprocess", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.1905, 0.0476, 0, 0.66, 0.125, 509, 0, 3, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "os", "subprocess"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys, os, subprocess"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1435:Expr_L6_C0", "label": "print()", "type": "expression", "loc": [6, 6], "level": 0, "parent": null, "vector": [8, 0, 0.2857, 0.0476, 0, 0.66, 0.25, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"START THE CLEARING PROCESS\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1435:Expr_L7_C0", "label": "print()", "type": "expression", "loc": [7, 7], "level": 0, "parent": null, "vector": [8, 0, 0.3333, 0.0476, 0, 0.66, 0.375, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"DELETING FILES WITH THE FOLLOWING EXT\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1435:Expr_L8_C0", "label": "print()", "type": "expression", "loc": [8, 8], "level": 0, "parent": null, "vector": [8, 0, 0.381, 0.0476, 0, 0.66, 0.5, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(extlist)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1435:Assign_L9_C0", "label": "i =", "type": "assigned_variable", "loc": [9, 9], "level": 0, "parent": null, "vector": [14, 0, 0.4286, 0.0476, 0, 0.66, 0.625, 826, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "i = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1435:For_L10_C0", "label": "for root, dirs, files", "type": "for", "loc": [10, 18], "level": 0, "parent": null, "vector": [6, 0, 0.6667, 0.4286, 0, 0.66, 0.75, 129, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "root, dirs, files", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for root, dirs, files in os.walk(os.getcwd()):\n for file in files:\n #for ext in extlist:\n fileext = os.path.splitext(file)[1]\n if fileext in extlist:\n filepath = os.path.join(root,file)\n print(filepath)\n os.remove(filepath)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1435:For_L11_C4", "label": "for file", "type": "for", "loc": [11, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1435:For_L10_C0", "vector": [6, 1, 0.6905, 0.381, 1, 0.61, 0.0, 107, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "file", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for file in files:\n #for ext in extlist:\n fileext = os.path.splitext(file)[1]\n if fileext in extlist:\n filepath = os.path.join(root,file)\n print(filepath)\n os.remove(filepath)\n i+=1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1435:Assign_L13_C8", "label": "fileext =", "type": "assigned_variable", "loc": [13, 13], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1435:For_L11_C4", "vector": [14, 2, 0.619, 0.0476, 2, 0.11, 0.0, 603, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "fileext", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " fileext = os.path.splitext(file)[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1435:If_L14_C8", "label": "if", "type": "if", "loc": [14, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1435:For_L11_C4", "vector": [4, 2, 0.7619, 0.2381, 2, 0.11, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if fileext in extlist:\n filepath = os.path.join(root,file)\n print(filepath)\n os.remove(filepath)\n i+=1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1435:Assign_L15_C16", "label": "filepath = join()", "type": "assigned_variable", "loc": [15, 15], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1435:If_L14_C8", "vector": [14, 3, 0.7143, 0.0476, 3, 0.02, 0.0, 137, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "filepath", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " filepath = os.path.join(root,file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1435:Expr_L16_C16", "label": "print()", "type": "expression", "loc": [16, 16], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1435:If_L14_C8", "vector": [8, 3, 0.7619, 0.0476, 3, 0.02, 0.5, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(filepath)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1435:Expr_L17_C16", "label": "remove()", "type": "expression", "loc": [17, 17], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1435:If_L14_C8", "vector": [8, 3, 0.8095, 0.0476, 3, 0.02, 1.0, 185, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove", "arg_names": [], "import_names": [], "rhs_call_name": "remove", "annotation": ""}, "snippet": " os.remove(filepath)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1435:Expr_L20_C0", "label": "print()", "type": "expression", "loc": [20, 20], "level": 0, "parent": null, "vector": [8, 0, 0.9524, 0.0476, 0, 0.66, 0.875, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"%d files found and deleted\" % i)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1435:Expr_L21_C0", "label": "print()", "type": "expression", "loc": [21, 21], "level": 0, "parent": null, "vector": [8, 0, 1.0, 0.0476, 0, 0.66, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"Exiting...\")"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1435:For_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1435:For_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1435:For_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1435:Assign_L13_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1435:For_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1435:If_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1435:If_L14_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1435:Assign_L15_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1435:If_L14_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1435:Expr_L16_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1435:If_L14_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1435:Expr_L17_C16"}]
#!/usr/bin/env python #coding=utf-8 """ Author: Xia Kai <xiaket@gmail.com> Filename: models.py Type: Class definition Last modified: 2010-05-24 22:27 Description: This file contains a class that would turn a dictionary containing user information as was returned by json request into a T163User class. So we may more convienently retrieve user information. """ from utils import parse_timestring class T163UserBase(object): """ Basic user information that can be public accessible. User dictionary = { profile_image_url_large 用户资料的大图片 80*80 id 用户id profile_image_url_small 用户资料的小图片 24*24 verified 已验证(为名人预留的?) reply_type 回复类型 profile_sidebar_fill_color profile_text_color followers_count fo这个用户的人数 location 这个用户所处的地理位置 profile_background_color utc_offset statuses_count 用户微博数 description 用户个人描述 friends_count 这个用户fo的人数 profile_link_color profile_image_url profile_background_image_url 用户资料的小图片 48*48 screen_name 屏幕显示名, 更常用 profile_background_tile favourites_count name 用户名 url 链接 gender 性别 created_at 注册时间 time_zone 时区 profile_sidebar_border_color """ def __init__(self, userdict): """ Long and tedious initilization process. """ # account information self.id = userdict['id'] self.screen_name = userdict['screen_name'] self.name = userdict['name'] # user profile self.url = userdict['url'] self.description = userdict['description'] self.location = userdict['location'] # following information self.followers_count = userdict['followers_count'] self.statuses_count = userdict['statuses_count'] self.friends_count = userdict['friends_count'] self.favourites_count = userdict['favourites_count'] # Gender is made more human readable. if userdict['gender'] == 0: self.gender = 'M' elif userdict['gender'] == 1: self.gender = 'F' else: self.gender = 'U' # Created_at is translated into a python datetime object. self.created_at = parse_timestring(userdict['created_at']) # these are not implemented yet, so we comment'em'out. """ # account information self.verified = userdict['verified'] # user profile self.time_zone = userdict['time_zone'] self.utc_offset = userdict['utc_offset'] # avatar image urls. self.image_large = userdict['profile_image_url_large'] self.image_medium = userdict['profile_image_url'] self.image_small = userdict['profile_image_url_small'] # user homepage appearance. self.profile_sidebar_fill_color = \ userdict['profile_sidebar_fill_color'] self.profile_text_color = userdict['profile_text_color'] self.profile_background_color = userdict['profile_background_color'] self.profile_link_color = userdict['profile_link_color'] self.profile_background_image_url = \ userdict['profile_background_image_url'] self.profile_background_tile = userdict['profile_background_tile'] self.profile_sidebar_border_color = \ userdict['profile_sidebar_border_color'] # unknown... self.reply_type = userdict['reply_type'] """ class User(T163UserBase): """ Additional user information is stored in the following dictionary: User dictionary = { telephone 用户手机号 email 用户邮箱 } """ def __init__(self, userdict): T163UserBase.__init__(self, userdict) # additional user profile self.telephone = userdict['telephone'] self.email = userdict['email'] class Follower(T163UserBase): """ This class is used to store information for followers, apart from those properties defined in T163UserBase, this class has the following information: Follower dictionary = { followed_by 这个用户是否在follow你 status 这个用户最新的一条推的详细信息 following 你是否在follow这个用户 """ def __init__(self, userdict): T163UserBase.__init__(self, userdict) self.followed_by = userdict['followed_by'] self.status = userdict['status'] self.following = userdict['following'] class T163StatusBase(object): """ This class is used to store basic status information. The status information is provided in a dictionary: Status dictionary = { user_id 用户id truncated 未知 text 推内容 created_at 发推时间 retweet_status_id 最初的被retweeted的消息的id. source 网易微博 in_reply_to_status_id None in_reply_to_screen_name None in_reply_to_user_id None type 未知 id 本消息id } """ def __init__(self, status_dict): self.user_id = status_dict['user_id'] self.text = status_dict['text'] self.created_at = parse_timestring(status_dict['created_at']) self.retweet_status_id = status_dict['retweet_status_id'] self.source = status_dict['source'] self.id = status_dict['id'] self.in_reply_to_status_id = status_dict['in_reply_to_status_id'] self.in_reply_to_screen_name = status_dict['in_reply_to_screen_name'] self.in_reply_to_user_id = status_dict['in_reply_to_user_id'] # these are not implemented yet, so we comment'em'out. """ self.truncated = status_dict['truncated'] self.type = status_dict['type'] """ class Status(T163StatusBase): """ This class is for the show() api, which is used to show the detailed information for a tweet. Additional information: favorited False in_reply_to_status_text None favorited_at None in_reply_to_user_name None user """ def __init__(self, status_dict): T163StatusBase.__init__(self, status_dict) self.user = T163UserBase(status_dict['user']) # these are not implemented yet, so we comment'em'out. """ self.favorited = status_dict['favorited'] self.in_reply_to_status_text = status_dict['in_reply_to_status_text'] self.favorited_at = status_dict['favorited_at'] self.in_reply_to_user_name = status_dict['in_reply_to_user_name'] """ class StatusWithIpaddr(T163StatusBase): """ This class is for the show() api, which is used to show the detailed information for a tweet. Additional information: auditStatus 未知 ipaddr 117.84.92.50 """ def __init__(self, status_dict): T163StatusBase.__init__(self, status_dict) self.ipaddr = status_dict['ipaddr'] class DirectMessage(object): """ sender_screen_name corleone followed_by True sender T163UserBaseObject text 测试内容啊啊 created_at Tue Apr 27 20:40:58 +0800 2010 sender_id -5127315299555819730 recipient_id 6493809605159984224 recipient_screen_name xiaket recipient T163UserBaseObject id 7950999978748591002 """ def __init__(self, messagedict): # message self.id = messagedict['id'] self.text = messagedict['text'] self.created_at = parse_timestring(messagedict['created_at']) # sender self.sender = T163UserBase(messagedict['sender']) self.sender_id = messagedict['sender_id'] self.sender_screen_name = messagedict['sender_screen_name'] self.followed = messagedict['followed_by'] # recipient self.recipient = T163UserBase(messagedict['recipient']) self.recipient_id = messagedict['recipient_id'] self.recipient_screen_name = messagedict['recipient_screen_name'] class SearchHit(T163StatusBase): """ This class is for the show() api, which is used to show the detailed information for a tweet. Additional information: favorited False favorited_at None in_reply_to_user_name None user """ def __init__(self, status_dict): T163StatusBase.__init__(self, status_dict) self.user = T163UserBase(status_dict['user']) # these are not implemented yet, so we comment'em'out. """ self.favorited = status_dict['favorited'] self.favorited_at = status_dict['favorited_at'] self.in_reply_to_user_name = status_dict['in_reply_to_user_name'] """ class SearchResult(object): """ totalHits 14973 next_page completed_in 0 availHits 600 refresh_url since_id 0 results_per_page 30 result query max_id 0 page 1 """ def __init__(self, result_dict): self.totalHits = result_dict['totalHits'] self.next_page = result_dict['next_page'] self.completed_in = result_dict['completed_in'] self.availHits = result_dict['availHits'] self.refresh_url = result_dict['refresh_url'] self.since_id = result_dict['since_id'] self.results_per_page = result_dict['results_per_page'] self.result = [] for item in result_dict['result']: self.result.append(SearchHit(item)) self.query = result_dict['query'] self.max_id = result_dict['max_id'] self.page = result_dict['page'] class UserSearchResult(object): """ totalHits number availHits number result list """ def __init__(self, result_dict): self.totalHits = result_dict['totalHits'] self.availHits = result_dict['availHits'] self.result = [] for item in result_dict['result']: self.result.append(UserSearchHit(item)) class UserSearchHit(T163UserBase): """ Additional information stored in the search result: telephone always null email always null status StatusWithIpaddr following False } """ def __init__(self, userdict): T163UserBase.__init__(self, userdict) # additional user profile self.status = StatusWithIpaddr(userdict['status']) self.following = userdict['following']
ajibawa-2023/Python-Code-Large/train/row_1436
109
332
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 13], "level": 0, "parent": null, "vector": [8, 0, 0.0241, 0.0331, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nAuthor: Xia Kai <xiaket@gmail.com>\nFilename: models.py\nType: Class definition\nLast modified: 2010-05-24 22:27\n\nDescription:\nThis file contains a class that would turn a dictionary containing user"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:ImportFrom_L14_C0", "label": "from utils import parse_timestring", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0422, 0.003, 0, 0.66, 0.0833, 970, 0, 1, 0, 0, 970, 0, 0], "semantic": {"name": "utils", "arg_names": [], "import_names": ["parse_timestring"], "rhs_call_name": "", "annotation": ""}, "snippet": "from utils import parse_timestring"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L17_C0", "label": "T163UserBase", "type": "class", "loc": [17, 107], "level": 0, "parent": null, "vector": [3, 0, 0.1867, 0.2741, 0, 0.66, 0.1667, 162, 0, 1, 0, 0, 186, 0, 1], "semantic": {"name": "T163UserBase", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class T163UserBase(object):\n \"\"\"\n Basic user information that can be public accessible.\n User dictionary = {\n profile_image_url_large \u7528\u6237\u8d44\u6599\u7684\u5927\u56fe\u7247 80*80\n id \u7528\u6237id\n profile_image_url_small \u7528\u6237\u8d44\u6599\u7684\u5c0f\u56fe\u7247 24*24\n verified \u5df2\u9a8c\u8bc1(\u4e3a\u540d\u4eba\u9884\u7559\u7684?)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L18_C4", "label": "expression", "type": "expression", "loc": [18, 47], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L17_C0", "vector": [8, 1, 0.0979, 0.0904, 1, 0.41, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Basic user information that can be public accessible.\n User dictionary = {\n profile_image_url_large \u7528\u6237\u8d44\u6599\u7684\u5927\u56fe\u7247 80*80\n id \u7528\u6237id\n profile_image_url_small \u7528\u6237\u8d44\u6599\u7684\u5c0f\u56fe\u7247 24*24\n verified \u5df2\u9a8c\u8bc1(\u4e3a\u540d\u4eba\u9884\u7559\u7684?)\n reply_type \u56de\u590d\u7c7b\u578b"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "label": "__init__", "type": "function", "loc": [48, 107], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L17_C0", "vector": [2, 1, 0.2334, 0.1807, 1, 0.41, 1.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "userdict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, userdict):\n \"\"\"\n Long and tedious initilization process.\n \"\"\"\n # account information\n self.id = userdict['id']\n self.screen_name = userdict['screen_name']\n self.name = userdict['name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L49_C8", "label": "expression", "type": "expression", "loc": [49, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "vector": [8, 2, 0.1506, 0.009, 2, 0.2, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Long and tedious initilization process.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L53_C8", "label": "self.id =", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "vector": [14, 2, 0.1596, 0.003, 2, 0.2, 0.0769, 485, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.id = userdict['id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L54_C8", "label": "self.screen_name =", "type": "assigned_variable", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "vector": [14, 2, 0.1627, 0.003, 2, 0.2, 0.1538, 600, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.screen_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.screen_name = userdict['screen_name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L55_C8", "label": "self.name =", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "vector": [14, 2, 0.1657, 0.003, 2, 0.2, 0.2308, 689, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.name = userdict['name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L58_C8", "label": "self.url =", "type": "assigned_variable", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "vector": [14, 2, 0.1747, 0.003, 2, 0.2, 0.3077, 720, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.url", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url = userdict['url']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L59_C8", "label": "self.description =", "type": "assigned_variable", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "vector": [14, 2, 0.1777, 0.003, 2, 0.2, 0.3846, 171, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.description", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.description = userdict['description']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L60_C8", "label": "self.location =", "type": "assigned_variable", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "vector": [14, 2, 0.1807, 0.003, 2, 0.2, 0.4615, 840, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.location", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.location = userdict['location']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L63_C8", "label": "self.followers_count =", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "vector": [14, 2, 0.1898, 0.003, 2, 0.2, 0.5385, 952, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.followers_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.followers_count = userdict['followers_count']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L64_C8", "label": "self.statuses_count =", "type": "assigned_variable", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "vector": [14, 2, 0.1928, 0.003, 2, 0.2, 0.6154, 582, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.statuses_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.statuses_count = userdict['statuses_count']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L65_C8", "label": "self.friends_count =", "type": "assigned_variable", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "vector": [14, 2, 0.1958, 0.003, 2, 0.2, 0.6923, 975, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.friends_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.friends_count = userdict['friends_count']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L66_C8", "label": "self.favourites_count =", "type": "assigned_variable", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "vector": [14, 2, 0.1988, 0.003, 2, 0.2, 0.7692, 165, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.favourites_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.favourites_count = userdict['favourites_count']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:If_L69_C8", "label": "if", "type": "if", "loc": [69, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "vector": [4, 2, 0.2154, 0.0181, 2, 0.2, 0.8462, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if userdict['gender'] == 0:\n self.gender = 'M'\n elif userdict['gender'] == 1:\n self.gender = 'F'\n else:\n self.gender = 'U'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L70_C12", "label": "self.gender =", "type": "assigned_variable", "loc": [70, 70], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:If_L69_C8", "vector": [14, 3, 0.2108, 0.003, 3, 0.91, 0.0, 950, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.gender", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.gender = 'M'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:If_L71_C8", "label": "if", "type": "if", "loc": [71, 74], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:If_L69_C8", "vector": [4, 3, 0.2184, 0.012, 3, 0.91, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif userdict['gender'] == 1:\n self.gender = 'F'\n else:\n self.gender = 'U'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L72_C12", "label": "self.gender =", "type": "assigned_variable", "loc": [72, 72], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:If_L71_C8", "vector": [14, 4, 0.2169, 0.003, 4, 0.34, 0.0, 950, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.gender", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.gender = 'F'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L74_C12", "label": "self.gender =", "type": "assigned_variable", "loc": [74, 74], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:If_L71_C8", "vector": [14, 4, 0.2229, 0.003, 4, 0.34, 1.0, 950, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.gender", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.gender = 'U'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L77_C8", "label": "self.created_at = parse_timestring()", "type": "assigned_variable", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "vector": [14, 2, 0.2319, 0.003, 2, 0.2, 0.9231, 450, 3, 1, 0, 0, 314, 10, 1], "semantic": {"name": "self.created_at", "arg_names": [], "import_names": [], "rhs_call_name": "parse_timestring", "annotation": ""}, "snippet": " self.created_at = parse_timestring(userdict['created_at'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L80_C8", "label": "expression", "type": "expression", "loc": [80, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "vector": [8, 2, 0.2816, 0.0843, 2, 0.2, 1.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n # account information\n self.verified = userdict['verified']\n\n # user profile\n self.time_zone = userdict['time_zone']\n self.utc_offset = userdict['utc_offset']\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L110_C0", "label": "User", "type": "class", "loc": [110, 123], "level": 0, "parent": null, "vector": [3, 0, 0.3509, 0.0422, 0, 0.66, 0.25, 61, 0, 1, 0, 0, 162, 0, 1], "semantic": {"name": "User", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class User(T163UserBase):\n \"\"\"\n Additional user information is stored in the following dictionary:\n User dictionary = {\n telephone \u7528\u6237\u624b\u673a\u53f7\n email \u7528\u6237\u90ae\u7bb1\n }\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L111_C4", "label": "expression", "type": "expression", "loc": [111, 117], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L110_C0", "vector": [8, 1, 0.3434, 0.0211, 1, 0.0, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Additional user information is stored in the following dictionary:\n User dictionary = {\n telephone \u7528\u6237\u624b\u673a\u53f7\n email \u7528\u6237\u90ae\u7bb1\n }\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L118_C4", "label": "__init__", "type": "function", "loc": [118, 123], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L110_C0", "vector": [2, 1, 0.363, 0.0181, 1, 0.0, 1.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "userdict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, userdict):\n T163UserBase.__init__(self, userdict)\n\n # additional user profile\n self.telephone = userdict['telephone']\n self.email = userdict['email']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L119_C8", "label": "__init__()", "type": "expression", "loc": [119, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L118_C4", "vector": [8, 2, 0.3584, 0.003, 2, 0.92, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " T163UserBase.__init__(self, userdict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L122_C8", "label": "self.telephone =", "type": "assigned_variable", "loc": [122, 122], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L118_C4", "vector": [14, 2, 0.3675, 0.003, 2, 0.92, 0.5, 539, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.telephone", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.telephone = userdict['telephone']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L123_C8", "label": "self.email =", "type": "assigned_variable", "loc": [123, 123], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L118_C4", "vector": [14, 2, 0.3705, 0.003, 2, 0.92, 1.0, 2, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.email", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.email = userdict['email']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L126_C0", "label": "Follower", "type": "class", "loc": [126, 141], "level": 0, "parent": null, "vector": [3, 0, 0.4021, 0.0482, 0, 0.66, 0.3333, 616, 0, 1, 0, 0, 162, 0, 1], "semantic": {"name": "Follower", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Follower(T163UserBase):\n \"\"\"\n This class is used to store information for followers, apart from those\n properties defined in T163UserBase, this class has the following\n information:\n\n Follower dictionary = {\n followed_by \u8fd9\u4e2a\u7528\u6237\u662f\u5426\u5728follow\u4f60"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L127_C4", "label": "expression", "type": "expression", "loc": [127, 136], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L126_C0", "vector": [8, 1, 0.3961, 0.0301, 1, 0.32, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This class is used to store information for followers, apart from those\n properties defined in T163UserBase, this class has the following\n information:\n\n Follower dictionary = {\n followed_by \u8fd9\u4e2a\u7528\u6237\u662f\u5426\u5728follow\u4f60\n status \u8fd9\u4e2a\u7528\u6237\u6700\u65b0\u7684\u4e00\u6761\u63a8\u7684\u8be6\u7ec6\u4fe1\u606f"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L137_C4", "label": "__init__", "type": "function", "loc": [137, 141], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L126_C0", "vector": [2, 1, 0.4187, 0.0151, 1, 0.32, 1.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "userdict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, userdict):\n T163UserBase.__init__(self, userdict)\n self.followed_by = userdict['followed_by']\n self.status = userdict['status']\n self.following = userdict['following']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L138_C8", "label": "__init__()", "type": "expression", "loc": [138, 138], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L137_C4", "vector": [8, 2, 0.4157, 0.003, 2, 0.89, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " T163UserBase.__init__(self, userdict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L139_C8", "label": "self.followed_by =", "type": "assigned_variable", "loc": [139, 139], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L137_C4", "vector": [14, 2, 0.4187, 0.003, 2, 0.89, 0.3333, 173, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.followed_by", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.followed_by = userdict['followed_by']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L140_C8", "label": "self.status =", "type": "assigned_variable", "loc": [140, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L137_C4", "vector": [14, 2, 0.4217, 0.003, 2, 0.89, 0.6667, 651, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.status = userdict['status']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L141_C8", "label": "self.following =", "type": "assigned_variable", "loc": [141, 141], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L137_C4", "vector": [14, 2, 0.4247, 0.003, 2, 0.89, 1.0, 596, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.following", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.following = userdict['following']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L144_C0", "label": "T163StatusBase", "type": "class", "loc": [144, 178], "level": 0, "parent": null, "vector": [3, 0, 0.4849, 0.1054, 0, 0.66, 0.4167, 587, 0, 1, 0, 0, 186, 0, 1], "semantic": {"name": "T163StatusBase", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class T163StatusBase(object):\n \"\"\"\n This class is used to store basic status information. The status \n information is provided in a dictionary:\n\n Status dictionary = {\n user_id \u7528\u6237id\n truncated \u672a\u77e5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L145_C4", "label": "expression", "type": "expression", "loc": [145, 162], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L144_C0", "vector": [8, 1, 0.4623, 0.0542, 1, 0.62, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This class is used to store basic status information. The status \n information is provided in a dictionary:\n\n Status dictionary = {\n user_id \u7528\u6237id\n truncated \u672a\u77e5\n text \u63a8\u5185\u5bb9"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "label": "__init__", "type": "function", "loc": [163, 178], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L144_C0", "vector": [2, 1, 0.5136, 0.0482, 1, 0.62, 1.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "status_dict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, status_dict):\n self.user_id = status_dict['user_id']\n self.text = status_dict['text']\n self.created_at = parse_timestring(status_dict['created_at'])\n self.retweet_status_id = status_dict['retweet_status_id']\n self.source = status_dict['source']\n self.id = status_dict['id']\n self.in_reply_to_status_id = status_dict['in_reply_to_status_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L164_C8", "label": "self.user_id =", "type": "assigned_variable", "loc": [164, 164], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "vector": [14, 2, 0.494, 0.003, 2, 0.28, 0.0, 381, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.user_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.user_id = status_dict['user_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L165_C8", "label": "self.text =", "type": "assigned_variable", "loc": [165, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "vector": [14, 2, 0.497, 0.003, 2, 0.28, 0.1111, 320, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = status_dict['text']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L166_C8", "label": "self.created_at = parse_timestring()", "type": "assigned_variable", "loc": [166, 166], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "vector": [14, 2, 0.5, 0.003, 2, 0.28, 0.2222, 450, 3, 1, 0, 0, 314, 10, 1], "semantic": {"name": "self.created_at", "arg_names": [], "import_names": [], "rhs_call_name": "parse_timestring", "annotation": ""}, "snippet": " self.created_at = parse_timestring(status_dict['created_at'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L167_C8", "label": "self.retweet_status_id =", "type": "assigned_variable", "loc": [167, 167], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "vector": [14, 2, 0.503, 0.003, 2, 0.28, 0.3333, 656, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.retweet_status_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.retweet_status_id = status_dict['retweet_status_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L168_C8", "label": "self.source =", "type": "assigned_variable", "loc": [168, 168], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "vector": [14, 2, 0.506, 0.003, 2, 0.28, 0.4444, 848, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.source", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.source = status_dict['source']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L169_C8", "label": "self.id =", "type": "assigned_variable", "loc": [169, 169], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "vector": [14, 2, 0.509, 0.003, 2, 0.28, 0.5556, 485, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.id = status_dict['id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L170_C8", "label": "self.in_reply_to_status_id =", "type": "assigned_variable", "loc": [170, 170], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "vector": [14, 2, 0.512, 0.003, 2, 0.28, 0.6667, 985, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.in_reply_to_status_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.in_reply_to_status_id = status_dict['in_reply_to_status_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L171_C8", "label": "self.in_reply_to_screen_name =", "type": "assigned_variable", "loc": [171, 171], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "vector": [14, 2, 0.5151, 0.003, 2, 0.28, 0.7778, 892, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.in_reply_to_screen_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.in_reply_to_screen_name = status_dict['in_reply_to_screen_name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L172_C8", "label": "self.in_reply_to_user_id =", "type": "assigned_variable", "loc": [172, 172], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "vector": [14, 2, 0.5181, 0.003, 2, 0.28, 0.8889, 180, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.in_reply_to_user_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.in_reply_to_user_id = status_dict['in_reply_to_user_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L175_C8", "label": "expression", "type": "expression", "loc": [175, 178], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "vector": [8, 2, 0.5316, 0.012, 2, 0.28, 1.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n self.truncated = status_dict['truncated']\n self.type = status_dict['type']\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L181_C0", "label": "Status", "type": "class", "loc": [181, 203], "level": 0, "parent": null, "vector": [3, 0, 0.5783, 0.0693, 0, 0.66, 0.5, 820, 0, 1, 0, 0, 587, 0, 2], "semantic": {"name": "Status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Status(T163StatusBase):\n \"\"\"\n This class is for the show() api, which is used to show the detailed\n information for a tweet.\n\n Additional information:\n favorited False\n in_reply_to_status_text None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L182_C4", "label": "expression", "type": "expression", "loc": [182, 192], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L181_C0", "vector": [8, 1, 0.5633, 0.0331, 1, 0.45, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This class is for the show() api, which is used to show the detailed\n information for a tweet.\n\n Additional information:\n favorited False\n in_reply_to_status_text None\n favorited_at None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L193_C4", "label": "__init__", "type": "function", "loc": [193, 203], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L181_C0", "vector": [2, 1, 0.5964, 0.0331, 1, 0.45, 1.0, 555, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "status_dict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, status_dict):\n T163StatusBase.__init__(self, status_dict)\n self.user = T163UserBase(status_dict['user'])\n\n # these are not implemented yet, so we comment'em'out.\n \"\"\"\n self.favorited = status_dict['favorited']\n self.in_reply_to_status_text = status_dict['in_reply_to_status_text']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L194_C8", "label": "__init__()", "type": "expression", "loc": [194, 194], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L193_C4", "vector": [8, 2, 0.5843, 0.003, 2, 0.45, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " T163StatusBase.__init__(self, status_dict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L195_C8", "label": "self.user = T163UserBase()", "type": "assigned_variable", "loc": [195, 195], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L193_C4", "vector": [14, 2, 0.5873, 0.003, 2, 0.45, 0.5, 371, 3, 1, 0, 0, 162, 10, 1], "semantic": {"name": "self.user", "arg_names": [], "import_names": [], "rhs_call_name": "T163UserBase", "annotation": ""}, "snippet": " self.user = T163UserBase(status_dict['user'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L198_C8", "label": "expression", "type": "expression", "loc": [198, 203], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L193_C4", "vector": [8, 2, 0.6039, 0.0181, 2, 0.45, 1.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n self.favorited = status_dict['favorited']\n self.in_reply_to_status_text = status_dict['in_reply_to_status_text']\n self.favorited_at = status_dict['favorited_at']\n self.in_reply_to_user_name = status_dict['in_reply_to_user_name']\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L206_C0", "label": "StatusWithIpaddr", "type": "class", "loc": [206, 217], "level": 0, "parent": null, "vector": [3, 0, 0.637, 0.0361, 0, 0.66, 0.5833, 809, 0, 1, 0, 0, 587, 0, 1], "semantic": {"name": "StatusWithIpaddr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class StatusWithIpaddr(T163StatusBase):\n \"\"\"\n This class is for the show() api, which is used to show the detailed\n information for a tweet.\n\n Additional information:\n auditStatus \u672a\u77e5\n ipaddr 117.84.92.50"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L207_C4", "label": "expression", "type": "expression", "loc": [207, 214], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L206_C0", "vector": [8, 1, 0.634, 0.0241, 1, 0.79, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This class is for the show() api, which is used to show the detailed\n information for a tweet.\n\n Additional information:\n auditStatus \u672a\u77e5\n ipaddr 117.84.92.50\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L215_C4", "label": "__init__", "type": "function", "loc": [215, 217], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L206_C0", "vector": [2, 1, 0.6506, 0.009, 1, 0.79, 1.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "status_dict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, status_dict):\n T163StatusBase.__init__(self, status_dict)\n self.ipaddr = status_dict['ipaddr']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L216_C8", "label": "__init__()", "type": "expression", "loc": [216, 216], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L215_C4", "vector": [8, 2, 0.6506, 0.003, 2, 0.82, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " T163StatusBase.__init__(self, status_dict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L217_C8", "label": "self.ipaddr =", "type": "assigned_variable", "loc": [217, 217], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L215_C4", "vector": [14, 2, 0.6536, 0.003, 2, 0.82, 1.0, 76, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.ipaddr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.ipaddr = status_dict['ipaddr']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L220_C0", "label": "DirectMessage", "type": "class", "loc": [220, 248], "level": 0, "parent": null, "vector": [3, 0, 0.7048, 0.0873, 0, 0.66, 0.6667, 693, 0, 1, 0, 0, 186, 0, 3], "semantic": {"name": "DirectMessage", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class DirectMessage(object):\n \"\"\"\n sender_screen_name corleone\n followed_by True\n sender T163UserBaseObject\n text \u6d4b\u8bd5\u5185\u5bb9\u554a\u554a\n created_at Tue Apr 27 20:40:58 +0800 2010\n sender_id -5127315299555819730"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L221_C4", "label": "expression", "type": "expression", "loc": [221, 232], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L220_C0", "vector": [8, 1, 0.6822, 0.0361, 1, 0.3, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n sender_screen_name corleone\n followed_by True\n sender T163UserBaseObject\n text \u6d4b\u8bd5\u5185\u5bb9\u554a\u554a\n created_at Tue Apr 27 20:40:58 +0800 2010\n sender_id -5127315299555819730\n recipient_id 6493809605159984224"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "label": "__init__", "type": "function", "loc": [233, 248], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L220_C0", "vector": [2, 1, 0.7244, 0.0482, 1, 0.3, 1.0, 555, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "__init__", "arg_names": ["self", "messagedict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, messagedict):\n # message\n self.id = messagedict['id']\n self.text = messagedict['text']\n self.created_at = parse_timestring(messagedict['created_at'])\n\n # sender\n self.sender = T163UserBase(messagedict['sender'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L235_C8", "label": "self.id =", "type": "assigned_variable", "loc": [235, 235], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "vector": [14, 2, 0.7078, 0.003, 2, 0.59, 0.0, 485, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.id = messagedict['id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L236_C8", "label": "self.text =", "type": "assigned_variable", "loc": [236, 236], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "vector": [14, 2, 0.7108, 0.003, 2, 0.59, 0.1111, 320, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = messagedict['text']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L237_C8", "label": "self.created_at = parse_timestring()", "type": "assigned_variable", "loc": [237, 237], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "vector": [14, 2, 0.7139, 0.003, 2, 0.59, 0.2222, 450, 3, 1, 0, 0, 314, 10, 1], "semantic": {"name": "self.created_at", "arg_names": [], "import_names": [], "rhs_call_name": "parse_timestring", "annotation": ""}, "snippet": " self.created_at = parse_timestring(messagedict['created_at'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L240_C8", "label": "self.sender = T163UserBase()", "type": "assigned_variable", "loc": [240, 240], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "vector": [14, 2, 0.7229, 0.003, 2, 0.59, 0.3333, 56, 3, 1, 0, 0, 162, 10, 1], "semantic": {"name": "self.sender", "arg_names": [], "import_names": [], "rhs_call_name": "T163UserBase", "annotation": ""}, "snippet": " self.sender = T163UserBase(messagedict['sender'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L241_C8", "label": "self.sender_id =", "type": "assigned_variable", "loc": [241, 241], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "vector": [14, 2, 0.7259, 0.003, 2, 0.59, 0.4444, 480, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.sender_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.sender_id = messagedict['sender_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L242_C8", "label": "self.sender_screen_name =", "type": "assigned_variable", "loc": [242, 242], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "vector": [14, 2, 0.7289, 0.003, 2, 0.59, 0.5556, 848, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.sender_screen_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.sender_screen_name = messagedict['sender_screen_name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L243_C8", "label": "self.followed =", "type": "assigned_variable", "loc": [243, 243], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "vector": [14, 2, 0.7319, 0.003, 2, 0.59, 0.6667, 286, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.followed", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.followed = messagedict['followed_by']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L246_C8", "label": "self.recipient = T163UserBase()", "type": "assigned_variable", "loc": [246, 246], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "vector": [14, 2, 0.741, 0.003, 2, 0.59, 0.7778, 152, 3, 1, 0, 0, 162, 10, 1], "semantic": {"name": "self.recipient", "arg_names": [], "import_names": [], "rhs_call_name": "T163UserBase", "annotation": ""}, "snippet": " self.recipient = T163UserBase(messagedict['recipient'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L247_C8", "label": "self.recipient_id =", "type": "assigned_variable", "loc": [247, 247], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "vector": [14, 2, 0.744, 0.003, 2, 0.59, 0.8889, 262, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.recipient_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.recipient_id = messagedict['recipient_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L248_C8", "label": "self.recipient_screen_name =", "type": "assigned_variable", "loc": [248, 248], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "vector": [14, 2, 0.747, 0.003, 2, 0.59, 1.0, 507, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.recipient_screen_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.recipient_screen_name = messagedict['recipient_screen_name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L251_C0", "label": "SearchHit", "type": "class", "loc": [251, 271], "level": 0, "parent": null, "vector": [3, 0, 0.7861, 0.0633, 0, 0.66, 0.75, 911, 0, 1, 0, 0, 587, 0, 2], "semantic": {"name": "SearchHit", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class SearchHit(T163StatusBase):\n \"\"\"\n This class is for the show() api, which is used to show the detailed\n information for a tweet.\n\n Additional information:\n favorited False\n favorited_at None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L252_C4", "label": "expression", "type": "expression", "loc": [252, 261], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L251_C0", "vector": [8, 1, 0.7726, 0.0301, 1, 0.25, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This class is for the show() api, which is used to show the detailed\n information for a tweet.\n\n Additional information:\n favorited False\n favorited_at None\n in_reply_to_user_name None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L262_C4", "label": "__init__", "type": "function", "loc": [262, 271], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L251_C0", "vector": [2, 1, 0.8027, 0.0301, 1, 0.25, 1.0, 555, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "status_dict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, status_dict):\n T163StatusBase.__init__(self, status_dict)\n self.user = T163UserBase(status_dict['user'])\n\n # these are not implemented yet, so we comment'em'out.\n \"\"\"\n self.favorited = status_dict['favorited']\n self.favorited_at = status_dict['favorited_at']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L263_C8", "label": "__init__()", "type": "expression", "loc": [263, 263], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L262_C4", "vector": [8, 2, 0.7922, 0.003, 2, 0.96, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " T163StatusBase.__init__(self, status_dict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L264_C8", "label": "self.user = T163UserBase()", "type": "assigned_variable", "loc": [264, 264], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L262_C4", "vector": [14, 2, 0.7952, 0.003, 2, 0.96, 0.5, 371, 3, 1, 0, 0, 162, 10, 1], "semantic": {"name": "self.user", "arg_names": [], "import_names": [], "rhs_call_name": "T163UserBase", "annotation": ""}, "snippet": " self.user = T163UserBase(status_dict['user'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L267_C8", "label": "expression", "type": "expression", "loc": [267, 271], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L262_C4", "vector": [8, 2, 0.8102, 0.0151, 2, 0.96, 1.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n self.favorited = status_dict['favorited']\n self.favorited_at = status_dict['favorited_at']\n self.in_reply_to_user_name = status_dict['in_reply_to_user_name']\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L274_C0", "label": "SearchResult", "type": "class", "loc": [274, 301], "level": 0, "parent": null, "vector": [3, 0, 0.866, 0.0843, 0, 0.66, 0.8333, 821, 0, 1, 0, 0, 186, 0, 2], "semantic": {"name": "SearchResult", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class SearchResult(object):\n \"\"\"\n totalHits 14973\n next_page\n completed_in 0\n availHits 600\n refresh_url\n since_id 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L275_C4", "label": "expression", "type": "expression", "loc": [275, 287], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L274_C0", "vector": [8, 1, 0.8464, 0.0392, 1, 0.08, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n totalHits 14973\n next_page\n completed_in 0\n availHits 600\n refresh_url\n since_id 0\n results_per_page 30"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "label": "__init__", "type": "function", "loc": [288, 301], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L274_C0", "vector": [2, 1, 0.887, 0.0422, 1, 0.08, 1.0, 555, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "result_dict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, result_dict):\n self.totalHits = result_dict['totalHits']\n self.next_page = result_dict['next_page']\n self.completed_in = result_dict['completed_in']\n self.availHits = result_dict['availHits']\n self.refresh_url = result_dict['refresh_url']\n self.since_id = result_dict['since_id']\n self.results_per_page = result_dict['results_per_page']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L289_C8", "label": "self.totalHits =", "type": "assigned_variable", "loc": [289, 289], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "vector": [14, 2, 0.8705, 0.003, 2, 0.78, 0.0, 7, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.totalHits", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.totalHits = result_dict['totalHits']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L290_C8", "label": "self.next_page =", "type": "assigned_variable", "loc": [290, 290], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "vector": [14, 2, 0.8735, 0.003, 2, 0.78, 0.0909, 862, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.next_page", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.next_page = result_dict['next_page']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L291_C8", "label": "self.completed_in =", "type": "assigned_variable", "loc": [291, 291], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "vector": [14, 2, 0.8765, 0.003, 2, 0.78, 0.1818, 280, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.completed_in", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.completed_in = result_dict['completed_in']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L292_C8", "label": "self.availHits =", "type": "assigned_variable", "loc": [292, 292], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "vector": [14, 2, 0.8795, 0.003, 2, 0.78, 0.2727, 372, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.availHits", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.availHits = result_dict['availHits']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L293_C8", "label": "self.refresh_url =", "type": "assigned_variable", "loc": [293, 293], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "vector": [14, 2, 0.8825, 0.003, 2, 0.78, 0.3636, 938, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.refresh_url", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.refresh_url = result_dict['refresh_url']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L294_C8", "label": "self.since_id =", "type": "assigned_variable", "loc": [294, 294], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "vector": [14, 2, 0.8855, 0.003, 2, 0.78, 0.4545, 212, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.since_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.since_id = result_dict['since_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L295_C8", "label": "self.results_per_page =", "type": "assigned_variable", "loc": [295, 295], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "vector": [14, 2, 0.8886, 0.003, 2, 0.78, 0.5455, 528, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.results_per_page", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.results_per_page = result_dict['results_per_page']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L296_C8", "label": "self.result =", "type": "assigned_variable", "loc": [296, 296], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "vector": [14, 2, 0.8916, 0.003, 2, 0.78, 0.6364, 341, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.result = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:For_L297_C8", "label": "for item", "type": "for", "loc": [297, 298], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "vector": [6, 2, 0.8961, 0.006, 2, 0.78, 0.7273, 434, 6, 0, 0, 0, 0, 0, 2], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for item in result_dict['result']:\n self.result.append(SearchHit(item))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L298_C12", "label": "append()", "type": "expression", "loc": [298, 298], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:For_L297_C8", "vector": [8, 3, 0.8976, 0.003, 3, 0.54, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.result.append(SearchHit(item))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L299_C8", "label": "self.query =", "type": "assigned_variable", "loc": [299, 299], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "vector": [14, 2, 0.9006, 0.003, 2, 0.78, 0.8182, 241, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.query", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.query = result_dict['query']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L300_C8", "label": "self.max_id =", "type": "assigned_variable", "loc": [300, 300], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "vector": [14, 2, 0.9036, 0.003, 2, 0.78, 0.9091, 771, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.max_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.max_id = result_dict['max_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L301_C8", "label": "self.page =", "type": "assigned_variable", "loc": [301, 301], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "vector": [14, 2, 0.9066, 0.003, 2, 0.78, 1.0, 417, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.page", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.page = result_dict['page']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L304_C0", "label": "UserSearchResult", "type": "class", "loc": [304, 315], "level": 0, "parent": null, "vector": [3, 0, 0.9322, 0.0361, 0, 0.66, 0.9167, 924, 0, 1, 0, 0, 186, 0, 2], "semantic": {"name": "UserSearchResult", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class UserSearchResult(object):\n \"\"\"\n totalHits number\n availHits number\n result list\n \"\"\"\n def __init__(self, result_dict):\n self.totalHits = result_dict['totalHits']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L305_C4", "label": "expression", "type": "expression", "loc": [305, 309], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L304_C0", "vector": [8, 1, 0.9247, 0.0151, 1, 0.34, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n totalHits number\n availHits number\n result list\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L310_C4", "label": "__init__", "type": "function", "loc": [310, 315], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L304_C0", "vector": [2, 1, 0.9413, 0.0181, 1, 0.34, 1.0, 555, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "result_dict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, result_dict):\n self.totalHits = result_dict['totalHits']\n self.availHits = result_dict['availHits']\n self.result = []\n for item in result_dict['result']:\n self.result.append(UserSearchHit(item))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L311_C8", "label": "self.totalHits =", "type": "assigned_variable", "loc": [311, 311], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L310_C4", "vector": [14, 2, 0.9367, 0.003, 2, 0.89, 0.0, 7, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.totalHits", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.totalHits = result_dict['totalHits']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L312_C8", "label": "self.availHits =", "type": "assigned_variable", "loc": [312, 312], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L310_C4", "vector": [14, 2, 0.9398, 0.003, 2, 0.89, 0.3333, 372, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.availHits", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.availHits = result_dict['availHits']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L313_C8", "label": "self.result =", "type": "assigned_variable", "loc": [313, 313], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L310_C4", "vector": [14, 2, 0.9428, 0.003, 2, 0.89, 0.6667, 341, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.result = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:For_L314_C8", "label": "for item", "type": "for", "loc": [314, 315], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L310_C4", "vector": [6, 2, 0.9473, 0.006, 2, 0.89, 1.0, 434, 6, 0, 0, 0, 0, 0, 2], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for item in result_dict['result']:\n self.result.append(UserSearchHit(item))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L315_C12", "label": "append()", "type": "expression", "loc": [315, 315], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:For_L314_C8", "vector": [8, 3, 0.9488, 0.003, 3, 0.38, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.result.append(UserSearchHit(item))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L318_C0", "label": "UserSearchHit", "type": "class", "loc": [318, 332], "level": 0, "parent": null, "vector": [3, 0, 0.9789, 0.0452, 0, 0.66, 1.0, 798, 0, 1, 0, 0, 162, 0, 2], "semantic": {"name": "UserSearchHit", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class UserSearchHit(T163UserBase):\n \"\"\"\n Additional information stored in the search result:\n telephone always null\n email always null\n status StatusWithIpaddr\n following False\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L319_C4", "label": "expression", "type": "expression", "loc": [319, 326], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L318_C0", "vector": [8, 1, 0.9714, 0.0241, 1, 0.45, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Additional information stored in the search result:\n telephone always null\n email always null\n status StatusWithIpaddr\n following False\n }\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L327_C4", "label": "__init__", "type": "function", "loc": [327, 332], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L318_C0", "vector": [2, 1, 0.9925, 0.0181, 1, 0.45, 1.0, 555, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "userdict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, userdict):\n T163UserBase.__init__(self, userdict)\n\n # additional user profile\n self.status = StatusWithIpaddr(userdict['status'])\n self.following = userdict['following']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L328_C8", "label": "__init__()", "type": "expression", "loc": [328, 328], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L327_C4", "vector": [8, 2, 0.988, 0.003, 2, 0.06, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " T163UserBase.__init__(self, userdict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L331_C8", "label": "self.status = StatusWithIpaddr()", "type": "assigned_variable", "loc": [331, 331], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L327_C4", "vector": [14, 2, 0.997, 0.003, 2, 0.06, 0.5, 651, 3, 1, 0, 0, 809, 10, 1], "semantic": {"name": "self.status", "arg_names": [], "import_names": [], "rhs_call_name": "StatusWithIpaddr", "annotation": ""}, "snippet": " self.status = StatusWithIpaddr(userdict['status'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L332_C8", "label": "self.following =", "type": "assigned_variable", "loc": [332, 332], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L327_C4", "vector": [14, 2, 1.0, 0.003, 2, 0.06, 1.0, 596, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.following", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.following = userdict['following']"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L58_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:If_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:If_L69_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L70_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:If_L69_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:If_L71_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:If_L71_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L72_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:If_L71_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L74_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L110_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L111_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L110_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L118_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L119_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L122_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L123_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L126_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L127_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L126_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L137_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L137_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L138_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L137_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L139_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L137_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L137_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L144_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L145_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L144_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L164_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L166_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L167_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L168_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L169_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L170_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L171_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L172_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L175_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L181_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L182_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L181_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L193_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L193_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L194_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L193_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L195_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L193_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L198_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L206_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L207_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L206_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L215_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L215_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L216_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L215_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L217_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L220_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L221_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L220_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L235_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L236_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L237_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L240_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L241_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L242_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L243_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L246_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L247_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L248_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L251_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L252_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L251_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L262_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L262_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L263_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L262_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L264_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L262_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L267_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L274_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L275_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L274_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L289_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L290_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L291_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L292_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L293_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L294_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L295_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L296_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:For_L297_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:For_L297_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L298_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L299_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L300_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L301_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L304_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L305_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L304_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L310_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L310_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L311_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L310_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L312_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L310_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L313_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L310_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:For_L314_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:For_L314_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L315_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L318_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L319_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:ClassDef_L318_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L327_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L327_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Expr_L328_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L327_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L331_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1436:FunctionDef_L327_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1436:Assign_L332_C8"}]
#!/usr/bin/env python #coding=utf-8 """ Author: Xia Kai <xiaket@gmail.com> Filename: utils.py Type: Utility Last modified: 2010-07-18 14:06 Description: Utility functions for this project. """ import locale import os import urllib2 from datetime import datetime, timedelta ############## # Exceptions # ############## class AuthenticationError(RuntimeError): """ Exception caused by incorrect username/password. """ pass class UserNotFound(ValueError): """ Exception caused by querying a user that does not exist. """ pass class IllegalCall(ValueError): """ Exception caused by illegal call, e.g., trying to remove other people's status, or a message longer than 163 characters. """ pass class UnknownError(RuntimeError): """ Unexpected HTTP code returned. """ pass ############## # Decorators # ############## def require_login(func): """ This is a decorator inspired by a similar decorator in Django. """ def morewrapped(func): def wrapped(kls, *args, **kwargs): if not kls.logged_in: kls._login() return func(kls, *args, **kwargs) return wrapped return morewrapped(func) def check_screen_name(func): """ This decorator would check the screen_name in the parameter of the original function. It is to be noted that the screen must be the first argument if we are using a positional parameter. """ def morewrapped(func): def wrapped(kls, *args, **kwargs): if 'screen_name' in kwargs: _screen_name = kwargs['screen_name'] elif len(args): _screen_name = args[0] else: _screen_name = None if _screen_name: # If the screen_name is set, we shall check if it is a valid # screen_name. We do this by visiting the homepage of this # screen_name: _url = "/users/show.json?screen_name=%s" % _screen_name _message = "Specified user does not exist." _err_dict = { 404: (UserNotFound, _message), } kls.request(_url, errors=_err_dict) return func(kls, *args, **kwargs) return wrapped return morewrapped(func) def check_status_id(func): """ This decorator would check the screen_name in the parameter of the original function. It is to be noted that the screen must be the first argument if we are using a positional parameter. """ def morewrapped(func): def wrapped(kls, *args, **kwargs): if 'status_id' in kwargs: _status_id = kwargs['status_id'] elif len(args) != 0: _status_id = args[0] kls.show_status(_status_id) return func(kls, *args, **kwargs) return wrapped return morewrapped(func) def parse_timestring(timestring): """ Accept a time string, parse it and return a datetime object. >>> parse_timestring("Mon Apr 26 10:49:29 +0800 2010") datetime.datetime(2010, 4, 26, 2, 49, 29) >>> parse_timestring("Mon Apr 26 10:49:29 -0800 2010") datetime.datetime(2010, 4, 26, 18, 49, 29) >>> parse_timestring("Mon Apr 26 10:49:29 +0830 2010") datetime.datetime(2010, 4, 26, 2, 19, 29) """ oldlocale = locale.getlocale(locale.LC_TIME) # On different OS platform, setlocale would have to be called differently. if os.name =='nt': locale.setlocale(locale.LC_TIME, 'english') elif os.name =='posix': locale.setlocale(locale.LC_TIME, 'en_US.UTF-8') strf = timestring[:20] + timestring[26:] created_at = datetime.strptime(strf, "%a %b %d %H:%M:%S %Y") # set it back. locale.setlocale(locale.LC_TIME, oldlocale) delta = timestring[20:25] hour = int(delta[:3]) minute = int(delta[3:]) return created_at - timedelta(hours=hour, minutes=minute) class RedirectHandler(urllib2.HTTPRedirectHandler): def http_error_302(self, req, fp, code, msg, headers): """ For the moment, t.163.com would not return 404 status code correctly. Instead, it would return a 302 and redirect user to a page that will display 404 information. This would make web user happy, but we have to do extra to make our API elegant. Thus we have this handler to correctly raise 404 code. """ result = urllib2.HTTPRedirectHandler.http_error_302( self, req, fp, code, msg, headers) if headers['location'] == 'http://t.163.com/notfound': raise urllib2.HTTPError(req.get_full_url(), 404, msg, headers, fp) return result if __name__ == "__main__": import doctest doctest.testmod()
ajibawa-2023/Python-Code-Large/train/row_1437
74
166
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0422, 0.0542, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nAuthor: Xia Kai <xiaket@gmail.com>\nFilename: utils.py\nType: Utility\nLast modified: 2010-07-18 14:06\n\nDescription:\nUtility functions for this project."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Import_L12_C0", "label": "locale import locale", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.0723, 0.006, 0, 0.66, 0.0714, 884, 0, 1, 0, 0, 884, 0, 0], "semantic": {"name": "locale", "arg_names": [], "import_names": ["locale"], "rhs_call_name": "", "annotation": ""}, "snippet": "import locale"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Import_L13_C0", "label": "os import os", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0783, 0.006, 0, 0.66, 0.1429, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Import_L14_C0", "label": "urllib2 import urllib2", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0843, 0.006, 0, 0.66, 0.2143, 345, 0, 1, 0, 0, 345, 0, 0], "semantic": {"name": "urllib2", "arg_names": [], "import_names": ["urllib2"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urllib2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:ImportFrom_L16_C0", "label": "from datetime import datetime, timedelta", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.0964, 0.006, 0, 0.66, 0.2857, 426, 0, 2, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime", "timedelta"], "rhs_call_name": "", "annotation": ""}, "snippet": "from datetime import datetime, timedelta"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:ClassDef_L23_C0", "label": "AuthenticationError", "type": "class", "loc": [23, 27], "level": 0, "parent": null, "vector": [3, 0, 0.1506, 0.0301, 0, 0.66, 0.3571, 422, 0, 0, 0, 0, 178, 0, 0], "semantic": {"name": "AuthenticationError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class AuthenticationError(RuntimeError):\n \"\"\"\n Exception caused by incorrect username/password.\n \"\"\"\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L24_C4", "label": "expression", "type": "expression", "loc": [24, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:ClassDef_L23_C0", "vector": [8, 1, 0.1506, 0.0181, 1, 0.22, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Exception caused by incorrect username/password.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:ClassDef_L30_C0", "label": "UserNotFound", "type": "class", "loc": [30, 34], "level": 0, "parent": null, "vector": [3, 0, 0.1928, 0.0301, 0, 0.66, 0.4286, 599, 0, 0, 0, 0, 690, 0, 0], "semantic": {"name": "UserNotFound", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class UserNotFound(ValueError):\n \"\"\"\n Exception caused by querying a user that does not exist.\n \"\"\"\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L31_C4", "label": "expression", "type": "expression", "loc": [31, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:ClassDef_L30_C0", "vector": [8, 1, 0.1928, 0.0181, 1, 0.12, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Exception caused by querying a user that does not exist.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:ClassDef_L37_C0", "label": "IllegalCall", "type": "class", "loc": [37, 42], "level": 0, "parent": null, "vector": [3, 0, 0.238, 0.0361, 0, 0.66, 0.5, 605, 0, 0, 0, 0, 690, 0, 0], "semantic": {"name": "IllegalCall", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class IllegalCall(ValueError):\n \"\"\"\n Exception caused by illegal call, e.g., trying to remove other people's \n status, or a message longer than 163 characters.\n \"\"\"\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L38_C4", "label": "expression", "type": "expression", "loc": [38, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:ClassDef_L37_C0", "vector": [8, 1, 0.238, 0.0241, 1, 0.05, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Exception caused by illegal call, e.g., trying to remove other people's \n status, or a message longer than 163 characters.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:ClassDef_L45_C0", "label": "UnknownError", "type": "class", "loc": [45, 49], "level": 0, "parent": null, "vector": [3, 0, 0.2831, 0.0301, 0, 0.66, 0.5714, 596, 0, 0, 0, 0, 178, 0, 0], "semantic": {"name": "UnknownError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class UnknownError(RuntimeError):\n \"\"\"\n Unexpected HTTP code returned.\n \"\"\"\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L46_C4", "label": "expression", "type": "expression", "loc": [46, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:ClassDef_L45_C0", "vector": [8, 1, 0.2831, 0.0181, 1, 0.63, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Unexpected HTTP code returned.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L55_C0", "label": "require_login", "type": "function", "loc": [55, 65], "level": 0, "parent": null, "vector": [2, 0, 0.3614, 0.0663, 0, 0.66, 0.6429, 678, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "require_login", "arg_names": ["func"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def require_login(func):\n \"\"\"\n This is a decorator inspired by a similar decorator in Django.\n \"\"\"\n def morewrapped(func):\n def wrapped(kls, *args, **kwargs):\n if not kls.logged_in:\n kls._login()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L56_C4", "label": "expression", "type": "expression", "loc": [56, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L55_C0", "vector": [8, 1, 0.3434, 0.0181, 1, 0.2, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This is a decorator inspired by a similar decorator in Django.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L59_C4", "label": "morewrapped", "type": "function", "loc": [59, 64], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L55_C0", "vector": [2, 1, 0.3705, 0.0361, 1, 0.2, 0.5, 638, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "morewrapped", "arg_names": ["func"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def morewrapped(func):\n def wrapped(kls, *args, **kwargs):\n if not kls.logged_in:\n kls._login()\n return func(kls, *args, **kwargs)\n return wrapped"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L60_C8", "label": "wrapped", "type": "function", "loc": [60, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L59_C4", "vector": [2, 2, 0.3705, 0.0241, 2, 0.47, 0.0, 745, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "wrapped", "arg_names": ["kls", "args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def wrapped(kls, *args, **kwargs):\n if not kls.logged_in:\n kls._login()\n return func(kls, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L61_C12", "label": "if", "type": "if", "loc": [61, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L60_C8", "vector": [4, 3, 0.3705, 0.012, 3, 0.21, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not kls.logged_in:\n kls._login()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L62_C16", "label": "_login()", "type": "expression", "loc": [62, 62], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L61_C12", "vector": [8, 4, 0.3735, 0.006, 4, 0.15, 0.0, 719, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_login", "arg_names": [], "import_names": [], "rhs_call_name": "_login", "annotation": ""}, "snippet": " kls._login()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L63_C12", "label": "return", "type": "return", "loc": [63, 63], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L60_C8", "vector": [13, 3, 0.3795, 0.006, 3, 0.21, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return func(kls, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L64_C8", "label": "return", "type": "return", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L59_C4", "vector": [13, 2, 0.3855, 0.006, 2, 0.47, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return wrapped"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L65_C4", "label": "return", "type": "return", "loc": [65, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L55_C0", "vector": [13, 1, 0.3916, 0.006, 1, 0.2, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return morewrapped(func)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L68_C0", "label": "check_screen_name", "type": "function", "loc": [68, 96], "level": 0, "parent": null, "vector": [2, 0, 0.494, 0.1747, 0, 0.66, 0.7143, 692, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "check_screen_name", "arg_names": ["func"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def check_screen_name(func):\n \"\"\"\n This decorator would check the screen_name in the parameter of the original\n function.\n\n It is to be noted that the screen must be the first argument if we are\n using a positional parameter.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L69_C4", "label": "expression", "type": "expression", "loc": [69, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L68_C0", "vector": [8, 1, 0.4337, 0.0422, 1, 0.37, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This decorator would check the screen_name in the parameter of the original\n function.\n\n It is to be noted that the screen must be the first argument if we are\n using a positional parameter.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L76_C4", "label": "morewrapped", "type": "function", "loc": [76, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L68_C0", "vector": [2, 1, 0.5151, 0.1205, 1, 0.37, 0.5, 638, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "morewrapped", "arg_names": ["func"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def morewrapped(func):\n def wrapped(kls, *args, **kwargs):\n if 'screen_name' in kwargs:\n _screen_name = kwargs['screen_name']\n elif len(args):\n _screen_name = args[0]\n else:\n _screen_name = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L77_C8", "label": "wrapped", "type": "function", "loc": [77, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L76_C4", "vector": [2, 2, 0.5151, 0.1084, 2, 0.78, 0.0, 745, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "wrapped", "arg_names": ["kls", "args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def wrapped(kls, *args, **kwargs):\n if 'screen_name' in kwargs:\n _screen_name = kwargs['screen_name']\n elif len(args):\n _screen_name = args[0]\n else:\n _screen_name = None\n if _screen_name:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L78_C12", "label": "if", "type": "if", "loc": [78, 83], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L77_C8", "vector": [4, 3, 0.4849, 0.0361, 3, 0.25, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'screen_name' in kwargs:\n _screen_name = kwargs['screen_name']\n elif len(args):\n _screen_name = args[0]\n else:\n _screen_name = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L79_C16", "label": "_screen_name =", "type": "assigned_variable", "loc": [79, 79], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L78_C12", "vector": [14, 4, 0.4759, 0.006, 4, 0.15, 0.0, 415, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_screen_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _screen_name = kwargs['screen_name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L80_C12", "label": "if", "type": "if", "loc": [80, 83], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L78_C12", "vector": [4, 4, 0.491, 0.0241, 4, 0.15, 1.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif len(args):\n _screen_name = args[0]\n else:\n _screen_name = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L81_C16", "label": "_screen_name =", "type": "assigned_variable", "loc": [81, 81], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L80_C12", "vector": [14, 5, 0.488, 0.006, 5, 0.85, 0.0, 415, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_screen_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _screen_name = args[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L83_C16", "label": "_screen_name =", "type": "assigned_variable", "loc": [83, 83], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L80_C12", "vector": [14, 5, 0.5, 0.006, 5, 0.85, 1.0, 415, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "_screen_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _screen_name = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L84_C12", "label": "if", "type": "if", "loc": [84, 93], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L77_C8", "vector": [4, 3, 0.5331, 0.0602, 3, 0.25, 0.5, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if _screen_name:\n # If the screen_name is set, we shall check if it is a valid\n # screen_name. We do this by visiting the homepage of this\n # screen_name:\n _url = \"/users/show.json?screen_name=%s\" % _screen_name\n _message = \"Specified user does not exist.\"\n _err_dict = {\n 404: (UserNotFound, _message),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L88_C16", "label": "_url =", "type": "assigned_variable", "loc": [88, 88], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L84_C12", "vector": [14, 4, 0.5301, 0.006, 4, 0.84, 0.0, 508, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_url", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _url = \"/users/show.json?screen_name=%s\" % _screen_name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L89_C16", "label": "_message =", "type": "assigned_variable", "loc": [89, 89], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L84_C12", "vector": [14, 4, 0.5361, 0.006, 4, 0.84, 0.3333, 839, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "_message", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _message = \"Specified user does not exist.\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L90_C16", "label": "_err_dict =", "type": "assigned_variable", "loc": [90, 92], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L84_C12", "vector": [14, 4, 0.5482, 0.0181, 4, 0.84, 0.6667, 645, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "_err_dict", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _err_dict = {\n 404: (UserNotFound, _message),\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L93_C16", "label": "request()", "type": "expression", "loc": [93, 93], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L84_C12", "vector": [8, 4, 0.5602, 0.006, 4, 0.84, 1.0, 50, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "request", "arg_names": [], "import_names": [], "rhs_call_name": "request", "annotation": ""}, "snippet": " kls.request(_url, errors=_err_dict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L94_C12", "label": "return", "type": "return", "loc": [94, 94], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L77_C8", "vector": [13, 3, 0.5663, 0.006, 3, 0.25, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return func(kls, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L95_C8", "label": "return", "type": "return", "loc": [95, 95], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L76_C4", "vector": [13, 2, 0.5723, 0.006, 2, 0.78, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return wrapped"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L96_C4", "label": "return", "type": "return", "loc": [96, 96], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L68_C0", "vector": [13, 1, 0.5783, 0.006, 1, 0.37, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return morewrapped(func)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L99_C0", "label": "check_status_id", "type": "function", "loc": [99, 116], "level": 0, "parent": null, "vector": [2, 0, 0.6476, 0.1084, 0, 0.66, 0.7857, 55, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "check_status_id", "arg_names": ["func"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def check_status_id(func):\n \"\"\"\n This decorator would check the screen_name in the parameter of the original\n function.\n\n It is to be noted that the screen must be the first argument if we are\n using a positional parameter.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L100_C4", "label": "expression", "type": "expression", "loc": [100, 106], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L99_C0", "vector": [8, 1, 0.6205, 0.0422, 1, 0.77, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This decorator would check the screen_name in the parameter of the original\n function.\n\n It is to be noted that the screen must be the first argument if we are\n using a positional parameter.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L107_C4", "label": "morewrapped", "type": "function", "loc": [107, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L99_C0", "vector": [2, 1, 0.6687, 0.0542, 1, 0.77, 0.5, 638, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "morewrapped", "arg_names": ["func"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def morewrapped(func):\n def wrapped(kls, *args, **kwargs):\n if 'status_id' in kwargs:\n _status_id = kwargs['status_id']\n elif len(args) != 0:\n _status_id = args[0]\n kls.show_status(_status_id)\n return func(kls, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L108_C8", "label": "wrapped", "type": "function", "loc": [108, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L107_C4", "vector": [2, 2, 0.6687, 0.0422, 2, 0.2, 0.0, 745, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "wrapped", "arg_names": ["kls", "args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def wrapped(kls, *args, **kwargs):\n if 'status_id' in kwargs:\n _status_id = kwargs['status_id']\n elif len(args) != 0:\n _status_id = args[0]\n kls.show_status(_status_id)\n return func(kls, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L109_C12", "label": "if", "type": "if", "loc": [109, 113], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L108_C8", "vector": [4, 3, 0.6687, 0.0301, 3, 0.78, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'status_id' in kwargs:\n _status_id = kwargs['status_id']\n elif len(args) != 0:\n _status_id = args[0]\n kls.show_status(_status_id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L110_C16", "label": "_status_id =", "type": "assigned_variable", "loc": [110, 110], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L109_C12", "vector": [14, 4, 0.6627, 0.006, 4, 0.69, 0.0, 122, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_status_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _status_id = kwargs['status_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L111_C12", "label": "if", "type": "if", "loc": [111, 113], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L109_C12", "vector": [4, 4, 0.6747, 0.0181, 4, 0.69, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif len(args) != 0:\n _status_id = args[0]\n kls.show_status(_status_id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L112_C16", "label": "_status_id =", "type": "assigned_variable", "loc": [112, 112], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L111_C12", "vector": [14, 5, 0.6747, 0.006, 5, 0.58, 0.0, 122, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_status_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _status_id = args[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L113_C16", "label": "show_status()", "type": "expression", "loc": [113, 113], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L111_C12", "vector": [8, 5, 0.6807, 0.006, 5, 0.58, 1.0, 75, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "show_status", "arg_names": [], "import_names": [], "rhs_call_name": "show_status", "annotation": ""}, "snippet": " kls.show_status(_status_id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L114_C12", "label": "return", "type": "return", "loc": [114, 114], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L108_C8", "vector": [13, 3, 0.6867, 0.006, 3, 0.78, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return func(kls, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L115_C8", "label": "return", "type": "return", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L107_C4", "vector": [13, 2, 0.6928, 0.006, 2, 0.2, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return wrapped"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L116_C4", "label": "return", "type": "return", "loc": [116, 116], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L99_C0", "vector": [13, 1, 0.6988, 0.006, 1, 0.77, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return morewrapped(func)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "label": "parse_timestring", "type": "function", "loc": [119, 145], "level": 0, "parent": null, "vector": [2, 0, 0.7952, 0.1627, 0, 0.66, 0.8571, 314, 0, 1, 1, 0, 0, 0, 8], "semantic": {"name": "parse_timestring", "arg_names": ["timestring"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def parse_timestring(timestring):\n \"\"\"\n Accept a time string, parse it and return a datetime object.\n\n >>> parse_timestring(\"Mon Apr 26 10:49:29 +0800 2010\")\n datetime.datetime(2010, 4, 26, 2, 49, 29)\n >>> parse_timestring(\"Mon Apr 26 10:49:29 -0800 2010\")\n datetime.datetime(2010, 4, 26, 18, 49, 29)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L120_C4", "label": "expression", "type": "expression", "loc": [120, 129], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "vector": [8, 1, 0.75, 0.0602, 1, 0.62, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Accept a time string, parse it and return a datetime object.\n\n >>> parse_timestring(\"Mon Apr 26 10:49:29 +0800 2010\")\n datetime.datetime(2010, 4, 26, 2, 49, 29)\n >>> parse_timestring(\"Mon Apr 26 10:49:29 -0800 2010\")\n datetime.datetime(2010, 4, 26, 18, 49, 29)\n >>> parse_timestring(\"Mon Apr 26 10:49:29 +0830 2010\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L130_C4", "label": "oldlocale = getlocale()", "type": "assigned_variable", "loc": [130, 130], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "vector": [14, 1, 0.7831, 0.006, 1, 0.62, 0.1111, 347, 3, 1, 0, 0, 650, 10, 1], "semantic": {"name": "oldlocale", "arg_names": [], "import_names": [], "rhs_call_name": "getlocale", "annotation": ""}, "snippet": " oldlocale = locale.getlocale(locale.LC_TIME)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L132_C4", "label": "if", "type": "if", "loc": [132, 135], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "vector": [4, 1, 0.8042, 0.0241, 1, 0.62, 0.2222, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if os.name =='nt':\n locale.setlocale(locale.LC_TIME, 'english')\n elif os.name =='posix':\n locale.setlocale(locale.LC_TIME, 'en_US.UTF-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L133_C8", "label": "setlocale()", "type": "expression", "loc": [133, 133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L132_C4", "vector": [8, 2, 0.8012, 0.006, 2, 0.63, 0.0, 735, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setlocale", "arg_names": [], "import_names": [], "rhs_call_name": "setlocale", "annotation": ""}, "snippet": " locale.setlocale(locale.LC_TIME, 'english')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L134_C4", "label": "if", "type": "if", "loc": [134, 135], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L132_C4", "vector": [4, 2, 0.8102, 0.012, 2, 0.63, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif os.name =='posix':\n locale.setlocale(locale.LC_TIME, 'en_US.UTF-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L135_C8", "label": "setlocale()", "type": "expression", "loc": [135, 135], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L134_C4", "vector": [8, 3, 0.8133, 0.006, 3, 0.99, 0.0, 735, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setlocale", "arg_names": [], "import_names": [], "rhs_call_name": "setlocale", "annotation": ""}, "snippet": " locale.setlocale(locale.LC_TIME, 'en_US.UTF-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L136_C4", "label": "strf =", "type": "assigned_variable", "loc": [136, 136], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "vector": [14, 1, 0.8193, 0.006, 1, 0.62, 0.3333, 708, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "strf", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " strf = timestring[:20] + timestring[26:] "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L137_C4", "label": "created_at = strptime()", "type": "assigned_variable", "loc": [137, 137], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "vector": [14, 1, 0.8253, 0.006, 1, 0.62, 0.4444, 642, 3, 2, 0, 0, 839, 10, 1], "semantic": {"name": "created_at", "arg_names": [], "import_names": [], "rhs_call_name": "strptime", "annotation": ""}, "snippet": " created_at = datetime.strptime(strf, \"%a %b %d %H:%M:%S %Y\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L140_C4", "label": "setlocale()", "type": "expression", "loc": [140, 140], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "vector": [8, 1, 0.8434, 0.006, 1, 0.62, 0.5556, 735, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setlocale", "arg_names": [], "import_names": [], "rhs_call_name": "setlocale", "annotation": ""}, "snippet": " locale.setlocale(locale.LC_TIME, oldlocale)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L142_C4", "label": "delta =", "type": "assigned_variable", "loc": [142, 142], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "vector": [14, 1, 0.8554, 0.006, 1, 0.62, 0.6667, 593, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "delta", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " delta = timestring[20:25] "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L143_C4", "label": "hour = int()", "type": "assigned_variable", "loc": [143, 143], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "vector": [14, 1, 0.8614, 0.006, 1, 0.62, 0.7778, 781, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "hour", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " hour = int(delta[:3]) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L144_C4", "label": "minute = int()", "type": "assigned_variable", "loc": [144, 144], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "vector": [14, 1, 0.8675, 0.006, 1, 0.62, 0.8889, 483, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "minute", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " minute = int(delta[3:]) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L145_C4", "label": "return", "type": "return", "loc": [145, 145], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "vector": [13, 1, 0.8735, 0.006, 1, 0.62, 1.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return created_at - timedelta(hours=hour, minutes=minute) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:ClassDef_L148_C0", "label": "RedirectHandler", "type": "class", "loc": [148, 161], "level": 0, "parent": null, "vector": [3, 0, 0.9307, 0.0843, 0, 0.66, 0.9286, 229, 0, 1, 0, 0, 607, 0, 3], "semantic": {"name": "RedirectHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class RedirectHandler(urllib2.HTTPRedirectHandler):\n def http_error_302(self, req, fp, code, msg, headers):\n \"\"\"\n For the moment, t.163.com would not return 404 status code correctly.\n Instead, it would return a 302 and redirect user to a page that will\n display 404 information. This would make web user happy, but we have to\n do extra to make our API elegant. Thus we have this handler to \n correctly raise 404 code."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L149_C4", "label": "http_error_302", "type": "function", "loc": [149, 161], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:ClassDef_L148_C0", "vector": [2, 1, 0.9337, 0.0783, 1, 0.43, 0.0, 895, 0, 6, 1, 0, 0, 0, 3], "semantic": {"name": "http_error_302", "arg_names": ["self", "req", "fp", "code", "msg", "headers"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def http_error_302(self, req, fp, code, msg, headers):\n \"\"\"\n For the moment, t.163.com would not return 404 status code correctly.\n Instead, it would return a 302 and redirect user to a page that will\n display 404 information. This would make web user happy, but we have to\n do extra to make our API elegant. Thus we have this handler to \n correctly raise 404 code.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L150_C8", "label": "expression", "type": "expression", "loc": [150, 156], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L149_C4", "vector": [8, 2, 0.9217, 0.0422, 2, 0.24, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n For the moment, t.163.com would not return 404 status code correctly.\n Instead, it would return a 302 and redirect user to a page that will\n display 404 information. This would make web user happy, but we have to\n do extra to make our API elegant. Thus we have this handler to \n correctly raise 404 code.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L157_C8", "label": "result = http_error_302()", "type": "assigned_variable", "loc": [157, 158], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L149_C4", "vector": [14, 2, 0.9488, 0.012, 2, 0.24, 0.3333, 51, 3, 6, 0, 0, 895, 10, 1], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "http_error_302", "annotation": ""}, "snippet": " result = urllib2.HTTPRedirectHandler.http_error_302(\n self, req, fp, code, msg, headers)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L159_C8", "label": "if", "type": "if", "loc": [159, 160], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L149_C4", "vector": [4, 2, 0.9608, 0.012, 2, 0.24, 0.6667, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if headers['location'] == 'http://t.163.com/notfound':\n raise urllib2.HTTPError(req.get_full_url(), 404, msg, headers, fp)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L161_C8", "label": "return", "type": "return", "loc": [161, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L149_C4", "vector": [13, 2, 0.9699, 0.006, 2, 0.24, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L164_C0", "label": "if", "type": "if", "loc": [164, 166], "level": 0, "parent": null, "vector": [4, 0, 0.994, 0.0181, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == \"__main__\":\n import doctest\n doctest.testmod()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Import_L165_C4", "label": "doctest import doctest", "type": "import", "loc": [165, 165], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L164_C0", "vector": [1, 1, 0.994, 0.006, 1, 0.62, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "doctest", "arg_names": [], "import_names": ["doctest"], "rhs_call_name": "", "annotation": ""}, "snippet": " import doctest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L166_C4", "label": "testmod()", "type": "expression", "loc": [166, 166], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L164_C0", "vector": [8, 1, 1.0, 0.006, 1, 0.62, 1.0, 116, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "testmod", "arg_names": [], "import_names": [], "rhs_call_name": "testmod", "annotation": ""}, "snippet": " doctest.testmod()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1437:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L60_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L61_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L61_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L62_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L60_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L63_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L65_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L77_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L78_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L78_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L79_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L78_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L80_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L80_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L81_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L80_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L83_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L77_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L84_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L84_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L88_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L84_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L89_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L84_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L90_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L84_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L93_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L77_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L94_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L95_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L99_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L100_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L99_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L107_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L108_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L109_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L109_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L110_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L109_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L111_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L111_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L112_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L111_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L113_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L108_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L114_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L99_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L116_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L120_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L130_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L132_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L133_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L134_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L134_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L135_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L136_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L137_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L140_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L142_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L143_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L144_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L145_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:ClassDef_L148_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L149_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L149_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L150_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L149_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Assign_L157_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L149_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L159_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:FunctionDef_L149_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Return_L161_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L164_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Import_L165_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1437:If_L164_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1437:Expr_L166_C4"}]
#!/usr/bin/env python #coding=utf-8 """ Author: Xia Kai <xiaket@gmail.com> Filename: __init__.py Type: Module meta information holder Last modified: 2010-05-16 20:44 Description: """ __author__ = "xiaket" __version__ = "0.2b"
ajibawa-2023/Python-Code-Large/train/row_1439
3
13
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1439:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 10], "level": 0, "parent": null, "vector": [8, 0, 0.5, 0.6154, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nAuthor: Xia Kai <xiaket@gmail.com>\nFilename: __init__.py\nType: Module meta information holder\nLast modified: 2010-05-16 20:44\n\nDescription:\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1439:Assign_L12_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.9231, 0.0769, 0, 0.66, 0.5, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__author__ = \"xiaket\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1439:Assign_L13_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [13, 13], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.0769, 0, 0.66, 1.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__version__ = \"0.2b\""}]
[]
#!/usr/bin/env python #coding=utf-8 """ Author: Xia Kai <xiaket@gmail.com> Filename: models.py Type: Class definition Last modified: 2010-05-24 22:27 Description: This file contains a class that would turn a dictionary containing user information as was returned by json request into a T163User class. So we may more convienently retrieve user information. """ from utils import parse_timestring class T163UserBase(object): """ Basic user information that can be public accessible. User dictionary = { profile_image_url_large 用户资料的大图片 80*80 id 用户id profile_image_url_small 用户资料的小图片 24*24 verified 已验证(为名人预留的?) reply_type 回复类型 profile_sidebar_fill_color profile_text_color followers_count fo这个用户的人数 location 这个用户所处的地理位置 profile_background_color utc_offset statuses_count 用户微博数 description 用户个人描述 friends_count 这个用户fo的人数 profile_link_color profile_image_url profile_background_image_url 用户资料的小图片 48*48 screen_name 屏幕显示名, 更常用 profile_background_tile favourites_count name 用户名 url 链接 gender 性别 created_at 注册时间 time_zone 时区 profile_sidebar_border_color """ def __init__(self, userdict): """ Long and tedious initilization process. """ # account information self.id = userdict['id'] self.screen_name = userdict['screen_name'] self.name = userdict['name'] # user profile self.url = userdict['url'] self.description = userdict['description'] self.location = userdict['location'] # following information self.followers_count = userdict['followers_count'] self.statuses_count = userdict['statuses_count'] self.friends_count = userdict['friends_count'] self.favourites_count = userdict['favourites_count'] # Gender is made more human readable. if userdict['gender'] == 0: self.gender = 'M' elif userdict['gender'] == 1: self.gender = 'F' else: self.gender = 'U' # Created_at is translated into a python datetime object. self.created_at = parse_timestring(userdict['created_at']) # these are not implemented yet, so we comment'em'out. """ # account information self.verified = userdict['verified'] # user profile self.time_zone = userdict['time_zone'] self.utc_offset = userdict['utc_offset'] # avatar image urls. self.image_large = userdict['profile_image_url_large'] self.image_medium = userdict['profile_image_url'] self.image_small = userdict['profile_image_url_small'] # user homepage appearance. self.profile_sidebar_fill_color = \ userdict['profile_sidebar_fill_color'] self.profile_text_color = userdict['profile_text_color'] self.profile_background_color = userdict['profile_background_color'] self.profile_link_color = userdict['profile_link_color'] self.profile_background_image_url = \ userdict['profile_background_image_url'] self.profile_background_tile = userdict['profile_background_tile'] self.profile_sidebar_border_color = \ userdict['profile_sidebar_border_color'] # unknown... self.reply_type = userdict['reply_type'] """ class User(T163UserBase): """ Additional user information is stored in the following dictionary: User dictionary = { telephone 用户手机号 email 用户邮箱 } """ def __init__(self, userdict): T163UserBase.__init__(self, userdict) # additional user profile self.telephone = userdict['telephone'] self.email = userdict['email'] class Follower(T163UserBase): """ This class is used to store information for followers, apart from those properties defined in T163UserBase, this class has the following information: Follower dictionary = { followed_by 这个用户是否在follow你 status 这个用户最新的一条推的详细信息 following 你是否在follow这个用户 """ def __init__(self, userdict): T163UserBase.__init__(self, userdict) self.followed_by = userdict['followed_by'] self.status = userdict['status'] self.following = userdict['following'] class T163StatusBase(object): """ This class is used to store basic status information. The status information is provided in a dictionary: Status dictionary = { user_id 用户id truncated 未知 text 推内容 created_at 发推时间 retweet_status_id 最初的被retweeted的消息的id. source 网易微博 in_reply_to_status_id None in_reply_to_screen_name None in_reply_to_user_id None type 未知 id 本消息id } """ def __init__(self, status_dict): self.user_id = status_dict['user_id'] self.text = status_dict['text'] self.created_at = parse_timestring(status_dict['created_at']) self.retweet_status_id = status_dict['retweet_status_id'] self.source = status_dict['source'] self.id = status_dict['id'] self.in_reply_to_status_id = status_dict['in_reply_to_status_id'] self.in_reply_to_screen_name = status_dict['in_reply_to_screen_name'] self.in_reply_to_user_id = status_dict['in_reply_to_user_id'] # these are not implemented yet, so we comment'em'out. """ self.truncated = status_dict['truncated'] self.type = status_dict['type'] """ class Status(T163StatusBase): """ This class is for the show() api, which is used to show the detailed information for a tweet. Additional information: favorited False in_reply_to_status_text None favorited_at None in_reply_to_user_name None user """ def __init__(self, status_dict): T163StatusBase.__init__(self, status_dict) self.user = T163UserBase(status_dict['user']) # these are not implemented yet, so we comment'em'out. """ self.favorited = status_dict['favorited'] self.in_reply_to_status_text = status_dict['in_reply_to_status_text'] self.favorited_at = status_dict['favorited_at'] self.in_reply_to_user_name = status_dict['in_reply_to_user_name'] """ class StatusWithIpaddr(T163StatusBase): """ This class is for the show() api, which is used to show the detailed information for a tweet. Additional information: auditStatus 未知 ipaddr 117.84.92.50 """ def __init__(self, status_dict): T163StatusBase.__init__(self, status_dict) self.ipaddr = status_dict['ipaddr'] class DirectMessage(object): """ sender_screen_name corleone followed_by True sender T163UserBaseObject text 测试内容啊啊 created_at Tue Apr 27 20:40:58 +0800 2010 sender_id -5127315299555819730 recipient_id 6493809605159984224 recipient_screen_name xiaket recipient T163UserBaseObject id 7950999978748591002 """ def __init__(self, messagedict): # message self.id = messagedict['id'] self.text = messagedict['text'] self.created_at = parse_timestring(messagedict['created_at']) # sender self.sender = T163UserBase(messagedict['sender']) self.sender_id = messagedict['sender_id'] self.sender_screen_name = messagedict['sender_screen_name'] self.followed = messagedict['followed_by'] # recipient self.recipient = T163UserBase(messagedict['recipient']) self.recipient_id = messagedict['recipient_id'] self.recipient_screen_name = messagedict['recipient_screen_name'] class SearchHit(T163StatusBase): """ This class is for the show() api, which is used to show the detailed information for a tweet. Additional information: favorited False favorited_at None in_reply_to_user_name None user """ def __init__(self, status_dict): T163StatusBase.__init__(self, status_dict) self.user = T163UserBase(status_dict['user']) # these are not implemented yet, so we comment'em'out. """ self.favorited = status_dict['favorited'] self.favorited_at = status_dict['favorited_at'] self.in_reply_to_user_name = status_dict['in_reply_to_user_name'] """ class SearchResult(object): """ totalHits 14973 next_page completed_in 0 availHits 600 refresh_url since_id 0 results_per_page 30 result query max_id 0 page 1 """ def __init__(self, result_dict): self.totalHits = result_dict['totalHits'] self.next_page = result_dict['next_page'] self.completed_in = result_dict['completed_in'] self.availHits = result_dict['availHits'] self.refresh_url = result_dict['refresh_url'] self.since_id = result_dict['since_id'] self.results_per_page = result_dict['results_per_page'] self.result = [] for item in result_dict['result']: self.result.append(SearchHit(item)) self.query = result_dict['query'] self.max_id = result_dict['max_id'] self.page = result_dict['page'] class UserSearchResult(object): """ totalHits number availHits number result list """ def __init__(self, result_dict): self.totalHits = result_dict['totalHits'] self.availHits = result_dict['availHits'] self.result = [] for item in result_dict['result']: self.result.append(UserSearchHit(item)) class UserSearchHit(T163UserBase): """ Additional information stored in the search result: telephone always null email always null status StatusWithIpaddr following False } """ def __init__(self, userdict): T163UserBase.__init__(self, userdict) # additional user profile self.status = StatusWithIpaddr(userdict['status']) self.following = userdict['following']
ajibawa-2023/Python-Code-Large/train/row_1440
109
332
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 13], "level": 0, "parent": null, "vector": [8, 0, 0.0241, 0.0331, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nAuthor: Xia Kai <xiaket@gmail.com>\nFilename: models.py\nType: Class definition\nLast modified: 2010-05-24 22:27\n\nDescription:\nThis file contains a class that would turn a dictionary containing user"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:ImportFrom_L14_C0", "label": "from utils import parse_timestring", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0422, 0.003, 0, 0.66, 0.0833, 970, 0, 1, 0, 0, 970, 0, 0], "semantic": {"name": "utils", "arg_names": [], "import_names": ["parse_timestring"], "rhs_call_name": "", "annotation": ""}, "snippet": "from utils import parse_timestring"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L17_C0", "label": "T163UserBase", "type": "class", "loc": [17, 107], "level": 0, "parent": null, "vector": [3, 0, 0.1867, 0.2741, 0, 0.66, 0.1667, 162, 0, 1, 0, 0, 186, 0, 1], "semantic": {"name": "T163UserBase", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class T163UserBase(object):\n \"\"\"\n Basic user information that can be public accessible.\n User dictionary = {\n profile_image_url_large \u7528\u6237\u8d44\u6599\u7684\u5927\u56fe\u7247 80*80\n id \u7528\u6237id\n profile_image_url_small \u7528\u6237\u8d44\u6599\u7684\u5c0f\u56fe\u7247 24*24\n verified \u5df2\u9a8c\u8bc1(\u4e3a\u540d\u4eba\u9884\u7559\u7684?)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L18_C4", "label": "expression", "type": "expression", "loc": [18, 47], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L17_C0", "vector": [8, 1, 0.0979, 0.0904, 1, 0.61, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Basic user information that can be public accessible.\n User dictionary = {\n profile_image_url_large \u7528\u6237\u8d44\u6599\u7684\u5927\u56fe\u7247 80*80\n id \u7528\u6237id\n profile_image_url_small \u7528\u6237\u8d44\u6599\u7684\u5c0f\u56fe\u7247 24*24\n verified \u5df2\u9a8c\u8bc1(\u4e3a\u540d\u4eba\u9884\u7559\u7684?)\n reply_type \u56de\u590d\u7c7b\u578b"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "label": "__init__", "type": "function", "loc": [48, 107], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L17_C0", "vector": [2, 1, 0.2334, 0.1807, 1, 0.61, 1.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "userdict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, userdict):\n \"\"\"\n Long and tedious initilization process.\n \"\"\"\n # account information\n self.id = userdict['id']\n self.screen_name = userdict['screen_name']\n self.name = userdict['name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L49_C8", "label": "expression", "type": "expression", "loc": [49, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "vector": [8, 2, 0.1506, 0.009, 2, 0.48, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Long and tedious initilization process.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L53_C8", "label": "self.id =", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "vector": [14, 2, 0.1596, 0.003, 2, 0.48, 0.0769, 485, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.id = userdict['id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L54_C8", "label": "self.screen_name =", "type": "assigned_variable", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "vector": [14, 2, 0.1627, 0.003, 2, 0.48, 0.1538, 600, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.screen_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.screen_name = userdict['screen_name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L55_C8", "label": "self.name =", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "vector": [14, 2, 0.1657, 0.003, 2, 0.48, 0.2308, 689, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.name = userdict['name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L58_C8", "label": "self.url =", "type": "assigned_variable", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "vector": [14, 2, 0.1747, 0.003, 2, 0.48, 0.3077, 720, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.url", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url = userdict['url']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L59_C8", "label": "self.description =", "type": "assigned_variable", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "vector": [14, 2, 0.1777, 0.003, 2, 0.48, 0.3846, 171, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.description", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.description = userdict['description']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L60_C8", "label": "self.location =", "type": "assigned_variable", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "vector": [14, 2, 0.1807, 0.003, 2, 0.48, 0.4615, 840, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.location", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.location = userdict['location']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L63_C8", "label": "self.followers_count =", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "vector": [14, 2, 0.1898, 0.003, 2, 0.48, 0.5385, 952, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.followers_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.followers_count = userdict['followers_count']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L64_C8", "label": "self.statuses_count =", "type": "assigned_variable", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "vector": [14, 2, 0.1928, 0.003, 2, 0.48, 0.6154, 582, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.statuses_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.statuses_count = userdict['statuses_count']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L65_C8", "label": "self.friends_count =", "type": "assigned_variable", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "vector": [14, 2, 0.1958, 0.003, 2, 0.48, 0.6923, 975, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.friends_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.friends_count = userdict['friends_count']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L66_C8", "label": "self.favourites_count =", "type": "assigned_variable", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "vector": [14, 2, 0.1988, 0.003, 2, 0.48, 0.7692, 165, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.favourites_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.favourites_count = userdict['favourites_count']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:If_L69_C8", "label": "if", "type": "if", "loc": [69, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "vector": [4, 2, 0.2154, 0.0181, 2, 0.48, 0.8462, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if userdict['gender'] == 0:\n self.gender = 'M'\n elif userdict['gender'] == 1:\n self.gender = 'F'\n else:\n self.gender = 'U'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L70_C12", "label": "self.gender =", "type": "assigned_variable", "loc": [70, 70], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:If_L69_C8", "vector": [14, 3, 0.2108, 0.003, 3, 0.54, 0.0, 950, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.gender", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.gender = 'M'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:If_L71_C8", "label": "if", "type": "if", "loc": [71, 74], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:If_L69_C8", "vector": [4, 3, 0.2184, 0.012, 3, 0.54, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif userdict['gender'] == 1:\n self.gender = 'F'\n else:\n self.gender = 'U'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L72_C12", "label": "self.gender =", "type": "assigned_variable", "loc": [72, 72], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:If_L71_C8", "vector": [14, 4, 0.2169, 0.003, 4, 0.88, 0.0, 950, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.gender", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.gender = 'F'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L74_C12", "label": "self.gender =", "type": "assigned_variable", "loc": [74, 74], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:If_L71_C8", "vector": [14, 4, 0.2229, 0.003, 4, 0.88, 1.0, 950, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.gender", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.gender = 'U'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L77_C8", "label": "self.created_at = parse_timestring()", "type": "assigned_variable", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "vector": [14, 2, 0.2319, 0.003, 2, 0.48, 0.9231, 450, 3, 1, 0, 0, 314, 10, 1], "semantic": {"name": "self.created_at", "arg_names": [], "import_names": [], "rhs_call_name": "parse_timestring", "annotation": ""}, "snippet": " self.created_at = parse_timestring(userdict['created_at'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L80_C8", "label": "expression", "type": "expression", "loc": [80, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "vector": [8, 2, 0.2816, 0.0843, 2, 0.48, 1.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n # account information\n self.verified = userdict['verified']\n\n # user profile\n self.time_zone = userdict['time_zone']\n self.utc_offset = userdict['utc_offset']\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L110_C0", "label": "User", "type": "class", "loc": [110, 123], "level": 0, "parent": null, "vector": [3, 0, 0.3509, 0.0422, 0, 0.66, 0.25, 61, 0, 1, 0, 0, 162, 0, 1], "semantic": {"name": "User", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class User(T163UserBase):\n \"\"\"\n Additional user information is stored in the following dictionary:\n User dictionary = {\n telephone \u7528\u6237\u624b\u673a\u53f7\n email \u7528\u6237\u90ae\u7bb1\n }\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L111_C4", "label": "expression", "type": "expression", "loc": [111, 117], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L110_C0", "vector": [8, 1, 0.3434, 0.0211, 1, 0.32, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Additional user information is stored in the following dictionary:\n User dictionary = {\n telephone \u7528\u6237\u624b\u673a\u53f7\n email \u7528\u6237\u90ae\u7bb1\n }\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L118_C4", "label": "__init__", "type": "function", "loc": [118, 123], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L110_C0", "vector": [2, 1, 0.363, 0.0181, 1, 0.32, 1.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "userdict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, userdict):\n T163UserBase.__init__(self, userdict)\n\n # additional user profile\n self.telephone = userdict['telephone']\n self.email = userdict['email']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L119_C8", "label": "__init__()", "type": "expression", "loc": [119, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L118_C4", "vector": [8, 2, 0.3584, 0.003, 2, 0.39, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " T163UserBase.__init__(self, userdict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L122_C8", "label": "self.telephone =", "type": "assigned_variable", "loc": [122, 122], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L118_C4", "vector": [14, 2, 0.3675, 0.003, 2, 0.39, 0.5, 539, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.telephone", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.telephone = userdict['telephone']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L123_C8", "label": "self.email =", "type": "assigned_variable", "loc": [123, 123], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L118_C4", "vector": [14, 2, 0.3705, 0.003, 2, 0.39, 1.0, 2, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.email", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.email = userdict['email']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L126_C0", "label": "Follower", "type": "class", "loc": [126, 141], "level": 0, "parent": null, "vector": [3, 0, 0.4021, 0.0482, 0, 0.66, 0.3333, 616, 0, 1, 0, 0, 162, 0, 1], "semantic": {"name": "Follower", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Follower(T163UserBase):\n \"\"\"\n This class is used to store information for followers, apart from those\n properties defined in T163UserBase, this class has the following\n information:\n\n Follower dictionary = {\n followed_by \u8fd9\u4e2a\u7528\u6237\u662f\u5426\u5728follow\u4f60"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L127_C4", "label": "expression", "type": "expression", "loc": [127, 136], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L126_C0", "vector": [8, 1, 0.3961, 0.0301, 1, 0.63, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This class is used to store information for followers, apart from those\n properties defined in T163UserBase, this class has the following\n information:\n\n Follower dictionary = {\n followed_by \u8fd9\u4e2a\u7528\u6237\u662f\u5426\u5728follow\u4f60\n status \u8fd9\u4e2a\u7528\u6237\u6700\u65b0\u7684\u4e00\u6761\u63a8\u7684\u8be6\u7ec6\u4fe1\u606f"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L137_C4", "label": "__init__", "type": "function", "loc": [137, 141], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L126_C0", "vector": [2, 1, 0.4187, 0.0151, 1, 0.63, 1.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "userdict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, userdict):\n T163UserBase.__init__(self, userdict)\n self.followed_by = userdict['followed_by']\n self.status = userdict['status']\n self.following = userdict['following']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L138_C8", "label": "__init__()", "type": "expression", "loc": [138, 138], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L137_C4", "vector": [8, 2, 0.4157, 0.003, 2, 0.82, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " T163UserBase.__init__(self, userdict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L139_C8", "label": "self.followed_by =", "type": "assigned_variable", "loc": [139, 139], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L137_C4", "vector": [14, 2, 0.4187, 0.003, 2, 0.82, 0.3333, 173, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.followed_by", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.followed_by = userdict['followed_by']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L140_C8", "label": "self.status =", "type": "assigned_variable", "loc": [140, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L137_C4", "vector": [14, 2, 0.4217, 0.003, 2, 0.82, 0.6667, 651, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.status = userdict['status']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L141_C8", "label": "self.following =", "type": "assigned_variable", "loc": [141, 141], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L137_C4", "vector": [14, 2, 0.4247, 0.003, 2, 0.82, 1.0, 596, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.following", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.following = userdict['following']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L144_C0", "label": "T163StatusBase", "type": "class", "loc": [144, 178], "level": 0, "parent": null, "vector": [3, 0, 0.4849, 0.1054, 0, 0.66, 0.4167, 587, 0, 1, 0, 0, 186, 0, 1], "semantic": {"name": "T163StatusBase", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class T163StatusBase(object):\n \"\"\"\n This class is used to store basic status information. The status \n information is provided in a dictionary:\n\n Status dictionary = {\n user_id \u7528\u6237id\n truncated \u672a\u77e5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L145_C4", "label": "expression", "type": "expression", "loc": [145, 162], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L144_C0", "vector": [8, 1, 0.4623, 0.0542, 1, 0.2, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This class is used to store basic status information. The status \n information is provided in a dictionary:\n\n Status dictionary = {\n user_id \u7528\u6237id\n truncated \u672a\u77e5\n text \u63a8\u5185\u5bb9"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "label": "__init__", "type": "function", "loc": [163, 178], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L144_C0", "vector": [2, 1, 0.5136, 0.0482, 1, 0.2, 1.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "status_dict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, status_dict):\n self.user_id = status_dict['user_id']\n self.text = status_dict['text']\n self.created_at = parse_timestring(status_dict['created_at'])\n self.retweet_status_id = status_dict['retweet_status_id']\n self.source = status_dict['source']\n self.id = status_dict['id']\n self.in_reply_to_status_id = status_dict['in_reply_to_status_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L164_C8", "label": "self.user_id =", "type": "assigned_variable", "loc": [164, 164], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "vector": [14, 2, 0.494, 0.003, 2, 0.16, 0.0, 381, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.user_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.user_id = status_dict['user_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L165_C8", "label": "self.text =", "type": "assigned_variable", "loc": [165, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "vector": [14, 2, 0.497, 0.003, 2, 0.16, 0.1111, 320, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = status_dict['text']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L166_C8", "label": "self.created_at = parse_timestring()", "type": "assigned_variable", "loc": [166, 166], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "vector": [14, 2, 0.5, 0.003, 2, 0.16, 0.2222, 450, 3, 1, 0, 0, 314, 10, 1], "semantic": {"name": "self.created_at", "arg_names": [], "import_names": [], "rhs_call_name": "parse_timestring", "annotation": ""}, "snippet": " self.created_at = parse_timestring(status_dict['created_at'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L167_C8", "label": "self.retweet_status_id =", "type": "assigned_variable", "loc": [167, 167], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "vector": [14, 2, 0.503, 0.003, 2, 0.16, 0.3333, 656, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.retweet_status_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.retweet_status_id = status_dict['retweet_status_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L168_C8", "label": "self.source =", "type": "assigned_variable", "loc": [168, 168], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "vector": [14, 2, 0.506, 0.003, 2, 0.16, 0.4444, 848, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.source", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.source = status_dict['source']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L169_C8", "label": "self.id =", "type": "assigned_variable", "loc": [169, 169], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "vector": [14, 2, 0.509, 0.003, 2, 0.16, 0.5556, 485, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.id = status_dict['id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L170_C8", "label": "self.in_reply_to_status_id =", "type": "assigned_variable", "loc": [170, 170], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "vector": [14, 2, 0.512, 0.003, 2, 0.16, 0.6667, 985, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.in_reply_to_status_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.in_reply_to_status_id = status_dict['in_reply_to_status_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L171_C8", "label": "self.in_reply_to_screen_name =", "type": "assigned_variable", "loc": [171, 171], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "vector": [14, 2, 0.5151, 0.003, 2, 0.16, 0.7778, 892, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.in_reply_to_screen_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.in_reply_to_screen_name = status_dict['in_reply_to_screen_name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L172_C8", "label": "self.in_reply_to_user_id =", "type": "assigned_variable", "loc": [172, 172], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "vector": [14, 2, 0.5181, 0.003, 2, 0.16, 0.8889, 180, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.in_reply_to_user_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.in_reply_to_user_id = status_dict['in_reply_to_user_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L175_C8", "label": "expression", "type": "expression", "loc": [175, 178], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "vector": [8, 2, 0.5316, 0.012, 2, 0.16, 1.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n self.truncated = status_dict['truncated']\n self.type = status_dict['type']\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L181_C0", "label": "Status", "type": "class", "loc": [181, 203], "level": 0, "parent": null, "vector": [3, 0, 0.5783, 0.0693, 0, 0.66, 0.5, 820, 0, 1, 0, 0, 587, 0, 2], "semantic": {"name": "Status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Status(T163StatusBase):\n \"\"\"\n This class is for the show() api, which is used to show the detailed\n information for a tweet.\n\n Additional information:\n favorited False\n in_reply_to_status_text None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L182_C4", "label": "expression", "type": "expression", "loc": [182, 192], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L181_C0", "vector": [8, 1, 0.5633, 0.0331, 1, 0.93, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This class is for the show() api, which is used to show the detailed\n information for a tweet.\n\n Additional information:\n favorited False\n in_reply_to_status_text None\n favorited_at None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L193_C4", "label": "__init__", "type": "function", "loc": [193, 203], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L181_C0", "vector": [2, 1, 0.5964, 0.0331, 1, 0.93, 1.0, 555, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "status_dict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, status_dict):\n T163StatusBase.__init__(self, status_dict)\n self.user = T163UserBase(status_dict['user'])\n\n # these are not implemented yet, so we comment'em'out.\n \"\"\"\n self.favorited = status_dict['favorited']\n self.in_reply_to_status_text = status_dict['in_reply_to_status_text']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L194_C8", "label": "__init__()", "type": "expression", "loc": [194, 194], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L193_C4", "vector": [8, 2, 0.5843, 0.003, 2, 0.08, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " T163StatusBase.__init__(self, status_dict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L195_C8", "label": "self.user = T163UserBase()", "type": "assigned_variable", "loc": [195, 195], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L193_C4", "vector": [14, 2, 0.5873, 0.003, 2, 0.08, 0.5, 371, 3, 1, 0, 0, 162, 10, 1], "semantic": {"name": "self.user", "arg_names": [], "import_names": [], "rhs_call_name": "T163UserBase", "annotation": ""}, "snippet": " self.user = T163UserBase(status_dict['user'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L198_C8", "label": "expression", "type": "expression", "loc": [198, 203], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L193_C4", "vector": [8, 2, 0.6039, 0.0181, 2, 0.08, 1.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n self.favorited = status_dict['favorited']\n self.in_reply_to_status_text = status_dict['in_reply_to_status_text']\n self.favorited_at = status_dict['favorited_at']\n self.in_reply_to_user_name = status_dict['in_reply_to_user_name']\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L206_C0", "label": "StatusWithIpaddr", "type": "class", "loc": [206, 217], "level": 0, "parent": null, "vector": [3, 0, 0.637, 0.0361, 0, 0.66, 0.5833, 809, 0, 1, 0, 0, 587, 0, 1], "semantic": {"name": "StatusWithIpaddr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class StatusWithIpaddr(T163StatusBase):\n \"\"\"\n This class is for the show() api, which is used to show the detailed\n information for a tweet.\n\n Additional information:\n auditStatus \u672a\u77e5\n ipaddr 117.84.92.50"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L207_C4", "label": "expression", "type": "expression", "loc": [207, 214], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L206_C0", "vector": [8, 1, 0.634, 0.0241, 1, 0.69, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This class is for the show() api, which is used to show the detailed\n information for a tweet.\n\n Additional information:\n auditStatus \u672a\u77e5\n ipaddr 117.84.92.50\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L215_C4", "label": "__init__", "type": "function", "loc": [215, 217], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L206_C0", "vector": [2, 1, 0.6506, 0.009, 1, 0.69, 1.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "status_dict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, status_dict):\n T163StatusBase.__init__(self, status_dict)\n self.ipaddr = status_dict['ipaddr']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L216_C8", "label": "__init__()", "type": "expression", "loc": [216, 216], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L215_C4", "vector": [8, 2, 0.6506, 0.003, 2, 0.64, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " T163StatusBase.__init__(self, status_dict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L217_C8", "label": "self.ipaddr =", "type": "assigned_variable", "loc": [217, 217], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L215_C4", "vector": [14, 2, 0.6536, 0.003, 2, 0.64, 1.0, 76, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.ipaddr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.ipaddr = status_dict['ipaddr']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L220_C0", "label": "DirectMessage", "type": "class", "loc": [220, 248], "level": 0, "parent": null, "vector": [3, 0, 0.7048, 0.0873, 0, 0.66, 0.6667, 693, 0, 1, 0, 0, 186, 0, 3], "semantic": {"name": "DirectMessage", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class DirectMessage(object):\n \"\"\"\n sender_screen_name corleone\n followed_by True\n sender T163UserBaseObject\n text \u6d4b\u8bd5\u5185\u5bb9\u554a\u554a\n created_at Tue Apr 27 20:40:58 +0800 2010\n sender_id -5127315299555819730"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L221_C4", "label": "expression", "type": "expression", "loc": [221, 232], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L220_C0", "vector": [8, 1, 0.6822, 0.0361, 1, 0.67, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n sender_screen_name corleone\n followed_by True\n sender T163UserBaseObject\n text \u6d4b\u8bd5\u5185\u5bb9\u554a\u554a\n created_at Tue Apr 27 20:40:58 +0800 2010\n sender_id -5127315299555819730\n recipient_id 6493809605159984224"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "label": "__init__", "type": "function", "loc": [233, 248], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L220_C0", "vector": [2, 1, 0.7244, 0.0482, 1, 0.67, 1.0, 555, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "__init__", "arg_names": ["self", "messagedict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, messagedict):\n # message\n self.id = messagedict['id']\n self.text = messagedict['text']\n self.created_at = parse_timestring(messagedict['created_at'])\n\n # sender\n self.sender = T163UserBase(messagedict['sender'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L235_C8", "label": "self.id =", "type": "assigned_variable", "loc": [235, 235], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "vector": [14, 2, 0.7078, 0.003, 2, 0.23, 0.0, 485, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.id = messagedict['id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L236_C8", "label": "self.text =", "type": "assigned_variable", "loc": [236, 236], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "vector": [14, 2, 0.7108, 0.003, 2, 0.23, 0.1111, 320, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = messagedict['text']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L237_C8", "label": "self.created_at = parse_timestring()", "type": "assigned_variable", "loc": [237, 237], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "vector": [14, 2, 0.7139, 0.003, 2, 0.23, 0.2222, 450, 3, 1, 0, 0, 314, 10, 1], "semantic": {"name": "self.created_at", "arg_names": [], "import_names": [], "rhs_call_name": "parse_timestring", "annotation": ""}, "snippet": " self.created_at = parse_timestring(messagedict['created_at'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L240_C8", "label": "self.sender = T163UserBase()", "type": "assigned_variable", "loc": [240, 240], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "vector": [14, 2, 0.7229, 0.003, 2, 0.23, 0.3333, 56, 3, 1, 0, 0, 162, 10, 1], "semantic": {"name": "self.sender", "arg_names": [], "import_names": [], "rhs_call_name": "T163UserBase", "annotation": ""}, "snippet": " self.sender = T163UserBase(messagedict['sender'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L241_C8", "label": "self.sender_id =", "type": "assigned_variable", "loc": [241, 241], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "vector": [14, 2, 0.7259, 0.003, 2, 0.23, 0.4444, 480, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.sender_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.sender_id = messagedict['sender_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L242_C8", "label": "self.sender_screen_name =", "type": "assigned_variable", "loc": [242, 242], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "vector": [14, 2, 0.7289, 0.003, 2, 0.23, 0.5556, 848, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.sender_screen_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.sender_screen_name = messagedict['sender_screen_name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L243_C8", "label": "self.followed =", "type": "assigned_variable", "loc": [243, 243], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "vector": [14, 2, 0.7319, 0.003, 2, 0.23, 0.6667, 286, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.followed", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.followed = messagedict['followed_by']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L246_C8", "label": "self.recipient = T163UserBase()", "type": "assigned_variable", "loc": [246, 246], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "vector": [14, 2, 0.741, 0.003, 2, 0.23, 0.7778, 152, 3, 1, 0, 0, 162, 10, 1], "semantic": {"name": "self.recipient", "arg_names": [], "import_names": [], "rhs_call_name": "T163UserBase", "annotation": ""}, "snippet": " self.recipient = T163UserBase(messagedict['recipient'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L247_C8", "label": "self.recipient_id =", "type": "assigned_variable", "loc": [247, 247], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "vector": [14, 2, 0.744, 0.003, 2, 0.23, 0.8889, 262, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.recipient_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.recipient_id = messagedict['recipient_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L248_C8", "label": "self.recipient_screen_name =", "type": "assigned_variable", "loc": [248, 248], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "vector": [14, 2, 0.747, 0.003, 2, 0.23, 1.0, 507, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.recipient_screen_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.recipient_screen_name = messagedict['recipient_screen_name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L251_C0", "label": "SearchHit", "type": "class", "loc": [251, 271], "level": 0, "parent": null, "vector": [3, 0, 0.7861, 0.0633, 0, 0.66, 0.75, 911, 0, 1, 0, 0, 587, 0, 2], "semantic": {"name": "SearchHit", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class SearchHit(T163StatusBase):\n \"\"\"\n This class is for the show() api, which is used to show the detailed\n information for a tweet.\n\n Additional information:\n favorited False\n favorited_at None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L252_C4", "label": "expression", "type": "expression", "loc": [252, 261], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L251_C0", "vector": [8, 1, 0.7726, 0.0301, 1, 0.5, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This class is for the show() api, which is used to show the detailed\n information for a tweet.\n\n Additional information:\n favorited False\n favorited_at None\n in_reply_to_user_name None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L262_C4", "label": "__init__", "type": "function", "loc": [262, 271], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L251_C0", "vector": [2, 1, 0.8027, 0.0301, 1, 0.5, 1.0, 555, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "status_dict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, status_dict):\n T163StatusBase.__init__(self, status_dict)\n self.user = T163UserBase(status_dict['user'])\n\n # these are not implemented yet, so we comment'em'out.\n \"\"\"\n self.favorited = status_dict['favorited']\n self.favorited_at = status_dict['favorited_at']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L263_C8", "label": "__init__()", "type": "expression", "loc": [263, 263], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L262_C4", "vector": [8, 2, 0.7922, 0.003, 2, 0.1, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " T163StatusBase.__init__(self, status_dict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L264_C8", "label": "self.user = T163UserBase()", "type": "assigned_variable", "loc": [264, 264], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L262_C4", "vector": [14, 2, 0.7952, 0.003, 2, 0.1, 0.5, 371, 3, 1, 0, 0, 162, 10, 1], "semantic": {"name": "self.user", "arg_names": [], "import_names": [], "rhs_call_name": "T163UserBase", "annotation": ""}, "snippet": " self.user = T163UserBase(status_dict['user'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L267_C8", "label": "expression", "type": "expression", "loc": [267, 271], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L262_C4", "vector": [8, 2, 0.8102, 0.0151, 2, 0.1, 1.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n self.favorited = status_dict['favorited']\n self.favorited_at = status_dict['favorited_at']\n self.in_reply_to_user_name = status_dict['in_reply_to_user_name']\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L274_C0", "label": "SearchResult", "type": "class", "loc": [274, 301], "level": 0, "parent": null, "vector": [3, 0, 0.866, 0.0843, 0, 0.66, 0.8333, 821, 0, 1, 0, 0, 186, 0, 2], "semantic": {"name": "SearchResult", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class SearchResult(object):\n \"\"\"\n totalHits 14973\n next_page\n completed_in 0\n availHits 600\n refresh_url\n since_id 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L275_C4", "label": "expression", "type": "expression", "loc": [275, 287], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L274_C0", "vector": [8, 1, 0.8464, 0.0392, 1, 0.87, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n totalHits 14973\n next_page\n completed_in 0\n availHits 600\n refresh_url\n since_id 0\n results_per_page 30"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "label": "__init__", "type": "function", "loc": [288, 301], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L274_C0", "vector": [2, 1, 0.887, 0.0422, 1, 0.87, 1.0, 555, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "result_dict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, result_dict):\n self.totalHits = result_dict['totalHits']\n self.next_page = result_dict['next_page']\n self.completed_in = result_dict['completed_in']\n self.availHits = result_dict['availHits']\n self.refresh_url = result_dict['refresh_url']\n self.since_id = result_dict['since_id']\n self.results_per_page = result_dict['results_per_page']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L289_C8", "label": "self.totalHits =", "type": "assigned_variable", "loc": [289, 289], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "vector": [14, 2, 0.8705, 0.003, 2, 0.93, 0.0, 7, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.totalHits", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.totalHits = result_dict['totalHits']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L290_C8", "label": "self.next_page =", "type": "assigned_variable", "loc": [290, 290], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "vector": [14, 2, 0.8735, 0.003, 2, 0.93, 0.0909, 862, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.next_page", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.next_page = result_dict['next_page']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L291_C8", "label": "self.completed_in =", "type": "assigned_variable", "loc": [291, 291], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "vector": [14, 2, 0.8765, 0.003, 2, 0.93, 0.1818, 280, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.completed_in", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.completed_in = result_dict['completed_in']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L292_C8", "label": "self.availHits =", "type": "assigned_variable", "loc": [292, 292], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "vector": [14, 2, 0.8795, 0.003, 2, 0.93, 0.2727, 372, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.availHits", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.availHits = result_dict['availHits']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L293_C8", "label": "self.refresh_url =", "type": "assigned_variable", "loc": [293, 293], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "vector": [14, 2, 0.8825, 0.003, 2, 0.93, 0.3636, 938, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.refresh_url", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.refresh_url = result_dict['refresh_url']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L294_C8", "label": "self.since_id =", "type": "assigned_variable", "loc": [294, 294], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "vector": [14, 2, 0.8855, 0.003, 2, 0.93, 0.4545, 212, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.since_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.since_id = result_dict['since_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L295_C8", "label": "self.results_per_page =", "type": "assigned_variable", "loc": [295, 295], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "vector": [14, 2, 0.8886, 0.003, 2, 0.93, 0.5455, 528, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.results_per_page", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.results_per_page = result_dict['results_per_page']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L296_C8", "label": "self.result =", "type": "assigned_variable", "loc": [296, 296], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "vector": [14, 2, 0.8916, 0.003, 2, 0.93, 0.6364, 341, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.result = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:For_L297_C8", "label": "for item", "type": "for", "loc": [297, 298], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "vector": [6, 2, 0.8961, 0.006, 2, 0.93, 0.7273, 434, 6, 0, 0, 0, 0, 0, 2], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for item in result_dict['result']:\n self.result.append(SearchHit(item))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L298_C12", "label": "append()", "type": "expression", "loc": [298, 298], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:For_L297_C8", "vector": [8, 3, 0.8976, 0.003, 3, 0.35, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.result.append(SearchHit(item))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L299_C8", "label": "self.query =", "type": "assigned_variable", "loc": [299, 299], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "vector": [14, 2, 0.9006, 0.003, 2, 0.93, 0.8182, 241, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.query", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.query = result_dict['query']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L300_C8", "label": "self.max_id =", "type": "assigned_variable", "loc": [300, 300], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "vector": [14, 2, 0.9036, 0.003, 2, 0.93, 0.9091, 771, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.max_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.max_id = result_dict['max_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L301_C8", "label": "self.page =", "type": "assigned_variable", "loc": [301, 301], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "vector": [14, 2, 0.9066, 0.003, 2, 0.93, 1.0, 417, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.page", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.page = result_dict['page']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L304_C0", "label": "UserSearchResult", "type": "class", "loc": [304, 315], "level": 0, "parent": null, "vector": [3, 0, 0.9322, 0.0361, 0, 0.66, 0.9167, 924, 0, 1, 0, 0, 186, 0, 2], "semantic": {"name": "UserSearchResult", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class UserSearchResult(object):\n \"\"\"\n totalHits number\n availHits number\n result list\n \"\"\"\n def __init__(self, result_dict):\n self.totalHits = result_dict['totalHits']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L305_C4", "label": "expression", "type": "expression", "loc": [305, 309], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L304_C0", "vector": [8, 1, 0.9247, 0.0151, 1, 0.24, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n totalHits number\n availHits number\n result list\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L310_C4", "label": "__init__", "type": "function", "loc": [310, 315], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L304_C0", "vector": [2, 1, 0.9413, 0.0181, 1, 0.24, 1.0, 555, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "result_dict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, result_dict):\n self.totalHits = result_dict['totalHits']\n self.availHits = result_dict['availHits']\n self.result = []\n for item in result_dict['result']:\n self.result.append(UserSearchHit(item))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L311_C8", "label": "self.totalHits =", "type": "assigned_variable", "loc": [311, 311], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L310_C4", "vector": [14, 2, 0.9367, 0.003, 2, 0.62, 0.0, 7, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.totalHits", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.totalHits = result_dict['totalHits']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L312_C8", "label": "self.availHits =", "type": "assigned_variable", "loc": [312, 312], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L310_C4", "vector": [14, 2, 0.9398, 0.003, 2, 0.62, 0.3333, 372, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.availHits", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.availHits = result_dict['availHits']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L313_C8", "label": "self.result =", "type": "assigned_variable", "loc": [313, 313], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L310_C4", "vector": [14, 2, 0.9428, 0.003, 2, 0.62, 0.6667, 341, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.result = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:For_L314_C8", "label": "for item", "type": "for", "loc": [314, 315], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L310_C4", "vector": [6, 2, 0.9473, 0.006, 2, 0.62, 1.0, 434, 6, 0, 0, 0, 0, 0, 2], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for item in result_dict['result']:\n self.result.append(UserSearchHit(item))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L315_C12", "label": "append()", "type": "expression", "loc": [315, 315], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:For_L314_C8", "vector": [8, 3, 0.9488, 0.003, 3, 0.65, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.result.append(UserSearchHit(item))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L318_C0", "label": "UserSearchHit", "type": "class", "loc": [318, 332], "level": 0, "parent": null, "vector": [3, 0, 0.9789, 0.0452, 0, 0.66, 1.0, 798, 0, 1, 0, 0, 162, 0, 2], "semantic": {"name": "UserSearchHit", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class UserSearchHit(T163UserBase):\n \"\"\"\n Additional information stored in the search result:\n telephone always null\n email always null\n status StatusWithIpaddr\n following False\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L319_C4", "label": "expression", "type": "expression", "loc": [319, 326], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L318_C0", "vector": [8, 1, 0.9714, 0.0241, 1, 0.01, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Additional information stored in the search result:\n telephone always null\n email always null\n status StatusWithIpaddr\n following False\n }\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L327_C4", "label": "__init__", "type": "function", "loc": [327, 332], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L318_C0", "vector": [2, 1, 0.9925, 0.0181, 1, 0.01, 1.0, 555, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "userdict"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, userdict):\n T163UserBase.__init__(self, userdict)\n\n # additional user profile\n self.status = StatusWithIpaddr(userdict['status'])\n self.following = userdict['following']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L328_C8", "label": "__init__()", "type": "expression", "loc": [328, 328], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L327_C4", "vector": [8, 2, 0.988, 0.003, 2, 0.53, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " T163UserBase.__init__(self, userdict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L331_C8", "label": "self.status = StatusWithIpaddr()", "type": "assigned_variable", "loc": [331, 331], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L327_C4", "vector": [14, 2, 0.997, 0.003, 2, 0.53, 0.5, 651, 3, 1, 0, 0, 809, 10, 1], "semantic": {"name": "self.status", "arg_names": [], "import_names": [], "rhs_call_name": "StatusWithIpaddr", "annotation": ""}, "snippet": " self.status = StatusWithIpaddr(userdict['status'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L332_C8", "label": "self.following =", "type": "assigned_variable", "loc": [332, 332], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L327_C4", "vector": [14, 2, 1.0, 0.003, 2, 0.53, 1.0, 596, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.following", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.following = userdict['following']"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L58_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:If_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:If_L69_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L70_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:If_L69_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:If_L71_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:If_L71_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L72_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:If_L71_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L74_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L110_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L111_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L110_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L118_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L119_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L122_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L123_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L126_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L127_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L126_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L137_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L137_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L138_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L137_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L139_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L137_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L137_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L144_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L145_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L144_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L164_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L166_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L167_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L168_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L169_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L170_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L171_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L172_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L175_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L181_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L182_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L181_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L193_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L193_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L194_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L193_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L195_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L193_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L198_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L206_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L207_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L206_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L215_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L215_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L216_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L215_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L217_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L220_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L221_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L220_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L235_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L236_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L237_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L240_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L241_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L242_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L243_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L246_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L247_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L248_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L251_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L252_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L251_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L262_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L262_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L263_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L262_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L264_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L262_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L267_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L274_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L275_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L274_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L289_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L290_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L291_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L292_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L293_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L294_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L295_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L296_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:For_L297_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:For_L297_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L298_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L299_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L300_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L301_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L304_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L305_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L304_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L310_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L310_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L311_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L310_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L312_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L310_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L313_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L310_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:For_L314_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:For_L314_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L315_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L318_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L319_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:ClassDef_L318_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L327_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L327_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Expr_L328_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L327_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L331_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1440:FunctionDef_L327_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1440:Assign_L332_C8"}]
#!/usr/bin/env python #coding=utf-8 """ Author: Xia Kai <xiaket@gmail.com> Filename: tests.py Type: Unit test module Last modified: 2010-05-21 16:51 Description: This file contains unit test cases for this project. """ import os import time import unittest from models import T163UserBase, User, Follower, Status, DirectMessage from models import SearchResult, SearchHit, UserSearchResult, UserSearchHit from session import T163Session as Session from utils import AuthenticationError, UserNotFound, IllegalCall # This FAKE_USER should not be available as an 163 account. FAKE_USER = "xiakai.nju@gmail.com" FAKE_PASS = "fakepass" # This should be a valid account, preferably, at your disposal. If you do not # have another account, at least find some account that is following you. and # you are not following. The following test case would assume that the # TEST_ACCOUNT is following the account that you give to __init__. # TEST_ACCOUNT_ALT should be someone who is not following you. TEST_ACCOUNT = "xiaket" TEST_ACCOUNT_ALT = "zhangjiawei" # This should be an invalid screen_name FAKE_SCREEN_NAME = "aslfkqwlalsdlfalkw" # This should be an invalid user/status id. FAKE_ID = "398066" # These are test message contents, variables with prefix FAKE are longer than # 163 characters, while variables with prefix TEST lay within the constraint. FAKE_MESSAGE_EN = u"abcdefghijklmnopqrstuvwxyz "*7 TEST_MESSAGE_EN = u"abcdefghijklmnopqrstuvwxyz "*6 FAKE_MESSAGE_CN = u"中文消息长度测试 "*19 TEST_MESSAGE_CN = u"中文消息长度测试 "*18 class SessionTests(unittest.TestCase): """ This class would test authentication related cases. In summary, we have: 1. No username provided. 2. Invalid username 3. Invalid username/password pair. 4. Invalid cookie file. 5. Invalid cookie file/username pair. 6. Valid cookie file removed after Session initilization. """ def __init__(self, testname, username=None, password=None, fulltest=False): """ Over default __init__ method to allow import of username and password. Setup username and passwords. Some tests are somehow dangerous, we do them with a fulltest flag. """ super(SessionTests, self).__init__(testname) self.username = username self.password = password self.fulltest = fulltest if fulltest: print "performing full test." def session_init(self): """ This function would test the __init__ method of Session. There sure be no cookie file both before and after this test case. """ # If neither username nor cookiefile is given to __init__. An # AuthenticationError would no doubt be raised. self.assertRaises(AuthenticationError, Session) # Should raise an AuthenticationError if an invalid username is # provided. self.assertRaises(AuthenticationError, Session, username=FAKE_USER) # This should not raise Exceptions, since it is a valid # username/password pair. Session(username=self.username, password=self.password) # This should not raise Exceptions, even though neither username nor # password is provided. Session(cookiefile="%s.txt" % self.username) # Since we have a valid cookie file now, anything given as username or # password would be ignored, so the following example would work. Session(cookiefile="%s.txt" % self.username, username=FAKE_USER) # Remove existing cookie file before we continue. The cookie should # have been created before. os.remove("%s.txt" % self.username) # This would cause AuthenticationError, since the cookiefile provided # does not exist. self.assertRaises( AuthenticationError, Session, cookiefile="%s.txt" % FAKE_USER, ) # This would work, since a fallback username/password scheme would # work. But this would save cookie to "%s.txt" % FAKE_USER, instead of # "%s.txt" % self.username. So we shall remove the cookiefile after # this test. Session( cookiefile="%s.txt" % FAKE_USER, username=self.username, password=self.password, ) os.remove("%s.txt" % FAKE_USER) # This should raise AuthenticationError, since it is an invalid # username/password pair. # CAUTION: This is dangerous. Frequent test of the following test would # lock your valid account up. if self.fulltest: self.assertRaises( AuthenticationError, Session, username=self.username, password=FAKE_PASS, ) def relation_api(self): """ This function would test the relationship related APIs. """ # Initialize a session. session = Session(username=self.username, password=self.password) ########################## # self.show_friendship # #------------------------# # /friendships/show.json # ########################## # Calling Session.show_friendship(target_screen_name=FAKE_SCREEN_NAME) # should cause an exception. self.assertRaises( UserNotFound, session.show_friendship, target_screen_name=FAKE_SCREEN_NAME, ) # This time, the target is valid, while the source_id is invalid. It # should also cause an exception. self.assertRaises( UserNotFound, session.show_friendship, source_id=FAKE_ID, target_screen_name=TEST_ACCOUNT, ) # This time, no target is provided, this should cause another # exception. self.assertRaises( IllegalCall, session.show_friendship, source_id=FAKE_ID, ) # This should work, giving the following relationship between # TEST_ACCOUNT and self.username. fo, foed = session.show_friendship( target_screen_name=TEST_ACCOUNT ) self.assertTrue( foed, "TEST_ACCOUNT:%s should follow %s" % (TEST_ACCOUNT, self.username), ) ########################################## # self.followers # #----------------------------------------# # /statuses/followers/{screen_name}.json # ########################################## # User current user's screen_name by default, so this should equal. self.assertEqual( [user.id for user in session.followers()], [user.id for user in session.followers(session.screen_name)], ) # This should never return an empty list, since at least TEST_ACCOUNT # is following self.username. Items in the list should be an instance # of Follower. followers = session.followers(session.screen_name) self.assertTrue(isinstance(followers[0], Follower)) # Test again, TEST_ACCOUNT should be following self.username self.assertTrue(TEST_ACCOUNT in [u.screen_name for u in followers]) # This should raise an exception, for the screen_name is invalid. self.assertRaises( UserNotFound, session.followers, screen_name=FAKE_SCREEN_NAME, ) # The above should work for both positional arguments and keyword # arguments. self.assertRaises( UserNotFound, session.followers, FAKE_SCREEN_NAME, ) ########################################## # self.friends # #----------------------------------------# # /statuses/friends/{screen_name}.json # ########################################## # This should give a list of Follower objects. friends = session.friends(TEST_ACCOUNT) self.assertTrue(isinstance(friends[0], Follower)) # Since an almost identical API is well tested(I hope!) above, I see no # point repeating it here. ############################################ # self.create_friendship # #------------------------------------------# # /friendships/create/{screen_name}.json # ############################################ # As before, this function is decorated with check_screen_name. # So we shall get a UserNotFound with an invalid screen_name. self.assertRaises( UserNotFound, session.create_friendship, FAKE_SCREEN_NAME, ) # Follow yourself would get an IllegalCall exception. self.assertRaises( IllegalCall, session.create_friendship, session.screen_name, ) # Before we continue, we shall follow # This should work. session.create_friendship(TEST_ACCOUNT) ############################################ # self.destroy_friendship # #------------------------------------------# # /friendships/destroy/{screen_name}.json # ############################################ # This should work. session.destroy_friendship(TEST_ACCOUNT) # It cannot be done twice: self.assertRaises( IllegalCall, session.destroy_friendship, TEST_ACCOUNT, ) # Nor can we unfollow someone who do not exist. self.assertRaises( UserNotFound, session.destroy_friendship, FAKE_SCREEN_NAME, ) def mail_api(self): """ This function would test the direct message related APIs. """ # Initialize a session. session = Session(username=self.username, password=self.password) ############################################ # self.new_direct_message # #------------------------------------------# # /direct_messages/new.json # ############################################ # This is an IllegalCall, since the receiver is invalid. self.assertRaises( IllegalCall, session.new_direct_message, FAKE_SCREEN_NAME, TEST_MESSAGE_CN, ) # This is an IllegalCall, since the message is too long. self.assertRaises( IllegalCall, session.new_direct_message, TEST_ACCOUNT, FAKE_MESSAGE_CN, ) # This is an IllegalCall, since the message is too long. self.assertRaises( IllegalCall, session.new_direct_message, TEST_ACCOUNT, FAKE_MESSAGE_EN, ) # This is an IllegalCall, since you cannot send a mail to yourself. self.assertRaises( IllegalCall, session.new_direct_message, session.screen_name, TEST_MESSAGE_EN, ) # This is an IllegalCall, since TEST_ACCOUNT_ALT is not following you. self.assertRaises( IllegalCall, session.new_direct_message, TEST_ACCOUNT_ALT, TEST_MESSAGE_EN, ) # Finally, this should work. message = session.new_direct_message(TEST_ACCOUNT, TEST_MESSAGE_EN) self.assertTrue(isinstance(message, DirectMessage)) # A direct message is sent to TEST_ACCOUNT, we shall retrieve the first # message in outbox and check if it is the same one. ############################################ # self.sent_direct_messages # #------------------------------------------# # /direct_messages/sent.json # ############################################ messages = session.sent_direct_messages() self.assertTrue(isinstance(messages[0], DirectMessage)) self.assertEqual(messages[0].id, message.id) ############################################ # self.destroy_direct_message # #------------------------------------------# # /direct_messages/destroy/{id}.json # ############################################ # This is an illegal call, since the id specified is invalid. self.assertRaises( IllegalCall, session.destroy_direct_message, FAKE_ID, ) removed_message = session.destroy_direct_message(message.id) self.assertEqual(removed_message.id, message.id) # This is an illegal call, since you cannot remove the same direct # message twice. self.assertRaises( IllegalCall, session.destroy_direct_message, message.id, ) ############################################ # self.direct_messages # #------------------------------------------# # /direct_messages.json # ############################################ # If there are direct messages in your inbox, we shall try to make sure # that it is a DirectMessage instance. messages = session.direct_messages() if len(messages) != 0: self.assertTrue(isinstance(messages[0], DirectMessage)) def search_api(self): """ This function would test the search related APIs. """ # Initialize a session. session = Session(username=self.username, password=self.password) ############################################ # self.search # #------------------------------------------# # /search.json # ############################################ # This is an IllegalCall, since no query keyword is specified. self.assertRaises( TypeError, session.search, ) # I hope I'm not a narcissist... search_result = session.search(TEST_ACCOUNT) self.assertTrue(isinstance(search_result, SearchResult)) result = search_result.result[0] self.assertTrue(isinstance(result, SearchHit)) ############################################ # self.user_search # #------------------------------------------# # /1/user/search.json # ############################################ search_result = session.user_search(TEST_ACCOUNT) self.assertTrue(isinstance(search_result, UserSearchResult)) result = search_result.result[0] self.assertTrue(isinstance(result, UserSearchHit)) def favorite_api(self): """ This function would test favorite related APIs. """ # Initialize a session. session = Session(username=self.username, password=self.password) ############################################ # self.create_favorite # #------------------------------------------# # /favorites/create/{id}.json # ############################################ # This is an IllegalCall, since the id is invalid. self.assertRaises( IllegalCall, session.create_favorite, FAKE_ID, ) # We shall get a valid message id by looking for the first message in # some user's timeline. favorited_status = session.user_timeline(TEST_ACCOUNT)[0] # Now add this message as favourite. session.create_favorite(favorited_status.id) # Now we are ready to test the self.favorites API. ############################################ # self.favorites # #------------------------------------------# # /favorites/{screen_name}.json # ############################################ # We shall find the first favorite message and compare the id. favorite_status = session.favorites()[0] self.assertTrue(isinstance(favorite_status, Status)) self.assertEqual(favorite_status.id, favorited_status.id) # This is an UserNotFound, since the screen_name is invalid. self.assertRaises( UserNotFound, session.favorites, FAKE_SCREEN_NAME, ) ############################################ # self.destroy_favorite # #------------------------------------------# # /favorites/destroy/{id}.json # ############################################ # This is an illegal call, since the id specified is invalid. self.assertRaises( IllegalCall, session.destroy_favorite, FAKE_ID, ) # This would work session.destroy_favorite(favorited_status.id) def status_api(self): """ This function would test the status related APIs. """ # Initialize a session. session = Session(username=self.username, password=self.password) ############################################ # self.update # #------------------------------------------# # /statuses/update.json # ############################################ # This is an IllegalCall, since the message is too long. self.assertRaises( IllegalCall, session.update, FAKE_MESSAGE_CN, ) # This is an IllegalCall, since the message is too long. self.assertRaises( IllegalCall, session.update, FAKE_MESSAGE_EN, ) newstatus = session.update(TEST_MESSAGE_CN) self.assertTrue(isinstance(newstatus, Status)) # TODO, when we have fully implemented reply and retweet, we have to # add more test case here. ################################################ # self.user_timeline # #----------------------------------------------# # /statuses/user_timeline/{screen_name}.json # ################################################ # The following screen_name is invalid. self.assertRaises( UserNotFound, session.user_timeline, FAKE_SCREEN_NAME, ) # Get the time line. I do not understand why it take so long to refresh # the timeline. 20 is not enough. # The following code would sometimes mysteriously fail. if self.fulltest: time.sleep(30) statuses = session.user_timeline() self.assertEqual(statuses[0].id, newstatus.id) ############################################ # self.show_status # #------------------------------------------# # /statuses/show/{id}.json # ############################################ # This is an IllegalCall, since the id is invalid. self.assertRaises( IllegalCall, session.show_status, FAKE_ID, ) self.assertEqual( session.show_status(newstatus.id).text, TEST_MESSAGE_CN.strip(), ) ############################################ # self.destroy_status # #------------------------------------------# # /statuses/destroy/{id}.json # ############################################ # This is IllegalCall, since the message id is invalid. self.assertRaises( IllegalCall, session.destroy_status, FAKE_ID, ) # This should work session.destroy_status(newstatus.id) # Get the time line. I do not understand why it take so long to refresh # the timeline. 20 is not enough. 30 would work most of the time. # The following code would sometimes mysteriously fail. if self.fulltest: time.sleep(30) statuses = session.user_timeline() self.assertNotEqual(statuses[0].id, newstatus.id) ############################################ # self.home_timeline # # self.mentions # #------------------------------------------# # /statuses/home_timeline.json # # /statuses/mentions.json # ############################################ # Not much can be done for home timeline and mentions. statuses = session.home_timeline() self.assertTrue(isinstance(statuses[0], Status)) statuses = session.mentions() self.assertTrue(isinstance(statuses[0], Status))
ajibawa-2023/Python-Code-Large/train/row_1441
131
590
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0119, 0.0153, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nAuthor: Xia Kai <xiaket@gmail.com>\nFilename: tests.py\nType: Unit test module\nLast modified: 2010-05-21 16:51\n\nDescription:\nThis file contains unit test cases for this project."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Import_L12_C0", "label": "os import os", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.0203, 0.0017, 0, 0.66, 0.0556, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Import_L13_C0", "label": "time import time", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.022, 0.0017, 0, 0.66, 0.1111, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Import_L14_C0", "label": "unittest import unittest", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0237, 0.0017, 0, 0.66, 0.1667, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], "rhs_call_name": "", "annotation": ""}, "snippet": "import unittest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:ImportFrom_L16_C0", "label": "from models import T163UserBase, User, Follower\u2026", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.0271, 0.0017, 0, 0.66, 0.2222, 495, 0, 5, 0, 0, 495, 0, 0], "semantic": {"name": "models", "arg_names": [], "import_names": ["T163UserBase", "User", "Follower", "Status", "DirectMessage"], "rhs_call_name": "", "annotation": ""}, "snippet": "from models import T163UserBase, User, Follower, Status, DirectMessage"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:ImportFrom_L17_C0", "label": "from models import SearchResult, SearchHit, UserSearchResult\u2026", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.0288, 0.0017, 0, 0.66, 0.2778, 495, 0, 4, 0, 0, 495, 0, 0], "semantic": {"name": "models", "arg_names": [], "import_names": ["SearchResult", "SearchHit", "UserSearchResult", "UserSearchHit"], "rhs_call_name": "", "annotation": ""}, "snippet": "from models import SearchResult, SearchHit, UserSearchResult, UserSearchHit"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:ImportFrom_L18_C0", "label": "from session import Session", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0305, 0.0017, 0, 0.66, 0.3333, 83, 0, 1, 0, 0, 83, 0, 0], "semantic": {"name": "session", "arg_names": [], "import_names": ["Session"], "rhs_call_name": "", "annotation": ""}, "snippet": "from session import T163Session as Session"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:ImportFrom_L19_C0", "label": "from utils import AuthenticationError, UserNotFound, IllegalCall", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.0322, 0.0017, 0, 0.66, 0.3889, 970, 0, 3, 0, 0, 970, 0, 0], "semantic": {"name": "utils", "arg_names": [], "import_names": ["AuthenticationError", "UserNotFound", "IllegalCall"], "rhs_call_name": "", "annotation": ""}, "snippet": "from utils import AuthenticationError, UserNotFound, IllegalCall"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L23_C0", "label": "FAKE_USER =", "type": "assigned_variable", "loc": [23, 23], "level": 0, "parent": null, "vector": [14, 0, 0.039, 0.0017, 0, 0.66, 0.4444, 679, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "FAKE_USER", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FAKE_USER = \"xiakai.nju@gmail.com\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L24_C0", "label": "FAKE_PASS =", "type": "assigned_variable", "loc": [24, 24], "level": 0, "parent": null, "vector": [14, 0, 0.0407, 0.0017, 0, 0.66, 0.5, 295, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "FAKE_PASS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FAKE_PASS = \"fakepass\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L31_C0", "label": "TEST_ACCOUNT =", "type": "assigned_variable", "loc": [31, 31], "level": 0, "parent": null, "vector": [14, 0, 0.0525, 0.0017, 0, 0.66, 0.5556, 934, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "TEST_ACCOUNT", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TEST_ACCOUNT = \"xiaket\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L32_C0", "label": "TEST_ACCOUNT_ALT =", "type": "assigned_variable", "loc": [32, 32], "level": 0, "parent": null, "vector": [14, 0, 0.0542, 0.0017, 0, 0.66, 0.6111, 460, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "TEST_ACCOUNT_ALT", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TEST_ACCOUNT_ALT = \"zhangjiawei\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L35_C0", "label": "FAKE_SCREEN_NAME =", "type": "assigned_variable", "loc": [35, 35], "level": 0, "parent": null, "vector": [14, 0, 0.0593, 0.0017, 0, 0.66, 0.6667, 376, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "FAKE_SCREEN_NAME", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FAKE_SCREEN_NAME = \"aslfkqwlalsdlfalkw\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L38_C0", "label": "FAKE_ID =", "type": "assigned_variable", "loc": [38, 38], "level": 0, "parent": null, "vector": [14, 0, 0.0644, 0.0017, 0, 0.66, 0.7222, 286, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "FAKE_ID", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FAKE_ID = \"398066\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L42_C0", "label": "FAKE_MESSAGE_EN =", "type": "assigned_variable", "loc": [42, 42], "level": 0, "parent": null, "vector": [14, 0, 0.0712, 0.0017, 0, 0.66, 0.7778, 34, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "FAKE_MESSAGE_EN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FAKE_MESSAGE_EN = u\"abcdefghijklmnopqrstuvwxyz \"*7"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L43_C0", "label": "TEST_MESSAGE_EN =", "type": "assigned_variable", "loc": [43, 43], "level": 0, "parent": null, "vector": [14, 0, 0.0729, 0.0017, 0, 0.66, 0.8333, 269, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "TEST_MESSAGE_EN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TEST_MESSAGE_EN = u\"abcdefghijklmnopqrstuvwxyz \"*6"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L44_C0", "label": "FAKE_MESSAGE_CN =", "type": "assigned_variable", "loc": [44, 44], "level": 0, "parent": null, "vector": [14, 0, 0.0746, 0.0017, 0, 0.66, 0.8889, 19, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "FAKE_MESSAGE_CN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FAKE_MESSAGE_CN = u\"\u4e2d\u6587\u6d88\u606f\u957f\u5ea6\u6d4b\u8bd5 \"*19"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L45_C0", "label": "TEST_MESSAGE_CN =", "type": "assigned_variable", "loc": [45, 45], "level": 0, "parent": null, "vector": [14, 0, 0.0763, 0.0017, 0, 0.66, 0.9444, 521, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "TEST_MESSAGE_CN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TEST_MESSAGE_CN = u\"\u4e2d\u6587\u6d88\u606f\u957f\u5ea6\u6d4b\u8bd5 \"*18"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "label": "SessionTests", "type": "class", "loc": [48, 590], "level": 0, "parent": null, "vector": [3, 0, 0.5407, 0.9203, 0, 0.66, 1.0, 762, 0, 7, 0, 0, 878, 0, 99], "semantic": {"name": "SessionTests", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class SessionTests(unittest.TestCase):\n \"\"\"\n This class would test authentication related cases. In summary, we have:\n 1. No username provided.\n 2. Invalid username\n 3. Invalid username/password pair.\n 4. Invalid cookie file.\n 5. Invalid cookie file/username pair."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L49_C4", "label": "expression", "type": "expression", "loc": [49, 57], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "vector": [8, 1, 0.0898, 0.0153, 1, 0.45, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This class would test authentication related cases. In summary, we have:\n 1. No username provided.\n 2. Invalid username\n 3. Invalid username/password pair.\n 4. Invalid cookie file.\n 5. Invalid cookie file/username pair.\n 6. Valid cookie file removed after Session initilization."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L59_C4", "label": "__init__", "type": "function", "loc": [59, 71], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "vector": [2, 1, 0.1102, 0.022, 1, 0.45, 0.1429, 555, 0, 5, 0, 0, 0, 0, 3], "semantic": {"name": "__init__", "arg_names": ["self", "testname", "username", "password", "fulltest"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, testname, username=None, password=None, fulltest=False):\n \"\"\"\n Over default __init__ method to allow import of username and password.\n Setup username and passwords.\n\n Some tests are somehow dangerous, we do them with a fulltest flag.\n \"\"\"\n super(SessionTests, self).__init__(testname)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L60_C8", "label": "expression", "type": "expression", "loc": [60, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L59_C4", "vector": [8, 2, 0.1059, 0.0102, 2, 0.97, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Over default __init__ method to allow import of username and password.\n Setup username and passwords.\n\n Some tests are somehow dangerous, we do them with a fulltest flag.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L66_C8", "label": "__init__()", "type": "expression", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L59_C4", "vector": [8, 2, 0.1119, 0.0017, 2, 0.97, 0.2, 555, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(SessionTests, self).__init__(testname)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L67_C8", "label": "self.username =", "type": "assigned_variable", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L59_C4", "vector": [14, 2, 0.1136, 0.0017, 2, 0.97, 0.4, 380, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.username", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.username = username"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L68_C8", "label": "self.password =", "type": "assigned_variable", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L59_C4", "vector": [14, 2, 0.1153, 0.0017, 2, 0.97, 0.6, 902, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.password", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.password = password"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L69_C8", "label": "self.fulltest =", "type": "assigned_variable", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L59_C4", "vector": [14, 2, 0.1169, 0.0017, 2, 0.97, 0.8, 787, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.fulltest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.fulltest = fulltest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L70_C8", "label": "if", "type": "if", "loc": [70, 71], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L59_C4", "vector": [4, 2, 0.1195, 0.0034, 2, 0.97, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if fulltest:\n print(\"performing full test.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L71_C12", "label": "print()", "type": "expression", "loc": [71, 71], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L70_C8", "vector": [8, 3, 0.1203, 0.0017, 3, 0.06, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"performing full test.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "label": "session_init", "type": "function", "loc": [73, 131], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "vector": [2, 1, 0.1729, 0.1, 1, 0.45, 0.2857, 618, 0, 1, 0, 0, 0, 0, 10], "semantic": {"name": "session_init", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def session_init(self):\n \"\"\"\n This function would test the __init__ method of Session.\n There sure be no cookie file both before and after this test case.\n \"\"\"\n # If neither username nor cookiefile is given to __init__. An\n # AuthenticationError would no doubt be raised.\n self.assertRaises(AuthenticationError, Session)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L74_C8", "label": "expression", "type": "expression", "loc": [74, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "vector": [8, 2, 0.128, 0.0068, 2, 0.75, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This function would test the __init__ method of Session.\n There sure be no cookie file both before and after this test case.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L80_C8", "label": "assertRaises()", "type": "expression", "loc": [80, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "vector": [8, 2, 0.1356, 0.0017, 2, 0.75, 0.1, 11, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(AuthenticationError, Session)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L84_C8", "label": "assertRaises()", "type": "expression", "loc": [84, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "vector": [8, 2, 0.1424, 0.0017, 2, 0.75, 0.2, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(AuthenticationError, Session, username=FAKE_USER)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L88_C8", "label": "Session()", "type": "expression", "loc": [88, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "vector": [8, 2, 0.1492, 0.0017, 2, 0.75, 0.3, 712, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "Session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " Session(username=self.username, password=self.password)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L92_C8", "label": "Session()", "type": "expression", "loc": [92, 92], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "vector": [8, 2, 0.1559, 0.0017, 2, 0.75, 0.4, 712, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "Session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " Session(cookiefile=\"%s.txt\" % self.username)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L96_C8", "label": "Session()", "type": "expression", "loc": [96, 96], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "vector": [8, 2, 0.1627, 0.0017, 2, 0.75, 0.5, 712, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "Session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " Session(cookiefile=\"%s.txt\" % self.username, username=FAKE_USER)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L100_C8", "label": "remove()", "type": "expression", "loc": [100, 100], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "vector": [8, 2, 0.1695, 0.0017, 2, 0.75, 0.6, 185, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove", "arg_names": [], "import_names": [], "rhs_call_name": "remove", "annotation": ""}, "snippet": " os.remove(\"%s.txt\" % self.username)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L104_C8", "label": "assertRaises()", "type": "expression", "loc": [104, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "vector": [8, 2, 0.1797, 0.0085, 2, 0.75, 0.7, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n AuthenticationError, \n Session, \n cookiefile=\"%s.txt\" % FAKE_USER,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L114_C8", "label": "Session()", "type": "expression", "loc": [114, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "vector": [8, 2, 0.1966, 0.0085, 2, 0.75, 0.8, 712, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "Session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " Session(\n cookiefile=\"%s.txt\" % FAKE_USER, \n username=self.username,\n password=self.password,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L119_C8", "label": "remove()", "type": "expression", "loc": [119, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "vector": [8, 2, 0.2017, 0.0017, 2, 0.75, 0.9, 185, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove", "arg_names": [], "import_names": [], "rhs_call_name": "remove", "annotation": ""}, "snippet": " os.remove(\"%s.txt\" % FAKE_USER)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L125_C8", "label": "if", "type": "if", "loc": [125, 131], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "vector": [4, 2, 0.2169, 0.0119, 2, 0.75, 1.0, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.fulltest:\n self.assertRaises(\n AuthenticationError, \n Session, \n username=self.username, \n password=FAKE_PASS,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L126_C12", "label": "assertRaises()", "type": "expression", "loc": [126, 131], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L125_C8", "vector": [8, 3, 0.2178, 0.0102, 3, 0.14, 0.0, 11, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n AuthenticationError, \n Session, \n username=self.username, \n password=FAKE_PASS,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "label": "relation_api", "type": "function", "loc": [133, 273], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "vector": [2, 1, 0.3441, 0.239, 1, 0.45, 0.4286, 332, 0, 1, 0, 0, 0, 0, 24], "semantic": {"name": "relation_api", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def relation_api(self):\n \"\"\"\n This function would test the relationship related APIs.\n \"\"\"\n # Initialize a session.\n session = Session(username=self.username, password=self.password) \n\n ##########################"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L134_C8", "label": "expression", "type": "expression", "loc": [134, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.2288, 0.0051, 2, 0.79, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This function would test the relationship related APIs.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L138_C8", "label": "session = Session()", "type": "assigned_variable", "loc": [138, 138], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [14, 2, 0.2339, 0.0017, 2, 0.79, 0.05, 83, 3, 2, 0, 0, 712, 10, 1], "semantic": {"name": "session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " session = Session(username=self.username, password=self.password) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L148_C8", "label": "assertRaises()", "type": "expression", "loc": [148, 152], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.2542, 0.0085, 2, 0.79, 0.1, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n UserNotFound, \n session.show_friendship, \n target_screen_name=FAKE_SCREEN_NAME,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L156_C8", "label": "assertRaises()", "type": "expression", "loc": [156, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.2686, 0.0102, 2, 0.79, 0.15, 11, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n UserNotFound, \n session.show_friendship, \n source_id=FAKE_ID,\n target_screen_name=TEST_ACCOUNT,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L165_C8", "label": "assertRaises()", "type": "expression", "loc": [165, 169], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.2831, 0.0085, 2, 0.79, 0.2, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.show_friendship, \n source_id=FAKE_ID,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L173_C8", "label": "fo, foed = show_friendship()", "type": "assigned_variable", "loc": [173, 175], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [14, 2, 0.2949, 0.0051, 2, 0.79, 0.25, 761, 3, 1, 0, 0, 881, 10, 1], "semantic": {"name": "fo, foed", "arg_names": [], "import_names": [], "rhs_call_name": "show_friendship", "annotation": ""}, "snippet": " fo, foed = session.show_friendship(\n target_screen_name=TEST_ACCOUNT\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L176_C8", "label": "assertTrue()", "type": "expression", "loc": [176, 179], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.3008, 0.0068, 2, 0.79, 0.3, 170, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(\n foed,\n \"TEST_ACCOUNT:%s should follow %s\" % (TEST_ACCOUNT, self.username),\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L188_C8", "label": "assertEqual()", "type": "expression", "loc": [188, 191], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.3212, 0.0068, 2, 0.79, 0.35, 299, 3, 2, 0, 0, 0, 0, 3], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(\n [user.id for user in session.followers()],\n [user.id for user in session.followers(session.screen_name)],\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L195_C8", "label": "followers = followers()", "type": "assigned_variable", "loc": [195, 195], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [14, 2, 0.3305, 0.0017, 2, 0.79, 0.4, 530, 3, 1, 0, 0, 530, 10, 1], "semantic": {"name": "followers", "arg_names": [], "import_names": [], "rhs_call_name": "followers", "annotation": ""}, "snippet": " followers = session.followers(session.screen_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L196_C8", "label": "assertTrue()", "type": "expression", "loc": [196, 196], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.3322, 0.0017, 2, 0.79, 0.45, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(followers[0], Follower))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L199_C8", "label": "assertTrue()", "type": "expression", "loc": [199, 199], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.3373, 0.0017, 2, 0.79, 0.5, 170, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(TEST_ACCOUNT in [u.screen_name for u in followers])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L202_C8", "label": "assertRaises()", "type": "expression", "loc": [202, 206], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.3458, 0.0085, 2, 0.79, 0.55, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n UserNotFound, \n session.followers, \n screen_name=FAKE_SCREEN_NAME,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L209_C8", "label": "assertRaises()", "type": "expression", "loc": [209, 213], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.3576, 0.0085, 2, 0.79, 0.6, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n UserNotFound, \n session.followers, \n FAKE_SCREEN_NAME,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L222_C8", "label": "friends = friends()", "type": "assigned_variable", "loc": [222, 222], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [14, 2, 0.3763, 0.0017, 2, 0.79, 0.65, 875, 3, 1, 0, 0, 875, 10, 1], "semantic": {"name": "friends", "arg_names": [], "import_names": [], "rhs_call_name": "friends", "annotation": ""}, "snippet": " friends = session.friends(TEST_ACCOUNT)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L223_C8", "label": "assertTrue()", "type": "expression", "loc": [223, 223], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.378, 0.0017, 2, 0.79, 0.7, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(friends[0], Follower))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L235_C8", "label": "assertRaises()", "type": "expression", "loc": [235, 239], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.4017, 0.0085, 2, 0.79, 0.75, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n UserNotFound, \n session.create_friendship, \n FAKE_SCREEN_NAME,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L242_C8", "label": "assertRaises()", "type": "expression", "loc": [242, 246], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.4136, 0.0085, 2, 0.79, 0.8, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.create_friendship, \n session.screen_name,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L250_C8", "label": "create_friendship()", "type": "expression", "loc": [250, 250], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.4237, 0.0017, 2, 0.79, 0.85, 536, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "create_friendship", "arg_names": [], "import_names": [], "rhs_call_name": "create_friendship", "annotation": ""}, "snippet": " session.create_friendship(TEST_ACCOUNT)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L259_C8", "label": "destroy_friendship()", "type": "expression", "loc": [259, 259], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.439, 0.0017, 2, 0.79, 0.9, 506, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "destroy_friendship", "arg_names": [], "import_names": [], "rhs_call_name": "destroy_friendship", "annotation": ""}, "snippet": " session.destroy_friendship(TEST_ACCOUNT)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L262_C8", "label": "assertRaises()", "type": "expression", "loc": [262, 266], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.4475, 0.0085, 2, 0.79, 0.95, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.destroy_friendship, \n TEST_ACCOUNT,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L269_C8", "label": "assertRaises()", "type": "expression", "loc": [269, 273], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "vector": [8, 2, 0.4593, 0.0085, 2, 0.79, 1.0, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n UserNotFound, \n session.destroy_friendship, \n FAKE_SCREEN_NAME,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "label": "mail_api", "type": "function", "loc": [275, 379], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "vector": [2, 1, 0.5542, 0.178, 1, 0.45, 0.5714, 170, 0, 1, 0, 0, 0, 0, 21], "semantic": {"name": "mail_api", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def mail_api(self):\n \"\"\"\n This function would test the direct message related APIs.\n \"\"\"\n # Initialize a session.\n session = Session(username=self.username, password=self.password) \n\n ############################################"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L276_C8", "label": "expression", "type": "expression", "loc": [276, 278], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [8, 2, 0.4695, 0.0051, 2, 0.46, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This function would test the direct message related APIs.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L280_C8", "label": "session = Session()", "type": "assigned_variable", "loc": [280, 280], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [14, 2, 0.4746, 0.0017, 2, 0.46, 0.0588, 83, 3, 2, 0, 0, 712, 10, 1], "semantic": {"name": "session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " session = Session(username=self.username, password=self.password) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L289_C8", "label": "assertRaises()", "type": "expression", "loc": [289, 294], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [8, 2, 0.4941, 0.0102, 2, 0.46, 0.1176, 11, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.new_direct_message, \n FAKE_SCREEN_NAME,\n TEST_MESSAGE_CN,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L297_C8", "label": "assertRaises()", "type": "expression", "loc": [297, 302], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [8, 2, 0.5076, 0.0102, 2, 0.46, 0.1765, 11, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.new_direct_message, \n TEST_ACCOUNT,\n FAKE_MESSAGE_CN,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L305_C8", "label": "assertRaises()", "type": "expression", "loc": [305, 310], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [8, 2, 0.5212, 0.0102, 2, 0.46, 0.2353, 11, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.new_direct_message, \n TEST_ACCOUNT,\n FAKE_MESSAGE_EN,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L313_C8", "label": "assertRaises()", "type": "expression", "loc": [313, 318], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [8, 2, 0.5347, 0.0102, 2, 0.46, 0.2941, 11, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.new_direct_message, \n session.screen_name,\n TEST_MESSAGE_EN,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L321_C8", "label": "assertRaises()", "type": "expression", "loc": [321, 326], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [8, 2, 0.5483, 0.0102, 2, 0.46, 0.3529, 11, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.new_direct_message, \n TEST_ACCOUNT_ALT,\n TEST_MESSAGE_EN,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L329_C8", "label": "message = new_direct_message()", "type": "assigned_variable", "loc": [329, 329], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [14, 2, 0.5576, 0.0017, 2, 0.46, 0.4118, 635, 3, 2, 0, 0, 801, 10, 1], "semantic": {"name": "message", "arg_names": [], "import_names": [], "rhs_call_name": "new_direct_message", "annotation": ""}, "snippet": " message = session.new_direct_message(TEST_ACCOUNT, TEST_MESSAGE_EN)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L330_C8", "label": "assertTrue()", "type": "expression", "loc": [330, 330], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [8, 2, 0.5593, 0.0017, 2, 0.46, 0.4706, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(message, DirectMessage))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L341_C8", "label": "messages = sent_direct_messages()", "type": "assigned_variable", "loc": [341, 341], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [14, 2, 0.578, 0.0017, 2, 0.46, 0.5294, 312, 3, 0, 0, 0, 492, 10, 1], "semantic": {"name": "messages", "arg_names": [], "import_names": [], "rhs_call_name": "sent_direct_messages", "annotation": ""}, "snippet": " messages = session.sent_direct_messages()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L342_C8", "label": "assertTrue()", "type": "expression", "loc": [342, 342], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [8, 2, 0.5797, 0.0017, 2, 0.46, 0.5882, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(messages[0], DirectMessage))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L343_C8", "label": "assertEqual()", "type": "expression", "loc": [343, 343], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [8, 2, 0.5814, 0.0017, 2, 0.46, 0.6471, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(messages[0].id, message.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L352_C8", "label": "assertRaises()", "type": "expression", "loc": [352, 356], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [8, 2, 0.6, 0.0085, 2, 0.46, 0.7059, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.destroy_direct_message, \n FAKE_ID,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L358_C8", "label": "removed_message = destroy_direct_message()", "type": "assigned_variable", "loc": [358, 358], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [14, 2, 0.6068, 0.0017, 2, 0.46, 0.7647, 98, 3, 1, 0, 0, 777, 10, 1], "semantic": {"name": "removed_message", "arg_names": [], "import_names": [], "rhs_call_name": "destroy_direct_message", "annotation": ""}, "snippet": " removed_message = session.destroy_direct_message(message.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L359_C8", "label": "assertEqual()", "type": "expression", "loc": [359, 359], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [8, 2, 0.6085, 0.0017, 2, 0.46, 0.8235, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(removed_message.id, message.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L363_C8", "label": "assertRaises()", "type": "expression", "loc": [363, 367], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [8, 2, 0.6186, 0.0085, 2, 0.46, 0.8824, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.destroy_direct_message, \n message.id,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L377_C8", "label": "messages = direct_messages()", "type": "assigned_variable", "loc": [377, 377], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [14, 2, 0.639, 0.0017, 2, 0.46, 0.9412, 312, 3, 0, 0, 0, 385, 10, 1], "semantic": {"name": "messages", "arg_names": [], "import_names": [], "rhs_call_name": "direct_messages", "annotation": ""}, "snippet": " messages = session.direct_messages()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L378_C8", "label": "if", "type": "if", "loc": [378, 379], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "vector": [4, 2, 0.6415, 0.0034, 2, 0.46, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(messages) != 0:\n self.assertTrue(isinstance(messages[0], DirectMessage))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L379_C12", "label": "assertTrue()", "type": "expression", "loc": [379, 379], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L378_C8", "vector": [8, 3, 0.6424, 0.0017, 3, 0.12, 0.0, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(messages[0], DirectMessage))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "label": "search_api", "type": "function", "loc": [381, 415], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "vector": [2, 1, 0.6746, 0.0593, 1, 0.45, 0.7143, 314, 0, 1, 0, 0, 0, 0, 12], "semantic": {"name": "search_api", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def search_api(self):\n \"\"\"\n This function would test the search related APIs.\n \"\"\"\n # Initialize a session.\n session = Session(username=self.username, password=self.password) \n\n ############################################"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L382_C8", "label": "expression", "type": "expression", "loc": [382, 384], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "vector": [8, 2, 0.6492, 0.0051, 2, 0.5, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This function would test the search related APIs.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L386_C8", "label": "session = Session()", "type": "assigned_variable", "loc": [386, 386], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "vector": [14, 2, 0.6542, 0.0017, 2, 0.5, 0.1, 83, 3, 2, 0, 0, 712, 10, 1], "semantic": {"name": "session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " session = Session(username=self.username, password=self.password) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L395_C8", "label": "assertRaises()", "type": "expression", "loc": [395, 398], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "vector": [8, 2, 0.672, 0.0068, 2, 0.5, 0.2, 11, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n TypeError, \n session.search, \n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L401_C8", "label": "search_result = search()", "type": "assigned_variable", "loc": [401, 401], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "vector": [14, 2, 0.6797, 0.0017, 2, 0.5, 0.3, 666, 3, 1, 0, 0, 163, 10, 1], "semantic": {"name": "search_result", "arg_names": [], "import_names": [], "rhs_call_name": "search", "annotation": ""}, "snippet": " search_result = session.search(TEST_ACCOUNT)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L402_C8", "label": "assertTrue()", "type": "expression", "loc": [402, 402], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "vector": [8, 2, 0.6814, 0.0017, 2, 0.5, 0.4, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(search_result, SearchResult))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L403_C8", "label": "result =", "type": "assigned_variable", "loc": [403, 403], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "vector": [14, 2, 0.6831, 0.0017, 2, 0.5, 0.5, 51, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " result = search_result.result[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L404_C8", "label": "assertTrue()", "type": "expression", "loc": [404, 404], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "vector": [8, 2, 0.6847, 0.0017, 2, 0.5, 0.6, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(result, SearchHit))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L412_C8", "label": "search_result = user_search()", "type": "assigned_variable", "loc": [412, 412], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "vector": [14, 2, 0.6983, 0.0017, 2, 0.5, 0.7, 666, 3, 1, 0, 0, 437, 10, 1], "semantic": {"name": "search_result", "arg_names": [], "import_names": [], "rhs_call_name": "user_search", "annotation": ""}, "snippet": " search_result = session.user_search(TEST_ACCOUNT)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L413_C8", "label": "assertTrue()", "type": "expression", "loc": [413, 413], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "vector": [8, 2, 0.7, 0.0017, 2, 0.5, 0.8, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(search_result, UserSearchResult))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L414_C8", "label": "result =", "type": "assigned_variable", "loc": [414, 414], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "vector": [14, 2, 0.7017, 0.0017, 2, 0.5, 0.9, 51, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " result = search_result.result[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L415_C8", "label": "assertTrue()", "type": "expression", "loc": [415, 415], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "vector": [8, 2, 0.7034, 0.0017, 2, 0.5, 1.0, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(result, UserSearchHit))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "label": "favorite_api", "type": "function", "loc": [417, 479], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "vector": [2, 1, 0.7593, 0.1068, 1, 0.45, 0.8571, 739, 0, 1, 0, 0, 0, 0, 11], "semantic": {"name": "favorite_api", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def favorite_api(self):\n \"\"\"\n This function would test favorite related APIs.\n \"\"\"\n # Initialize a session.\n session = Session(username=self.username, password=self.password) \n\n ############################################"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L418_C8", "label": "expression", "type": "expression", "loc": [418, 420], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "vector": [8, 2, 0.7102, 0.0051, 2, 0.32, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This function would test favorite related APIs.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L422_C8", "label": "session = Session()", "type": "assigned_variable", "loc": [422, 422], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "vector": [14, 2, 0.7153, 0.0017, 2, 0.32, 0.1, 83, 3, 2, 0, 0, 712, 10, 1], "semantic": {"name": "session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " session = Session(username=self.username, password=self.password) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L431_C8", "label": "assertRaises()", "type": "expression", "loc": [431, 435], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "vector": [8, 2, 0.7339, 0.0085, 2, 0.32, 0.2, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall,\n session.create_favorite,\n FAKE_ID,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L439_C8", "label": "favorited_status =", "type": "assigned_variable", "loc": [439, 439], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "vector": [14, 2, 0.7441, 0.0017, 2, 0.32, 0.3, 286, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "favorited_status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " favorited_status = session.user_timeline(TEST_ACCOUNT)[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L442_C8", "label": "create_favorite()", "type": "expression", "loc": [442, 442], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "vector": [8, 2, 0.7492, 0.0017, 2, 0.32, 0.4, 288, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "create_favorite", "arg_names": [], "import_names": [], "rhs_call_name": "create_favorite", "annotation": ""}, "snippet": " session.create_favorite(favorited_status.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L453_C8", "label": "favorite_status =", "type": "assigned_variable", "loc": [453, 453], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "vector": [14, 2, 0.7678, 0.0017, 2, 0.32, 0.5, 650, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "favorite_status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " favorite_status = session.favorites()[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L455_C8", "label": "assertTrue()", "type": "expression", "loc": [455, 455], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "vector": [8, 2, 0.7712, 0.0017, 2, 0.32, 0.6, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(favorite_status, Status))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L456_C8", "label": "assertEqual()", "type": "expression", "loc": [456, 456], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "vector": [8, 2, 0.7729, 0.0017, 2, 0.32, 0.7, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(favorite_status.id, favorited_status.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L459_C8", "label": "assertRaises()", "type": "expression", "loc": [459, 463], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "vector": [8, 2, 0.7814, 0.0085, 2, 0.32, 0.8, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n UserNotFound,\n session.favorites,\n FAKE_SCREEN_NAME,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L472_C8", "label": "assertRaises()", "type": "expression", "loc": [472, 476], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "vector": [8, 2, 0.8034, 0.0085, 2, 0.32, 0.9, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.destroy_favorite, \n FAKE_ID,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L479_C8", "label": "destroy_favorite()", "type": "expression", "loc": [479, 479], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "vector": [8, 2, 0.8119, 0.0017, 2, 0.32, 1.0, 959, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "destroy_favorite", "arg_names": [], "import_names": [], "rhs_call_name": "destroy_favorite", "annotation": ""}, "snippet": " session.destroy_favorite(favorited_status.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "label": "status_api", "type": "function", "loc": [481, 590], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "vector": [2, 1, 0.9076, 0.1864, 1, 0.45, 1.0, 569, 0, 1, 0, 0, 0, 0, 25], "semantic": {"name": "status_api", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def status_api(self):\n \"\"\"\n This function would test the status related APIs.\n \"\"\"\n # Initialize a session.\n session = Session(username=self.username, password=self.password) \n\n ############################################"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L482_C8", "label": "expression", "type": "expression", "loc": [482, 484], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [8, 2, 0.8186, 0.0051, 2, 0.4, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This function would test the status related APIs.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L486_C8", "label": "session = Session()", "type": "assigned_variable", "loc": [486, 486], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [14, 2, 0.8237, 0.0017, 2, 0.4, 0.0625, 83, 3, 2, 0, 0, 712, 10, 1], "semantic": {"name": "session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " session = Session(username=self.username, password=self.password) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L495_C8", "label": "assertRaises()", "type": "expression", "loc": [495, 499], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [8, 2, 0.8424, 0.0085, 2, 0.4, 0.125, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.update, \n FAKE_MESSAGE_CN,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L502_C8", "label": "assertRaises()", "type": "expression", "loc": [502, 506], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [8, 2, 0.8542, 0.0085, 2, 0.4, 0.1875, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.update, \n FAKE_MESSAGE_EN,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L508_C8", "label": "newstatus = update()", "type": "assigned_variable", "loc": [508, 508], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [14, 2, 0.861, 0.0017, 2, 0.4, 0.25, 465, 3, 1, 0, 0, 637, 10, 1], "semantic": {"name": "newstatus", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": " newstatus = session.update(TEST_MESSAGE_CN)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L509_C8", "label": "assertTrue()", "type": "expression", "loc": [509, 509], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [8, 2, 0.8627, 0.0017, 2, 0.4, 0.3125, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(newstatus, Status))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L521_C8", "label": "assertRaises()", "type": "expression", "loc": [521, 525], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [8, 2, 0.8864, 0.0085, 2, 0.4, 0.375, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n UserNotFound, \n session.user_timeline, \n FAKE_SCREEN_NAME,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L531_C8", "label": "if", "type": "if", "loc": [531, 534], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [4, 2, 0.9025, 0.0068, 2, 0.4, 0.4375, 0, 7, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.fulltest:\n time.sleep(30)\n statuses = session.user_timeline()\n self.assertEqual(statuses[0].id, newstatus.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L532_C12", "label": "sleep()", "type": "expression", "loc": [532, 532], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L531_C8", "vector": [8, 3, 0.9017, 0.0017, 3, 0.37, 0.0, 476, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "sleep", "arg_names": [], "import_names": [], "rhs_call_name": "sleep", "annotation": ""}, "snippet": " time.sleep(30)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L533_C12", "label": "statuses = user_timeline()", "type": "assigned_variable", "loc": [533, 533], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L531_C8", "vector": [14, 3, 0.9034, 0.0017, 3, 0.37, 0.5, 37, 3, 0, 0, 0, 101, 10, 1], "semantic": {"name": "statuses", "arg_names": [], "import_names": [], "rhs_call_name": "user_timeline", "annotation": ""}, "snippet": " statuses = session.user_timeline()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L534_C12", "label": "assertEqual()", "type": "expression", "loc": [534, 534], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L531_C8", "vector": [8, 3, 0.9051, 0.0017, 3, 0.37, 1.0, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(statuses[0].id, newstatus.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L543_C8", "label": "assertRaises()", "type": "expression", "loc": [543, 547], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [8, 2, 0.9237, 0.0085, 2, 0.4, 0.5, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall,\n session.show_status,\n FAKE_ID,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L549_C8", "label": "assertEqual()", "type": "expression", "loc": [549, 552], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [8, 2, 0.9331, 0.0068, 2, 0.4, 0.5625, 299, 3, 2, 0, 0, 0, 0, 3], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(\n session.show_status(newstatus.id).text, \n TEST_MESSAGE_CN.strip(),\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L561_C8", "label": "assertRaises()", "type": "expression", "loc": [561, 565], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [8, 2, 0.9542, 0.0085, 2, 0.4, 0.625, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.destroy_status, \n FAKE_ID,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L567_C8", "label": "destroy_status()", "type": "expression", "loc": [567, 567], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [8, 2, 0.961, 0.0017, 2, 0.4, 0.6875, 103, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "destroy_status", "arg_names": [], "import_names": [], "rhs_call_name": "destroy_status", "annotation": ""}, "snippet": " session.destroy_status(newstatus.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L573_C8", "label": "if", "type": "if", "loc": [573, 576], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [4, 2, 0.9737, 0.0068, 2, 0.4, 0.75, 0, 7, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.fulltest:\n time.sleep(30)\n statuses = session.user_timeline()\n self.assertNotEqual(statuses[0].id, newstatus.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L574_C12", "label": "sleep()", "type": "expression", "loc": [574, 574], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L573_C8", "vector": [8, 3, 0.9729, 0.0017, 3, 0.51, 0.0, 476, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "sleep", "arg_names": [], "import_names": [], "rhs_call_name": "sleep", "annotation": ""}, "snippet": " time.sleep(30)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L575_C12", "label": "statuses = user_timeline()", "type": "assigned_variable", "loc": [575, 575], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L573_C8", "vector": [14, 3, 0.9746, 0.0017, 3, 0.51, 0.5, 37, 3, 0, 0, 0, 101, 10, 1], "semantic": {"name": "statuses", "arg_names": [], "import_names": [], "rhs_call_name": "user_timeline", "annotation": ""}, "snippet": " statuses = session.user_timeline()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L576_C12", "label": "assertNotEqual()", "type": "expression", "loc": [576, 576], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L573_C8", "vector": [8, 3, 0.9763, 0.0017, 3, 0.51, 1.0, 120, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertNotEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertNotEqual", "annotation": ""}, "snippet": " self.assertNotEqual(statuses[0].id, newstatus.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L587_C8", "label": "statuses = home_timeline()", "type": "assigned_variable", "loc": [587, 587], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [14, 2, 0.9949, 0.0017, 2, 0.4, 0.8125, 37, 3, 0, 0, 0, 302, 10, 1], "semantic": {"name": "statuses", "arg_names": [], "import_names": [], "rhs_call_name": "home_timeline", "annotation": ""}, "snippet": " statuses = session.home_timeline()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L588_C8", "label": "assertTrue()", "type": "expression", "loc": [588, 588], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [8, 2, 0.9966, 0.0017, 2, 0.4, 0.875, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(statuses[0], Status))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L589_C8", "label": "statuses = mentions()", "type": "assigned_variable", "loc": [589, 589], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [14, 2, 0.9983, 0.0017, 2, 0.4, 0.9375, 37, 3, 0, 0, 0, 369, 10, 1], "semantic": {"name": "statuses", "arg_names": [], "import_names": [], "rhs_call_name": "mentions", "annotation": ""}, "snippet": " statuses = session.mentions()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L590_C8", "label": "assertTrue()", "type": "expression", "loc": [590, 590], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "vector": [8, 2, 1.0, 0.0017, 2, 0.4, 1.0, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(statuses[0], Status))"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L67_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L70_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L71_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L74_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L84_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L88_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L100_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L119_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L125_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L125_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L126_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L134_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L138_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L148_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L156_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L173_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L176_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L188_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L195_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L196_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L199_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L202_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L209_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L222_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L223_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L235_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L242_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L250_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L259_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L262_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L269_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L276_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L280_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L289_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L297_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L305_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L313_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L321_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L329_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L330_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L341_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L342_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L343_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L352_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L358_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L359_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L363_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L377_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L378_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L378_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L379_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L382_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L386_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L395_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L401_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L402_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L403_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L404_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L412_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L413_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L414_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L415_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L418_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L422_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L431_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L439_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L442_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L453_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L455_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L456_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L459_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L472_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L479_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L482_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L486_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L495_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L502_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L508_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L509_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L521_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L531_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L531_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L532_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L531_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L533_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L531_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L534_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L543_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L549_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L561_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L567_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L573_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L573_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L574_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L573_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L575_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:If_L573_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L576_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L587_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L588_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Assign_L589_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1441:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1441:Expr_L590_C8"}]
#!/usr/bin/env python #coding=utf-8 """ Author: Xia Kai <xiaket@gmail.com> Filename: utils.py Type: Utility Last modified: 2010-07-18 14:06 Description: Utility functions for this project. """ import locale import os import urllib2 from datetime import datetime, timedelta ############## # Exceptions # ############## class AuthenticationError(RuntimeError): """ Exception caused by incorrect username/password. """ pass class UserNotFound(ValueError): """ Exception caused by querying a user that does not exist. """ pass class IllegalCall(ValueError): """ Exception caused by illegal call, e.g., trying to remove other people's status, or a message longer than 163 characters. """ pass class UnknownError(RuntimeError): """ Unexpected HTTP code returned. """ pass ############## # Decorators # ############## def require_login(func): """ This is a decorator inspired by a similar decorator in Django. """ def morewrapped(func): def wrapped(kls, *args, **kwargs): if not kls.logged_in: kls._login() return func(kls, *args, **kwargs) return wrapped return morewrapped(func) def check_screen_name(func): """ This decorator would check the screen_name in the parameter of the original function. It is to be noted that the screen must be the first argument if we are using a positional parameter. """ def morewrapped(func): def wrapped(kls, *args, **kwargs): if 'screen_name' in kwargs: _screen_name = kwargs['screen_name'] elif len(args): _screen_name = args[0] else: _screen_name = None if _screen_name: # If the screen_name is set, we shall check if it is a valid # screen_name. We do this by visiting the homepage of this # screen_name: _url = "/users/show.json?screen_name=%s" % _screen_name _message = "Specified user does not exist." _err_dict = { 404: (UserNotFound, _message), } kls.request(_url, errors=_err_dict) return func(kls, *args, **kwargs) return wrapped return morewrapped(func) def check_status_id(func): """ This decorator would check the screen_name in the parameter of the original function. It is to be noted that the screen must be the first argument if we are using a positional parameter. """ def morewrapped(func): def wrapped(kls, *args, **kwargs): if 'status_id' in kwargs: _status_id = kwargs['status_id'] elif len(args) != 0: _status_id = args[0] kls.show_status(_status_id) return func(kls, *args, **kwargs) return wrapped return morewrapped(func) def parse_timestring(timestring): """ Accept a time string, parse it and return a datetime object. >>> parse_timestring("Mon Apr 26 10:49:29 +0800 2010") datetime.datetime(2010, 4, 26, 2, 49, 29) >>> parse_timestring("Mon Apr 26 10:49:29 -0800 2010") datetime.datetime(2010, 4, 26, 18, 49, 29) >>> parse_timestring("Mon Apr 26 10:49:29 +0830 2010") datetime.datetime(2010, 4, 26, 2, 19, 29) """ oldlocale = locale.getlocale(locale.LC_TIME) # On different OS platform, setlocale would have to be called differently. if os.name =='nt': locale.setlocale(locale.LC_TIME, 'english') elif os.name =='posix': locale.setlocale(locale.LC_TIME, 'en_US.UTF-8') strf = timestring[:20] + timestring[26:] created_at = datetime.strptime(strf, "%a %b %d %H:%M:%S %Y") # set it back. locale.setlocale(locale.LC_TIME, oldlocale) delta = timestring[20:25] hour = int(delta[:3]) minute = int(delta[3:]) return created_at - timedelta(hours=hour, minutes=minute) class RedirectHandler(urllib2.HTTPRedirectHandler): def http_error_302(self, req, fp, code, msg, headers): """ For the moment, t.163.com would not return 404 status code correctly. Instead, it would return a 302 and redirect user to a page that will display 404 information. This would make web user happy, but we have to do extra to make our API elegant. Thus we have this handler to correctly raise 404 code. """ result = urllib2.HTTPRedirectHandler.http_error_302( self, req, fp, code, msg, headers) if headers['location'] == 'http://t.163.com/notfound': raise urllib2.HTTPError(req.get_full_url(), 404, msg, headers, fp) return result if __name__ == "__main__": import doctest doctest.testmod()
ajibawa-2023/Python-Code-Large/train/row_1442
74
166
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0422, 0.0542, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nAuthor: Xia Kai <xiaket@gmail.com>\nFilename: utils.py\nType: Utility\nLast modified: 2010-07-18 14:06\n\nDescription:\nUtility functions for this project."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Import_L12_C0", "label": "locale import locale", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.0723, 0.006, 0, 0.66, 0.0714, 884, 0, 1, 0, 0, 884, 0, 0], "semantic": {"name": "locale", "arg_names": [], "import_names": ["locale"], "rhs_call_name": "", "annotation": ""}, "snippet": "import locale"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Import_L13_C0", "label": "os import os", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0783, 0.006, 0, 0.66, 0.1429, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Import_L14_C0", "label": "urllib2 import urllib2", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0843, 0.006, 0, 0.66, 0.2143, 345, 0, 1, 0, 0, 345, 0, 0], "semantic": {"name": "urllib2", "arg_names": [], "import_names": ["urllib2"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urllib2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:ImportFrom_L16_C0", "label": "from datetime import datetime, timedelta", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.0964, 0.006, 0, 0.66, 0.2857, 426, 0, 2, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime", "timedelta"], "rhs_call_name": "", "annotation": ""}, "snippet": "from datetime import datetime, timedelta"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:ClassDef_L23_C0", "label": "AuthenticationError", "type": "class", "loc": [23, 27], "level": 0, "parent": null, "vector": [3, 0, 0.1506, 0.0301, 0, 0.66, 0.3571, 422, 0, 0, 0, 0, 178, 0, 0], "semantic": {"name": "AuthenticationError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class AuthenticationError(RuntimeError):\n \"\"\"\n Exception caused by incorrect username/password.\n \"\"\"\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L24_C4", "label": "expression", "type": "expression", "loc": [24, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:ClassDef_L23_C0", "vector": [8, 1, 0.1506, 0.0181, 1, 0.11, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Exception caused by incorrect username/password.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:ClassDef_L30_C0", "label": "UserNotFound", "type": "class", "loc": [30, 34], "level": 0, "parent": null, "vector": [3, 0, 0.1928, 0.0301, 0, 0.66, 0.4286, 599, 0, 0, 0, 0, 690, 0, 0], "semantic": {"name": "UserNotFound", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class UserNotFound(ValueError):\n \"\"\"\n Exception caused by querying a user that does not exist.\n \"\"\"\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L31_C4", "label": "expression", "type": "expression", "loc": [31, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:ClassDef_L30_C0", "vector": [8, 1, 0.1928, 0.0181, 1, 0.37, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Exception caused by querying a user that does not exist.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:ClassDef_L37_C0", "label": "IllegalCall", "type": "class", "loc": [37, 42], "level": 0, "parent": null, "vector": [3, 0, 0.238, 0.0361, 0, 0.66, 0.5, 605, 0, 0, 0, 0, 690, 0, 0], "semantic": {"name": "IllegalCall", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class IllegalCall(ValueError):\n \"\"\"\n Exception caused by illegal call, e.g., trying to remove other people's \n status, or a message longer than 163 characters.\n \"\"\"\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L38_C4", "label": "expression", "type": "expression", "loc": [38, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:ClassDef_L37_C0", "vector": [8, 1, 0.238, 0.0241, 1, 0.56, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Exception caused by illegal call, e.g., trying to remove other people's \n status, or a message longer than 163 characters.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:ClassDef_L45_C0", "label": "UnknownError", "type": "class", "loc": [45, 49], "level": 0, "parent": null, "vector": [3, 0, 0.2831, 0.0301, 0, 0.66, 0.5714, 596, 0, 0, 0, 0, 178, 0, 0], "semantic": {"name": "UnknownError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class UnknownError(RuntimeError):\n \"\"\"\n Unexpected HTTP code returned.\n \"\"\"\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L46_C4", "label": "expression", "type": "expression", "loc": [46, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:ClassDef_L45_C0", "vector": [8, 1, 0.2831, 0.0181, 1, 0.72, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Unexpected HTTP code returned.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L55_C0", "label": "require_login", "type": "function", "loc": [55, 65], "level": 0, "parent": null, "vector": [2, 0, 0.3614, 0.0663, 0, 0.66, 0.6429, 678, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "require_login", "arg_names": ["func"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def require_login(func):\n \"\"\"\n This is a decorator inspired by a similar decorator in Django.\n \"\"\"\n def morewrapped(func):\n def wrapped(kls, *args, **kwargs):\n if not kls.logged_in:\n kls._login()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L56_C4", "label": "expression", "type": "expression", "loc": [56, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L55_C0", "vector": [8, 1, 0.3434, 0.0181, 1, 0.31, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This is a decorator inspired by a similar decorator in Django.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L59_C4", "label": "morewrapped", "type": "function", "loc": [59, 64], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L55_C0", "vector": [2, 1, 0.3705, 0.0361, 1, 0.31, 0.5, 638, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "morewrapped", "arg_names": ["func"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def morewrapped(func):\n def wrapped(kls, *args, **kwargs):\n if not kls.logged_in:\n kls._login()\n return func(kls, *args, **kwargs)\n return wrapped"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L60_C8", "label": "wrapped", "type": "function", "loc": [60, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L59_C4", "vector": [2, 2, 0.3705, 0.0241, 2, 0.04, 0.0, 745, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "wrapped", "arg_names": ["kls", "args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def wrapped(kls, *args, **kwargs):\n if not kls.logged_in:\n kls._login()\n return func(kls, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L61_C12", "label": "if", "type": "if", "loc": [61, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L60_C8", "vector": [4, 3, 0.3705, 0.012, 3, 0.42, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not kls.logged_in:\n kls._login()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L62_C16", "label": "_login()", "type": "expression", "loc": [62, 62], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L61_C12", "vector": [8, 4, 0.3735, 0.006, 4, 0.01, 0.0, 719, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_login", "arg_names": [], "import_names": [], "rhs_call_name": "_login", "annotation": ""}, "snippet": " kls._login()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L63_C12", "label": "return", "type": "return", "loc": [63, 63], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L60_C8", "vector": [13, 3, 0.3795, 0.006, 3, 0.42, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return func(kls, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L64_C8", "label": "return", "type": "return", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L59_C4", "vector": [13, 2, 0.3855, 0.006, 2, 0.04, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return wrapped"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L65_C4", "label": "return", "type": "return", "loc": [65, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L55_C0", "vector": [13, 1, 0.3916, 0.006, 1, 0.31, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return morewrapped(func)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L68_C0", "label": "check_screen_name", "type": "function", "loc": [68, 96], "level": 0, "parent": null, "vector": [2, 0, 0.494, 0.1747, 0, 0.66, 0.7143, 692, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "check_screen_name", "arg_names": ["func"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def check_screen_name(func):\n \"\"\"\n This decorator would check the screen_name in the parameter of the original\n function.\n\n It is to be noted that the screen must be the first argument if we are\n using a positional parameter.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L69_C4", "label": "expression", "type": "expression", "loc": [69, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L68_C0", "vector": [8, 1, 0.4337, 0.0422, 1, 0.75, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This decorator would check the screen_name in the parameter of the original\n function.\n\n It is to be noted that the screen must be the first argument if we are\n using a positional parameter.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L76_C4", "label": "morewrapped", "type": "function", "loc": [76, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L68_C0", "vector": [2, 1, 0.5151, 0.1205, 1, 0.75, 0.5, 638, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "morewrapped", "arg_names": ["func"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def morewrapped(func):\n def wrapped(kls, *args, **kwargs):\n if 'screen_name' in kwargs:\n _screen_name = kwargs['screen_name']\n elif len(args):\n _screen_name = args[0]\n else:\n _screen_name = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L77_C8", "label": "wrapped", "type": "function", "loc": [77, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L76_C4", "vector": [2, 2, 0.5151, 0.1084, 2, 0.6, 0.0, 745, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "wrapped", "arg_names": ["kls", "args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def wrapped(kls, *args, **kwargs):\n if 'screen_name' in kwargs:\n _screen_name = kwargs['screen_name']\n elif len(args):\n _screen_name = args[0]\n else:\n _screen_name = None\n if _screen_name:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L78_C12", "label": "if", "type": "if", "loc": [78, 83], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L77_C8", "vector": [4, 3, 0.4849, 0.0361, 3, 0.73, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'screen_name' in kwargs:\n _screen_name = kwargs['screen_name']\n elif len(args):\n _screen_name = args[0]\n else:\n _screen_name = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L79_C16", "label": "_screen_name =", "type": "assigned_variable", "loc": [79, 79], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L78_C12", "vector": [14, 4, 0.4759, 0.006, 4, 0.59, 0.0, 415, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_screen_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _screen_name = kwargs['screen_name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L80_C12", "label": "if", "type": "if", "loc": [80, 83], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L78_C12", "vector": [4, 4, 0.491, 0.0241, 4, 0.59, 1.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif len(args):\n _screen_name = args[0]\n else:\n _screen_name = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L81_C16", "label": "_screen_name =", "type": "assigned_variable", "loc": [81, 81], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L80_C12", "vector": [14, 5, 0.488, 0.006, 5, 0.15, 0.0, 415, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_screen_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _screen_name = args[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L83_C16", "label": "_screen_name =", "type": "assigned_variable", "loc": [83, 83], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L80_C12", "vector": [14, 5, 0.5, 0.006, 5, 0.15, 1.0, 415, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "_screen_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _screen_name = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L84_C12", "label": "if", "type": "if", "loc": [84, 93], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L77_C8", "vector": [4, 3, 0.5331, 0.0602, 3, 0.73, 0.5, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if _screen_name:\n # If the screen_name is set, we shall check if it is a valid\n # screen_name. We do this by visiting the homepage of this\n # screen_name:\n _url = \"/users/show.json?screen_name=%s\" % _screen_name\n _message = \"Specified user does not exist.\"\n _err_dict = {\n 404: (UserNotFound, _message),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L88_C16", "label": "_url =", "type": "assigned_variable", "loc": [88, 88], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L84_C12", "vector": [14, 4, 0.5301, 0.006, 4, 0.3, 0.0, 508, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_url", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _url = \"/users/show.json?screen_name=%s\" % _screen_name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L89_C16", "label": "_message =", "type": "assigned_variable", "loc": [89, 89], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L84_C12", "vector": [14, 4, 0.5361, 0.006, 4, 0.3, 0.3333, 839, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "_message", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _message = \"Specified user does not exist.\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L90_C16", "label": "_err_dict =", "type": "assigned_variable", "loc": [90, 92], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L84_C12", "vector": [14, 4, 0.5482, 0.0181, 4, 0.3, 0.6667, 645, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "_err_dict", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _err_dict = {\n 404: (UserNotFound, _message),\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L93_C16", "label": "request()", "type": "expression", "loc": [93, 93], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L84_C12", "vector": [8, 4, 0.5602, 0.006, 4, 0.3, 1.0, 50, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "request", "arg_names": [], "import_names": [], "rhs_call_name": "request", "annotation": ""}, "snippet": " kls.request(_url, errors=_err_dict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L94_C12", "label": "return", "type": "return", "loc": [94, 94], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L77_C8", "vector": [13, 3, 0.5663, 0.006, 3, 0.73, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return func(kls, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L95_C8", "label": "return", "type": "return", "loc": [95, 95], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L76_C4", "vector": [13, 2, 0.5723, 0.006, 2, 0.6, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return wrapped"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L96_C4", "label": "return", "type": "return", "loc": [96, 96], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L68_C0", "vector": [13, 1, 0.5783, 0.006, 1, 0.75, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return morewrapped(func)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L99_C0", "label": "check_status_id", "type": "function", "loc": [99, 116], "level": 0, "parent": null, "vector": [2, 0, 0.6476, 0.1084, 0, 0.66, 0.7857, 55, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "check_status_id", "arg_names": ["func"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def check_status_id(func):\n \"\"\"\n This decorator would check the screen_name in the parameter of the original\n function.\n\n It is to be noted that the screen must be the first argument if we are\n using a positional parameter.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L100_C4", "label": "expression", "type": "expression", "loc": [100, 106], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L99_C0", "vector": [8, 1, 0.6205, 0.0422, 1, 0.61, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This decorator would check the screen_name in the parameter of the original\n function.\n\n It is to be noted that the screen must be the first argument if we are\n using a positional parameter.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L107_C4", "label": "morewrapped", "type": "function", "loc": [107, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L99_C0", "vector": [2, 1, 0.6687, 0.0542, 1, 0.61, 0.5, 638, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "morewrapped", "arg_names": ["func"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def morewrapped(func):\n def wrapped(kls, *args, **kwargs):\n if 'status_id' in kwargs:\n _status_id = kwargs['status_id']\n elif len(args) != 0:\n _status_id = args[0]\n kls.show_status(_status_id)\n return func(kls, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L108_C8", "label": "wrapped", "type": "function", "loc": [108, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L107_C4", "vector": [2, 2, 0.6687, 0.0422, 2, 0.03, 0.0, 745, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "wrapped", "arg_names": ["kls", "args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def wrapped(kls, *args, **kwargs):\n if 'status_id' in kwargs:\n _status_id = kwargs['status_id']\n elif len(args) != 0:\n _status_id = args[0]\n kls.show_status(_status_id)\n return func(kls, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L109_C12", "label": "if", "type": "if", "loc": [109, 113], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L108_C8", "vector": [4, 3, 0.6687, 0.0301, 3, 0.78, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'status_id' in kwargs:\n _status_id = kwargs['status_id']\n elif len(args) != 0:\n _status_id = args[0]\n kls.show_status(_status_id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L110_C16", "label": "_status_id =", "type": "assigned_variable", "loc": [110, 110], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L109_C12", "vector": [14, 4, 0.6627, 0.006, 4, 0.27, 0.0, 122, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_status_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _status_id = kwargs['status_id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L111_C12", "label": "if", "type": "if", "loc": [111, 113], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L109_C12", "vector": [4, 4, 0.6747, 0.0181, 4, 0.27, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif len(args) != 0:\n _status_id = args[0]\n kls.show_status(_status_id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L112_C16", "label": "_status_id =", "type": "assigned_variable", "loc": [112, 112], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L111_C12", "vector": [14, 5, 0.6747, 0.006, 5, 0.25, 0.0, 122, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_status_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _status_id = args[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L113_C16", "label": "show_status()", "type": "expression", "loc": [113, 113], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L111_C12", "vector": [8, 5, 0.6807, 0.006, 5, 0.25, 1.0, 75, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "show_status", "arg_names": [], "import_names": [], "rhs_call_name": "show_status", "annotation": ""}, "snippet": " kls.show_status(_status_id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L114_C12", "label": "return", "type": "return", "loc": [114, 114], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L108_C8", "vector": [13, 3, 0.6867, 0.006, 3, 0.78, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return func(kls, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L115_C8", "label": "return", "type": "return", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L107_C4", "vector": [13, 2, 0.6928, 0.006, 2, 0.03, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return wrapped"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L116_C4", "label": "return", "type": "return", "loc": [116, 116], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L99_C0", "vector": [13, 1, 0.6988, 0.006, 1, 0.61, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return morewrapped(func)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "label": "parse_timestring", "type": "function", "loc": [119, 145], "level": 0, "parent": null, "vector": [2, 0, 0.7952, 0.1627, 0, 0.66, 0.8571, 314, 0, 1, 1, 0, 0, 0, 8], "semantic": {"name": "parse_timestring", "arg_names": ["timestring"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def parse_timestring(timestring):\n \"\"\"\n Accept a time string, parse it and return a datetime object.\n\n >>> parse_timestring(\"Mon Apr 26 10:49:29 +0800 2010\")\n datetime.datetime(2010, 4, 26, 2, 49, 29)\n >>> parse_timestring(\"Mon Apr 26 10:49:29 -0800 2010\")\n datetime.datetime(2010, 4, 26, 18, 49, 29)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L120_C4", "label": "expression", "type": "expression", "loc": [120, 129], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "vector": [8, 1, 0.75, 0.0602, 1, 0.85, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Accept a time string, parse it and return a datetime object.\n\n >>> parse_timestring(\"Mon Apr 26 10:49:29 +0800 2010\")\n datetime.datetime(2010, 4, 26, 2, 49, 29)\n >>> parse_timestring(\"Mon Apr 26 10:49:29 -0800 2010\")\n datetime.datetime(2010, 4, 26, 18, 49, 29)\n >>> parse_timestring(\"Mon Apr 26 10:49:29 +0830 2010\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L130_C4", "label": "oldlocale = getlocale()", "type": "assigned_variable", "loc": [130, 130], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "vector": [14, 1, 0.7831, 0.006, 1, 0.85, 0.1111, 347, 3, 1, 0, 0, 650, 10, 1], "semantic": {"name": "oldlocale", "arg_names": [], "import_names": [], "rhs_call_name": "getlocale", "annotation": ""}, "snippet": " oldlocale = locale.getlocale(locale.LC_TIME)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L132_C4", "label": "if", "type": "if", "loc": [132, 135], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "vector": [4, 1, 0.8042, 0.0241, 1, 0.85, 0.2222, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if os.name =='nt':\n locale.setlocale(locale.LC_TIME, 'english')\n elif os.name =='posix':\n locale.setlocale(locale.LC_TIME, 'en_US.UTF-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L133_C8", "label": "setlocale()", "type": "expression", "loc": [133, 133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L132_C4", "vector": [8, 2, 0.8012, 0.006, 2, 0.81, 0.0, 735, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setlocale", "arg_names": [], "import_names": [], "rhs_call_name": "setlocale", "annotation": ""}, "snippet": " locale.setlocale(locale.LC_TIME, 'english')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L134_C4", "label": "if", "type": "if", "loc": [134, 135], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L132_C4", "vector": [4, 2, 0.8102, 0.012, 2, 0.81, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif os.name =='posix':\n locale.setlocale(locale.LC_TIME, 'en_US.UTF-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L135_C8", "label": "setlocale()", "type": "expression", "loc": [135, 135], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L134_C4", "vector": [8, 3, 0.8133, 0.006, 3, 0.23, 0.0, 735, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setlocale", "arg_names": [], "import_names": [], "rhs_call_name": "setlocale", "annotation": ""}, "snippet": " locale.setlocale(locale.LC_TIME, 'en_US.UTF-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L136_C4", "label": "strf =", "type": "assigned_variable", "loc": [136, 136], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "vector": [14, 1, 0.8193, 0.006, 1, 0.85, 0.3333, 708, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "strf", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " strf = timestring[:20] + timestring[26:] "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L137_C4", "label": "created_at = strptime()", "type": "assigned_variable", "loc": [137, 137], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "vector": [14, 1, 0.8253, 0.006, 1, 0.85, 0.4444, 642, 3, 2, 0, 0, 839, 10, 1], "semantic": {"name": "created_at", "arg_names": [], "import_names": [], "rhs_call_name": "strptime", "annotation": ""}, "snippet": " created_at = datetime.strptime(strf, \"%a %b %d %H:%M:%S %Y\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L140_C4", "label": "setlocale()", "type": "expression", "loc": [140, 140], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "vector": [8, 1, 0.8434, 0.006, 1, 0.85, 0.5556, 735, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setlocale", "arg_names": [], "import_names": [], "rhs_call_name": "setlocale", "annotation": ""}, "snippet": " locale.setlocale(locale.LC_TIME, oldlocale)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L142_C4", "label": "delta =", "type": "assigned_variable", "loc": [142, 142], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "vector": [14, 1, 0.8554, 0.006, 1, 0.85, 0.6667, 593, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "delta", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " delta = timestring[20:25] "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L143_C4", "label": "hour = int()", "type": "assigned_variable", "loc": [143, 143], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "vector": [14, 1, 0.8614, 0.006, 1, 0.85, 0.7778, 781, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "hour", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " hour = int(delta[:3]) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L144_C4", "label": "minute = int()", "type": "assigned_variable", "loc": [144, 144], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "vector": [14, 1, 0.8675, 0.006, 1, 0.85, 0.8889, 483, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "minute", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " minute = int(delta[3:]) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L145_C4", "label": "return", "type": "return", "loc": [145, 145], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "vector": [13, 1, 0.8735, 0.006, 1, 0.85, 1.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return created_at - timedelta(hours=hour, minutes=minute) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:ClassDef_L148_C0", "label": "RedirectHandler", "type": "class", "loc": [148, 161], "level": 0, "parent": null, "vector": [3, 0, 0.9307, 0.0843, 0, 0.66, 0.9286, 229, 0, 1, 0, 0, 607, 0, 3], "semantic": {"name": "RedirectHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class RedirectHandler(urllib2.HTTPRedirectHandler):\n def http_error_302(self, req, fp, code, msg, headers):\n \"\"\"\n For the moment, t.163.com would not return 404 status code correctly.\n Instead, it would return a 302 and redirect user to a page that will\n display 404 information. This would make web user happy, but we have to\n do extra to make our API elegant. Thus we have this handler to \n correctly raise 404 code."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L149_C4", "label": "http_error_302", "type": "function", "loc": [149, 161], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:ClassDef_L148_C0", "vector": [2, 1, 0.9337, 0.0783, 1, 0.61, 0.0, 895, 0, 6, 1, 0, 0, 0, 3], "semantic": {"name": "http_error_302", "arg_names": ["self", "req", "fp", "code", "msg", "headers"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def http_error_302(self, req, fp, code, msg, headers):\n \"\"\"\n For the moment, t.163.com would not return 404 status code correctly.\n Instead, it would return a 302 and redirect user to a page that will\n display 404 information. This would make web user happy, but we have to\n do extra to make our API elegant. Thus we have this handler to \n correctly raise 404 code.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L150_C8", "label": "expression", "type": "expression", "loc": [150, 156], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L149_C4", "vector": [8, 2, 0.9217, 0.0422, 2, 0.05, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n For the moment, t.163.com would not return 404 status code correctly.\n Instead, it would return a 302 and redirect user to a page that will\n display 404 information. This would make web user happy, but we have to\n do extra to make our API elegant. Thus we have this handler to \n correctly raise 404 code.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L157_C8", "label": "result = http_error_302()", "type": "assigned_variable", "loc": [157, 158], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L149_C4", "vector": [14, 2, 0.9488, 0.012, 2, 0.05, 0.3333, 51, 3, 6, 0, 0, 895, 10, 1], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "http_error_302", "annotation": ""}, "snippet": " result = urllib2.HTTPRedirectHandler.http_error_302(\n self, req, fp, code, msg, headers)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L159_C8", "label": "if", "type": "if", "loc": [159, 160], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L149_C4", "vector": [4, 2, 0.9608, 0.012, 2, 0.05, 0.6667, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if headers['location'] == 'http://t.163.com/notfound':\n raise urllib2.HTTPError(req.get_full_url(), 404, msg, headers, fp)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L161_C8", "label": "return", "type": "return", "loc": [161, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L149_C4", "vector": [13, 2, 0.9699, 0.006, 2, 0.05, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L164_C0", "label": "if", "type": "if", "loc": [164, 166], "level": 0, "parent": null, "vector": [4, 0, 0.994, 0.0181, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == \"__main__\":\n import doctest\n doctest.testmod()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Import_L165_C4", "label": "doctest import doctest", "type": "import", "loc": [165, 165], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L164_C0", "vector": [1, 1, 0.994, 0.006, 1, 0.23, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "doctest", "arg_names": [], "import_names": ["doctest"], "rhs_call_name": "", "annotation": ""}, "snippet": " import doctest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L166_C4", "label": "testmod()", "type": "expression", "loc": [166, 166], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L164_C0", "vector": [8, 1, 1.0, 0.006, 1, 0.23, 1.0, 116, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "testmod", "arg_names": [], "import_names": [], "rhs_call_name": "testmod", "annotation": ""}, "snippet": " doctest.testmod()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1442:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L60_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L61_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L61_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L62_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L60_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L63_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L65_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L77_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L78_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L78_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L79_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L78_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L80_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L80_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L81_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L80_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L83_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L77_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L84_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L84_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L88_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L84_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L89_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L84_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L90_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L84_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L93_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L77_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L94_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L95_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L99_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L100_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L99_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L107_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L108_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L109_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L109_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L110_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L109_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L111_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L111_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L112_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L111_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L113_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L108_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L114_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L99_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L116_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L120_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L130_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L132_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L133_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L134_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L134_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L135_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L136_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L137_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L140_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L142_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L143_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L144_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L145_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:ClassDef_L148_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L149_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L149_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L150_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L149_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Assign_L157_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L149_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L159_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:FunctionDef_L149_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Return_L161_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L164_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Import_L165_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1442:If_L164_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1442:Expr_L166_C4"}]
#!/usr/bin/env python #coding=utf-8 """ Author: Xia Kai <xiaket@gmail.com> Filename: tests.py Type: Unit test module Last modified: 2010-05-21 16:51 Description: This file contains unit test cases for this project. """ import os import time import unittest from models import T163UserBase, User, Follower, Status, DirectMessage from models import SearchResult, SearchHit, UserSearchResult, UserSearchHit from session import T163Session as Session from utils import AuthenticationError, UserNotFound, IllegalCall # This FAKE_USER should not be available as an 163 account. FAKE_USER = "xiakai.nju@gmail.com" FAKE_PASS = "fakepass" # This should be a valid account, preferably, at your disposal. If you do not # have another account, at least find some account that is following you. and # you are not following. The following test case would assume that the # TEST_ACCOUNT is following the account that you give to __init__. # TEST_ACCOUNT_ALT should be someone who is not following you. TEST_ACCOUNT = "xiaket" TEST_ACCOUNT_ALT = "zhangjiawei" # This should be an invalid screen_name FAKE_SCREEN_NAME = "aslfkqwlalsdlfalkw" # This should be an invalid user/status id. FAKE_ID = "398066" # These are test message contents, variables with prefix FAKE are longer than # 163 characters, while variables with prefix TEST lay within the constraint. FAKE_MESSAGE_EN = u"abcdefghijklmnopqrstuvwxyz "*7 TEST_MESSAGE_EN = u"abcdefghijklmnopqrstuvwxyz "*6 FAKE_MESSAGE_CN = u"中文消息长度测试 "*19 TEST_MESSAGE_CN = u"中文消息长度测试 "*18 class SessionTests(unittest.TestCase): """ This class would test authentication related cases. In summary, we have: 1. No username provided. 2. Invalid username 3. Invalid username/password pair. 4. Invalid cookie file. 5. Invalid cookie file/username pair. 6. Valid cookie file removed after Session initilization. """ def __init__(self, testname, username=None, password=None, fulltest=False): """ Over default __init__ method to allow import of username and password. Setup username and passwords. Some tests are somehow dangerous, we do them with a fulltest flag. """ super(SessionTests, self).__init__(testname) self.username = username self.password = password self.fulltest = fulltest if fulltest: print "performing full test." def session_init(self): """ This function would test the __init__ method of Session. There sure be no cookie file both before and after this test case. """ # If neither username nor cookiefile is given to __init__. An # AuthenticationError would no doubt be raised. self.assertRaises(AuthenticationError, Session) # Should raise an AuthenticationError if an invalid username is # provided. self.assertRaises(AuthenticationError, Session, username=FAKE_USER) # This should not raise Exceptions, since it is a valid # username/password pair. Session(username=self.username, password=self.password) # This should not raise Exceptions, even though neither username nor # password is provided. Session(cookiefile="%s.txt" % self.username) # Since we have a valid cookie file now, anything given as username or # password would be ignored, so the following example would work. Session(cookiefile="%s.txt" % self.username, username=FAKE_USER) # Remove existing cookie file before we continue. The cookie should # have been created before. os.remove("%s.txt" % self.username) # This would cause AuthenticationError, since the cookiefile provided # does not exist. self.assertRaises( AuthenticationError, Session, cookiefile="%s.txt" % FAKE_USER, ) # This would work, since a fallback username/password scheme would # work. But this would save cookie to "%s.txt" % FAKE_USER, instead of # "%s.txt" % self.username. So we shall remove the cookiefile after # this test. Session( cookiefile="%s.txt" % FAKE_USER, username=self.username, password=self.password, ) os.remove("%s.txt" % FAKE_USER) # This should raise AuthenticationError, since it is an invalid # username/password pair. # CAUTION: This is dangerous. Frequent test of the following test would # lock your valid account up. if self.fulltest: self.assertRaises( AuthenticationError, Session, username=self.username, password=FAKE_PASS, ) def relation_api(self): """ This function would test the relationship related APIs. """ # Initialize a session. session = Session(username=self.username, password=self.password) ########################## # self.show_friendship # #------------------------# # /friendships/show.json # ########################## # Calling Session.show_friendship(target_screen_name=FAKE_SCREEN_NAME) # should cause an exception. self.assertRaises( UserNotFound, session.show_friendship, target_screen_name=FAKE_SCREEN_NAME, ) # This time, the target is valid, while the source_id is invalid. It # should also cause an exception. self.assertRaises( UserNotFound, session.show_friendship, source_id=FAKE_ID, target_screen_name=TEST_ACCOUNT, ) # This time, no target is provided, this should cause another # exception. self.assertRaises( IllegalCall, session.show_friendship, source_id=FAKE_ID, ) # This should work, giving the following relationship between # TEST_ACCOUNT and self.username. fo, foed = session.show_friendship( target_screen_name=TEST_ACCOUNT ) self.assertTrue( foed, "TEST_ACCOUNT:%s should follow %s" % (TEST_ACCOUNT, self.username), ) ########################################## # self.followers # #----------------------------------------# # /statuses/followers/{screen_name}.json # ########################################## # User current user's screen_name by default, so this should equal. self.assertEqual( [user.id for user in session.followers()], [user.id for user in session.followers(session.screen_name)], ) # This should never return an empty list, since at least TEST_ACCOUNT # is following self.username. Items in the list should be an instance # of Follower. followers = session.followers(session.screen_name) self.assertTrue(isinstance(followers[0], Follower)) # Test again, TEST_ACCOUNT should be following self.username self.assertTrue(TEST_ACCOUNT in [u.screen_name for u in followers]) # This should raise an exception, for the screen_name is invalid. self.assertRaises( UserNotFound, session.followers, screen_name=FAKE_SCREEN_NAME, ) # The above should work for both positional arguments and keyword # arguments. self.assertRaises( UserNotFound, session.followers, FAKE_SCREEN_NAME, ) ########################################## # self.friends # #----------------------------------------# # /statuses/friends/{screen_name}.json # ########################################## # This should give a list of Follower objects. friends = session.friends(TEST_ACCOUNT) self.assertTrue(isinstance(friends[0], Follower)) # Since an almost identical API is well tested(I hope!) above, I see no # point repeating it here. ############################################ # self.create_friendship # #------------------------------------------# # /friendships/create/{screen_name}.json # ############################################ # As before, this function is decorated with check_screen_name. # So we shall get a UserNotFound with an invalid screen_name. self.assertRaises( UserNotFound, session.create_friendship, FAKE_SCREEN_NAME, ) # Follow yourself would get an IllegalCall exception. self.assertRaises( IllegalCall, session.create_friendship, session.screen_name, ) # Before we continue, we shall follow # This should work. session.create_friendship(TEST_ACCOUNT) ############################################ # self.destroy_friendship # #------------------------------------------# # /friendships/destroy/{screen_name}.json # ############################################ # This should work. session.destroy_friendship(TEST_ACCOUNT) # It cannot be done twice: self.assertRaises( IllegalCall, session.destroy_friendship, TEST_ACCOUNT, ) # Nor can we unfollow someone who do not exist. self.assertRaises( UserNotFound, session.destroy_friendship, FAKE_SCREEN_NAME, ) def mail_api(self): """ This function would test the direct message related APIs. """ # Initialize a session. session = Session(username=self.username, password=self.password) ############################################ # self.new_direct_message # #------------------------------------------# # /direct_messages/new.json # ############################################ # This is an IllegalCall, since the receiver is invalid. self.assertRaises( IllegalCall, session.new_direct_message, FAKE_SCREEN_NAME, TEST_MESSAGE_CN, ) # This is an IllegalCall, since the message is too long. self.assertRaises( IllegalCall, session.new_direct_message, TEST_ACCOUNT, FAKE_MESSAGE_CN, ) # This is an IllegalCall, since the message is too long. self.assertRaises( IllegalCall, session.new_direct_message, TEST_ACCOUNT, FAKE_MESSAGE_EN, ) # This is an IllegalCall, since you cannot send a mail to yourself. self.assertRaises( IllegalCall, session.new_direct_message, session.screen_name, TEST_MESSAGE_EN, ) # This is an IllegalCall, since TEST_ACCOUNT_ALT is not following you. self.assertRaises( IllegalCall, session.new_direct_message, TEST_ACCOUNT_ALT, TEST_MESSAGE_EN, ) # Finally, this should work. message = session.new_direct_message(TEST_ACCOUNT, TEST_MESSAGE_EN) self.assertTrue(isinstance(message, DirectMessage)) # A direct message is sent to TEST_ACCOUNT, we shall retrieve the first # message in outbox and check if it is the same one. ############################################ # self.sent_direct_messages # #------------------------------------------# # /direct_messages/sent.json # ############################################ messages = session.sent_direct_messages() self.assertTrue(isinstance(messages[0], DirectMessage)) self.assertEqual(messages[0].id, message.id) ############################################ # self.destroy_direct_message # #------------------------------------------# # /direct_messages/destroy/{id}.json # ############################################ # This is an illegal call, since the id specified is invalid. self.assertRaises( IllegalCall, session.destroy_direct_message, FAKE_ID, ) removed_message = session.destroy_direct_message(message.id) self.assertEqual(removed_message.id, message.id) # This is an illegal call, since you cannot remove the same direct # message twice. self.assertRaises( IllegalCall, session.destroy_direct_message, message.id, ) ############################################ # self.direct_messages # #------------------------------------------# # /direct_messages.json # ############################################ # If there are direct messages in your inbox, we shall try to make sure # that it is a DirectMessage instance. messages = session.direct_messages() if len(messages) != 0: self.assertTrue(isinstance(messages[0], DirectMessage)) def search_api(self): """ This function would test the search related APIs. """ # Initialize a session. session = Session(username=self.username, password=self.password) ############################################ # self.search # #------------------------------------------# # /search.json # ############################################ # This is an IllegalCall, since no query keyword is specified. self.assertRaises( TypeError, session.search, ) # I hope I'm not a narcissist... search_result = session.search(TEST_ACCOUNT) self.assertTrue(isinstance(search_result, SearchResult)) result = search_result.result[0] self.assertTrue(isinstance(result, SearchHit)) ############################################ # self.user_search # #------------------------------------------# # /1/user/search.json # ############################################ search_result = session.user_search(TEST_ACCOUNT) self.assertTrue(isinstance(search_result, UserSearchResult)) result = search_result.result[0] self.assertTrue(isinstance(result, UserSearchHit)) def favorite_api(self): """ This function would test favorite related APIs. """ # Initialize a session. session = Session(username=self.username, password=self.password) ############################################ # self.create_favorite # #------------------------------------------# # /favorites/create/{id}.json # ############################################ # This is an IllegalCall, since the id is invalid. self.assertRaises( IllegalCall, session.create_favorite, FAKE_ID, ) # We shall get a valid message id by looking for the first message in # some user's timeline. favorited_status = session.user_timeline(TEST_ACCOUNT)[0] # Now add this message as favourite. session.create_favorite(favorited_status.id) # Now we are ready to test the self.favorites API. ############################################ # self.favorites # #------------------------------------------# # /favorites/{screen_name}.json # ############################################ # We shall find the first favorite message and compare the id. favorite_status = session.favorites()[0] self.assertTrue(isinstance(favorite_status, Status)) self.assertEqual(favorite_status.id, favorited_status.id) # This is an UserNotFound, since the screen_name is invalid. self.assertRaises( UserNotFound, session.favorites, FAKE_SCREEN_NAME, ) ############################################ # self.destroy_favorite # #------------------------------------------# # /favorites/destroy/{id}.json # ############################################ # This is an illegal call, since the id specified is invalid. self.assertRaises( IllegalCall, session.destroy_favorite, FAKE_ID, ) # This would work session.destroy_favorite(favorited_status.id) def status_api(self): """ This function would test the status related APIs. """ # Initialize a session. session = Session(username=self.username, password=self.password) ############################################ # self.update # #------------------------------------------# # /statuses/update.json # ############################################ # This is an IllegalCall, since the message is too long. self.assertRaises( IllegalCall, session.update, FAKE_MESSAGE_CN, ) # This is an IllegalCall, since the message is too long. self.assertRaises( IllegalCall, session.update, FAKE_MESSAGE_EN, ) newstatus = session.update(TEST_MESSAGE_CN) self.assertTrue(isinstance(newstatus, Status)) # TODO, when we have fully implemented reply and retweet, we have to # add more test case here. ################################################ # self.user_timeline # #----------------------------------------------# # /statuses/user_timeline/{screen_name}.json # ################################################ # The following screen_name is invalid. self.assertRaises( UserNotFound, session.user_timeline, FAKE_SCREEN_NAME, ) # Get the time line. I do not understand why it take so long to refresh # the timeline. 20 is not enough. # The following code would sometimes mysteriously fail. if self.fulltest: time.sleep(30) statuses = session.user_timeline() self.assertEqual(statuses[0].id, newstatus.id) ############################################ # self.show_status # #------------------------------------------# # /statuses/show/{id}.json # ############################################ # This is an IllegalCall, since the id is invalid. self.assertRaises( IllegalCall, session.show_status, FAKE_ID, ) self.assertEqual( session.show_status(newstatus.id).text, TEST_MESSAGE_CN.strip(), ) ############################################ # self.destroy_status # #------------------------------------------# # /statuses/destroy/{id}.json # ############################################ # This is IllegalCall, since the message id is invalid. self.assertRaises( IllegalCall, session.destroy_status, FAKE_ID, ) # This should work session.destroy_status(newstatus.id) # Get the time line. I do not understand why it take so long to refresh # the timeline. 20 is not enough. 30 would work most of the time. # The following code would sometimes mysteriously fail. if self.fulltest: time.sleep(30) statuses = session.user_timeline() self.assertNotEqual(statuses[0].id, newstatus.id) ############################################ # self.home_timeline # # self.mentions # #------------------------------------------# # /statuses/home_timeline.json # # /statuses/mentions.json # ############################################ # Not much can be done for home timeline and mentions. statuses = session.home_timeline() self.assertTrue(isinstance(statuses[0], Status)) statuses = session.mentions() self.assertTrue(isinstance(statuses[0], Status))
ajibawa-2023/Python-Code-Large/train/row_1443
131
590
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0119, 0.0153, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nAuthor: Xia Kai <xiaket@gmail.com>\nFilename: tests.py\nType: Unit test module\nLast modified: 2010-05-21 16:51\n\nDescription:\nThis file contains unit test cases for this project."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Import_L12_C0", "label": "os import os", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.0203, 0.0017, 0, 0.66, 0.0556, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Import_L13_C0", "label": "time import time", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.022, 0.0017, 0, 0.66, 0.1111, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Import_L14_C0", "label": "unittest import unittest", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0237, 0.0017, 0, 0.66, 0.1667, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], "rhs_call_name": "", "annotation": ""}, "snippet": "import unittest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:ImportFrom_L16_C0", "label": "from models import T163UserBase, User, Follower\u2026", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.0271, 0.0017, 0, 0.66, 0.2222, 495, 0, 5, 0, 0, 495, 0, 0], "semantic": {"name": "models", "arg_names": [], "import_names": ["T163UserBase", "User", "Follower", "Status", "DirectMessage"], "rhs_call_name": "", "annotation": ""}, "snippet": "from models import T163UserBase, User, Follower, Status, DirectMessage"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:ImportFrom_L17_C0", "label": "from models import SearchResult, SearchHit, UserSearchResult\u2026", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.0288, 0.0017, 0, 0.66, 0.2778, 495, 0, 4, 0, 0, 495, 0, 0], "semantic": {"name": "models", "arg_names": [], "import_names": ["SearchResult", "SearchHit", "UserSearchResult", "UserSearchHit"], "rhs_call_name": "", "annotation": ""}, "snippet": "from models import SearchResult, SearchHit, UserSearchResult, UserSearchHit"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:ImportFrom_L18_C0", "label": "from session import Session", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0305, 0.0017, 0, 0.66, 0.3333, 83, 0, 1, 0, 0, 83, 0, 0], "semantic": {"name": "session", "arg_names": [], "import_names": ["Session"], "rhs_call_name": "", "annotation": ""}, "snippet": "from session import T163Session as Session"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:ImportFrom_L19_C0", "label": "from utils import AuthenticationError, UserNotFound, IllegalCall", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.0322, 0.0017, 0, 0.66, 0.3889, 970, 0, 3, 0, 0, 970, 0, 0], "semantic": {"name": "utils", "arg_names": [], "import_names": ["AuthenticationError", "UserNotFound", "IllegalCall"], "rhs_call_name": "", "annotation": ""}, "snippet": "from utils import AuthenticationError, UserNotFound, IllegalCall"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L23_C0", "label": "FAKE_USER =", "type": "assigned_variable", "loc": [23, 23], "level": 0, "parent": null, "vector": [14, 0, 0.039, 0.0017, 0, 0.66, 0.4444, 679, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "FAKE_USER", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FAKE_USER = \"xiakai.nju@gmail.com\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L24_C0", "label": "FAKE_PASS =", "type": "assigned_variable", "loc": [24, 24], "level": 0, "parent": null, "vector": [14, 0, 0.0407, 0.0017, 0, 0.66, 0.5, 295, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "FAKE_PASS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FAKE_PASS = \"fakepass\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L31_C0", "label": "TEST_ACCOUNT =", "type": "assigned_variable", "loc": [31, 31], "level": 0, "parent": null, "vector": [14, 0, 0.0525, 0.0017, 0, 0.66, 0.5556, 934, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "TEST_ACCOUNT", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TEST_ACCOUNT = \"xiaket\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L32_C0", "label": "TEST_ACCOUNT_ALT =", "type": "assigned_variable", "loc": [32, 32], "level": 0, "parent": null, "vector": [14, 0, 0.0542, 0.0017, 0, 0.66, 0.6111, 460, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "TEST_ACCOUNT_ALT", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TEST_ACCOUNT_ALT = \"zhangjiawei\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L35_C0", "label": "FAKE_SCREEN_NAME =", "type": "assigned_variable", "loc": [35, 35], "level": 0, "parent": null, "vector": [14, 0, 0.0593, 0.0017, 0, 0.66, 0.6667, 376, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "FAKE_SCREEN_NAME", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FAKE_SCREEN_NAME = \"aslfkqwlalsdlfalkw\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L38_C0", "label": "FAKE_ID =", "type": "assigned_variable", "loc": [38, 38], "level": 0, "parent": null, "vector": [14, 0, 0.0644, 0.0017, 0, 0.66, 0.7222, 286, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "FAKE_ID", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FAKE_ID = \"398066\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L42_C0", "label": "FAKE_MESSAGE_EN =", "type": "assigned_variable", "loc": [42, 42], "level": 0, "parent": null, "vector": [14, 0, 0.0712, 0.0017, 0, 0.66, 0.7778, 34, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "FAKE_MESSAGE_EN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FAKE_MESSAGE_EN = u\"abcdefghijklmnopqrstuvwxyz \"*7"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L43_C0", "label": "TEST_MESSAGE_EN =", "type": "assigned_variable", "loc": [43, 43], "level": 0, "parent": null, "vector": [14, 0, 0.0729, 0.0017, 0, 0.66, 0.8333, 269, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "TEST_MESSAGE_EN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TEST_MESSAGE_EN = u\"abcdefghijklmnopqrstuvwxyz \"*6"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L44_C0", "label": "FAKE_MESSAGE_CN =", "type": "assigned_variable", "loc": [44, 44], "level": 0, "parent": null, "vector": [14, 0, 0.0746, 0.0017, 0, 0.66, 0.8889, 19, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "FAKE_MESSAGE_CN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FAKE_MESSAGE_CN = u\"\u4e2d\u6587\u6d88\u606f\u957f\u5ea6\u6d4b\u8bd5 \"*19"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L45_C0", "label": "TEST_MESSAGE_CN =", "type": "assigned_variable", "loc": [45, 45], "level": 0, "parent": null, "vector": [14, 0, 0.0763, 0.0017, 0, 0.66, 0.9444, 521, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "TEST_MESSAGE_CN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TEST_MESSAGE_CN = u\"\u4e2d\u6587\u6d88\u606f\u957f\u5ea6\u6d4b\u8bd5 \"*18"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "label": "SessionTests", "type": "class", "loc": [48, 590], "level": 0, "parent": null, "vector": [3, 0, 0.5407, 0.9203, 0, 0.66, 1.0, 762, 0, 7, 0, 0, 878, 0, 99], "semantic": {"name": "SessionTests", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class SessionTests(unittest.TestCase):\n \"\"\"\n This class would test authentication related cases. In summary, we have:\n 1. No username provided.\n 2. Invalid username\n 3. Invalid username/password pair.\n 4. Invalid cookie file.\n 5. Invalid cookie file/username pair."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L49_C4", "label": "expression", "type": "expression", "loc": [49, 57], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "vector": [8, 1, 0.0898, 0.0153, 1, 0.56, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This class would test authentication related cases. In summary, we have:\n 1. No username provided.\n 2. Invalid username\n 3. Invalid username/password pair.\n 4. Invalid cookie file.\n 5. Invalid cookie file/username pair.\n 6. Valid cookie file removed after Session initilization."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L59_C4", "label": "__init__", "type": "function", "loc": [59, 71], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "vector": [2, 1, 0.1102, 0.022, 1, 0.56, 0.1429, 555, 0, 5, 0, 0, 0, 0, 3], "semantic": {"name": "__init__", "arg_names": ["self", "testname", "username", "password", "fulltest"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, testname, username=None, password=None, fulltest=False):\n \"\"\"\n Over default __init__ method to allow import of username and password.\n Setup username and passwords.\n\n Some tests are somehow dangerous, we do them with a fulltest flag.\n \"\"\"\n super(SessionTests, self).__init__(testname)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L60_C8", "label": "expression", "type": "expression", "loc": [60, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L59_C4", "vector": [8, 2, 0.1059, 0.0102, 2, 0.88, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Over default __init__ method to allow import of username and password.\n Setup username and passwords.\n\n Some tests are somehow dangerous, we do them with a fulltest flag.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L66_C8", "label": "__init__()", "type": "expression", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L59_C4", "vector": [8, 2, 0.1119, 0.0017, 2, 0.88, 0.2, 555, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(SessionTests, self).__init__(testname)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L67_C8", "label": "self.username =", "type": "assigned_variable", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L59_C4", "vector": [14, 2, 0.1136, 0.0017, 2, 0.88, 0.4, 380, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.username", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.username = username"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L68_C8", "label": "self.password =", "type": "assigned_variable", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L59_C4", "vector": [14, 2, 0.1153, 0.0017, 2, 0.88, 0.6, 902, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.password", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.password = password"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L69_C8", "label": "self.fulltest =", "type": "assigned_variable", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L59_C4", "vector": [14, 2, 0.1169, 0.0017, 2, 0.88, 0.8, 787, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.fulltest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.fulltest = fulltest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L70_C8", "label": "if", "type": "if", "loc": [70, 71], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L59_C4", "vector": [4, 2, 0.1195, 0.0034, 2, 0.88, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if fulltest:\n print(\"performing full test.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L71_C12", "label": "print()", "type": "expression", "loc": [71, 71], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L70_C8", "vector": [8, 3, 0.1203, 0.0017, 3, 0.01, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"performing full test.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "label": "session_init", "type": "function", "loc": [73, 131], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "vector": [2, 1, 0.1729, 0.1, 1, 0.56, 0.2857, 618, 0, 1, 0, 0, 0, 0, 10], "semantic": {"name": "session_init", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def session_init(self):\n \"\"\"\n This function would test the __init__ method of Session.\n There sure be no cookie file both before and after this test case.\n \"\"\"\n # If neither username nor cookiefile is given to __init__. An\n # AuthenticationError would no doubt be raised.\n self.assertRaises(AuthenticationError, Session)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L74_C8", "label": "expression", "type": "expression", "loc": [74, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "vector": [8, 2, 0.128, 0.0068, 2, 0.87, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This function would test the __init__ method of Session.\n There sure be no cookie file both before and after this test case.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L80_C8", "label": "assertRaises()", "type": "expression", "loc": [80, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "vector": [8, 2, 0.1356, 0.0017, 2, 0.87, 0.1, 11, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(AuthenticationError, Session)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L84_C8", "label": "assertRaises()", "type": "expression", "loc": [84, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "vector": [8, 2, 0.1424, 0.0017, 2, 0.87, 0.2, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(AuthenticationError, Session, username=FAKE_USER)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L88_C8", "label": "Session()", "type": "expression", "loc": [88, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "vector": [8, 2, 0.1492, 0.0017, 2, 0.87, 0.3, 712, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "Session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " Session(username=self.username, password=self.password)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L92_C8", "label": "Session()", "type": "expression", "loc": [92, 92], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "vector": [8, 2, 0.1559, 0.0017, 2, 0.87, 0.4, 712, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "Session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " Session(cookiefile=\"%s.txt\" % self.username)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L96_C8", "label": "Session()", "type": "expression", "loc": [96, 96], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "vector": [8, 2, 0.1627, 0.0017, 2, 0.87, 0.5, 712, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "Session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " Session(cookiefile=\"%s.txt\" % self.username, username=FAKE_USER)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L100_C8", "label": "remove()", "type": "expression", "loc": [100, 100], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "vector": [8, 2, 0.1695, 0.0017, 2, 0.87, 0.6, 185, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove", "arg_names": [], "import_names": [], "rhs_call_name": "remove", "annotation": ""}, "snippet": " os.remove(\"%s.txt\" % self.username)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L104_C8", "label": "assertRaises()", "type": "expression", "loc": [104, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "vector": [8, 2, 0.1797, 0.0085, 2, 0.87, 0.7, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n AuthenticationError, \n Session, \n cookiefile=\"%s.txt\" % FAKE_USER,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L114_C8", "label": "Session()", "type": "expression", "loc": [114, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "vector": [8, 2, 0.1966, 0.0085, 2, 0.87, 0.8, 712, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "Session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " Session(\n cookiefile=\"%s.txt\" % FAKE_USER, \n username=self.username,\n password=self.password,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L119_C8", "label": "remove()", "type": "expression", "loc": [119, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "vector": [8, 2, 0.2017, 0.0017, 2, 0.87, 0.9, 185, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove", "arg_names": [], "import_names": [], "rhs_call_name": "remove", "annotation": ""}, "snippet": " os.remove(\"%s.txt\" % FAKE_USER)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L125_C8", "label": "if", "type": "if", "loc": [125, 131], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "vector": [4, 2, 0.2169, 0.0119, 2, 0.87, 1.0, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.fulltest:\n self.assertRaises(\n AuthenticationError, \n Session, \n username=self.username, \n password=FAKE_PASS,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L126_C12", "label": "assertRaises()", "type": "expression", "loc": [126, 131], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L125_C8", "vector": [8, 3, 0.2178, 0.0102, 3, 0.77, 0.0, 11, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n AuthenticationError, \n Session, \n username=self.username, \n password=FAKE_PASS,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "label": "relation_api", "type": "function", "loc": [133, 273], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "vector": [2, 1, 0.3441, 0.239, 1, 0.56, 0.4286, 332, 0, 1, 0, 0, 0, 0, 24], "semantic": {"name": "relation_api", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def relation_api(self):\n \"\"\"\n This function would test the relationship related APIs.\n \"\"\"\n # Initialize a session.\n session = Session(username=self.username, password=self.password) \n\n ##########################"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L134_C8", "label": "expression", "type": "expression", "loc": [134, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.2288, 0.0051, 2, 0.58, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This function would test the relationship related APIs.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L138_C8", "label": "session = Session()", "type": "assigned_variable", "loc": [138, 138], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [14, 2, 0.2339, 0.0017, 2, 0.58, 0.05, 83, 3, 2, 0, 0, 712, 10, 1], "semantic": {"name": "session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " session = Session(username=self.username, password=self.password) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L148_C8", "label": "assertRaises()", "type": "expression", "loc": [148, 152], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.2542, 0.0085, 2, 0.58, 0.1, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n UserNotFound, \n session.show_friendship, \n target_screen_name=FAKE_SCREEN_NAME,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L156_C8", "label": "assertRaises()", "type": "expression", "loc": [156, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.2686, 0.0102, 2, 0.58, 0.15, 11, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n UserNotFound, \n session.show_friendship, \n source_id=FAKE_ID,\n target_screen_name=TEST_ACCOUNT,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L165_C8", "label": "assertRaises()", "type": "expression", "loc": [165, 169], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.2831, 0.0085, 2, 0.58, 0.2, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.show_friendship, \n source_id=FAKE_ID,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L173_C8", "label": "fo, foed = show_friendship()", "type": "assigned_variable", "loc": [173, 175], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [14, 2, 0.2949, 0.0051, 2, 0.58, 0.25, 761, 3, 1, 0, 0, 881, 10, 1], "semantic": {"name": "fo, foed", "arg_names": [], "import_names": [], "rhs_call_name": "show_friendship", "annotation": ""}, "snippet": " fo, foed = session.show_friendship(\n target_screen_name=TEST_ACCOUNT\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L176_C8", "label": "assertTrue()", "type": "expression", "loc": [176, 179], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.3008, 0.0068, 2, 0.58, 0.3, 170, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(\n foed,\n \"TEST_ACCOUNT:%s should follow %s\" % (TEST_ACCOUNT, self.username),\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L188_C8", "label": "assertEqual()", "type": "expression", "loc": [188, 191], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.3212, 0.0068, 2, 0.58, 0.35, 299, 3, 2, 0, 0, 0, 0, 3], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(\n [user.id for user in session.followers()],\n [user.id for user in session.followers(session.screen_name)],\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L195_C8", "label": "followers = followers()", "type": "assigned_variable", "loc": [195, 195], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [14, 2, 0.3305, 0.0017, 2, 0.58, 0.4, 530, 3, 1, 0, 0, 530, 10, 1], "semantic": {"name": "followers", "arg_names": [], "import_names": [], "rhs_call_name": "followers", "annotation": ""}, "snippet": " followers = session.followers(session.screen_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L196_C8", "label": "assertTrue()", "type": "expression", "loc": [196, 196], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.3322, 0.0017, 2, 0.58, 0.45, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(followers[0], Follower))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L199_C8", "label": "assertTrue()", "type": "expression", "loc": [199, 199], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.3373, 0.0017, 2, 0.58, 0.5, 170, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(TEST_ACCOUNT in [u.screen_name for u in followers])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L202_C8", "label": "assertRaises()", "type": "expression", "loc": [202, 206], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.3458, 0.0085, 2, 0.58, 0.55, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n UserNotFound, \n session.followers, \n screen_name=FAKE_SCREEN_NAME,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L209_C8", "label": "assertRaises()", "type": "expression", "loc": [209, 213], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.3576, 0.0085, 2, 0.58, 0.6, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n UserNotFound, \n session.followers, \n FAKE_SCREEN_NAME,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L222_C8", "label": "friends = friends()", "type": "assigned_variable", "loc": [222, 222], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [14, 2, 0.3763, 0.0017, 2, 0.58, 0.65, 875, 3, 1, 0, 0, 875, 10, 1], "semantic": {"name": "friends", "arg_names": [], "import_names": [], "rhs_call_name": "friends", "annotation": ""}, "snippet": " friends = session.friends(TEST_ACCOUNT)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L223_C8", "label": "assertTrue()", "type": "expression", "loc": [223, 223], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.378, 0.0017, 2, 0.58, 0.7, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(friends[0], Follower))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L235_C8", "label": "assertRaises()", "type": "expression", "loc": [235, 239], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.4017, 0.0085, 2, 0.58, 0.75, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n UserNotFound, \n session.create_friendship, \n FAKE_SCREEN_NAME,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L242_C8", "label": "assertRaises()", "type": "expression", "loc": [242, 246], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.4136, 0.0085, 2, 0.58, 0.8, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.create_friendship, \n session.screen_name,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L250_C8", "label": "create_friendship()", "type": "expression", "loc": [250, 250], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.4237, 0.0017, 2, 0.58, 0.85, 536, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "create_friendship", "arg_names": [], "import_names": [], "rhs_call_name": "create_friendship", "annotation": ""}, "snippet": " session.create_friendship(TEST_ACCOUNT)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L259_C8", "label": "destroy_friendship()", "type": "expression", "loc": [259, 259], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.439, 0.0017, 2, 0.58, 0.9, 506, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "destroy_friendship", "arg_names": [], "import_names": [], "rhs_call_name": "destroy_friendship", "annotation": ""}, "snippet": " session.destroy_friendship(TEST_ACCOUNT)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L262_C8", "label": "assertRaises()", "type": "expression", "loc": [262, 266], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.4475, 0.0085, 2, 0.58, 0.95, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.destroy_friendship, \n TEST_ACCOUNT,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L269_C8", "label": "assertRaises()", "type": "expression", "loc": [269, 273], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "vector": [8, 2, 0.4593, 0.0085, 2, 0.58, 1.0, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n UserNotFound, \n session.destroy_friendship, \n FAKE_SCREEN_NAME,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "label": "mail_api", "type": "function", "loc": [275, 379], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "vector": [2, 1, 0.5542, 0.178, 1, 0.56, 0.5714, 170, 0, 1, 0, 0, 0, 0, 21], "semantic": {"name": "mail_api", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def mail_api(self):\n \"\"\"\n This function would test the direct message related APIs.\n \"\"\"\n # Initialize a session.\n session = Session(username=self.username, password=self.password) \n\n ############################################"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L276_C8", "label": "expression", "type": "expression", "loc": [276, 278], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [8, 2, 0.4695, 0.0051, 2, 0.87, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This function would test the direct message related APIs.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L280_C8", "label": "session = Session()", "type": "assigned_variable", "loc": [280, 280], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [14, 2, 0.4746, 0.0017, 2, 0.87, 0.0588, 83, 3, 2, 0, 0, 712, 10, 1], "semantic": {"name": "session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " session = Session(username=self.username, password=self.password) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L289_C8", "label": "assertRaises()", "type": "expression", "loc": [289, 294], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [8, 2, 0.4941, 0.0102, 2, 0.87, 0.1176, 11, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.new_direct_message, \n FAKE_SCREEN_NAME,\n TEST_MESSAGE_CN,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L297_C8", "label": "assertRaises()", "type": "expression", "loc": [297, 302], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [8, 2, 0.5076, 0.0102, 2, 0.87, 0.1765, 11, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.new_direct_message, \n TEST_ACCOUNT,\n FAKE_MESSAGE_CN,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L305_C8", "label": "assertRaises()", "type": "expression", "loc": [305, 310], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [8, 2, 0.5212, 0.0102, 2, 0.87, 0.2353, 11, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.new_direct_message, \n TEST_ACCOUNT,\n FAKE_MESSAGE_EN,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L313_C8", "label": "assertRaises()", "type": "expression", "loc": [313, 318], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [8, 2, 0.5347, 0.0102, 2, 0.87, 0.2941, 11, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.new_direct_message, \n session.screen_name,\n TEST_MESSAGE_EN,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L321_C8", "label": "assertRaises()", "type": "expression", "loc": [321, 326], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [8, 2, 0.5483, 0.0102, 2, 0.87, 0.3529, 11, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.new_direct_message, \n TEST_ACCOUNT_ALT,\n TEST_MESSAGE_EN,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L329_C8", "label": "message = new_direct_message()", "type": "assigned_variable", "loc": [329, 329], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [14, 2, 0.5576, 0.0017, 2, 0.87, 0.4118, 635, 3, 2, 0, 0, 801, 10, 1], "semantic": {"name": "message", "arg_names": [], "import_names": [], "rhs_call_name": "new_direct_message", "annotation": ""}, "snippet": " message = session.new_direct_message(TEST_ACCOUNT, TEST_MESSAGE_EN)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L330_C8", "label": "assertTrue()", "type": "expression", "loc": [330, 330], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [8, 2, 0.5593, 0.0017, 2, 0.87, 0.4706, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(message, DirectMessage))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L341_C8", "label": "messages = sent_direct_messages()", "type": "assigned_variable", "loc": [341, 341], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [14, 2, 0.578, 0.0017, 2, 0.87, 0.5294, 312, 3, 0, 0, 0, 492, 10, 1], "semantic": {"name": "messages", "arg_names": [], "import_names": [], "rhs_call_name": "sent_direct_messages", "annotation": ""}, "snippet": " messages = session.sent_direct_messages()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L342_C8", "label": "assertTrue()", "type": "expression", "loc": [342, 342], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [8, 2, 0.5797, 0.0017, 2, 0.87, 0.5882, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(messages[0], DirectMessage))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L343_C8", "label": "assertEqual()", "type": "expression", "loc": [343, 343], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [8, 2, 0.5814, 0.0017, 2, 0.87, 0.6471, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(messages[0].id, message.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L352_C8", "label": "assertRaises()", "type": "expression", "loc": [352, 356], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [8, 2, 0.6, 0.0085, 2, 0.87, 0.7059, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.destroy_direct_message, \n FAKE_ID,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L358_C8", "label": "removed_message = destroy_direct_message()", "type": "assigned_variable", "loc": [358, 358], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [14, 2, 0.6068, 0.0017, 2, 0.87, 0.7647, 98, 3, 1, 0, 0, 777, 10, 1], "semantic": {"name": "removed_message", "arg_names": [], "import_names": [], "rhs_call_name": "destroy_direct_message", "annotation": ""}, "snippet": " removed_message = session.destroy_direct_message(message.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L359_C8", "label": "assertEqual()", "type": "expression", "loc": [359, 359], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [8, 2, 0.6085, 0.0017, 2, 0.87, 0.8235, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(removed_message.id, message.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L363_C8", "label": "assertRaises()", "type": "expression", "loc": [363, 367], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [8, 2, 0.6186, 0.0085, 2, 0.87, 0.8824, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.destroy_direct_message, \n message.id,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L377_C8", "label": "messages = direct_messages()", "type": "assigned_variable", "loc": [377, 377], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [14, 2, 0.639, 0.0017, 2, 0.87, 0.9412, 312, 3, 0, 0, 0, 385, 10, 1], "semantic": {"name": "messages", "arg_names": [], "import_names": [], "rhs_call_name": "direct_messages", "annotation": ""}, "snippet": " messages = session.direct_messages()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L378_C8", "label": "if", "type": "if", "loc": [378, 379], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "vector": [4, 2, 0.6415, 0.0034, 2, 0.87, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(messages) != 0:\n self.assertTrue(isinstance(messages[0], DirectMessage))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L379_C12", "label": "assertTrue()", "type": "expression", "loc": [379, 379], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L378_C8", "vector": [8, 3, 0.6424, 0.0017, 3, 0.53, 0.0, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(messages[0], DirectMessage))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "label": "search_api", "type": "function", "loc": [381, 415], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "vector": [2, 1, 0.6746, 0.0593, 1, 0.56, 0.7143, 314, 0, 1, 0, 0, 0, 0, 12], "semantic": {"name": "search_api", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def search_api(self):\n \"\"\"\n This function would test the search related APIs.\n \"\"\"\n # Initialize a session.\n session = Session(username=self.username, password=self.password) \n\n ############################################"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L382_C8", "label": "expression", "type": "expression", "loc": [382, 384], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "vector": [8, 2, 0.6492, 0.0051, 2, 0.33, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This function would test the search related APIs.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L386_C8", "label": "session = Session()", "type": "assigned_variable", "loc": [386, 386], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "vector": [14, 2, 0.6542, 0.0017, 2, 0.33, 0.1, 83, 3, 2, 0, 0, 712, 10, 1], "semantic": {"name": "session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " session = Session(username=self.username, password=self.password) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L395_C8", "label": "assertRaises()", "type": "expression", "loc": [395, 398], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "vector": [8, 2, 0.672, 0.0068, 2, 0.33, 0.2, 11, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n TypeError, \n session.search, \n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L401_C8", "label": "search_result = search()", "type": "assigned_variable", "loc": [401, 401], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "vector": [14, 2, 0.6797, 0.0017, 2, 0.33, 0.3, 666, 3, 1, 0, 0, 163, 10, 1], "semantic": {"name": "search_result", "arg_names": [], "import_names": [], "rhs_call_name": "search", "annotation": ""}, "snippet": " search_result = session.search(TEST_ACCOUNT)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L402_C8", "label": "assertTrue()", "type": "expression", "loc": [402, 402], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "vector": [8, 2, 0.6814, 0.0017, 2, 0.33, 0.4, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(search_result, SearchResult))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L403_C8", "label": "result =", "type": "assigned_variable", "loc": [403, 403], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "vector": [14, 2, 0.6831, 0.0017, 2, 0.33, 0.5, 51, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " result = search_result.result[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L404_C8", "label": "assertTrue()", "type": "expression", "loc": [404, 404], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "vector": [8, 2, 0.6847, 0.0017, 2, 0.33, 0.6, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(result, SearchHit))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L412_C8", "label": "search_result = user_search()", "type": "assigned_variable", "loc": [412, 412], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "vector": [14, 2, 0.6983, 0.0017, 2, 0.33, 0.7, 666, 3, 1, 0, 0, 437, 10, 1], "semantic": {"name": "search_result", "arg_names": [], "import_names": [], "rhs_call_name": "user_search", "annotation": ""}, "snippet": " search_result = session.user_search(TEST_ACCOUNT)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L413_C8", "label": "assertTrue()", "type": "expression", "loc": [413, 413], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "vector": [8, 2, 0.7, 0.0017, 2, 0.33, 0.8, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(search_result, UserSearchResult))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L414_C8", "label": "result =", "type": "assigned_variable", "loc": [414, 414], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "vector": [14, 2, 0.7017, 0.0017, 2, 0.33, 0.9, 51, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " result = search_result.result[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L415_C8", "label": "assertTrue()", "type": "expression", "loc": [415, 415], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "vector": [8, 2, 0.7034, 0.0017, 2, 0.33, 1.0, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(result, UserSearchHit))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "label": "favorite_api", "type": "function", "loc": [417, 479], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "vector": [2, 1, 0.7593, 0.1068, 1, 0.56, 0.8571, 739, 0, 1, 0, 0, 0, 0, 11], "semantic": {"name": "favorite_api", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def favorite_api(self):\n \"\"\"\n This function would test favorite related APIs.\n \"\"\"\n # Initialize a session.\n session = Session(username=self.username, password=self.password) \n\n ############################################"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L418_C8", "label": "expression", "type": "expression", "loc": [418, 420], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "vector": [8, 2, 0.7102, 0.0051, 2, 0.06, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This function would test favorite related APIs.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L422_C8", "label": "session = Session()", "type": "assigned_variable", "loc": [422, 422], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "vector": [14, 2, 0.7153, 0.0017, 2, 0.06, 0.1, 83, 3, 2, 0, 0, 712, 10, 1], "semantic": {"name": "session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " session = Session(username=self.username, password=self.password) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L431_C8", "label": "assertRaises()", "type": "expression", "loc": [431, 435], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "vector": [8, 2, 0.7339, 0.0085, 2, 0.06, 0.2, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall,\n session.create_favorite,\n FAKE_ID,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L439_C8", "label": "favorited_status =", "type": "assigned_variable", "loc": [439, 439], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "vector": [14, 2, 0.7441, 0.0017, 2, 0.06, 0.3, 286, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "favorited_status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " favorited_status = session.user_timeline(TEST_ACCOUNT)[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L442_C8", "label": "create_favorite()", "type": "expression", "loc": [442, 442], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "vector": [8, 2, 0.7492, 0.0017, 2, 0.06, 0.4, 288, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "create_favorite", "arg_names": [], "import_names": [], "rhs_call_name": "create_favorite", "annotation": ""}, "snippet": " session.create_favorite(favorited_status.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L453_C8", "label": "favorite_status =", "type": "assigned_variable", "loc": [453, 453], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "vector": [14, 2, 0.7678, 0.0017, 2, 0.06, 0.5, 650, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "favorite_status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " favorite_status = session.favorites()[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L455_C8", "label": "assertTrue()", "type": "expression", "loc": [455, 455], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "vector": [8, 2, 0.7712, 0.0017, 2, 0.06, 0.6, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(favorite_status, Status))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L456_C8", "label": "assertEqual()", "type": "expression", "loc": [456, 456], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "vector": [8, 2, 0.7729, 0.0017, 2, 0.06, 0.7, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(favorite_status.id, favorited_status.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L459_C8", "label": "assertRaises()", "type": "expression", "loc": [459, 463], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "vector": [8, 2, 0.7814, 0.0085, 2, 0.06, 0.8, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n UserNotFound,\n session.favorites,\n FAKE_SCREEN_NAME,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L472_C8", "label": "assertRaises()", "type": "expression", "loc": [472, 476], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "vector": [8, 2, 0.8034, 0.0085, 2, 0.06, 0.9, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.destroy_favorite, \n FAKE_ID,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L479_C8", "label": "destroy_favorite()", "type": "expression", "loc": [479, 479], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "vector": [8, 2, 0.8119, 0.0017, 2, 0.06, 1.0, 959, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "destroy_favorite", "arg_names": [], "import_names": [], "rhs_call_name": "destroy_favorite", "annotation": ""}, "snippet": " session.destroy_favorite(favorited_status.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "label": "status_api", "type": "function", "loc": [481, 590], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "vector": [2, 1, 0.9076, 0.1864, 1, 0.56, 1.0, 569, 0, 1, 0, 0, 0, 0, 25], "semantic": {"name": "status_api", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def status_api(self):\n \"\"\"\n This function would test the status related APIs.\n \"\"\"\n # Initialize a session.\n session = Session(username=self.username, password=self.password) \n\n ############################################"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L482_C8", "label": "expression", "type": "expression", "loc": [482, 484], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [8, 2, 0.8186, 0.0051, 2, 0.96, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This function would test the status related APIs.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L486_C8", "label": "session = Session()", "type": "assigned_variable", "loc": [486, 486], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [14, 2, 0.8237, 0.0017, 2, 0.96, 0.0625, 83, 3, 2, 0, 0, 712, 10, 1], "semantic": {"name": "session", "arg_names": [], "import_names": [], "rhs_call_name": "Session", "annotation": ""}, "snippet": " session = Session(username=self.username, password=self.password) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L495_C8", "label": "assertRaises()", "type": "expression", "loc": [495, 499], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [8, 2, 0.8424, 0.0085, 2, 0.96, 0.125, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.update, \n FAKE_MESSAGE_CN,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L502_C8", "label": "assertRaises()", "type": "expression", "loc": [502, 506], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [8, 2, 0.8542, 0.0085, 2, 0.96, 0.1875, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.update, \n FAKE_MESSAGE_EN,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L508_C8", "label": "newstatus = update()", "type": "assigned_variable", "loc": [508, 508], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [14, 2, 0.861, 0.0017, 2, 0.96, 0.25, 465, 3, 1, 0, 0, 637, 10, 1], "semantic": {"name": "newstatus", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": " newstatus = session.update(TEST_MESSAGE_CN)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L509_C8", "label": "assertTrue()", "type": "expression", "loc": [509, 509], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [8, 2, 0.8627, 0.0017, 2, 0.96, 0.3125, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(newstatus, Status))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L521_C8", "label": "assertRaises()", "type": "expression", "loc": [521, 525], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [8, 2, 0.8864, 0.0085, 2, 0.96, 0.375, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n UserNotFound, \n session.user_timeline, \n FAKE_SCREEN_NAME,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L531_C8", "label": "if", "type": "if", "loc": [531, 534], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [4, 2, 0.9025, 0.0068, 2, 0.96, 0.4375, 0, 7, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.fulltest:\n time.sleep(30)\n statuses = session.user_timeline()\n self.assertEqual(statuses[0].id, newstatus.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L532_C12", "label": "sleep()", "type": "expression", "loc": [532, 532], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L531_C8", "vector": [8, 3, 0.9017, 0.0017, 3, 0.12, 0.0, 476, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "sleep", "arg_names": [], "import_names": [], "rhs_call_name": "sleep", "annotation": ""}, "snippet": " time.sleep(30)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L533_C12", "label": "statuses = user_timeline()", "type": "assigned_variable", "loc": [533, 533], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L531_C8", "vector": [14, 3, 0.9034, 0.0017, 3, 0.12, 0.5, 37, 3, 0, 0, 0, 101, 10, 1], "semantic": {"name": "statuses", "arg_names": [], "import_names": [], "rhs_call_name": "user_timeline", "annotation": ""}, "snippet": " statuses = session.user_timeline()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L534_C12", "label": "assertEqual()", "type": "expression", "loc": [534, 534], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L531_C8", "vector": [8, 3, 0.9051, 0.0017, 3, 0.12, 1.0, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(statuses[0].id, newstatus.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L543_C8", "label": "assertRaises()", "type": "expression", "loc": [543, 547], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [8, 2, 0.9237, 0.0085, 2, 0.96, 0.5, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall,\n session.show_status,\n FAKE_ID,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L549_C8", "label": "assertEqual()", "type": "expression", "loc": [549, 552], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [8, 2, 0.9331, 0.0068, 2, 0.96, 0.5625, 299, 3, 2, 0, 0, 0, 0, 3], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(\n session.show_status(newstatus.id).text, \n TEST_MESSAGE_CN.strip(),\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L561_C8", "label": "assertRaises()", "type": "expression", "loc": [561, 565], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [8, 2, 0.9542, 0.0085, 2, 0.96, 0.625, 11, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(\n IllegalCall, \n session.destroy_status, \n FAKE_ID,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L567_C8", "label": "destroy_status()", "type": "expression", "loc": [567, 567], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [8, 2, 0.961, 0.0017, 2, 0.96, 0.6875, 103, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "destroy_status", "arg_names": [], "import_names": [], "rhs_call_name": "destroy_status", "annotation": ""}, "snippet": " session.destroy_status(newstatus.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L573_C8", "label": "if", "type": "if", "loc": [573, 576], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [4, 2, 0.9737, 0.0068, 2, 0.96, 0.75, 0, 7, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.fulltest:\n time.sleep(30)\n statuses = session.user_timeline()\n self.assertNotEqual(statuses[0].id, newstatus.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L574_C12", "label": "sleep()", "type": "expression", "loc": [574, 574], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L573_C8", "vector": [8, 3, 0.9729, 0.0017, 3, 0.68, 0.0, 476, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "sleep", "arg_names": [], "import_names": [], "rhs_call_name": "sleep", "annotation": ""}, "snippet": " time.sleep(30)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L575_C12", "label": "statuses = user_timeline()", "type": "assigned_variable", "loc": [575, 575], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L573_C8", "vector": [14, 3, 0.9746, 0.0017, 3, 0.68, 0.5, 37, 3, 0, 0, 0, 101, 10, 1], "semantic": {"name": "statuses", "arg_names": [], "import_names": [], "rhs_call_name": "user_timeline", "annotation": ""}, "snippet": " statuses = session.user_timeline()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L576_C12", "label": "assertNotEqual()", "type": "expression", "loc": [576, 576], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L573_C8", "vector": [8, 3, 0.9763, 0.0017, 3, 0.68, 1.0, 120, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertNotEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertNotEqual", "annotation": ""}, "snippet": " self.assertNotEqual(statuses[0].id, newstatus.id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L587_C8", "label": "statuses = home_timeline()", "type": "assigned_variable", "loc": [587, 587], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [14, 2, 0.9949, 0.0017, 2, 0.96, 0.8125, 37, 3, 0, 0, 0, 302, 10, 1], "semantic": {"name": "statuses", "arg_names": [], "import_names": [], "rhs_call_name": "home_timeline", "annotation": ""}, "snippet": " statuses = session.home_timeline()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L588_C8", "label": "assertTrue()", "type": "expression", "loc": [588, 588], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [8, 2, 0.9966, 0.0017, 2, 0.96, 0.875, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(statuses[0], Status))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L589_C8", "label": "statuses = mentions()", "type": "assigned_variable", "loc": [589, 589], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [14, 2, 0.9983, 0.0017, 2, 0.96, 0.9375, 37, 3, 0, 0, 0, 369, 10, 1], "semantic": {"name": "statuses", "arg_names": [], "import_names": [], "rhs_call_name": "mentions", "annotation": ""}, "snippet": " statuses = session.mentions()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L590_C8", "label": "assertTrue()", "type": "expression", "loc": [590, 590], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "vector": [8, 2, 1.0, 0.0017, 2, 0.96, 1.0, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(isinstance(statuses[0], Status))"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L67_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L70_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L71_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L74_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L84_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L88_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L100_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L119_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L125_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L125_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L126_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L134_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L138_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L148_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L156_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L173_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L176_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L188_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L195_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L196_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L199_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L202_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L209_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L222_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L223_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L235_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L242_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L250_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L259_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L262_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L269_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L276_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L280_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L289_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L297_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L305_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L313_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L321_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L329_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L330_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L341_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L342_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L343_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L352_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L358_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L359_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L363_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L377_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L378_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L378_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L379_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L382_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L386_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L395_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L401_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L402_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L403_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L404_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L412_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L413_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L414_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L415_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L418_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L422_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L431_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L439_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L442_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L453_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L455_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L456_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L459_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L472_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L479_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L482_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L486_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L495_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L502_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L508_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L509_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L521_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L531_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L531_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L532_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L531_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L533_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L531_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L534_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L543_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L549_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L561_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L567_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L573_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L573_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L574_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L573_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L575_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:If_L573_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L576_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L587_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L588_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Assign_L589_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1443:FunctionDef_L481_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1443:Expr_L590_C8"}]
#!/usr/bin/env python #coding=utf-8 """ Author: Xia Kai <xiaket@gmail.com> Filename: __init__.py Type: Module meta information holder Last modified: 2010-05-16 20:44 Description: """ __author__ = "xiaket" __version__ = "0.2b"
ajibawa-2023/Python-Code-Large/train/row_1445
3
13
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1445:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 10], "level": 0, "parent": null, "vector": [8, 0, 0.5, 0.6154, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nAuthor: Xia Kai <xiaket@gmail.com>\nFilename: __init__.py\nType: Module meta information holder\nLast modified: 2010-05-16 20:44\n\nDescription:\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1445:Assign_L12_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.9231, 0.0769, 0, 0.66, 0.5, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__author__ = \"xiaket\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1445:Assign_L13_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [13, 13], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.0769, 0, 0.66, 1.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__version__ = \"0.2b\""}]
[]
import pygtk pygtk.require('2.0') import gtk class TreeViewColumnExample(object): # close the window and quit def delete_event(self, widget, event, data=None): gtk.main_quit() return False def __init__(self): # Create a new window self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.set_title("TreeViewColumn Example") self.window.connect("delete_event", self.delete_event) # create a liststore with one string column to use as the model self.liststore = gtk.ListStore(str, str, str, 'gboolean') # create the TreeView using liststore self.treeview = gtk.TreeView(self.liststore) # create the TreeViewColumns to display the data self.tvcolumn = gtk.TreeViewColumn('Pixbuf and Text') self.tvcolumn1 = gtk.TreeViewColumn('Text Only') # add a row with text and a stock item - color strings for # the background self.liststore.append(['Open', gtk.STOCK_OPEN, 'Open a File', True]) self.liststore.append(['New', gtk.STOCK_NEW, 'New File', True]) self.liststore.append(['Print', gtk.STOCK_PRINT, 'Print File', False]) # add columns to treeview self.treeview.append_column(self.tvcolumn) self.treeview.append_column(self.tvcolumn1) # create a CellRenderers to render the data self.cellpb = gtk.CellRendererPixbuf() self.cell = gtk.CellRendererText() self.cell1 = gtk.CellRendererText() # set background color property self.cellpb.set_property('cell-background', 'yellow') self.cell.set_property('cell-background', 'cyan') self.cell1.set_property('cell-background', 'pink') # add the cells to the columns - 2 in the first self.tvcolumn.pack_start(self.cellpb, False) self.tvcolumn.pack_start(self.cell, True) self.tvcolumn1.pack_start(self.cell1, True) self.tvcolumn.set_attributes(self.cellpb, stock_id=1) self.tvcolumn.set_attributes(self.cell, text=0) self.tvcolumn1.set_attributes(self.cell1, text=2, cell_background_set=3) # make treeview searchable self.treeview.set_search_column(0) # Allow sorting on the column self.tvcolumn.set_sort_column_id(0) # Allow drag and drop reordering of rows self.treeview.set_reorderable(True) self.window.add(self.treeview) self.window.show_all() def main(): gtk.main() if __name__ == "__main__": tvcexample = TreeViewColumnExample() main()
ajibawa-2023/Python-Code-Large/train/row_1446
42
77
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Import_L1_C0", "label": "pygtk import pygtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.013, 0.013, 0, 0.66, 0.0, 106, 0, 1, 0, 0, 106, 0, 0], "semantic": {"name": "pygtk", "arg_names": [], "import_names": ["pygtk"], "rhs_call_name": "", "annotation": ""}, "snippet": "import pygtk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L2_C0", "label": "require()", "type": "expression", "loc": [2, 2], "level": 0, "parent": null, "vector": [8, 0, 0.026, 0.013, 0, 0.66, 0.2, 66, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "require", "arg_names": [], "import_names": [], "rhs_call_name": "require", "annotation": ""}, "snippet": "pygtk.require('2.0')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Import_L3_C0", "label": "gtk import gtk", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.039, 0.013, 0, 0.66, 0.4, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name": "", "annotation": ""}, "snippet": "import gtk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:ClassDef_L5_C0", "label": "TreeViewColumnExample", "type": "class", "loc": [5, 70], "level": 0, "parent": null, "vector": [3, 0, 0.487, 0.8571, 0, 0.66, 0.6, 824, 0, 2, 0, 0, 186, 0, 30], "semantic": {"name": "TreeViewColumnExample", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TreeViewColumnExample(object):\n\n # close the window and quit\n def delete_event(self, widget, event, data=None):\n gtk.main_quit()\n return False\n\n def __init__(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L8_C4", "label": "delete_event", "type": "function", "loc": [8, 10], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:ClassDef_L5_C0", "vector": [2, 1, 0.1169, 0.039, 1, 0.43, 0.0, 525, 0, 4, 1, 0, 0, 0, 1], "semantic": {"name": "delete_event", "arg_names": ["self", "widget", "event", "data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def delete_event(self, widget, event, data=None):\n gtk.main_quit()\n return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L9_C8", "label": "main_quit()", "type": "expression", "loc": [9, 9], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L8_C4", "vector": [8, 2, 0.1169, 0.013, 2, 0.34, 0.0, 973, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main_quit", "arg_names": [], "import_names": [], "rhs_call_name": "main_quit", "annotation": ""}, "snippet": " gtk.main_quit()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Return_L10_C8", "label": "return", "type": "return", "loc": [10, 10], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L8_C4", "vector": [13, 2, 0.1299, 0.013, 2, 0.34, 1.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "label": "__init__", "type": "function", "loc": [12, 70], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:ClassDef_L5_C0", "vector": [2, 1, 0.5325, 0.7662, 1, 0.43, 1.0, 555, 0, 1, 0, 0, 0, 0, 29], "semantic": {"name": "__init__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self):\n # Create a new window\n self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)\n self.window.set_title(\"TreeViewColumn Example\")\n self.window.connect(\"delete_event\", self.delete_event)\n\n # create a liststore with one string column to use as the model\n self.liststore = gtk.ListStore(str, str, str, 'gboolean')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L14_C8", "label": "self.window = Window()", "type": "assigned_variable", "loc": [14, 14], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [14, 2, 0.1818, 0.013, 2, 0.02, 0.0, 313, 3, 1, 0, 0, 698, 10, 1], "semantic": {"name": "self.window", "arg_names": [], "import_names": [], "rhs_call_name": "Window", "annotation": ""}, "snippet": " self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L15_C8", "label": "set_title()", "type": "expression", "loc": [15, 15], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.1948, 0.013, 2, 0.02, 0.0357, 145, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_title", "arg_names": [], "import_names": [], "rhs_call_name": "set_title", "annotation": ""}, "snippet": " self.window.set_title(\"TreeViewColumn Example\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L16_C8", "label": "connect()", "type": "expression", "loc": [16, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.2078, 0.013, 2, 0.02, 0.0714, 242, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "connect", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " self.window.connect(\"delete_event\", self.delete_event)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L19_C8", "label": "self.liststore = ListStore()", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [14, 2, 0.2468, 0.013, 2, 0.02, 0.1071, 944, 3, 4, 0, 0, 344, 10, 1], "semantic": {"name": "self.liststore", "arg_names": [], "import_names": [], "rhs_call_name": "ListStore", "annotation": ""}, "snippet": " self.liststore = gtk.ListStore(str, str, str, 'gboolean')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L22_C8", "label": "self.treeview = TreeView()", "type": "assigned_variable", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [14, 2, 0.2857, 0.013, 2, 0.02, 0.1429, 369, 3, 1, 0, 0, 24, 10, 1], "semantic": {"name": "self.treeview", "arg_names": [], "import_names": [], "rhs_call_name": "TreeView", "annotation": ""}, "snippet": " self.treeview = gtk.TreeView(self.liststore)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L25_C8", "label": "self.tvcolumn = TreeViewColumn()", "type": "assigned_variable", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [14, 2, 0.3247, 0.013, 2, 0.02, 0.1786, 6, 3, 1, 0, 0, 619, 10, 1], "semantic": {"name": "self.tvcolumn", "arg_names": [], "import_names": [], "rhs_call_name": "TreeViewColumn", "annotation": ""}, "snippet": " self.tvcolumn = gtk.TreeViewColumn('Pixbuf and Text')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L26_C8", "label": "self.tvcolumn1 = TreeViewColumn()", "type": "assigned_variable", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [14, 2, 0.3377, 0.013, 2, 0.02, 0.2143, 410, 3, 1, 0, 0, 619, 10, 1], "semantic": {"name": "self.tvcolumn1", "arg_names": [], "import_names": [], "rhs_call_name": "TreeViewColumn", "annotation": ""}, "snippet": " self.tvcolumn1 = gtk.TreeViewColumn('Text Only')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L30_C8", "label": "append()", "type": "expression", "loc": [30, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.3896, 0.013, 2, 0.02, 0.25, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.liststore.append(['Open', gtk.STOCK_OPEN, 'Open a File', True])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L31_C8", "label": "append()", "type": "expression", "loc": [31, 31], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.4026, 0.013, 2, 0.02, 0.2857, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.liststore.append(['New', gtk.STOCK_NEW, 'New File', True])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L32_C8", "label": "append()", "type": "expression", "loc": [32, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.4156, 0.013, 2, 0.02, 0.3214, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.liststore.append(['Print', gtk.STOCK_PRINT, 'Print File', False])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L35_C8", "label": "append_column()", "type": "expression", "loc": [35, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.4545, 0.013, 2, 0.02, 0.3571, 468, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append_column", "arg_names": [], "import_names": [], "rhs_call_name": "append_column", "annotation": ""}, "snippet": " self.treeview.append_column(self.tvcolumn)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L36_C8", "label": "append_column()", "type": "expression", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.4675, 0.013, 2, 0.02, 0.3929, 468, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append_column", "arg_names": [], "import_names": [], "rhs_call_name": "append_column", "annotation": ""}, "snippet": " self.treeview.append_column(self.tvcolumn1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L39_C8", "label": "self.cellpb = CellRendererPixbuf()", "type": "assigned_variable", "loc": [39, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [14, 2, 0.5065, 0.013, 2, 0.02, 0.4286, 460, 3, 0, 0, 0, 958, 10, 1], "semantic": {"name": "self.cellpb", "arg_names": [], "import_names": [], "rhs_call_name": "CellRendererPixbuf", "annotation": ""}, "snippet": " self.cellpb = gtk.CellRendererPixbuf()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L40_C8", "label": "self.cell = CellRendererText()", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [14, 2, 0.5195, 0.013, 2, 0.02, 0.4643, 611, 3, 0, 0, 0, 291, 10, 1], "semantic": {"name": "self.cell", "arg_names": [], "import_names": [], "rhs_call_name": "CellRendererText", "annotation": ""}, "snippet": " self.cell = gtk.CellRendererText()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L41_C8", "label": "self.cell1 = CellRendererText()", "type": "assigned_variable", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [14, 2, 0.5325, 0.013, 2, 0.02, 0.5, 391, 3, 0, 0, 0, 291, 10, 1], "semantic": {"name": "self.cell1", "arg_names": [], "import_names": [], "rhs_call_name": "CellRendererText", "annotation": ""}, "snippet": " self.cell1 = gtk.CellRendererText()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L44_C8", "label": "set_property()", "type": "expression", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.5714, 0.013, 2, 0.02, 0.5357, 772, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_property", "arg_names": [], "import_names": [], "rhs_call_name": "set_property", "annotation": ""}, "snippet": " self.cellpb.set_property('cell-background', 'yellow')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L45_C8", "label": "set_property()", "type": "expression", "loc": [45, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.5844, 0.013, 2, 0.02, 0.5714, 772, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_property", "arg_names": [], "import_names": [], "rhs_call_name": "set_property", "annotation": ""}, "snippet": " self.cell.set_property('cell-background', 'cyan')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L46_C8", "label": "set_property()", "type": "expression", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.5974, 0.013, 2, 0.02, 0.6071, 772, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_property", "arg_names": [], "import_names": [], "rhs_call_name": "set_property", "annotation": ""}, "snippet": " self.cell1.set_property('cell-background', 'pink')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L50_C8", "label": "pack_start()", "type": "expression", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.6494, 0.013, 2, 0.02, 0.6429, 709, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "pack_start", "arg_names": [], "import_names": [], "rhs_call_name": "pack_start", "annotation": ""}, "snippet": " self.tvcolumn.pack_start(self.cellpb, False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L51_C8", "label": "pack_start()", "type": "expression", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.6623, 0.013, 2, 0.02, 0.6786, 709, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "pack_start", "arg_names": [], "import_names": [], "rhs_call_name": "pack_start", "annotation": ""}, "snippet": " self.tvcolumn.pack_start(self.cell, True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L52_C8", "label": "pack_start()", "type": "expression", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.6753, 0.013, 2, 0.02, 0.7143, 709, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "pack_start", "arg_names": [], "import_names": [], "rhs_call_name": "pack_start", "annotation": ""}, "snippet": " self.tvcolumn1.pack_start(self.cell1, True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L54_C8", "label": "set_attributes()", "type": "expression", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.7013, 0.013, 2, 0.02, 0.75, 233, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_attributes", "arg_names": [], "import_names": [], "rhs_call_name": "set_attributes", "annotation": ""}, "snippet": " self.tvcolumn.set_attributes(self.cellpb, stock_id=1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L55_C8", "label": "set_attributes()", "type": "expression", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.7143, 0.013, 2, 0.02, 0.7857, 233, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_attributes", "arg_names": [], "import_names": [], "rhs_call_name": "set_attributes", "annotation": ""}, "snippet": " self.tvcolumn.set_attributes(self.cell, text=0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L56_C8", "label": "set_attributes()", "type": "expression", "loc": [56, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.7338, 0.026, 2, 0.02, 0.8214, 233, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "set_attributes", "arg_names": [], "import_names": [], "rhs_call_name": "set_attributes", "annotation": ""}, "snippet": " self.tvcolumn1.set_attributes(self.cell1, text=2,\n cell_background_set=3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L60_C8", "label": "set_search_column()", "type": "expression", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.7792, 0.013, 2, 0.02, 0.8571, 303, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_search_column", "arg_names": [], "import_names": [], "rhs_call_name": "set_search_column", "annotation": ""}, "snippet": " self.treeview.set_search_column(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L63_C8", "label": "set_sort_column_id()", "type": "expression", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.8182, 0.013, 2, 0.02, 0.8929, 909, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_sort_column_id", "arg_names": [], "import_names": [], "rhs_call_name": "set_sort_column_id", "annotation": ""}, "snippet": " self.tvcolumn.set_sort_column_id(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L66_C8", "label": "set_reorderable()", "type": "expression", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.8571, 0.013, 2, 0.02, 0.9286, 292, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_reorderable", "arg_names": [], "import_names": [], "rhs_call_name": "set_reorderable", "annotation": ""}, "snippet": " self.treeview.set_reorderable(True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L68_C8", "label": "add()", "type": "expression", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.8831, 0.013, 2, 0.02, 0.9643, 241, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add", "arg_names": [], "import_names": [], "rhs_call_name": "add", "annotation": ""}, "snippet": " self.window.add(self.treeview)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L70_C8", "label": "show_all()", "type": "expression", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "vector": [8, 2, 0.9091, 0.013, 2, 0.02, 1.0, 891, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "show_all", "arg_names": [], "import_names": [], "rhs_call_name": "show_all", "annotation": ""}, "snippet": " self.window.show_all()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L72_C0", "label": "main", "type": "function", "loc": [72, 73], "level": 0, "parent": null, "vector": [2, 0, 0.9416, 0.026, 0, 0.66, 0.8, 624, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n gtk.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L73_C4", "label": "main()", "type": "expression", "loc": [73, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L72_C0", "vector": [8, 1, 0.9481, 0.013, 1, 0.26, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " gtk.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:If_L75_C0", "label": "if", "type": "if", "loc": [75, 77], "level": 0, "parent": null, "vector": [4, 0, 0.987, 0.039, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == \"__main__\":\n tvcexample = TreeViewColumnExample()\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L76_C4", "label": "tvcexample = TreeViewColumnExample()", "type": "assigned_variable", "loc": [76, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:If_L75_C0", "vector": [14, 1, 0.987, 0.013, 1, 0.44, 0.0, 18, 3, 0, 0, 0, 824, 10, 1], "semantic": {"name": "tvcexample", "arg_names": [], "import_names": [], "rhs_call_name": "TreeViewColumnExample", "annotation": ""}, "snippet": " tvcexample = TreeViewColumnExample()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L77_C4", "label": "main()", "type": "expression", "loc": [77, 77], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1446:If_L75_C0", "vector": [8, 1, 1.0, 0.013, 1, 0.44, 1.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1446:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Return_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L25_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L30_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L35_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L39_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L44_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L56_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:FunctionDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L73_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:If_L75_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Assign_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1446:If_L75_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1446:Expr_L77_C4"}]
# MySQL for Python import MySQLdb db = MySQLdb.connect ( host = 'localhost', user = 'root', passwd = '', db = 'db_1clic2learn' #bd = 'mysql' ) cursor = db.cursor() cursor.execute('SELECT * FROM db.PL_SQLINJECTION') result = cursor.fetchall() if result: for z in result: print z
ajibawa-2023/Python-Code-Large/train/row_1447
8
19
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1447:Import_L3_C0", "label": "MySQLdb import MySQLdb", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1579, 0.0526, 0, 0.66, 0.0, 838, 0, 1, 0, 0, 838, 0, 0], "semantic": {"name": "MySQLdb", "arg_names": [], "import_names": ["MySQLdb"], "rhs_call_name": "", "annotation": ""}, "snippet": "import MySQLdb"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1447:Assign_L5_C0", "label": "db = connect()", "type": "assigned_variable", "loc": [5, 11], "level": 0, "parent": null, "vector": [14, 0, 0.4211, 0.3684, 0, 0.66, 0.2, 761, 3, 4, 0, 0, 242, 10, 1], "semantic": {"name": "db", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": "db = MySQLdb.connect (\n host = 'localhost',\n user = 'root',\n passwd = '',\n db = 'db_1clic2learn'\n #bd = 'mysql'\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1447:Assign_L13_C0", "label": "cursor = cursor()", "type": "assigned_variable", "loc": [13, 13], "level": 0, "parent": null, "vector": [14, 0, 0.6842, 0.0526, 0, 0.66, 0.4, 231, 3, 0, 0, 0, 231, 10, 1], "semantic": {"name": "cursor", "arg_names": [], "import_names": [], "rhs_call_name": "cursor", "annotation": ""}, "snippet": "cursor = db.cursor()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1447:Expr_L14_C0", "label": "execute()", "type": "expression", "loc": [14, 14], "level": 0, "parent": null, "vector": [8, 0, 0.7368, 0.0526, 0, 0.66, 0.6, 569, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "execute", "arg_names": [], "import_names": [], "rhs_call_name": "execute", "annotation": ""}, "snippet": "cursor.execute('SELECT * FROM db.PL_SQLINJECTION')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1447:Assign_L15_C0", "label": "result = fetchall()", "type": "assigned_variable", "loc": [15, 15], "level": 0, "parent": null, "vector": [14, 0, 0.7895, 0.0526, 0, 0.66, 0.8, 51, 3, 0, 0, 0, 133, 10, 1], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "fetchall", "annotation": ""}, "snippet": "result = cursor.fetchall()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1447:If_L17_C0", "label": "if", "type": "if", "loc": [17, 19], "level": 0, "parent": null, "vector": [4, 0, 0.9474, 0.1579, 0, 0.66, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if result:\n for z in result:\n print(z)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1447:For_L18_C4", "label": "for z", "type": "for", "loc": [18, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1447:If_L17_C0", "vector": [6, 1, 0.9737, 0.1053, 1, 0.58, 0.0, 859, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "z", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for z in result:\n print(z)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1447:Expr_L19_C8", "label": "print()", "type": "expression", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1447:For_L18_C4", "vector": [8, 2, 1.0, 0.0526, 2, 0.82, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(z)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1447:If_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1447:For_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1447:For_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1447:Expr_L19_C8"}]
import sys import time, tkMessageBox import Controller try: import pygtk pygtk.require("2.0") except: pass try: import gtk import gtk.glade except: sys.exit(1) ######################################################################## class JanelaPrincipal: def __init__(self): # Cria uma nova janela (window) self.janela = gtk.Window(gtk.WINDOW_TOPLEVEL) self.janela.set_position(gtk.WIN_POS_CENTER) self.janela.set_title('Scanner 1Clic2Learn' ) self.janela.set_size_request(1050, 700) self.janela.set_resizable(False) self.janela.set_icon_name('1Clic2Learn') self.janela.set_icon_from_file('./1Clic2Learn-3-Icon.ico') # Adicionando os wigets a janela " self.fixed = gtk.Fixed() self.janela.add(self.fixed) self.fixed.put(gtk.Label('URL da Aplicacao: '), 50, 30) self.txtURL = gtk.Entry() self.txtURL.set_size_request(650, 30) self.fixed.put(self.txtURL, 200, 30) self.btExplorar = gtk.Button('Explorar' ) self.btExplorar.set_size_request(100, 30) self.btExplorar.connect("clicked", self.IniciarExploracao) self.fixed.put(self.btExplorar, 900, 30) self.fixed.put(gtk.Label('Vulnerabilidades: ' ), 50, 90) #criando combo box self.ListVuln = gtk.ListStore(int,str) self.ListVuln.append([1, "SQL Injection"]) self.ListVuln.append([2,"Cross-Site Scripiting"]) self.ComboVul = gtk.combo_box_new_with_model_and_entry (self.ListVuln) self.ComboVul.set_entry_text_column(1) self.ComboVul.connect("changed", self.on_name_combo_changed) self.ComboVul.set_size_request(300,30) self.ComboVul.set_active(0) self.fixed.put(self.ComboVul, 200, 90) #check box para criterio de parada self.checkParada = gtk.CheckButton('Parar ao encontrar a primeira falha') self.checkParada.set_size_request(300, 30) self.checkParada.set_active(1) self.fixed.put(self.checkParada, 600, 90) ##############################RESULTADO########################################################### # Criando a janela para receber o resultado dos ataques. self.scrollwinResult = gtk.ScrolledWindow() self.scrollwinResult.set_size_request(535,500) self.scrollwinResult.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.listResult = gtk.ListStore(str, str, str, str, str, 'gboolean') # Criando Treeview com uma lista self.treeview = gtk.TreeView(self.listResult) self.scrollwinResult.add(self.treeview) self.fixed.put(self.scrollwinResult,50,150) # Criando cabecalho das colunas self.tvcolumn = gtk.TreeViewColumn('Situacao') self.tvcolumn.set_alignment(xalign=0.5) self.tvcolumn1 = gtk.TreeViewColumn('Criticidade') self.tvcolumn1.set_alignment(xalign=0.5) self.tvcolumn2 = gtk.TreeViewColumn('URL') self.tvcolumn2.set_alignment(xalign=0.5) self.tvcolumn3 = gtk.TreeViewColumn('Componente Testado') self.tvcolumn3.set_alignment(xalign=0.5) # aadiciona colunas na treeview/tabela self.treeview.append_column(self.tvcolumn) self.treeview.append_column(self.tvcolumn1) self.treeview.append_column(self.tvcolumn2) self.treeview.append_column(self.tvcolumn3) # criando as cedulas self.cellFalha = gtk.CellRendererText() self.cellCrit = gtk.CellRendererText() self.cellCrit.set_alignment(xalign=0.5, yalign=0.5) self.cellComp = gtk.CellRendererText() self.cellTest = gtk.CellRendererText() # set cor de fundo self.cellFalha.set_property("foreground", "red") # adicionando cedulas nas colunas self.tvcolumn.pack_start(self.cellFalha, True) self.tvcolumn1.pack_start(self.cellCrit, True) self.tvcolumn2.pack_start(self.cellComp, True) self.tvcolumn3.pack_start(self.cellTest, True) self.tvcolumn.set_attributes(self.cellFalha, text=0) self.tvcolumn1.set_attributes(self.cellCrit, text=1) self.tvcolumn2.set_attributes(self.cellComp, text=2) self.tvcolumn3.set_attributes(self.cellTest, text=3) # setando opcao para pesquisa self.treeview.set_search_column(0) # Permitindo Ordenacao nas colunas self.tvcolumn.set_sort_column_id(0) self.tvcolumn1.set_sort_column_id(0) self.tvcolumn2.set_sort_column_id(0) self.tvcolumn3.set_sort_column_id(0) self.LabelInfo = gtk.Label() self.LabelInforServer = gtk.Label() self.LabelResultado = gtk.Label() self.LabelMitigacao = gtk.Label() self.LabelInforServer.set_markup("<b>Informacoes do Servidor:</b>") self.fixed.put(self.LabelInforServer, 600, 130) self.LabelResultado.set_markup("<b>Resultados:</b>") self.fixed.put(self.LabelResultado, 50, 130) self.LabelMitigacao.set_markup("<b>Mitigacao:</b>") self.fixed.put(self.LabelMitigacao, 600, 360) #CRIANDO CAMPO DE INFORMACOES DO SERVIDOR self.scrollwinServer = gtk.ScrolledWindow() self.scrollwinServer.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.InfoServer = gtk.TextBuffer() self.TextViewServer = gtk.TextView(self.InfoServer) self.TextViewServer.set_editable(False) self.TextViewServer.set_cursor_visible(False) self.TextViewServer.set_wrap_mode(gtk.WRAP_WORD) self.TextViewServer.set_size_request(400,170) self.scrollwinServer.add(self.TextViewServer) self.fixed.put(self.scrollwinServer, 600, 150) #CRIANDO CAMPO DE INFORMACOES DE MITIGACAO self.scrollwinMit = gtk.ScrolledWindow() self.scrollwinMit.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.TextBufferMitigacao = gtk.TextBuffer() self.TextViewMit = gtk.TextView(self.TextBufferMitigacao) self.TextViewMit.set_editable(False) self.TextViewMit.set_cursor_visible(False) self.TextViewMit.set_wrap_mode(gtk.WRAP_WORD) self.TextViewMit.set_size_request(400,270) self.scrollwinMit.add(self.TextViewMit) self.fixed.put(self.scrollwinMit,600,380) #conectando a janela aos destrutores para finalizar o programa self.janela.connect('delete_event', self.delete_event) self.janela.connect('destroy', self.destroy) self.janela.show_all() def ShowError(self, title, mensagem): dialog = gtk.MessageDialog(parent=self.janela,flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_OK, message_format=mensagem) dialog.set_title(title) dialog.set_position(gtk.WIN_POS_CENTER_ALWAYS) # Exibe a caixa dialog.run() dialog.destroy() def IniciarExploracao(self, widget, data=None): Inicial= time.time() print "Start : %s" %Inicial #LIMPANDO AS VARIAVEIS DA JANELA self.TextBufferMitigacao.set_text("") self.listResult.clear() #self.progressbar.destroy() self.InfoServer.set_text("") self.selc = self.on_name_combo_changed(self.ComboVul) #VERIFICANDO SE EXISTE URL if self.txtURL.get_text() == "": # EXIBINDO UMA POPUP DE ALERTA self.ShowError('ALERTA', 'ATENCAO: Favor preencher o campo URL da Aplicacao!') #VERIFICANDO SE FOI SELECIONADA ALGUMA OPCAO elif (self.selc > 2) or (self.selc == 999): self.InfoServer.set_text("") self.listResult.clear() else: # Utilizando a classe CONTROLLER self.control = Controller.Controller(self.txtURL.get_text()) self.control.select_Plugin(self.selc,self.checkParada.state) #envia o plugin e o criterio de parada(1 - para no primeiro) self.teste_url = [] self.teste_url = self.control.check_URL() if len(self.teste_url) == 2: # se a lista tiver 2 colunas entao ocorreu um erro self.ShowError(str(self.teste_url[0]), str(self.teste_url[1])) else: #INSERIR AS INFORMACOES DO SERVIDOR self.a = [] self.a.append(self.control.get_Server_Info()) self.b = str() for n in self.a: self.b = (str(n)) self.InfoServer.set_text(self.b) # ADICIONA O RESULTADO DO ATAQUE NA LISTA self.resultado = [] self.resultado = self.control.send_Exploiter() try: if len(self.resultado[0]) == 2 and self.resultado[0] == None: self.ShowError(str(self.resultado[0]), str(self.resultado[1])) except: pass else: for res in self.resultado: self.listResult.append(res) #AQUI deve passar a lista da Controller self.treeview.set_model(self.listResult) TempoFinal = round (time.time() - Inicial, 2) print TempoFinal self.ShowError("SUCESSO!", "Exploração realizado com sucesso! \nTempo de Execução: " + str(TempoFinal) + ' segundos') #Exibindo o texto de mitigacao quando selecionar o resultado! self.selecao = self.treeview.get_selection() self.selecao.connect('changed', self.on_select_change) self.janela.show_all() # Retornando False (falso) nesta funcao o GTK ira emitir o sinal de "destroy". Se voce retornar True # (verdadeiro),significa que voce nao quer que a janela seja fechada def delete_event(self, widget, event, data=None): print "Programa encerrado!" return False #FUNCAO CRIADA PARA VERIFICAR O ITEM SELECIONADO NA TREEVIEW SELECIONADA def on_select_change(self, widget): m, itr = widget.get_selected() if itr: #Exibe o item da posicao 4 - mitigacao se for vulnerável if m[itr][5]: self.TextBufferMitigacao.set_text(m[itr][4]) self.scrollwinMit.show_all() else: self.TextBufferMitigacao.set_text("") self.scrollwinMit.show_all() def on_name_combo_changed(self, combo): tree_iter = combo.get_active_iter() model = combo.get_model() if tree_iter == None: self.ShowError('ATENCAO','Nenhuma vulnerabilidade foi selecionada!') return 999 else: row_id, name = model[tree_iter] return row_id # Outro retorno def destroy(self, widget, data=None): gtk.main_quit() def main(self): gtk.main() # Se o programa rodar diretamente ou for passado como um argumento para o interpretador de python # ele criara a JanelaPrincipal e o mostrara. if __name__ == "__main__": Janela = JanelaPrincipal() Janela.main()
ajibawa-2023/Python-Code-Large/train/row_1448
184
266
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0038, 0.0038, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Import_L2_C0", "label": "time import time, tkMessageBox", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0075, 0.0038, 0, 0.66, 0.1667, 654, 0, 2, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time", "tkMessageBox"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time, tkMessageBox"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Import_L3_C0", "label": "Controller import Controller", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0113, 0.0038, 0, 0.66, 0.3333, 93, 0, 1, 0, 0, 93, 0, 0], "semantic": {"name": "Controller", "arg_names": [], "import_names": ["Controller"], "rhs_call_name": "", "annotation": ""}, "snippet": "import Controller"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L5_C0", "label": "try", "type": "try", "loc": [5, 9], "level": 0, "parent": null, "vector": [7, 0, 0.0263, 0.0188, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n import pygtk\n pygtk.require(\"2.0\")\nexcept:\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Import_L6_C8", "label": "pygtk import pygtk", "type": "import", "loc": [6, 6], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L5_C0", "vector": [1, 1, 0.0226, 0.0038, 1, 0.36, 0.0, 106, 0, 1, 0, 0, 106, 0, 0], "semantic": {"name": "pygtk", "arg_names": [], "import_names": ["pygtk"], "rhs_call_name": "", "annotation": ""}, "snippet": " import pygtk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L7_C8", "label": "require()", "type": "expression", "loc": [7, 7], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L5_C0", "vector": [8, 1, 0.0263, 0.0038, 1, 0.36, 1.0, 66, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "require", "arg_names": [], "import_names": [], "rhs_call_name": "require", "annotation": ""}, "snippet": " pygtk.require(\"2.0\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L10_C0", "label": "try", "type": "try", "loc": [10, 14], "level": 0, "parent": null, "vector": [7, 0, 0.0451, 0.0188, 0, 0.66, 0.6667, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n import gtk\n import gtk.glade\nexcept:\n sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Import_L11_C8", "label": "gtk import gtk", "type": "import", "loc": [11, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L10_C0", "vector": [1, 1, 0.0414, 0.0038, 1, 0.3, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name": "", "annotation": ""}, "snippet": " import gtk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Import_L12_C8", "label": "gtk.glade import gtk.glade", "type": "import", "loc": [12, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L10_C0", "vector": [1, 1, 0.0451, 0.0038, 1, 0.3, 1.0, 910, 0, 1, 0, 0, 910, 0, 0], "semantic": {"name": "gtk.glade", "arg_names": [], "import_names": ["gtk.glade"], "rhs_call_name": "", "annotation": ""}, "snippet": " import gtk.glade"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L14_C8", "label": "exit()", "type": "expression", "loc": [14, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L10_C0", "vector": [8, 1, 0.0526, 0.0038, 1, 0.3, 0.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "label": "JanelaPrincipal", "type": "class", "loc": [17, 260], "level": 0, "parent": null, "vector": [3, 0, 0.5207, 0.9173, 0, 0.66, 0.8333, 330, 0, 8, 0, 0, 0, 0, 99], "semantic": {"name": "JanelaPrincipal", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class JanelaPrincipal:\n \n def __init__(self): \n # Cria uma nova janela (window)\n self.janela = gtk.Window(gtk.WINDOW_TOPLEVEL)\n self.janela.set_position(gtk.WIN_POS_CENTER)\n self.janela.set_title('Scanner 1Clic2Learn' )\n self.janela.set_size_request(1050, 700)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "label": "__init__", "type": "function", "loc": [19, 150], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "vector": [2, 1, 0.3177, 0.4962, 1, 0.85, 0.0, 555, 0, 1, 0, 0, 0, 0, 99], "semantic": {"name": "__init__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self): \n # Cria uma nova janela (window)\n self.janela = gtk.Window(gtk.WINDOW_TOPLEVEL)\n self.janela.set_position(gtk.WIN_POS_CENTER)\n self.janela.set_title('Scanner 1Clic2Learn' )\n self.janela.set_size_request(1050, 700)\n self.janela.set_resizable(False)\n self.janela.set_icon_name('1Clic2Learn')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L21_C16", "label": "self.janela = Window()", "type": "assigned_variable", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.0789, 0.0038, 2, 0.27, 0.0, 958, 3, 1, 0, 0, 698, 10, 1], "semantic": {"name": "self.janela", "arg_names": [], "import_names": [], "rhs_call_name": "Window", "annotation": ""}, "snippet": " self.janela = gtk.Window(gtk.WINDOW_TOPLEVEL)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L22_C16", "label": "set_position()", "type": "expression", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.0827, 0.0038, 2, 0.27, 0.0099, 370, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_position", "arg_names": [], "import_names": [], "rhs_call_name": "set_position", "annotation": ""}, "snippet": " self.janela.set_position(gtk.WIN_POS_CENTER)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L23_C16", "label": "set_title()", "type": "expression", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.0865, 0.0038, 2, 0.27, 0.0198, 145, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_title", "arg_names": [], "import_names": [], "rhs_call_name": "set_title", "annotation": ""}, "snippet": " self.janela.set_title('Scanner 1Clic2Learn' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L24_C16", "label": "set_size_request()", "type": "expression", "loc": [24, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.0902, 0.0038, 2, 0.27, 0.0297, 91, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_size_request", "arg_names": [], "import_names": [], "rhs_call_name": "set_size_request", "annotation": ""}, "snippet": " self.janela.set_size_request(1050, 700)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L25_C16", "label": "set_resizable()", "type": "expression", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.094, 0.0038, 2, 0.27, 0.0396, 911, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_resizable", "arg_names": [], "import_names": [], "rhs_call_name": "set_resizable", "annotation": ""}, "snippet": " self.janela.set_resizable(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L26_C16", "label": "set_icon_name()", "type": "expression", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.0977, 0.0038, 2, 0.27, 0.0495, 758, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_icon_name", "arg_names": [], "import_names": [], "rhs_call_name": "set_icon_name", "annotation": ""}, "snippet": " self.janela.set_icon_name('1Clic2Learn')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L27_C16", "label": "set_icon_from_file()", "type": "expression", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.1015, 0.0038, 2, 0.27, 0.0594, 504, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_icon_from_file", "arg_names": [], "import_names": [], "rhs_call_name": "set_icon_from_file", "annotation": ""}, "snippet": " self.janela.set_icon_from_file('./1Clic2Learn-3-Icon.ico')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L30_C16", "label": "self.fixed = Fixed()", "type": "assigned_variable", "loc": [30, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.1128, 0.0038, 2, 0.27, 0.0693, 326, 3, 0, 0, 0, 760, 10, 1], "semantic": {"name": "self.fixed", "arg_names": [], "import_names": [], "rhs_call_name": "Fixed", "annotation": ""}, "snippet": " self.fixed = gtk.Fixed()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L31_C16", "label": "add()", "type": "expression", "loc": [31, 31], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.1165, 0.0038, 2, 0.27, 0.0792, 241, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add", "arg_names": [], "import_names": [], "rhs_call_name": "add", "annotation": ""}, "snippet": " self.janela.add(self.fixed)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L32_C16", "label": "put()", "type": "expression", "loc": [32, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.1203, 0.0038, 2, 0.27, 0.0891, 636, 3, 3, 0, 0, 0, 0, 2], "semantic": {"name": "put", "arg_names": [], "import_names": [], "rhs_call_name": "put", "annotation": ""}, "snippet": " self.fixed.put(gtk.Label('URL da Aplicacao: '), 50, 30)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L33_C16", "label": "self.txtURL = Entry()", "type": "assigned_variable", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.1241, 0.0038, 2, 0.27, 0.099, 111, 3, 0, 0, 0, 197, 10, 1], "semantic": {"name": "self.txtURL", "arg_names": [], "import_names": [], "rhs_call_name": "Entry", "annotation": ""}, "snippet": " self.txtURL = gtk.Entry()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L34_C16", "label": "set_size_request()", "type": "expression", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.1278, 0.0038, 2, 0.27, 0.1089, 91, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_size_request", "arg_names": [], "import_names": [], "rhs_call_name": "set_size_request", "annotation": ""}, "snippet": " self.txtURL.set_size_request(650, 30)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L35_C16", "label": "put()", "type": "expression", "loc": [35, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.1316, 0.0038, 2, 0.27, 0.1188, 636, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "put", "arg_names": [], "import_names": [], "rhs_call_name": "put", "annotation": ""}, "snippet": " self.fixed.put(self.txtURL, 200, 30)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L36_C16", "label": "self.btExplorar = Button()", "type": "assigned_variable", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.1353, 0.0038, 2, 0.27, 0.1287, 505, 3, 1, 0, 0, 608, 10, 1], "semantic": {"name": "self.btExplorar", "arg_names": [], "import_names": [], "rhs_call_name": "Button", "annotation": ""}, "snippet": " self.btExplorar = gtk.Button('Explorar' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L37_C16", "label": "set_size_request()", "type": "expression", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.1391, 0.0038, 2, 0.27, 0.1386, 91, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_size_request", "arg_names": [], "import_names": [], "rhs_call_name": "set_size_request", "annotation": ""}, "snippet": " self.btExplorar.set_size_request(100, 30)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L38_C16", "label": "connect()", "type": "expression", "loc": [38, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.1429, 0.0038, 2, 0.27, 0.1485, 242, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "connect", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " self.btExplorar.connect(\"clicked\", self.IniciarExploracao)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L39_C16", "label": "put()", "type": "expression", "loc": [39, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.1466, 0.0038, 2, 0.27, 0.1584, 636, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "put", "arg_names": [], "import_names": [], "rhs_call_name": "put", "annotation": ""}, "snippet": " self.fixed.put(self.btExplorar, 900, 30)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L40_C16", "label": "put()", "type": "expression", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.1504, 0.0038, 2, 0.27, 0.1683, 636, 3, 3, 0, 0, 0, 0, 2], "semantic": {"name": "put", "arg_names": [], "import_names": [], "rhs_call_name": "put", "annotation": ""}, "snippet": " self.fixed.put(gtk.Label('Vulnerabilidades: ' ), 50, 90)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L43_C16", "label": "self.ListVuln = ListStore()", "type": "assigned_variable", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.1617, 0.0038, 2, 0.27, 0.1782, 5, 3, 2, 0, 0, 344, 10, 1], "semantic": {"name": "self.ListVuln", "arg_names": [], "import_names": [], "rhs_call_name": "ListStore", "annotation": ""}, "snippet": " self.ListVuln = gtk.ListStore(int,str)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L44_C16", "label": "append()", "type": "expression", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.1654, 0.0038, 2, 0.27, 0.1881, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.ListVuln.append([1, \"SQL Injection\"])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L45_C16", "label": "append()", "type": "expression", "loc": [45, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.1692, 0.0038, 2, 0.27, 0.198, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.ListVuln.append([2,\"Cross-Site Scripiting\"])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L47_C16", "label": "self.ComboVul = combo_box_new_with_model_and_entry()", "type": "assigned_variable", "loc": [47, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.1767, 0.0038, 2, 0.27, 0.2079, 110, 3, 1, 0, 0, 719, 10, 1], "semantic": {"name": "self.ComboVul", "arg_names": [], "import_names": [], "rhs_call_name": "combo_box_new_with_model_and_entry", "annotation": ""}, "snippet": " self.ComboVul = gtk.combo_box_new_with_model_and_entry (self.ListVuln)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L48_C16", "label": "set_entry_text_column()", "type": "expression", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.1805, 0.0038, 2, 0.27, 0.2178, 729, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_entry_text_column", "arg_names": [], "import_names": [], "rhs_call_name": "set_entry_text_column", "annotation": ""}, "snippet": " self.ComboVul.set_entry_text_column(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L49_C16", "label": "connect()", "type": "expression", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.1842, 0.0038, 2, 0.27, 0.2277, 242, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "connect", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " self.ComboVul.connect(\"changed\", self.on_name_combo_changed)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L50_C16", "label": "set_size_request()", "type": "expression", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.188, 0.0038, 2, 0.27, 0.2376, 91, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_size_request", "arg_names": [], "import_names": [], "rhs_call_name": "set_size_request", "annotation": ""}, "snippet": " self.ComboVul.set_size_request(300,30)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L51_C16", "label": "set_active()", "type": "expression", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.1917, 0.0038, 2, 0.27, 0.2475, 463, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_active", "arg_names": [], "import_names": [], "rhs_call_name": "set_active", "annotation": ""}, "snippet": " self.ComboVul.set_active(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L52_C16", "label": "put()", "type": "expression", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.1955, 0.0038, 2, 0.27, 0.2574, 636, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "put", "arg_names": [], "import_names": [], "rhs_call_name": "put", "annotation": ""}, "snippet": " self.fixed.put(self.ComboVul, 200, 90)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L55_C16", "label": "self.checkParada = CheckButton()", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.2068, 0.0038, 2, 0.27, 0.2673, 311, 3, 1, 0, 0, 803, 10, 1], "semantic": {"name": "self.checkParada", "arg_names": [], "import_names": [], "rhs_call_name": "CheckButton", "annotation": ""}, "snippet": " self.checkParada = gtk.CheckButton('Parar ao encontrar a primeira falha')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L56_C16", "label": "set_size_request()", "type": "expression", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.2105, 0.0038, 2, 0.27, 0.2772, 91, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_size_request", "arg_names": [], "import_names": [], "rhs_call_name": "set_size_request", "annotation": ""}, "snippet": " self.checkParada.set_size_request(300, 30)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L57_C16", "label": "set_active()", "type": "expression", "loc": [57, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.2143, 0.0038, 2, 0.27, 0.2871, 463, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_active", "arg_names": [], "import_names": [], "rhs_call_name": "set_active", "annotation": ""}, "snippet": " self.checkParada.set_active(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L58_C16", "label": "put()", "type": "expression", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.218, 0.0038, 2, 0.27, 0.297, 636, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "put", "arg_names": [], "import_names": [], "rhs_call_name": "put", "annotation": ""}, "snippet": " self.fixed.put(self.checkParada, 600, 90) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L61_C16", "label": "self.scrollwinResult = ScrolledWindow()", "type": "assigned_variable", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.2293, 0.0038, 2, 0.27, 0.3069, 760, 3, 0, 0, 0, 510, 10, 1], "semantic": {"name": "self.scrollwinResult", "arg_names": [], "import_names": [], "rhs_call_name": "ScrolledWindow", "annotation": ""}, "snippet": " self.scrollwinResult = gtk.ScrolledWindow()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L62_C16", "label": "set_size_request()", "type": "expression", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.2331, 0.0038, 2, 0.27, 0.3168, 91, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_size_request", "arg_names": [], "import_names": [], "rhs_call_name": "set_size_request", "annotation": ""}, "snippet": " self.scrollwinResult.set_size_request(535,500)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L63_C16", "label": "set_policy()", "type": "expression", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.2368, 0.0038, 2, 0.27, 0.3267, 431, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_policy", "arg_names": [], "import_names": [], "rhs_call_name": "set_policy", "annotation": ""}, "snippet": " self.scrollwinResult.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L64_C16", "label": "self.listResult = ListStore()", "type": "assigned_variable", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.2406, 0.0038, 2, 0.27, 0.3366, 946, 3, 6, 0, 0, 344, 10, 1], "semantic": {"name": "self.listResult", "arg_names": [], "import_names": [], "rhs_call_name": "ListStore", "annotation": ""}, "snippet": " self.listResult = gtk.ListStore(str, str, str, str, str, 'gboolean')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L66_C16", "label": "self.treeview = TreeView()", "type": "assigned_variable", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.2481, 0.0038, 2, 0.27, 0.3465, 369, 3, 1, 0, 0, 24, 10, 1], "semantic": {"name": "self.treeview", "arg_names": [], "import_names": [], "rhs_call_name": "TreeView", "annotation": ""}, "snippet": " self.treeview = gtk.TreeView(self.listResult)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L67_C16", "label": "add()", "type": "expression", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.2519, 0.0038, 2, 0.27, 0.3564, 241, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add", "arg_names": [], "import_names": [], "rhs_call_name": "add", "annotation": ""}, "snippet": " self.scrollwinResult.add(self.treeview)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L68_C16", "label": "put()", "type": "expression", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.2556, 0.0038, 2, 0.27, 0.3663, 636, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "put", "arg_names": [], "import_names": [], "rhs_call_name": "put", "annotation": ""}, "snippet": " self.fixed.put(self.scrollwinResult,50,150)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L71_C16", "label": "self.tvcolumn = TreeViewColumn()", "type": "assigned_variable", "loc": [71, 71], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.2669, 0.0038, 2, 0.27, 0.3762, 6, 3, 1, 0, 0, 619, 10, 1], "semantic": {"name": "self.tvcolumn", "arg_names": [], "import_names": [], "rhs_call_name": "TreeViewColumn", "annotation": ""}, "snippet": " self.tvcolumn = gtk.TreeViewColumn('Situacao')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L72_C16", "label": "set_alignment()", "type": "expression", "loc": [72, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.2707, 0.0038, 2, 0.27, 0.3861, 924, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_alignment", "arg_names": [], "import_names": [], "rhs_call_name": "set_alignment", "annotation": ""}, "snippet": " self.tvcolumn.set_alignment(xalign=0.5)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L73_C16", "label": "self.tvcolumn1 = TreeViewColumn()", "type": "assigned_variable", "loc": [73, 73], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.2744, 0.0038, 2, 0.27, 0.396, 410, 3, 1, 0, 0, 619, 10, 1], "semantic": {"name": "self.tvcolumn1", "arg_names": [], "import_names": [], "rhs_call_name": "TreeViewColumn", "annotation": ""}, "snippet": " self.tvcolumn1 = gtk.TreeViewColumn('Criticidade')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L74_C16", "label": "set_alignment()", "type": "expression", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.2782, 0.0038, 2, 0.27, 0.4059, 924, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_alignment", "arg_names": [], "import_names": [], "rhs_call_name": "set_alignment", "annotation": ""}, "snippet": " self.tvcolumn1.set_alignment(xalign=0.5)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L75_C16", "label": "self.tvcolumn2 = TreeViewColumn()", "type": "assigned_variable", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.282, 0.0038, 2, 0.27, 0.4158, 458, 3, 1, 0, 0, 619, 10, 1], "semantic": {"name": "self.tvcolumn2", "arg_names": [], "import_names": [], "rhs_call_name": "TreeViewColumn", "annotation": ""}, "snippet": " self.tvcolumn2 = gtk.TreeViewColumn('URL')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L76_C16", "label": "set_alignment()", "type": "expression", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.2857, 0.0038, 2, 0.27, 0.4257, 924, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_alignment", "arg_names": [], "import_names": [], "rhs_call_name": "set_alignment", "annotation": ""}, "snippet": " self.tvcolumn2.set_alignment(xalign=0.5)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L77_C16", "label": "self.tvcolumn3 = TreeViewColumn()", "type": "assigned_variable", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.2895, 0.0038, 2, 0.27, 0.4356, 11, 3, 1, 0, 0, 619, 10, 1], "semantic": {"name": "self.tvcolumn3", "arg_names": [], "import_names": [], "rhs_call_name": "TreeViewColumn", "annotation": ""}, "snippet": " self.tvcolumn3 = gtk.TreeViewColumn('Componente Testado') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L78_C16", "label": "set_alignment()", "type": "expression", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.2932, 0.0038, 2, 0.27, 0.4455, 924, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_alignment", "arg_names": [], "import_names": [], "rhs_call_name": "set_alignment", "annotation": ""}, "snippet": " self.tvcolumn3.set_alignment(xalign=0.5)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L81_C16", "label": "append_column()", "type": "expression", "loc": [81, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.3045, 0.0038, 2, 0.27, 0.4554, 468, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append_column", "arg_names": [], "import_names": [], "rhs_call_name": "append_column", "annotation": ""}, "snippet": " self.treeview.append_column(self.tvcolumn)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L82_C16", "label": "append_column()", "type": "expression", "loc": [82, 82], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.3083, 0.0038, 2, 0.27, 0.4653, 468, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append_column", "arg_names": [], "import_names": [], "rhs_call_name": "append_column", "annotation": ""}, "snippet": " self.treeview.append_column(self.tvcolumn1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L83_C16", "label": "append_column()", "type": "expression", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.312, 0.0038, 2, 0.27, 0.4752, 468, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append_column", "arg_names": [], "import_names": [], "rhs_call_name": "append_column", "annotation": ""}, "snippet": " self.treeview.append_column(self.tvcolumn2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L84_C16", "label": "append_column()", "type": "expression", "loc": [84, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.3158, 0.0038, 2, 0.27, 0.4851, 468, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append_column", "arg_names": [], "import_names": [], "rhs_call_name": "append_column", "annotation": ""}, "snippet": " self.treeview.append_column(self.tvcolumn3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L87_C16", "label": "self.cellFalha = CellRendererText()", "type": "assigned_variable", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.3271, 0.0038, 2, 0.27, 0.495, 322, 3, 0, 0, 0, 291, 10, 1], "semantic": {"name": "self.cellFalha", "arg_names": [], "import_names": [], "rhs_call_name": "CellRendererText", "annotation": ""}, "snippet": " self.cellFalha = gtk.CellRendererText()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L88_C16", "label": "self.cellCrit = CellRendererText()", "type": "assigned_variable", "loc": [88, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.3308, 0.0038, 2, 0.27, 0.505, 965, 3, 0, 0, 0, 291, 10, 1], "semantic": {"name": "self.cellCrit", "arg_names": [], "import_names": [], "rhs_call_name": "CellRendererText", "annotation": ""}, "snippet": " self.cellCrit = gtk.CellRendererText()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L89_C16", "label": "set_alignment()", "type": "expression", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.3346, 0.0038, 2, 0.27, 0.5149, 924, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_alignment", "arg_names": [], "import_names": [], "rhs_call_name": "set_alignment", "annotation": ""}, "snippet": " self.cellCrit.set_alignment(xalign=0.5, yalign=0.5)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L90_C16", "label": "self.cellComp = CellRendererText()", "type": "assigned_variable", "loc": [90, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.3383, 0.0038, 2, 0.27, 0.5248, 157, 3, 0, 0, 0, 291, 10, 1], "semantic": {"name": "self.cellComp", "arg_names": [], "import_names": [], "rhs_call_name": "CellRendererText", "annotation": ""}, "snippet": " self.cellComp = gtk.CellRendererText()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L91_C16", "label": "self.cellTest = CellRendererText()", "type": "assigned_variable", "loc": [91, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.3421, 0.0038, 2, 0.27, 0.5347, 524, 3, 0, 0, 0, 291, 10, 1], "semantic": {"name": "self.cellTest", "arg_names": [], "import_names": [], "rhs_call_name": "CellRendererText", "annotation": ""}, "snippet": " self.cellTest = gtk.CellRendererText()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L93_C16", "label": "set_property()", "type": "expression", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.3496, 0.0038, 2, 0.27, 0.5446, 772, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_property", "arg_names": [], "import_names": [], "rhs_call_name": "set_property", "annotation": ""}, "snippet": " self.cellFalha.set_property(\"foreground\", \"red\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L96_C16", "label": "pack_start()", "type": "expression", "loc": [96, 96], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.3609, 0.0038, 2, 0.27, 0.5545, 709, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "pack_start", "arg_names": [], "import_names": [], "rhs_call_name": "pack_start", "annotation": ""}, "snippet": " self.tvcolumn.pack_start(self.cellFalha, True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L97_C16", "label": "pack_start()", "type": "expression", "loc": [97, 97], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.3647, 0.0038, 2, 0.27, 0.5644, 709, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "pack_start", "arg_names": [], "import_names": [], "rhs_call_name": "pack_start", "annotation": ""}, "snippet": " self.tvcolumn1.pack_start(self.cellCrit, True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L98_C16", "label": "pack_start()", "type": "expression", "loc": [98, 98], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.3684, 0.0038, 2, 0.27, 0.5743, 709, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "pack_start", "arg_names": [], "import_names": [], "rhs_call_name": "pack_start", "annotation": ""}, "snippet": " self.tvcolumn2.pack_start(self.cellComp, True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L99_C16", "label": "pack_start()", "type": "expression", "loc": [99, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.3722, 0.0038, 2, 0.27, 0.5842, 709, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "pack_start", "arg_names": [], "import_names": [], "rhs_call_name": "pack_start", "annotation": ""}, "snippet": " self.tvcolumn3.pack_start(self.cellTest, True) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L100_C16", "label": "set_attributes()", "type": "expression", "loc": [100, 100], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.3759, 0.0038, 2, 0.27, 0.5941, 233, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_attributes", "arg_names": [], "import_names": [], "rhs_call_name": "set_attributes", "annotation": ""}, "snippet": " self.tvcolumn.set_attributes(self.cellFalha, text=0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L101_C16", "label": "set_attributes()", "type": "expression", "loc": [101, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.3797, 0.0038, 2, 0.27, 0.604, 233, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_attributes", "arg_names": [], "import_names": [], "rhs_call_name": "set_attributes", "annotation": ""}, "snippet": " self.tvcolumn1.set_attributes(self.cellCrit, text=1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L102_C16", "label": "set_attributes()", "type": "expression", "loc": [102, 102], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.3835, 0.0038, 2, 0.27, 0.6139, 233, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_attributes", "arg_names": [], "import_names": [], "rhs_call_name": "set_attributes", "annotation": ""}, "snippet": " self.tvcolumn2.set_attributes(self.cellComp, text=2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L103_C16", "label": "set_attributes()", "type": "expression", "loc": [103, 103], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.3872, 0.0038, 2, 0.27, 0.6238, 233, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_attributes", "arg_names": [], "import_names": [], "rhs_call_name": "set_attributes", "annotation": ""}, "snippet": " self.tvcolumn3.set_attributes(self.cellTest, text=3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L106_C16", "label": "set_search_column()", "type": "expression", "loc": [106, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.3985, 0.0038, 2, 0.27, 0.6337, 303, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_search_column", "arg_names": [], "import_names": [], "rhs_call_name": "set_search_column", "annotation": ""}, "snippet": " self.treeview.set_search_column(0) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L108_C16", "label": "set_sort_column_id()", "type": "expression", "loc": [108, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.406, 0.0038, 2, 0.27, 0.6436, 909, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_sort_column_id", "arg_names": [], "import_names": [], "rhs_call_name": "set_sort_column_id", "annotation": ""}, "snippet": " self.tvcolumn.set_sort_column_id(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L109_C16", "label": "set_sort_column_id()", "type": "expression", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.4098, 0.0038, 2, 0.27, 0.6535, 909, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_sort_column_id", "arg_names": [], "import_names": [], "rhs_call_name": "set_sort_column_id", "annotation": ""}, "snippet": " self.tvcolumn1.set_sort_column_id(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L110_C16", "label": "set_sort_column_id()", "type": "expression", "loc": [110, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.4135, 0.0038, 2, 0.27, 0.6634, 909, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_sort_column_id", "arg_names": [], "import_names": [], "rhs_call_name": "set_sort_column_id", "annotation": ""}, "snippet": " self.tvcolumn2.set_sort_column_id(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L111_C16", "label": "set_sort_column_id()", "type": "expression", "loc": [111, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.4173, 0.0038, 2, 0.27, 0.6733, 909, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_sort_column_id", "arg_names": [], "import_names": [], "rhs_call_name": "set_sort_column_id", "annotation": ""}, "snippet": " self.tvcolumn3.set_sort_column_id(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L112_C16", "label": "self.LabelInfo = Label()", "type": "assigned_variable", "loc": [112, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.4211, 0.0038, 2, 0.27, 0.6832, 751, 3, 0, 0, 0, 413, 10, 1], "semantic": {"name": "self.LabelInfo", "arg_names": [], "import_names": [], "rhs_call_name": "Label", "annotation": ""}, "snippet": " self.LabelInfo = gtk.Label()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L113_C16", "label": "self.LabelInforServer = Label()", "type": "assigned_variable", "loc": [113, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.4248, 0.0038, 2, 0.27, 0.6931, 60, 3, 0, 0, 0, 413, 10, 1], "semantic": {"name": "self.LabelInforServer", "arg_names": [], "import_names": [], "rhs_call_name": "Label", "annotation": ""}, "snippet": " self.LabelInforServer = gtk.Label()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L114_C16", "label": "self.LabelResultado = Label()", "type": "assigned_variable", "loc": [114, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.4286, 0.0038, 2, 0.27, 0.703, 173, 3, 0, 0, 0, 413, 10, 1], "semantic": {"name": "self.LabelResultado", "arg_names": [], "import_names": [], "rhs_call_name": "Label", "annotation": ""}, "snippet": " self.LabelResultado = gtk.Label()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L115_C16", "label": "self.LabelMitigacao = Label()", "type": "assigned_variable", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.4323, 0.0038, 2, 0.27, 0.7129, 678, 3, 0, 0, 0, 413, 10, 1], "semantic": {"name": "self.LabelMitigacao", "arg_names": [], "import_names": [], "rhs_call_name": "Label", "annotation": ""}, "snippet": " self.LabelMitigacao = gtk.Label()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L116_C16", "label": "set_markup()", "type": "expression", "loc": [116, 116], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.4361, 0.0038, 2, 0.27, 0.7228, 196, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_markup", "arg_names": [], "import_names": [], "rhs_call_name": "set_markup", "annotation": ""}, "snippet": " self.LabelInforServer.set_markup(\"<b>Informacoes do Servidor:</b>\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L117_C16", "label": "put()", "type": "expression", "loc": [117, 117], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.4398, 0.0038, 2, 0.27, 0.7327, 636, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "put", "arg_names": [], "import_names": [], "rhs_call_name": "put", "annotation": ""}, "snippet": " self.fixed.put(self.LabelInforServer, 600, 130) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L118_C16", "label": "set_markup()", "type": "expression", "loc": [118, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.4436, 0.0038, 2, 0.27, 0.7426, 196, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_markup", "arg_names": [], "import_names": [], "rhs_call_name": "set_markup", "annotation": ""}, "snippet": " self.LabelResultado.set_markup(\"<b>Resultados:</b>\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L119_C16", "label": "put()", "type": "expression", "loc": [119, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.4474, 0.0038, 2, 0.27, 0.7525, 636, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "put", "arg_names": [], "import_names": [], "rhs_call_name": "put", "annotation": ""}, "snippet": " self.fixed.put(self.LabelResultado, 50, 130)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L120_C16", "label": "set_markup()", "type": "expression", "loc": [120, 120], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.4511, 0.0038, 2, 0.27, 0.7624, 196, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_markup", "arg_names": [], "import_names": [], "rhs_call_name": "set_markup", "annotation": ""}, "snippet": " self.LabelMitigacao.set_markup(\"<b>Mitigacao:</b>\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L121_C16", "label": "put()", "type": "expression", "loc": [121, 121], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.4549, 0.0038, 2, 0.27, 0.7723, 636, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "put", "arg_names": [], "import_names": [], "rhs_call_name": "put", "annotation": ""}, "snippet": " self.fixed.put(self.LabelMitigacao, 600, 360) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L124_C16", "label": "self.scrollwinServer = ScrolledWindow()", "type": "assigned_variable", "loc": [124, 124], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.4662, 0.0038, 2, 0.27, 0.7822, 105, 3, 0, 0, 0, 510, 10, 1], "semantic": {"name": "self.scrollwinServer", "arg_names": [], "import_names": [], "rhs_call_name": "ScrolledWindow", "annotation": ""}, "snippet": " self.scrollwinServer = gtk.ScrolledWindow()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L125_C16", "label": "set_policy()", "type": "expression", "loc": [125, 125], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.4699, 0.0038, 2, 0.27, 0.7921, 431, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_policy", "arg_names": [], "import_names": [], "rhs_call_name": "set_policy", "annotation": ""}, "snippet": " self.scrollwinServer.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L126_C16", "label": "self.InfoServer = TextBuffer()", "type": "assigned_variable", "loc": [126, 126], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.4737, 0.0038, 2, 0.27, 0.802, 343, 3, 0, 0, 0, 397, 10, 1], "semantic": {"name": "self.InfoServer", "arg_names": [], "import_names": [], "rhs_call_name": "TextBuffer", "annotation": ""}, "snippet": " self.InfoServer = gtk.TextBuffer()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L127_C16", "label": "self.TextViewServer = TextView()", "type": "assigned_variable", "loc": [127, 127], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.4774, 0.0038, 2, 0.27, 0.8119, 656, 3, 1, 0, 0, 591, 10, 1], "semantic": {"name": "self.TextViewServer", "arg_names": [], "import_names": [], "rhs_call_name": "TextView", "annotation": ""}, "snippet": " self.TextViewServer = gtk.TextView(self.InfoServer)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L128_C16", "label": "set_editable()", "type": "expression", "loc": [128, 128], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.4812, 0.0038, 2, 0.27, 0.8218, 990, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_editable", "arg_names": [], "import_names": [], "rhs_call_name": "set_editable", "annotation": ""}, "snippet": " self.TextViewServer.set_editable(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L129_C16", "label": "set_cursor_visible()", "type": "expression", "loc": [129, 129], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.485, 0.0038, 2, 0.27, 0.8317, 55, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_cursor_visible", "arg_names": [], "import_names": [], "rhs_call_name": "set_cursor_visible", "annotation": ""}, "snippet": " self.TextViewServer.set_cursor_visible(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L130_C16", "label": "set_wrap_mode()", "type": "expression", "loc": [130, 130], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.4887, 0.0038, 2, 0.27, 0.8416, 798, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_wrap_mode", "arg_names": [], "import_names": [], "rhs_call_name": "set_wrap_mode", "annotation": ""}, "snippet": " self.TextViewServer.set_wrap_mode(gtk.WRAP_WORD)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L131_C16", "label": "set_size_request()", "type": "expression", "loc": [131, 131], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.4925, 0.0038, 2, 0.27, 0.8515, 91, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_size_request", "arg_names": [], "import_names": [], "rhs_call_name": "set_size_request", "annotation": ""}, "snippet": " self.TextViewServer.set_size_request(400,170) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L132_C16", "label": "add()", "type": "expression", "loc": [132, 132], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.4962, 0.0038, 2, 0.27, 0.8614, 241, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add", "arg_names": [], "import_names": [], "rhs_call_name": "add", "annotation": ""}, "snippet": " self.scrollwinServer.add(self.TextViewServer)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L133_C16", "label": "put()", "type": "expression", "loc": [133, 133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.5, 0.0038, 2, 0.27, 0.8713, 636, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "put", "arg_names": [], "import_names": [], "rhs_call_name": "put", "annotation": ""}, "snippet": " self.fixed.put(self.scrollwinServer, 600, 150)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L136_C16", "label": "self.scrollwinMit = ScrolledWindow()", "type": "assigned_variable", "loc": [136, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.5113, 0.0038, 2, 0.27, 0.8812, 867, 3, 0, 0, 0, 510, 10, 1], "semantic": {"name": "self.scrollwinMit", "arg_names": [], "import_names": [], "rhs_call_name": "ScrolledWindow", "annotation": ""}, "snippet": " self.scrollwinMit = gtk.ScrolledWindow()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L137_C16", "label": "set_policy()", "type": "expression", "loc": [137, 137], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.515, 0.0038, 2, 0.27, 0.8911, 431, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_policy", "arg_names": [], "import_names": [], "rhs_call_name": "set_policy", "annotation": ""}, "snippet": " self.scrollwinMit.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L138_C16", "label": "self.TextBufferMitigacao = TextBuffer()", "type": "assigned_variable", "loc": [138, 138], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.5188, 0.0038, 2, 0.27, 0.901, 359, 3, 0, 0, 0, 397, 10, 1], "semantic": {"name": "self.TextBufferMitigacao", "arg_names": [], "import_names": [], "rhs_call_name": "TextBuffer", "annotation": ""}, "snippet": " self.TextBufferMitigacao = gtk.TextBuffer()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L139_C16", "label": "self.TextViewMit = TextView()", "type": "assigned_variable", "loc": [139, 139], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [14, 2, 0.5226, 0.0038, 2, 0.27, 0.9109, 783, 3, 1, 0, 0, 591, 10, 1], "semantic": {"name": "self.TextViewMit", "arg_names": [], "import_names": [], "rhs_call_name": "TextView", "annotation": ""}, "snippet": " self.TextViewMit = gtk.TextView(self.TextBufferMitigacao)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L140_C16", "label": "set_editable()", "type": "expression", "loc": [140, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.5263, 0.0038, 2, 0.27, 0.9208, 990, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_editable", "arg_names": [], "import_names": [], "rhs_call_name": "set_editable", "annotation": ""}, "snippet": " self.TextViewMit.set_editable(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L141_C16", "label": "set_cursor_visible()", "type": "expression", "loc": [141, 141], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.5301, 0.0038, 2, 0.27, 0.9307, 55, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_cursor_visible", "arg_names": [], "import_names": [], "rhs_call_name": "set_cursor_visible", "annotation": ""}, "snippet": " self.TextViewMit.set_cursor_visible(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L142_C16", "label": "set_wrap_mode()", "type": "expression", "loc": [142, 142], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.5338, 0.0038, 2, 0.27, 0.9406, 798, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_wrap_mode", "arg_names": [], "import_names": [], "rhs_call_name": "set_wrap_mode", "annotation": ""}, "snippet": " self.TextViewMit.set_wrap_mode(gtk.WRAP_WORD)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L143_C16", "label": "set_size_request()", "type": "expression", "loc": [143, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.5376, 0.0038, 2, 0.27, 0.9505, 91, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_size_request", "arg_names": [], "import_names": [], "rhs_call_name": "set_size_request", "annotation": ""}, "snippet": " self.TextViewMit.set_size_request(400,270)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L144_C16", "label": "add()", "type": "expression", "loc": [144, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.5414, 0.0038, 2, 0.27, 0.9604, 241, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add", "arg_names": [], "import_names": [], "rhs_call_name": "add", "annotation": ""}, "snippet": " self.scrollwinMit.add(self.TextViewMit)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L145_C16", "label": "put()", "type": "expression", "loc": [145, 145], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.5451, 0.0038, 2, 0.27, 0.9703, 636, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "put", "arg_names": [], "import_names": [], "rhs_call_name": "put", "annotation": ""}, "snippet": " self.fixed.put(self.scrollwinMit,600,380)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L148_C16", "label": "connect()", "type": "expression", "loc": [148, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.5564, 0.0038, 2, 0.27, 0.9802, 242, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "connect", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " self.janela.connect('delete_event', self.delete_event)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L149_C16", "label": "connect()", "type": "expression", "loc": [149, 149], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.5602, 0.0038, 2, 0.27, 0.9901, 242, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "connect", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " self.janela.connect('destroy', self.destroy)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L150_C16", "label": "show_all()", "type": "expression", "loc": [150, 150], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "vector": [8, 2, 0.5639, 0.0038, 2, 0.27, 1.0, 891, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "show_all", "arg_names": [], "import_names": [], "rhs_call_name": "show_all", "annotation": ""}, "snippet": " self.janela.show_all() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L152_C8", "label": "ShowError", "type": "function", "loc": [152, 160], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "vector": [2, 1, 0.5865, 0.0338, 1, 0.85, 0.1429, 866, 0, 3, 0, 0, 0, 0, 5], "semantic": {"name": "ShowError", "arg_names": ["self", "title", "mensagem"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def ShowError(self, title, mensagem):\n dialog = gtk.MessageDialog(parent=self.janela,flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,\n type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_OK,\n message_format=mensagem)\n dialog.set_title(title)\n dialog.set_position(gtk.WIN_POS_CENTER_ALWAYS)\n # Exibe a caixa\n dialog.run()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L153_C16", "label": "dialog = MessageDialog()", "type": "assigned_variable", "loc": [153, 155], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L152_C8", "vector": [14, 2, 0.5789, 0.0113, 2, 0.95, 0.0, 709, 3, 5, 0, 0, 934, 10, 1], "semantic": {"name": "dialog", "arg_names": [], "import_names": [], "rhs_call_name": "MessageDialog", "annotation": ""}, "snippet": " dialog = gtk.MessageDialog(parent=self.janela,flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,\n type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_OK,\n message_format=mensagem)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L156_C16", "label": "set_title()", "type": "expression", "loc": [156, 156], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L152_C8", "vector": [8, 2, 0.5865, 0.0038, 2, 0.95, 0.25, 145, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_title", "arg_names": [], "import_names": [], "rhs_call_name": "set_title", "annotation": ""}, "snippet": " dialog.set_title(title)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L157_C16", "label": "set_position()", "type": "expression", "loc": [157, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L152_C8", "vector": [8, 2, 0.5902, 0.0038, 2, 0.95, 0.5, 370, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_position", "arg_names": [], "import_names": [], "rhs_call_name": "set_position", "annotation": ""}, "snippet": " dialog.set_position(gtk.WIN_POS_CENTER_ALWAYS)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L159_C16", "label": "run()", "type": "expression", "loc": [159, 159], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L152_C8", "vector": [8, 2, 0.5977, 0.0038, 2, 0.95, 0.75, 679, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "run", "arg_names": [], "import_names": [], "rhs_call_name": "run", "annotation": ""}, "snippet": " dialog.run()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L160_C16", "label": "destroy()", "type": "expression", "loc": [160, 160], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L152_C8", "vector": [8, 2, 0.6015, 0.0038, 2, 0.95, 1.0, 388, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "destroy", "arg_names": [], "import_names": [], "rhs_call_name": "destroy", "annotation": ""}, "snippet": " dialog.destroy() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L162_C8", "label": "IniciarExploracao", "type": "function", "loc": [162, 222], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "vector": [2, 1, 0.7218, 0.2293, 1, 0.85, 0.2857, 156, 0, 3, 0, 0, 0, 0, 38], "semantic": {"name": "IniciarExploracao", "arg_names": ["self", "widget", "data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def IniciarExploracao(self, widget, data=None):\n \n Inicial= time.time()\n print(\"Start : %s\" %Inicial)\n #LIMPANDO AS VARIAVEIS DA JANELA\n \n self.TextBufferMitigacao.set_text(\"\")\n self.listResult.clear() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L164_C16", "label": "Inicial = time()", "type": "assigned_variable", "loc": [164, 164], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L162_C8", "vector": [14, 2, 0.6165, 0.0038, 2, 0.56, 0.0, 669, 3, 0, 0, 0, 654, 10, 1], "semantic": {"name": "Inicial", "arg_names": [], "import_names": [], "rhs_call_name": "time", "annotation": ""}, "snippet": " Inicial= time.time()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L165_C16", "label": "print()", "type": "expression", "loc": [165, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L162_C8", "vector": [8, 2, 0.6203, 0.0038, 2, 0.56, 0.1667, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"Start : %s\" %Inicial)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L168_C16", "label": "set_text()", "type": "expression", "loc": [168, 168], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L162_C8", "vector": [8, 2, 0.6316, 0.0038, 2, 0.56, 0.3333, 592, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_text", "arg_names": [], "import_names": [], "rhs_call_name": "set_text", "annotation": ""}, "snippet": " self.TextBufferMitigacao.set_text(\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L169_C16", "label": "clear()", "type": "expression", "loc": [169, 169], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L162_C8", "vector": [8, 2, 0.6353, 0.0038, 2, 0.56, 0.5, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " self.listResult.clear() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L171_C16", "label": "set_text()", "type": "expression", "loc": [171, 171], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L162_C8", "vector": [8, 2, 0.6429, 0.0038, 2, 0.56, 0.6667, 592, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_text", "arg_names": [], "import_names": [], "rhs_call_name": "set_text", "annotation": ""}, "snippet": " self.InfoServer.set_text(\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L172_C16", "label": "self.selc = on_name_combo_changed()", "type": "assigned_variable", "loc": [172, 172], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L162_C8", "vector": [14, 2, 0.6466, 0.0038, 2, 0.56, 0.8333, 656, 3, 1, 0, 0, 400, 10, 1], "semantic": {"name": "self.selc", "arg_names": [], "import_names": [], "rhs_call_name": "on_name_combo_changed", "annotation": ""}, "snippet": " self.selc = self.on_name_combo_changed(self.ComboVul)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L175_C16", "label": "if", "type": "if", "loc": [175, 222], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L162_C8", "vector": [4, 2, 0.7462, 0.1805, 2, 0.56, 1.0, 0, 0, 0, 0, 0, 0, 0, 32], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.txtURL.get_text() == \"\":\n # EXIBINDO UMA POPUP DE ALERTA\n self.ShowError('ALERTA', 'ATENCAO: Favor preencher o campo URL da Aplicacao!')\n #VERIFICANDO SE FOI SELECIONADA ALGUMA OPCAO\n elif (self.selc > 2) or (self.selc == 999):\n self.InfoServer.set_text(\"\")\n self.listResult.clear()\n else: "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L177_C24", "label": "ShowError()", "type": "expression", "loc": [177, 177], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L175_C16", "vector": [8, 3, 0.6654, 0.0038, 3, 0.54, 0.0, 866, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "ShowError", "arg_names": [], "import_names": [], "rhs_call_name": "ShowError", "annotation": ""}, "snippet": " self.ShowError('ALERTA', 'ATENCAO: Favor preencher o campo URL da Aplicacao!')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "label": "if", "type": "if", "loc": [179, 222], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L175_C16", "vector": [4, 3, 0.7538, 0.1654, 3, 0.54, 1.0, 0, 0, 0, 0, 0, 0, 0, 30], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif (self.selc > 2) or (self.selc == 999):\n self.InfoServer.set_text(\"\")\n self.listResult.clear()\n else: \n # Utilizando a classe CONTROLLER\n self.control = Controller.Controller(self.txtURL.get_text())\n self.control.select_Plugin(self.selc,self.checkParada.state) #envia o plugin e o criterio de parada(1 - para no primeiro)\n self.teste_url = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L180_C24", "label": "set_text()", "type": "expression", "loc": [180, 180], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "vector": [8, 4, 0.6767, 0.0038, 4, 0.65, 0.0, 592, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_text", "arg_names": [], "import_names": [], "rhs_call_name": "set_text", "annotation": ""}, "snippet": " self.InfoServer.set_text(\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L181_C24", "label": "clear()", "type": "expression", "loc": [181, 181], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "vector": [8, 4, 0.6805, 0.0038, 4, 0.65, 0.1111, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " self.listResult.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L184_C24", "label": "self.control = Controller()", "type": "assigned_variable", "loc": [184, 184], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "vector": [14, 4, 0.6917, 0.0038, 4, 0.65, 0.2222, 283, 3, 1, 0, 0, 93, 10, 2], "semantic": {"name": "self.control", "arg_names": [], "import_names": [], "rhs_call_name": "Controller", "annotation": ""}, "snippet": " self.control = Controller.Controller(self.txtURL.get_text())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L185_C24", "label": "select_Plugin()", "type": "expression", "loc": [185, 185], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "vector": [8, 4, 0.6955, 0.0038, 4, 0.65, 0.3333, 318, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "select_Plugin", "arg_names": [], "import_names": [], "rhs_call_name": "select_Plugin", "annotation": ""}, "snippet": " self.control.select_Plugin(self.selc,self.checkParada.state) #envia o plugin e o criterio de parada(1 - para no primeiro)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L186_C24", "label": "self.teste_url =", "type": "assigned_variable", "loc": [186, 186], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "vector": [14, 4, 0.6992, 0.0038, 4, 0.65, 0.4444, 303, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.teste_url", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.teste_url = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L187_C24", "label": "self.teste_url = check_URL()", "type": "assigned_variable", "loc": [187, 187], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "vector": [14, 4, 0.703, 0.0038, 4, 0.65, 0.5556, 303, 3, 0, 0, 0, 750, 10, 1], "semantic": {"name": "self.teste_url", "arg_names": [], "import_names": [], "rhs_call_name": "check_URL", "annotation": ""}, "snippet": " self.teste_url = self.control.check_URL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "label": "if", "type": "if", "loc": [189, 217], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "vector": [4, 4, 0.7632, 0.109, 4, 0.65, 0.6667, 0, 0, 0, 0, 0, 0, 0, 21], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(self.teste_url) == 2: # se a lista tiver 2 colunas entao ocorreu um erro\n self.ShowError(str(self.teste_url[0]), str(self.teste_url[1]))\n else: \n #INSERIR AS INFORMACOES DO SERVIDOR\n self.a = []\n self.a.append(self.control.get_Server_Info())\n self.b = str()\n for n in self.a:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L190_C32", "label": "ShowError()", "type": "expression", "loc": [190, 190], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "vector": [8, 5, 0.7143, 0.0038, 5, 0.63, 0.0, 866, 3, 2, 0, 0, 0, 0, 3], "semantic": {"name": "ShowError", "arg_names": [], "import_names": [], "rhs_call_name": "ShowError", "annotation": ""}, "snippet": " self.ShowError(str(self.teste_url[0]), str(self.teste_url[1]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L193_C32", "label": "self.a =", "type": "assigned_variable", "loc": [193, 193], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "vector": [14, 5, 0.7256, 0.0038, 5, 0.63, 0.0833, 471, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.a = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L194_C32", "label": "append()", "type": "expression", "loc": [194, 194], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "vector": [8, 5, 0.7293, 0.0038, 5, 0.63, 0.1667, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.a.append(self.control.get_Server_Info())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L195_C32", "label": "self.b = str()", "type": "assigned_variable", "loc": [195, 195], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "vector": [14, 5, 0.7331, 0.0038, 5, 0.63, 0.25, 107, 3, 0, 0, 0, 52, 10, 1], "semantic": {"name": "self.b", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " self.b = str()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:For_L196_C32", "label": "for n", "type": "for", "loc": [196, 197], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "vector": [6, 5, 0.7387, 0.0075, 5, 0.63, 0.3333, 773, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for n in self.a:\n self.b = (str(n))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L197_C40", "label": "self.b = str()", "type": "assigned_variable", "loc": [197, 197], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:For_L196_C32", "vector": [14, 6, 0.7406, 0.0038, 6, 0.82, 0.0, 107, 3, 1, 0, 0, 52, 10, 1], "semantic": {"name": "self.b", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " self.b = (str(n))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L198_C32", "label": "set_text()", "type": "expression", "loc": [198, 198], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "vector": [8, 5, 0.7444, 0.0038, 5, 0.63, 0.4167, 592, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_text", "arg_names": [], "import_names": [], "rhs_call_name": "set_text", "annotation": ""}, "snippet": " self.InfoServer.set_text(self.b)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L201_C32", "label": "self.resultado =", "type": "assigned_variable", "loc": [201, 201], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "vector": [14, 5, 0.7556, 0.0038, 5, 0.63, 0.5, 788, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.resultado", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.resultado = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L202_C32", "label": "self.resultado = send_Exploiter()", "type": "assigned_variable", "loc": [202, 202], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "vector": [14, 5, 0.7594, 0.0038, 5, 0.63, 0.5833, 788, 3, 0, 0, 0, 622, 10, 1], "semantic": {"name": "self.resultado", "arg_names": [], "import_names": [], "rhs_call_name": "send_Exploiter", "annotation": ""}, "snippet": " self.resultado = self.control.send_Exploiter()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L203_C32", "label": "try", "type": "try", "loc": [203, 210], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "vector": [7, 5, 0.7763, 0.0301, 5, 0.63, 0.6667, 0, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n if len(self.resultado[0]) == 2 and self.resultado[0] == None:\n self.ShowError(str(self.resultado[0]), str(self.resultado[1]))\n except:\n pass \n else:\n for res in self.resultado:\n self.listResult.append(res)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L204_C40", "label": "if", "type": "if", "loc": [204, 205], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L203_C32", "vector": [4, 6, 0.7688, 0.0075, 6, 0.25, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(self.resultado[0]) == 2 and self.resultado[0] == None:\n self.ShowError(str(self.resultado[0]), str(self.resultado[1]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L205_C48", "label": "ShowError()", "type": "expression", "loc": [205, 205], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L204_C40", "vector": [8, 7, 0.7707, 0.0038, 7, 0.88, 0.0, 866, 3, 2, 0, 0, 0, 0, 3], "semantic": {"name": "ShowError", "arg_names": [], "import_names": [], "rhs_call_name": "ShowError", "annotation": ""}, "snippet": " self.ShowError(str(self.resultado[0]), str(self.resultado[1]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:For_L209_C40", "label": "for res", "type": "for", "loc": [209, 210], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L203_C32", "vector": [6, 6, 0.7876, 0.0075, 6, 0.25, 1.0, 413, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "res", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for res in self.resultado:\n self.listResult.append(res)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L210_C48", "label": "append()", "type": "expression", "loc": [210, 210], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:For_L209_C40", "vector": [8, 7, 0.7895, 0.0038, 7, 0.09, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.listResult.append(res)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L213_C32", "label": "set_model()", "type": "expression", "loc": [213, 213], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "vector": [8, 5, 0.8008, 0.0038, 5, 0.63, 0.75, 403, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_model", "arg_names": [], "import_names": [], "rhs_call_name": "set_model", "annotation": ""}, "snippet": " self.treeview.set_model(self.listResult)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L214_C32", "label": "TempoFinal = round()", "type": "assigned_variable", "loc": [214, 214], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "vector": [14, 5, 0.8045, 0.0038, 5, 0.63, 0.8333, 223, 3, 2, 0, 0, 19, 10, 2], "semantic": {"name": "TempoFinal", "arg_names": [], "import_names": [], "rhs_call_name": "round", "annotation": ""}, "snippet": " TempoFinal = round (time.time() - Inicial, 2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L216_C32", "label": "print()", "type": "expression", "loc": [216, 216], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "vector": [8, 5, 0.812, 0.0038, 5, 0.63, 0.9167, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(TempoFinal)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L217_C32", "label": "ShowError()", "type": "expression", "loc": [217, 217], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "vector": [8, 5, 0.8158, 0.0038, 5, 0.63, 1.0, 866, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "ShowError", "arg_names": [], "import_names": [], "rhs_call_name": "ShowError", "annotation": ""}, "snippet": " self.ShowError(\"SUCESSO!\", \"Explora\u00e7\u00e3o realizado com sucesso! \\nTempo de Execu\u00e7\u00e3o: \" + str(TempoFinal) + ' segundos')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L220_C24", "label": "self.selecao = get_selection()", "type": "assigned_variable", "loc": [220, 220], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "vector": [14, 4, 0.8271, 0.0038, 4, 0.65, 0.7778, 482, 3, 0, 0, 0, 365, 10, 1], "semantic": {"name": "self.selecao", "arg_names": [], "import_names": [], "rhs_call_name": "get_selection", "annotation": ""}, "snippet": " self.selecao = self.treeview.get_selection()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L221_C24", "label": "connect()", "type": "expression", "loc": [221, 221], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "vector": [8, 4, 0.8308, 0.0038, 4, 0.65, 0.8889, 242, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "connect", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " self.selecao.connect('changed', self.on_select_change)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L222_C24", "label": "show_all()", "type": "expression", "loc": [222, 222], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "vector": [8, 4, 0.8346, 0.0038, 4, 0.65, 1.0, 891, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "show_all", "arg_names": [], "import_names": [], "rhs_call_name": "show_all", "annotation": ""}, "snippet": " self.janela.show_all()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L226_C8", "label": "delete_event", "type": "function", "loc": [226, 228], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "vector": [2, 1, 0.8534, 0.0113, 1, 0.85, 0.4286, 525, 0, 4, 1, 0, 0, 0, 1], "semantic": {"name": "delete_event", "arg_names": ["self", "widget", "event", "data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def delete_event(self, widget, event, data=None):\n print(\"Programa encerrado!\")\n return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L227_C16", "label": "print()", "type": "expression", "loc": [227, 227], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L226_C8", "vector": [8, 2, 0.8534, 0.0038, 2, 0.94, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"Programa encerrado!\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Return_L228_C16", "label": "return", "type": "return", "loc": [228, 228], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L226_C8", "vector": [13, 2, 0.8571, 0.0038, 2, 0.94, 1.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L231_C8", "label": "on_select_change", "type": "function", "loc": [231, 241], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "vector": [2, 1, 0.8872, 0.0414, 1, 0.85, 0.5714, 75, 0, 2, 0, 0, 0, 0, 5], "semantic": {"name": "on_select_change", "arg_names": ["self", "widget"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def on_select_change(self, widget):\n\n m, itr = widget.get_selected()\n if itr:\n #Exibe o item da posicao 4 - mitigacao se for vulner\u00e1vel\n if m[itr][5]:\n self.TextBufferMitigacao.set_text(m[itr][4])\n self.scrollwinMit.show_all()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L233_C16", "label": "m, itr = get_selected()", "type": "assigned_variable", "loc": [233, 233], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L231_C8", "vector": [14, 2, 0.8759, 0.0038, 2, 0.18, 0.0, 304, 3, 0, 0, 0, 881, 10, 1], "semantic": {"name": "m, itr", "arg_names": [], "import_names": [], "rhs_call_name": "get_selected", "annotation": ""}, "snippet": " m, itr = widget.get_selected()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L234_C16", "label": "if", "type": "if", "loc": [234, 241], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L231_C8", "vector": [4, 2, 0.8929, 0.0301, 2, 0.18, 1.0, 0, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if itr:\n #Exibe o item da posicao 4 - mitigacao se for vulner\u00e1vel\n if m[itr][5]:\n self.TextBufferMitigacao.set_text(m[itr][4])\n self.scrollwinMit.show_all()\n else:\n self.TextBufferMitigacao.set_text(\"\")\n self.scrollwinMit.show_all() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L236_C24", "label": "if", "type": "if", "loc": [236, 241], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L234_C16", "vector": [4, 3, 0.8966, 0.0226, 3, 0.81, 0.0, 0, 6, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if m[itr][5]:\n self.TextBufferMitigacao.set_text(m[itr][4])\n self.scrollwinMit.show_all()\n else:\n self.TextBufferMitigacao.set_text(\"\")\n self.scrollwinMit.show_all() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L237_C32", "label": "set_text()", "type": "expression", "loc": [237, 237], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L236_C24", "vector": [8, 4, 0.891, 0.0038, 4, 0.62, 0.0, 592, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_text", "arg_names": [], "import_names": [], "rhs_call_name": "set_text", "annotation": ""}, "snippet": " self.TextBufferMitigacao.set_text(m[itr][4])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L238_C32", "label": "show_all()", "type": "expression", "loc": [238, 238], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L236_C24", "vector": [8, 4, 0.8947, 0.0038, 4, 0.62, 0.3333, 891, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "show_all", "arg_names": [], "import_names": [], "rhs_call_name": "show_all", "annotation": ""}, "snippet": " self.scrollwinMit.show_all()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L240_C32", "label": "set_text()", "type": "expression", "loc": [240, 240], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L236_C24", "vector": [8, 4, 0.9023, 0.0038, 4, 0.62, 0.6667, 592, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_text", "arg_names": [], "import_names": [], "rhs_call_name": "set_text", "annotation": ""}, "snippet": " self.TextBufferMitigacao.set_text(\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L241_C32", "label": "show_all()", "type": "expression", "loc": [241, 241], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L236_C24", "vector": [8, 4, 0.906, 0.0038, 4, 0.62, 1.0, 891, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "show_all", "arg_names": [], "import_names": [], "rhs_call_name": "show_all", "annotation": ""}, "snippet": " self.scrollwinMit.show_all() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L243_C8", "label": "on_name_combo_changed", "type": "function", "loc": [243, 252], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "vector": [2, 1, 0.9305, 0.0376, 1, 0.85, 0.7143, 400, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "on_name_combo_changed", "arg_names": ["self", "combo"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def on_name_combo_changed(self, combo):\n tree_iter = combo.get_active_iter()\n model = combo.get_model()\n \n if tree_iter == None:\n self.ShowError('ATENCAO','Nenhuma vulnerabilidade foi selecionada!')\n return 999\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L244_C16", "label": "tree_iter = get_active_iter()", "type": "assigned_variable", "loc": [244, 244], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L243_C8", "vector": [14, 2, 0.9173, 0.0038, 2, 0.46, 0.0, 959, 3, 0, 0, 0, 261, 10, 1], "semantic": {"name": "tree_iter", "arg_names": [], "import_names": [], "rhs_call_name": "get_active_iter", "annotation": ""}, "snippet": " tree_iter = combo.get_active_iter()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L245_C16", "label": "model = get_model()", "type": "assigned_variable", "loc": [245, 245], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L243_C8", "vector": [14, 2, 0.9211, 0.0038, 2, 0.46, 0.5, 722, 3, 0, 0, 0, 115, 10, 1], "semantic": {"name": "model", "arg_names": [], "import_names": [], "rhs_call_name": "get_model", "annotation": ""}, "snippet": " model = combo.get_model()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L247_C16", "label": "if", "type": "if", "loc": [247, 252], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L243_C8", "vector": [4, 2, 0.938, 0.0226, 2, 0.46, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if tree_iter == None:\n self.ShowError('ATENCAO','Nenhuma vulnerabilidade foi selecionada!')\n return 999\n else:\n row_id, name = model[tree_iter]\n return row_id"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L248_C24", "label": "ShowError()", "type": "expression", "loc": [248, 248], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L247_C16", "vector": [8, 3, 0.9323, 0.0038, 3, 0.57, 0.0, 866, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "ShowError", "arg_names": [], "import_names": [], "rhs_call_name": "ShowError", "annotation": ""}, "snippet": " self.ShowError('ATENCAO','Nenhuma vulnerabilidade foi selecionada!')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Return_L249_C24", "label": "return", "type": "return", "loc": [249, 249], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L247_C16", "vector": [13, 3, 0.9361, 0.0038, 3, 0.57, 0.3333, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return 999"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L251_C24", "label": "row_id, name =", "type": "assigned_variable", "loc": [251, 251], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L247_C16", "vector": [14, 3, 0.9436, 0.0038, 3, 0.57, 0.6667, 344, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "row_id, name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " row_id, name = model[tree_iter]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Return_L252_C24", "label": "return", "type": "return", "loc": [252, 252], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L247_C16", "vector": [13, 3, 0.9474, 0.0038, 3, 0.57, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return row_id"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L255_C8", "label": "destroy", "type": "function", "loc": [255, 256], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "vector": [2, 1, 0.9605, 0.0075, 1, 0.85, 0.8571, 388, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "destroy", "arg_names": ["self", "widget", "data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def destroy(self, widget, data=None):\n gtk.main_quit()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L256_C16", "label": "main_quit()", "type": "expression", "loc": [256, 256], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L255_C8", "vector": [8, 2, 0.9624, 0.0038, 2, 0.66, 0.0, 973, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main_quit", "arg_names": [], "import_names": [], "rhs_call_name": "main_quit", "annotation": ""}, "snippet": " gtk.main_quit()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L259_C8", "label": "main", "type": "function", "loc": [259, 260], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "vector": [2, 1, 0.9756, 0.0075, 1, 0.85, 1.0, 624, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def main(self):\n gtk.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L260_C16", "label": "main()", "type": "expression", "loc": [260, 260], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L259_C8", "vector": [8, 2, 0.9774, 0.0038, 2, 0.3, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " gtk.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L264_C0", "label": "if", "type": "if", "loc": [264, 266], "level": 0, "parent": null, "vector": [4, 0, 0.9962, 0.0113, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == \"__main__\":\n Janela = JanelaPrincipal()\n Janela.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L265_C8", "label": "Janela = JanelaPrincipal()", "type": "assigned_variable", "loc": [265, 265], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L264_C0", "vector": [14, 1, 0.9962, 0.0038, 1, 0.26, 0.0, 306, 3, 0, 0, 0, 330, 10, 1], "semantic": {"name": "Janela", "arg_names": [], "import_names": [], "rhs_call_name": "JanelaPrincipal", "annotation": ""}, "snippet": " Janela = JanelaPrincipal()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L266_C8", "label": "main()", "type": "expression", "loc": [266, 266], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L264_C0", "vector": [8, 1, 1.0, 0.0038, 1, 0.26, 1.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " Janela.main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Import_L6_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Import_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Import_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L21_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L22_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L23_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L24_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L25_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L26_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L27_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L30_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L31_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L32_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L33_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L34_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L35_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L36_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L37_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L38_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L39_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L40_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L43_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L44_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L45_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L47_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L48_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L49_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L50_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L51_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L52_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L55_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L56_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L57_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L58_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L61_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L62_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L63_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L64_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L66_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L67_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L68_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L71_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L72_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L73_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L74_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L75_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L76_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L77_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L78_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L81_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L82_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L83_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L84_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L87_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L88_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L89_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L90_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L91_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L93_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L96_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L97_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L98_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L99_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L100_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L101_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L102_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L103_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L106_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L108_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L109_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L110_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L111_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L112_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L113_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L114_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L115_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L116_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L117_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L118_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L119_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L120_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L121_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L124_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L125_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L126_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L127_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L128_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L129_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L130_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L131_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L132_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L133_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L136_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L137_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L138_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L139_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L140_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L141_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L142_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L143_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L144_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L145_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L148_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L149_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L150_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L152_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L153_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L156_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L157_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L159_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L160_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L162_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L162_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L164_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L162_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L165_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L162_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L168_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L162_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L169_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L162_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L171_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L162_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L172_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L162_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L175_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L175_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L177_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L175_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L180_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L181_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L184_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L185_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L186_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L187_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L190_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L193_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L194_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L195_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:For_L196_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:For_L196_C32", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L197_C40"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L198_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L201_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L202_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L203_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L203_C32", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L204_C40"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L204_C40", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L205_C48"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:Try_L203_C32", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:For_L209_C40"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:For_L209_C40", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L210_C48"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L213_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L214_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L216_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L189_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L217_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L220_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L221_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L179_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L222_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L226_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L226_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L227_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L226_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Return_L228_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L231_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L231_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L233_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L231_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L234_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L234_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L236_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L236_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L237_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L236_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L238_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L236_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L240_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L236_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L241_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L243_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L243_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L244_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L243_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L245_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L243_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L247_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L247_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L248_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L247_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Return_L249_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L247_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L251_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L247_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Return_L252_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L255_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L255_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L256_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L259_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:FunctionDef_L259_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L260_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Assign_L265_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1448:If_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1448:Expr_L266_C8"}]
#!/usr/bin/env python import urllib,requests,urllib2,socket,mechanize from urlparse import urlsplit,urlparse,urlunparse,urljoin from Data import Data_Access ######################################################################## # CLASSE PLUGINSQL FILHO DE PLUGINS class PluginSQL (object): """ Responsavel por montar e analisar ataques de Injecao de Comandos SQL """ #---------------------------------------------------------------------- def __init__(self): """ Constructor """ self.data_Access = Data_Access(1, "PL_SQLINJECTION") self.attack_Name = "SQL Injection" self.attack_Criticity = "High" #---------------------------------------------------------------------- def get_Attack (self): """ Retorna os ataques que estao no Banco de Dados """ return self.data_Access.getAttack() #---------------------------------------------------------------------- def get_Mitigation (self): """ Retorna as mitigacoes que estao no Banco de Dados """ return self.data_Access.getMitigation() #---------------------------------------------------------------------- def get_Impact (self): """ Retorna o nome da vulnerabilidade """ return self.attack_Criticity #---------------------------------------------------------------------- def get_Response (self): """ Retorna as respostas que estao no Banco de Dados """ return self.data_Access.getResponse() #---------------------------------------------------------------------- def get_Vulnerability (self): """ Retorna o nome da vulnerabilidade """ return self.attack_Name #---------------------------------------------------------------------- def get_Attack_Monted (self, url): """ Retorna a URL concatenada com o ataque """ self.atack_monted = [] for atack in self.getAttack(): self.atack_monted.append(url + ''.join(atack)) return self.atack_monted #---------------------------------------------------------------------- def mount_URL_Attack (self, url): """ Ataque via URL GET """ self.url_attack_parse = urlparse(url) self.url_parse_base = self.url_attack_parse.scheme + "://" + self.url_attack_parse.netloc + self.url_attack_parse.path + "?" self.url_atributos_ataques = [] self.atributo_ataque = [] # Pega todos os atributos da URL e os separa em uma lista self.urls_att = [] self.urls_att.append('&'.rpartition(self.url_attack_parse.query)) #---------------------------------------------------------------------- def gen_Form_Attack(self, list_forms, url): """" Realiza uma chamada ao banco de dados para obter a lista de ataques e os inclui nos formularios. LIST_FORMS: Lista contendo os nomes dos formularios presentes na pagina testada URL: Endereco URL testado """ self.list_forms = [] self.list_forms = list_forms self.list_forms_ataques = [] self.aux = [] for ataque in self.get_Attack(): # Atribui os ataques a lista de formularios enviada como parametro for formulario in self.list_forms: self.aux.append([formulario,''.join(ataque)]) self.list_forms_ataques.append([url, self.aux]) self.aux = [] # Retorna uma lista de formularios ja contendo os ataques return self.list_forms_ataques #---------------------------------------------------------------------- def analisa_Resultado (self, html, url_ataque, atributo): """ Analisa o codigo HTML da aplicacao, apos o ataque desferido pela classe Exploiter. HTML: Codigo-fonte resultante do ataque; URL_ATAQUE: Endereco URL da aplicacao testada; ATRIBUTO: Variavel que sofreu o teste """ self.html = str(html) self.attack_Result = [] # Verifica no codigo-fonte HTML a presenca de Strings Error Based SQL Injection for resp in self.get_Response(): # Existe Strings, entao eh vulneravel if self.html.find(''.join(resp)) > 0: # Concatena as informacoes retorno self.attack_Result.append('VULNERAVEL') self.attack_Result.append(self.get_Impact()) self.attack_Result.append(url_ataque) self.attack_Result.append(atributo) self.attack_Result.append(self.get_Mitigation()) # 1 = Ataque funcionou self.attack_Result.append(True) # Nao existe Strings, logo nao eh vulneravel a Error Based SQL Injection else: # Concatena as informacoes retorno self.attack_Result.append('NAO VULNERAVEL') self.attack_Result.append(self.get_Impact()) self.attack_Result.append(url_ataque) self.attack_Result.append(atributo) self.attack_Result.append(self.get_Mitigation()) # 0 = Ataque nao funcionou self.attack_Result.append(False) return self.attack_Result #---------------------------------------------------------------------- def gerar_Ataques (self, url): """ Recebe por parametro uma lista de URLs com atributos e monta uma lista de ataques em cima de cada atributo contido na URL. """ # Define a lista de URLs self.URL_List_Target = [] self.URL_List_Target = url # Define a lista de ataques para cada uma das URLs self.lista_ataques_gerados = [] for URL_Target in self.URL_List_Target: self.url_attack_parse = urlparse(URL_Target) self.url_parse_base = self.url_attack_parse.scheme + "://" + self.url_attack_parse.netloc + self.url_attack_parse.path + "?" self.url_atributos_ataques = [] self.atributo_ataque = [] self.lista_var = [] self.lista_var = self.url_attack_parse.query.split('&') # Pega todos os atributos da URL e os separa em uma lista for atributo in self.url_attack_parse.query.split('&'): self.str_var_fix = "" for var_fix in self.lista_var: if var_fix == atributo: pass else: self.str_var_fix = self.str_var_fix + "&" + var_fix # Faz uma chamada ao banco de dados para obter a String de ataque e a concatena ao atributo for atack in self.get_Attack(): self.lista_ataques_gerados.append([self.url_parse_base + atributo + ''.join(atack) + self.str_var_fix, atributo]) # Retorna a lista de ataques gerados pelo metodo return self.lista_ataques_gerados
ajibawa-2023/Python-Code-Large/train/row_1449
90
174
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Import_L2_C0", "label": "urllib import urllib, requests, urllib2\u2026", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0115, 0.0057, 0, 0.66, 0.0, 614, 0, 5, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib", "requests", "urllib2", "socket", "mechanize"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urllib,requests,urllib2,socket,mechanize"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:ImportFrom_L3_C0", "label": "from urlparse import urlsplit, urlparse, urlunparse\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0172, 0.0057, 0, 0.66, 0.3333, 857, 0, 4, 0, 0, 857, 0, 0], "semantic": {"name": "urlparse", "arg_names": [], "import_names": ["urlsplit", "urlparse", "urlunparse", "urljoin"], "rhs_call_name": "", "annotation": ""}, "snippet": "from urlparse import urlsplit,urlparse,urlunparse,urljoin"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:ImportFrom_L4_C0", "label": "from Data import Data_Access", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.023, 0.0057, 0, 0.66, 0.6667, 467, 0, 1, 0, 0, 467, 0, 0], "semantic": {"name": "Data", "arg_names": [], "import_names": ["Data_Access"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Data import Data_Access"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "label": "PluginSQL", "type": "class", "loc": [8, 174], "level": 0, "parent": null, "vector": [3, 0, 0.523, 0.9598, 0, 0.66, 1.0, 743, 0, 11, 0, 0, 186, 0, 40], "semantic": {"name": "PluginSQL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class PluginSQL (object):\n \"\"\"\n Responsavel por montar e analisar ataques de Injecao de Comandos SQL\n \"\"\" \n #----------------------------------------------------------------------\n def __init__(self):\n \"\"\"\n Constructor"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L9_C4", "label": "expression", "type": "expression", "loc": [9, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "vector": [8, 1, 0.0575, 0.0172, 1, 0.55, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Responsavel por montar e analisar ataques de Injecao de Comandos SQL\n \"\"\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L13_C4", "label": "__init__", "type": "function", "loc": [13, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "vector": [2, 1, 0.092, 0.0402, 1, 0.55, 0.0909, 555, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self):\n \"\"\"\n Constructor\n \"\"\"\n self.data_Access = Data_Access(1, \"PL_SQLINJECTION\") \n self.attack_Name = \"SQL Injection\"\n self.attack_Criticity = \"High\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L14_C8", "label": "expression", "type": "expression", "loc": [14, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L13_C4", "vector": [8, 2, 0.0862, 0.0172, 2, 0.19, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Constructor\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L17_C8", "label": "self.data_Access = Data_Access()", "type": "assigned_variable", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L13_C4", "vector": [14, 2, 0.0977, 0.0057, 2, 0.19, 0.3333, 923, 3, 2, 0, 0, 671, 10, 1], "semantic": {"name": "self.data_Access", "arg_names": [], "import_names": [], "rhs_call_name": "Data_Access", "annotation": ""}, "snippet": " self.data_Access = Data_Access(1, \"PL_SQLINJECTION\") "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L18_C8", "label": "self.attack_Name =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L13_C4", "vector": [14, 2, 0.1034, 0.0057, 2, 0.19, 0.6667, 164, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.attack_Name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.attack_Name = \"SQL Injection\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L19_C8", "label": "self.attack_Criticity =", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L13_C4", "vector": [14, 2, 0.1092, 0.0057, 2, 0.19, 1.0, 681, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.attack_Criticity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.attack_Criticity = \"High\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L22_C4", "label": "get_Attack", "type": "function", "loc": [22, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "vector": [2, 1, 0.1379, 0.0287, 1, 0.55, 0.1818, 859, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_Attack", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Attack (self):\n \"\"\"\n Retorna os ataques que estao no Banco de Dados\n \"\"\"\n return self.data_Access.getAttack()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L23_C8", "label": "expression", "type": "expression", "loc": [23, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L22_C4", "vector": [8, 2, 0.1379, 0.0172, 2, 0.12, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna os ataques que estao no Banco de Dados\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L26_C8", "label": "return", "type": "return", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L22_C4", "vector": [13, 2, 0.1494, 0.0057, 2, 0.12, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.data_Access.getAttack()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L30_C4", "label": "get_Mitigation", "type": "function", "loc": [30, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "vector": [2, 1, 0.1839, 0.0287, 1, 0.55, 0.2727, 460, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_Mitigation", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Mitigation (self):\n \"\"\"\n Retorna as mitigacoes que estao no Banco de Dados\n \"\"\"\n return self.data_Access.getMitigation()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L31_C8", "label": "expression", "type": "expression", "loc": [31, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L30_C4", "vector": [8, 2, 0.1839, 0.0172, 2, 0.59, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna as mitigacoes que estao no Banco de Dados\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L34_C8", "label": "return", "type": "return", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L30_C4", "vector": [13, 2, 0.1954, 0.0057, 2, 0.59, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.data_Access.getMitigation()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L37_C4", "label": "get_Impact", "type": "function", "loc": [37, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "vector": [2, 1, 0.2241, 0.0287, 1, 0.55, 0.3636, 574, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "get_Impact", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Impact (self):\n \"\"\"\n Retorna o nome da vulnerabilidade\n \"\"\"\n return self.attack_Criticity"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L38_C8", "label": "expression", "type": "expression", "loc": [38, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L37_C4", "vector": [8, 2, 0.2241, 0.0172, 2, 0.51, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna o nome da vulnerabilidade\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L41_C8", "label": "return", "type": "return", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L37_C4", "vector": [13, 2, 0.2356, 0.0057, 2, 0.51, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.attack_Criticity"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L44_C4", "label": "get_Response", "type": "function", "loc": [44, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "vector": [2, 1, 0.2644, 0.0287, 1, 0.55, 0.4545, 877, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_Response", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Response (self):\n \"\"\"\n Retorna as respostas que estao no Banco de Dados\n \"\"\"\n return self.data_Access.getResponse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L45_C8", "label": "expression", "type": "expression", "loc": [45, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L44_C4", "vector": [8, 2, 0.2644, 0.0172, 2, 0.87, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna as respostas que estao no Banco de Dados\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L48_C8", "label": "return", "type": "return", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L44_C4", "vector": [13, 2, 0.2759, 0.0057, 2, 0.87, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.data_Access.getResponse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L51_C4", "label": "get_Vulnerability", "type": "function", "loc": [51, 55], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "vector": [2, 1, 0.3046, 0.0287, 1, 0.55, 0.5455, 688, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "get_Vulnerability", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Vulnerability (self):\n \"\"\"\n Retorna o nome da vulnerabilidade\n \"\"\"\n return self.attack_Name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L52_C8", "label": "expression", "type": "expression", "loc": [52, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L51_C4", "vector": [8, 2, 0.3046, 0.0172, 2, 0.73, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna o nome da vulnerabilidade\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L55_C8", "label": "return", "type": "return", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L51_C4", "vector": [13, 2, 0.3161, 0.0057, 2, 0.73, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.attack_Name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L59_C4", "label": "get_Attack_Monted", "type": "function", "loc": [59, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "vector": [2, 1, 0.3649, 0.0575, 1, 0.55, 0.6364, 931, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "get_Attack_Monted", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Attack_Monted (self, url):\n \"\"\"\n Retorna a URL concatenada com o ataque\n \"\"\"\n self.atack_monted = []\n \n for atack in self.getAttack():\n self.atack_monted.append(url + ''.join(atack))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L60_C8", "label": "expression", "type": "expression", "loc": [60, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L59_C4", "vector": [8, 2, 0.3506, 0.0172, 2, 0.1, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna a URL concatenada com o ataque\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L63_C8", "label": "self.atack_monted =", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L59_C4", "vector": [14, 2, 0.3621, 0.0057, 2, 0.1, 0.3333, 87, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.atack_monted", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atack_monted = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L65_C8", "label": "for atack", "type": "for", "loc": [65, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L59_C4", "vector": [6, 2, 0.3764, 0.0115, 2, 0.1, 0.6667, 893, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "atack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for atack in self.getAttack():\n self.atack_monted.append(url + ''.join(atack))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L66_C12", "label": "append()", "type": "expression", "loc": [66, 66], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L65_C8", "vector": [8, 3, 0.3793, 0.0057, 3, 0.74, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.atack_monted.append(url + ''.join(atack))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L68_C8", "label": "return", "type": "return", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L59_C4", "vector": [13, 2, 0.3908, 0.0057, 2, 0.1, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.atack_monted"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L71_C4", "label": "mount_URL_Attack", "type": "function", "loc": [71, 82], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "vector": [2, 1, 0.4397, 0.069, 1, 0.55, 0.7273, 145, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "mount_URL_Attack", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def mount_URL_Attack (self, url):\n \"\"\"\n Ataque via URL GET\n \"\"\"\n self.url_attack_parse = urlparse(url)\n self.url_parse_base = self.url_attack_parse.scheme + \"://\" + self.url_attack_parse.netloc + self.url_attack_parse.path + \"?\"\n self.url_atributos_ataques = []\n self.atributo_ataque = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L72_C8", "label": "expression", "type": "expression", "loc": [72, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L71_C4", "vector": [8, 2, 0.4195, 0.0172, 2, 0.82, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Ataque via URL GET\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L75_C8", "label": "self.url_attack_parse = urlparse()", "type": "assigned_variable", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L71_C4", "vector": [14, 2, 0.431, 0.0057, 2, 0.82, 0.1667, 616, 3, 1, 0, 0, 857, 10, 1], "semantic": {"name": "self.url_attack_parse", "arg_names": [], "import_names": [], "rhs_call_name": "urlparse", "annotation": ""}, "snippet": " self.url_attack_parse = urlparse(url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L76_C8", "label": "self.url_parse_base =", "type": "assigned_variable", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L71_C4", "vector": [14, 2, 0.4368, 0.0057, 2, 0.82, 0.3333, 359, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.url_parse_base", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_parse_base = self.url_attack_parse.scheme + \"://\" + self.url_attack_parse.netloc + self.url_attack_parse.path + \"?\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L77_C8", "label": "self.url_atributos_ataques =", "type": "assigned_variable", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L71_C4", "vector": [14, 2, 0.4425, 0.0057, 2, 0.82, 0.5, 534, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.url_atributos_ataques", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_atributos_ataques = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L78_C8", "label": "self.atributo_ataque =", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L71_C4", "vector": [14, 2, 0.4483, 0.0057, 2, 0.82, 0.6667, 395, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.atributo_ataque", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atributo_ataque = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L81_C8", "label": "self.urls_att =", "type": "assigned_variable", "loc": [81, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L71_C4", "vector": [14, 2, 0.4655, 0.0057, 2, 0.82, 0.8333, 470, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.urls_att", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.urls_att = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L82_C8", "label": "append()", "type": "expression", "loc": [82, 82], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L71_C4", "vector": [8, 2, 0.4713, 0.0057, 2, 0.82, 1.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.urls_att.append('&'.rpartition(self.url_attack_parse.query))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L86_C4", "label": "gen_Form_Attack", "type": "function", "loc": [86, 104], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "vector": [2, 1, 0.546, 0.1092, 1, 0.55, 0.8182, 44, 0, 3, 1, 0, 0, 0, 4], "semantic": {"name": "gen_Form_Attack", "arg_names": ["self", "list_forms", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def gen_Form_Attack(self, list_forms, url):\n \"\"\"\"\n Realiza uma chamada ao banco de dados para obter a lista de ataques e os inclui nos formularios.\n LIST_FORMS: Lista contendo os nomes dos formularios presentes na pagina testada\n URL: Endereco URL testado\n \"\"\"\n self.list_forms = []\n self.list_forms = list_forms"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L87_C8", "label": "expression", "type": "expression", "loc": [87, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L86_C4", "vector": [8, 2, 0.5115, 0.0287, 2, 0.76, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\"\n Realiza uma chamada ao banco de dados para obter a lista de ataques e os inclui nos formularios.\n LIST_FORMS: Lista contendo os nomes dos formularios presentes na pagina testada\n URL: Endereco URL testado\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L92_C8", "label": "self.list_forms =", "type": "assigned_variable", "loc": [92, 92], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L86_C4", "vector": [14, 2, 0.5287, 0.0057, 2, 0.76, 0.1667, 826, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.list_forms", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_forms = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L93_C8", "label": "self.list_forms =", "type": "assigned_variable", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L86_C4", "vector": [14, 2, 0.5345, 0.0057, 2, 0.76, 0.3333, 826, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.list_forms", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_forms = list_forms"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L94_C8", "label": "self.list_forms_ataques =", "type": "assigned_variable", "loc": [94, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L86_C4", "vector": [14, 2, 0.5402, 0.0057, 2, 0.76, 0.5, 792, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.list_forms_ataques", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_forms_ataques = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L95_C8", "label": "self.aux =", "type": "assigned_variable", "loc": [95, 95], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L86_C4", "vector": [14, 2, 0.546, 0.0057, 2, 0.76, 0.6667, 867, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.aux", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.aux = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L97_C8", "label": "for ataque", "type": "for", "loc": [97, 102], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L86_C4", "vector": [6, 2, 0.5718, 0.0345, 2, 0.76, 0.8333, 583, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "ataque", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for ataque in self.get_Attack():\n # Atribui os ataques a lista de formularios enviada como parametro\n for formulario in self.list_forms:\n self.aux.append([formulario,''.join(ataque)])\n self.list_forms_ataques.append([url, self.aux])\t\n self.aux = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L99_C12", "label": "for formulario", "type": "for", "loc": [99, 100], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L97_C8", "vector": [6, 3, 0.5718, 0.0115, 3, 0.55, 0.0, 990, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "formulario", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for formulario in self.list_forms:\n self.aux.append([formulario,''.join(ataque)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L100_C16", "label": "append()", "type": "expression", "loc": [100, 100], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L99_C12", "vector": [8, 4, 0.5747, 0.0057, 4, 0.95, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.aux.append([formulario,''.join(ataque)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L101_C12", "label": "append()", "type": "expression", "loc": [101, 101], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L97_C8", "vector": [8, 3, 0.5805, 0.0057, 3, 0.55, 0.5, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.list_forms_ataques.append([url, self.aux])\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L102_C12", "label": "self.aux =", "type": "assigned_variable", "loc": [102, 102], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L97_C8", "vector": [14, 3, 0.5862, 0.0057, 3, 0.55, 1.0, 867, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.aux", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.aux = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L104_C8", "label": "return", "type": "return", "loc": [104, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L86_C4", "vector": [13, 2, 0.5977, 0.0057, 2, 0.76, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.list_forms_ataques"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L107_C4", "label": "analisa_Resultado", "type": "function", "loc": [107, 139], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "vector": [2, 1, 0.7069, 0.1897, 1, 0.55, 0.9091, 367, 0, 4, 1, 0, 0, 0, 20], "semantic": {"name": "analisa_Resultado", "arg_names": ["self", "html", "url_ataque", "atributo"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def analisa_Resultado (self, html, url_ataque, atributo):\n \"\"\"\n Analisa o codigo HTML da aplicacao, apos o ataque desferido pela classe Exploiter.\n HTML: Codigo-fonte resultante do ataque; URL_ATAQUE: Endereco URL da aplicacao testada; ATRIBUTO: Variavel que sofreu o teste\n \"\"\"\n self.html = str(html)\n self.attack_Result = []\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L108_C8", "label": "expression", "type": "expression", "loc": [108, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L107_C4", "vector": [8, 2, 0.6293, 0.023, 2, 0.38, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Analisa o codigo HTML da aplicacao, apos o ataque desferido pela classe Exploiter.\n HTML: Codigo-fonte resultante do ataque; URL_ATAQUE: Endereco URL da aplicacao testada; ATRIBUTO: Variavel que sofreu o teste\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L112_C8", "label": "self.html = str()", "type": "assigned_variable", "loc": [112, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L107_C4", "vector": [14, 2, 0.6437, 0.0057, 2, 0.38, 0.3333, 339, 3, 1, 0, 0, 52, 10, 1], "semantic": {"name": "self.html", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " self.html = str(html)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L113_C8", "label": "self.attack_Result =", "type": "assigned_variable", "loc": [113, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L107_C4", "vector": [14, 2, 0.6494, 0.0057, 2, 0.38, 0.6667, 657, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.attack_Result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.attack_Result = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L116_C8", "label": "for resp", "type": "for", "loc": [116, 139], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L107_C4", "vector": [6, 2, 0.7328, 0.1379, 2, 0.38, 1.0, 48, 3, 0, 0, 0, 0, 0, 19], "semantic": {"name": "resp", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for resp in self.get_Response():\n # Existe Strings, entao eh vulneravel\n if self.html.find(''.join(resp)) > 0:\n # Concatena as informacoes retorno\n self.attack_Result.append('VULNERAVEL')\n self.attack_Result.append(self.get_Impact())\n self.attack_Result.append(url_ataque)\n self.attack_Result.append(atributo)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "label": "if", "type": "if", "loc": [118, 137], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L116_C8", "vector": [4, 3, 0.7328, 0.1149, 3, 0.57, 0.0, 0, 0, 0, 0, 0, 0, 0, 18], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.html.find(''.join(resp)) > 0:\n # Concatena as informacoes retorno\n self.attack_Result.append('VULNERAVEL')\n self.attack_Result.append(self.get_Impact())\n self.attack_Result.append(url_ataque)\n self.attack_Result.append(atributo)\n self.attack_Result.append(self.get_Mitigation())\n # 1 = Ataque funcionou"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L120_C16", "label": "append()", "type": "expression", "loc": [120, 120], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "vector": [8, 4, 0.6897, 0.0057, 4, 0.96, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append('VULNERAVEL')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L121_C16", "label": "append()", "type": "expression", "loc": [121, 121], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "vector": [8, 4, 0.6954, 0.0057, 4, 0.96, 0.0909, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(self.get_Impact())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L122_C16", "label": "append()", "type": "expression", "loc": [122, 122], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "vector": [8, 4, 0.7011, 0.0057, 4, 0.96, 0.1818, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(url_ataque)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L123_C16", "label": "append()", "type": "expression", "loc": [123, 123], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "vector": [8, 4, 0.7069, 0.0057, 4, 0.96, 0.2727, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(atributo)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L124_C16", "label": "append()", "type": "expression", "loc": [124, 124], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "vector": [8, 4, 0.7126, 0.0057, 4, 0.96, 0.3636, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(self.get_Mitigation())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L126_C16", "label": "append()", "type": "expression", "loc": [126, 126], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "vector": [8, 4, 0.7241, 0.0057, 4, 0.96, 0.4545, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L131_C16", "label": "append()", "type": "expression", "loc": [131, 131], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "vector": [8, 4, 0.7529, 0.0057, 4, 0.96, 0.5455, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append('NAO VULNERAVEL')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L132_C16", "label": "append()", "type": "expression", "loc": [132, 132], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "vector": [8, 4, 0.7586, 0.0057, 4, 0.96, 0.6364, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(self.get_Impact())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L133_C16", "label": "append()", "type": "expression", "loc": [133, 133], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "vector": [8, 4, 0.7644, 0.0057, 4, 0.96, 0.7273, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(url_ataque)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L134_C16", "label": "append()", "type": "expression", "loc": [134, 134], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "vector": [8, 4, 0.7701, 0.0057, 4, 0.96, 0.8182, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(atributo)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L135_C16", "label": "append()", "type": "expression", "loc": [135, 135], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "vector": [8, 4, 0.7759, 0.0057, 4, 0.96, 0.9091, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(self.get_Mitigation())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L137_C16", "label": "append()", "type": "expression", "loc": [137, 137], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "vector": [8, 4, 0.7874, 0.0057, 4, 0.96, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L139_C12", "label": "return", "type": "return", "loc": [139, 139], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L116_C8", "vector": [13, 3, 0.7989, 0.0057, 3, 0.57, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.attack_Result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L142_C4", "label": "gerar_Ataques", "type": "function", "loc": [142, 174], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "vector": [2, 1, 0.908, 0.1897, 1, 0.55, 1.0, 384, 0, 2, 1, 0, 0, 0, 6], "semantic": {"name": "gerar_Ataques", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def gerar_Ataques (self, url):\n \"\"\"\n Recebe por parametro uma lista de URLs com atributos e monta uma lista de ataques em cima de cada atributo contido na URL.\n \"\"\"\n # Define a lista de URLs\n self.URL_List_Target = []\n self.URL_List_Target = url\n # Define a lista de ataques para cada uma das URLs"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L143_C8", "label": "expression", "type": "expression", "loc": [143, 145], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L142_C4", "vector": [8, 2, 0.8276, 0.0172, 2, 0.64, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Recebe por parametro uma lista de URLs com atributos e monta uma lista de ataques em cima de cada atributo contido na URL.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L147_C8", "label": "self.URL_List_Target =", "type": "assigned_variable", "loc": [147, 147], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L142_C4", "vector": [14, 2, 0.8448, 0.0057, 2, 0.64, 0.2, 266, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.URL_List_Target", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.URL_List_Target = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L148_C8", "label": "self.URL_List_Target =", "type": "assigned_variable", "loc": [148, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L142_C4", "vector": [14, 2, 0.8506, 0.0057, 2, 0.64, 0.4, 266, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.URL_List_Target", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.URL_List_Target = url"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L150_C8", "label": "self.lista_ataques_gerados =", "type": "assigned_variable", "loc": [150, 150], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L142_C4", "vector": [14, 2, 0.8621, 0.0057, 2, 0.64, 0.6, 530, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.lista_ataques_gerados", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.lista_ataques_gerados = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L152_C8", "label": "for URL_Target", "type": "for", "loc": [152, 171], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L142_C4", "vector": [6, 2, 0.9282, 0.1149, 2, 0.64, 0.8, 818, 7, 0, 0, 0, 0, 0, 6], "semantic": {"name": "URL_Target", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for URL_Target in self.URL_List_Target:\n self.url_attack_parse = urlparse(URL_Target)\n self.url_parse_base = self.url_attack_parse.scheme + \"://\" + self.url_attack_parse.netloc + self.url_attack_parse.path + \"?\"\n self.url_atributos_ataques = []\n self.atributo_ataque = []\n self.lista_var = []\n self.lista_var = self.url_attack_parse.query.split('&')\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L153_C12", "label": "self.url_attack_parse = urlparse()", "type": "assigned_variable", "loc": [153, 153], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L152_C8", "vector": [14, 3, 0.8793, 0.0057, 3, 0.09, 0.0, 616, 3, 1, 0, 0, 857, 10, 1], "semantic": {"name": "self.url_attack_parse", "arg_names": [], "import_names": [], "rhs_call_name": "urlparse", "annotation": ""}, "snippet": " self.url_attack_parse = urlparse(URL_Target)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L154_C12", "label": "self.url_parse_base =", "type": "assigned_variable", "loc": [154, 154], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L152_C8", "vector": [14, 3, 0.8851, 0.0057, 3, 0.09, 0.1667, 359, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.url_parse_base", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_parse_base = self.url_attack_parse.scheme + \"://\" + self.url_attack_parse.netloc + self.url_attack_parse.path + \"?\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L155_C12", "label": "self.url_atributos_ataques =", "type": "assigned_variable", "loc": [155, 155], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L152_C8", "vector": [14, 3, 0.8908, 0.0057, 3, 0.09, 0.3333, 534, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.url_atributos_ataques", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_atributos_ataques = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L156_C12", "label": "self.atributo_ataque =", "type": "assigned_variable", "loc": [156, 156], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L152_C8", "vector": [14, 3, 0.8966, 0.0057, 3, 0.09, 0.5, 395, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.atributo_ataque", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atributo_ataque = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L157_C12", "label": "self.lista_var =", "type": "assigned_variable", "loc": [157, 157], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L152_C8", "vector": [14, 3, 0.9023, 0.0057, 3, 0.09, 0.6667, 775, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.lista_var", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.lista_var = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L158_C12", "label": "self.lista_var = split()", "type": "assigned_variable", "loc": [158, 158], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L152_C8", "vector": [14, 3, 0.908, 0.0057, 3, 0.09, 0.8333, 775, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "self.lista_var", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " self.lista_var = self.url_attack_parse.query.split('&')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L161_C12", "label": "for atributo", "type": "for", "loc": [161, 171], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L152_C8", "vector": [6, 3, 0.954, 0.0632, 3, 0.09, 1.0, 880, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "atributo", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for atributo in self.url_attack_parse.query.split('&'):\n self.str_var_fix = \"\" \n for var_fix in self.lista_var:\n if var_fix == atributo:\n pass\n else:\n self.str_var_fix = self.str_var_fix + \"&\" + var_fix\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L162_C16", "label": "self.str_var_fix =", "type": "assigned_variable", "loc": [162, 162], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L161_C12", "vector": [14, 4, 0.931, 0.0057, 4, 0.65, 0.0, 654, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.str_var_fix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.str_var_fix = \"\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L163_C16", "label": "for var_fix", "type": "for", "loc": [163, 167], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L161_C12", "vector": [6, 4, 0.9483, 0.0287, 4, 0.65, 0.5, 894, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "var_fix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for var_fix in self.lista_var:\n if var_fix == atributo:\n pass\n else:\n self.str_var_fix = self.str_var_fix + \"&\" + var_fix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L164_C20", "label": "if", "type": "if", "loc": [164, 167], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L163_C16", "vector": [4, 5, 0.9511, 0.023, 5, 0.16, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if var_fix == atributo:\n pass\n else:\n self.str_var_fix = self.str_var_fix + \"&\" + var_fix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L167_C24", "label": "self.str_var_fix =", "type": "assigned_variable", "loc": [167, 167], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L164_C20", "vector": [14, 6, 0.9598, 0.0057, 6, 0.47, 0.0, 654, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.str_var_fix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.str_var_fix = self.str_var_fix + \"&\" + var_fix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L170_C16", "label": "for atack", "type": "for", "loc": [170, 171], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L161_C12", "vector": [6, 4, 0.9799, 0.0115, 4, 0.65, 1.0, 893, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "atack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for atack in self.get_Attack():\n self.lista_ataques_gerados.append([self.url_parse_base + atributo + ''.join(atack) + self.str_var_fix, atributo])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L171_C20", "label": "append()", "type": "expression", "loc": [171, 171], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L170_C16", "vector": [8, 5, 0.9828, 0.0057, 5, 0.47, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.lista_ataques_gerados.append([self.url_parse_base + atributo + ''.join(atack) + self.str_var_fix, atributo])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L174_C8", "label": "return", "type": "return", "loc": [174, 174], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L142_C4", "vector": [13, 2, 1.0, 0.0057, 2, 0.64, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.lista_ataques_gerados"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L66_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L75_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L81_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L86_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L87_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L93_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L95_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L97_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L99_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L99_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L100_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L97_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L101_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L97_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L102_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L107_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L112_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L113_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L116_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L116_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L120_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L121_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L122_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L123_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L124_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L126_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L131_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L132_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L133_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L134_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L135_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L137_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L116_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L139_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L142_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L142_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L143_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L142_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L142_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L148_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L142_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L150_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L142_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L152_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L153_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L154_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L155_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L156_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L157_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L158_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L161_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L161_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L162_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L161_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L163_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L163_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L164_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:If_L164_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Assign_L167_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L161_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L170_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:For_L170_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Expr_L171_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1449:FunctionDef_L142_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1449:Return_L174_C8"}]
#!/usr/bin/env python import urllib,requests,urllib2,socket,mechanize from urlparse import urlsplit,urlparse,urlunparse,urljoin from Data import Data_Access ######################################################################## # CLASSE PLUGINSQL FILHO DE PLUGINS class PluginSQL (object): """ Responsavel por montar e analisar ataques de Injecao de Comandos SQL """ #---------------------------------------------------------------------- def __init__(self): """ Constructor """ self.data_Access = Data_Access(1, "PL_SQLINJECTION") self.attack_Name = "SQL Injection" self.attack_Criticity = "High" #---------------------------------------------------------------------- def get_Attack (self): """ Retorna os ataques que estao no Banco de Dados """ return self.data_Access.getAttack() #---------------------------------------------------------------------- def get_Mitigation (self): """ Retorna as mitigacoes que estao no Banco de Dados """ return self.data_Access.getMitigation() #---------------------------------------------------------------------- def get_Impact (self): """ Retorna o nome da vulnerabilidade """ return self.attack_Criticity #---------------------------------------------------------------------- def get_Response (self): """ Retorna as respostas que estao no Banco de Dados """ return self.data_Access.getResponse() #---------------------------------------------------------------------- def get_Vulnerability (self): """ Retorna o nome da vulnerabilidade """ return self.attack_Name #---------------------------------------------------------------------- def get_Attack_Monted (self, url): """ Retorna a URL concatenada com o ataque """ self.atack_monted = [] for atack in self.getAttack(): self.atack_monted.append(url + ''.join(atack)) return self.atack_monted #---------------------------------------------------------------------- def mount_URL_Attack (self, url): """ Ataque via URL GET """ self.url_attack_parse = urlparse(url) self.url_parse_base = self.url_attack_parse.scheme + "://" + self.url_attack_parse.netloc + self.url_attack_parse.path + "?" self.url_atributos_ataques = [] self.atributo_ataque = [] # Pega todos os atributos da URL e os separa em uma lista self.urls_att = [] self.urls_att.append('&'.rpartition(self.url_attack_parse.query)) #---------------------------------------------------------------------- def gen_Form_Attack(self, list_forms, url): """" Realiza uma chamada ao banco de dados para obter a lista de ataques e os inclui nos formularios. LIST_FORMS: Lista contendo os nomes dos formularios presentes na pagina testada URL: Endereco URL testado """ self.list_forms = [] self.list_forms = list_forms self.list_forms_ataques = [] self.aux = [] for ataque in self.get_Attack(): # Atribui os ataques a lista de formularios enviada como parametro for formulario in self.list_forms: self.aux.append([formulario,''.join(ataque)]) self.list_forms_ataques.append([url, self.aux]) self.aux = [] # Retorna uma lista de formularios ja contendo os ataques return self.list_forms_ataques #---------------------------------------------------------------------- def analisa_Resultado (self, html, url_ataque, atributo): """ Analisa o codigo HTML da aplicacao, apos o ataque desferido pela classe Exploiter. HTML: Codigo-fonte resultante do ataque; URL_ATAQUE: Endereco URL da aplicacao testada; ATRIBUTO: Variavel que sofreu o teste """ self.html = str(html) self.attack_Result = [] # Verifica no codigo-fonte HTML a presenca de Strings Error Based SQL Injection for resp in self.get_Response(): # Existe Strings, entao eh vulneravel if self.html.find(''.join(resp)) > 0: # Concatena as informacoes retorno self.attack_Result.append('VULNERAVEL') self.attack_Result.append(self.get_Impact()) self.attack_Result.append(url_ataque) self.attack_Result.append(atributo) self.attack_Result.append(self.get_Mitigation()) # 1 = Ataque funcionou self.attack_Result.append(True) # Nao existe Strings, logo nao eh vulneravel a Error Based SQL Injection else: # Concatena as informacoes retorno self.attack_Result.append('NAO VULNERAVEL') self.attack_Result.append(self.get_Impact()) self.attack_Result.append(url_ataque) self.attack_Result.append(atributo) self.attack_Result.append(self.get_Mitigation()) # 0 = Ataque nao funcionou self.attack_Result.append(False) return self.attack_Result #---------------------------------------------------------------------- def gerar_Ataques (self, url): """ Recebe por parametro uma lista de URLs com atributos e monta uma lista de ataques em cima de cada atributo contido na URL. """ # Define a lista de URLs self.URL_List_Target = [] self.URL_List_Target = url # Define a lista de ataques para cada uma das URLs self.lista_ataques_gerados = [] for URL_Target in self.URL_List_Target: self.url_attack_parse = urlparse(URL_Target) self.url_parse_base = self.url_attack_parse.scheme + "://" + self.url_attack_parse.netloc + self.url_attack_parse.path + "?" self.url_atributos_ataques = [] self.atributo_ataque = [] self.lista_var = [] self.lista_var = self.url_attack_parse.query.split('&') # Pega todos os atributos da URL e os separa em uma lista for atributo in self.url_attack_parse.query.split('&'): self.str_var_fix = "" for var_fix in self.lista_var: if var_fix == atributo: pass else: self.str_var_fix = self.str_var_fix + "&" + var_fix # Faz uma chamada ao banco de dados para obter a String de ataque e a concatena ao atributo for atack in self.get_Attack(): self.lista_ataques_gerados.append([self.url_parse_base + atributo + ''.join(atack) + self.str_var_fix, atributo]) # Retorna a lista de ataques gerados pelo metodo return self.lista_ataques_gerados
ajibawa-2023/Python-Code-Large/train/row_1451
90
174
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Import_L2_C0", "label": "urllib import urllib, requests, urllib2\u2026", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0115, 0.0057, 0, 0.66, 0.0, 614, 0, 5, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib", "requests", "urllib2", "socket", "mechanize"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urllib,requests,urllib2,socket,mechanize"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:ImportFrom_L3_C0", "label": "from urlparse import urlsplit, urlparse, urlunparse\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0172, 0.0057, 0, 0.66, 0.3333, 857, 0, 4, 0, 0, 857, 0, 0], "semantic": {"name": "urlparse", "arg_names": [], "import_names": ["urlsplit", "urlparse", "urlunparse", "urljoin"], "rhs_call_name": "", "annotation": ""}, "snippet": "from urlparse import urlsplit,urlparse,urlunparse,urljoin"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:ImportFrom_L4_C0", "label": "from Data import Data_Access", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.023, 0.0057, 0, 0.66, 0.6667, 467, 0, 1, 0, 0, 467, 0, 0], "semantic": {"name": "Data", "arg_names": [], "import_names": ["Data_Access"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Data import Data_Access"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "label": "PluginSQL", "type": "class", "loc": [8, 174], "level": 0, "parent": null, "vector": [3, 0, 0.523, 0.9598, 0, 0.66, 1.0, 743, 0, 11, 0, 0, 186, 0, 40], "semantic": {"name": "PluginSQL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class PluginSQL (object):\n \"\"\"\n Responsavel por montar e analisar ataques de Injecao de Comandos SQL\n \"\"\" \n #----------------------------------------------------------------------\n def __init__(self):\n \"\"\"\n Constructor"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L9_C4", "label": "expression", "type": "expression", "loc": [9, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "vector": [8, 1, 0.0575, 0.0172, 1, 0.6, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Responsavel por montar e analisar ataques de Injecao de Comandos SQL\n \"\"\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L13_C4", "label": "__init__", "type": "function", "loc": [13, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "vector": [2, 1, 0.092, 0.0402, 1, 0.6, 0.0909, 555, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self):\n \"\"\"\n Constructor\n \"\"\"\n self.data_Access = Data_Access(1, \"PL_SQLINJECTION\") \n self.attack_Name = \"SQL Injection\"\n self.attack_Criticity = \"High\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L14_C8", "label": "expression", "type": "expression", "loc": [14, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L13_C4", "vector": [8, 2, 0.0862, 0.0172, 2, 0.37, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Constructor\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L17_C8", "label": "self.data_Access = Data_Access()", "type": "assigned_variable", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L13_C4", "vector": [14, 2, 0.0977, 0.0057, 2, 0.37, 0.3333, 923, 3, 2, 0, 0, 671, 10, 1], "semantic": {"name": "self.data_Access", "arg_names": [], "import_names": [], "rhs_call_name": "Data_Access", "annotation": ""}, "snippet": " self.data_Access = Data_Access(1, \"PL_SQLINJECTION\") "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L18_C8", "label": "self.attack_Name =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L13_C4", "vector": [14, 2, 0.1034, 0.0057, 2, 0.37, 0.6667, 164, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.attack_Name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.attack_Name = \"SQL Injection\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L19_C8", "label": "self.attack_Criticity =", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L13_C4", "vector": [14, 2, 0.1092, 0.0057, 2, 0.37, 1.0, 681, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.attack_Criticity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.attack_Criticity = \"High\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L22_C4", "label": "get_Attack", "type": "function", "loc": [22, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "vector": [2, 1, 0.1379, 0.0287, 1, 0.6, 0.1818, 859, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_Attack", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Attack (self):\n \"\"\"\n Retorna os ataques que estao no Banco de Dados\n \"\"\"\n return self.data_Access.getAttack()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L23_C8", "label": "expression", "type": "expression", "loc": [23, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L22_C4", "vector": [8, 2, 0.1379, 0.0172, 2, 0.33, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna os ataques que estao no Banco de Dados\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L26_C8", "label": "return", "type": "return", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L22_C4", "vector": [13, 2, 0.1494, 0.0057, 2, 0.33, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.data_Access.getAttack()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L30_C4", "label": "get_Mitigation", "type": "function", "loc": [30, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "vector": [2, 1, 0.1839, 0.0287, 1, 0.6, 0.2727, 460, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_Mitigation", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Mitigation (self):\n \"\"\"\n Retorna as mitigacoes que estao no Banco de Dados\n \"\"\"\n return self.data_Access.getMitigation()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L31_C8", "label": "expression", "type": "expression", "loc": [31, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L30_C4", "vector": [8, 2, 0.1839, 0.0172, 2, 0.41, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna as mitigacoes que estao no Banco de Dados\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L34_C8", "label": "return", "type": "return", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L30_C4", "vector": [13, 2, 0.1954, 0.0057, 2, 0.41, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.data_Access.getMitigation()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L37_C4", "label": "get_Impact", "type": "function", "loc": [37, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "vector": [2, 1, 0.2241, 0.0287, 1, 0.6, 0.3636, 574, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "get_Impact", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Impact (self):\n \"\"\"\n Retorna o nome da vulnerabilidade\n \"\"\"\n return self.attack_Criticity"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L38_C8", "label": "expression", "type": "expression", "loc": [38, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L37_C4", "vector": [8, 2, 0.2241, 0.0172, 2, 0.25, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna o nome da vulnerabilidade\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L41_C8", "label": "return", "type": "return", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L37_C4", "vector": [13, 2, 0.2356, 0.0057, 2, 0.25, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.attack_Criticity"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L44_C4", "label": "get_Response", "type": "function", "loc": [44, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "vector": [2, 1, 0.2644, 0.0287, 1, 0.6, 0.4545, 877, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_Response", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Response (self):\n \"\"\"\n Retorna as respostas que estao no Banco de Dados\n \"\"\"\n return self.data_Access.getResponse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L45_C8", "label": "expression", "type": "expression", "loc": [45, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L44_C4", "vector": [8, 2, 0.2644, 0.0172, 2, 0.81, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna as respostas que estao no Banco de Dados\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L48_C8", "label": "return", "type": "return", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L44_C4", "vector": [13, 2, 0.2759, 0.0057, 2, 0.81, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.data_Access.getResponse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L51_C4", "label": "get_Vulnerability", "type": "function", "loc": [51, 55], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "vector": [2, 1, 0.3046, 0.0287, 1, 0.6, 0.5455, 688, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "get_Vulnerability", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Vulnerability (self):\n \"\"\"\n Retorna o nome da vulnerabilidade\n \"\"\"\n return self.attack_Name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L52_C8", "label": "expression", "type": "expression", "loc": [52, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L51_C4", "vector": [8, 2, 0.3046, 0.0172, 2, 0.06, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna o nome da vulnerabilidade\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L55_C8", "label": "return", "type": "return", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L51_C4", "vector": [13, 2, 0.3161, 0.0057, 2, 0.06, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.attack_Name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L59_C4", "label": "get_Attack_Monted", "type": "function", "loc": [59, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "vector": [2, 1, 0.3649, 0.0575, 1, 0.6, 0.6364, 931, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "get_Attack_Monted", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Attack_Monted (self, url):\n \"\"\"\n Retorna a URL concatenada com o ataque\n \"\"\"\n self.atack_monted = []\n \n for atack in self.getAttack():\n self.atack_monted.append(url + ''.join(atack))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L60_C8", "label": "expression", "type": "expression", "loc": [60, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L59_C4", "vector": [8, 2, 0.3506, 0.0172, 2, 0.19, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna a URL concatenada com o ataque\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L63_C8", "label": "self.atack_monted =", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L59_C4", "vector": [14, 2, 0.3621, 0.0057, 2, 0.19, 0.3333, 87, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.atack_monted", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atack_monted = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L65_C8", "label": "for atack", "type": "for", "loc": [65, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L59_C4", "vector": [6, 2, 0.3764, 0.0115, 2, 0.19, 0.6667, 893, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "atack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for atack in self.getAttack():\n self.atack_monted.append(url + ''.join(atack))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L66_C12", "label": "append()", "type": "expression", "loc": [66, 66], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L65_C8", "vector": [8, 3, 0.3793, 0.0057, 3, 0.03, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.atack_monted.append(url + ''.join(atack))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L68_C8", "label": "return", "type": "return", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L59_C4", "vector": [13, 2, 0.3908, 0.0057, 2, 0.19, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.atack_monted"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L71_C4", "label": "mount_URL_Attack", "type": "function", "loc": [71, 82], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "vector": [2, 1, 0.4397, 0.069, 1, 0.6, 0.7273, 145, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "mount_URL_Attack", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def mount_URL_Attack (self, url):\n \"\"\"\n Ataque via URL GET\n \"\"\"\n self.url_attack_parse = urlparse(url)\n self.url_parse_base = self.url_attack_parse.scheme + \"://\" + self.url_attack_parse.netloc + self.url_attack_parse.path + \"?\"\n self.url_atributos_ataques = []\n self.atributo_ataque = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L72_C8", "label": "expression", "type": "expression", "loc": [72, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L71_C4", "vector": [8, 2, 0.4195, 0.0172, 2, 0.34, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Ataque via URL GET\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L75_C8", "label": "self.url_attack_parse = urlparse()", "type": "assigned_variable", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L71_C4", "vector": [14, 2, 0.431, 0.0057, 2, 0.34, 0.1667, 616, 3, 1, 0, 0, 857, 10, 1], "semantic": {"name": "self.url_attack_parse", "arg_names": [], "import_names": [], "rhs_call_name": "urlparse", "annotation": ""}, "snippet": " self.url_attack_parse = urlparse(url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L76_C8", "label": "self.url_parse_base =", "type": "assigned_variable", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L71_C4", "vector": [14, 2, 0.4368, 0.0057, 2, 0.34, 0.3333, 359, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.url_parse_base", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_parse_base = self.url_attack_parse.scheme + \"://\" + self.url_attack_parse.netloc + self.url_attack_parse.path + \"?\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L77_C8", "label": "self.url_atributos_ataques =", "type": "assigned_variable", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L71_C4", "vector": [14, 2, 0.4425, 0.0057, 2, 0.34, 0.5, 534, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.url_atributos_ataques", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_atributos_ataques = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L78_C8", "label": "self.atributo_ataque =", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L71_C4", "vector": [14, 2, 0.4483, 0.0057, 2, 0.34, 0.6667, 395, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.atributo_ataque", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atributo_ataque = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L81_C8", "label": "self.urls_att =", "type": "assigned_variable", "loc": [81, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L71_C4", "vector": [14, 2, 0.4655, 0.0057, 2, 0.34, 0.8333, 470, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.urls_att", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.urls_att = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L82_C8", "label": "append()", "type": "expression", "loc": [82, 82], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L71_C4", "vector": [8, 2, 0.4713, 0.0057, 2, 0.34, 1.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.urls_att.append('&'.rpartition(self.url_attack_parse.query))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L86_C4", "label": "gen_Form_Attack", "type": "function", "loc": [86, 104], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "vector": [2, 1, 0.546, 0.1092, 1, 0.6, 0.8182, 44, 0, 3, 1, 0, 0, 0, 4], "semantic": {"name": "gen_Form_Attack", "arg_names": ["self", "list_forms", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def gen_Form_Attack(self, list_forms, url):\n \"\"\"\"\n Realiza uma chamada ao banco de dados para obter a lista de ataques e os inclui nos formularios.\n LIST_FORMS: Lista contendo os nomes dos formularios presentes na pagina testada\n URL: Endereco URL testado\n \"\"\"\n self.list_forms = []\n self.list_forms = list_forms"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L87_C8", "label": "expression", "type": "expression", "loc": [87, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L86_C4", "vector": [8, 2, 0.5115, 0.0287, 2, 0.9, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\"\n Realiza uma chamada ao banco de dados para obter a lista de ataques e os inclui nos formularios.\n LIST_FORMS: Lista contendo os nomes dos formularios presentes na pagina testada\n URL: Endereco URL testado\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L92_C8", "label": "self.list_forms =", "type": "assigned_variable", "loc": [92, 92], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L86_C4", "vector": [14, 2, 0.5287, 0.0057, 2, 0.9, 0.1667, 826, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.list_forms", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_forms = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L93_C8", "label": "self.list_forms =", "type": "assigned_variable", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L86_C4", "vector": [14, 2, 0.5345, 0.0057, 2, 0.9, 0.3333, 826, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.list_forms", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_forms = list_forms"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L94_C8", "label": "self.list_forms_ataques =", "type": "assigned_variable", "loc": [94, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L86_C4", "vector": [14, 2, 0.5402, 0.0057, 2, 0.9, 0.5, 792, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.list_forms_ataques", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_forms_ataques = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L95_C8", "label": "self.aux =", "type": "assigned_variable", "loc": [95, 95], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L86_C4", "vector": [14, 2, 0.546, 0.0057, 2, 0.9, 0.6667, 867, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.aux", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.aux = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L97_C8", "label": "for ataque", "type": "for", "loc": [97, 102], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L86_C4", "vector": [6, 2, 0.5718, 0.0345, 2, 0.9, 0.8333, 583, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "ataque", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for ataque in self.get_Attack():\n # Atribui os ataques a lista de formularios enviada como parametro\n for formulario in self.list_forms:\n self.aux.append([formulario,''.join(ataque)])\n self.list_forms_ataques.append([url, self.aux])\t\n self.aux = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L99_C12", "label": "for formulario", "type": "for", "loc": [99, 100], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L97_C8", "vector": [6, 3, 0.5718, 0.0115, 3, 0.99, 0.0, 990, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "formulario", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for formulario in self.list_forms:\n self.aux.append([formulario,''.join(ataque)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L100_C16", "label": "append()", "type": "expression", "loc": [100, 100], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L99_C12", "vector": [8, 4, 0.5747, 0.0057, 4, 0.35, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.aux.append([formulario,''.join(ataque)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L101_C12", "label": "append()", "type": "expression", "loc": [101, 101], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L97_C8", "vector": [8, 3, 0.5805, 0.0057, 3, 0.99, 0.5, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.list_forms_ataques.append([url, self.aux])\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L102_C12", "label": "self.aux =", "type": "assigned_variable", "loc": [102, 102], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L97_C8", "vector": [14, 3, 0.5862, 0.0057, 3, 0.99, 1.0, 867, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.aux", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.aux = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L104_C8", "label": "return", "type": "return", "loc": [104, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L86_C4", "vector": [13, 2, 0.5977, 0.0057, 2, 0.9, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.list_forms_ataques"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L107_C4", "label": "analisa_Resultado", "type": "function", "loc": [107, 139], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "vector": [2, 1, 0.7069, 0.1897, 1, 0.6, 0.9091, 367, 0, 4, 1, 0, 0, 0, 20], "semantic": {"name": "analisa_Resultado", "arg_names": ["self", "html", "url_ataque", "atributo"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def analisa_Resultado (self, html, url_ataque, atributo):\n \"\"\"\n Analisa o codigo HTML da aplicacao, apos o ataque desferido pela classe Exploiter.\n HTML: Codigo-fonte resultante do ataque; URL_ATAQUE: Endereco URL da aplicacao testada; ATRIBUTO: Variavel que sofreu o teste\n \"\"\"\n self.html = str(html)\n self.attack_Result = []\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L108_C8", "label": "expression", "type": "expression", "loc": [108, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L107_C4", "vector": [8, 2, 0.6293, 0.023, 2, 0.03, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Analisa o codigo HTML da aplicacao, apos o ataque desferido pela classe Exploiter.\n HTML: Codigo-fonte resultante do ataque; URL_ATAQUE: Endereco URL da aplicacao testada; ATRIBUTO: Variavel que sofreu o teste\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L112_C8", "label": "self.html = str()", "type": "assigned_variable", "loc": [112, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L107_C4", "vector": [14, 2, 0.6437, 0.0057, 2, 0.03, 0.3333, 339, 3, 1, 0, 0, 52, 10, 1], "semantic": {"name": "self.html", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " self.html = str(html)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L113_C8", "label": "self.attack_Result =", "type": "assigned_variable", "loc": [113, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L107_C4", "vector": [14, 2, 0.6494, 0.0057, 2, 0.03, 0.6667, 657, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.attack_Result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.attack_Result = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L116_C8", "label": "for resp", "type": "for", "loc": [116, 139], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L107_C4", "vector": [6, 2, 0.7328, 0.1379, 2, 0.03, 1.0, 48, 3, 0, 0, 0, 0, 0, 19], "semantic": {"name": "resp", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for resp in self.get_Response():\n # Existe Strings, entao eh vulneravel\n if self.html.find(''.join(resp)) > 0:\n # Concatena as informacoes retorno\n self.attack_Result.append('VULNERAVEL')\n self.attack_Result.append(self.get_Impact())\n self.attack_Result.append(url_ataque)\n self.attack_Result.append(atributo)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "label": "if", "type": "if", "loc": [118, 137], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L116_C8", "vector": [4, 3, 0.7328, 0.1149, 3, 0.51, 0.0, 0, 0, 0, 0, 0, 0, 0, 18], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.html.find(''.join(resp)) > 0:\n # Concatena as informacoes retorno\n self.attack_Result.append('VULNERAVEL')\n self.attack_Result.append(self.get_Impact())\n self.attack_Result.append(url_ataque)\n self.attack_Result.append(atributo)\n self.attack_Result.append(self.get_Mitigation())\n # 1 = Ataque funcionou"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L120_C16", "label": "append()", "type": "expression", "loc": [120, 120], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "vector": [8, 4, 0.6897, 0.0057, 4, 0.9, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append('VULNERAVEL')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L121_C16", "label": "append()", "type": "expression", "loc": [121, 121], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "vector": [8, 4, 0.6954, 0.0057, 4, 0.9, 0.0909, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(self.get_Impact())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L122_C16", "label": "append()", "type": "expression", "loc": [122, 122], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "vector": [8, 4, 0.7011, 0.0057, 4, 0.9, 0.1818, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(url_ataque)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L123_C16", "label": "append()", "type": "expression", "loc": [123, 123], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "vector": [8, 4, 0.7069, 0.0057, 4, 0.9, 0.2727, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(atributo)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L124_C16", "label": "append()", "type": "expression", "loc": [124, 124], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "vector": [8, 4, 0.7126, 0.0057, 4, 0.9, 0.3636, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(self.get_Mitigation())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L126_C16", "label": "append()", "type": "expression", "loc": [126, 126], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "vector": [8, 4, 0.7241, 0.0057, 4, 0.9, 0.4545, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L131_C16", "label": "append()", "type": "expression", "loc": [131, 131], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "vector": [8, 4, 0.7529, 0.0057, 4, 0.9, 0.5455, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append('NAO VULNERAVEL')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L132_C16", "label": "append()", "type": "expression", "loc": [132, 132], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "vector": [8, 4, 0.7586, 0.0057, 4, 0.9, 0.6364, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(self.get_Impact())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L133_C16", "label": "append()", "type": "expression", "loc": [133, 133], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "vector": [8, 4, 0.7644, 0.0057, 4, 0.9, 0.7273, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(url_ataque)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L134_C16", "label": "append()", "type": "expression", "loc": [134, 134], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "vector": [8, 4, 0.7701, 0.0057, 4, 0.9, 0.8182, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(atributo)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L135_C16", "label": "append()", "type": "expression", "loc": [135, 135], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "vector": [8, 4, 0.7759, 0.0057, 4, 0.9, 0.9091, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(self.get_Mitigation())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L137_C16", "label": "append()", "type": "expression", "loc": [137, 137], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "vector": [8, 4, 0.7874, 0.0057, 4, 0.9, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L139_C12", "label": "return", "type": "return", "loc": [139, 139], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L116_C8", "vector": [13, 3, 0.7989, 0.0057, 3, 0.51, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.attack_Result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L142_C4", "label": "gerar_Ataques", "type": "function", "loc": [142, 174], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "vector": [2, 1, 0.908, 0.1897, 1, 0.6, 1.0, 384, 0, 2, 1, 0, 0, 0, 6], "semantic": {"name": "gerar_Ataques", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def gerar_Ataques (self, url):\n \"\"\"\n Recebe por parametro uma lista de URLs com atributos e monta uma lista de ataques em cima de cada atributo contido na URL.\n \"\"\"\n # Define a lista de URLs\n self.URL_List_Target = []\n self.URL_List_Target = url\n # Define a lista de ataques para cada uma das URLs"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L143_C8", "label": "expression", "type": "expression", "loc": [143, 145], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L142_C4", "vector": [8, 2, 0.8276, 0.0172, 2, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Recebe por parametro uma lista de URLs com atributos e monta uma lista de ataques em cima de cada atributo contido na URL.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L147_C8", "label": "self.URL_List_Target =", "type": "assigned_variable", "loc": [147, 147], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L142_C4", "vector": [14, 2, 0.8448, 0.0057, 2, 0.66, 0.2, 266, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.URL_List_Target", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.URL_List_Target = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L148_C8", "label": "self.URL_List_Target =", "type": "assigned_variable", "loc": [148, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L142_C4", "vector": [14, 2, 0.8506, 0.0057, 2, 0.66, 0.4, 266, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.URL_List_Target", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.URL_List_Target = url"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L150_C8", "label": "self.lista_ataques_gerados =", "type": "assigned_variable", "loc": [150, 150], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L142_C4", "vector": [14, 2, 0.8621, 0.0057, 2, 0.66, 0.6, 530, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.lista_ataques_gerados", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.lista_ataques_gerados = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L152_C8", "label": "for URL_Target", "type": "for", "loc": [152, 171], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L142_C4", "vector": [6, 2, 0.9282, 0.1149, 2, 0.66, 0.8, 818, 7, 0, 0, 0, 0, 0, 6], "semantic": {"name": "URL_Target", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for URL_Target in self.URL_List_Target:\n self.url_attack_parse = urlparse(URL_Target)\n self.url_parse_base = self.url_attack_parse.scheme + \"://\" + self.url_attack_parse.netloc + self.url_attack_parse.path + \"?\"\n self.url_atributos_ataques = []\n self.atributo_ataque = []\n self.lista_var = []\n self.lista_var = self.url_attack_parse.query.split('&')\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L153_C12", "label": "self.url_attack_parse = urlparse()", "type": "assigned_variable", "loc": [153, 153], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L152_C8", "vector": [14, 3, 0.8793, 0.0057, 3, 0.78, 0.0, 616, 3, 1, 0, 0, 857, 10, 1], "semantic": {"name": "self.url_attack_parse", "arg_names": [], "import_names": [], "rhs_call_name": "urlparse", "annotation": ""}, "snippet": " self.url_attack_parse = urlparse(URL_Target)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L154_C12", "label": "self.url_parse_base =", "type": "assigned_variable", "loc": [154, 154], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L152_C8", "vector": [14, 3, 0.8851, 0.0057, 3, 0.78, 0.1667, 359, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.url_parse_base", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_parse_base = self.url_attack_parse.scheme + \"://\" + self.url_attack_parse.netloc + self.url_attack_parse.path + \"?\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L155_C12", "label": "self.url_atributos_ataques =", "type": "assigned_variable", "loc": [155, 155], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L152_C8", "vector": [14, 3, 0.8908, 0.0057, 3, 0.78, 0.3333, 534, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.url_atributos_ataques", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_atributos_ataques = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L156_C12", "label": "self.atributo_ataque =", "type": "assigned_variable", "loc": [156, 156], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L152_C8", "vector": [14, 3, 0.8966, 0.0057, 3, 0.78, 0.5, 395, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.atributo_ataque", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atributo_ataque = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L157_C12", "label": "self.lista_var =", "type": "assigned_variable", "loc": [157, 157], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L152_C8", "vector": [14, 3, 0.9023, 0.0057, 3, 0.78, 0.6667, 775, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.lista_var", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.lista_var = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L158_C12", "label": "self.lista_var = split()", "type": "assigned_variable", "loc": [158, 158], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L152_C8", "vector": [14, 3, 0.908, 0.0057, 3, 0.78, 0.8333, 775, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "self.lista_var", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " self.lista_var = self.url_attack_parse.query.split('&')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L161_C12", "label": "for atributo", "type": "for", "loc": [161, 171], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L152_C8", "vector": [6, 3, 0.954, 0.0632, 3, 0.78, 1.0, 880, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "atributo", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for atributo in self.url_attack_parse.query.split('&'):\n self.str_var_fix = \"\" \n for var_fix in self.lista_var:\n if var_fix == atributo:\n pass\n else:\n self.str_var_fix = self.str_var_fix + \"&\" + var_fix\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L162_C16", "label": "self.str_var_fix =", "type": "assigned_variable", "loc": [162, 162], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L161_C12", "vector": [14, 4, 0.931, 0.0057, 4, 0.46, 0.0, 654, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.str_var_fix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.str_var_fix = \"\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L163_C16", "label": "for var_fix", "type": "for", "loc": [163, 167], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L161_C12", "vector": [6, 4, 0.9483, 0.0287, 4, 0.46, 0.5, 894, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "var_fix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for var_fix in self.lista_var:\n if var_fix == atributo:\n pass\n else:\n self.str_var_fix = self.str_var_fix + \"&\" + var_fix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L164_C20", "label": "if", "type": "if", "loc": [164, 167], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L163_C16", "vector": [4, 5, 0.9511, 0.023, 5, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if var_fix == atributo:\n pass\n else:\n self.str_var_fix = self.str_var_fix + \"&\" + var_fix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L167_C24", "label": "self.str_var_fix =", "type": "assigned_variable", "loc": [167, 167], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L164_C20", "vector": [14, 6, 0.9598, 0.0057, 6, 0.02, 0.0, 654, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.str_var_fix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.str_var_fix = self.str_var_fix + \"&\" + var_fix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L170_C16", "label": "for atack", "type": "for", "loc": [170, 171], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L161_C12", "vector": [6, 4, 0.9799, 0.0115, 4, 0.46, 1.0, 893, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "atack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for atack in self.get_Attack():\n self.lista_ataques_gerados.append([self.url_parse_base + atributo + ''.join(atack) + self.str_var_fix, atributo])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L171_C20", "label": "append()", "type": "expression", "loc": [171, 171], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L170_C16", "vector": [8, 5, 0.9828, 0.0057, 5, 0.86, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.lista_ataques_gerados.append([self.url_parse_base + atributo + ''.join(atack) + self.str_var_fix, atributo])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L174_C8", "label": "return", "type": "return", "loc": [174, 174], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L142_C4", "vector": [13, 2, 1.0, 0.0057, 2, 0.66, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.lista_ataques_gerados"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L66_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L75_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L81_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L86_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L87_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L93_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L95_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L97_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L99_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L99_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L100_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L97_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L101_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L97_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L102_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L107_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L112_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L113_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L116_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L116_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L120_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L121_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L122_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L123_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L124_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L126_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L131_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L132_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L133_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L134_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L135_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L118_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L137_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L116_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L139_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L142_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L142_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L143_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L142_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L142_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L148_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L142_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L150_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L142_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L152_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L153_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L154_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L155_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L156_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L157_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L158_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L161_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L161_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L162_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L161_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L163_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L163_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L164_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:If_L164_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Assign_L167_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L161_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L170_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:For_L170_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Expr_L171_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1451:FunctionDef_L142_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1451:Return_L174_C8"}]
#!/usr/bin/env python import urllib,requests,urllib2,socket,mechanize from urlparse import urlsplit,urlparse,urlunparse,urljoin from Data import Data_Access from bs4 import BeautifulSoup ######################################################################## class PluginXSS (object): """ Responsavel por montar e analisar ataques de Injecao de Codigos Script """ #---------------------------------------------------------------------- def __init__(self): """ Constructor """ self.data_Access = Data_Access(2, "PL_XSS") self.attack_Name = "XSS Injection" self.attack_Criticity = "High" #---------------------------------------------------------------------- def get_Attack (self): """ Retorna os ataques que estao no Banco de Dados """ return self.data_Access.getAttack() #---------------------------------------------------------------------- def get_Mitigation (self): """ Retorna as mitigacoes que estao no Banco de Dados """ return self.data_Access.getMitigation() #---------------------------------------------------------------------- def get_Impact (self): """ Retorna o nome da vulnerabilidade """ return self.attack_Criticity #---------------------------------------------------------------------- def get_Response (self): """ Retorna as respostas que estao no Banco de Dados """ return self.data_Access.getResponse() #---------------------------------------------------------------------- def get_Vulnerability (self): """ Retorna o nome da vulnerabilidade """ return self.attack_Name #---------------------------------------------------------------------- def get_Attack_Monted (self, url): """ Retorna a URL concatenada com o ataque """ self.atack_monted = [] for atack in self.getAttack(): self.atack_monted.append(url + ''.join(atack)) return self.atack_monted #---------------------------------------------------------------------- def mount_URL_Attack (self, url): """ Ataque via URL GET """ self.url_attack_parse = urlparse(url) self.url_parse_base = self.url_attack_parse.scheme + "://" + self.url_attack_parse.netloc + self.url_attack_parse.path + "?" self.url_atributos_ataques = [] self.atributo_ataque = [] # Pega todos os atributos da URL e os separa em uma lista self.urls_att = [] self.urls_att.append('&'.rpartition(self.url_attack_parse.query)) #---------------------------------------------------------------------- def gen_Form_Attack(self, list_forms, url): """ Inclui no formulario o ataque """ self.list_forms = [] self.list_forms = list_forms self.list_forms_ataques = [] self.aux = [] for ataque in self.get_Attack(): for formulario in self.list_forms: self.aux.append([formulario,''.join(ataque)]) self.list_forms_ataques.append([url, self.aux]) self.aux = [] return self.list_forms_ataques #---------------------------------------------------------------------- def analisa_Resultado (self, html, url_ataque, atributo): """ Analisa o codigo da pagina HTML se existe a presenca de Injecao de codigos Script """ self.bsxss = BeautifulSoup(html, 'lxml') self.script = self.bsxss.find_all ('script') self.attack_Result = [] # Verifica se existe getResponse no codigo-fonte da pagina atacada for resp in self.script: if resp.find('<script>alert(\'__XSS__\')</script>') != -1: # Concatena as informacoes retorno self.attack_Result.append('VULNERAVEL') self.attack_Result.append(self.get_Impact()) self.attack_Result.append(url_ataque) self.attack_Result.append(atributo) self.attack_Result.append(self.get_Mitigation()) # 1 = Ataque funcionou self.attack_Result.append(True) else: # Concatena as informacoes retorno self.attack_Result.append('NAO VULNERAVEL') self.attack_Result.append(self.get_Impact()) self.attack_Result.append(url_ataque) self.attack_Result.append(atributo) self.attack_Result.append(self.get_Mitigation()) # 0 = Ataque nao funcionou self.attack_Result.append(False) return self.attack_Result #---------------------------------------------------------------------- def gerar_Ataques (self, url): """ Ataca os parametros da URL informada """ self.URL_List_Target = [] self.URL_List_Target = url self.lista_ataques_gerados = [] for URL_Target in self.URL_List_Target: self.url_attack_parse = urlparse(URL_Target) self.url_parse_base = self.url_attack_parse.scheme + "://" + self.url_attack_parse.netloc + self.url_attack_parse.path + "?" self.url_atributos_ataques = [] self.atributo_ataque = [] self.lista_var = [] self.lista_var = self.url_attack_parse.query.split('&') # Pega todos os atributos da URL e os separa em uma lista for atributo in self.url_attack_parse.query.split('&'): self.str_var_fix = "" for var_fix in self.lista_var: if var_fix == atributo: pass else: self.str_var_fix = self.str_var_fix + "&" + var_fix # Pega o atributo e inclui o ataque nele for atack in self.get_Attack(): self.lista_ataques_gerados.append([self.url_parse_base + atributo + ''.join(atack) + self.str_var_fix, atributo]) return self.lista_ataques_gerados
ajibawa-2023/Python-Code-Large/train/row_1452
92
170
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Import_L2_C0", "label": "urllib import urllib, requests, urllib2\u2026", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0118, 0.0059, 0, 0.66, 0.0, 614, 0, 5, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib", "requests", "urllib2", "socket", "mechanize"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urllib,requests,urllib2,socket,mechanize"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:ImportFrom_L3_C0", "label": "from urlparse import urlsplit, urlparse, urlunparse\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0176, 0.0059, 0, 0.66, 0.25, 857, 0, 4, 0, 0, 857, 0, 0], "semantic": {"name": "urlparse", "arg_names": [], "import_names": ["urlsplit", "urlparse", "urlunparse", "urljoin"], "rhs_call_name": "", "annotation": ""}, "snippet": "from urlparse import urlsplit,urlparse,urlunparse,urljoin"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:ImportFrom_L4_C0", "label": "from Data import Data_Access", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0235, 0.0059, 0, 0.66, 0.5, 467, 0, 1, 0, 0, 467, 0, 0], "semantic": {"name": "Data", "arg_names": [], "import_names": ["Data_Access"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Data import Data_Access"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:ImportFrom_L5_C0", "label": "from bs4 import BeautifulSoup", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0294, 0.0059, 0, 0.66, 0.75, 993, 0, 1, 0, 0, 993, 0, 0], "semantic": {"name": "bs4", "arg_names": [], "import_names": ["BeautifulSoup"], "rhs_call_name": "", "annotation": ""}, "snippet": "from bs4 import BeautifulSoup"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "label": "PluginXSS", "type": "class", "loc": [8, 170], "level": 0, "parent": null, "vector": [3, 0, 0.5235, 0.9588, 0, 0.66, 1.0, 488, 0, 11, 0, 0, 186, 0, 39], "semantic": {"name": "PluginXSS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class PluginXSS (object):\n \"\"\"\n Responsavel por montar e analisar ataques de Injecao de Codigos Script\n \"\"\" \n #----------------------------------------------------------------------\n def __init__(self):\n \"\"\"\n Constructor"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L9_C4", "label": "expression", "type": "expression", "loc": [9, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "vector": [8, 1, 0.0588, 0.0176, 1, 0.44, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Responsavel por montar e analisar ataques de Injecao de Codigos Script\n \"\"\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L13_C4", "label": "__init__", "type": "function", "loc": [13, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "vector": [2, 1, 0.0941, 0.0412, 1, 0.44, 0.0909, 555, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self):\n \"\"\"\n Constructor\n \"\"\"\n self.data_Access = Data_Access(2, \"PL_XSS\") \n self.attack_Name = \"XSS Injection\"\n self.attack_Criticity = \"High\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L14_C8", "label": "expression", "type": "expression", "loc": [14, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L13_C4", "vector": [8, 2, 0.0882, 0.0176, 2, 0.48, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Constructor\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L17_C8", "label": "self.data_Access = Data_Access()", "type": "assigned_variable", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L13_C4", "vector": [14, 2, 0.1, 0.0059, 2, 0.48, 0.3333, 923, 3, 2, 0, 0, 671, 10, 1], "semantic": {"name": "self.data_Access", "arg_names": [], "import_names": [], "rhs_call_name": "Data_Access", "annotation": ""}, "snippet": " self.data_Access = Data_Access(2, \"PL_XSS\") "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L18_C8", "label": "self.attack_Name =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L13_C4", "vector": [14, 2, 0.1059, 0.0059, 2, 0.48, 0.6667, 164, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.attack_Name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.attack_Name = \"XSS Injection\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L19_C8", "label": "self.attack_Criticity =", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L13_C4", "vector": [14, 2, 0.1118, 0.0059, 2, 0.48, 1.0, 681, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.attack_Criticity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.attack_Criticity = \"High\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L22_C4", "label": "get_Attack", "type": "function", "loc": [22, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "vector": [2, 1, 0.1412, 0.0294, 1, 0.44, 0.1818, 859, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_Attack", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Attack (self):\n \"\"\"\n Retorna os ataques que estao no Banco de Dados\n \"\"\"\n return self.data_Access.getAttack()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L23_C8", "label": "expression", "type": "expression", "loc": [23, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L22_C4", "vector": [8, 2, 0.1412, 0.0176, 2, 0.63, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna os ataques que estao no Banco de Dados\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L26_C8", "label": "return", "type": "return", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L22_C4", "vector": [13, 2, 0.1529, 0.0059, 2, 0.63, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.data_Access.getAttack()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L30_C4", "label": "get_Mitigation", "type": "function", "loc": [30, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "vector": [2, 1, 0.1882, 0.0294, 1, 0.44, 0.2727, 460, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_Mitigation", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Mitigation (self):\n \"\"\"\n Retorna as mitigacoes que estao no Banco de Dados\n \"\"\"\n return self.data_Access.getMitigation()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L31_C8", "label": "expression", "type": "expression", "loc": [31, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L30_C4", "vector": [8, 2, 0.1882, 0.0176, 2, 0.68, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna as mitigacoes que estao no Banco de Dados\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L34_C8", "label": "return", "type": "return", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L30_C4", "vector": [13, 2, 0.2, 0.0059, 2, 0.68, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.data_Access.getMitigation()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L37_C4", "label": "get_Impact", "type": "function", "loc": [37, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "vector": [2, 1, 0.2294, 0.0294, 1, 0.44, 0.3636, 574, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "get_Impact", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Impact (self):\n \"\"\"\n Retorna o nome da vulnerabilidade\n \"\"\"\n return self.attack_Criticity"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L38_C8", "label": "expression", "type": "expression", "loc": [38, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L37_C4", "vector": [8, 2, 0.2294, 0.0176, 2, 0.55, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna o nome da vulnerabilidade\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L41_C8", "label": "return", "type": "return", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L37_C4", "vector": [13, 2, 0.2412, 0.0059, 2, 0.55, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.attack_Criticity"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L44_C4", "label": "get_Response", "type": "function", "loc": [44, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "vector": [2, 1, 0.2706, 0.0294, 1, 0.44, 0.4545, 877, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_Response", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Response (self):\n \"\"\"\n Retorna as respostas que estao no Banco de Dados\n \"\"\"\n return self.data_Access.getResponse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L45_C8", "label": "expression", "type": "expression", "loc": [45, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L44_C4", "vector": [8, 2, 0.2706, 0.0176, 2, 0.63, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna as respostas que estao no Banco de Dados\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L48_C8", "label": "return", "type": "return", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L44_C4", "vector": [13, 2, 0.2824, 0.0059, 2, 0.63, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.data_Access.getResponse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L51_C4", "label": "get_Vulnerability", "type": "function", "loc": [51, 55], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "vector": [2, 1, 0.3118, 0.0294, 1, 0.44, 0.5455, 688, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "get_Vulnerability", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Vulnerability (self):\n \"\"\"\n Retorna o nome da vulnerabilidade\n \"\"\"\n return self.attack_Name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L52_C8", "label": "expression", "type": "expression", "loc": [52, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L51_C4", "vector": [8, 2, 0.3118, 0.0176, 2, 0.04, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna o nome da vulnerabilidade\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L55_C8", "label": "return", "type": "return", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L51_C4", "vector": [13, 2, 0.3235, 0.0059, 2, 0.04, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.attack_Name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L59_C4", "label": "get_Attack_Monted", "type": "function", "loc": [59, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "vector": [2, 1, 0.3735, 0.0588, 1, 0.44, 0.6364, 931, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "get_Attack_Monted", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Attack_Monted (self, url):\n \"\"\"\n Retorna a URL concatenada com o ataque\n \"\"\"\n self.atack_monted = []\n \n for atack in self.getAttack():\n self.atack_monted.append(url + ''.join(atack))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L60_C8", "label": "expression", "type": "expression", "loc": [60, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L59_C4", "vector": [8, 2, 0.3588, 0.0176, 2, 0.5, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna a URL concatenada com o ataque\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L63_C8", "label": "self.atack_monted =", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L59_C4", "vector": [14, 2, 0.3706, 0.0059, 2, 0.5, 0.3333, 87, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.atack_monted", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atack_monted = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L65_C8", "label": "for atack", "type": "for", "loc": [65, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L59_C4", "vector": [6, 2, 0.3853, 0.0118, 2, 0.5, 0.6667, 893, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "atack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for atack in self.getAttack():\n self.atack_monted.append(url + ''.join(atack))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L66_C12", "label": "append()", "type": "expression", "loc": [66, 66], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L65_C8", "vector": [8, 3, 0.3882, 0.0059, 3, 0.41, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.atack_monted.append(url + ''.join(atack))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L68_C8", "label": "return", "type": "return", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L59_C4", "vector": [13, 2, 0.4, 0.0059, 2, 0.5, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.atack_monted"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L71_C4", "label": "mount_URL_Attack", "type": "function", "loc": [71, 82], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "vector": [2, 1, 0.45, 0.0706, 1, 0.44, 0.7273, 145, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "mount_URL_Attack", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def mount_URL_Attack (self, url):\n \"\"\"\n Ataque via URL GET\n \"\"\"\n self.url_attack_parse = urlparse(url)\n self.url_parse_base = self.url_attack_parse.scheme + \"://\" + self.url_attack_parse.netloc + self.url_attack_parse.path + \"?\"\n self.url_atributos_ataques = []\n self.atributo_ataque = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L72_C8", "label": "expression", "type": "expression", "loc": [72, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L71_C4", "vector": [8, 2, 0.4294, 0.0176, 2, 0.58, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Ataque via URL GET\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L75_C8", "label": "self.url_attack_parse = urlparse()", "type": "assigned_variable", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L71_C4", "vector": [14, 2, 0.4412, 0.0059, 2, 0.58, 0.1667, 616, 3, 1, 0, 0, 857, 10, 1], "semantic": {"name": "self.url_attack_parse", "arg_names": [], "import_names": [], "rhs_call_name": "urlparse", "annotation": ""}, "snippet": " self.url_attack_parse = urlparse(url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L76_C8", "label": "self.url_parse_base =", "type": "assigned_variable", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L71_C4", "vector": [14, 2, 0.4471, 0.0059, 2, 0.58, 0.3333, 359, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.url_parse_base", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_parse_base = self.url_attack_parse.scheme + \"://\" + self.url_attack_parse.netloc + self.url_attack_parse.path + \"?\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L77_C8", "label": "self.url_atributos_ataques =", "type": "assigned_variable", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L71_C4", "vector": [14, 2, 0.4529, 0.0059, 2, 0.58, 0.5, 534, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.url_atributos_ataques", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_atributos_ataques = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L78_C8", "label": "self.atributo_ataque =", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L71_C4", "vector": [14, 2, 0.4588, 0.0059, 2, 0.58, 0.6667, 395, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.atributo_ataque", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atributo_ataque = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L81_C8", "label": "self.urls_att =", "type": "assigned_variable", "loc": [81, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L71_C4", "vector": [14, 2, 0.4765, 0.0059, 2, 0.58, 0.8333, 470, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.urls_att", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.urls_att = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L82_C8", "label": "append()", "type": "expression", "loc": [82, 82], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L71_C4", "vector": [8, 2, 0.4824, 0.0059, 2, 0.58, 1.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.urls_att.append('&'.rpartition(self.url_attack_parse.query))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L85_C4", "label": "gen_Form_Attack", "type": "function", "loc": [85, 101], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "vector": [2, 1, 0.5471, 0.1, 1, 0.44, 0.8182, 44, 0, 3, 1, 0, 0, 0, 4], "semantic": {"name": "gen_Form_Attack", "arg_names": ["self", "list_forms", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def gen_Form_Attack(self, list_forms, url):\n \"\"\"\n Inclui no formulario o ataque\n \"\"\"\n self.list_forms = []\n self.list_forms = list_forms\n \n self.list_forms_ataques = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L86_C8", "label": "expression", "type": "expression", "loc": [86, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L85_C4", "vector": [8, 2, 0.5118, 0.0176, 2, 0.23, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Inclui no formulario o ataque\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L89_C8", "label": "self.list_forms =", "type": "assigned_variable", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L85_C4", "vector": [14, 2, 0.5235, 0.0059, 2, 0.23, 0.1667, 826, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.list_forms", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_forms = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L90_C8", "label": "self.list_forms =", "type": "assigned_variable", "loc": [90, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L85_C4", "vector": [14, 2, 0.5294, 0.0059, 2, 0.23, 0.3333, 826, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.list_forms", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_forms = list_forms"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L92_C8", "label": "self.list_forms_ataques =", "type": "assigned_variable", "loc": [92, 92], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L85_C4", "vector": [14, 2, 0.5412, 0.0059, 2, 0.23, 0.5, 792, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.list_forms_ataques", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_forms_ataques = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L94_C8", "label": "self.aux =", "type": "assigned_variable", "loc": [94, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L85_C4", "vector": [14, 2, 0.5529, 0.0059, 2, 0.23, 0.6667, 867, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.aux", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.aux = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L96_C8", "label": "for ataque", "type": "for", "loc": [96, 100], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L85_C4", "vector": [6, 2, 0.5765, 0.0294, 2, 0.23, 0.8333, 583, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "ataque", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for ataque in self.get_Attack():\n for formulario in self.list_forms:\n self.aux.append([formulario,''.join(ataque)])\n self.list_forms_ataques.append([url, self.aux])\t\n self.aux = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L97_C12", "label": "for formulario", "type": "for", "loc": [97, 98], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L96_C8", "vector": [6, 3, 0.5735, 0.0118, 3, 0.7, 0.0, 990, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "formulario", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for formulario in self.list_forms:\n self.aux.append([formulario,''.join(ataque)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L98_C16", "label": "append()", "type": "expression", "loc": [98, 98], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L97_C12", "vector": [8, 4, 0.5765, 0.0059, 4, 0.72, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.aux.append([formulario,''.join(ataque)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L99_C12", "label": "append()", "type": "expression", "loc": [99, 99], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L96_C8", "vector": [8, 3, 0.5824, 0.0059, 3, 0.7, 0.5, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.list_forms_ataques.append([url, self.aux])\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L100_C12", "label": "self.aux =", "type": "assigned_variable", "loc": [100, 100], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L96_C8", "vector": [14, 3, 0.5882, 0.0059, 3, 0.7, 1.0, 867, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.aux", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.aux = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L101_C8", "label": "return", "type": "return", "loc": [101, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L85_C4", "vector": [13, 2, 0.5941, 0.0059, 2, 0.23, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.list_forms_ataques"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L105_C4", "label": "analisa_Resultado", "type": "function", "loc": [105, 136], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "vector": [2, 1, 0.7088, 0.1882, 1, 0.44, 0.9091, 367, 0, 4, 1, 0, 0, 0, 19], "semantic": {"name": "analisa_Resultado", "arg_names": ["self", "html", "url_ataque", "atributo"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def analisa_Resultado (self, html, url_ataque, atributo):\n \"\"\"\n Analisa o codigo da pagina HTML se existe a presenca de Injecao de codigos Script\n \"\"\"\n self.bsxss = BeautifulSoup(html, 'lxml')\n self.script = self.bsxss.find_all ('script')\n self.attack_Result = []\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L106_C8", "label": "expression", "type": "expression", "loc": [106, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L105_C4", "vector": [8, 2, 0.6294, 0.0176, 2, 0.85, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Analisa o codigo da pagina HTML se existe a presenca de Injecao de codigos Script\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L109_C8", "label": "self.bsxss = BeautifulSoup()", "type": "assigned_variable", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L105_C4", "vector": [14, 2, 0.6412, 0.0059, 2, 0.85, 0.25, 537, 3, 2, 0, 0, 878, 10, 1], "semantic": {"name": "self.bsxss", "arg_names": [], "import_names": [], "rhs_call_name": "BeautifulSoup", "annotation": ""}, "snippet": " self.bsxss = BeautifulSoup(html, 'lxml')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L110_C8", "label": "self.script = find_all()", "type": "assigned_variable", "loc": [110, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L105_C4", "vector": [14, 2, 0.6471, 0.0059, 2, 0.85, 0.5, 817, 3, 1, 0, 0, 202, 10, 1], "semantic": {"name": "self.script", "arg_names": [], "import_names": [], "rhs_call_name": "find_all", "annotation": ""}, "snippet": " self.script = self.bsxss.find_all ('script')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L111_C8", "label": "self.attack_Result =", "type": "assigned_variable", "loc": [111, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L105_C4", "vector": [14, 2, 0.6529, 0.0059, 2, 0.85, 0.75, 657, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.attack_Result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.attack_Result = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L114_C8", "label": "for resp", "type": "for", "loc": [114, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L105_C4", "vector": [6, 2, 0.7353, 0.1353, 2, 0.85, 1.0, 48, 7, 0, 0, 0, 0, 0, 17], "semantic": {"name": "resp", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for resp in self.script:\n if resp.find('<script>alert(\\'__XSS__\\')</script>') != -1:\n \n # Concatena as informacoes retorno\n self.attack_Result.append('VULNERAVEL')\n self.attack_Result.append(self.get_Impact())\n self.attack_Result.append(url_ataque)\n self.attack_Result.append(atributo)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "label": "if", "type": "if", "loc": [115, 134], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L114_C8", "vector": [4, 3, 0.7324, 0.1176, 3, 0.24, 0.0, 0, 0, 0, 0, 0, 0, 0, 17], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if resp.find('<script>alert(\\'__XSS__\\')</script>') != -1:\n \n # Concatena as informacoes retorno\n self.attack_Result.append('VULNERAVEL')\n self.attack_Result.append(self.get_Impact())\n self.attack_Result.append(url_ataque)\n self.attack_Result.append(atributo)\n self.attack_Result.append(self.get_Mitigation())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L118_C16", "label": "append()", "type": "expression", "loc": [118, 118], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "vector": [8, 4, 0.6941, 0.0059, 4, 0.84, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append('VULNERAVEL')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L119_C16", "label": "append()", "type": "expression", "loc": [119, 119], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "vector": [8, 4, 0.7, 0.0059, 4, 0.84, 0.0909, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(self.get_Impact())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L120_C16", "label": "append()", "type": "expression", "loc": [120, 120], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "vector": [8, 4, 0.7059, 0.0059, 4, 0.84, 0.1818, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(url_ataque)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L121_C16", "label": "append()", "type": "expression", "loc": [121, 121], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "vector": [8, 4, 0.7118, 0.0059, 4, 0.84, 0.2727, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(atributo)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L122_C16", "label": "append()", "type": "expression", "loc": [122, 122], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "vector": [8, 4, 0.7176, 0.0059, 4, 0.84, 0.3636, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(self.get_Mitigation())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L124_C16", "label": "append()", "type": "expression", "loc": [124, 124], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "vector": [8, 4, 0.7294, 0.0059, 4, 0.84, 0.4545, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L128_C16", "label": "append()", "type": "expression", "loc": [128, 128], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "vector": [8, 4, 0.7529, 0.0059, 4, 0.84, 0.5455, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append('NAO VULNERAVEL')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L129_C16", "label": "append()", "type": "expression", "loc": [129, 129], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "vector": [8, 4, 0.7588, 0.0059, 4, 0.84, 0.6364, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(self.get_Impact())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L130_C16", "label": "append()", "type": "expression", "loc": [130, 130], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "vector": [8, 4, 0.7647, 0.0059, 4, 0.84, 0.7273, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(url_ataque)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L131_C16", "label": "append()", "type": "expression", "loc": [131, 131], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "vector": [8, 4, 0.7706, 0.0059, 4, 0.84, 0.8182, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(atributo)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L132_C16", "label": "append()", "type": "expression", "loc": [132, 132], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "vector": [8, 4, 0.7765, 0.0059, 4, 0.84, 0.9091, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(self.get_Mitigation())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L134_C16", "label": "append()", "type": "expression", "loc": [134, 134], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "vector": [8, 4, 0.7882, 0.0059, 4, 0.84, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L136_C12", "label": "return", "type": "return", "loc": [136, 136], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L114_C8", "vector": [13, 3, 0.8, 0.0059, 3, 0.24, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.attack_Result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L139_C4", "label": "gerar_Ataques", "type": "function", "loc": [139, 170], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "vector": [2, 1, 0.9088, 0.1882, 1, 0.44, 1.0, 384, 0, 2, 1, 0, 0, 0, 6], "semantic": {"name": "gerar_Ataques", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def gerar_Ataques (self, url):\n \"\"\"\n Ataca os parametros da URL informada\n \"\"\"\n self.URL_List_Target = []\n self.URL_List_Target = url\n self.lista_ataques_gerados = []\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L140_C8", "label": "expression", "type": "expression", "loc": [140, 142], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L139_C4", "vector": [8, 2, 0.8294, 0.0176, 2, 0.8, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Ataca os parametros da URL informada\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L143_C8", "label": "self.URL_List_Target =", "type": "assigned_variable", "loc": [143, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L139_C4", "vector": [14, 2, 0.8412, 0.0059, 2, 0.8, 0.2, 266, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.URL_List_Target", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.URL_List_Target = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L144_C8", "label": "self.URL_List_Target =", "type": "assigned_variable", "loc": [144, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L139_C4", "vector": [14, 2, 0.8471, 0.0059, 2, 0.8, 0.4, 266, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.URL_List_Target", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.URL_List_Target = url"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L145_C8", "label": "self.lista_ataques_gerados =", "type": "assigned_variable", "loc": [145, 145], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L139_C4", "vector": [14, 2, 0.8529, 0.0059, 2, 0.8, 0.6, 530, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.lista_ataques_gerados", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.lista_ataques_gerados = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L147_C8", "label": "for URL_Target", "type": "for", "loc": [147, 168], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L139_C4", "vector": [6, 2, 0.9265, 0.1294, 2, 0.8, 0.8, 818, 7, 0, 0, 0, 0, 0, 6], "semantic": {"name": "URL_Target", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for URL_Target in self.URL_List_Target:\n self.url_attack_parse = urlparse(URL_Target)\n self.url_parse_base = self.url_attack_parse.scheme + \"://\" + self.url_attack_parse.netloc + self.url_attack_parse.path + \"?\"\n self.url_atributos_ataques = []\n self.atributo_ataque = []\n \n self.lista_var = []\n self.lista_var = self.url_attack_parse.query.split('&')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L148_C12", "label": "self.url_attack_parse = urlparse()", "type": "assigned_variable", "loc": [148, 148], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L147_C8", "vector": [14, 3, 0.8706, 0.0059, 3, 0.3, 0.0, 616, 3, 1, 0, 0, 857, 10, 1], "semantic": {"name": "self.url_attack_parse", "arg_names": [], "import_names": [], "rhs_call_name": "urlparse", "annotation": ""}, "snippet": " self.url_attack_parse = urlparse(URL_Target)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L149_C12", "label": "self.url_parse_base =", "type": "assigned_variable", "loc": [149, 149], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L147_C8", "vector": [14, 3, 0.8765, 0.0059, 3, 0.3, 0.1667, 359, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.url_parse_base", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_parse_base = self.url_attack_parse.scheme + \"://\" + self.url_attack_parse.netloc + self.url_attack_parse.path + \"?\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L150_C12", "label": "self.url_atributos_ataques =", "type": "assigned_variable", "loc": [150, 150], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L147_C8", "vector": [14, 3, 0.8824, 0.0059, 3, 0.3, 0.3333, 534, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.url_atributos_ataques", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_atributos_ataques = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L151_C12", "label": "self.atributo_ataque =", "type": "assigned_variable", "loc": [151, 151], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L147_C8", "vector": [14, 3, 0.8882, 0.0059, 3, 0.3, 0.5, 395, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.atributo_ataque", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atributo_ataque = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L153_C12", "label": "self.lista_var =", "type": "assigned_variable", "loc": [153, 153], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L147_C8", "vector": [14, 3, 0.9, 0.0059, 3, 0.3, 0.6667, 775, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.lista_var", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.lista_var = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L154_C12", "label": "self.lista_var = split()", "type": "assigned_variable", "loc": [154, 154], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L147_C8", "vector": [14, 3, 0.9059, 0.0059, 3, 0.3, 0.8333, 775, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "self.lista_var", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " self.lista_var = self.url_attack_parse.query.split('&')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L157_C12", "label": "for atributo", "type": "for", "loc": [157, 168], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L147_C8", "vector": [6, 3, 0.9559, 0.0706, 3, 0.3, 1.0, 880, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "atributo", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for atributo in self.url_attack_parse.query.split('&'):\n self.str_var_fix = \"\"\n \n for var_fix in self.lista_var:\n if var_fix == atributo:\n pass\n else:\n self.str_var_fix = self.str_var_fix + \"&\" + var_fix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L158_C16", "label": "self.str_var_fix =", "type": "assigned_variable", "loc": [158, 158], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L157_C12", "vector": [14, 4, 0.9294, 0.0059, 4, 0.56, 0.0, 654, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.str_var_fix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.str_var_fix = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L160_C16", "label": "for var_fix", "type": "for", "loc": [160, 164], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L157_C12", "vector": [6, 4, 0.9529, 0.0294, 4, 0.56, 0.5, 894, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "var_fix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for var_fix in self.lista_var:\n if var_fix == atributo:\n pass\n else:\n self.str_var_fix = self.str_var_fix + \"&\" + var_fix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L161_C20", "label": "if", "type": "if", "loc": [161, 164], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L160_C16", "vector": [4, 5, 0.9559, 0.0235, 5, 0.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if var_fix == atributo:\n pass\n else:\n self.str_var_fix = self.str_var_fix + \"&\" + var_fix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L164_C24", "label": "self.str_var_fix =", "type": "assigned_variable", "loc": [164, 164], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L161_C20", "vector": [14, 6, 0.9647, 0.0059, 6, 0.11, 0.0, 654, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.str_var_fix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.str_var_fix = self.str_var_fix + \"&\" + var_fix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L167_C16", "label": "for atack", "type": "for", "loc": [167, 168], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L157_C12", "vector": [6, 4, 0.9853, 0.0118, 4, 0.56, 1.0, 893, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "atack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for atack in self.get_Attack():\n self.lista_ataques_gerados.append([self.url_parse_base + atributo + ''.join(atack) + self.str_var_fix, atributo])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L168_C20", "label": "append()", "type": "expression", "loc": [168, 168], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L167_C16", "vector": [8, 5, 0.9882, 0.0059, 5, 0.15, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.lista_ataques_gerados.append([self.url_parse_base + atributo + ''.join(atack) + self.str_var_fix, atributo])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L170_C8", "label": "return", "type": "return", "loc": [170, 170], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L139_C4", "vector": [13, 2, 1.0, 0.0059, 2, 0.8, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.lista_ataques_gerados"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L66_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L75_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L81_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L85_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L86_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L89_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L90_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L96_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L97_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L97_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L98_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L96_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L99_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L96_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L100_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L101_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L105_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L109_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L110_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L114_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L118_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L119_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L120_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L121_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L122_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L124_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L128_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L129_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L130_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L131_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L132_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L134_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L114_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L136_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L139_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L143_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L144_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L145_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L148_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L149_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L150_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L151_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L153_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L154_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L157_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L157_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L158_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L157_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L160_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L160_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L161_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:If_L161_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Assign_L164_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L157_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L167_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:For_L167_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Expr_L168_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1452:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1452:Return_L170_C8"}]
import urllib from Business import PluginSQL from bs4 import BeautifulSoup from urlparse import urlparse # Estava pensando em colocar o Exploiter para fazer o ataque e a análise ######################################################################## class Exploiter(object): """""" #---------------------------------------------------------------------- # Construtor recebe a URL alvo e o objeto Plugin dos ataques #def __init__(self, url, pluginAttack): def __init__(self, url): """Constructor""" try: self.url = url # Cria a conexao com a URL informada self.html = urllib.urlopen (url) # Cria o objeto BeautifulSoup self.bs = BeautifulSoup(self.html.read(), "lxml") self.bs = BeautifulSoup() except urllib.NameError as e: print e # Exibe informacoes do servidor web def getServerInfo (self): #for header, value in self.url.headers.items(): #print header + ' : ' + value return self.url.headers.items() # Metodo que envia ataque para o servidor def sendAttack (self, attack): self.pl_plugin = attack #self.concatenacao = [] #self.i = 0 for n in attack.get_Attack_Monted (self.url): #self.concatenacao.append(self.url+ str(n)) self.html_attack = urllib.urlopen (n) # Verifica se existe getResponse no codigo-fonte da pagina atacada #if self.html_attack.read() != "MySQL": print self.html_attack.read() # Sai do laco e retorna o ataque # METODO QUE RETORNA O ATAQUE!!! # Molda a URL def generate_URL (self): self.url_parse = urlparse(url) self.url_parse_base = self.url_parse.scheme + "://" + self.url_parse.netloc + "/" # Retorna a URL def get_URL (self): return self.url # Retorna a URL Parseada def get_URL_Parse (self): return self.url_parse # Retorna a URL Parseada Base def get_URL_Parse_Base (self): return self.url_parse_base # Retorna a URL Encode def gen_URL_Encode (self, url): #self.url_encode = urllib.urlencode(self.url : ) print self.url_encode # Localiza um ataque no codigo-fonte def find_response (self, bs, response): self.bs_auxiliar = bs self.response_auxiliar = response #self.bs_auxiliar = BeautifulSoup(html.read(), "lxml") #url = "http://10.37.129.4/cat.php?id=1" #url_base = "http://10.37.129.4/cat.php" #args = {'id' : 1} #sql1 = PluginSQL.PluginSQL() #temp = sql1.getAttack() #for z in temp: #argu = {'id' : z} #encode_args = urllib.urlencode(argu) #print encode_args #print z #url2 = urlparse(url) #url1 = self.url_base.scheme + "://" + self.url_base.netloc + "/" + self.allLinks[self.i]['href'] #print url2.scheme vv = Exploiter("http://10.37.129.4/cat.php?id=1") pl2 = PluginSQL.PluginSQL() vv.sendAttack(pl2) #vv.gen_URL_Encode("id=1' or '3=3")
ajibawa-2023/Python-Code-Large/train/row_1453
38
121
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Import_L1_C0", "label": "urllib import urllib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0083, 0.0083, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urllib"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:ImportFrom_L2_C0", "label": "from Business import PluginSQL", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0165, 0.0083, 0, 0.66, 0.1429, 559, 0, 1, 0, 0, 559, 0, 0], "semantic": {"name": "Business", "arg_names": [], "import_names": ["PluginSQL"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Business import PluginSQL"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:ImportFrom_L3_C0", "label": "from bs4 import BeautifulSoup", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0248, 0.0083, 0, 0.66, 0.2857, 993, 0, 1, 0, 0, 993, 0, 0], "semantic": {"name": "bs4", "arg_names": [], "import_names": ["BeautifulSoup"], "rhs_call_name": "", "annotation": ""}, "snippet": "from bs4 import BeautifulSoup"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:ImportFrom_L4_C0", "label": "from urlparse import urlparse", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0331, 0.0083, 0, 0.66, 0.4286, 857, 0, 1, 0, 0, 857, 0, 0], "semantic": {"name": "urlparse", "arg_names": [], "import_names": ["urlparse"], "rhs_call_name": "", "annotation": ""}, "snippet": "from urlparse import urlparse"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "label": "Exploiter", "type": "class", "loc": [9, 89], "level": 0, "parent": null, "vector": [3, 0, 0.405, 0.6694, 0, 0.66, 0.5714, 618, 0, 9, 0, 0, 186, 0, 12], "semantic": {"name": "Exploiter", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Exploiter(object):\n \"\"\"\"\"\"\n\n #----------------------------------------------------------------------\n # Construtor recebe a URL alvo e o objeto Plugin dos ataques\n #def __init__(self, url, pluginAttack):\n def __init__(self, url):\n \"\"\"Constructor\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Expr_L10_C4", "label": "expression", "type": "expression", "loc": [10, 10], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "vector": [8, 1, 0.0826, 0.0083, 1, 0.85, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L15_C4", "label": "__init__", "type": "function", "loc": [15, 29], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "vector": [2, 1, 0.1818, 0.124, 1, 0.85, 0.1111, 555, 0, 2, 0, 0, 0, 0, 5], "semantic": {"name": "__init__", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, url):\n \"\"\"Constructor\"\"\"\n \n try:\n self.url = url\n\n # Cria a conexao com a URL informada\n self.html = urllib.urlopen (url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Expr_L16_C8", "label": "expression", "type": "expression", "loc": [16, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L15_C4", "vector": [8, 2, 0.1322, 0.0083, 2, 0.23, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Constructor\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Try_L18_C8", "label": "try", "type": "try", "loc": [18, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L15_C4", "vector": [7, 2, 0.1942, 0.0992, 2, 0.23, 1.0, 0, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n self.url = url\n\n # Cria a conexao com a URL informada\n self.html = urllib.urlopen (url)\n \n # Cria o objeto BeautifulSoup\n self.bs = BeautifulSoup(self.html.read(), \"lxml\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L19_C12", "label": "self.url =", "type": "assigned_variable", "loc": [19, 19], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:Try_L18_C8", "vector": [14, 3, 0.157, 0.0083, 3, 0.07, 0.0, 720, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.url", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url = url"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L22_C12", "label": "self.html = urlopen()", "type": "assigned_variable", "loc": [22, 22], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:Try_L18_C8", "vector": [14, 3, 0.1818, 0.0083, 3, 0.07, 0.3333, 339, 3, 1, 0, 0, 687, 10, 1], "semantic": {"name": "self.html", "arg_names": [], "import_names": [], "rhs_call_name": "urlopen", "annotation": ""}, "snippet": " self.html = urllib.urlopen (url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L25_C12", "label": "self.bs = BeautifulSoup()", "type": "assigned_variable", "loc": [25, 25], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:Try_L18_C8", "vector": [14, 3, 0.2066, 0.0083, 3, 0.07, 0.6667, 181, 3, 2, 0, 0, 878, 10, 2], "semantic": {"name": "self.bs", "arg_names": [], "import_names": [], "rhs_call_name": "BeautifulSoup", "annotation": ""}, "snippet": " self.bs = BeautifulSoup(self.html.read(), \"lxml\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L26_C12", "label": "self.bs = BeautifulSoup()", "type": "assigned_variable", "loc": [26, 26], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:Try_L18_C8", "vector": [14, 3, 0.2149, 0.0083, 3, 0.07, 1.0, 181, 3, 0, 0, 0, 878, 10, 1], "semantic": {"name": "self.bs", "arg_names": [], "import_names": [], "rhs_call_name": "BeautifulSoup", "annotation": ""}, "snippet": " self.bs = BeautifulSoup()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Expr_L29_C12", "label": "print()", "type": "expression", "loc": [29, 29], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:Try_L18_C8", "vector": [8, 3, 0.2397, 0.0083, 3, 0.07, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(e)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L32_C4", "label": "getServerInfo", "type": "function", "loc": [32, 35], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "vector": [2, 1, 0.2769, 0.0331, 1, 0.85, 0.2222, 635, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "getServerInfo", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getServerInfo (self):\n #for header, value in self.url.headers.items():\n #print header + ' : ' + value\n return self.url.headers.items()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Return_L35_C8", "label": "return", "type": "return", "loc": [35, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L32_C4", "vector": [13, 2, 0.2893, 0.0083, 2, 0.88, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.url.headers.items()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L39_C4", "label": "sendAttack", "type": "function", "loc": [39, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "vector": [2, 1, 0.3719, 0.1074, 1, 0.85, 0.3333, 658, 0, 2, 0, 0, 0, 0, 4], "semantic": {"name": "sendAttack", "arg_names": ["self", "attack"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def sendAttack (self, attack):\n self.pl_plugin = attack\n \n #self.concatenacao = []\n #self.i = 0\n for n in attack.get_Attack_Monted (self.url):\n \n #self.concatenacao.append(self.url+ str(n))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L40_C8", "label": "self.pl_plugin =", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L39_C4", "vector": [14, 2, 0.3306, 0.0083, 2, 0.29, 0.0, 460, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.pl_plugin", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.pl_plugin = attack"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:For_L44_C8", "label": "for n", "type": "for", "loc": [44, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L39_C4", "vector": [6, 2, 0.3926, 0.0661, 2, 0.29, 1.0, 773, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for n in attack.get_Attack_Monted (self.url):\n \n #self.concatenacao.append(self.url+ str(n))\n self.html_attack = urllib.urlopen (n)\n \n # Verifica se existe getResponse no codigo-fonte da pagina atacada\n #if self.html_attack.read() != \"MySQL\":\n print(self.html_attack.read())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L47_C12", "label": "self.html_attack = urlopen()", "type": "assigned_variable", "loc": [47, 47], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:For_L44_C8", "vector": [14, 3, 0.3884, 0.0083, 3, 0.15, 0.0, 189, 3, 1, 0, 0, 687, 10, 1], "semantic": {"name": "self.html_attack", "arg_names": [], "import_names": [], "rhs_call_name": "urlopen", "annotation": ""}, "snippet": " self.html_attack = urllib.urlopen (n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Expr_L51_C12", "label": "print()", "type": "expression", "loc": [51, 51], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:For_L44_C8", "vector": [8, 3, 0.4215, 0.0083, 3, 0.15, 1.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(self.html_attack.read())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L60_C4", "label": "generate_URL", "type": "function", "loc": [60, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "vector": [2, 1, 0.5041, 0.0248, 1, 0.85, 0.4444, 160, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "generate_URL", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def generate_URL (self):\n self.url_parse = urlparse(url)\n self.url_parse_base = self.url_parse.scheme + \"://\" + self.url_parse.netloc + \"/\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L61_C8", "label": "self.url_parse = urlparse()", "type": "assigned_variable", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L60_C4", "vector": [14, 2, 0.5041, 0.0083, 2, 0.9, 0.0, 954, 3, 1, 0, 0, 857, 10, 1], "semantic": {"name": "self.url_parse", "arg_names": [], "import_names": [], "rhs_call_name": "urlparse", "annotation": ""}, "snippet": " self.url_parse = urlparse(url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L62_C8", "label": "self.url_parse_base =", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L60_C4", "vector": [14, 2, 0.5124, 0.0083, 2, 0.9, 1.0, 359, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.url_parse_base", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_parse_base = self.url_parse.scheme + \"://\" + self.url_parse.netloc + \"/\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L66_C4", "label": "get_URL", "type": "function", "loc": [66, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "vector": [2, 1, 0.5496, 0.0165, 1, 0.85, 0.5556, 937, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "get_URL", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_URL (self):\n return self.url"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Return_L67_C8", "label": "return", "type": "return", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L66_C4", "vector": [13, 2, 0.5537, 0.0083, 2, 0.29, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.url"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L71_C4", "label": "get_URL_Parse", "type": "function", "loc": [71, 72], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "vector": [2, 1, 0.5909, 0.0165, 1, 0.85, 0.6667, 878, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "get_URL_Parse", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_URL_Parse (self):\n return self.url_parse"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Return_L72_C8", "label": "return", "type": "return", "loc": [72, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L71_C4", "vector": [13, 2, 0.595, 0.0083, 2, 0.95, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.url_parse"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L76_C4", "label": "get_URL_Parse_Base", "type": "function", "loc": [76, 77], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "vector": [2, 1, 0.6322, 0.0165, 1, 0.85, 0.7778, 586, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "get_URL_Parse_Base", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_URL_Parse_Base (self):\n return self.url_parse_base"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Return_L77_C8", "label": "return", "type": "return", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L76_C4", "vector": [13, 2, 0.6364, 0.0083, 2, 0.62, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.url_parse_base"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L81_C4", "label": "gen_URL_Encode", "type": "function", "loc": [81, 83], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "vector": [2, 1, 0.6777, 0.0248, 1, 0.85, 0.8889, 160, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "gen_URL_Encode", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def gen_URL_Encode (self, url):\n #self.url_encode = urllib.urlencode(self.url : )\n print(self.url_encode)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Expr_L83_C8", "label": "print()", "type": "expression", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L81_C4", "vector": [8, 2, 0.686, 0.0083, 2, 0.35, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(self.url_encode)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L87_C4", "label": "find_response", "type": "function", "loc": [87, 89], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "vector": [2, 1, 0.7273, 0.0248, 1, 0.85, 1.0, 841, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "find_response", "arg_names": ["self", "bs", "response"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def find_response (self, bs, response):\n self.bs_auxiliar = bs\n self.response_auxiliar = response"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L88_C8", "label": "self.bs_auxiliar =", "type": "assigned_variable", "loc": [88, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L87_C4", "vector": [14, 2, 0.7273, 0.0083, 2, 0.24, 0.0, 681, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.bs_auxiliar", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.bs_auxiliar = bs"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L89_C8", "label": "self.response_auxiliar =", "type": "assigned_variable", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L87_C4", "vector": [14, 2, 0.7355, 0.0083, 2, 0.24, 1.0, 929, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.response_auxiliar", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.response_auxiliar = response"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L117_C0", "label": "vv = Exploiter()", "type": "assigned_variable", "loc": [117, 117], "level": 0, "parent": null, "vector": [14, 0, 0.9669, 0.0083, 0, 0.66, 0.7143, 849, 3, 1, 0, 0, 618, 10, 1], "semantic": {"name": "vv", "arg_names": [], "import_names": [], "rhs_call_name": "Exploiter", "annotation": ""}, "snippet": "vv = Exploiter(\"http://10.37.129.4/cat.php?id=1\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L118_C0", "label": "pl2 = PluginSQL()", "type": "assigned_variable", "loc": [118, 118], "level": 0, "parent": null, "vector": [14, 0, 0.9752, 0.0083, 0, 0.66, 0.8571, 974, 3, 0, 0, 0, 743, 10, 1], "semantic": {"name": "pl2", "arg_names": [], "import_names": [], "rhs_call_name": "PluginSQL", "annotation": ""}, "snippet": "pl2 = PluginSQL.PluginSQL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1453:Expr_L119_C0", "label": "sendAttack()", "type": "expression", "loc": [119, 119], "level": 0, "parent": null, "vector": [8, 0, 0.9835, 0.0083, 0, 0.66, 1.0, 658, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "sendAttack", "arg_names": [], "import_names": [], "rhs_call_name": "sendAttack", "annotation": ""}, "snippet": "vv.sendAttack(pl2)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Expr_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Try_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:Try_L18_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L19_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:Try_L18_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L22_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:Try_L18_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L25_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:Try_L18_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L26_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:Try_L18_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Expr_L29_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Return_L35_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:For_L44_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:For_L44_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L47_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:For_L44_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Expr_L51_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L66_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L66_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Return_L67_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Return_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Return_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L81_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L81_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Expr_L83_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L87_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L87_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L88_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1453:FunctionDef_L87_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1453:Assign_L89_C8"}]
from urlparse import urlparse from Business import Exploiter from Business import PluginSQL from Business import PluginXSS from bs4 import BeautifulSoup ######################################################################## class Controller (object): """""" #---------------------------------------------------------------------- def __init__(self, url): """ Constructor """ # Base da URL informada self.exploiter = Exploiter.Exploiter(url) self.URL_Original = self.exploiter.mount_URLs() #---------------------------------------------------------------------- def check_URL (self): """ Verifica se a URL infromada esta de acordo e funcional para ser utilizada """ return self.exploiter.mount_URLs() #---------------------------------------------------------------------- def get_Server_Info (self): """ Retorna as informacoes do servidor """ self.get_server_Info = self.exploiter.get_Server_Info() return self.get_server_Info #---------------------------------------------------------------------- def select_Plugin (self, plugin, stop_scan): """ Seleciona quais ataques devem ser realizados """ self.stop_scan = stop_scan if plugin == 1: self.pl_attack = PluginSQL.PluginSQL() if plugin == 2: self.pl_attack = PluginXSS.PluginXSS() #---------------------------------------------------------------------- def send_Exploiter (self): """ Pega a URL informada, mais o plugin selecionado e retorna com o ataque """ # Inclui as URLs na lista self.targets self.targets = [] self.targets = self.exploiter.get_All_Targets() # Inclui os ataques na lista self.url_plugin self.url_plugin = [] self.url_plugin = self.pl_attack.gerar_Ataques(self.targets) self.retorno_plugin = [] for url_ataque in self.url_plugin: self.html = self.exploiter.send_Attack(url_ataque[0]) self.retorno_plugin.append(self.pl_attack.analisa_Resultado(self.html, url_ataque[0], url_ataque[1])) self.resultado = self.pl_attack.analisa_Resultado(self.html, url_ataque[0], url_ataque[1]) try: if (self.resultado[0] == 'VULNERAVEL') and (self.stop_scan == 1) and (self.resultado[0] != None): return self.retorno_plugin except: pass #FORM ###### self.ex_get_Form = [] self.ex_get_Form = self.exploiter.get_Form(self.URL_Original) # Recebe uma lista com as URL, Formulario e Ataque self.pl_gen_Form_Attack = [] self.pl_gen_Form_Attack = self.pl_attack.gen_Form_Attack(self.ex_get_Form, self.URL_Original) # Recebe uma lista com o codigo-fonte da pagina atacada self.respostas_html = [] try: for n in self.pl_gen_Form_Attack: self.respostas_html.append(self.exploiter.get_Form_HTML(n)) for html in self.respostas_html: self.atributo_form = "FORMULARIOS: " for formu in html[0][1][1]: self.atributo_form += ''.join(formu [0]) + " " self.atributo_form += "ATAQUE: " + ''.join(formu [1]) self.retorno_plugin.append(self.pl_attack.analisa_Resultado(html[0][0], html[0][1][0], self.atributo_form)) if (self.resultado[0] == 'VULNERAVEL') and (self.stop_scan == 1): return self.retorno_plugin except: pass # FINAL FORM ###### return self.retorno_plugin
ajibawa-2023/Python-Code-Large/train/row_1454
54
111
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1454:ImportFrom_L1_C0", "label": "from urlparse import urlparse", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.009, 0.009, 0, 0.66, 0.0, 857, 0, 1, 0, 0, 857, 0, 0], "semantic": {"name": "urlparse", "arg_names": [], "import_names": ["urlparse"], "rhs_call_name": "", "annotation": ""}, "snippet": "from urlparse import urlparse"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:ImportFrom_L2_C0", "label": "from Business import Exploiter", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.018, 0.009, 0, 0.66, 0.2, 559, 0, 1, 0, 0, 559, 0, 0], "semantic": {"name": "Business", "arg_names": [], "import_names": ["Exploiter"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Business import Exploiter"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:ImportFrom_L3_C0", "label": "from Business import PluginSQL", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.027, 0.009, 0, 0.66, 0.4, 559, 0, 1, 0, 0, 559, 0, 0], "semantic": {"name": "Business", "arg_names": [], "import_names": ["PluginSQL"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Business import PluginSQL"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:ImportFrom_L4_C0", "label": "from Business import PluginXSS", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.036, 0.009, 0, 0.66, 0.6, 559, 0, 1, 0, 0, 559, 0, 0], "semantic": {"name": "Business", "arg_names": [], "import_names": ["PluginXSS"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Business import PluginXSS"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:ImportFrom_L5_C0", "label": "from bs4 import BeautifulSoup", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.045, 0.009, 0, 0.66, 0.8, 993, 0, 1, 0, 0, 993, 0, 0], "semantic": {"name": "bs4", "arg_names": [], "import_names": ["BeautifulSoup"], "rhs_call_name": "", "annotation": ""}, "snippet": "from bs4 import BeautifulSoup"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:ClassDef_L8_C0", "label": "Controller", "type": "class", "loc": [8, 109], "level": 0, "parent": null, "vector": [3, 0, 0.527, 0.9189, 0, 0.66, 1.0, 93, 0, 5, 0, 0, 186, 0, 20], "semantic": {"name": "Controller", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Controller (object):\n \"\"\"\"\"\"\n #----------------------------------------------------------------------\n def __init__(self, url):\n \"\"\"\n Constructor\n \"\"\"\n # Base da URL informada"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L9_C4", "label": "expression", "type": "expression", "loc": [9, 9], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:ClassDef_L8_C0", "vector": [8, 1, 0.0811, 0.009, 1, 0.84, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L11_C4", "label": "__init__", "type": "function", "loc": [11, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:ClassDef_L8_C0", "vector": [2, 1, 0.1261, 0.0631, 1, 0.84, 0.2, 555, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, url):\n \"\"\"\n Constructor\n \"\"\"\n # Base da URL informada\n self.exploiter = Exploiter.Exploiter(url)\n self.URL_Original = self.exploiter.mount_URLs()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L12_C8", "label": "expression", "type": "expression", "loc": [12, 14], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L11_C4", "vector": [8, 2, 0.1171, 0.027, 2, 0.51, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Constructor\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L16_C8", "label": "self.exploiter = Exploiter()", "type": "assigned_variable", "loc": [16, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L11_C4", "vector": [14, 2, 0.1441, 0.009, 2, 0.51, 0.5, 70, 3, 1, 0, 0, 618, 10, 1], "semantic": {"name": "self.exploiter", "arg_names": [], "import_names": [], "rhs_call_name": "Exploiter", "annotation": ""}, "snippet": " self.exploiter = Exploiter.Exploiter(url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L17_C8", "label": "self.URL_Original = mount_URLs()", "type": "assigned_variable", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L11_C4", "vector": [14, 2, 0.1532, 0.009, 2, 0.51, 1.0, 103, 3, 0, 0, 0, 431, 10, 1], "semantic": {"name": "self.URL_Original", "arg_names": [], "import_names": [], "rhs_call_name": "mount_URLs", "annotation": ""}, "snippet": " self.URL_Original = self.exploiter.mount_URLs()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L21_C4", "label": "check_URL", "type": "function", "loc": [21, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:ClassDef_L8_C0", "vector": [2, 1, 0.2072, 0.045, 1, 0.84, 0.4, 750, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "check_URL", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def check_URL (self):\n \"\"\"\n Verifica se a URL infromada esta de acordo e funcional para ser utilizada\n \"\"\"\n return self.exploiter.mount_URLs()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L22_C8", "label": "expression", "type": "expression", "loc": [22, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L21_C4", "vector": [8, 2, 0.2072, 0.027, 2, 0.18, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Verifica se a URL infromada esta de acordo e funcional para ser utilizada\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Return_L25_C8", "label": "return", "type": "return", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L21_C4", "vector": [13, 2, 0.2252, 0.009, 2, 0.18, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.exploiter.mount_URLs()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L29_C4", "label": "get_Server_Info", "type": "function", "loc": [29, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:ClassDef_L8_C0", "vector": [2, 1, 0.2838, 0.0541, 1, 0.84, 0.6, 499, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_Server_Info", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Server_Info (self):\n \"\"\"\n Retorna as informacoes do servidor\n \"\"\"\n self.get_server_Info = self.exploiter.get_Server_Info()\n return self.get_server_Info"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L30_C8", "label": "expression", "type": "expression", "loc": [30, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L29_C4", "vector": [8, 2, 0.2793, 0.027, 2, 0.54, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna as informacoes do servidor\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L33_C8", "label": "self.get_server_Info = get_Server_Info()", "type": "assigned_variable", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L29_C4", "vector": [14, 2, 0.2973, 0.009, 2, 0.54, 0.5, 595, 3, 0, 0, 0, 499, 10, 1], "semantic": {"name": "self.get_server_Info", "arg_names": [], "import_names": [], "rhs_call_name": "get_Server_Info", "annotation": ""}, "snippet": " self.get_server_Info = self.exploiter.get_Server_Info()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Return_L34_C8", "label": "return", "type": "return", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L29_C4", "vector": [13, 2, 0.3063, 0.009, 2, 0.54, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.get_server_Info"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L38_C4", "label": "select_Plugin", "type": "function", "loc": [38, 47], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:ClassDef_L8_C0", "vector": [2, 1, 0.3829, 0.0901, 1, 0.84, 0.8, 318, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "select_Plugin", "arg_names": ["self", "plugin", "stop_scan"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def select_Plugin (self, plugin, stop_scan):\n \"\"\"\n Seleciona quais ataques devem ser realizados\n \"\"\"\n self.stop_scan = stop_scan\n \n if plugin == 1:\n self.pl_attack = PluginSQL.PluginSQL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L39_C8", "label": "expression", "type": "expression", "loc": [39, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L38_C4", "vector": [8, 2, 0.3604, 0.027, 2, 0.21, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Seleciona quais ataques devem ser realizados\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L42_C8", "label": "self.stop_scan =", "type": "assigned_variable", "loc": [42, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L38_C4", "vector": [14, 2, 0.3784, 0.009, 2, 0.21, 0.3333, 577, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.stop_scan", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.stop_scan = stop_scan"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:If_L44_C8", "label": "if", "type": "if", "loc": [44, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L38_C4", "vector": [4, 2, 0.4009, 0.018, 2, 0.21, 0.6667, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if plugin == 1:\n self.pl_attack = PluginSQL.PluginSQL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L45_C12", "label": "self.pl_attack = PluginSQL()", "type": "assigned_variable", "loc": [45, 45], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:If_L44_C8", "vector": [14, 3, 0.4054, 0.009, 3, 0.42, 0.0, 32, 3, 0, 0, 0, 743, 10, 1], "semantic": {"name": "self.pl_attack", "arg_names": [], "import_names": [], "rhs_call_name": "PluginSQL", "annotation": ""}, "snippet": " self.pl_attack = PluginSQL.PluginSQL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:If_L46_C8", "label": "if", "type": "if", "loc": [46, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L38_C4", "vector": [4, 2, 0.4189, 0.018, 2, 0.21, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if plugin == 2:\n self.pl_attack = PluginXSS.PluginXSS()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L47_C12", "label": "self.pl_attack = PluginXSS()", "type": "assigned_variable", "loc": [47, 47], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:If_L46_C8", "vector": [14, 3, 0.4234, 0.009, 3, 0.12, 0.0, 32, 3, 0, 0, 0, 488, 10, 1], "semantic": {"name": "self.pl_attack", "arg_names": [], "import_names": [], "rhs_call_name": "PluginXSS", "annotation": ""}, "snippet": " self.pl_attack = PluginXSS.PluginXSS()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "label": "send_Exploiter", "type": "function", "loc": [51, 109], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:ClassDef_L8_C0", "vector": [2, 1, 0.7207, 0.5315, 1, 0.84, 1.0, 622, 0, 1, 1, 0, 0, 0, 14], "semantic": {"name": "send_Exploiter", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def send_Exploiter (self):\n \"\"\"\n Pega a URL informada, mais o plugin selecionado e retorna com o ataque\n \"\"\"\n # Inclui as URLs na lista self.targets\n self.targets = []\n self.targets = self.exploiter.get_All_Targets()\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L52_C8", "label": "expression", "type": "expression", "loc": [52, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "vector": [8, 2, 0.4775, 0.027, 2, 0.18, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Pega a URL informada, mais o plugin selecionado e retorna com o ataque\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L56_C8", "label": "self.targets =", "type": "assigned_variable", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "vector": [14, 2, 0.5045, 0.009, 2, 0.18, 0.0769, 769, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.targets", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.targets = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L57_C8", "label": "self.targets = get_All_Targets()", "type": "assigned_variable", "loc": [57, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "vector": [14, 2, 0.5135, 0.009, 2, 0.18, 0.1538, 769, 3, 0, 0, 0, 450, 10, 1], "semantic": {"name": "self.targets", "arg_names": [], "import_names": [], "rhs_call_name": "get_All_Targets", "annotation": ""}, "snippet": " self.targets = self.exploiter.get_All_Targets()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L60_C8", "label": "self.url_plugin =", "type": "assigned_variable", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "vector": [14, 2, 0.5405, 0.009, 2, 0.18, 0.2308, 758, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.url_plugin", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_plugin = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L61_C8", "label": "self.url_plugin = gerar_Ataques()", "type": "assigned_variable", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "vector": [14, 2, 0.5495, 0.009, 2, 0.18, 0.3077, 758, 3, 1, 0, 0, 384, 10, 1], "semantic": {"name": "self.url_plugin", "arg_names": [], "import_names": [], "rhs_call_name": "gerar_Ataques", "annotation": ""}, "snippet": " self.url_plugin = self.pl_attack.gerar_Ataques(self.targets)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L63_C8", "label": "self.retorno_plugin =", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "vector": [14, 2, 0.5676, 0.009, 2, 0.18, 0.3846, 868, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.retorno_plugin", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.retorno_plugin = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L65_C8", "label": "for url_ataque", "type": "for", "loc": [65, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "vector": [6, 2, 0.6261, 0.0901, 2, 0.18, 0.4615, 318, 7, 0, 0, 0, 0, 0, 4], "semantic": {"name": "url_ataque", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for url_ataque in self.url_plugin:\n self.html = self.exploiter.send_Attack(url_ataque[0])\n \n self.retorno_plugin.append(self.pl_attack.analisa_Resultado(self.html, url_ataque[0], url_ataque[1]))\n self.resultado = self.pl_attack.analisa_Resultado(self.html, url_ataque[0], url_ataque[1])\n try:\n if (self.resultado[0] == 'VULNERAVEL') and (self.stop_scan == 1) and (self.resultado[0] != None):\n return self.retorno_plugin"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L66_C12", "label": "self.html = send_Attack()", "type": "assigned_variable", "loc": [66, 66], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L65_C8", "vector": [14, 3, 0.5946, 0.009, 3, 0.72, 0.0, 339, 3, 1, 0, 0, 745, 10, 1], "semantic": {"name": "self.html", "arg_names": [], "import_names": [], "rhs_call_name": "send_Attack", "annotation": ""}, "snippet": " self.html = self.exploiter.send_Attack(url_ataque[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L68_C12", "label": "append()", "type": "expression", "loc": [68, 68], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L65_C8", "vector": [8, 3, 0.6126, 0.009, 3, 0.72, 0.3333, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.retorno_plugin.append(self.pl_attack.analisa_Resultado(self.html, url_ataque[0], url_ataque[1]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L69_C12", "label": "self.resultado = analisa_Resultado()", "type": "assigned_variable", "loc": [69, 69], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L65_C8", "vector": [14, 3, 0.6216, 0.009, 3, 0.72, 0.6667, 788, 3, 3, 0, 0, 367, 10, 1], "semantic": {"name": "self.resultado", "arg_names": [], "import_names": [], "rhs_call_name": "analisa_Resultado", "annotation": ""}, "snippet": " self.resultado = self.pl_attack.analisa_Resultado(self.html, url_ataque[0], url_ataque[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Try_L70_C12", "label": "try", "type": "try", "loc": [70, 74], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L65_C8", "vector": [7, 3, 0.6486, 0.045, 3, 0.72, 1.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n if (self.resultado[0] == 'VULNERAVEL') and (self.stop_scan == 1) and (self.resultado[0] != None):\n return self.retorno_plugin\n except:\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:If_L71_C16", "label": "if", "type": "if", "loc": [71, 72], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:Try_L70_C12", "vector": [4, 4, 0.6441, 0.018, 4, 0.92, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (self.resultado[0] == 'VULNERAVEL') and (self.stop_scan == 1) and (self.resultado[0] != None):\n return self.retorno_plugin"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Return_L72_C20", "label": "return", "type": "return", "loc": [72, 72], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:If_L71_C16", "vector": [13, 5, 0.6486, 0.009, 5, 0.19, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.retorno_plugin"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L79_C8", "label": "self.ex_get_Form =", "type": "assigned_variable", "loc": [79, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "vector": [14, 2, 0.7117, 0.009, 2, 0.18, 0.5385, 938, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.ex_get_Form", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.ex_get_Form = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L80_C8", "label": "self.ex_get_Form = get_Form()", "type": "assigned_variable", "loc": [80, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "vector": [14, 2, 0.7207, 0.009, 2, 0.18, 0.6154, 938, 3, 1, 0, 0, 996, 10, 1], "semantic": {"name": "self.ex_get_Form", "arg_names": [], "import_names": [], "rhs_call_name": "get_Form", "annotation": ""}, "snippet": " self.ex_get_Form = self.exploiter.get_Form(self.URL_Original)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L83_C8", "label": "self.pl_gen_Form_Attack =", "type": "assigned_variable", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "vector": [14, 2, 0.7477, 0.009, 2, 0.18, 0.6923, 602, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.pl_gen_Form_Attack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.pl_gen_Form_Attack = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L84_C8", "label": "self.pl_gen_Form_Attack = gen_Form_Attack()", "type": "assigned_variable", "loc": [84, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "vector": [14, 2, 0.7568, 0.009, 2, 0.18, 0.7692, 602, 3, 2, 0, 0, 44, 10, 1], "semantic": {"name": "self.pl_gen_Form_Attack", "arg_names": [], "import_names": [], "rhs_call_name": "gen_Form_Attack", "annotation": ""}, "snippet": " self.pl_gen_Form_Attack = self.pl_attack.gen_Form_Attack(self.ex_get_Form, self.URL_Original)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L87_C8", "label": "self.respostas_html =", "type": "assigned_variable", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "vector": [14, 2, 0.7838, 0.009, 2, 0.18, 0.8462, 131, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.respostas_html", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.respostas_html = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Try_L88_C8", "label": "try", "type": "try", "loc": [88, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "vector": [7, 2, 0.8649, 0.1532, 2, 0.18, 0.9231, 0, 0, 1, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n for n in self.pl_gen_Form_Attack: \n self.respostas_html.append(self.exploiter.get_Form_HTML(n))\n \n for html in self.respostas_html:\n self.atributo_form = \"FORMULARIOS: \"\n for formu in html[0][1][1]:\n self.atributo_form += ''.join(formu [0]) + \" \""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L89_C12", "label": "for n", "type": "for", "loc": [89, 90], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:Try_L88_C8", "vector": [6, 3, 0.8063, 0.018, 3, 0.88, 0.0, 773, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for n in self.pl_gen_Form_Attack: \n self.respostas_html.append(self.exploiter.get_Form_HTML(n))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L90_C16", "label": "append()", "type": "expression", "loc": [90, 90], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L89_C12", "vector": [8, 4, 0.8108, 0.009, 4, 0.53, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.respostas_html.append(self.exploiter.get_Form_HTML(n))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L92_C12", "label": "for html", "type": "for", "loc": [92, 98], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:Try_L88_C8", "vector": [6, 3, 0.8559, 0.0631, 3, 0.88, 0.5, 271, 7, 0, 0, 0, 0, 0, 4], "semantic": {"name": "html", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for html in self.respostas_html:\n self.atributo_form = \"FORMULARIOS: \"\n for formu in html[0][1][1]:\n self.atributo_form += ''.join(formu [0]) + \" \"\n \n self.atributo_form += \"ATAQUE: \" + ''.join(formu [1])\n self.retorno_plugin.append(self.pl_attack.analisa_Resultado(html[0][0], html[0][1][0], self.atributo_form)) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L93_C16", "label": "self.atributo_form =", "type": "assigned_variable", "loc": [93, 93], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L92_C12", "vector": [14, 4, 0.8378, 0.009, 4, 0.67, 0.0, 945, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.atributo_form", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atributo_form = \"FORMULARIOS: \""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L94_C16", "label": "for formu", "type": "for", "loc": [94, 95], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L92_C12", "vector": [6, 4, 0.8514, 0.018, 4, 0.67, 0.5, 857, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "formu", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for formu in html[0][1][1]:\n self.atributo_form += ''.join(formu [0]) + \" \""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L98_C16", "label": "append()", "type": "expression", "loc": [98, 98], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L92_C12", "vector": [8, 4, 0.8829, 0.009, 4, 0.67, 1.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.retorno_plugin.append(self.pl_attack.analisa_Resultado(html[0][0], html[0][1][0], self.atributo_form)) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:If_L100_C12", "label": "if", "type": "if", "loc": [100, 101], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:Try_L88_C8", "vector": [4, 3, 0.9054, 0.018, 3, 0.88, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (self.resultado[0] == 'VULNERAVEL') and (self.stop_scan == 1):\n return self.retorno_plugin "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Return_L101_C16", "label": "return", "type": "return", "loc": [101, 101], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:If_L100_C12", "vector": [13, 4, 0.9099, 0.009, 4, 0.08, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.retorno_plugin "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1454:Return_L109_C8", "label": "return", "type": "return", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "vector": [13, 2, 0.982, 0.009, 2, 0.18, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.retorno_plugin "}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1454:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Return_L25_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L30_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Return_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L39_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L42_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:If_L44_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:If_L44_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L45_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:If_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:If_L46_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L47_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L56_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L57_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L66_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L68_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L69_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Try_L70_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:Try_L70_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:If_L71_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:If_L71_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Return_L72_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L79_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L83_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L84_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L87_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Try_L88_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:Try_L88_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L89_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L89_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L90_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:Try_L88_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L92_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L92_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Assign_L93_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L92_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L94_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:For_L92_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Expr_L98_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:Try_L88_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:If_L100_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:If_L100_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Return_L101_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1454:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1454:Return_L109_C8"}]
#!/usr/bin/env python import urllib,requests,urllib2,socket,mechanize from urlparse import urlsplit,urlparse,urlunparse,urljoin from Data import Data_Access from bs4 import BeautifulSoup ######################################################################## class PluginXSS (object): """ Responsavel por montar e analisar ataques de Injecao de Codigos Script """ #---------------------------------------------------------------------- def __init__(self): """ Constructor """ self.data_Access = Data_Access(2, "PL_XSS") self.attack_Name = "XSS Injection" self.attack_Criticity = "High" #---------------------------------------------------------------------- def get_Attack (self): """ Retorna os ataques que estao no Banco de Dados """ return self.data_Access.getAttack() #---------------------------------------------------------------------- def get_Mitigation (self): """ Retorna as mitigacoes que estao no Banco de Dados """ return self.data_Access.getMitigation() #---------------------------------------------------------------------- def get_Impact (self): """ Retorna o nome da vulnerabilidade """ return self.attack_Criticity #---------------------------------------------------------------------- def get_Response (self): """ Retorna as respostas que estao no Banco de Dados """ return self.data_Access.getResponse() #---------------------------------------------------------------------- def get_Vulnerability (self): """ Retorna o nome da vulnerabilidade """ return self.attack_Name #---------------------------------------------------------------------- def get_Attack_Monted (self, url): """ Retorna a URL concatenada com o ataque """ self.atack_monted = [] for atack in self.getAttack(): self.atack_monted.append(url + ''.join(atack)) return self.atack_monted #---------------------------------------------------------------------- def mount_URL_Attack (self, url): """ Ataque via URL GET """ self.url_attack_parse = urlparse(url) self.url_parse_base = self.url_attack_parse.scheme + "://" + self.url_attack_parse.netloc + self.url_attack_parse.path + "?" self.url_atributos_ataques = [] self.atributo_ataque = [] # Pega todos os atributos da URL e os separa em uma lista self.urls_att = [] self.urls_att.append('&'.rpartition(self.url_attack_parse.query)) #---------------------------------------------------------------------- def gen_Form_Attack(self, list_forms, url): """ Inclui no formulario o ataque """ self.list_forms = [] self.list_forms = list_forms self.list_forms_ataques = [] self.aux = [] for ataque in self.get_Attack(): for formulario in self.list_forms: self.aux.append([formulario,''.join(ataque)]) self.list_forms_ataques.append([url, self.aux]) self.aux = [] return self.list_forms_ataques #---------------------------------------------------------------------- def analisa_Resultado (self, html, url_ataque, atributo): """ Analisa o codigo da pagina HTML se existe a presenca de Injecao de codigos Script """ self.bsxss = BeautifulSoup(html, 'lxml') self.script = self.bsxss.find_all ('script') self.attack_Result = [] # Verifica se existe getResponse no codigo-fonte da pagina atacada for resp in self.script: if resp.find('<script>alert(\'__XSS__\')</script>') != -1: # Concatena as informacoes retorno self.attack_Result.append('VULNERAVEL') self.attack_Result.append(self.get_Impact()) self.attack_Result.append(url_ataque) self.attack_Result.append(atributo) self.attack_Result.append(self.get_Mitigation()) # 1 = Ataque funcionou self.attack_Result.append(True) else: # Concatena as informacoes retorno self.attack_Result.append('NAO VULNERAVEL') self.attack_Result.append(self.get_Impact()) self.attack_Result.append(url_ataque) self.attack_Result.append(atributo) self.attack_Result.append(self.get_Mitigation()) # 0 = Ataque nao funcionou self.attack_Result.append(False) return self.attack_Result #---------------------------------------------------------------------- def gerar_Ataques (self, url): """ Ataca os parametros da URL informada """ self.URL_List_Target = [] self.URL_List_Target = url self.lista_ataques_gerados = [] for URL_Target in self.URL_List_Target: self.url_attack_parse = urlparse(URL_Target) self.url_parse_base = self.url_attack_parse.scheme + "://" + self.url_attack_parse.netloc + self.url_attack_parse.path + "?" self.url_atributos_ataques = [] self.atributo_ataque = [] self.lista_var = [] self.lista_var = self.url_attack_parse.query.split('&') # Pega todos os atributos da URL e os separa em uma lista for atributo in self.url_attack_parse.query.split('&'): self.str_var_fix = "" for var_fix in self.lista_var: if var_fix == atributo: pass else: self.str_var_fix = self.str_var_fix + "&" + var_fix # Pega o atributo e inclui o ataque nele for atack in self.get_Attack(): self.lista_ataques_gerados.append([self.url_parse_base + atributo + ''.join(atack) + self.str_var_fix, atributo]) return self.lista_ataques_gerados
ajibawa-2023/Python-Code-Large/train/row_1455
92
170
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Import_L2_C0", "label": "urllib import urllib, requests, urllib2\u2026", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0118, 0.0059, 0, 0.66, 0.0, 614, 0, 5, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib", "requests", "urllib2", "socket", "mechanize"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urllib,requests,urllib2,socket,mechanize"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:ImportFrom_L3_C0", "label": "from urlparse import urlsplit, urlparse, urlunparse\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0176, 0.0059, 0, 0.66, 0.25, 857, 0, 4, 0, 0, 857, 0, 0], "semantic": {"name": "urlparse", "arg_names": [], "import_names": ["urlsplit", "urlparse", "urlunparse", "urljoin"], "rhs_call_name": "", "annotation": ""}, "snippet": "from urlparse import urlsplit,urlparse,urlunparse,urljoin"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:ImportFrom_L4_C0", "label": "from Data import Data_Access", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0235, 0.0059, 0, 0.66, 0.5, 467, 0, 1, 0, 0, 467, 0, 0], "semantic": {"name": "Data", "arg_names": [], "import_names": ["Data_Access"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Data import Data_Access"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:ImportFrom_L5_C0", "label": "from bs4 import BeautifulSoup", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0294, 0.0059, 0, 0.66, 0.75, 993, 0, 1, 0, 0, 993, 0, 0], "semantic": {"name": "bs4", "arg_names": [], "import_names": ["BeautifulSoup"], "rhs_call_name": "", "annotation": ""}, "snippet": "from bs4 import BeautifulSoup"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "label": "PluginXSS", "type": "class", "loc": [8, 170], "level": 0, "parent": null, "vector": [3, 0, 0.5235, 0.9588, 0, 0.66, 1.0, 488, 0, 11, 0, 0, 186, 0, 39], "semantic": {"name": "PluginXSS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class PluginXSS (object):\n \"\"\"\n Responsavel por montar e analisar ataques de Injecao de Codigos Script\n \"\"\" \n #----------------------------------------------------------------------\n def __init__(self):\n \"\"\"\n Constructor"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L9_C4", "label": "expression", "type": "expression", "loc": [9, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "vector": [8, 1, 0.0588, 0.0176, 1, 0.73, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Responsavel por montar e analisar ataques de Injecao de Codigos Script\n \"\"\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L13_C4", "label": "__init__", "type": "function", "loc": [13, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "vector": [2, 1, 0.0941, 0.0412, 1, 0.73, 0.0909, 555, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self):\n \"\"\"\n Constructor\n \"\"\"\n self.data_Access = Data_Access(2, \"PL_XSS\") \n self.attack_Name = \"XSS Injection\"\n self.attack_Criticity = \"High\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L14_C8", "label": "expression", "type": "expression", "loc": [14, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L13_C4", "vector": [8, 2, 0.0882, 0.0176, 2, 0.12, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Constructor\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L17_C8", "label": "self.data_Access = Data_Access()", "type": "assigned_variable", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L13_C4", "vector": [14, 2, 0.1, 0.0059, 2, 0.12, 0.3333, 923, 3, 2, 0, 0, 671, 10, 1], "semantic": {"name": "self.data_Access", "arg_names": [], "import_names": [], "rhs_call_name": "Data_Access", "annotation": ""}, "snippet": " self.data_Access = Data_Access(2, \"PL_XSS\") "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L18_C8", "label": "self.attack_Name =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L13_C4", "vector": [14, 2, 0.1059, 0.0059, 2, 0.12, 0.6667, 164, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.attack_Name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.attack_Name = \"XSS Injection\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L19_C8", "label": "self.attack_Criticity =", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L13_C4", "vector": [14, 2, 0.1118, 0.0059, 2, 0.12, 1.0, 681, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.attack_Criticity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.attack_Criticity = \"High\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L22_C4", "label": "get_Attack", "type": "function", "loc": [22, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "vector": [2, 1, 0.1412, 0.0294, 1, 0.73, 0.1818, 859, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_Attack", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Attack (self):\n \"\"\"\n Retorna os ataques que estao no Banco de Dados\n \"\"\"\n return self.data_Access.getAttack()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L23_C8", "label": "expression", "type": "expression", "loc": [23, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L22_C4", "vector": [8, 2, 0.1412, 0.0176, 2, 0.61, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna os ataques que estao no Banco de Dados\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L26_C8", "label": "return", "type": "return", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L22_C4", "vector": [13, 2, 0.1529, 0.0059, 2, 0.61, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.data_Access.getAttack()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L30_C4", "label": "get_Mitigation", "type": "function", "loc": [30, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "vector": [2, 1, 0.1882, 0.0294, 1, 0.73, 0.2727, 460, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_Mitigation", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Mitigation (self):\n \"\"\"\n Retorna as mitigacoes que estao no Banco de Dados\n \"\"\"\n return self.data_Access.getMitigation()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L31_C8", "label": "expression", "type": "expression", "loc": [31, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L30_C4", "vector": [8, 2, 0.1882, 0.0176, 2, 0.93, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna as mitigacoes que estao no Banco de Dados\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L34_C8", "label": "return", "type": "return", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L30_C4", "vector": [13, 2, 0.2, 0.0059, 2, 0.93, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.data_Access.getMitigation()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L37_C4", "label": "get_Impact", "type": "function", "loc": [37, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "vector": [2, 1, 0.2294, 0.0294, 1, 0.73, 0.3636, 574, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "get_Impact", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Impact (self):\n \"\"\"\n Retorna o nome da vulnerabilidade\n \"\"\"\n return self.attack_Criticity"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L38_C8", "label": "expression", "type": "expression", "loc": [38, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L37_C4", "vector": [8, 2, 0.2294, 0.0176, 2, 0.89, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna o nome da vulnerabilidade\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L41_C8", "label": "return", "type": "return", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L37_C4", "vector": [13, 2, 0.2412, 0.0059, 2, 0.89, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.attack_Criticity"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L44_C4", "label": "get_Response", "type": "function", "loc": [44, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "vector": [2, 1, 0.2706, 0.0294, 1, 0.73, 0.4545, 877, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_Response", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Response (self):\n \"\"\"\n Retorna as respostas que estao no Banco de Dados\n \"\"\"\n return self.data_Access.getResponse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L45_C8", "label": "expression", "type": "expression", "loc": [45, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L44_C4", "vector": [8, 2, 0.2706, 0.0176, 2, 0.74, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna as respostas que estao no Banco de Dados\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L48_C8", "label": "return", "type": "return", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L44_C4", "vector": [13, 2, 0.2824, 0.0059, 2, 0.74, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.data_Access.getResponse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L51_C4", "label": "get_Vulnerability", "type": "function", "loc": [51, 55], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "vector": [2, 1, 0.3118, 0.0294, 1, 0.73, 0.5455, 688, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "get_Vulnerability", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Vulnerability (self):\n \"\"\"\n Retorna o nome da vulnerabilidade\n \"\"\"\n return self.attack_Name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L52_C8", "label": "expression", "type": "expression", "loc": [52, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L51_C4", "vector": [8, 2, 0.3118, 0.0176, 2, 0.6, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna o nome da vulnerabilidade\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L55_C8", "label": "return", "type": "return", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L51_C4", "vector": [13, 2, 0.3235, 0.0059, 2, 0.6, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.attack_Name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L59_C4", "label": "get_Attack_Monted", "type": "function", "loc": [59, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "vector": [2, 1, 0.3735, 0.0588, 1, 0.73, 0.6364, 931, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "get_Attack_Monted", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Attack_Monted (self, url):\n \"\"\"\n Retorna a URL concatenada com o ataque\n \"\"\"\n self.atack_monted = []\n \n for atack in self.getAttack():\n self.atack_monted.append(url + ''.join(atack))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L60_C8", "label": "expression", "type": "expression", "loc": [60, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L59_C4", "vector": [8, 2, 0.3588, 0.0176, 2, 0.7, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna a URL concatenada com o ataque\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L63_C8", "label": "self.atack_monted =", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L59_C4", "vector": [14, 2, 0.3706, 0.0059, 2, 0.7, 0.3333, 87, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.atack_monted", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atack_monted = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L65_C8", "label": "for atack", "type": "for", "loc": [65, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L59_C4", "vector": [6, 2, 0.3853, 0.0118, 2, 0.7, 0.6667, 893, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "atack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for atack in self.getAttack():\n self.atack_monted.append(url + ''.join(atack))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L66_C12", "label": "append()", "type": "expression", "loc": [66, 66], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L65_C8", "vector": [8, 3, 0.3882, 0.0059, 3, 0.85, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.atack_monted.append(url + ''.join(atack))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L68_C8", "label": "return", "type": "return", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L59_C4", "vector": [13, 2, 0.4, 0.0059, 2, 0.7, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.atack_monted"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L71_C4", "label": "mount_URL_Attack", "type": "function", "loc": [71, 82], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "vector": [2, 1, 0.45, 0.0706, 1, 0.73, 0.7273, 145, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "mount_URL_Attack", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def mount_URL_Attack (self, url):\n \"\"\"\n Ataque via URL GET\n \"\"\"\n self.url_attack_parse = urlparse(url)\n self.url_parse_base = self.url_attack_parse.scheme + \"://\" + self.url_attack_parse.netloc + self.url_attack_parse.path + \"?\"\n self.url_atributos_ataques = []\n self.atributo_ataque = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L72_C8", "label": "expression", "type": "expression", "loc": [72, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L71_C4", "vector": [8, 2, 0.4294, 0.0176, 2, 0.72, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Ataque via URL GET\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L75_C8", "label": "self.url_attack_parse = urlparse()", "type": "assigned_variable", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L71_C4", "vector": [14, 2, 0.4412, 0.0059, 2, 0.72, 0.1667, 616, 3, 1, 0, 0, 857, 10, 1], "semantic": {"name": "self.url_attack_parse", "arg_names": [], "import_names": [], "rhs_call_name": "urlparse", "annotation": ""}, "snippet": " self.url_attack_parse = urlparse(url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L76_C8", "label": "self.url_parse_base =", "type": "assigned_variable", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L71_C4", "vector": [14, 2, 0.4471, 0.0059, 2, 0.72, 0.3333, 359, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.url_parse_base", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_parse_base = self.url_attack_parse.scheme + \"://\" + self.url_attack_parse.netloc + self.url_attack_parse.path + \"?\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L77_C8", "label": "self.url_atributos_ataques =", "type": "assigned_variable", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L71_C4", "vector": [14, 2, 0.4529, 0.0059, 2, 0.72, 0.5, 534, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.url_atributos_ataques", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_atributos_ataques = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L78_C8", "label": "self.atributo_ataque =", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L71_C4", "vector": [14, 2, 0.4588, 0.0059, 2, 0.72, 0.6667, 395, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.atributo_ataque", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atributo_ataque = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L81_C8", "label": "self.urls_att =", "type": "assigned_variable", "loc": [81, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L71_C4", "vector": [14, 2, 0.4765, 0.0059, 2, 0.72, 0.8333, 470, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.urls_att", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.urls_att = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L82_C8", "label": "append()", "type": "expression", "loc": [82, 82], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L71_C4", "vector": [8, 2, 0.4824, 0.0059, 2, 0.72, 1.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.urls_att.append('&'.rpartition(self.url_attack_parse.query))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L85_C4", "label": "gen_Form_Attack", "type": "function", "loc": [85, 101], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "vector": [2, 1, 0.5471, 0.1, 1, 0.73, 0.8182, 44, 0, 3, 1, 0, 0, 0, 4], "semantic": {"name": "gen_Form_Attack", "arg_names": ["self", "list_forms", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def gen_Form_Attack(self, list_forms, url):\n \"\"\"\n Inclui no formulario o ataque\n \"\"\"\n self.list_forms = []\n self.list_forms = list_forms\n \n self.list_forms_ataques = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L86_C8", "label": "expression", "type": "expression", "loc": [86, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L85_C4", "vector": [8, 2, 0.5118, 0.0176, 2, 0.78, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Inclui no formulario o ataque\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L89_C8", "label": "self.list_forms =", "type": "assigned_variable", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L85_C4", "vector": [14, 2, 0.5235, 0.0059, 2, 0.78, 0.1667, 826, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.list_forms", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_forms = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L90_C8", "label": "self.list_forms =", "type": "assigned_variable", "loc": [90, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L85_C4", "vector": [14, 2, 0.5294, 0.0059, 2, 0.78, 0.3333, 826, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.list_forms", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_forms = list_forms"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L92_C8", "label": "self.list_forms_ataques =", "type": "assigned_variable", "loc": [92, 92], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L85_C4", "vector": [14, 2, 0.5412, 0.0059, 2, 0.78, 0.5, 792, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.list_forms_ataques", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_forms_ataques = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L94_C8", "label": "self.aux =", "type": "assigned_variable", "loc": [94, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L85_C4", "vector": [14, 2, 0.5529, 0.0059, 2, 0.78, 0.6667, 867, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.aux", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.aux = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L96_C8", "label": "for ataque", "type": "for", "loc": [96, 100], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L85_C4", "vector": [6, 2, 0.5765, 0.0294, 2, 0.78, 0.8333, 583, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "ataque", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for ataque in self.get_Attack():\n for formulario in self.list_forms:\n self.aux.append([formulario,''.join(ataque)])\n self.list_forms_ataques.append([url, self.aux])\t\n self.aux = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L97_C12", "label": "for formulario", "type": "for", "loc": [97, 98], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L96_C8", "vector": [6, 3, 0.5735, 0.0118, 3, 0.9, 0.0, 990, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "formulario", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for formulario in self.list_forms:\n self.aux.append([formulario,''.join(ataque)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L98_C16", "label": "append()", "type": "expression", "loc": [98, 98], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L97_C12", "vector": [8, 4, 0.5765, 0.0059, 4, 0.95, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.aux.append([formulario,''.join(ataque)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L99_C12", "label": "append()", "type": "expression", "loc": [99, 99], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L96_C8", "vector": [8, 3, 0.5824, 0.0059, 3, 0.9, 0.5, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.list_forms_ataques.append([url, self.aux])\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L100_C12", "label": "self.aux =", "type": "assigned_variable", "loc": [100, 100], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L96_C8", "vector": [14, 3, 0.5882, 0.0059, 3, 0.9, 1.0, 867, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.aux", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.aux = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L101_C8", "label": "return", "type": "return", "loc": [101, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L85_C4", "vector": [13, 2, 0.5941, 0.0059, 2, 0.78, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.list_forms_ataques"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L105_C4", "label": "analisa_Resultado", "type": "function", "loc": [105, 136], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "vector": [2, 1, 0.7088, 0.1882, 1, 0.73, 0.9091, 367, 0, 4, 1, 0, 0, 0, 19], "semantic": {"name": "analisa_Resultado", "arg_names": ["self", "html", "url_ataque", "atributo"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def analisa_Resultado (self, html, url_ataque, atributo):\n \"\"\"\n Analisa o codigo da pagina HTML se existe a presenca de Injecao de codigos Script\n \"\"\"\n self.bsxss = BeautifulSoup(html, 'lxml')\n self.script = self.bsxss.find_all ('script')\n self.attack_Result = []\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L106_C8", "label": "expression", "type": "expression", "loc": [106, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L105_C4", "vector": [8, 2, 0.6294, 0.0176, 2, 0.55, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Analisa o codigo da pagina HTML se existe a presenca de Injecao de codigos Script\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L109_C8", "label": "self.bsxss = BeautifulSoup()", "type": "assigned_variable", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L105_C4", "vector": [14, 2, 0.6412, 0.0059, 2, 0.55, 0.25, 537, 3, 2, 0, 0, 878, 10, 1], "semantic": {"name": "self.bsxss", "arg_names": [], "import_names": [], "rhs_call_name": "BeautifulSoup", "annotation": ""}, "snippet": " self.bsxss = BeautifulSoup(html, 'lxml')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L110_C8", "label": "self.script = find_all()", "type": "assigned_variable", "loc": [110, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L105_C4", "vector": [14, 2, 0.6471, 0.0059, 2, 0.55, 0.5, 817, 3, 1, 0, 0, 202, 10, 1], "semantic": {"name": "self.script", "arg_names": [], "import_names": [], "rhs_call_name": "find_all", "annotation": ""}, "snippet": " self.script = self.bsxss.find_all ('script')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L111_C8", "label": "self.attack_Result =", "type": "assigned_variable", "loc": [111, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L105_C4", "vector": [14, 2, 0.6529, 0.0059, 2, 0.55, 0.75, 657, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.attack_Result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.attack_Result = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L114_C8", "label": "for resp", "type": "for", "loc": [114, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L105_C4", "vector": [6, 2, 0.7353, 0.1353, 2, 0.55, 1.0, 48, 7, 0, 0, 0, 0, 0, 17], "semantic": {"name": "resp", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for resp in self.script:\n if resp.find('<script>alert(\\'__XSS__\\')</script>') != -1:\n \n # Concatena as informacoes retorno\n self.attack_Result.append('VULNERAVEL')\n self.attack_Result.append(self.get_Impact())\n self.attack_Result.append(url_ataque)\n self.attack_Result.append(atributo)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "label": "if", "type": "if", "loc": [115, 134], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L114_C8", "vector": [4, 3, 0.7324, 0.1176, 3, 0.85, 0.0, 0, 0, 0, 0, 0, 0, 0, 17], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if resp.find('<script>alert(\\'__XSS__\\')</script>') != -1:\n \n # Concatena as informacoes retorno\n self.attack_Result.append('VULNERAVEL')\n self.attack_Result.append(self.get_Impact())\n self.attack_Result.append(url_ataque)\n self.attack_Result.append(atributo)\n self.attack_Result.append(self.get_Mitigation())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L118_C16", "label": "append()", "type": "expression", "loc": [118, 118], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "vector": [8, 4, 0.6941, 0.0059, 4, 0.9, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append('VULNERAVEL')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L119_C16", "label": "append()", "type": "expression", "loc": [119, 119], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "vector": [8, 4, 0.7, 0.0059, 4, 0.9, 0.0909, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(self.get_Impact())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L120_C16", "label": "append()", "type": "expression", "loc": [120, 120], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "vector": [8, 4, 0.7059, 0.0059, 4, 0.9, 0.1818, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(url_ataque)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L121_C16", "label": "append()", "type": "expression", "loc": [121, 121], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "vector": [8, 4, 0.7118, 0.0059, 4, 0.9, 0.2727, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(atributo)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L122_C16", "label": "append()", "type": "expression", "loc": [122, 122], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "vector": [8, 4, 0.7176, 0.0059, 4, 0.9, 0.3636, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(self.get_Mitigation())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L124_C16", "label": "append()", "type": "expression", "loc": [124, 124], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "vector": [8, 4, 0.7294, 0.0059, 4, 0.9, 0.4545, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L128_C16", "label": "append()", "type": "expression", "loc": [128, 128], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "vector": [8, 4, 0.7529, 0.0059, 4, 0.9, 0.5455, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append('NAO VULNERAVEL')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L129_C16", "label": "append()", "type": "expression", "loc": [129, 129], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "vector": [8, 4, 0.7588, 0.0059, 4, 0.9, 0.6364, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(self.get_Impact())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L130_C16", "label": "append()", "type": "expression", "loc": [130, 130], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "vector": [8, 4, 0.7647, 0.0059, 4, 0.9, 0.7273, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(url_ataque)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L131_C16", "label": "append()", "type": "expression", "loc": [131, 131], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "vector": [8, 4, 0.7706, 0.0059, 4, 0.9, 0.8182, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(atributo)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L132_C16", "label": "append()", "type": "expression", "loc": [132, 132], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "vector": [8, 4, 0.7765, 0.0059, 4, 0.9, 0.9091, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(self.get_Mitigation())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L134_C16", "label": "append()", "type": "expression", "loc": [134, 134], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "vector": [8, 4, 0.7882, 0.0059, 4, 0.9, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.attack_Result.append(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L136_C12", "label": "return", "type": "return", "loc": [136, 136], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L114_C8", "vector": [13, 3, 0.8, 0.0059, 3, 0.85, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.attack_Result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L139_C4", "label": "gerar_Ataques", "type": "function", "loc": [139, 170], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "vector": [2, 1, 0.9088, 0.1882, 1, 0.73, 1.0, 384, 0, 2, 1, 0, 0, 0, 6], "semantic": {"name": "gerar_Ataques", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def gerar_Ataques (self, url):\n \"\"\"\n Ataca os parametros da URL informada\n \"\"\"\n self.URL_List_Target = []\n self.URL_List_Target = url\n self.lista_ataques_gerados = []\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L140_C8", "label": "expression", "type": "expression", "loc": [140, 142], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L139_C4", "vector": [8, 2, 0.8294, 0.0176, 2, 0.27, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Ataca os parametros da URL informada\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L143_C8", "label": "self.URL_List_Target =", "type": "assigned_variable", "loc": [143, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L139_C4", "vector": [14, 2, 0.8412, 0.0059, 2, 0.27, 0.2, 266, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.URL_List_Target", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.URL_List_Target = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L144_C8", "label": "self.URL_List_Target =", "type": "assigned_variable", "loc": [144, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L139_C4", "vector": [14, 2, 0.8471, 0.0059, 2, 0.27, 0.4, 266, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.URL_List_Target", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.URL_List_Target = url"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L145_C8", "label": "self.lista_ataques_gerados =", "type": "assigned_variable", "loc": [145, 145], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L139_C4", "vector": [14, 2, 0.8529, 0.0059, 2, 0.27, 0.6, 530, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.lista_ataques_gerados", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.lista_ataques_gerados = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L147_C8", "label": "for URL_Target", "type": "for", "loc": [147, 168], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L139_C4", "vector": [6, 2, 0.9265, 0.1294, 2, 0.27, 0.8, 818, 7, 0, 0, 0, 0, 0, 6], "semantic": {"name": "URL_Target", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for URL_Target in self.URL_List_Target:\n self.url_attack_parse = urlparse(URL_Target)\n self.url_parse_base = self.url_attack_parse.scheme + \"://\" + self.url_attack_parse.netloc + self.url_attack_parse.path + \"?\"\n self.url_atributos_ataques = []\n self.atributo_ataque = []\n \n self.lista_var = []\n self.lista_var = self.url_attack_parse.query.split('&')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L148_C12", "label": "self.url_attack_parse = urlparse()", "type": "assigned_variable", "loc": [148, 148], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L147_C8", "vector": [14, 3, 0.8706, 0.0059, 3, 0.78, 0.0, 616, 3, 1, 0, 0, 857, 10, 1], "semantic": {"name": "self.url_attack_parse", "arg_names": [], "import_names": [], "rhs_call_name": "urlparse", "annotation": ""}, "snippet": " self.url_attack_parse = urlparse(URL_Target)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L149_C12", "label": "self.url_parse_base =", "type": "assigned_variable", "loc": [149, 149], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L147_C8", "vector": [14, 3, 0.8765, 0.0059, 3, 0.78, 0.1667, 359, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.url_parse_base", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_parse_base = self.url_attack_parse.scheme + \"://\" + self.url_attack_parse.netloc + self.url_attack_parse.path + \"?\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L150_C12", "label": "self.url_atributos_ataques =", "type": "assigned_variable", "loc": [150, 150], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L147_C8", "vector": [14, 3, 0.8824, 0.0059, 3, 0.78, 0.3333, 534, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.url_atributos_ataques", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url_atributos_ataques = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L151_C12", "label": "self.atributo_ataque =", "type": "assigned_variable", "loc": [151, 151], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L147_C8", "vector": [14, 3, 0.8882, 0.0059, 3, 0.78, 0.5, 395, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.atributo_ataque", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atributo_ataque = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L153_C12", "label": "self.lista_var =", "type": "assigned_variable", "loc": [153, 153], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L147_C8", "vector": [14, 3, 0.9, 0.0059, 3, 0.78, 0.6667, 775, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.lista_var", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.lista_var = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L154_C12", "label": "self.lista_var = split()", "type": "assigned_variable", "loc": [154, 154], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L147_C8", "vector": [14, 3, 0.9059, 0.0059, 3, 0.78, 0.8333, 775, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "self.lista_var", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " self.lista_var = self.url_attack_parse.query.split('&')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L157_C12", "label": "for atributo", "type": "for", "loc": [157, 168], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L147_C8", "vector": [6, 3, 0.9559, 0.0706, 3, 0.78, 1.0, 880, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "atributo", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for atributo in self.url_attack_parse.query.split('&'):\n self.str_var_fix = \"\"\n \n for var_fix in self.lista_var:\n if var_fix == atributo:\n pass\n else:\n self.str_var_fix = self.str_var_fix + \"&\" + var_fix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L158_C16", "label": "self.str_var_fix =", "type": "assigned_variable", "loc": [158, 158], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L157_C12", "vector": [14, 4, 0.9294, 0.0059, 4, 0.24, 0.0, 654, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.str_var_fix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.str_var_fix = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L160_C16", "label": "for var_fix", "type": "for", "loc": [160, 164], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L157_C12", "vector": [6, 4, 0.9529, 0.0294, 4, 0.24, 0.5, 894, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "var_fix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for var_fix in self.lista_var:\n if var_fix == atributo:\n pass\n else:\n self.str_var_fix = self.str_var_fix + \"&\" + var_fix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L161_C20", "label": "if", "type": "if", "loc": [161, 164], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L160_C16", "vector": [4, 5, 0.9559, 0.0235, 5, 0.38, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if var_fix == atributo:\n pass\n else:\n self.str_var_fix = self.str_var_fix + \"&\" + var_fix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L164_C24", "label": "self.str_var_fix =", "type": "assigned_variable", "loc": [164, 164], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L161_C20", "vector": [14, 6, 0.9647, 0.0059, 6, 0.08, 0.0, 654, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.str_var_fix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.str_var_fix = self.str_var_fix + \"&\" + var_fix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L167_C16", "label": "for atack", "type": "for", "loc": [167, 168], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L157_C12", "vector": [6, 4, 0.9853, 0.0118, 4, 0.24, 1.0, 893, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "atack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for atack in self.get_Attack():\n self.lista_ataques_gerados.append([self.url_parse_base + atributo + ''.join(atack) + self.str_var_fix, atributo])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L168_C20", "label": "append()", "type": "expression", "loc": [168, 168], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L167_C16", "vector": [8, 5, 0.9882, 0.0059, 5, 0.16, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.lista_ataques_gerados.append([self.url_parse_base + atributo + ''.join(atack) + self.str_var_fix, atributo])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L170_C8", "label": "return", "type": "return", "loc": [170, 170], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L139_C4", "vector": [13, 2, 1.0, 0.0059, 2, 0.27, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.lista_ataques_gerados"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L66_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L75_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L81_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L85_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L86_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L89_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L90_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L96_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L97_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L97_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L98_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L96_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L99_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L96_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L100_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L101_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L105_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L109_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L110_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L114_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L118_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L119_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L120_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L121_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L122_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L124_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L128_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L129_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L130_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L131_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L132_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L115_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L134_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L114_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L136_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L139_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L143_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L144_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L145_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L148_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L149_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L150_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L151_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L153_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L154_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L157_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L157_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L158_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L157_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L160_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L160_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L161_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:If_L161_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Assign_L164_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L157_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L167_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:For_L167_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Expr_L168_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1455:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1455:Return_L170_C8"}]
import MySQLdb ######################################################################## class Data_Access (object): #---------------------------------------------------------------------- def __init__ (self, id_vulnerability, pl_attack): """ Construtor: Cria conexão com a Base de Dados """ try: # Ainda falta tratar erros... db = MySQLdb.connect ( host = 'localhost', user = 'root', passwd = '', db = 'DB_1CLIC2LEARN' ) self.id_vulnerability = id_vulnerability self.pl_attack = pl_attack except _mysql_exceptions.OperationalError as e: print e return [("Can't connect to local MySQL server"), (e)] #---------------------------------------------------------------------- def get_Attack (self): """ Retorna os ataques """ self.cursor = db.cursor() self.cursor.execute('SELECT ATTACK FROM ' + pl_attack) self.result = cursor.fetchall() if result: for z in result: print z return result #---------------------------------------------------------------------- def get_Mitigation (self): """ Retorna formas de mitigar a vulnerabilidade identificada nos testes """ self.cursor = db.cursor() self.cursor.execute('SELECT MITIGATION FROM ' + id_vulnerability) self.result = cursor.fetchall() if result: for z in result: print z return result #---------------------------------------------------------------------- def get_Response (self): """ Retorna as respostas que a vulnerabilidade informada apresenta """ self.cursor = db.cursor() self.cursor.execute('SELECT ATTACK_RESPONSE FROM ' + id_vulnerability) self.result = cursor.fetchall() if result: for z in result: print z return result
ajibawa-2023/Python-Code-Large/train/row_1456
37
70
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Import_L1_C0", "label": "MySQLdb import MySQLdb", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0143, 0.0143, 0, 0.66, 0.0, 838, 0, 1, 0, 0, 838, 0, 0], "semantic": {"name": "MySQLdb", "arg_names": [], "import_names": ["MySQLdb"], "rhs_call_name": "", "annotation": ""}, "snippet": "import MySQLdb"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:ClassDef_L4_C0", "label": "Data_Access", "type": "class", "loc": [4, 69], "level": 0, "parent": null, "vector": [3, 0, 0.5214, 0.9429, 0, 0.66, 1.0, 671, 0, 4, 0, 0, 186, 0, 14], "semantic": {"name": "Data_Access", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Data_Access (object):\n #----------------------------------------------------------------------\n def __init__ (self, id_vulnerability, pl_attack):\n \"\"\"\n Construtor:\n Cria conex\u00e3o com a Base de Dados\n \"\"\" \n try:\t# Ainda falta tratar erros... "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L6_C4", "label": "__init__", "type": "function", "loc": [6, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:ClassDef_L4_C0", "vector": [2, 1, 0.2, 0.2429, 1, 0.78, 0.0, 555, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "id_vulnerability", "pl_attack"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__ (self, id_vulnerability, pl_attack):\n \"\"\"\n Construtor:\n Cria conex\u00e3o com a Base de Dados\n \"\"\" \n try:\t# Ainda falta tratar erros... \n db = MySQLdb.connect (\n host = 'localhost',"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L7_C8", "label": "expression", "type": "expression", "loc": [7, 10], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L6_C4", "vector": [8, 2, 0.1214, 0.0571, 2, 0.69, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Construtor:\n Cria conex\u00e3o com a Base de Dados\n \"\"\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Try_L11_C8", "label": "try", "type": "try", "loc": [11, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L6_C4", "vector": [7, 2, 0.2357, 0.1714, 2, 0.69, 1.0, 0, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\t# Ainda falta tratar erros... \n db = MySQLdb.connect (\n host = 'localhost',\n user = 'root',\n passwd = '',\n db = 'DB_1CLIC2LEARN'\n ) \n self.id_vulnerability = id_vulnerability"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L12_C12", "label": "db = connect()", "type": "assigned_variable", "loc": [12, 17], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:Try_L11_C8", "vector": [14, 3, 0.2071, 0.0857, 3, 0.78, 0.0, 761, 3, 4, 0, 0, 242, 10, 1], "semantic": {"name": "db", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " db = MySQLdb.connect (\n host = 'localhost',\n user = 'root',\n passwd = '',\n db = 'DB_1CLIC2LEARN'\n ) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L18_C12", "label": "self.id_vulnerability =", "type": "assigned_variable", "loc": [18, 18], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:Try_L11_C8", "vector": [14, 3, 0.2571, 0.0143, 3, 0.78, 0.5, 77, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.id_vulnerability", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.id_vulnerability = id_vulnerability"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L19_C12", "label": "self.pl_attack =", "type": "assigned_variable", "loc": [19, 19], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:Try_L11_C8", "vector": [14, 3, 0.2714, 0.0143, 3, 0.78, 1.0, 32, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.pl_attack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.pl_attack = pl_attack"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L21_C12", "label": "print()", "type": "expression", "loc": [21, 21], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:Try_L11_C8", "vector": [8, 3, 0.3, 0.0143, 3, 0.78, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(e)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Return_L22_C12", "label": "return", "type": "return", "loc": [22, 22], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:Try_L11_C8", "vector": [13, 3, 0.3143, 0.0143, 3, 0.78, 1.0, 0, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return [(\"Can't connect to local MySQL server\"), (e)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L26_C4", "label": "get_Attack", "type": "function", "loc": [26, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:ClassDef_L4_C0", "vector": [2, 1, 0.4571, 0.1857, 1, 0.78, 0.3333, 859, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "get_Attack", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Attack (self):\n \"\"\"\n Retorna os ataques\n \"\"\" \n self.cursor = db.cursor()\n self.cursor.execute('SELECT ATTACK FROM ' + pl_attack)\n self.result = cursor.fetchall()\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L27_C8", "label": "expression", "type": "expression", "loc": [27, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L26_C4", "vector": [8, 2, 0.4, 0.0429, 2, 0.57, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna os ataques\n \"\"\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L30_C8", "label": "self.cursor = cursor()", "type": "assigned_variable", "loc": [30, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L26_C4", "vector": [14, 2, 0.4286, 0.0143, 2, 0.57, 0.2, 538, 3, 0, 0, 0, 231, 10, 1], "semantic": {"name": "self.cursor", "arg_names": [], "import_names": [], "rhs_call_name": "cursor", "annotation": ""}, "snippet": " self.cursor = db.cursor()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L31_C8", "label": "execute()", "type": "expression", "loc": [31, 31], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L26_C4", "vector": [8, 2, 0.4429, 0.0143, 2, 0.57, 0.4, 569, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "execute", "arg_names": [], "import_names": [], "rhs_call_name": "execute", "annotation": ""}, "snippet": " self.cursor.execute('SELECT ATTACK FROM ' + pl_attack)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L32_C8", "label": "self.result = fetchall()", "type": "assigned_variable", "loc": [32, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L26_C4", "vector": [14, 2, 0.4571, 0.0143, 2, 0.57, 0.6, 341, 3, 0, 0, 0, 133, 10, 1], "semantic": {"name": "self.result", "arg_names": [], "import_names": [], "rhs_call_name": "fetchall", "annotation": ""}, "snippet": " self.result = cursor.fetchall()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:If_L34_C8", "label": "if", "type": "if", "loc": [34, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L26_C4", "vector": [4, 2, 0.5, 0.0429, 2, 0.57, 0.8, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if result:\n for z in result:\n print(z)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:For_L35_C12", "label": "for z", "type": "for", "loc": [35, 36], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:If_L34_C8", "vector": [6, 3, 0.5071, 0.0286, 3, 0.41, 0.0, 859, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "z", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for z in result:\n print(z)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L36_C16", "label": "print()", "type": "expression", "loc": [36, 36], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:For_L35_C12", "vector": [8, 4, 0.5143, 0.0143, 4, 0.3, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(z)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Return_L38_C8", "label": "return", "type": "return", "loc": [38, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L26_C4", "vector": [13, 2, 0.5429, 0.0143, 2, 0.57, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L42_C4", "label": "get_Mitigation", "type": "function", "loc": [42, 54], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:ClassDef_L4_C0", "vector": [2, 1, 0.6857, 0.1857, 1, 0.78, 0.6667, 460, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "get_Mitigation", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Mitigation (self):\n \"\"\"\n Retorna formas de mitigar a vulnerabilidade identificada nos testes\n \"\"\"\n self.cursor = db.cursor()\n self.cursor.execute('SELECT MITIGATION FROM ' + id_vulnerability)\n self.result = cursor.fetchall()\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L43_C8", "label": "expression", "type": "expression", "loc": [43, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L42_C4", "vector": [8, 2, 0.6286, 0.0429, 2, 0.47, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna formas de mitigar a vulnerabilidade identificada nos testes\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L46_C8", "label": "self.cursor = cursor()", "type": "assigned_variable", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L42_C4", "vector": [14, 2, 0.6571, 0.0143, 2, 0.47, 0.2, 538, 3, 0, 0, 0, 231, 10, 1], "semantic": {"name": "self.cursor", "arg_names": [], "import_names": [], "rhs_call_name": "cursor", "annotation": ""}, "snippet": " self.cursor = db.cursor()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L47_C8", "label": "execute()", "type": "expression", "loc": [47, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L42_C4", "vector": [8, 2, 0.6714, 0.0143, 2, 0.47, 0.4, 569, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "execute", "arg_names": [], "import_names": [], "rhs_call_name": "execute", "annotation": ""}, "snippet": " self.cursor.execute('SELECT MITIGATION FROM ' + id_vulnerability)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L48_C8", "label": "self.result = fetchall()", "type": "assigned_variable", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L42_C4", "vector": [14, 2, 0.6857, 0.0143, 2, 0.47, 0.6, 341, 3, 0, 0, 0, 133, 10, 1], "semantic": {"name": "self.result", "arg_names": [], "import_names": [], "rhs_call_name": "fetchall", "annotation": ""}, "snippet": " self.result = cursor.fetchall()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:If_L50_C8", "label": "if", "type": "if", "loc": [50, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L42_C4", "vector": [4, 2, 0.7286, 0.0429, 2, 0.47, 0.8, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if result:\n for z in result:\n print(z)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:For_L51_C12", "label": "for z", "type": "for", "loc": [51, 52], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:If_L50_C8", "vector": [6, 3, 0.7357, 0.0286, 3, 0.95, 0.0, 859, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "z", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for z in result:\n print(z)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L52_C16", "label": "print()", "type": "expression", "loc": [52, 52], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:For_L51_C12", "vector": [8, 4, 0.7429, 0.0143, 4, 0.69, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(z)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Return_L54_C8", "label": "return", "type": "return", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L42_C4", "vector": [13, 2, 0.7714, 0.0143, 2, 0.47, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L57_C4", "label": "get_Response", "type": "function", "loc": [57, 69], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:ClassDef_L4_C0", "vector": [2, 1, 0.9, 0.1857, 1, 0.78, 1.0, 877, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "get_Response", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_Response (self):\n \"\"\"\n Retorna as respostas que a vulnerabilidade informada apresenta\n \"\"\"\n self.cursor = db.cursor()\n self.cursor.execute('SELECT ATTACK_RESPONSE FROM ' + id_vulnerability)\n self.result = cursor.fetchall()\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L58_C8", "label": "expression", "type": "expression", "loc": [58, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L57_C4", "vector": [8, 2, 0.8429, 0.0429, 2, 0.93, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Retorna as respostas que a vulnerabilidade informada apresenta\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L61_C8", "label": "self.cursor = cursor()", "type": "assigned_variable", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L57_C4", "vector": [14, 2, 0.8714, 0.0143, 2, 0.93, 0.2, 538, 3, 0, 0, 0, 231, 10, 1], "semantic": {"name": "self.cursor", "arg_names": [], "import_names": [], "rhs_call_name": "cursor", "annotation": ""}, "snippet": " self.cursor = db.cursor()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L62_C8", "label": "execute()", "type": "expression", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L57_C4", "vector": [8, 2, 0.8857, 0.0143, 2, 0.93, 0.4, 569, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "execute", "arg_names": [], "import_names": [], "rhs_call_name": "execute", "annotation": ""}, "snippet": " self.cursor.execute('SELECT ATTACK_RESPONSE FROM ' + id_vulnerability)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L63_C8", "label": "self.result = fetchall()", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L57_C4", "vector": [14, 2, 0.9, 0.0143, 2, 0.93, 0.6, 341, 3, 0, 0, 0, 133, 10, 1], "semantic": {"name": "self.result", "arg_names": [], "import_names": [], "rhs_call_name": "fetchall", "annotation": ""}, "snippet": " self.result = cursor.fetchall()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:If_L65_C8", "label": "if", "type": "if", "loc": [65, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L57_C4", "vector": [4, 2, 0.9429, 0.0429, 2, 0.93, 0.8, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if result:\n for z in result:\n print(z)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:For_L66_C12", "label": "for z", "type": "for", "loc": [66, 67], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:If_L65_C8", "vector": [6, 3, 0.95, 0.0286, 3, 0.72, 0.0, 859, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "z", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for z in result:\n print(z)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L67_C16", "label": "print()", "type": "expression", "loc": [67, 67], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:For_L66_C12", "vector": [8, 4, 0.9571, 0.0143, 4, 0.64, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(z)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1456:Return_L69_C8", "label": "return", "type": "return", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L57_C4", "vector": [13, 2, 0.9857, 0.0143, 2, 0.93, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return result"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1456:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Try_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:Try_L11_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L12_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:Try_L11_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L18_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:Try_L11_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L19_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:Try_L11_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L21_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:Try_L11_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Return_L22_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L30_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:If_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:If_L34_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:For_L35_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:For_L35_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L36_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Return_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L43_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:If_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:If_L50_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:For_L51_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:For_L51_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L52_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Return_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L58_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:If_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:If_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:For_L66_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:For_L66_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Expr_L67_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1456:FunctionDef_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1456:Return_L69_C8"}]
import MySQLdb ######################################################################## class Data_Access (object): """ Cria conexao com a Base de Dados """ dba = MySQLdb.connect (host = 'localhost', user = 'root', passwd = '', db = 'DB_1CLIC2LEARN') #---------------------------------------------------------------------- def __init__(self, id_vulnerability, pl_attack): """ Construtor: Configura para a vulnerabilidade selecionada """ self.id_vulnerability = id_vulnerability self.pl_attack = pl_attack #---------------------------------------------------------------------- def getAttack (self): """ RESTORNA OS ATAQUES DA VULNERABILIDADE INFORMADA """ self.cursor = self.dba.cursor() self.cursor.execute('SELECT ATTACK FROM ' + self.pl_attack) self.result = self.cursor.fetchall() return self.result #---------------------------------------------------------------------- def getMitigation (self): """ RESTORNA A FORMA DE MITIGAR A VULNERABILIDADE INFORMADA """ self.cursor = self.dba.cursor() self.cursor.execute('SELECT MITIGATION FROM MITIGATION WHERE ID_VULNERABILITY = ' + str(self.id_vulnerability)) self.result = self.cursor.fetchone() return self.result #---------------------------------------------------------------------- def getResponse (self): """ RESTORNA AS RESPOSTAS QUE A VULNERABILIDADE INFORMADA APRESENTA """ self.cursor = self.dba.cursor() self.cursor.execute('SELECT RESPONSE FROM ATTACK_RESPONSE WHERE ID_VULNERABILITY = ' + str(self.id_vulnerability)) self.result = self.cursor.fetchall() return self.result
ajibawa-2023/Python-Code-Large/train/row_1457
26
53
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Import_L1_C0", "label": "MySQLdb import MySQLdb", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0189, 0.0189, 0, 0.66, 0.0, 838, 0, 1, 0, 0, 838, 0, 0], "semantic": {"name": "MySQLdb", "arg_names": [], "import_names": ["MySQLdb"], "rhs_call_name": "", "annotation": ""}, "snippet": "import MySQLdb"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:ClassDef_L5_C0", "label": "Data_Access", "type": "class", "loc": [5, 52], "level": 0, "parent": null, "vector": [3, 0, 0.5377, 0.9057, 0, 0.66, 1.0, 671, 0, 4, 0, 0, 186, 0, 12], "semantic": {"name": "Data_Access", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Data_Access (object):\n \"\"\"\n Cria conexao com a Base de Dados\n \"\"\" \n dba = MySQLdb.connect (host = 'localhost', user = 'root', passwd = '', db = 'DB_1CLIC2LEARN') \n\n\n #----------------------------------------------------------------------"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Expr_L6_C4", "label": "expression", "type": "expression", "loc": [6, 8], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:ClassDef_L5_C0", "vector": [8, 1, 0.1321, 0.0566, 1, 0.92, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Cria conexao com a Base de Dados\n \"\"\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L9_C4", "label": "dba = connect()", "type": "assigned_variable", "loc": [9, 9], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:ClassDef_L5_C0", "vector": [14, 1, 0.1698, 0.0189, 1, 0.92, 0.2, 35, 3, 4, 0, 0, 242, 10, 1], "semantic": {"name": "dba", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " dba = MySQLdb.connect (host = 'localhost', user = 'root', passwd = '', db = 'DB_1CLIC2LEARN') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L13_C4", "label": "__init__", "type": "function", "loc": [13, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:ClassDef_L5_C0", "vector": [2, 1, 0.3019, 0.1321, 1, 0.92, 0.4, 555, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "id_vulnerability", "pl_attack"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, id_vulnerability, pl_attack):\n \"\"\"\n Construtor:\n Configura para a vulnerabilidade selecionada\n \"\"\" \n self.id_vulnerability = id_vulnerability\n self.pl_attack = pl_attack"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Expr_L14_C8", "label": "expression", "type": "expression", "loc": [14, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L13_C4", "vector": [8, 2, 0.2925, 0.0755, 2, 0.3, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Construtor:\n Configura para a vulnerabilidade selecionada\n \"\"\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L18_C8", "label": "self.id_vulnerability =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L13_C4", "vector": [14, 2, 0.3396, 0.0189, 2, 0.3, 0.5, 77, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.id_vulnerability", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.id_vulnerability = id_vulnerability"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L19_C8", "label": "self.pl_attack =", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L13_C4", "vector": [14, 2, 0.3585, 0.0189, 2, 0.3, 1.0, 32, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.pl_attack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.pl_attack = pl_attack"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L22_C4", "label": "getAttack", "type": "function", "loc": [22, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:ClassDef_L5_C0", "vector": [2, 1, 0.4906, 0.1698, 1, 0.92, 0.6, 301, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "getAttack", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getAttack (self):\n \"\"\"\n RESTORNA OS ATAQUES DA VULNERABILIDADE INFORMADA\n \"\"\"\n self.cursor = self.dba.cursor()\n self.cursor.execute('SELECT ATTACK FROM ' + self.pl_attack)\n self.result = self.cursor.fetchall()\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Expr_L23_C8", "label": "expression", "type": "expression", "loc": [23, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L22_C4", "vector": [8, 2, 0.4528, 0.0566, 2, 0.96, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n RESTORNA OS ATAQUES DA VULNERABILIDADE INFORMADA\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L26_C8", "label": "self.cursor = cursor()", "type": "assigned_variable", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L22_C4", "vector": [14, 2, 0.4906, 0.0189, 2, 0.96, 0.25, 538, 3, 0, 0, 0, 231, 10, 1], "semantic": {"name": "self.cursor", "arg_names": [], "import_names": [], "rhs_call_name": "cursor", "annotation": ""}, "snippet": " self.cursor = self.dba.cursor()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Expr_L27_C8", "label": "execute()", "type": "expression", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L22_C4", "vector": [8, 2, 0.5094, 0.0189, 2, 0.96, 0.5, 569, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "execute", "arg_names": [], "import_names": [], "rhs_call_name": "execute", "annotation": ""}, "snippet": " self.cursor.execute('SELECT ATTACK FROM ' + self.pl_attack)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L28_C8", "label": "self.result = fetchall()", "type": "assigned_variable", "loc": [28, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L22_C4", "vector": [14, 2, 0.5283, 0.0189, 2, 0.96, 0.75, 341, 3, 0, 0, 0, 133, 10, 1], "semantic": {"name": "self.result", "arg_names": [], "import_names": [], "rhs_call_name": "fetchall", "annotation": ""}, "snippet": " self.result = self.cursor.fetchall()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Return_L30_C8", "label": "return", "type": "return", "loc": [30, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L22_C4", "vector": [13, 2, 0.566, 0.0189, 2, 0.96, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L33_C4", "label": "getMitigation", "type": "function", "loc": [33, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:ClassDef_L5_C0", "vector": [2, 1, 0.6981, 0.1698, 1, 0.92, 0.8, 141, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "getMitigation", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getMitigation (self):\n \"\"\"\n RESTORNA A FORMA DE MITIGAR A VULNERABILIDADE INFORMADA\n \"\"\"\n self.cursor = self.dba.cursor()\n self.cursor.execute('SELECT MITIGATION FROM MITIGATION WHERE ID_VULNERABILITY = ' + str(self.id_vulnerability))\n self.result = self.cursor.fetchone()\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Expr_L34_C8", "label": "expression", "type": "expression", "loc": [34, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L33_C4", "vector": [8, 2, 0.6604, 0.0566, 2, 0.4, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n RESTORNA A FORMA DE MITIGAR A VULNERABILIDADE INFORMADA\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L37_C8", "label": "self.cursor = cursor()", "type": "assigned_variable", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L33_C4", "vector": [14, 2, 0.6981, 0.0189, 2, 0.4, 0.25, 538, 3, 0, 0, 0, 231, 10, 1], "semantic": {"name": "self.cursor", "arg_names": [], "import_names": [], "rhs_call_name": "cursor", "annotation": ""}, "snippet": " self.cursor = self.dba.cursor()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Expr_L38_C8", "label": "execute()", "type": "expression", "loc": [38, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L33_C4", "vector": [8, 2, 0.717, 0.0189, 2, 0.4, 0.5, 569, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "execute", "arg_names": [], "import_names": [], "rhs_call_name": "execute", "annotation": ""}, "snippet": " self.cursor.execute('SELECT MITIGATION FROM MITIGATION WHERE ID_VULNERABILITY = ' + str(self.id_vulnerability))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L39_C8", "label": "self.result = fetchone()", "type": "assigned_variable", "loc": [39, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L33_C4", "vector": [14, 2, 0.7358, 0.0189, 2, 0.4, 0.75, 341, 3, 0, 0, 0, 561, 10, 1], "semantic": {"name": "self.result", "arg_names": [], "import_names": [], "rhs_call_name": "fetchone", "annotation": ""}, "snippet": " self.result = self.cursor.fetchone()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Return_L41_C8", "label": "return", "type": "return", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L33_C4", "vector": [13, 2, 0.7736, 0.0189, 2, 0.4, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L44_C4", "label": "getResponse", "type": "function", "loc": [44, 52], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:ClassDef_L5_C0", "vector": [2, 1, 0.9057, 0.1698, 1, 0.92, 1.0, 323, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "getResponse", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getResponse (self):\n \"\"\"\n RESTORNA AS RESPOSTAS QUE A VULNERABILIDADE INFORMADA APRESENTA\n \"\"\"\n self.cursor = self.dba.cursor()\n self.cursor.execute('SELECT RESPONSE FROM ATTACK_RESPONSE WHERE ID_VULNERABILITY = ' + str(self.id_vulnerability))\n self.result = self.cursor.fetchall()\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Expr_L45_C8", "label": "expression", "type": "expression", "loc": [45, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L44_C4", "vector": [8, 2, 0.8679, 0.0566, 2, 0.5, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n RESTORNA AS RESPOSTAS QUE A VULNERABILIDADE INFORMADA APRESENTA\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L48_C8", "label": "self.cursor = cursor()", "type": "assigned_variable", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L44_C4", "vector": [14, 2, 0.9057, 0.0189, 2, 0.5, 0.25, 538, 3, 0, 0, 0, 231, 10, 1], "semantic": {"name": "self.cursor", "arg_names": [], "import_names": [], "rhs_call_name": "cursor", "annotation": ""}, "snippet": " self.cursor = self.dba.cursor()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Expr_L49_C8", "label": "execute()", "type": "expression", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L44_C4", "vector": [8, 2, 0.9245, 0.0189, 2, 0.5, 0.5, 569, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "execute", "arg_names": [], "import_names": [], "rhs_call_name": "execute", "annotation": ""}, "snippet": " self.cursor.execute('SELECT RESPONSE FROM ATTACK_RESPONSE WHERE ID_VULNERABILITY = ' + str(self.id_vulnerability))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L50_C8", "label": "self.result = fetchall()", "type": "assigned_variable", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L44_C4", "vector": [14, 2, 0.9434, 0.0189, 2, 0.5, 0.75, 341, 3, 0, 0, 0, 133, 10, 1], "semantic": {"name": "self.result", "arg_names": [], "import_names": [], "rhs_call_name": "fetchall", "annotation": ""}, "snippet": " self.result = self.cursor.fetchall()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1457:Return_L52_C8", "label": "return", "type": "return", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L44_C4", "vector": [13, 2, 0.9811, 0.0189, 2, 0.5, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.result"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1457:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Expr_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Expr_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L28_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Return_L30_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Expr_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Expr_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L39_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Return_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Expr_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Expr_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Assign_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1457:FunctionDef_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1457:Return_L52_C8"}]
import os import urllib from google.appengine.api import users from google.appengine.ext import ndb import jinja2 import webapp2 JINJA_ENVIRONMENT = jinja2.Environment( loader=jinja2.FileSystemLoader(os.path.dirname(__file__)), extensions=['jinja2.ext.autoescape'], autoescape=True) class MainPage(webapp2.RequestHandler): def get(self): template_values = {} template = JINJA_ENVIRONMENT.get_template('index.html') self.response.write(template.render(template_values)) application = webapp2.WSGIApplication([ ('/', MainPage), ], debug=True)
ajibawa-2023/Python-Code-Large/train/row_1458
13
26
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1458:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0385, 0.0385, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1458:Import_L2_C0", "label": "urllib import urllib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0385, 0, 0.66, 0.125, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urllib"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1458:ImportFrom_L4_C0", "label": "from google.appengine.api import users", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.1538, 0.0385, 0, 0.66, 0.25, 279, 0, 1, 0, 0, 279, 0, 0], "semantic": {"name": "google.appengine.api", "arg_names": [], "import_names": ["users"], "rhs_call_name": "", "annotation": ""}, "snippet": "from google.appengine.api import users"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1458:ImportFrom_L5_C0", "label": "from google.appengine.ext import ndb", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1923, 0.0385, 0, 0.66, 0.375, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names": [], "import_names": ["ndb"], "rhs_call_name": "", "annotation": ""}, "snippet": "from google.appengine.ext import ndb"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1458:Import_L7_C0", "label": "jinja2 import jinja2", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.2692, 0.0385, 0, 0.66, 0.5, 436, 0, 1, 0, 0, 436, 0, 0], "semantic": {"name": "jinja2", "arg_names": [], "import_names": ["jinja2"], "rhs_call_name": "", "annotation": ""}, "snippet": "import jinja2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1458:Import_L8_C0", "label": "webapp2 import webapp2", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.3077, 0.0385, 0, 0.66, 0.625, 123, 0, 1, 0, 0, 123, 0, 0], "semantic": {"name": "webapp2", "arg_names": [], "import_names": ["webapp2"], "rhs_call_name": "", "annotation": ""}, "snippet": "import webapp2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1458:Assign_L10_C0", "label": "JINJA_ENVIRONMENT = Environment()", "type": "assigned_variable", "loc": [10, 13], "level": 0, "parent": null, "vector": [14, 0, 0.4423, 0.1538, 0, 0.66, 0.75, 751, 3, 3, 0, 0, 947, 10, 3], "semantic": {"name": "JINJA_ENVIRONMENT", "arg_names": [], "import_names": [], "rhs_call_name": "Environment", "annotation": ""}, "snippet": "JINJA_ENVIRONMENT = jinja2.Environment(\n loader=jinja2.FileSystemLoader(os.path.dirname(__file__)),\n extensions=['jinja2.ext.autoescape'],\n autoescape=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1458:ClassDef_L15_C0", "label": "MainPage", "type": "class", "loc": [15, 22], "level": 0, "parent": null, "vector": [3, 0, 0.7115, 0.3077, 0, 0.66, 0.875, 516, 0, 1, 0, 0, 842, 0, 3], "semantic": {"name": "MainPage", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class MainPage(webapp2.RequestHandler):\n\n def get(self):\n\n template_values = {}\n\n template = JINJA_ENVIRONMENT.get_template('index.html')\n self.response.write(template.render(template_values))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1458:FunctionDef_L17_C4", "label": "get", "type": "function", "loc": [17, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1458:ClassDef_L15_C0", "vector": [2, 1, 0.75, 0.2308, 1, 0.27, 0.0, 607, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "get", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get(self):\n\n template_values = {}\n\n template = JINJA_ENVIRONMENT.get_template('index.html')\n self.response.write(template.render(template_values))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1458:Assign_L19_C8", "label": "template_values =", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1458:FunctionDef_L17_C4", "vector": [14, 2, 0.7308, 0.0385, 2, 0.17, 0.0, 163, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "template_values", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template_values = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1458:Assign_L21_C8", "label": "template = get_template()", "type": "assigned_variable", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1458:FunctionDef_L17_C4", "vector": [14, 2, 0.8077, 0.0385, 2, 0.17, 0.5, 549, 3, 1, 0, 0, 27, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "get_template", "annotation": ""}, "snippet": " template = JINJA_ENVIRONMENT.get_template('index.html')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1458:Expr_L22_C8", "label": "write()", "type": "expression", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1458:FunctionDef_L17_C4", "vector": [8, 2, 0.8462, 0.0385, 2, 0.17, 1.0, 837, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " self.response.write(template.render(template_values))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1458:Assign_L24_C0", "label": "application = WSGIApplication()", "type": "assigned_variable", "loc": [24, 26], "level": 0, "parent": null, "vector": [14, 0, 0.9615, 0.1154, 0, 0.66, 1.0, 244, 3, 2, 0, 0, 623, 10, 1], "semantic": {"name": "application", "arg_names": [], "import_names": [], "rhs_call_name": "WSGIApplication", "annotation": ""}, "snippet": "application = webapp2.WSGIApplication([\n ('/', MainPage),\n], debug=True)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1458:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1458:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1458:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1458:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1458:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1458:Assign_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1458:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1458:Expr_L22_C8"}]
#! /usr/bin/env python # encoding: utf-8 # waf 1.6.10 VERSION='0.3.3' import sys APPNAME='p2t' top = '.' out = 'build' CPP_SOURCES = ['poly2tri/common/shapes.cc', 'poly2tri/sweep/cdt.cc', 'poly2tri/sweep/advancing_front.cc', 'poly2tri/sweep/sweep_context.cc', 'poly2tri/sweep/sweep.cc', 'testbed/main.cc'] from waflib.Tools.compiler_cxx import cxx_compiler cxx_compiler['win32'] = ['g++'] #Platform specific libs if sys.platform == 'win32': # MS Windows sys_libs = ['glfw', 'opengl32'] elif sys.platform == 'darwin': # Apple OSX sys_libs = ['glfw', 'OpenGL'] else: # GNU/Linux, BSD, etc sys_libs = ['glfw', 'GL'] def options(opt): print(' set_options') opt.load('compiler_cxx') def configure(conf): print(' calling the configuration') conf.load('compiler_cxx') conf.env.CXXFLAGS = ['-O3', '-ffast-math'] conf.env.DEFINES_P2T = ['P2T'] conf.env.LIB_P2T = sys_libs def build(bld): print(' building') bld.program(features = 'cxx cxxprogram', source=CPP_SOURCES, target = 'p2t', uselib = 'P2T')
ajibawa-2023/Python-Code-Large/train/row_1459
25
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L5_C0", "label": "VERSION =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.1111, 0.0222, 0, 0.66, 0.0, 557, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "VERSION", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "VERSION='0.3.3'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Import_L6_C0", "label": "sys import sys", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.1333, 0.0222, 0, 0.66, 0.0909, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L7_C0", "label": "APPNAME =", "type": "assigned_variable", "loc": [7, 7], "level": 0, "parent": null, "vector": [14, 0, 0.1556, 0.0222, 0, 0.66, 0.1818, 985, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "APPNAME", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "APPNAME='p2t'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L8_C0", "label": "top =", "type": "assigned_variable", "loc": [8, 8], "level": 0, "parent": null, "vector": [14, 0, 0.1778, 0.0222, 0, 0.66, 0.2727, 208, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "top", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "top = '.'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L9_C0", "label": "out =", "type": "assigned_variable", "loc": [9, 9], "level": 0, "parent": null, "vector": [14, 0, 0.2, 0.0222, 0, 0.66, 0.3636, 434, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "out", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "out = 'build'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L11_C0", "label": "CPP_SOURCES =", "type": "assigned_variable", "loc": [11, 16], "level": 0, "parent": null, "vector": [14, 0, 0.3, 0.1333, 0, 0.66, 0.4545, 694, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "CPP_SOURCES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CPP_SOURCES = ['poly2tri/common/shapes.cc',\n 'poly2tri/sweep/cdt.cc',\n 'poly2tri/sweep/advancing_front.cc',\n 'poly2tri/sweep/sweep_context.cc',\n 'poly2tri/sweep/sweep.cc',\n 'testbed/main.cc']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:ImportFrom_L18_C0", "label": "from waflib.Tools.compiler_cxx import cxx_compiler", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.4, 0.0222, 0, 0.66, 0.5455, 887, 0, 1, 0, 0, 887, 0, 0], "semantic": {"name": "waflib.Tools.compiler_cxx", "arg_names": [], "import_names": ["cxx_compiler"], "rhs_call_name": "", "annotation": ""}, "snippet": "from waflib.Tools.compiler_cxx import cxx_compiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L19_C0", "label": "assign", "type": "assigned_variable", "loc": [19, 19], "level": 0, "parent": null, "vector": [14, 0, 0.4222, 0.0222, 0, 0.66, 0.6364, 0, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cxx_compiler['win32'] = ['g++']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:If_L22_C0", "label": "if", "type": "if", "loc": [22, 30], "level": 0, "parent": null, "vector": [4, 0, 0.5778, 0.2, 0, 0.66, 0.7273, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if sys.platform == 'win32':\n # MS Windows\n sys_libs = ['glfw', 'opengl32']\nelif sys.platform == 'darwin':\n # Apple OSX\n sys_libs = ['glfw', 'OpenGL']\nelse:\n # GNU/Linux, BSD, etc"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L24_C4", "label": "sys_libs =", "type": "assigned_variable", "loc": [24, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1459:If_L22_C0", "vector": [14, 1, 0.5333, 0.0222, 1, 0.92, 0.0, 134, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "sys_libs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sys_libs = ['glfw', 'opengl32']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:If_L25_C0", "label": "if", "type": "if", "loc": [25, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1459:If_L22_C0", "vector": [4, 1, 0.6111, 0.1333, 1, 0.92, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "elif sys.platform == 'darwin':\n # Apple OSX\n sys_libs = ['glfw', 'OpenGL']\nelse:\n # GNU/Linux, BSD, etc\n sys_libs = ['glfw', 'GL']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L27_C4", "label": "sys_libs =", "type": "assigned_variable", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1459:If_L25_C0", "vector": [14, 2, 0.6, 0.0222, 2, 0.19, 0.0, 134, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "sys_libs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sys_libs = ['glfw', 'OpenGL']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L30_C4", "label": "sys_libs =", "type": "assigned_variable", "loc": [30, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1459:If_L25_C0", "vector": [14, 2, 0.6667, 0.0222, 2, 0.19, 1.0, 134, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "sys_libs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sys_libs = ['glfw', 'GL']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L32_C0", "label": "options", "type": "function", "loc": [32, 34], "level": 0, "parent": null, "vector": [2, 0, 0.7333, 0.0667, 0, 0.66, 0.8182, 707, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "options", "arg_names": ["opt"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def options(opt):\n print(' set_options')\n opt.load('compiler_cxx')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Expr_L33_C2", "label": "print()", "type": "expression", "loc": [33, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L32_C0", "vector": [8, 1, 0.7333, 0.0222, 1, 0.37, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(' set_options')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Expr_L34_C2", "label": "load()", "type": "expression", "loc": [34, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L32_C0", "vector": [8, 1, 0.7556, 0.0222, 1, 0.37, 1.0, 37, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "load", "arg_names": [], "import_names": [], "rhs_call_name": "load", "annotation": ""}, "snippet": " opt.load('compiler_cxx')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L36_C0", "label": "configure", "type": "function", "loc": [36, 41], "level": 0, "parent": null, "vector": [2, 0, 0.8556, 0.1333, 0, 0.66, 0.9091, 765, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "configure", "arg_names": ["conf"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def configure(conf):\n print(' calling the configuration')\n conf.load('compiler_cxx')\n conf.env.CXXFLAGS = ['-O3', '-ffast-math']\n conf.env.DEFINES_P2T = ['P2T']\n conf.env.LIB_P2T = sys_libs"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Expr_L37_C2", "label": "print()", "type": "expression", "loc": [37, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L36_C0", "vector": [8, 1, 0.8222, 0.0222, 1, 0.49, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(' calling the configuration')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Expr_L38_C2", "label": "load()", "type": "expression", "loc": [38, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L36_C0", "vector": [8, 1, 0.8444, 0.0222, 1, 0.49, 0.25, 37, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "load", "arg_names": [], "import_names": [], "rhs_call_name": "load", "annotation": ""}, "snippet": " conf.load('compiler_cxx')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L39_C2", "label": "conf.env.CXXFLAGS =", "type": "assigned_variable", "loc": [39, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L36_C0", "vector": [14, 1, 0.8667, 0.0222, 1, 0.49, 0.5, 647, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "conf.env.CXXFLAGS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " conf.env.CXXFLAGS = ['-O3', '-ffast-math']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L40_C2", "label": "conf.env.DEFINES_P2T =", "type": "assigned_variable", "loc": [40, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L36_C0", "vector": [14, 1, 0.8889, 0.0222, 1, 0.49, 0.75, 162, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "conf.env.DEFINES_P2T", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " conf.env.DEFINES_P2T = ['P2T']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L41_C2", "label": "conf.env.LIB_P2T =", "type": "assigned_variable", "loc": [41, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L36_C0", "vector": [14, 1, 0.9111, 0.0222, 1, 0.49, 1.0, 199, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "conf.env.LIB_P2T", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " conf.env.LIB_P2T = sys_libs"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L43_C0", "label": "build", "type": "function", "loc": [43, 45], "level": 0, "parent": null, "vector": [2, 0, 0.9778, 0.0667, 0, 0.66, 1.0, 448, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "build", "arg_names": ["bld"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def build(bld):\n print(' building')\n bld.program(features = 'cxx cxxprogram', source=CPP_SOURCES, target = 'p2t', uselib = 'P2T')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Expr_L44_C2", "label": "print()", "type": "expression", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L43_C0", "vector": [8, 1, 0.9778, 0.0222, 1, 0.81, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(' building')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1459:Expr_L45_C2", "label": "program()", "type": "expression", "loc": [45, 45], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L43_C0", "vector": [8, 1, 1.0, 0.0222, 1, 0.81, 1.0, 623, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "program", "arg_names": [], "import_names": [], "rhs_call_name": "program", "annotation": ""}, "snippet": " bld.program(features = 'cxx cxxprogram', source=CPP_SOURCES, target = 'p2t', uselib = 'P2T')"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1459:If_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1459:If_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1459:If_L25_C0"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1459:If_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1459:If_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1459:Expr_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1459:Expr_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1459:Expr_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1459:Expr_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L40_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1459:Assign_L41_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1459:Expr_L44_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1459:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1459:Expr_L45_C2"}]
#!/usr/bin/python # Copyright 2011 Google, Inc. All Rights Reserved. # simple script to walk source tree looking for third-party licenses # dumps resulting html page to stdout import os, re, mimetypes, sys # read source directories to scan from command line SOURCE = sys.argv[1:] # regex to find /* */ style comment blocks COMMENT_BLOCK = re.compile(r"(/\*.+?\*/)", re.MULTILINE | re.DOTALL) # regex used to detect if comment block is a license COMMENT_LICENSE = re.compile(r"(license)", re.IGNORECASE) COMMENT_COPYRIGHT = re.compile(r"(copyright)", re.IGNORECASE) EXCLUDE_TYPES = [ "application/xml", "image/png", ] # list of known licenses; keys are derived by stripping all whitespace and # forcing to lowercase to help combine multiple files that have same license. KNOWN_LICENSES = {} class License: def __init__(self, license_text): self.license_text = license_text self.filenames = [] # add filename to the list of files that have the same license text def add_file(self, filename): if filename not in self.filenames: self.filenames.append(filename) LICENSE_KEY = re.compile(r"[^\w]") def find_license(license_text): # TODO(alice): a lot these licenses are almost identical Apache licenses. # Most of them differ in origin/modifications. Consider combining similar # licenses. license_key = LICENSE_KEY.sub("", license_text).lower() if license_key not in KNOWN_LICENSES: KNOWN_LICENSES[license_key] = License(license_text) return KNOWN_LICENSES[license_key] def discover_license(exact_path, filename): # when filename ends with LICENSE, assume applies to filename prefixed if filename.endswith("LICENSE"): with open(exact_path) as file: license_text = file.read() target_filename = filename[:-len("LICENSE")] if target_filename.endswith("."): target_filename = target_filename[:-1] find_license(license_text).add_file(target_filename) return None # try searching for license blocks in raw file mimetype = mimetypes.guess_type(filename) if mimetype in EXCLUDE_TYPES: return None with open(exact_path) as file: raw_file = file.read() # include comments that have both "license" and "copyright" in the text for comment in COMMENT_BLOCK.finditer(raw_file): comment = comment.group(1) if COMMENT_LICENSE.search(comment) is None: continue if COMMENT_COPYRIGHT.search(comment) is None: continue find_license(comment).add_file(filename) for source in SOURCE: for root, dirs, files in os.walk(source): for name in files: discover_license(os.path.join(root, name), name) print "<html><head><style> body { font-family: sans-serif; } pre { background-color: #eeeeee; padding: 1em; white-space: pre-wrap; } </style></head><body>" for license in KNOWN_LICENSES.values(): print "<h3>Notices for files:</h3><ul>" filenames = license.filenames filenames.sort() for filename in filenames: print "<li>%s</li>" % (filename) print "</ul>" print "<pre>%s</pre>" % license.license_text print "</body></html>"
ajibawa-2023/Python-Code-Large/train/row_1460
51
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Import_L8_C0", "label": "os import os, re, mimetypes\u2026", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0816, 0.0102, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "re", "mimetypes", "sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os, re, mimetypes, sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L12_C0", "label": "SOURCE =", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.1224, 0.0102, 0, 0.66, 0.0714, 792, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "SOURCE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "SOURCE = sys.argv[1:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L15_C0", "label": "COMMENT_BLOCK = compile()", "type": "assigned_variable", "loc": [15, 15], "level": 0, "parent": null, "vector": [14, 0, 0.1531, 0.0102, 0, 0.66, 0.1429, 629, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "COMMENT_BLOCK", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "COMMENT_BLOCK = re.compile(r\"(/\\*.+?\\*/)\", re.MULTILINE | re.DOTALL)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L17_C0", "label": "COMMENT_LICENSE = compile()", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.1735, 0.0102, 0, 0.66, 0.2143, 929, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "COMMENT_LICENSE", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "COMMENT_LICENSE = re.compile(r\"(license)\", re.IGNORECASE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L18_C0", "label": "COMMENT_COPYRIGHT = compile()", "type": "assigned_variable", "loc": [18, 18], "level": 0, "parent": null, "vector": [14, 0, 0.1837, 0.0102, 0, 0.66, 0.2857, 407, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "COMMENT_COPYRIGHT", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "COMMENT_COPYRIGHT = re.compile(r\"(copyright)\", re.IGNORECASE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L20_C0", "label": "EXCLUDE_TYPES =", "type": "assigned_variable", "loc": [20, 23], "level": 0, "parent": null, "vector": [14, 0, 0.2194, 0.0408, 0, 0.66, 0.3571, 265, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "EXCLUDE_TYPES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "EXCLUDE_TYPES = [\n \"application/xml\",\n \"image/png\",\n]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L28_C0", "label": "KNOWN_LICENSES =", "type": "assigned_variable", "loc": [28, 28], "level": 0, "parent": null, "vector": [14, 0, 0.2857, 0.0102, 0, 0.66, 0.4286, 144, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "KNOWN_LICENSES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "KNOWN_LICENSES = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:ClassDef_L31_C0", "label": "License", "type": "class", "loc": [31, 39], "level": 0, "parent": null, "vector": [3, 0, 0.3571, 0.0918, 0, 0.66, 0.5, 338, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "License", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class License:\n def __init__(self, license_text):\n self.license_text = license_text\n self.filenames = []\n\n # add filename to the list of files that have the same license text\n def add_file(self, filename):\n if filename not in self.filenames:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L32_C4", "label": "__init__", "type": "function", "loc": [32, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:ClassDef_L31_C0", "vector": [2, 1, 0.3367, 0.0306, 1, 0.1, 0.0, 555, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "license_text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, license_text):\n self.license_text = license_text\n self.filenames = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L33_C8", "label": "self.license_text =", "type": "assigned_variable", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L32_C4", "vector": [14, 2, 0.3367, 0.0102, 2, 0.61, 0.0, 103, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.license_text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.license_text = license_text"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L34_C8", "label": "self.filenames =", "type": "assigned_variable", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L32_C4", "vector": [14, 2, 0.3469, 0.0102, 2, 0.61, 1.0, 866, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.filenames", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.filenames = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L37_C4", "label": "add_file", "type": "function", "loc": [37, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:ClassDef_L31_C0", "vector": [2, 1, 0.3878, 0.0306, 1, 0.1, 1.0, 369, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "add_file", "arg_names": ["self", "filename"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def add_file(self, filename):\n if filename not in self.filenames:\n self.filenames.append(filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L38_C8", "label": "if", "type": "if", "loc": [38, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L37_C4", "vector": [4, 2, 0.3929, 0.0204, 2, 0.57, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if filename not in self.filenames:\n self.filenames.append(filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L39_C12", "label": "append()", "type": "expression", "loc": [39, 39], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L38_C8", "vector": [8, 3, 0.398, 0.0102, 3, 0.14, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.filenames.append(filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L42_C0", "label": "LICENSE_KEY = compile()", "type": "assigned_variable", "loc": [42, 42], "level": 0, "parent": null, "vector": [14, 0, 0.4286, 0.0102, 0, 0.66, 0.5714, 222, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "LICENSE_KEY", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "LICENSE_KEY = re.compile(r\"[^\\w]\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L44_C0", "label": "find_license", "type": "function", "loc": [44, 51], "level": 0, "parent": null, "vector": [2, 0, 0.4847, 0.0816, 0, 0.66, 0.6429, 149, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "find_license", "arg_names": ["license_text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def find_license(license_text):\n # TODO(alice): a lot these licenses are almost identical Apache licenses.\n # Most of them differ in origin/modifications. Consider combining similar\n # licenses.\n license_key = LICENSE_KEY.sub(\"\", license_text).lower()\n if license_key not in KNOWN_LICENSES:\n KNOWN_LICENSES[license_key] = License(license_text)\n return KNOWN_LICENSES[license_key]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L48_C4", "label": "license_key = lower()", "type": "assigned_variable", "loc": [48, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L44_C0", "vector": [14, 1, 0.4898, 0.0102, 1, 0.96, 0.0, 374, 3, 0, 0, 0, 432, 10, 2], "semantic": {"name": "license_key", "arg_names": [], "import_names": [], "rhs_call_name": "lower", "annotation": ""}, "snippet": " license_key = LICENSE_KEY.sub(\"\", license_text).lower()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L49_C4", "label": "if", "type": "if", "loc": [49, 50], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L44_C0", "vector": [4, 1, 0.5051, 0.0204, 1, 0.96, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if license_key not in KNOWN_LICENSES:\n KNOWN_LICENSES[license_key] = License(license_text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L50_C8", "label": " = License()", "type": "assigned_variable", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L49_C4", "vector": [14, 2, 0.5102, 0.0102, 2, 0.78, 0.0, 0, 3, 1, 0, 0, 338, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "License", "annotation": ""}, "snippet": " KNOWN_LICENSES[license_key] = License(license_text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Return_L51_C4", "label": "return", "type": "return", "loc": [51, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L44_C0", "vector": [13, 1, 0.5204, 0.0102, 1, 0.96, 1.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return KNOWN_LICENSES[license_key]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L55_C0", "label": "discover_license", "type": "function", "loc": [55, 77], "level": 0, "parent": null, "vector": [2, 0, 0.6735, 0.2347, 0, 0.66, 0.7143, 17, 0, 2, 1, 0, 0, 0, 16], "semantic": {"name": "discover_license", "arg_names": ["exact_path", "filename"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def discover_license(exact_path, filename):\n # when filename ends with LICENSE, assume applies to filename prefixed\n if filename.endswith(\"LICENSE\"):\n with open(exact_path) as file:\n license_text = file.read()\n target_filename = filename[:-len(\"LICENSE\")]\n if target_filename.endswith(\".\"): target_filename = target_filename[:-1]\n find_license(license_text).add_file(target_filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L57_C4", "label": "if", "type": "if", "loc": [57, 63], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L55_C0", "vector": [4, 1, 0.6122, 0.0714, 1, 0.08, 0.0, 0, 3, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if filename.endswith(\"LICENSE\"):\n with open(exact_path) as file:\n license_text = file.read()\n target_filename = filename[:-len(\"LICENSE\")]\n if target_filename.endswith(\".\"): target_filename = target_filename[:-1]\n find_license(license_text).add_file(target_filename)\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L59_C12", "label": "license_text = read()", "type": "assigned_variable", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L57_C4", "vector": [14, 2, 0.602, 0.0102, 2, 0.58, 0.0, 550, 3, 0, 0, 0, 453, 10, 1], "semantic": {"name": "license_text", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " license_text = file.read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L60_C8", "label": "target_filename =", "type": "assigned_variable", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L57_C4", "vector": [14, 2, 0.6122, 0.0102, 2, 0.58, 0.0, 439, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "target_filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " target_filename = filename[:-len(\"LICENSE\")]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L61_C8", "label": "if", "type": "if", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L57_C4", "vector": [4, 2, 0.6224, 0.0102, 2, 0.58, 0.3333, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if target_filename.endswith(\".\"): target_filename = target_filename[:-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L61_C42", "label": "target_filename =", "type": "assigned_variable", "loc": [61, 61], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L61_C8", "vector": [14, 3, 0.6224, 0.0102, 3, 0.54, 0.0, 439, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "target_filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if target_filename.endswith(\".\"): target_filename = target_filename[:-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L62_C8", "label": "add_file()", "type": "expression", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L57_C4", "vector": [8, 2, 0.6327, 0.0102, 2, 0.58, 0.6667, 369, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "add_file", "arg_names": [], "import_names": [], "rhs_call_name": "add_file", "annotation": ""}, "snippet": " find_license(license_text).add_file(target_filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Return_L63_C8", "label": "return", "type": "return", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L57_C4", "vector": [13, 2, 0.6429, 0.0102, 2, 0.58, 1.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L66_C4", "label": "mimetype = guess_type()", "type": "assigned_variable", "loc": [66, 66], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L55_C0", "vector": [14, 1, 0.6735, 0.0102, 1, 0.08, 0.3333, 290, 3, 1, 0, 0, 213, 10, 1], "semantic": {"name": "mimetype", "arg_names": [], "import_names": [], "rhs_call_name": "guess_type", "annotation": ""}, "snippet": " mimetype = mimetypes.guess_type(filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L67_C4", "label": "if", "type": "if", "loc": [67, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L55_C0", "vector": [4, 1, 0.6837, 0.0102, 1, 0.08, 0.6667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if mimetype in EXCLUDE_TYPES: return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Return_L67_C34", "label": "return", "type": "return", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L67_C4", "vector": [13, 2, 0.6837, 0.0102, 2, 0.14, 0.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if mimetype in EXCLUDE_TYPES: return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L70_C8", "label": "raw_file = read()", "type": "assigned_variable", "loc": [70, 70], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L55_C0", "vector": [14, 1, 0.7143, 0.0102, 1, 0.08, 0.0, 1, 3, 0, 0, 0, 453, 10, 1], "semantic": {"name": "raw_file", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " raw_file = file.read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L73_C4", "label": "for comment", "type": "for", "loc": [73, 77], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L55_C0", "vector": [6, 1, 0.7653, 0.051, 1, 0.08, 1.0, 34, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "comment", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for comment in COMMENT_BLOCK.finditer(raw_file):\n comment = comment.group(1)\n if COMMENT_LICENSE.search(comment) is None: continue\n if COMMENT_COPYRIGHT.search(comment) is None: continue\n find_license(comment).add_file(filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L74_C8", "label": "comment = group()", "type": "assigned_variable", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L73_C4", "vector": [14, 2, 0.7551, 0.0102, 2, 0.93, 0.0, 34, 3, 1, 0, 0, 43, 10, 1], "semantic": {"name": "comment", "arg_names": [], "import_names": [], "rhs_call_name": "group", "annotation": ""}, "snippet": " comment = comment.group(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L75_C8", "label": "if", "type": "if", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L73_C4", "vector": [4, 2, 0.7653, 0.0102, 2, 0.93, 0.3333, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if COMMENT_LICENSE.search(comment) is None: continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L76_C8", "label": "if", "type": "if", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L73_C4", "vector": [4, 2, 0.7755, 0.0102, 2, 0.93, 0.6667, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if COMMENT_COPYRIGHT.search(comment) is None: continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L77_C8", "label": "add_file()", "type": "expression", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L73_C4", "vector": [8, 2, 0.7857, 0.0102, 2, 0.93, 1.0, 369, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "add_file", "arg_names": [], "import_names": [], "rhs_call_name": "add_file", "annotation": ""}, "snippet": " find_license(comment).add_file(filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L80_C0", "label": "for source", "type": "for", "loc": [80, 83], "level": 0, "parent": null, "vector": [6, 0, 0.8316, 0.0408, 0, 0.66, 0.7857, 703, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for source in SOURCE:\n for root, dirs, files in os.walk(source):\n for name in files:\n discover_license(os.path.join(root, name), name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L81_C4", "label": "for root, dirs, files", "type": "for", "loc": [81, 83], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L80_C0", "vector": [6, 1, 0.8367, 0.0306, 1, 0.85, 0.0, 129, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "root, dirs, files", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for root, dirs, files in os.walk(source):\n for name in files:\n discover_license(os.path.join(root, name), name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L82_C8", "label": "for name", "type": "for", "loc": [82, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L81_C4", "vector": [6, 2, 0.8418, 0.0204, 2, 0.83, 0.0, 57, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for name in files:\n discover_license(os.path.join(root, name), name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L83_C12", "label": "discover_license()", "type": "expression", "loc": [83, 83], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L82_C8", "vector": [8, 3, 0.8469, 0.0102, 3, 0.22, 0.0, 17, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "discover_license", "arg_names": [], "import_names": [], "rhs_call_name": "discover_license", "annotation": ""}, "snippet": " discover_license(os.path.join(root, name), name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L86_C0", "label": "print()", "type": "expression", "loc": [86, 86], "level": 0, "parent": null, "vector": [8, 0, 0.8776, 0.0102, 0, 0.66, 0.8571, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"<html><head><style> body { font-family: sans-serif; } pre { background-color: #eeeeee; padding: 1em; white-space: pre-wrap; } </style></head><body>\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L88_C0", "label": "for license", "type": "for", "loc": [88, 96], "level": 0, "parent": null, "vector": [6, 0, 0.9388, 0.0918, 0, 0.66, 0.9286, 365, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "license", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for license in KNOWN_LICENSES.values():\n\n print(\"<h3>Notices for files:</h3><ul>\")\n filenames = license.filenames\n filenames.sort()\n for filename in filenames:\n print(\"<li>%s</li>\" % (filename))\n print(\"</ul>\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L90_C4", "label": "print()", "type": "expression", "loc": [90, 90], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L88_C0", "vector": [8, 1, 0.9184, 0.0102, 1, 0.96, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"<h3>Notices for files:</h3><ul>\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L91_C4", "label": "filenames =", "type": "assigned_variable", "loc": [91, 91], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L88_C0", "vector": [14, 1, 0.9286, 0.0102, 1, 0.96, 0.2, 94, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "filenames", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " filenames = license.filenames"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L92_C4", "label": "sort()", "type": "expression", "loc": [92, 92], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L88_C0", "vector": [8, 1, 0.9388, 0.0102, 1, 0.96, 0.4, 489, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "sort", "arg_names": [], "import_names": [], "rhs_call_name": "sort", "annotation": ""}, "snippet": " filenames.sort()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L93_C4", "label": "for filename", "type": "for", "loc": [93, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L88_C0", "vector": [6, 1, 0.9541, 0.0204, 1, 0.96, 0.6, 275, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for filename in filenames:\n print(\"<li>%s</li>\" % (filename))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L94_C8", "label": "print()", "type": "expression", "loc": [94, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L93_C4", "vector": [8, 2, 0.9592, 0.0102, 2, 0.73, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"<li>%s</li>\" % (filename))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L95_C4", "label": "print()", "type": "expression", "loc": [95, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L88_C0", "vector": [8, 1, 0.9694, 0.0102, 1, 0.96, 0.8, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"</ul>\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L96_C4", "label": "print()", "type": "expression", "loc": [96, 96], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L88_C0", "vector": [8, 1, 0.9796, 0.0102, 1, 0.96, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"<pre>%s</pre>\" % license.license_text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L98_C0", "label": "print()", "type": "expression", "loc": [98, 98], "level": 0, "parent": null, "vector": [8, 0, 1.0, 0.0102, 0, 0.66, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print(\"</body></html>\")"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1460:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L38_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L39_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L49_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Return_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L59_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L61_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L61_C42"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Return_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L66_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Return_L67_C34"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L73_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L74_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L75_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:If_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L73_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L81_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L81_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L82_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L83_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L90_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Assign_L91_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L92_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L93_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1460:For_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1460:Expr_L96_C4"}]
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Zdenko Podobný # Author: Zdenko Podobný # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ Simple python demo script of tesseract-ocr 3.02 c-api """ import os import sys import ctypes # Demo variables lang = "eng" filename = "../phototest.tif" libpath = "/usr/local/lib64/" libpath_w = "../vs2008/DLL_Release/" TESSDATA_PREFIX = os.environ.get('TESSDATA_PREFIX') if not TESSDATA_PREFIX: TESSDATA_PREFIX = "../" if sys.platform == "win32": libname = libpath_w + "libtesseract302.dll" libname_alt = "libtesseract302.dll" os.environ["PATH"] += os.pathsep + libpath_w else: libname = libpath + "libtesseract.so.3.0.2" libname_alt = "libtesseract.so.3" try: tesseract = ctypes.cdll.LoadLibrary(libname) except: try: tesseract = ctypes.cdll.LoadLibrary(libname_alt) except WindowsError, err: print("Trying to load '%s'..." % libname) print("Trying to load '%s'..." % libname_alt) print(err) exit(1) tesseract.TessVersion.restype = ctypes.c_char_p tesseract_version = tesseract.TessVersion()[:4] # We need to check library version because libtesseract.so.3 is symlink # and can point to other version than 3.02 if float(tesseract_version) < 3.02: print("Found tesseract-ocr library version %s." % tesseract_version) print("C-API is present only in version 3.02!") exit(2) api = tesseract.TessBaseAPICreate() rc = tesseract.TessBaseAPIInit3(api, TESSDATA_PREFIX, lang); if (rc): tesseract.TessBaseAPIDelete(api) print("Could not initialize tesseract.\n") exit(3) text_out = tesseract.TessBaseAPIProcessPages(api, filename, None , 0); result_text = ctypes.string_at(text_out) print result_text
ajibawa-2023/Python-Code-Large/train/row_1462
3
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1462:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1462:Import_L2_C0", "label": "sys import sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.25, 0, 0.66, 0.5, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1462:Import_L3_C0", "label": "ctypes import ctypes", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.75, 0.25, 0, 0.66, 1.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "rhs_call_name": "", "annotation": ""}, "snippet": "import ctypes"}]
[]
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Michael Liao (askxuefeng@gmail.com)' import os import cgi import time import logging import simplejson from datetime import date from google.appengine.api import xmpp from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.api import urlfetch from google.appengine.runtime import apiproxy_errors from google.appengine.api import memcache from google.appengine.api import users from Cheetah.Template import Template from autogen import CompiledTemplate import weather import store def get_city(request): # try get city from cookie: if 'Cookie' in request.headers: all = request.headers['Cookie'] if all: cookies = all.split(';') for cookie in cookies: c = cookie.strip() if c.startswith('city='): return c[5:] return None def fetch_weather_in_cache(city): data = memcache.get(str(city.code)) if data: return data data = fetch_weather(city) if data is None: return None memcache.set(str(city.code), data, 3600) return data def fetch_weather(city): data = fetch_rss(city.code) if data is None: return None return str(weather.Weather(city.name, data)) def fetch_rss(code): url = 'http://weather.yahooapis.com/forecastrss?w=%s' % code logging.info('Fetch RSS: %s' % url) try: result = urlfetch.fetch(url, follow_redirects=False) except (urlfetch.Error, apiproxy_errors.Error): return None if result.status_code!=200: return None return result.content class XmppHandler(webapp.RequestHandler): def post(self): message = xmpp.Message(self.request.POST) logging.info('XMPP from %s: %s' % (message.sender, message.body)) name = message.body.strip().lower() if name=='': message.reply(u'''噢,啥都不输,怎么知道您要查询的城市啊? http://weather-china.appspot.com/ ''') return city = store.find_city(name, return_default=False) if city is None: message.reply(u''':( 噢,没有找到您要查询的城市 "%s"。 http://weather-china.appspot.com/ ''' % name) return json = fetch_weather_in_cache(city) if json is None: return message.reply(u''':( 对不起,网络故障,暂时无法查询,请过几分钟再试试。 http://weather-china.appspot.com/ ''') if isinstance(json, unicode): json = json.encode('utf-8') w = simplejson.loads(json, encoding='utf-8') return message.reply( u'''%s: 今日:%s,%s~%s度 明日:%s,%s~%s度 更详细的预报请查看 http://weather-china.appspot.com/?city=%s ''' % ( w[u'name'], w[u'forecasts'][0][u'text'], w[u'forecasts'][0][u'low'], w[u'forecasts'][0][u'high'], w[u'forecasts'][1][u'text'], w[u'forecasts'][1][u'low'], w[u'forecasts'][1][u'high'], city.first_alias(),) ) class HomeHandler(webapp.RequestHandler): def get(self): time_1 = time.time() name = self.request.get('city', '') if not name: name = get_city(self.request) if not name: name = 'beijing' cities = memcache.get('__cities__') if cities is None: cities = store.get_cities() memcache.set('__cities__', cities, 3600) city = None for c in cities: if c.name==name or name in c.aliases: city = c break if city is None: self.response.set_status(500) return today = date.today() target = date(today.year+3, today.month, today.day) expires = target.strftime('%a, %d-%b-%Y %H:%M:%S GMT') self.response.headers['Set-Cookie'] = 'city=%s; expires=%s; path=/' % (city.first_alias(), expires) time_2 = time.time() t = CompiledTemplate(searchList=[{'city' : city, 'cities' : cities}]) self.response.out.write(t) time_3 = time.time() logging.info('Performance: %f / %f of rendering / total.' % (time_3-time_2, time_3-time_1)) class AdminHandler(webapp.RequestHandler): def get(self): login = self.get_login_url() if login: self.redirect(login) return action = self.request.get('action', '') if action=='delete_city': key = self.request.get('key') store.delete_city(key) self.redirect_admin() return if action=='': cities = store.get_cities() root = os.path.dirname(__file__) t = Template(file=os.path.join(root, 'admin.html'), searchList=[{'cities' : cities}]) self.response.out.write(t) return self.response.set_status(400) def post(self): login = self.get_login_url() if login: self.redirect(login) return action = self.request.get('action') if action=='create_city': name = cgi.escape(self.request.get('name')).strip().lower() aliases = [cgi.escape(x).lower() for x in self.request.get_all('aliases') if x.strip()] code = int(self.request.get('code')) store.create_city(name, aliases, code) self.redirect_admin() return self.response.set_status(400) def get_login_url(self): if not users.is_current_user_admin(): return users.create_login_url('/admin') return None def redirect_admin(self): self.redirect('/admin?t=%s' % time.time()) class ApiHandler(webapp.RequestHandler): CACHE_TIME = 600 # 600 seconds def get(self): callback = '' c = '' extension = self.request.get('extension', '') if extension=='chrome': # detect city from cookie: c = get_city(self.request) if not c: c = 'beijing' else: callback = cgi.escape(self.request.get('callback', '').strip()) c = cgi.escape(self.request.get('city', '')).lower() if not c: return self.send_error('MISSING_PARAMETER', 'Missing parameter \'city\'') city = store.find_city(c, return_default=False) if city is None: return self.send_error('CITY_NOT_FOUND', 'City not found') weather = fetch_weather_in_cache(city) if weather is None: return self.send_error('SERVICE_UNAVAILABLE', 'Service unavailable') if callback: if isinstance(callback, unicode): callback = callback.encode('utf-8') self.write_json('%s(%s);' % (callback, weather)) else: self.write_json(weather) def send_error(self, code, msg): json = '{ "error" : "%s", "message" : "%s"}' % (code, msg) self.write_json(json) def write_json(self, json): if isinstance(json, unicode): json = json.encode('utf-8') self.response.headers['Content-Type'] = 'application/json; charset=utf-8' self.response.out.write(json) application = webapp.WSGIApplication([ ('^/$', HomeHandler), ('^/api$', ApiHandler), ('^/admin$', AdminHandler), ('^/_ah/xmpp/message/chat/$', XmppHandler), ], debug=True) def main(): run_wsgi_app(application) if __name__ == "__main__": main()
ajibawa-2023/Python-Code-Large/train/row_1463
175
228
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L4_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.0175, 0.0044, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__author__ = 'Michael Liao (askxuefeng@gmail.com)'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Import_L6_C0", "label": "os import os", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0044, 0, 0.66, 0.0357, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Import_L7_C0", "label": "cgi import cgi", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0307, 0.0044, 0, 0.66, 0.0714, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi"], "rhs_call_name": "", "annotation": ""}, "snippet": "import cgi"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Import_L8_C0", "label": "time import time", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0351, 0.0044, 0, 0.66, 0.1071, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Import_L9_C0", "label": "logging import logging", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0395, 0.0044, 0, 0.66, 0.1429, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], "rhs_call_name": "", "annotation": ""}, "snippet": "import logging"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Import_L10_C0", "label": "simplejson import simplejson", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0439, 0.0044, 0, 0.66, 0.1786, 386, 0, 1, 0, 0, 386, 0, 0], "semantic": {"name": "simplejson", "arg_names": [], "import_names": ["simplejson"], "rhs_call_name": "", "annotation": ""}, "snippet": "import simplejson"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:ImportFrom_L11_C0", "label": "from datetime import date", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.0482, 0.0044, 0, 0.66, 0.2143, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["date"], "rhs_call_name": "", "annotation": ""}, "snippet": "from datetime import date"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:ImportFrom_L13_C0", "label": "from google.appengine.api import xmpp", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.057, 0.0044, 0, 0.66, 0.25, 279, 0, 1, 0, 0, 279, 0, 0], "semantic": {"name": "google.appengine.api", "arg_names": [], "import_names": ["xmpp"], "rhs_call_name": "", "annotation": ""}, "snippet": "from google.appengine.api import xmpp"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:ImportFrom_L14_C0", "label": "from google.appengine.ext import webapp", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0614, 0.0044, 0, 0.66, 0.2857, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names": [], "import_names": ["webapp"], "rhs_call_name": "", "annotation": ""}, "snippet": "from google.appengine.ext import webapp"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:ImportFrom_L15_C0", "label": "from google.appengine.ext.webapp.util import run_wsgi_app", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0658, 0.0044, 0, 0.66, 0.3214, 327, 0, 1, 0, 0, 327, 0, 0], "semantic": {"name": "google.appengine.ext.webapp.util", "arg_names": [], "import_names": ["run_wsgi_app"], "rhs_call_name": "", "annotation": ""}, "snippet": "from google.appengine.ext.webapp.util import run_wsgi_app"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:ImportFrom_L16_C0", "label": "from google.appengine.api import urlfetch", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.0702, 0.0044, 0, 0.66, 0.3571, 279, 0, 1, 0, 0, 279, 0, 0], "semantic": {"name": "google.appengine.api", "arg_names": [], "import_names": ["urlfetch"], "rhs_call_name": "", "annotation": ""}, "snippet": "from google.appengine.api import urlfetch"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:ImportFrom_L17_C0", "label": "from google.appengine.runtime import apiproxy_errors", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.0746, 0.0044, 0, 0.66, 0.3929, 155, 0, 1, 0, 0, 155, 0, 0], "semantic": {"name": "google.appengine.runtime", "arg_names": [], "import_names": ["apiproxy_errors"], "rhs_call_name": "", "annotation": ""}, "snippet": "from google.appengine.runtime import apiproxy_errors"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:ImportFrom_L18_C0", "label": "from google.appengine.api import memcache", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0789, 0.0044, 0, 0.66, 0.4286, 279, 0, 1, 0, 0, 279, 0, 0], "semantic": {"name": "google.appengine.api", "arg_names": [], "import_names": ["memcache"], "rhs_call_name": "", "annotation": ""}, "snippet": "from google.appengine.api import memcache"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:ImportFrom_L19_C0", "label": "from google.appengine.api import users", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0044, 0, 0.66, 0.4643, 279, 0, 1, 0, 0, 279, 0, 0], "semantic": {"name": "google.appengine.api", "arg_names": [], "import_names": ["users"], "rhs_call_name": "", "annotation": ""}, "snippet": "from google.appengine.api import users"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:ImportFrom_L21_C0", "label": "from Cheetah.Template import Template", "type": "import", "loc": [21, 21], "level": 0, "parent": null, "vector": [1, 0, 0.0921, 0.0044, 0, 0.66, 0.5, 171, 0, 1, 0, 0, 171, 0, 0], "semantic": {"name": "Cheetah.Template", "arg_names": [], "import_names": ["Template"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Template import Template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:ImportFrom_L22_C0", "label": "from autogen import CompiledTemplate", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.0965, 0.0044, 0, 0.66, 0.5357, 870, 0, 1, 0, 0, 870, 0, 0], "semantic": {"name": "autogen", "arg_names": [], "import_names": ["CompiledTemplate"], "rhs_call_name": "", "annotation": ""}, "snippet": "from autogen import CompiledTemplate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Import_L24_C0", "label": "weather import weather", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.1053, 0.0044, 0, 0.66, 0.5714, 12, 0, 1, 0, 0, 12, 0, 0], "semantic": {"name": "weather", "arg_names": [], "import_names": ["weather"], "rhs_call_name": "", "annotation": ""}, "snippet": "import weather"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Import_L25_C0", "label": "store import store", "type": "import", "loc": [25, 25], "level": 0, "parent": null, "vector": [1, 0, 0.1096, 0.0044, 0, 0.66, 0.6071, 354, 0, 1, 0, 0, 354, 0, 0], "semantic": {"name": "store", "arg_names": [], "import_names": ["store"], "rhs_call_name": "", "annotation": ""}, "snippet": "import store"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L27_C0", "label": "get_city", "type": "function", "loc": [27, 37], "level": 0, "parent": null, "vector": [2, 0, 0.1404, 0.0482, 0, 0.66, 0.6429, 573, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "get_city", "arg_names": ["request"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_city(request):\n # try get city from cookie:\n if 'Cookie' in request.headers:\n all = request.headers['Cookie']\n if all:\n cookies = all.split(';')\n for cookie in cookies:\n c = cookie.strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L29_C4", "label": "if", "type": "if", "loc": [29, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L27_C0", "vector": [4, 1, 0.1425, 0.0351, 1, 0.48, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'Cookie' in request.headers:\n all = request.headers['Cookie']\n if all:\n cookies = all.split(';')\n for cookie in cookies:\n c = cookie.strip()\n if c.startswith('city='):\n return c[5:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L30_C8", "label": "all =", "type": "assigned_variable", "loc": [30, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L29_C4", "vector": [14, 2, 0.1316, 0.0044, 2, 0.17, 0.0, 895, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "all", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " all = request.headers['Cookie']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L31_C8", "label": "if", "type": "if", "loc": [31, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L29_C4", "vector": [4, 2, 0.1469, 0.0263, 2, 0.17, 1.0, 0, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if all:\n cookies = all.split(';')\n for cookie in cookies:\n c = cookie.strip()\n if c.startswith('city='):\n return c[5:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L32_C12", "label": "cookies = split()", "type": "assigned_variable", "loc": [32, 32], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L31_C8", "vector": [14, 3, 0.1404, 0.0044, 3, 0.91, 0.0, 711, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "cookies", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " cookies = all.split(';')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:For_L33_C12", "label": "for cookie", "type": "for", "loc": [33, 36], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L31_C8", "vector": [6, 3, 0.1513, 0.0175, 3, 0.91, 1.0, 197, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "cookie", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for cookie in cookies:\n c = cookie.strip()\n if c.startswith('city='):\n return c[5:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L34_C16", "label": "c = strip()", "type": "assigned_variable", "loc": [34, 34], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:For_L33_C12", "vector": [14, 4, 0.1491, 0.0044, 4, 0.05, 0.0, 411, 3, 0, 0, 0, 973, 10, 1], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " c = cookie.strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L35_C16", "label": "if", "type": "if", "loc": [35, 36], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:For_L33_C12", "vector": [4, 4, 0.1557, 0.0088, 4, 0.05, 1.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if c.startswith('city='):\n return c[5:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L36_C20", "label": "return", "type": "return", "loc": [36, 36], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L35_C16", "vector": [13, 5, 0.1579, 0.0044, 5, 0.79, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return c[5:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L37_C4", "label": "return", "type": "return", "loc": [37, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L27_C0", "vector": [13, 1, 0.1623, 0.0044, 1, 0.48, 1.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L39_C0", "label": "fetch_weather_in_cache", "type": "function", "loc": [39, 47], "level": 0, "parent": null, "vector": [2, 0, 0.1886, 0.0395, 0, 0.66, 0.6786, 598, 0, 1, 1, 0, 0, 0, 5], "semantic": {"name": "fetch_weather_in_cache", "arg_names": ["city"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def fetch_weather_in_cache(city):\n data = memcache.get(str(city.code))\n if data:\n return data\n data = fetch_weather(city)\n if data is None:\n return None\n memcache.set(str(city.code), data, 3600)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L40_C4", "label": "data = get()", "type": "assigned_variable", "loc": [40, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L39_C0", "vector": [14, 1, 0.1754, 0.0044, 1, 0.87, 0.0, 929, 3, 1, 0, 0, 607, 10, 2], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " data = memcache.get(str(city.code))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L41_C4", "label": "if", "type": "if", "loc": [41, 42], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L39_C0", "vector": [4, 1, 0.182, 0.0088, 1, 0.87, 0.2, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if data:\n return data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L42_C8", "label": "return", "type": "return", "loc": [42, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L41_C4", "vector": [13, 2, 0.1842, 0.0044, 2, 0.07, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L43_C4", "label": "data = fetch_weather()", "type": "assigned_variable", "loc": [43, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L39_C0", "vector": [14, 1, 0.1886, 0.0044, 1, 0.87, 0.4, 929, 3, 1, 0, 0, 436, 10, 1], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "fetch_weather", "annotation": ""}, "snippet": " data = fetch_weather(city)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L44_C4", "label": "if", "type": "if", "loc": [44, 45], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L39_C0", "vector": [4, 1, 0.1952, 0.0088, 1, 0.87, 0.6, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if data is None:\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L45_C8", "label": "return", "type": "return", "loc": [45, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L44_C4", "vector": [13, 2, 0.1974, 0.0044, 2, 0.84, 0.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L46_C4", "label": "set()", "type": "expression", "loc": [46, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L39_C0", "vector": [8, 1, 0.2018, 0.0044, 1, 0.87, 0.8, 21, 3, 3, 0, 0, 0, 0, 2], "semantic": {"name": "set", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " memcache.set(str(city.code), data, 3600)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L47_C4", "label": "return", "type": "return", "loc": [47, 47], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L39_C0", "vector": [13, 1, 0.2061, 0.0044, 1, 0.87, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L49_C0", "label": "fetch_weather", "type": "function", "loc": [49, 53], "level": 0, "parent": null, "vector": [2, 0, 0.2237, 0.0219, 0, 0.66, 0.7143, 436, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "fetch_weather", "arg_names": ["city"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def fetch_weather(city):\n data = fetch_rss(city.code)\n if data is None:\n return None\n return str(weather.Weather(city.name, data))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L50_C4", "label": "data = fetch_rss()", "type": "assigned_variable", "loc": [50, 50], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L49_C0", "vector": [14, 1, 0.2193, 0.0044, 1, 0.12, 0.0, 929, 3, 1, 0, 0, 853, 10, 1], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "fetch_rss", "annotation": ""}, "snippet": " data = fetch_rss(city.code)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L51_C4", "label": "if", "type": "if", "loc": [51, 52], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L49_C0", "vector": [4, 1, 0.2259, 0.0088, 1, 0.12, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if data is None:\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L52_C8", "label": "return", "type": "return", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L51_C4", "vector": [13, 2, 0.2281, 0.0044, 2, 0.55, 0.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L53_C4", "label": "return", "type": "return", "loc": [53, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L49_C0", "vector": [13, 1, 0.2325, 0.0044, 1, 0.12, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return str(weather.Weather(city.name, data))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L55_C0", "label": "fetch_rss", "type": "function", "loc": [55, 64], "level": 0, "parent": null, "vector": [2, 0, 0.261, 0.0439, 0, 0.66, 0.75, 853, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "fetch_rss", "arg_names": ["code"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def fetch_rss(code):\n url = 'http://weather.yahooapis.com/forecastrss?w=%s' % code\n logging.info('Fetch RSS: %s' % url)\n try:\n result = urlfetch.fetch(url, follow_redirects=False)\n except (urlfetch.Error, apiproxy_errors.Error):\n return None\n if result.status_code!=200:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L56_C4", "label": "url =", "type": "assigned_variable", "loc": [56, 56], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L55_C0", "vector": [14, 1, 0.2456, 0.0044, 1, 0.04, 0.0, 789, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "url", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " url = 'http://weather.yahooapis.com/forecastrss?w=%s' % code"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L57_C4", "label": "info()", "type": "expression", "loc": [57, 57], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L55_C0", "vector": [8, 1, 0.25, 0.0044, 1, 0.04, 0.25, 730, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "info", "arg_names": [], "import_names": [], "rhs_call_name": "info", "annotation": ""}, "snippet": " logging.info('Fetch RSS: %s' % url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Try_L58_C4", "label": "try", "type": "try", "loc": [58, 61], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L55_C0", "vector": [7, 1, 0.261, 0.0175, 1, 0.04, 0.5, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n result = urlfetch.fetch(url, follow_redirects=False)\n except (urlfetch.Error, apiproxy_errors.Error):\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L59_C8", "label": "result = fetch()", "type": "assigned_variable", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:Try_L58_C4", "vector": [14, 2, 0.2588, 0.0044, 2, 0.37, 0.0, 51, 3, 2, 0, 0, 587, 10, 1], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "fetch", "annotation": ""}, "snippet": " result = urlfetch.fetch(url, follow_redirects=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L61_C8", "label": "return", "type": "return", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:Try_L58_C4", "vector": [13, 2, 0.2675, 0.0044, 2, 0.37, 0.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L62_C4", "label": "if", "type": "if", "loc": [62, 63], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L55_C0", "vector": [4, 1, 0.2741, 0.0088, 1, 0.04, 0.75, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if result.status_code!=200:\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L63_C8", "label": "return", "type": "return", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L62_C4", "vector": [13, 2, 0.2763, 0.0044, 2, 0.72, 0.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L64_C4", "label": "return", "type": "return", "loc": [64, 64], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L55_C0", "vector": [13, 1, 0.2807, 0.0044, 1, 0.04, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return result.content"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L66_C0", "label": "XmppHandler", "type": "class", "loc": [66, 100], "level": 0, "parent": null, "vector": [3, 0, 0.364, 0.1535, 0, 0.66, 0.7857, 320, 0, 1, 0, 0, 256, 0, 14], "semantic": {"name": "XmppHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class XmppHandler(webapp.RequestHandler):\n def post(self):\n message = xmpp.Message(self.request.POST)\n logging.info('XMPP from %s: %s' % (message.sender, message.body))\n name = message.body.strip().lower()\n if name=='':\n message.reply(u'''\u5662\uff0c\u5565\u90fd\u4e0d\u8f93\uff0c\u600e\u4e48\u77e5\u9053\u60a8\u8981\u67e5\u8be2\u7684\u57ce\u5e02\u554a\uff1f\nhttp://weather-china.appspot.com/"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "label": "post", "type": "function", "loc": [67, 100], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L66_C0", "vector": [2, 1, 0.3662, 0.1491, 1, 0.84, 0.0, 304, 0, 1, 1, 0, 0, 0, 14], "semantic": {"name": "post", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def post(self):\n message = xmpp.Message(self.request.POST)\n logging.info('XMPP from %s: %s' % (message.sender, message.body))\n name = message.body.strip().lower()\n if name=='':\n message.reply(u'''\u5662\uff0c\u5565\u90fd\u4e0d\u8f93\uff0c\u600e\u4e48\u77e5\u9053\u60a8\u8981\u67e5\u8be2\u7684\u57ce\u5e02\u554a\uff1f\nhttp://weather-china.appspot.com/\n''')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L68_C8", "label": "message = Message()", "type": "assigned_variable", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "vector": [14, 2, 0.2982, 0.0044, 2, 0.62, 0.0, 635, 3, 1, 0, 0, 6, 10, 1], "semantic": {"name": "message", "arg_names": [], "import_names": [], "rhs_call_name": "Message", "annotation": ""}, "snippet": " message = xmpp.Message(self.request.POST)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L69_C8", "label": "info()", "type": "expression", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "vector": [8, 2, 0.3026, 0.0044, 2, 0.62, 0.1, 730, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "info", "arg_names": [], "import_names": [], "rhs_call_name": "info", "annotation": ""}, "snippet": " logging.info('XMPP from %s: %s' % (message.sender, message.body))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L70_C8", "label": "name = lower()", "type": "assigned_variable", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "vector": [14, 2, 0.307, 0.0044, 2, 0.62, 0.2, 57, 3, 0, 0, 0, 432, 10, 2], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "lower", "annotation": ""}, "snippet": " name = message.body.strip().lower()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L71_C8", "label": "if", "type": "if", "loc": [71, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "vector": [4, 2, 0.3202, 0.0219, 2, 0.62, 0.3, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name=='':\n message.reply(u'''\u5662\uff0c\u5565\u90fd\u4e0d\u8f93\uff0c\u600e\u4e48\u77e5\u9053\u60a8\u8981\u67e5\u8be2\u7684\u57ce\u5e02\u554a\uff1f\nhttp://weather-china.appspot.com/\n''')\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L72_C12", "label": "reply()", "type": "expression", "loc": [72, 74], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L71_C8", "vector": [8, 3, 0.3202, 0.0132, 3, 0.36, 0.0, 714, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "reply", "arg_names": [], "import_names": [], "rhs_call_name": "reply", "annotation": ""}, "snippet": " message.reply(u'''\u5662\uff0c\u5565\u90fd\u4e0d\u8f93\uff0c\u600e\u4e48\u77e5\u9053\u60a8\u8981\u67e5\u8be2\u7684\u57ce\u5e02\u554a\uff1f\nhttp://weather-china.appspot.com/\n''')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L75_C12", "label": "return", "type": "return", "loc": [75, 75], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L71_C8", "vector": [13, 3, 0.3289, 0.0044, 3, 0.36, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L76_C8", "label": "city = find_city()", "type": "assigned_variable", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "vector": [14, 2, 0.3333, 0.0044, 2, 0.62, 0.4, 825, 3, 2, 0, 0, 717, 10, 1], "semantic": {"name": "city", "arg_names": [], "import_names": [], "rhs_call_name": "find_city", "annotation": ""}, "snippet": " city = store.find_city(name, return_default=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L77_C8", "label": "if", "type": "if", "loc": [77, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "vector": [4, 2, 0.3465, 0.0219, 2, 0.62, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if city is None:\n message.reply(u''':( \u5662\uff0c\u6ca1\u6709\u627e\u5230\u60a8\u8981\u67e5\u8be2\u7684\u57ce\u5e02 \"%s\"\u3002\nhttp://weather-china.appspot.com/\n''' % name)\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L78_C12", "label": "reply()", "type": "expression", "loc": [78, 80], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L77_C8", "vector": [8, 3, 0.3465, 0.0132, 3, 0.81, 0.0, 714, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "reply", "arg_names": [], "import_names": [], "rhs_call_name": "reply", "annotation": ""}, "snippet": " message.reply(u''':( \u5662\uff0c\u6ca1\u6709\u627e\u5230\u60a8\u8981\u67e5\u8be2\u7684\u57ce\u5e02 \"%s\"\u3002\nhttp://weather-china.appspot.com/\n''' % name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L81_C12", "label": "return", "type": "return", "loc": [81, 81], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L77_C8", "vector": [13, 3, 0.3553, 0.0044, 3, 0.81, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L82_C8", "label": "json = fetch_weather_in_cache()", "type": "assigned_variable", "loc": [82, 82], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "vector": [14, 2, 0.3596, 0.0044, 2, 0.62, 0.6, 463, 3, 1, 0, 0, 598, 10, 1], "semantic": {"name": "json", "arg_names": [], "import_names": [], "rhs_call_name": "fetch_weather_in_cache", "annotation": ""}, "snippet": " json = fetch_weather_in_cache(city)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L83_C8", "label": "if", "type": "if", "loc": [83, 86], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "vector": [4, 2, 0.3706, 0.0175, 2, 0.62, 0.7, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if json is None:\n return message.reply(u''':( \u5bf9\u4e0d\u8d77\uff0c\u7f51\u7edc\u6545\u969c\uff0c\u6682\u65f6\u65e0\u6cd5\u67e5\u8be2\uff0c\u8bf7\u8fc7\u51e0\u5206\u949f\u518d\u8bd5\u8bd5\u3002\nhttp://weather-china.appspot.com/\n''')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L84_C12", "label": "return", "type": "return", "loc": [84, 86], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L83_C8", "vector": [13, 3, 0.3728, 0.0132, 3, 0.07, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return message.reply(u''':( \u5bf9\u4e0d\u8d77\uff0c\u7f51\u7edc\u6545\u969c\uff0c\u6682\u65f6\u65e0\u6cd5\u67e5\u8be2\uff0c\u8bf7\u8fc7\u51e0\u5206\u949f\u518d\u8bd5\u8bd5\u3002\nhttp://weather-china.appspot.com/\n''')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L87_C8", "label": "if", "type": "if", "loc": [87, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "vector": [4, 2, 0.3838, 0.0088, 2, 0.62, 0.8, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(json, unicode):\n json = json.encode('utf-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L88_C12", "label": "json = encode()", "type": "assigned_variable", "loc": [88, 88], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L87_C8", "vector": [14, 3, 0.386, 0.0044, 3, 0.46, 0.0, 463, 3, 1, 0, 0, 623, 10, 1], "semantic": {"name": "json", "arg_names": [], "import_names": [], "rhs_call_name": "encode", "annotation": ""}, "snippet": " json = json.encode('utf-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L89_C8", "label": "w = loads()", "type": "assigned_variable", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "vector": [14, 2, 0.3904, 0.0044, 2, 0.62, 0.9, 549, 3, 2, 0, 0, 88, 10, 1], "semantic": {"name": "w", "arg_names": [], "import_names": [], "rhs_call_name": "loads", "annotation": ""}, "snippet": " w = simplejson.loads(json, encoding='utf-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L90_C8", "label": "return", "type": "return", "loc": [90, 100], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "vector": [13, 2, 0.4167, 0.0482, 2, 0.62, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return message.reply(\n u'''%s\uff1a\n\u4eca\u65e5\uff1a%s\uff0c%s\uff5e%s\u5ea6\n\u660e\u65e5\uff1a%s\uff0c%s\uff5e%s\u5ea6\n\u66f4\u8be6\u7ec6\u7684\u9884\u62a5\u8bf7\u67e5\u770b http://weather-china.appspot.com/?city=%s\n''' % (\n w[u'name'],\n w[u'forecasts'][0][u'text'], w[u'forecasts'][0][u'low'], w[u'forecasts'][0][u'high'],"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L102_C0", "label": "HomeHandler", "type": "class", "loc": [102, 130], "level": 0, "parent": null, "vector": [3, 0, 0.5088, 0.1272, 0, 0.66, 0.8214, 344, 0, 1, 0, 0, 256, 0, 16], "semantic": {"name": "HomeHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class HomeHandler(webapp.RequestHandler):\n def get(self):\n time_1 = time.time()\n name = self.request.get('city', '')\n if not name:\n name = get_city(self.request)\n if not name:\n name = 'beijing'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "label": "get", "type": "function", "loc": [103, 130], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L102_C0", "vector": [2, 1, 0.511, 0.1228, 1, 0.37, 0.0, 607, 0, 1, 0, 0, 0, 0, 16], "semantic": {"name": "get", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get(self):\n time_1 = time.time()\n name = self.request.get('city', '')\n if not name:\n name = get_city(self.request)\n if not name:\n name = 'beijing'\n cities = memcache.get('__cities__')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L104_C8", "label": "time_1 = time()", "type": "assigned_variable", "loc": [104, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [14, 2, 0.4561, 0.0044, 2, 0.77, 0.0, 986, 3, 0, 0, 0, 654, 10, 1], "semantic": {"name": "time_1", "arg_names": [], "import_names": [], "rhs_call_name": "time", "annotation": ""}, "snippet": " time_1 = time.time()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L105_C8", "label": "name = get()", "type": "assigned_variable", "loc": [105, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [14, 2, 0.4605, 0.0044, 2, 0.77, 0.0588, 57, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " name = self.request.get('city', '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L106_C8", "label": "if", "type": "if", "loc": [106, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [4, 2, 0.4671, 0.0088, 2, 0.77, 0.1176, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not name:\n name = get_city(self.request)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L107_C12", "label": "name = get_city()", "type": "assigned_variable", "loc": [107, 107], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L106_C8", "vector": [14, 3, 0.4693, 0.0044, 3, 0.83, 0.0, 57, 3, 1, 0, 0, 573, 10, 1], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "get_city", "annotation": ""}, "snippet": " name = get_city(self.request)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L108_C8", "label": "if", "type": "if", "loc": [108, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [4, 2, 0.4759, 0.0088, 2, 0.77, 0.1765, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not name:\n name = 'beijing'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L109_C12", "label": "name =", "type": "assigned_variable", "loc": [109, 109], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L108_C8", "vector": [14, 3, 0.4781, 0.0044, 3, 0.14, 0.0, 57, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " name = 'beijing'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L110_C8", "label": "cities = get()", "type": "assigned_variable", "loc": [110, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [14, 2, 0.4825, 0.0044, 2, 0.77, 0.2353, 884, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "cities", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " cities = memcache.get('__cities__')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L111_C8", "label": "if", "type": "if", "loc": [111, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [4, 2, 0.4912, 0.0132, 2, 0.77, 0.2941, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if cities is None:\n cities = store.get_cities()\n memcache.set('__cities__', cities, 3600)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L112_C12", "label": "cities = get_cities()", "type": "assigned_variable", "loc": [112, 112], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L111_C8", "vector": [14, 3, 0.4912, 0.0044, 3, 0.13, 0.0, 884, 3, 0, 0, 0, 77, 10, 1], "semantic": {"name": "cities", "arg_names": [], "import_names": [], "rhs_call_name": "get_cities", "annotation": ""}, "snippet": " cities = store.get_cities()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L113_C12", "label": "set()", "type": "expression", "loc": [113, 113], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L111_C8", "vector": [8, 3, 0.4956, 0.0044, 3, 0.13, 1.0, 21, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "set", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " memcache.set('__cities__', cities, 3600)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L114_C8", "label": "city =", "type": "assigned_variable", "loc": [114, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [14, 2, 0.5, 0.0044, 2, 0.77, 0.3529, 825, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "city", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " city = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:For_L115_C8", "label": "for c", "type": "for", "loc": [115, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [6, 2, 0.511, 0.0175, 2, 0.77, 0.4118, 411, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for c in cities:\n if c.name==name or name in c.aliases:\n city = c\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L116_C12", "label": "if", "type": "if", "loc": [116, 118], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:For_L115_C8", "vector": [4, 3, 0.5132, 0.0132, 3, 0.86, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if c.name==name or name in c.aliases:\n city = c\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L117_C16", "label": "city =", "type": "assigned_variable", "loc": [117, 117], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L116_C12", "vector": [14, 4, 0.5132, 0.0044, 4, 0.68, 0.0, 825, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "city", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " city = c"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L119_C8", "label": "if", "type": "if", "loc": [119, 121], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [4, 2, 0.5263, 0.0132, 2, 0.77, 0.4706, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if city is None:\n self.response.set_status(500)\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L120_C12", "label": "set_status()", "type": "expression", "loc": [120, 120], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L119_C8", "vector": [8, 3, 0.5263, 0.0044, 3, 0.18, 0.0, 636, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_status", "arg_names": [], "import_names": [], "rhs_call_name": "set_status", "annotation": ""}, "snippet": " self.response.set_status(500)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L121_C12", "label": "return", "type": "return", "loc": [121, 121], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L119_C8", "vector": [13, 3, 0.5307, 0.0044, 3, 0.18, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L122_C8", "label": "today = today()", "type": "assigned_variable", "loc": [122, 122], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [14, 2, 0.5351, 0.0044, 2, 0.77, 0.5294, 788, 3, 0, 0, 0, 788, 10, 1], "semantic": {"name": "today", "arg_names": [], "import_names": [], "rhs_call_name": "today", "annotation": ""}, "snippet": " today = date.today()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L123_C8", "label": "target = date()", "type": "assigned_variable", "loc": [123, 123], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [14, 2, 0.5395, 0.0044, 2, 0.77, 0.5882, 766, 3, 3, 0, 0, 56, 10, 1], "semantic": {"name": "target", "arg_names": [], "import_names": [], "rhs_call_name": "date", "annotation": ""}, "snippet": " target = date(today.year+3, today.month, today.day)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L124_C8", "label": "expires = strftime()", "type": "assigned_variable", "loc": [124, 124], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [14, 2, 0.5439, 0.0044, 2, 0.77, 0.6471, 741, 3, 1, 0, 0, 668, 10, 1], "semantic": {"name": "expires", "arg_names": [], "import_names": [], "rhs_call_name": "strftime", "annotation": ""}, "snippet": " expires = target.strftime('%a, %d-%b-%Y %H:%M:%S GMT')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L125_C8", "label": "assign", "type": "assigned_variable", "loc": [125, 125], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [14, 2, 0.5482, 0.0044, 2, 0.77, 0.7059, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.response.headers['Set-Cookie'] = 'city=%s; expires=%s; path=/' % (city.first_alias(), expires)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L126_C8", "label": "time_2 = time()", "type": "assigned_variable", "loc": [126, 126], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [14, 2, 0.5526, 0.0044, 2, 0.77, 0.7647, 850, 3, 0, 0, 0, 654, 10, 1], "semantic": {"name": "time_2", "arg_names": [], "import_names": [], "rhs_call_name": "time", "annotation": ""}, "snippet": " time_2 = time.time()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L127_C8", "label": "t = CompiledTemplate()", "type": "assigned_variable", "loc": [127, 127], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [14, 2, 0.557, 0.0044, 2, 0.77, 0.8235, 15, 3, 1, 0, 0, 455, 10, 1], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "CompiledTemplate", "annotation": ""}, "snippet": " t = CompiledTemplate(searchList=[{'city' : city, 'cities' : cities}])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L128_C8", "label": "write()", "type": "expression", "loc": [128, 128], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [8, 2, 0.5614, 0.0044, 2, 0.77, 0.8824, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " self.response.out.write(t)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L129_C8", "label": "time_3 = time()", "type": "assigned_variable", "loc": [129, 129], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [14, 2, 0.5658, 0.0044, 2, 0.77, 0.9412, 947, 3, 0, 0, 0, 654, 10, 1], "semantic": {"name": "time_3", "arg_names": [], "import_names": [], "rhs_call_name": "time", "annotation": ""}, "snippet": " time_3 = time.time()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L130_C8", "label": "info()", "type": "expression", "loc": [130, 130], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "vector": [8, 2, 0.5702, 0.0044, 2, 0.77, 1.0, 730, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "info", "arg_names": [], "import_names": [], "rhs_call_name": "info", "annotation": ""}, "snippet": " logging.info('Performance: %f / %f of rendering / total.' % (time_3-time_2, time_3-time_1))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L132_C0", "label": "AdminHandler", "type": "class", "loc": [132, 174], "level": 0, "parent": null, "vector": [3, 0, 0.6711, 0.1886, 0, 0.66, 0.8571, 253, 0, 4, 0, 0, 256, 0, 32], "semantic": {"name": "AdminHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class AdminHandler(webapp.RequestHandler):\n\n def get(self):\n login = self.get_login_url()\n if login:\n self.redirect(login)\n return\n action = self.request.get('action', '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L134_C4", "label": "get", "type": "function", "loc": [134, 151], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L132_C0", "vector": [2, 1, 0.625, 0.0789, 1, 0.44, 0.0, 607, 0, 1, 0, 0, 0, 0, 12], "semantic": {"name": "get", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get(self):\n login = self.get_login_url()\n if login:\n self.redirect(login)\n return\n action = self.request.get('action', '')\n if action=='delete_city':\n key = self.request.get('key')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L135_C8", "label": "login = get_login_url()", "type": "assigned_variable", "loc": [135, 135], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L134_C4", "vector": [14, 2, 0.5921, 0.0044, 2, 0.22, 0.0, 724, 3, 0, 0, 0, 942, 10, 1], "semantic": {"name": "login", "arg_names": [], "import_names": [], "rhs_call_name": "get_login_url", "annotation": ""}, "snippet": " login = self.get_login_url()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L136_C8", "label": "if", "type": "if", "loc": [136, 138], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L134_C4", "vector": [4, 2, 0.6009, 0.0132, 2, 0.22, 0.2, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if login:\n self.redirect(login)\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L137_C12", "label": "redirect()", "type": "expression", "loc": [137, 137], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L136_C8", "vector": [8, 3, 0.6009, 0.0044, 3, 0.79, 0.0, 206, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "redirect", "arg_names": [], "import_names": [], "rhs_call_name": "redirect", "annotation": ""}, "snippet": " self.redirect(login)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L138_C12", "label": "return", "type": "return", "loc": [138, 138], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L136_C8", "vector": [13, 3, 0.6053, 0.0044, 3, 0.79, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L139_C8", "label": "action = get()", "type": "assigned_variable", "loc": [139, 139], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L134_C4", "vector": [14, 2, 0.6096, 0.0044, 2, 0.22, 0.4, 422, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "action", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " action = self.request.get('action', '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L140_C8", "label": "if", "type": "if", "loc": [140, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L134_C4", "vector": [4, 2, 0.6228, 0.0219, 2, 0.22, 0.6, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if action=='delete_city':\n key = self.request.get('key')\n store.delete_city(key)\n self.redirect_admin()\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L141_C12", "label": "key = get()", "type": "assigned_variable", "loc": [141, 141], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L140_C8", "vector": [14, 3, 0.6184, 0.0044, 3, 0.23, 0.0, 230, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " key = self.request.get('key')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L142_C12", "label": "delete_city()", "type": "expression", "loc": [142, 142], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L140_C8", "vector": [8, 3, 0.6228, 0.0044, 3, 0.23, 0.3333, 118, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "delete_city", "arg_names": [], "import_names": [], "rhs_call_name": "delete_city", "annotation": ""}, "snippet": " store.delete_city(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L143_C12", "label": "redirect_admin()", "type": "expression", "loc": [143, 143], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L140_C8", "vector": [8, 3, 0.6272, 0.0044, 3, 0.23, 0.6667, 203, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "redirect_admin", "arg_names": [], "import_names": [], "rhs_call_name": "redirect_admin", "annotation": ""}, "snippet": " self.redirect_admin()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L144_C12", "label": "return", "type": "return", "loc": [144, 144], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L140_C8", "vector": [13, 3, 0.6316, 0.0044, 3, 0.23, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L145_C8", "label": "if", "type": "if", "loc": [145, 150], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L134_C4", "vector": [4, 2, 0.6469, 0.0263, 2, 0.22, 0.8, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if action=='':\n cities = store.get_cities()\n root = os.path.dirname(__file__)\n t = Template(file=os.path.join(root, 'admin.html'), searchList=[{'cities' : cities}])\n self.response.out.write(t)\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L146_C12", "label": "cities = get_cities()", "type": "assigned_variable", "loc": [146, 146], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L145_C8", "vector": [14, 3, 0.6404, 0.0044, 3, 0.74, 0.0, 884, 3, 0, 0, 0, 77, 10, 1], "semantic": {"name": "cities", "arg_names": [], "import_names": [], "rhs_call_name": "get_cities", "annotation": ""}, "snippet": " cities = store.get_cities()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L147_C12", "label": "root = dirname()", "type": "assigned_variable", "loc": [147, 147], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L145_C8", "vector": [14, 3, 0.6447, 0.0044, 3, 0.74, 0.25, 696, 3, 1, 0, 0, 959, 10, 1], "semantic": {"name": "root", "arg_names": [], "import_names": [], "rhs_call_name": "dirname", "annotation": ""}, "snippet": " root = os.path.dirname(__file__)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L148_C12", "label": "t = Template()", "type": "assigned_variable", "loc": [148, 148], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L145_C8", "vector": [14, 3, 0.6491, 0.0044, 3, 0.74, 0.5, 15, 3, 2, 0, 0, 137, 10, 2], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "Template", "annotation": ""}, "snippet": " t = Template(file=os.path.join(root, 'admin.html'), searchList=[{'cities' : cities}])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L149_C12", "label": "write()", "type": "expression", "loc": [149, 149], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L145_C8", "vector": [8, 3, 0.6535, 0.0044, 3, 0.74, 0.75, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " self.response.out.write(t)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L150_C12", "label": "return", "type": "return", "loc": [150, 150], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L145_C8", "vector": [13, 3, 0.6579, 0.0044, 3, 0.74, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L151_C8", "label": "set_status()", "type": "expression", "loc": [151, 151], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L134_C4", "vector": [8, 2, 0.6623, 0.0044, 2, 0.22, 1.0, 636, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_status", "arg_names": [], "import_names": [], "rhs_call_name": "set_status", "annotation": ""}, "snippet": " self.response.set_status(400)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L153_C4", "label": "post", "type": "function", "loc": [153, 166], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L132_C0", "vector": [2, 1, 0.6996, 0.0614, 1, 0.44, 0.3333, 304, 0, 1, 0, 0, 0, 0, 16], "semantic": {"name": "post", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def post(self):\n login = self.get_login_url()\n if login:\n self.redirect(login)\n return\n action = self.request.get('action')\n if action=='create_city':\n name = cgi.escape(self.request.get('name')).strip().lower()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L154_C8", "label": "login = get_login_url()", "type": "assigned_variable", "loc": [154, 154], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L153_C4", "vector": [14, 2, 0.6754, 0.0044, 2, 0.12, 0.0, 724, 3, 0, 0, 0, 942, 10, 1], "semantic": {"name": "login", "arg_names": [], "import_names": [], "rhs_call_name": "get_login_url", "annotation": ""}, "snippet": " login = self.get_login_url()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L155_C8", "label": "if", "type": "if", "loc": [155, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L153_C4", "vector": [4, 2, 0.6842, 0.0132, 2, 0.12, 0.25, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if login:\n self.redirect(login)\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L156_C12", "label": "redirect()", "type": "expression", "loc": [156, 156], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L155_C8", "vector": [8, 3, 0.6842, 0.0044, 3, 0.23, 0.0, 206, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "redirect", "arg_names": [], "import_names": [], "rhs_call_name": "redirect", "annotation": ""}, "snippet": " self.redirect(login)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L157_C12", "label": "return", "type": "return", "loc": [157, 157], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L155_C8", "vector": [13, 3, 0.6886, 0.0044, 3, 0.23, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L158_C8", "label": "action = get()", "type": "assigned_variable", "loc": [158, 158], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L153_C4", "vector": [14, 2, 0.693, 0.0044, 2, 0.12, 0.5, 422, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "action", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " action = self.request.get('action')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L159_C8", "label": "if", "type": "if", "loc": [159, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L153_C4", "vector": [4, 2, 0.7105, 0.0307, 2, 0.12, 0.75, 0, 0, 0, 0, 0, 0, 0, 12], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if action=='create_city':\n name = cgi.escape(self.request.get('name')).strip().lower()\n aliases = [cgi.escape(x).lower() for x in self.request.get_all('aliases') if x.strip()]\n code = int(self.request.get('code'))\n store.create_city(name, aliases, code)\n self.redirect_admin()\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L160_C12", "label": "name = lower()", "type": "assigned_variable", "loc": [160, 160], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L159_C8", "vector": [14, 3, 0.7018, 0.0044, 3, 0.24, 0.0, 57, 3, 0, 0, 0, 432, 10, 4], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "lower", "annotation": ""}, "snippet": " name = cgi.escape(self.request.get('name')).strip().lower()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L161_C12", "label": "aliases =", "type": "assigned_variable", "loc": [161, 161], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L159_C8", "vector": [14, 3, 0.7061, 0.0044, 3, 0.24, 0.2, 88, 5, 0, 0, 0, 0, 0, 4], "semantic": {"name": "aliases", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " aliases = [cgi.escape(x).lower() for x in self.request.get_all('aliases') if x.strip()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L162_C12", "label": "code = int()", "type": "assigned_variable", "loc": [162, 162], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L159_C8", "vector": [14, 3, 0.7105, 0.0044, 3, 0.24, 0.4, 44, 3, 1, 0, 0, 901, 10, 2], "semantic": {"name": "code", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " code = int(self.request.get('code'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L163_C12", "label": "create_city()", "type": "expression", "loc": [163, 163], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L159_C8", "vector": [8, 3, 0.7149, 0.0044, 3, 0.24, 0.6, 799, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "create_city", "arg_names": [], "import_names": [], "rhs_call_name": "create_city", "annotation": ""}, "snippet": " store.create_city(name, aliases, code)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L164_C12", "label": "redirect_admin()", "type": "expression", "loc": [164, 164], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L159_C8", "vector": [8, 3, 0.7193, 0.0044, 3, 0.24, 0.8, 203, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "redirect_admin", "arg_names": [], "import_names": [], "rhs_call_name": "redirect_admin", "annotation": ""}, "snippet": " self.redirect_admin()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L165_C12", "label": "return", "type": "return", "loc": [165, 165], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L159_C8", "vector": [13, 3, 0.7237, 0.0044, 3, 0.24, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L166_C8", "label": "set_status()", "type": "expression", "loc": [166, 166], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L153_C4", "vector": [8, 2, 0.7281, 0.0044, 2, 0.12, 1.0, 636, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_status", "arg_names": [], "import_names": [], "rhs_call_name": "set_status", "annotation": ""}, "snippet": " self.response.set_status(400)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L168_C4", "label": "get_login_url", "type": "function", "loc": [168, 171], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L132_C0", "vector": [2, 1, 0.7434, 0.0175, 1, 0.44, 0.6667, 942, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "get_login_url", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_login_url(self):\n if not users.is_current_user_admin():\n return users.create_login_url('/admin')\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L169_C8", "label": "if", "type": "if", "loc": [169, 170], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L168_C4", "vector": [4, 2, 0.7434, 0.0088, 2, 0.23, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not users.is_current_user_admin():\n return users.create_login_url('/admin')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L170_C12", "label": "return", "type": "return", "loc": [170, 170], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L169_C8", "vector": [13, 3, 0.7456, 0.0044, 3, 0.55, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return users.create_login_url('/admin')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L171_C8", "label": "return", "type": "return", "loc": [171, 171], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L168_C4", "vector": [13, 2, 0.75, 0.0044, 2, 0.23, 1.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L173_C4", "label": "redirect_admin", "type": "function", "loc": [173, 174], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L132_C0", "vector": [2, 1, 0.761, 0.0088, 1, 0.44, 1.0, 203, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "redirect_admin", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def redirect_admin(self):\n self.redirect('/admin?t=%s' % time.time())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L174_C8", "label": "redirect()", "type": "expression", "loc": [174, 174], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L173_C4", "vector": [8, 2, 0.7632, 0.0044, 2, 0.01, 0.0, 206, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "redirect", "arg_names": [], "import_names": [], "rhs_call_name": "redirect", "annotation": ""}, "snippet": " self.redirect('/admin?t=%s' % time.time())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L176_C0", "label": "ApiHandler", "type": "class", "loc": [176, 215], "level": 0, "parent": null, "vector": [3, 0, 0.8575, 0.1754, 0, 0.66, 0.8929, 856, 0, 3, 0, 0, 256, 0, 21], "semantic": {"name": "ApiHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ApiHandler(webapp.RequestHandler):\n\n CACHE_TIME = 600 # 600 seconds\n\n def get(self):\n callback = ''\n c = ''\n extension = self.request.get('extension', '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L178_C4", "label": "CACHE_TIME =", "type": "assigned_variable", "loc": [178, 178], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L176_C0", "vector": [14, 1, 0.7807, 0.0044, 1, 0.09, 0.0, 214, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "CACHE_TIME", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " CACHE_TIME = 600 # 600 seconds"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "label": "get", "type": "function", "loc": [180, 205], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L176_C0", "vector": [2, 1, 0.8443, 0.114, 1, 0.09, 0.3333, 607, 0, 1, 1, 0, 0, 0, 17], "semantic": {"name": "get", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get(self):\n callback = ''\n c = ''\n extension = self.request.get('extension', '')\n if extension=='chrome':\n # detect city from cookie:\n c = get_city(self.request)\n if not c:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L181_C8", "label": "callback =", "type": "assigned_variable", "loc": [181, 181], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "vector": [14, 2, 0.7939, 0.0044, 2, 0.41, 0.0, 342, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " callback = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L182_C8", "label": "c =", "type": "assigned_variable", "loc": [182, 182], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "vector": [14, 2, 0.7982, 0.0044, 2, 0.41, 0.1111, 411, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " c = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L183_C8", "label": "extension = get()", "type": "assigned_variable", "loc": [183, 183], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "vector": [14, 2, 0.8026, 0.0044, 2, 0.41, 0.2222, 14, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "extension", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " extension = self.request.get('extension', '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L184_C8", "label": "if", "type": "if", "loc": [184, 191], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "vector": [4, 2, 0.8224, 0.0351, 2, 0.41, 0.3333, 0, 0, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if extension=='chrome':\n # detect city from cookie:\n c = get_city(self.request)\n if not c:\n c = 'beijing'\n else:\n callback = cgi.escape(self.request.get('callback', '').strip())\n c = cgi.escape(self.request.get('city', '')).lower()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L186_C12", "label": "c = get_city()", "type": "assigned_variable", "loc": [186, 186], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L184_C8", "vector": [14, 3, 0.8158, 0.0044, 3, 0.83, 0.0, 411, 3, 1, 0, 0, 573, 10, 1], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "get_city", "annotation": ""}, "snippet": " c = get_city(self.request)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L187_C12", "label": "if", "type": "if", "loc": [187, 188], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L184_C8", "vector": [4, 3, 0.8224, 0.0088, 3, 0.83, 0.3333, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not c:\n c = 'beijing'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L188_C16", "label": "c =", "type": "assigned_variable", "loc": [188, 188], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L187_C12", "vector": [14, 4, 0.8246, 0.0044, 4, 0.2, 0.0, 411, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " c = 'beijing'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L190_C12", "label": "callback = escape()", "type": "assigned_variable", "loc": [190, 190], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L184_C8", "vector": [14, 3, 0.8333, 0.0044, 3, 0.83, 0.6667, 342, 3, 1, 0, 0, 494, 10, 3], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "escape", "annotation": ""}, "snippet": " callback = cgi.escape(self.request.get('callback', '').strip())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L191_C12", "label": "c = lower()", "type": "assigned_variable", "loc": [191, 191], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L184_C8", "vector": [14, 3, 0.8377, 0.0044, 3, 0.83, 1.0, 411, 3, 0, 0, 0, 432, 10, 3], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "lower", "annotation": ""}, "snippet": " c = cgi.escape(self.request.get('city', '')).lower()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L192_C8", "label": "if", "type": "if", "loc": [192, 193], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "vector": [4, 2, 0.8443, 0.0088, 2, 0.41, 0.4444, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not c:\n return self.send_error('MISSING_PARAMETER', 'Missing parameter \\'city\\'')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L193_C12", "label": "return", "type": "return", "loc": [193, 193], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L192_C8", "vector": [13, 3, 0.8465, 0.0044, 3, 0.84, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.send_error('MISSING_PARAMETER', 'Missing parameter \\'city\\'')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L194_C8", "label": "city = find_city()", "type": "assigned_variable", "loc": [194, 194], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "vector": [14, 2, 0.8509, 0.0044, 2, 0.41, 0.5556, 825, 3, 2, 0, 0, 717, 10, 1], "semantic": {"name": "city", "arg_names": [], "import_names": [], "rhs_call_name": "find_city", "annotation": ""}, "snippet": " city = store.find_city(c, return_default=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L195_C8", "label": "if", "type": "if", "loc": [195, 196], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "vector": [4, 2, 0.8575, 0.0088, 2, 0.41, 0.6667, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if city is None:\n return self.send_error('CITY_NOT_FOUND', 'City not found')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L196_C12", "label": "return", "type": "return", "loc": [196, 196], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L195_C8", "vector": [13, 3, 0.8596, 0.0044, 3, 0.17, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.send_error('CITY_NOT_FOUND', 'City not found')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L197_C8", "label": "weather = fetch_weather_in_cache()", "type": "assigned_variable", "loc": [197, 197], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "vector": [14, 2, 0.864, 0.0044, 2, 0.41, 0.7778, 12, 3, 1, 0, 0, 598, 10, 1], "semantic": {"name": "weather", "arg_names": [], "import_names": [], "rhs_call_name": "fetch_weather_in_cache", "annotation": ""}, "snippet": " weather = fetch_weather_in_cache(city)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L198_C8", "label": "if", "type": "if", "loc": [198, 199], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "vector": [4, 2, 0.8706, 0.0088, 2, 0.41, 0.8889, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if weather is None:\n return self.send_error('SERVICE_UNAVAILABLE', 'Service unavailable')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L199_C12", "label": "return", "type": "return", "loc": [199, 199], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L198_C8", "vector": [13, 3, 0.8728, 0.0044, 3, 0.68, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.send_error('SERVICE_UNAVAILABLE', 'Service unavailable')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L200_C8", "label": "if", "type": "if", "loc": [200, 205], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "vector": [4, 2, 0.8882, 0.0263, 2, 0.41, 1.0, 0, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if callback:\n if isinstance(callback, unicode):\n callback = callback.encode('utf-8')\n self.write_json('%s(%s);' % (callback, weather))\n else:\n self.write_json(weather)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L201_C12", "label": "if", "type": "if", "loc": [201, 202], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L200_C8", "vector": [4, 3, 0.8838, 0.0088, 3, 0.84, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(callback, unicode):\n callback = callback.encode('utf-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L202_C16", "label": "callback = encode()", "type": "assigned_variable", "loc": [202, 202], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L201_C12", "vector": [14, 4, 0.886, 0.0044, 4, 0.89, 0.0, 342, 3, 1, 0, 0, 623, 10, 1], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "encode", "annotation": ""}, "snippet": " callback = callback.encode('utf-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L203_C12", "label": "write_json()", "type": "expression", "loc": [203, 203], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L200_C8", "vector": [8, 3, 0.8904, 0.0044, 3, 0.84, 0.5, 840, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write_json", "arg_names": [], "import_names": [], "rhs_call_name": "write_json", "annotation": ""}, "snippet": " self.write_json('%s(%s);' % (callback, weather))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L205_C12", "label": "write_json()", "type": "expression", "loc": [205, 205], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L200_C8", "vector": [8, 3, 0.8991, 0.0044, 3, 0.84, 1.0, 840, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write_json", "arg_names": [], "import_names": [], "rhs_call_name": "write_json", "annotation": ""}, "snippet": " self.write_json(weather)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L207_C4", "label": "send_error", "type": "function", "loc": [207, 209], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L176_C0", "vector": [2, 1, 0.9123, 0.0132, 1, 0.09, 0.6667, 886, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "send_error", "arg_names": ["self", "code", "msg"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def send_error(self, code, msg):\n json = '{ \"error\" : \"%s\", \"message\" : \"%s\"}' % (code, msg)\n self.write_json(json)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L208_C8", "label": "json =", "type": "assigned_variable", "loc": [208, 208], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L207_C4", "vector": [14, 2, 0.9123, 0.0044, 2, 0.56, 0.0, 463, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "json", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " json = '{ \"error\" : \"%s\", \"message\" : \"%s\"}' % (code, msg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L209_C8", "label": "write_json()", "type": "expression", "loc": [209, 209], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L207_C4", "vector": [8, 2, 0.9167, 0.0044, 2, 0.56, 1.0, 840, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write_json", "arg_names": [], "import_names": [], "rhs_call_name": "write_json", "annotation": ""}, "snippet": " self.write_json(json)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L211_C4", "label": "write_json", "type": "function", "loc": [211, 215], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L176_C0", "vector": [2, 1, 0.9342, 0.0219, 1, 0.09, 1.0, 840, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "write_json", "arg_names": ["self", "json"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def write_json(self, json):\n if isinstance(json, unicode):\n json = json.encode('utf-8')\n self.response.headers['Content-Type'] = 'application/json; charset=utf-8'\n self.response.out.write(json)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L212_C8", "label": "if", "type": "if", "loc": [212, 213], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L211_C4", "vector": [4, 2, 0.932, 0.0088, 2, 0.07, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(json, unicode):\n json = json.encode('utf-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L213_C12", "label": "json = encode()", "type": "assigned_variable", "loc": [213, 213], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L212_C8", "vector": [14, 3, 0.9342, 0.0044, 3, 0.77, 0.0, 463, 3, 1, 0, 0, 623, 10, 1], "semantic": {"name": "json", "arg_names": [], "import_names": [], "rhs_call_name": "encode", "annotation": ""}, "snippet": " json = json.encode('utf-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L214_C8", "label": "assign", "type": "assigned_variable", "loc": [214, 214], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L211_C4", "vector": [14, 2, 0.9386, 0.0044, 2, 0.07, 0.5, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.response.headers['Content-Type'] = 'application/json; charset=utf-8'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L215_C8", "label": "write()", "type": "expression", "loc": [215, 215], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L211_C4", "vector": [8, 2, 0.943, 0.0044, 2, 0.07, 1.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " self.response.out.write(json)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L217_C0", "label": "application = WSGIApplication()", "type": "assigned_variable", "loc": [217, 222], "level": 0, "parent": null, "vector": [14, 0, 0.9627, 0.0263, 0, 0.66, 0.9286, 244, 3, 2, 0, 0, 623, 10, 1], "semantic": {"name": "application", "arg_names": [], "import_names": [], "rhs_call_name": "WSGIApplication", "annotation": ""}, "snippet": "application = webapp.WSGIApplication([\n ('^/$', HomeHandler),\n ('^/api$', ApiHandler),\n ('^/admin$', AdminHandler),\n ('^/_ah/xmpp/message/chat/$', XmppHandler),\n], debug=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L224_C0", "label": "main", "type": "function", "loc": [224, 225], "level": 0, "parent": null, "vector": [2, 0, 0.9846, 0.0088, 0, 0.66, 0.9643, 624, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n run_wsgi_app(application)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L225_C4", "label": "run_wsgi_app()", "type": "expression", "loc": [225, 225], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L224_C0", "vector": [8, 1, 0.9868, 0.0044, 1, 0.7, 0.0, 563, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "run_wsgi_app", "arg_names": [], "import_names": [], "rhs_call_name": "run_wsgi_app", "annotation": ""}, "snippet": " run_wsgi_app(application)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L227_C0", "label": "if", "type": "if", "loc": [227, 228], "level": 0, "parent": null, "vector": [4, 0, 0.9978, 0.0088, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == \"__main__\":\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L228_C4", "label": "main()", "type": "expression", "loc": [228, 228], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L227_C0", "vector": [8, 1, 1.0, 0.0044, 1, 0.48, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L30_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L31_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L32_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L31_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:For_L33_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:For_L33_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L34_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:For_L33_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L35_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L35_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L36_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L41_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L42_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Try_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:Try_L58_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:Try_L58_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L64_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L66_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L71_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L71_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L72_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L71_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L75_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L77_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L78_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L77_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L81_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L83_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L83_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L84_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L87_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L87_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L88_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L89_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L90_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L102_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L105_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L106_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L107_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L108_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L109_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L110_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L111_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L112_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L111_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L113_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:For_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:For_L115_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L116_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L116_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L117_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L119_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L119_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L120_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L119_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L121_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L122_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L123_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L124_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L125_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L126_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L127_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L128_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L129_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L130_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L132_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L134_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L134_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L135_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L134_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L136_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L136_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L137_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L136_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L138_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L134_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L139_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L134_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L140_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L141_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L140_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L142_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L140_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L143_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L140_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L144_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L134_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L145_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L145_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L146_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L145_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L147_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L145_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L148_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L145_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L149_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L145_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L150_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L134_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L151_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L132_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L153_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L154_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L155_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L156_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L157_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L158_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L159_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L159_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L160_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L159_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L161_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L159_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L162_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L159_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L163_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L159_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L164_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L159_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L165_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L166_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L132_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L168_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L168_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L169_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L169_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L170_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L168_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L171_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L132_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L173_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L173_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L174_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L176_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L178_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L176_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L181_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L182_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L183_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L184_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L184_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L186_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L184_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L187_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L187_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L188_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L184_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L190_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L184_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L191_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L192_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L192_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L193_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L194_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L195_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L195_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L196_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L197_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L198_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L198_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Return_L199_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L180_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L200_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L200_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L201_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L201_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L202_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L200_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L203_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L200_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L205_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L176_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L207_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L207_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L208_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L207_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L209_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:ClassDef_L176_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L211_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L211_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L212_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L212_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L213_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L211_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Assign_L214_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L211_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L215_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:FunctionDef_L224_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L225_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1463:If_L227_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1463:Expr_L228_C4"}]
# $Id: CheetahWrapper.py,v 1.26 2007/10/02 01:22:04 tavis_rudd Exp $ """Cheetah command-line interface. 2002-09-03 MSO: Total rewrite. 2002-09-04 MSO: Bugfix, compile command was using wrong output ext. 2002-11-08 MSO: Another rewrite. Meta-Data ================================================================================ Author: Tavis Rudd <tavis@damnsimple.com> and Mike Orr <sluggoster@gmail.com>> Version: $Revision: 1.26 $ Start Date: 2001/03/30 Last Revision Date: $Date: 2007/10/02 01:22:04 $ """ __author__ = "Tavis Rudd <tavis@damnsimple.com> and Mike Orr <sluggoster@gmail.com>" __revision__ = "$Revision: 1.26 $"[11:-2] import getopt, glob, os, pprint, re, shutil, sys import cPickle as pickle from optparse import OptionParser from Cheetah.Version import Version from Cheetah.Template import Template, DEFAULT_COMPILER_SETTINGS from Cheetah.Utils.Misc import mkdirsWithPyInitFiles optionDashesRE = re.compile( R"^-{1,2}" ) moduleNameRE = re.compile( R"^[a-zA-Z_][a-zA-Z_0-9]*$" ) def fprintfMessage(stream, format, *args): if format[-1:] == '^': format = format[:-1] else: format += '\n' if args: message = format % args else: message = format stream.write(message) class Error(Exception): pass class Bundle: """Wrap the source, destination and backup paths in one neat little class. Used by CheetahWrapper.getBundles(). """ def __init__(self, **kw): self.__dict__.update(kw) def __repr__(self): return "<Bundle %r>" % self.__dict__ ################################################## ## USAGE FUNCTION & MESSAGES def usage(usageMessage, errorMessage="", out=sys.stderr): """Write help text, an optional error message, and abort the program. """ out.write(WRAPPER_TOP) out.write(usageMessage) exitStatus = 0 if errorMessage: out.write('\n') out.write("*** USAGE ERROR ***: %s\n" % errorMessage) exitStatus = 1 sys.exit(exitStatus) WRAPPER_TOP = """\ __ ____________ __ \ \/ \/ / \/ * * \/ CHEETAH %(Version)s Command-Line Tool \ | / \ ==----== / by Tavis Rudd <tavis@damnsimple.com> \__________/ and Mike Orr <sluggoster@gmail.com> """ % globals() HELP_PAGE1 = """\ USAGE: ------ cheetah compile [options] [FILES ...] : Compile template definitions cheetah fill [options] [FILES ...] : Fill template definitions cheetah help : Print this help message cheetah options : Print options help message cheetah test [options] : Run Cheetah's regression tests : (same as for unittest) cheetah version : Print Cheetah version number You may abbreviate the command to the first letter; e.g., 'h' == 'help'. If FILES is a single "-", read standard input and write standard output. Run "cheetah options" for the list of valid options. """ ################################################## ## CheetahWrapper CLASS class CheetahWrapper(object): MAKE_BACKUPS = True BACKUP_SUFFIX = ".bak" _templateClass = None _compilerSettings = None def __init__(self): self.progName = None self.command = None self.opts = None self.pathArgs = None self.sourceFiles = [] self.searchList = [] self.parser = None ################################################## ## MAIN ROUTINE def main(self, argv=None): """The main program controller.""" if argv is None: argv = sys.argv # Step 1: Determine the command and arguments. try: self.progName = progName = os.path.basename(argv[0]) self.command = command = optionDashesRE.sub("", argv[1]) if command == 'test': self.testOpts = argv[2:] else: self.parseOpts(argv[2:]) except IndexError: usage(HELP_PAGE1, "not enough command-line arguments") # Step 2: Call the command meths = (self.compile, self.fill, self.help, self.options, self.test, self.version) for meth in meths: methName = meth.__name__ # Or meth.im_func.func_name # Or meth.func_name (Python >= 2.1 only, sometimes works on 2.0) methInitial = methName[0] if command in (methName, methInitial): sys.argv[0] += (" " + methName) # @@MO: I don't necessarily agree sys.argv[0] should be # modified. meth() return # If none of the commands matched. usage(HELP_PAGE1, "unknown command '%s'" % command) def parseOpts(self, args): C, D, W = self.chatter, self.debug, self.warn self.isCompile = isCompile = self.command[0] == 'c' defaultOext = isCompile and ".py" or ".html" self.parser = OptionParser() pao = self.parser.add_option pao("--idir", action="store", dest="idir", default='', help='Input directory (defaults to current directory)') pao("--odir", action="store", dest="odir", default="", help='Output directory (defaults to current directory)') pao("--iext", action="store", dest="iext", default=".tmpl", help='File input extension (defaults: compile: .tmpl, fill: .tmpl)') pao("--oext", action="store", dest="oext", default=defaultOext, help='File output extension (defaults: compile: .py, fill: .html)') pao("-R", action="store_true", dest="recurse", default=False, help='Recurse through subdirectories looking for input files') pao("--stdout", "-p", action="store_true", dest="stdout", default=False, help='Send output to stdout instead of writing to a file') pao("--quiet", action="store_false", dest="verbose", default=True, help='Do not print informational messages to stdout') pao("--debug", action="store_true", dest="debug", default=False, help='Print diagnostic/debug information to stderr') pao("--env", action="store_true", dest="env", default=False, help='Pass the environment into the search list') pao("--pickle", action="store", dest="pickle", default="", help='Unpickle FILE and pass it through in the search list') pao("--flat", action="store_true", dest="flat", default=False, help='Do not build destination subdirectories') pao("--nobackup", action="store_true", dest="nobackup", default=False, help='Do not make backup files when generating new ones') pao("--settings", action="store", dest="compilerSettingsString", default=None, help='String of compiler settings to pass through, e.g. --settings="useNameMapper=False,useFilters=False"') pao('--print-settings', action='store_true', dest='print_settings', help='Print out the list of available compiler settings') pao("--templateAPIClass", action="store", dest="templateClassName", default=None, help='Name of a subclass of Cheetah.Template.Template to use for compilation, e.g. MyTemplateClass') pao("--parallel", action="store", type="int", dest="parallel", default=1, help='Compile/fill templates in parallel, e.g. --parallel=4') pao('--shbang', dest='shbang', default='#!/usr/bin/env python', help='Specify the shbang to place at the top of compiled templates, e.g. --shbang="#!/usr/bin/python2.6"') opts, files = self.parser.parse_args(args) self.opts = opts if sys.platform == "win32": new_files = [] for spec in files: file_list = glob.glob(spec) if file_list: new_files.extend(file_list) else: new_files.append(spec) files = new_files self.pathArgs = files D("""\ cheetah compile %s Options are %s Files are %s""", args, pprint.pformat(vars(opts)), files) if opts.print_settings: print() print('>> Available Cheetah compiler settings:') from Cheetah.Compiler import _DEFAULT_COMPILER_SETTINGS listing = _DEFAULT_COMPILER_SETTINGS listing.sort(key=lambda l: l[0][0].lower()) for l in listing: print('\t%s (default: "%s")\t%s' % l) sys.exit(0) #cleanup trailing path separators seps = [sep for sep in [os.sep, os.altsep] if sep] for attr in ['idir', 'odir']: for sep in seps: path = getattr(opts, attr, None) if path and path.endswith(sep): path = path[:-len(sep)] setattr(opts, attr, path) break self._fixExts() if opts.env: self.searchList.insert(0, os.environ) if opts.pickle: f = open(opts.pickle, 'rb') unpickled = pickle.load(f) f.close() self.searchList.insert(0, unpickled) ################################################## ## COMMAND METHODS def compile(self): self._compileOrFill() def fill(self): from Cheetah.ImportHooks import install install() self._compileOrFill() def help(self): usage(HELP_PAGE1, "", sys.stdout) def options(self): return self.parser.print_help() def test(self): # @@MO: Ugly kludge. TEST_WRITE_FILENAME = 'cheetah_test_file_creation_ability.tmp' try: f = open(TEST_WRITE_FILENAME, 'w') except: sys.exit("""\ Cannot run the tests because you don't have write permission in the current directory. The tests need to create temporary files. Change to a directory you do have write permission to and re-run the tests.""") else: f.close() os.remove(TEST_WRITE_FILENAME) # @@MO: End ugly kludge. from Cheetah.Tests import Test import unittest verbosity = 1 if '-q' in self.testOpts: verbosity = 0 if '-v' in self.testOpts: verbosity = 2 runner = unittest.TextTestRunner(verbosity=verbosity) runner.run(unittest.TestSuite(Test.suites)) def version(self): print(Version) # If you add a command, also add it to the 'meths' variable in main(). ################################################## ## LOGGING METHODS def chatter(self, format, *args): """Print a verbose message to stdout. But don't if .opts.stdout is true or .opts.verbose is false. """ if self.opts.stdout or not self.opts.verbose: return fprintfMessage(sys.stdout, format, *args) def debug(self, format, *args): """Print a debugging message to stderr, but don't if .debug is false. """ if self.opts.debug: fprintfMessage(sys.stderr, format, *args) def warn(self, format, *args): """Always print a warning message to stderr. """ fprintfMessage(sys.stderr, format, *args) def error(self, format, *args): """Always print a warning message to stderr and exit with an error code. """ fprintfMessage(sys.stderr, format, *args) sys.exit(1) ################################################## ## HELPER METHODS def _fixExts(self): assert self.opts.oext, "oext is empty!" iext, oext = self.opts.iext, self.opts.oext if iext and not iext.startswith("."): self.opts.iext = "." + iext if oext and not oext.startswith("."): self.opts.oext = "." + oext def _compileOrFill(self): C, D, W = self.chatter, self.debug, self.warn opts, files = self.opts, self.pathArgs if files == ["-"]: self._compileOrFillStdin() return elif not files and opts.recurse: which = opts.idir and "idir" or "current" C("Drilling down recursively from %s directory.", which) sourceFiles = [] dir = os.path.join(self.opts.idir, os.curdir) os.path.walk(dir, self._expandSourceFilesWalk, sourceFiles) elif not files: usage(HELP_PAGE1, "Neither files nor -R specified!") else: sourceFiles = self._expandSourceFiles(files, opts.recurse, True) sourceFiles = [os.path.normpath(x) for x in sourceFiles] D("All source files found: %s", sourceFiles) bundles = self._getBundles(sourceFiles) D("All bundles: %s", pprint.pformat(bundles)) if self.opts.flat: self._checkForCollisions(bundles) # In parallel mode a new process is forked for each template # compilation, out of a pool of size self.opts.parallel. This is not # really optimal in all cases (e.g. probably wasteful for small # templates), but seems to work well in real life for me. # # It also won't work for Windows users, but I'm not going to lose any # sleep over that. if self.opts.parallel > 1: bad_child_exit = 0 pid_pool = set() def child_wait(): pid, status = os.wait() pid_pool.remove(pid) return os.WEXITSTATUS(status) while bundles: b = bundles.pop() pid = os.fork() if pid: pid_pool.add(pid) else: self._compileOrFillBundle(b) sys.exit(0) if len(pid_pool) == self.opts.parallel: bad_child_exit = child_wait() if bad_child_exit: break while pid_pool: child_exit = child_wait() if not bad_child_exit: bad_child_exit = child_exit if bad_child_exit: sys.exit("Child process failed, exited with code %d" % bad_child_exit) else: for b in bundles: self._compileOrFillBundle(b) def _checkForCollisions(self, bundles): """Check for multiple source paths writing to the same destination path. """ C, D, W = self.chatter, self.debug, self.warn isError = False dstSources = {} for b in bundles: if b.dst in dstSources: dstSources[b.dst].append(b.src) else: dstSources[b.dst] = [b.src] keys = sorted(dstSources.keys()) for dst in keys: sources = dstSources[dst] if len(sources) > 1: isError = True sources.sort() fmt = "Collision: multiple source files %s map to one destination file %s" W(fmt, sources, dst) if isError: what = self.isCompile and "Compilation" or "Filling" sys.exit("%s aborted due to collisions" % what) def _expandSourceFilesWalk(self, arg, dir, files): """Recursion extension for .expandSourceFiles(). This method is a callback for os.path.walk(). 'arg' is a list to which successful paths will be appended. """ iext = self.opts.iext for f in files: path = os.path.join(dir, f) if path.endswith(iext) and os.path.isfile(path): arg.append(path) elif os.path.islink(path) and os.path.isdir(path): os.path.walk(path, self._expandSourceFilesWalk, arg) # If is directory, do nothing; 'walk' will eventually get it. def _expandSourceFiles(self, files, recurse, addIextIfMissing): """Calculate source paths from 'files' by applying the command-line options. """ C, D, W = self.chatter, self.debug, self.warn idir = self.opts.idir iext = self.opts.iext files = [] for f in self.pathArgs: oldFilesLen = len(files) D("Expanding %s", f) path = os.path.join(idir, f) pathWithExt = path + iext # May or may not be valid. if os.path.isdir(path): if recurse: os.path.walk(path, self._expandSourceFilesWalk, files) else: raise Error("source file '%s' is a directory" % path) elif os.path.isfile(path): files.append(path) elif (addIextIfMissing and not path.endswith(iext) and os.path.isfile(pathWithExt)): files.append(pathWithExt) # Do not recurse directories discovered by iext appending. elif os.path.exists(path): W("Skipping source file '%s', not a plain file.", path) else: W("Skipping source file '%s', not found.", path) if len(files) > oldFilesLen: D(" ... found %s", files[oldFilesLen:]) return files def _getBundles(self, sourceFiles): flat = self.opts.flat idir = self.opts.idir iext = self.opts.iext nobackup = self.opts.nobackup odir = self.opts.odir oext = self.opts.oext idirSlash = idir + os.sep bundles = [] for src in sourceFiles: # 'base' is the subdirectory plus basename. base = src if idir and src.startswith(idirSlash): base = src[len(idirSlash):] if iext and base.endswith(iext): base = base[:-len(iext)] basename = os.path.basename(base) if flat: dst = os.path.join(odir, basename + oext) else: dbn = basename if odir and base.startswith(os.sep): odd = odir while odd != '': idx = base.find(odd) if idx == 0: dbn = base[len(odd):] if dbn[0] == '/': dbn = dbn[1:] break odd = os.path.dirname(odd) if odd == '/': break dst = os.path.join(odir, dbn + oext) else: dst = os.path.join(odir, base + oext) bak = dst + self.BACKUP_SUFFIX b = Bundle(src=src, dst=dst, bak=bak, base=base, basename=basename) bundles.append(b) return bundles def _getTemplateClass(self): C, D, W = self.chatter, self.debug, self.warn modname = None if self._templateClass: return self._templateClass modname = self.opts.templateClassName if not modname: return Template p = modname.rfind('.') if ':' not in modname: self.error('The value of option --templateAPIClass is invalid\n' 'It must be in the form "module:class", ' 'e.g. "Cheetah.Template:Template"') modname, classname = modname.split(':') C('using --templateAPIClass=%s:%s'%(modname, classname)) if p >= 0: mod = getattr(__import__(modname[:p], {}, {}, [modname[p+1:]]), modname[p+1:]) else: mod = __import__(modname, {}, {}, []) klass = getattr(mod, classname, None) if klass: self._templateClass = klass return klass else: self.error('**Template class specified in option --templateAPIClass not found\n' '**Falling back on Cheetah.Template:Template') def _getCompilerSettings(self): if self._compilerSettings: return self._compilerSettings def getkws(**kws): return kws if self.opts.compilerSettingsString: try: exec('settings = getkws(%s)'%self.opts.compilerSettingsString) except: self.error("There's an error in your --settings option." "It must be valid Python syntax.\n" +" --settings='%s'\n"%self.opts.compilerSettingsString +" %s: %s"%sys.exc_info()[:2] ) validKeys = DEFAULT_COMPILER_SETTINGS.keys() if [k for k in settings.keys() if k not in validKeys]: self.error( 'The --setting "%s" is not a valid compiler setting name.'%k) self._compilerSettings = settings return settings else: return {} def _compileOrFillStdin(self): TemplateClass = self._getTemplateClass() compilerSettings = self._getCompilerSettings() if self.isCompile: pysrc = TemplateClass.compile(file=sys.stdin, compilerSettings=compilerSettings, returnAClass=False) output = pysrc else: output = str(TemplateClass(file=sys.stdin, compilerSettings=compilerSettings)) sys.stdout.write(output) def _compileOrFillBundle(self, b): C, D, W = self.chatter, self.debug, self.warn TemplateClass = self._getTemplateClass() compilerSettings = self._getCompilerSettings() src = b.src dst = b.dst base = b.base basename = b.basename dstDir = os.path.dirname(dst) what = self.isCompile and "Compiling" or "Filling" C("%s %s -> %s^", what, src, dst) # No trailing newline. if os.path.exists(dst) and not self.opts.nobackup: bak = b.bak C(" (backup %s)", bak) # On same line as previous message. else: bak = None C("") if self.isCompile: if not moduleNameRE.match(basename): tup = basename, src raise Error("""\ %s: base name %s contains invalid characters. It must be named according to the same rules as Python modules.""" % tup) pysrc = TemplateClass.compile(file=src, returnAClass=False, moduleName=basename, className=basename, commandlineopts=self.opts, compilerSettings=compilerSettings) output = pysrc else: #output = str(TemplateClass(file=src, searchList=self.searchList)) tclass = TemplateClass.compile(file=src, compilerSettings=compilerSettings) output = str(tclass(searchList=self.searchList)) if bak: shutil.copyfile(dst, bak) if dstDir and not os.path.exists(dstDir): if self.isCompile: mkdirsWithPyInitFiles(dstDir) else: os.makedirs(dstDir) if self.opts.stdout: sys.stdout.write(output) else: f = open(dst, 'w') f.write(output) f.close() # Called when invoked as `cheetah` def _cheetah(): CheetahWrapper().main() # Called when invoked as `cheetah-compile` def _cheetah_compile(): sys.argv.insert(1, "compile") CheetahWrapper().main() ################################################## ## if run from the command line if __name__ == '__main__': CheetahWrapper().main() # vim: shiftwidth=4 tabstop=4 expandtab
ajibawa-2023/Python-Code-Large/train/row_1464
397
632
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 14], "level": 0, "parent": null, "vector": [8, 0, 0.0127, 0.0206, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"Cheetah command-line interface.\n\n2002-09-03 MSO: Total rewrite.\n2002-09-04 MSO: Bugfix, compile command was using wrong output ext.\n2002-11-08 MSO: Another rewrite.\n\nMeta-Data\n================================================================================"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L15_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [15, 15], "level": 0, "parent": null, "vector": [14, 0, 0.0237, 0.0016, 0, 0.66, 0.05, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__author__ = \"Tavis Rudd <tavis@damnsimple.com> and Mike Orr <sluggoster@gmail.com>\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L16_C0", "label": "__revision__ =", "type": "assigned_variable", "loc": [16, 16], "level": 0, "parent": null, "vector": [14, 0, 0.0253, 0.0016, 0, 0.66, 0.1, 809, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__revision__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__revision__ = \"$Revision: 1.26 $\"[11:-2]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Import_L18_C0", "label": "getopt import getopt, glob, os\u2026", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0285, 0.0016, 0, 0.66, 0.15, 588, 0, 7, 0, 0, 588, 0, 0], "semantic": {"name": "getopt", "arg_names": [], "import_names": ["getopt", "glob", "os", "pprint", "re", "shutil", "sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import getopt, glob, os, pprint, re, shutil, sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Import_L19_C0", "label": "cPickle import pickle", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.0301, 0.0016, 0, 0.66, 0.2, 279, 0, 1, 0, 0, 279, 0, 0], "semantic": {"name": "cPickle", "arg_names": [], "import_names": ["pickle"], "rhs_call_name": "", "annotation": ""}, "snippet": "import cPickle as pickle"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:ImportFrom_L20_C0", "label": "from optparse import OptionParser", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.0316, 0.0016, 0, 0.66, 0.25, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "optparse", "arg_names": [], "import_names": ["OptionParser"], "rhs_call_name": "", "annotation": ""}, "snippet": "from optparse import OptionParser"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:ImportFrom_L22_C0", "label": "from Cheetah.Version import Version", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.0348, 0.0016, 0, 0.66, 0.3, 551, 0, 1, 0, 0, 551, 0, 0], "semantic": {"name": "Cheetah.Version", "arg_names": [], "import_names": ["Version"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Version import Version"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:ImportFrom_L23_C0", "label": "from Cheetah.Template import Template, DEFAULT_COMPILER_SETTINGS", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.0364, 0.0016, 0, 0.66, 0.35, 171, 0, 2, 0, 0, 171, 0, 0], "semantic": {"name": "Cheetah.Template", "arg_names": [], "import_names": ["Template", "DEFAULT_COMPILER_SETTINGS"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Template import Template, DEFAULT_COMPILER_SETTINGS"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:ImportFrom_L24_C0", "label": "from Cheetah.Utils.Misc import mkdirsWithPyInitFiles", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.038, 0.0016, 0, 0.66, 0.4, 190, 0, 1, 0, 0, 190, 0, 0], "semantic": {"name": "Cheetah.Utils.Misc", "arg_names": [], "import_names": ["mkdirsWithPyInitFiles"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Utils.Misc import mkdirsWithPyInitFiles"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L26_C0", "label": "optionDashesRE = compile()", "type": "assigned_variable", "loc": [26, 26], "level": 0, "parent": null, "vector": [14, 0, 0.0411, 0.0016, 0, 0.66, 0.45, 790, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "optionDashesRE", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "optionDashesRE = re.compile( R\"^-{1,2}\" )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L27_C0", "label": "moduleNameRE = compile()", "type": "assigned_variable", "loc": [27, 27], "level": 0, "parent": null, "vector": [14, 0, 0.0427, 0.0016, 0, 0.66, 0.5, 399, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "moduleNameRE", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "moduleNameRE = re.compile( R\"^[a-zA-Z_][a-zA-Z_0-9]*$\" )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L29_C0", "label": "fprintfMessage", "type": "function", "loc": [29, 38], "level": 0, "parent": null, "vector": [2, 0, 0.053, 0.0158, 0, 0.66, 0.55, 569, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "fprintfMessage", "arg_names": ["stream", "format", "args"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def fprintfMessage(stream, format, *args):\n if format[-1:] == '^':\n format = format[:-1]\n else:\n format += '\\n'\n if args:\n message = format % args\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L30_C4", "label": "if", "type": "if", "loc": [30, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L29_C0", "vector": [4, 1, 0.0498, 0.0063, 1, 0.75, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if format[-1:] == '^':\n format = format[:-1]\n else:\n format += '\\n'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L31_C8", "label": "format =", "type": "assigned_variable", "loc": [31, 31], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L30_C4", "vector": [14, 2, 0.0491, 0.0016, 2, 0.34, 0.0, 293, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "format", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " format = format[:-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L34_C4", "label": "if", "type": "if", "loc": [34, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L29_C0", "vector": [4, 1, 0.0562, 0.0063, 1, 0.75, 0.5, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if args:\n message = format % args\n else:\n message = format"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L35_C8", "label": "message =", "type": "assigned_variable", "loc": [35, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L34_C4", "vector": [14, 2, 0.0554, 0.0016, 2, 0.75, 0.0, 635, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "message", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " message = format % args"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L37_C8", "label": "message =", "type": "assigned_variable", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L34_C4", "vector": [14, 2, 0.0585, 0.0016, 2, 0.75, 1.0, 635, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "message", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " message = format"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L38_C4", "label": "write()", "type": "expression", "loc": [38, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L29_C0", "vector": [8, 1, 0.0601, 0.0016, 1, 0.75, 1.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " stream.write(message)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L40_C0", "label": "Error", "type": "class", "loc": [40, 41], "level": 0, "parent": null, "vector": [3, 0, 0.0641, 0.0032, 0, 0.66, 0.6, 529, 0, 0, 0, 0, 645, 0, 0], "semantic": {"name": "Error", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Error(Exception):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L44_C0", "label": "Bundle", "type": "class", "loc": [44, 52], "level": 0, "parent": null, "vector": [3, 0, 0.0759, 0.0142, 0, 0.66, 0.65, 478, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "Bundle", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Bundle:\n \"\"\"Wrap the source, destination and backup paths in one neat little class.\n Used by CheetahWrapper.getBundles().\n \"\"\"\n def __init__(self, **kw):\n self.__dict__.update(kw)\n\n def __repr__(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L45_C4", "label": "expression", "type": "expression", "loc": [45, 47], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L44_C0", "vector": [8, 1, 0.0728, 0.0047, 1, 0.5, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Wrap the source, destination and backup paths in one neat little class.\n Used by CheetahWrapper.getBundles().\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L48_C4", "label": "__init__", "type": "function", "loc": [48, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L44_C0", "vector": [2, 1, 0.0767, 0.0032, 1, 0.5, 0.5, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "kw"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, **kw):\n self.__dict__.update(kw)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L49_C8", "label": "update()", "type": "expression", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L48_C4", "vector": [8, 2, 0.0775, 0.0016, 2, 0.44, 0.0, 637, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": " self.__dict__.update(kw)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L51_C4", "label": "__repr__", "type": "function", "loc": [51, 52], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L44_C0", "vector": [2, 1, 0.0815, 0.0032, 1, 0.5, 1.0, 204, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__repr__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __repr__(self):\n return \"<Bundle %r>\" % self.__dict__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L52_C8", "label": "return", "type": "return", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L51_C4", "vector": [13, 2, 0.0823, 0.0016, 2, 0.0, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return \"<Bundle %r>\" % self.__dict__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L58_C0", "label": "usage", "type": "function", "loc": [58, 68], "level": 0, "parent": null, "vector": [2, 0, 0.0997, 0.0174, 0, 0.66, 0.7, 129, 0, 3, 0, 0, 0, 0, 5], "semantic": {"name": "usage", "arg_names": ["usageMessage", "errorMessage", "out"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def usage(usageMessage, errorMessage=\"\", out=sys.stderr):\n \"\"\"Write help text, an optional error message, and abort the program.\n \"\"\"\n out.write(WRAPPER_TOP)\n out.write(usageMessage)\n exitStatus = 0\n if errorMessage:\n out.write('\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L59_C4", "label": "expression", "type": "expression", "loc": [59, 60], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L58_C0", "vector": [8, 1, 0.0941, 0.0032, 1, 0.01, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Write help text, an optional error message, and abort the program.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L61_C4", "label": "write()", "type": "expression", "loc": [61, 61], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L58_C0", "vector": [8, 1, 0.0965, 0.0016, 1, 0.01, 0.2, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " out.write(WRAPPER_TOP)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L62_C4", "label": "write()", "type": "expression", "loc": [62, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L58_C0", "vector": [8, 1, 0.0981, 0.0016, 1, 0.01, 0.4, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " out.write(usageMessage)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L63_C4", "label": "exitStatus =", "type": "assigned_variable", "loc": [63, 63], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L58_C0", "vector": [14, 1, 0.0997, 0.0016, 1, 0.01, 0.6, 556, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "exitStatus", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " exitStatus = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L64_C4", "label": "if", "type": "if", "loc": [64, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L58_C0", "vector": [4, 1, 0.1036, 0.0063, 1, 0.01, 0.8, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if errorMessage:\n out.write('\\n')\n out.write(\"*** USAGE ERROR ***: %s\\n\" % errorMessage)\n exitStatus = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L65_C8", "label": "write()", "type": "expression", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L64_C4", "vector": [8, 2, 0.1028, 0.0016, 2, 0.0, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " out.write('\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L66_C8", "label": "write()", "type": "expression", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L64_C4", "vector": [8, 2, 0.1044, 0.0016, 2, 0.0, 0.5, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " out.write(\"*** USAGE ERROR ***: %s\\n\" % errorMessage)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L67_C8", "label": "exitStatus =", "type": "assigned_variable", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L64_C4", "vector": [14, 2, 0.106, 0.0016, 2, 0.0, 1.0, 556, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "exitStatus", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " exitStatus = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L68_C4", "label": "exit()", "type": "expression", "loc": [68, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L58_C0", "vector": [8, 1, 0.1076, 0.0016, 1, 0.01, 1.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(exitStatus)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L71_C0", "label": "WRAPPER_TOP =", "type": "assigned_variable", "loc": [71, 79], "level": 0, "parent": null, "vector": [14, 0, 0.1187, 0.0142, 0, 0.66, 0.75, 613, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "WRAPPER_TOP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "WRAPPER_TOP = \"\"\"\\\n __ ____________ __\n \\ \\/ \\/ /\n \\/ * * \\/ CHEETAH %(Version)s Command-Line Tool\n \\ | / \n \\ ==----== / by Tavis Rudd <tavis@damnsimple.com>\n \\__________/ and Mike Orr <sluggoster@gmail.com>\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L82_C0", "label": "HELP_PAGE1 =", "type": "assigned_variable", "loc": [82, 96], "level": 0, "parent": null, "vector": [14, 0, 0.1408, 0.0237, 0, 0.66, 0.8, 13, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "HELP_PAGE1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "HELP_PAGE1 = \"\"\"\\\nUSAGE:\n------\n cheetah compile [options] [FILES ...] : Compile template definitions\n cheetah fill [options] [FILES ...] : Fill template definitions\n cheetah help : Print this help message\n cheetah options : Print options help message\n cheetah test [options] : Run Cheetah's regression tests"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "label": "CheetahWrapper", "type": "class", "loc": [101, 615], "level": 0, "parent": null, "vector": [3, 0, 0.5665, 0.8149, 0, 0.66, 0.85, 425, 0, 25, 0, 0, 186, 0, 99], "semantic": {"name": "CheetahWrapper", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CheetahWrapper(object):\n MAKE_BACKUPS = True\n BACKUP_SUFFIX = \".bak\"\n _templateClass = None\n _compilerSettings = None \n\n def __init__(self):\n self.progName = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L102_C4", "label": "MAKE_BACKUPS =", "type": "assigned_variable", "loc": [102, 102], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [14, 1, 0.1614, 0.0016, 1, 0.74, 0.0, 770, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "MAKE_BACKUPS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " MAKE_BACKUPS = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L103_C4", "label": "BACKUP_SUFFIX =", "type": "assigned_variable", "loc": [103, 103], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [14, 1, 0.163, 0.0016, 1, 0.74, 0.0385, 288, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "BACKUP_SUFFIX", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " BACKUP_SUFFIX = \".bak\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L104_C4", "label": "_templateClass =", "type": "assigned_variable", "loc": [104, 104], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [14, 1, 0.1646, 0.0016, 1, 0.74, 0.0769, 615, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "_templateClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _templateClass = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L105_C4", "label": "_compilerSettings =", "type": "assigned_variable", "loc": [105, 105], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [14, 1, 0.1661, 0.0016, 1, 0.74, 0.1154, 364, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "_compilerSettings", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _compilerSettings = None "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L107_C4", "label": "__init__", "type": "function", "loc": [107, 114], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.1748, 0.0127, 1, 0.74, 0.1538, 555, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self):\n self.progName = None\n self.command = None\n self.opts = None\n self.pathArgs = None\n self.sourceFiles = []\n self.searchList = []\n self.parser = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L108_C8", "label": "self.progName =", "type": "assigned_variable", "loc": [108, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L107_C4", "vector": [14, 2, 0.1709, 0.0016, 2, 0.25, 0.0, 624, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.progName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.progName = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L109_C8", "label": "self.command =", "type": "assigned_variable", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L107_C4", "vector": [14, 2, 0.1725, 0.0016, 2, 0.25, 0.1667, 309, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.command", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.command = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L110_C8", "label": "self.opts =", "type": "assigned_variable", "loc": [110, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L107_C4", "vector": [14, 2, 0.1741, 0.0016, 2, 0.25, 0.3333, 26, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.opts", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.opts = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L111_C8", "label": "self.pathArgs =", "type": "assigned_variable", "loc": [111, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L107_C4", "vector": [14, 2, 0.1756, 0.0016, 2, 0.25, 0.5, 20, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.pathArgs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.pathArgs = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L112_C8", "label": "self.sourceFiles =", "type": "assigned_variable", "loc": [112, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L107_C4", "vector": [14, 2, 0.1772, 0.0016, 2, 0.25, 0.6667, 641, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.sourceFiles", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.sourceFiles = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L113_C8", "label": "self.searchList =", "type": "assigned_variable", "loc": [113, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L107_C4", "vector": [14, 2, 0.1788, 0.0016, 2, 0.25, 0.8333, 520, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.searchList", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.searchList = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L114_C8", "label": "self.parser =", "type": "assigned_variable", "loc": [114, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L107_C4", "vector": [14, 2, 0.1804, 0.0016, 2, 0.25, 1.0, 980, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.parser", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.parser = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L119_C4", "label": "main", "type": "function", "loc": [119, 151], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.2136, 0.0522, 1, 0.74, 0.1923, 624, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "main", "arg_names": ["self", "argv"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def main(self, argv=None):\n \"\"\"The main program controller.\"\"\"\n\n if argv is None:\n argv = sys.argv\n\n # Step 1: Determine the command and arguments.\n try:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L120_C8", "label": "expression", "type": "expression", "loc": [120, 120], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L119_C4", "vector": [8, 2, 0.1899, 0.0016, 2, 0.93, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"The main program controller.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L122_C8", "label": "if", "type": "if", "loc": [122, 123], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L119_C4", "vector": [4, 2, 0.1938, 0.0032, 2, 0.93, 0.2, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if argv is None:\n argv = sys.argv"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L123_C12", "label": "argv =", "type": "assigned_variable", "loc": [123, 123], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L122_C8", "vector": [14, 3, 0.1946, 0.0016, 3, 0.76, 0.0, 612, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "argv", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " argv = sys.argv"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L126_C8", "label": "try", "type": "try", "loc": [126, 134], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L119_C4", "vector": [7, 2, 0.2057, 0.0142, 2, 0.93, 0.4, 0, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n self.progName = progName = os.path.basename(argv[0])\n self.command = command = optionDashesRE.sub(\"\", argv[1])\n if command == 'test':\n self.testOpts = argv[2:]\n else:\n self.parseOpts(argv[2:])\n except IndexError:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L127_C12", "label": "self.progName = basename()", "type": "assigned_variable", "loc": [127, 127], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L126_C8", "vector": [14, 3, 0.2009, 0.0016, 3, 0.63, 0.0, 624, 3, 1, 0, 0, 164, 10, 1], "semantic": {"name": "self.progName", "arg_names": [], "import_names": [], "rhs_call_name": "basename", "annotation": ""}, "snippet": " self.progName = progName = os.path.basename(argv[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L128_C12", "label": "self.command = sub()", "type": "assigned_variable", "loc": [128, 128], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L126_C8", "vector": [14, 3, 0.2025, 0.0016, 3, 0.63, 0.5, 309, 3, 2, 0, 0, 819, 10, 1], "semantic": {"name": "self.command", "arg_names": [], "import_names": [], "rhs_call_name": "sub", "annotation": ""}, "snippet": " self.command = command = optionDashesRE.sub(\"\", argv[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L129_C12", "label": "if", "type": "if", "loc": [129, 132], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L126_C8", "vector": [4, 3, 0.2065, 0.0063, 3, 0.63, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if command == 'test':\n self.testOpts = argv[2:]\n else:\n self.parseOpts(argv[2:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L130_C16", "label": "self.testOpts =", "type": "assigned_variable", "loc": [130, 130], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L129_C12", "vector": [14, 4, 0.2057, 0.0016, 4, 0.03, 0.0, 808, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.testOpts", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.testOpts = argv[2:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L132_C16", "label": "parseOpts()", "type": "expression", "loc": [132, 132], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L129_C12", "vector": [8, 4, 0.2089, 0.0016, 4, 0.03, 1.0, 465, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "parseOpts", "arg_names": [], "import_names": [], "rhs_call_name": "parseOpts", "annotation": ""}, "snippet": " self.parseOpts(argv[2:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L134_C12", "label": "usage()", "type": "expression", "loc": [134, 134], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L126_C8", "vector": [8, 3, 0.212, 0.0016, 3, 0.63, 0.0, 129, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "usage", "arg_names": [], "import_names": [], "rhs_call_name": "usage", "annotation": ""}, "snippet": " usage(HELP_PAGE1, \"not enough command-line arguments\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L137_C8", "label": "meths =", "type": "assigned_variable", "loc": [137, 138], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L119_C4", "vector": [14, 2, 0.2176, 0.0032, 2, 0.93, 0.6, 867, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "meths", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " meths = (self.compile, self.fill, self.help, self.options,\n self.test, self.version)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L139_C8", "label": "for meth", "type": "for", "loc": [139, 149], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L119_C4", "vector": [6, 2, 0.2278, 0.0174, 2, 0.93, 0.8, 110, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "meth", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for meth in meths:\n methName = meth.__name__\n # Or meth.im_func.func_name\n # Or meth.func_name (Python >= 2.1 only, sometimes works on 2.0)\n methInitial = methName[0]\n if command in (methName, methInitial):\n sys.argv[0] += (\" \" + methName)\n # @@MO: I don't necessarily agree sys.argv[0] should be "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L140_C12", "label": "methName =", "type": "assigned_variable", "loc": [140, 140], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L139_C8", "vector": [14, 3, 0.2215, 0.0016, 3, 0.88, 0.0, 74, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "methName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " methName = meth.__name__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L143_C12", "label": "methInitial =", "type": "assigned_variable", "loc": [143, 143], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L139_C8", "vector": [14, 3, 0.2263, 0.0016, 3, 0.88, 0.5, 524, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "methInitial", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " methInitial = methName[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L144_C12", "label": "if", "type": "if", "loc": [144, 149], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L139_C8", "vector": [4, 3, 0.2318, 0.0095, 3, 0.88, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if command in (methName, methInitial):\n sys.argv[0] += (\" \" + methName)\n # @@MO: I don't necessarily agree sys.argv[0] should be \n # modified.\n meth()\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L148_C16", "label": "meth()", "type": "expression", "loc": [148, 148], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L144_C12", "vector": [8, 4, 0.2342, 0.0016, 4, 0.05, 0.0, 110, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "meth", "arg_names": [], "import_names": [], "rhs_call_name": "meth", "annotation": ""}, "snippet": " meth()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L149_C16", "label": "return", "type": "return", "loc": [149, 149], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L144_C12", "vector": [13, 4, 0.2358, 0.0016, 4, 0.05, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L151_C8", "label": "usage()", "type": "expression", "loc": [151, 151], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L119_C4", "vector": [8, 2, 0.2389, 0.0016, 2, 0.93, 1.0, 129, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "usage", "arg_names": [], "import_names": [], "rhs_call_name": "usage", "annotation": ""}, "snippet": " usage(HELP_PAGE1, \"unknown command '%s'\" % command)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "label": "parseOpts", "type": "function", "loc": [153, 225], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.2991, 0.1155, 1, 0.74, 0.2308, 465, 0, 2, 0, 0, 0, 0, 41], "semantic": {"name": "parseOpts", "arg_names": ["self", "args"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def parseOpts(self, args):\n C, D, W = self.chatter, self.debug, self.warn\n self.isCompile = isCompile = self.command[0] == 'c'\n defaultOext = isCompile and \".py\" or \".html\"\n self.parser = OptionParser()\n pao = self.parser.add_option\n pao(\"--idir\", action=\"store\", dest=\"idir\", default='', help='Input directory (defaults to current directory)')\n pao(\"--odir\", action=\"store\", dest=\"odir\", default=\"\", help='Output directory (defaults to current directory)')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L154_C8", "label": "C, D, W =", "type": "assigned_variable", "loc": [154, 154], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [14, 2, 0.2437, 0.0016, 2, 0.29, 0.0, 533, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "C, D, W", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " C, D, W = self.chatter, self.debug, self.warn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L155_C8", "label": "self.isCompile =", "type": "assigned_variable", "loc": [155, 155], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [14, 2, 0.2453, 0.0016, 2, 0.29, 0.0312, 184, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.isCompile", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.isCompile = isCompile = self.command[0] == 'c'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L156_C8", "label": "defaultOext =", "type": "assigned_variable", "loc": [156, 156], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [14, 2, 0.2468, 0.0016, 2, 0.29, 0.0625, 63, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "defaultOext", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " defaultOext = isCompile and \".py\" or \".html\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L157_C8", "label": "self.parser = OptionParser()", "type": "assigned_variable", "loc": [157, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [14, 2, 0.2484, 0.0016, 2, 0.29, 0.0938, 980, 3, 0, 0, 0, 894, 10, 1], "semantic": {"name": "self.parser", "arg_names": [], "import_names": [], "rhs_call_name": "OptionParser", "annotation": ""}, "snippet": " self.parser = OptionParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L158_C8", "label": "pao =", "type": "assigned_variable", "loc": [158, 158], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [14, 2, 0.25, 0.0016, 2, 0.29, 0.125, 748, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pao = self.parser.add_option"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L159_C8", "label": "pao()", "type": "expression", "loc": [159, 159], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.2516, 0.0016, 2, 0.29, 0.1562, 748, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao(\"--idir\", action=\"store\", dest=\"idir\", default='', help='Input directory (defaults to current directory)')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L160_C8", "label": "pao()", "type": "expression", "loc": [160, 160], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.2532, 0.0016, 2, 0.29, 0.1875, 748, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao(\"--odir\", action=\"store\", dest=\"odir\", default=\"\", help='Output directory (defaults to current directory)')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L161_C8", "label": "pao()", "type": "expression", "loc": [161, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.2547, 0.0016, 2, 0.29, 0.2188, 748, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao(\"--iext\", action=\"store\", dest=\"iext\", default=\".tmpl\", help='File input extension (defaults: compile: .tmpl, fill: .tmpl)')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L162_C8", "label": "pao()", "type": "expression", "loc": [162, 162], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.2563, 0.0016, 2, 0.29, 0.25, 748, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao(\"--oext\", action=\"store\", dest=\"oext\", default=defaultOext, help='File output extension (defaults: compile: .py, fill: .html)')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L163_C8", "label": "pao()", "type": "expression", "loc": [163, 163], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.2579, 0.0016, 2, 0.29, 0.2812, 748, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao(\"-R\", action=\"store_true\", dest=\"recurse\", default=False, help='Recurse through subdirectories looking for input files')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L164_C8", "label": "pao()", "type": "expression", "loc": [164, 164], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.2595, 0.0016, 2, 0.29, 0.3125, 748, 3, 6, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao(\"--stdout\", \"-p\", action=\"store_true\", dest=\"stdout\", default=False, help='Send output to stdout instead of writing to a file')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L165_C8", "label": "pao()", "type": "expression", "loc": [165, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.2611, 0.0016, 2, 0.29, 0.3438, 748, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao(\"--quiet\", action=\"store_false\", dest=\"verbose\", default=True, help='Do not print informational messages to stdout')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L166_C8", "label": "pao()", "type": "expression", "loc": [166, 166], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.2627, 0.0016, 2, 0.29, 0.375, 748, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao(\"--debug\", action=\"store_true\", dest=\"debug\", default=False, help='Print diagnostic/debug information to stderr')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L167_C8", "label": "pao()", "type": "expression", "loc": [167, 167], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.2642, 0.0016, 2, 0.29, 0.4062, 748, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao(\"--env\", action=\"store_true\", dest=\"env\", default=False, help='Pass the environment into the search list')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L168_C8", "label": "pao()", "type": "expression", "loc": [168, 168], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.2658, 0.0016, 2, 0.29, 0.4375, 748, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao(\"--pickle\", action=\"store\", dest=\"pickle\", default=\"\", help='Unpickle FILE and pass it through in the search list')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L169_C8", "label": "pao()", "type": "expression", "loc": [169, 169], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.2674, 0.0016, 2, 0.29, 0.4688, 748, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao(\"--flat\", action=\"store_true\", dest=\"flat\", default=False, help='Do not build destination subdirectories')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L170_C8", "label": "pao()", "type": "expression", "loc": [170, 170], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.269, 0.0016, 2, 0.29, 0.5, 748, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao(\"--nobackup\", action=\"store_true\", dest=\"nobackup\", default=False, help='Do not make backup files when generating new ones')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L171_C8", "label": "pao()", "type": "expression", "loc": [171, 171], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.2706, 0.0016, 2, 0.29, 0.5312, 748, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao(\"--settings\", action=\"store\", dest=\"compilerSettingsString\", default=None, help='String of compiler settings to pass through, e.g. --settings=\"useNameMapper=False,useFilters=False\"')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L172_C8", "label": "pao()", "type": "expression", "loc": [172, 172], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.2722, 0.0016, 2, 0.29, 0.5625, 748, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao('--print-settings', action='store_true', dest='print_settings', help='Print out the list of available compiler settings')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L173_C8", "label": "pao()", "type": "expression", "loc": [173, 173], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.2737, 0.0016, 2, 0.29, 0.5938, 748, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao(\"--templateAPIClass\", action=\"store\", dest=\"templateClassName\", default=None, help='Name of a subclass of Cheetah.Template.Template to use for compilation, e.g. MyTemplateClass')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L174_C8", "label": "pao()", "type": "expression", "loc": [174, 174], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.2753, 0.0016, 2, 0.29, 0.625, 748, 3, 6, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao(\"--parallel\", action=\"store\", type=\"int\", dest=\"parallel\", default=1, help='Compile/fill templates in parallel, e.g. --parallel=4')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L175_C8", "label": "pao()", "type": "expression", "loc": [175, 175], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.2769, 0.0016, 2, 0.29, 0.6562, 748, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "pao", "arg_names": [], "import_names": [], "rhs_call_name": "pao", "annotation": ""}, "snippet": " pao('--shbang', dest='shbang', default='#!/usr/bin/env python', help='Specify the shbang to place at the top of compiled templates, e.g. --shbang=\"#!/usr/bin/python2.6\"')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L177_C8", "label": "opts, files = parse_args()", "type": "assigned_variable", "loc": [177, 177], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [14, 2, 0.2801, 0.0016, 2, 0.29, 0.6875, 463, 3, 1, 0, 0, 187, 10, 1], "semantic": {"name": "opts, files", "arg_names": [], "import_names": [], "rhs_call_name": "parse_args", "annotation": ""}, "snippet": " opts, files = self.parser.parse_args(args)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L178_C8", "label": "self.opts =", "type": "assigned_variable", "loc": [178, 178], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [14, 2, 0.2816, 0.0016, 2, 0.29, 0.7188, 26, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.opts", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.opts = opts"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L179_C8", "label": "if", "type": "if", "loc": [179, 187], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [4, 2, 0.2896, 0.0142, 2, 0.29, 0.75, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if sys.platform == \"win32\":\n new_files = []\n for spec in files:\n file_list = glob.glob(spec)\n if file_list:\n new_files.extend(file_list)\n else:\n new_files.append(spec)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L180_C12", "label": "new_files =", "type": "assigned_variable", "loc": [180, 180], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L179_C8", "vector": [14, 3, 0.2848, 0.0016, 3, 0.78, 0.0, 359, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "new_files", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " new_files = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L181_C12", "label": "for spec", "type": "for", "loc": [181, 186], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L179_C8", "vector": [6, 3, 0.2903, 0.0095, 3, 0.78, 0.5, 271, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "spec", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for spec in files:\n file_list = glob.glob(spec)\n if file_list:\n new_files.extend(file_list)\n else:\n new_files.append(spec)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L182_C16", "label": "file_list = glob()", "type": "assigned_variable", "loc": [182, 182], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L181_C12", "vector": [14, 4, 0.288, 0.0016, 4, 0.78, 0.0, 105, 3, 1, 0, 0, 958, 10, 1], "semantic": {"name": "file_list", "arg_names": [], "import_names": [], "rhs_call_name": "glob", "annotation": ""}, "snippet": " file_list = glob.glob(spec)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L183_C16", "label": "if", "type": "if", "loc": [183, 186], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L181_C12", "vector": [4, 4, 0.2919, 0.0063, 4, 0.78, 1.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if file_list:\n new_files.extend(file_list)\n else:\n new_files.append(spec)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L184_C20", "label": "extend()", "type": "expression", "loc": [184, 184], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L183_C16", "vector": [8, 5, 0.2911, 0.0016, 5, 0.7, 0.0, 660, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "extend", "arg_names": [], "import_names": [], "rhs_call_name": "extend", "annotation": ""}, "snippet": " new_files.extend(file_list)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L186_C20", "label": "append()", "type": "expression", "loc": [186, 186], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L183_C16", "vector": [8, 5, 0.2943, 0.0016, 5, 0.7, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " new_files.append(spec)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L187_C12", "label": "files =", "type": "assigned_variable", "loc": [187, 187], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L179_C8", "vector": [14, 3, 0.2959, 0.0016, 3, 0.78, 1.0, 598, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "files", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " files = new_files"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L188_C8", "label": "self.pathArgs =", "type": "assigned_variable", "loc": [188, 188], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [14, 2, 0.2975, 0.0016, 2, 0.29, 0.7812, 20, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.pathArgs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.pathArgs = files"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L190_C8", "label": "D()", "type": "expression", "loc": [190, 194], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.3038, 0.0079, 2, 0.29, 0.8125, 939, 3, 4, 0, 0, 0, 0, 3], "semantic": {"name": "D", "arg_names": [], "import_names": [], "rhs_call_name": "D", "annotation": ""}, "snippet": " D(\"\"\"\\\ncheetah compile %s\nOptions are\n%s\nFiles are %s\"\"\", args, pprint.pformat(vars(opts)), files)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L197_C8", "label": "if", "type": "if", "loc": [197, 206], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [4, 2, 0.3188, 0.0158, 2, 0.29, 0.8438, 0, 7, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if opts.print_settings:\n print() \n print('>> Available Cheetah compiler settings:')\n from Cheetah.Compiler import _DEFAULT_COMPILER_SETTINGS\n listing = _DEFAULT_COMPILER_SETTINGS\n listing.sort(key=lambda l: l[0][0].lower())\n\n for l in listing:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L198_C12", "label": "print()", "type": "expression", "loc": [198, 198], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L197_C8", "vector": [8, 3, 0.3133, 0.0016, 3, 0.03, 0.0, 535, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L199_C12", "label": "print()", "type": "expression", "loc": [199, 199], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L197_C8", "vector": [8, 3, 0.3149, 0.0016, 3, 0.03, 0.1667, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('>> Available Cheetah compiler settings:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:ImportFrom_L200_C12", "label": "from Cheetah.Compiler import _DEFAULT_COMPILER_SETTINGS", "type": "import", "loc": [200, 200], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L197_C8", "vector": [1, 3, 0.3165, 0.0016, 3, 0.03, 0.3333, 811, 0, 1, 0, 0, 811, 0, 0], "semantic": {"name": "Cheetah.Compiler", "arg_names": [], "import_names": ["_DEFAULT_COMPILER_SETTINGS"], "rhs_call_name": "", "annotation": ""}, "snippet": " from Cheetah.Compiler import _DEFAULT_COMPILER_SETTINGS"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L201_C12", "label": "listing =", "type": "assigned_variable", "loc": [201, 201], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L197_C8", "vector": [14, 3, 0.318, 0.0016, 3, 0.03, 0.5, 760, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "listing", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " listing = _DEFAULT_COMPILER_SETTINGS"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L202_C12", "label": "sort()", "type": "expression", "loc": [202, 202], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L197_C8", "vector": [8, 3, 0.3196, 0.0016, 3, 0.03, 0.6667, 489, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "sort", "arg_names": [], "import_names": [], "rhs_call_name": "sort", "annotation": ""}, "snippet": " listing.sort(key=lambda l: l[0][0].lower())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L204_C12", "label": "for l", "type": "for", "loc": [204, 205], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L197_C8", "vector": [6, 3, 0.3236, 0.0032, 3, 0.03, 0.8333, 810, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "l", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for l in listing:\n print('\\t%s (default: \"%s\")\\t%s' % l)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L205_C16", "label": "print()", "type": "expression", "loc": [205, 205], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L204_C12", "vector": [8, 4, 0.3244, 0.0016, 4, 0.89, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('\\t%s (default: \"%s\")\\t%s' % l)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L206_C12", "label": "exit()", "type": "expression", "loc": [206, 206], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L197_C8", "vector": [8, 3, 0.3259, 0.0016, 3, 0.03, 1.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L209_C8", "label": "seps =", "type": "assigned_variable", "loc": [209, 209], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [14, 2, 0.3307, 0.0016, 2, 0.29, 0.875, 488, 5, 0, 0, 0, 0, 0, 0], "semantic": {"name": "seps", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " seps = [sep for sep in [os.sep, os.altsep] if sep]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L210_C8", "label": "for attr", "type": "for", "loc": [210, 216], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [6, 2, 0.337, 0.0111, 2, 0.29, 0.9062, 400, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "attr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for attr in ['idir', 'odir']:\n for sep in seps:\n path = getattr(opts, attr, None)\n if path and path.endswith(sep):\n path = path[:-len(sep)]\n setattr(opts, attr, path)\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L211_C12", "label": "for sep", "type": "for", "loc": [211, 216], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L210_C8", "vector": [6, 3, 0.3378, 0.0095, 3, 0.22, 0.0, 820, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "sep", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for sep in seps:\n path = getattr(opts, attr, None)\n if path and path.endswith(sep):\n path = path[:-len(sep)]\n setattr(opts, attr, path)\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L212_C16", "label": "path = getattr()", "type": "assigned_variable", "loc": [212, 212], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L211_C12", "vector": [14, 4, 0.3354, 0.0016, 4, 0.29, 0.0, 358, 3, 3, 0, 0, 121, 10, 1], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " path = getattr(opts, attr, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L213_C16", "label": "if", "type": "if", "loc": [213, 216], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L211_C12", "vector": [4, 4, 0.3394, 0.0063, 4, 0.29, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if path and path.endswith(sep):\n path = path[:-len(sep)]\n setattr(opts, attr, path)\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L214_C20", "label": "path =", "type": "assigned_variable", "loc": [214, 214], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L213_C16", "vector": [14, 5, 0.3386, 0.0016, 5, 0.82, 0.0, 358, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = path[:-len(sep)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L215_C20", "label": "setattr()", "type": "expression", "loc": [215, 215], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L213_C16", "vector": [8, 5, 0.3402, 0.0016, 5, 0.82, 1.0, 501, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setattr", "arg_names": [], "import_names": [], "rhs_call_name": "setattr", "annotation": ""}, "snippet": " setattr(opts, attr, path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L218_C8", "label": "_fixExts()", "type": "expression", "loc": [218, 218], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [8, 2, 0.3449, 0.0016, 2, 0.29, 0.9375, 978, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_fixExts", "arg_names": [], "import_names": [], "rhs_call_name": "_fixExts", "annotation": ""}, "snippet": " self._fixExts()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L219_C8", "label": "if", "type": "if", "loc": [219, 220], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [4, 2, 0.3473, 0.0032, 2, 0.29, 0.9688, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if opts.env:\n self.searchList.insert(0, os.environ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L220_C12", "label": "insert()", "type": "expression", "loc": [220, 220], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L219_C8", "vector": [8, 3, 0.3481, 0.0016, 3, 0.65, 0.0, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.searchList.insert(0, os.environ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L221_C8", "label": "if", "type": "if", "loc": [221, 225], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "vector": [4, 2, 0.3528, 0.0079, 2, 0.29, 1.0, 0, 7, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if opts.pickle:\n f = open(opts.pickle, 'rb')\n unpickled = pickle.load(f)\n f.close()\n self.searchList.insert(0, unpickled)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L222_C12", "label": "f = open()", "type": "assigned_variable", "loc": [222, 222], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L221_C8", "vector": [14, 3, 0.3513, 0.0016, 3, 0.26, 0.0, 899, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " f = open(opts.pickle, 'rb')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L223_C12", "label": "unpickled = load()", "type": "assigned_variable", "loc": [223, 223], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L221_C8", "vector": [14, 3, 0.3528, 0.0016, 3, 0.26, 0.3333, 801, 3, 1, 0, 0, 37, 10, 1], "semantic": {"name": "unpickled", "arg_names": [], "import_names": [], "rhs_call_name": "load", "annotation": ""}, "snippet": " unpickled = pickle.load(f)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L224_C12", "label": "close()", "type": "expression", "loc": [224, 224], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L221_C8", "vector": [8, 3, 0.3544, 0.0016, 3, 0.26, 0.6667, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " f.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L225_C12", "label": "insert()", "type": "expression", "loc": [225, 225], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L221_C8", "vector": [8, 3, 0.356, 0.0016, 3, 0.26, 1.0, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.searchList.insert(0, unpickled)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L230_C4", "label": "compile", "type": "function", "loc": [230, 231], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.3647, 0.0032, 1, 0.74, 0.2692, 821, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "compile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def compile(self):\n self._compileOrFill()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L231_C8", "label": "_compileOrFill()", "type": "expression", "loc": [231, 231], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L230_C4", "vector": [8, 2, 0.3655, 0.0016, 2, 0.5, 0.0, 874, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_compileOrFill", "arg_names": [], "import_names": [], "rhs_call_name": "_compileOrFill", "annotation": ""}, "snippet": " self._compileOrFill()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L233_C4", "label": "fill", "type": "function", "loc": [233, 236], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.371, 0.0063, 1, 0.74, 0.3077, 346, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "fill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def fill(self):\n from Cheetah.ImportHooks import install\n install() \n self._compileOrFill()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:ImportFrom_L234_C8", "label": "from Cheetah.ImportHooks import install", "type": "import", "loc": [234, 234], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L233_C4", "vector": [1, 2, 0.3703, 0.0016, 2, 0.44, 0.0, 582, 0, 1, 0, 0, 582, 0, 0], "semantic": {"name": "Cheetah.ImportHooks", "arg_names": [], "import_names": ["install"], "rhs_call_name": "", "annotation": ""}, "snippet": " from Cheetah.ImportHooks import install"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L235_C8", "label": "install()", "type": "expression", "loc": [235, 235], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L233_C4", "vector": [8, 2, 0.3718, 0.0016, 2, 0.44, 0.5, 984, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "install", "arg_names": [], "import_names": [], "rhs_call_name": "install", "annotation": ""}, "snippet": " install() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L236_C8", "label": "_compileOrFill()", "type": "expression", "loc": [236, 236], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L233_C4", "vector": [8, 2, 0.3734, 0.0016, 2, 0.44, 1.0, 874, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_compileOrFill", "arg_names": [], "import_names": [], "rhs_call_name": "_compileOrFill", "annotation": ""}, "snippet": " self._compileOrFill()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L238_C4", "label": "help", "type": "function", "loc": [238, 239], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.3774, 0.0032, 1, 0.74, 0.3462, 868, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "help", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def help(self):\n usage(HELP_PAGE1, \"\", sys.stdout)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L239_C8", "label": "usage()", "type": "expression", "loc": [239, 239], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L238_C4", "vector": [8, 2, 0.3782, 0.0016, 2, 0.16, 0.0, 129, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "usage", "arg_names": [], "import_names": [], "rhs_call_name": "usage", "annotation": ""}, "snippet": " usage(HELP_PAGE1, \"\", sys.stdout)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L241_C4", "label": "options", "type": "function", "loc": [241, 242], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.3821, 0.0032, 1, 0.74, 0.3846, 707, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "options", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def options(self):\n return self.parser.print_help()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L242_C8", "label": "return", "type": "return", "loc": [242, 242], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L241_C4", "vector": [13, 2, 0.3829, 0.0016, 2, 0.48, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.parser.print_help()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "label": "test", "type": "function", "loc": [244, 266], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.4035, 0.0364, 1, 0.74, 0.4231, 224, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "test", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test(self):\n # @@MO: Ugly kludge.\n TEST_WRITE_FILENAME = 'cheetah_test_file_creation_ability.tmp'\n try:\n f = open(TEST_WRITE_FILENAME, 'w')\n except:\n sys.exit(\"\"\"\\\nCannot run the tests because you don't have write permission in the current"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L246_C8", "label": "TEST_WRITE_FILENAME =", "type": "assigned_variable", "loc": [246, 246], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "vector": [14, 2, 0.3892, 0.0016, 2, 0.37, 0.0, 940, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "TEST_WRITE_FILENAME", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " TEST_WRITE_FILENAME = 'cheetah_test_file_creation_ability.tmp'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L247_C8", "label": "try", "type": "try", "loc": [247, 256], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "vector": [7, 2, 0.3979, 0.0158, 2, 0.37, 0.125, 0, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n f = open(TEST_WRITE_FILENAME, 'w')\n except:\n sys.exit(\"\"\"\\\nCannot run the tests because you don't have write permission in the current\ndirectory. The tests need to create temporary files. Change to a directory\nyou do have write permission to and re-run the tests.\"\"\")\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L248_C12", "label": "f = open()", "type": "assigned_variable", "loc": [248, 248], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L247_C8", "vector": [14, 3, 0.3924, 0.0016, 3, 0.55, 0.0, 899, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " f = open(TEST_WRITE_FILENAME, 'w')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L250_C12", "label": "exit()", "type": "expression", "loc": [250, 253], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L247_C8", "vector": [8, 3, 0.3979, 0.0063, 3, 0.55, 0.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(\"\"\"\\\nCannot run the tests because you don't have write permission in the current\ndirectory. The tests need to create temporary files. Change to a directory\nyou do have write permission to and re-run the tests.\"\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L255_C12", "label": "close()", "type": "expression", "loc": [255, 255], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L247_C8", "vector": [8, 3, 0.4035, 0.0016, 3, 0.55, 0.5, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " f.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L256_C12", "label": "remove()", "type": "expression", "loc": [256, 256], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L247_C8", "vector": [8, 3, 0.4051, 0.0016, 3, 0.55, 1.0, 185, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove", "arg_names": [], "import_names": [], "rhs_call_name": "remove", "annotation": ""}, "snippet": " os.remove(TEST_WRITE_FILENAME)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:ImportFrom_L258_C8", "label": "from Cheetah.Tests import Test", "type": "import", "loc": [258, 258], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "vector": [1, 2, 0.4082, 0.0016, 2, 0.37, 0.25, 815, 0, 1, 0, 0, 815, 0, 0], "semantic": {"name": "Cheetah.Tests", "arg_names": [], "import_names": ["Test"], "rhs_call_name": "", "annotation": ""}, "snippet": " from Cheetah.Tests import Test"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Import_L259_C8", "label": "unittest import unittest", "type": "import", "loc": [259, 259], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "vector": [1, 2, 0.4098, 0.0016, 2, 0.37, 0.375, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], "rhs_call_name": "", "annotation": ""}, "snippet": " import unittest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L260_C8", "label": "verbosity =", "type": "assigned_variable", "loc": [260, 260], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "vector": [14, 2, 0.4114, 0.0016, 2, 0.37, 0.5, 582, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "verbosity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " verbosity = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L261_C8", "label": "if", "type": "if", "loc": [261, 262], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "vector": [4, 2, 0.4138, 0.0032, 2, 0.37, 0.625, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if '-q' in self.testOpts:\n verbosity = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L262_C12", "label": "verbosity =", "type": "assigned_variable", "loc": [262, 262], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L261_C8", "vector": [14, 3, 0.4146, 0.0016, 3, 0.73, 0.0, 582, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "verbosity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " verbosity = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L263_C8", "label": "if", "type": "if", "loc": [263, 264], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "vector": [4, 2, 0.4169, 0.0032, 2, 0.37, 0.75, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if '-v' in self.testOpts:\n verbosity = 2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L264_C12", "label": "verbosity =", "type": "assigned_variable", "loc": [264, 264], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L263_C8", "vector": [14, 3, 0.4177, 0.0016, 3, 0.84, 0.0, 582, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "verbosity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " verbosity = 2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L265_C8", "label": "runner = TextTestRunner()", "type": "assigned_variable", "loc": [265, 265], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "vector": [14, 2, 0.4193, 0.0016, 2, 0.37, 0.875, 180, 3, 1, 0, 0, 130, 10, 1], "semantic": {"name": "runner", "arg_names": [], "import_names": [], "rhs_call_name": "TextTestRunner", "annotation": ""}, "snippet": " runner = unittest.TextTestRunner(verbosity=verbosity)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L266_C8", "label": "run()", "type": "expression", "loc": [266, 266], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "vector": [8, 2, 0.4209, 0.0016, 2, 0.37, 1.0, 679, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "run", "arg_names": [], "import_names": [], "rhs_call_name": "run", "annotation": ""}, "snippet": " runner.run(unittest.TestSuite(Test.suites))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L268_C4", "label": "version", "type": "function", "loc": [268, 269], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.4248, 0.0032, 1, 0.74, 0.4615, 623, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "version", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def version(self):\n print(Version)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L269_C8", "label": "print()", "type": "expression", "loc": [269, 269], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L268_C4", "vector": [8, 2, 0.4256, 0.0016, 2, 0.72, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(Version)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L276_C4", "label": "chatter", "type": "function", "loc": [276, 282], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.4415, 0.0111, 1, 0.74, 0.5, 748, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "chatter", "arg_names": ["self", "format", "args"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def chatter(self, format, *args):\n \"\"\"Print a verbose message to stdout. But don't if .opts.stdout is\n true or .opts.verbose is false.\n \"\"\"\n if self.opts.stdout or not self.opts.verbose:\n return\n fprintfMessage(sys.stdout, format, *args)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L277_C8", "label": "expression", "type": "expression", "loc": [277, 279], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L276_C4", "vector": [8, 2, 0.4399, 0.0047, 2, 0.95, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Print a verbose message to stdout. But don't if .opts.stdout is\n true or .opts.verbose is false.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L280_C8", "label": "if", "type": "if", "loc": [280, 281], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L276_C4", "vector": [4, 2, 0.4438, 0.0032, 2, 0.95, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.opts.stdout or not self.opts.verbose:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L281_C12", "label": "return", "type": "return", "loc": [281, 281], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L280_C8", "vector": [13, 3, 0.4446, 0.0016, 3, 0.35, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L282_C8", "label": "fprintfMessage()", "type": "expression", "loc": [282, 282], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L276_C4", "vector": [8, 2, 0.4462, 0.0016, 2, 0.95, 1.0, 569, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "fprintfMessage", "arg_names": [], "import_names": [], "rhs_call_name": "fprintfMessage", "annotation": ""}, "snippet": " fprintfMessage(sys.stdout, format, *args)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L285_C4", "label": "debug", "type": "function", "loc": [285, 290], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.4549, 0.0095, 1, 0.74, 0.5385, 924, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "debug", "arg_names": ["self", "format", "args"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def debug(self, format, *args):\n \"\"\"Print a debugging message to stderr, but don't if .debug is\n false.\n \"\"\"\n if self.opts.debug:\n fprintfMessage(sys.stderr, format, *args)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L286_C8", "label": "expression", "type": "expression", "loc": [286, 288], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L285_C4", "vector": [8, 2, 0.4541, 0.0047, 2, 0.22, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Print a debugging message to stderr, but don't if .debug is\n false.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L289_C8", "label": "if", "type": "if", "loc": [289, 290], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L285_C4", "vector": [4, 2, 0.4581, 0.0032, 2, 0.22, 1.0, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.opts.debug:\n fprintfMessage(sys.stderr, format, *args)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L290_C12", "label": "fprintfMessage()", "type": "expression", "loc": [290, 290], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L289_C8", "vector": [8, 3, 0.4589, 0.0016, 3, 0.55, 0.0, 569, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "fprintfMessage", "arg_names": [], "import_names": [], "rhs_call_name": "fprintfMessage", "annotation": ""}, "snippet": " fprintfMessage(sys.stderr, format, *args)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L292_C4", "label": "warn", "type": "function", "loc": [292, 295], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.4644, 0.0063, 1, 0.74, 0.5769, 960, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": ["self", "format", "args"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def warn(self, format, *args):\n \"\"\"Always print a warning message to stderr.\n \"\"\"\n fprintfMessage(sys.stderr, format, *args)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L293_C8", "label": "expression", "type": "expression", "loc": [293, 294], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L292_C4", "vector": [8, 2, 0.4644, 0.0032, 2, 0.25, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Always print a warning message to stderr.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L295_C8", "label": "fprintfMessage()", "type": "expression", "loc": [295, 295], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L292_C4", "vector": [8, 2, 0.4668, 0.0016, 2, 0.25, 1.0, 569, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "fprintfMessage", "arg_names": [], "import_names": [], "rhs_call_name": "fprintfMessage", "annotation": ""}, "snippet": " fprintfMessage(sys.stderr, format, *args)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L297_C4", "label": "error", "type": "function", "loc": [297, 301], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.4731, 0.0079, 1, 0.74, 0.6154, 771, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "error", "arg_names": ["self", "format", "args"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def error(self, format, *args):\n \"\"\"Always print a warning message to stderr and exit with an error code. \n \"\"\"\n fprintfMessage(sys.stderr, format, *args)\n sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L298_C8", "label": "expression", "type": "expression", "loc": [298, 299], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L297_C4", "vector": [8, 2, 0.4723, 0.0032, 2, 0.11, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Always print a warning message to stderr and exit with an error code. \n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L300_C8", "label": "fprintfMessage()", "type": "expression", "loc": [300, 300], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L297_C4", "vector": [8, 2, 0.4747, 0.0016, 2, 0.11, 0.5, 569, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "fprintfMessage", "arg_names": [], "import_names": [], "rhs_call_name": "fprintfMessage", "annotation": ""}, "snippet": " fprintfMessage(sys.stderr, format, *args)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L301_C8", "label": "exit()", "type": "expression", "loc": [301, 301], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L297_C4", "vector": [8, 2, 0.4763, 0.0016, 2, 0.11, 1.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L307_C4", "label": "_fixExts", "type": "function", "loc": [307, 313], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.4905, 0.0111, 1, 0.74, 0.6538, 978, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "_fixExts", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _fixExts(self):\n assert self.opts.oext, \"oext is empty!\"\n iext, oext = self.opts.iext, self.opts.oext\n if iext and not iext.startswith(\".\"):\n self.opts.iext = \".\" + iext\n if oext and not oext.startswith(\".\"):\n self.opts.oext = \".\" + oext"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L309_C8", "label": "iext, oext =", "type": "assigned_variable", "loc": [309, 309], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L307_C4", "vector": [14, 2, 0.4889, 0.0016, 2, 0.8, 0.0, 390, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "iext, oext", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " iext, oext = self.opts.iext, self.opts.oext"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L310_C8", "label": "if", "type": "if", "loc": [310, 311], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L307_C4", "vector": [4, 2, 0.4913, 0.0032, 2, 0.8, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if iext and not iext.startswith(\".\"):\n self.opts.iext = \".\" + iext"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L311_C12", "label": "self.opts.iext =", "type": "assigned_variable", "loc": [311, 311], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L310_C8", "vector": [14, 3, 0.4921, 0.0016, 3, 0.14, 0.0, 671, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.opts.iext", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.opts.iext = \".\" + iext"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L312_C8", "label": "if", "type": "if", "loc": [312, 313], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L307_C4", "vector": [4, 2, 0.4945, 0.0032, 2, 0.8, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if oext and not oext.startswith(\".\"):\n self.opts.oext = \".\" + oext"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L313_C12", "label": "self.opts.oext =", "type": "assigned_variable", "loc": [313, 313], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L312_C8", "vector": [14, 3, 0.4953, 0.0016, 3, 0.52, 0.0, 995, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.opts.oext", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.opts.oext = \".\" + oext"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "label": "_compileOrFill", "type": "function", "loc": [317, 380], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.5514, 0.1013, 1, 0.74, 0.6923, 874, 0, 1, 1, 0, 0, 0, 26], "semantic": {"name": "_compileOrFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _compileOrFill(self):\n C, D, W = self.chatter, self.debug, self.warn\n opts, files = self.opts, self.pathArgs\n if files == [\"-\"]: \n self._compileOrFillStdin()\n return\n elif not files and opts.recurse:\n which = opts.idir and \"idir\" or \"current\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L318_C8", "label": "C, D, W =", "type": "assigned_variable", "loc": [318, 318], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "vector": [14, 2, 0.5032, 0.0016, 2, 0.76, 0.0, 533, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "C, D, W", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " C, D, W = self.chatter, self.debug, self.warn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L319_C8", "label": "opts, files =", "type": "assigned_variable", "loc": [319, 319], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "vector": [14, 2, 0.5047, 0.0016, 2, 0.76, 0.125, 463, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "opts, files", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " opts, files = self.opts, self.pathArgs"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L320_C8", "label": "if", "type": "if", "loc": [320, 332], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "vector": [4, 2, 0.5158, 0.0206, 2, 0.76, 0.25, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if files == [\"-\"]: \n self._compileOrFillStdin()\n return\n elif not files and opts.recurse:\n which = opts.idir and \"idir\" or \"current\"\n C(\"Drilling down recursively from %s directory.\", which)\n sourceFiles = []\n dir = os.path.join(self.opts.idir, os.curdir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L321_C12", "label": "_compileOrFillStdin()", "type": "expression", "loc": [321, 321], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L320_C8", "vector": [8, 3, 0.5079, 0.0016, 3, 0.48, 0.0, 467, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_compileOrFillStdin", "arg_names": [], "import_names": [], "rhs_call_name": "_compileOrFillStdin", "annotation": ""}, "snippet": " self._compileOrFillStdin()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L322_C12", "label": "return", "type": "return", "loc": [322, 322], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L320_C8", "vector": [13, 3, 0.5095, 0.0016, 3, 0.48, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L323_C8", "label": "if", "type": "if", "loc": [323, 332], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L320_C8", "vector": [4, 3, 0.5182, 0.0158, 3, 0.48, 1.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif not files and opts.recurse:\n which = opts.idir and \"idir\" or \"current\"\n C(\"Drilling down recursively from %s directory.\", which)\n sourceFiles = []\n dir = os.path.join(self.opts.idir, os.curdir)\n os.path.walk(dir, self._expandSourceFilesWalk, sourceFiles)\n elif not files:\n usage(HELP_PAGE1, \"Neither files nor -R specified!\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L324_C12", "label": "which =", "type": "assigned_variable", "loc": [324, 324], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L323_C8", "vector": [14, 4, 0.5127, 0.0016, 4, 0.81, 0.0, 971, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "which", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " which = opts.idir and \"idir\" or \"current\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L325_C12", "label": "C()", "type": "expression", "loc": [325, 325], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L323_C8", "vector": [8, 4, 0.5142, 0.0016, 4, 0.81, 0.2, 619, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "C", "arg_names": [], "import_names": [], "rhs_call_name": "C", "annotation": ""}, "snippet": " C(\"Drilling down recursively from %s directory.\", which)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L326_C12", "label": "sourceFiles =", "type": "assigned_variable", "loc": [326, 326], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L323_C8", "vector": [14, 4, 0.5158, 0.0016, 4, 0.81, 0.4, 37, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "sourceFiles", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sourceFiles = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L327_C12", "label": "dir = join()", "type": "assigned_variable", "loc": [327, 327], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L323_C8", "vector": [14, 4, 0.5174, 0.0016, 4, 0.81, 0.6, 152, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "dir", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " dir = os.path.join(self.opts.idir, os.curdir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L328_C12", "label": "walk()", "type": "expression", "loc": [328, 328], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L323_C8", "vector": [8, 4, 0.519, 0.0016, 4, 0.81, 0.8, 511, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "walk", "arg_names": [], "import_names": [], "rhs_call_name": "walk", "annotation": ""}, "snippet": " os.path.walk(dir, self._expandSourceFilesWalk, sourceFiles)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L329_C8", "label": "if", "type": "if", "loc": [329, 332], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L323_C8", "vector": [4, 4, 0.5229, 0.0063, 4, 0.81, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif not files:\n usage(HELP_PAGE1, \"Neither files nor -R specified!\")\n else:\n sourceFiles = self._expandSourceFiles(files, opts.recurse, True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L330_C12", "label": "usage()", "type": "expression", "loc": [330, 330], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L329_C8", "vector": [8, 5, 0.5222, 0.0016, 5, 0.77, 0.0, 129, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "usage", "arg_names": [], "import_names": [], "rhs_call_name": "usage", "annotation": ""}, "snippet": " usage(HELP_PAGE1, \"Neither files nor -R specified!\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L332_C12", "label": "sourceFiles = _expandSourceFiles()", "type": "assigned_variable", "loc": [332, 332], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L329_C8", "vector": [14, 5, 0.5253, 0.0016, 5, 0.77, 1.0, 37, 3, 3, 0, 0, 419, 10, 1], "semantic": {"name": "sourceFiles", "arg_names": [], "import_names": [], "rhs_call_name": "_expandSourceFiles", "annotation": ""}, "snippet": " sourceFiles = self._expandSourceFiles(files, opts.recurse, True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L333_C8", "label": "sourceFiles =", "type": "assigned_variable", "loc": [333, 333], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "vector": [14, 2, 0.5269, 0.0016, 2, 0.76, 0.375, 37, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "sourceFiles", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sourceFiles = [os.path.normpath(x) for x in sourceFiles]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L334_C8", "label": "D()", "type": "expression", "loc": [334, 334], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "vector": [8, 2, 0.5285, 0.0016, 2, 0.76, 0.5, 939, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "D", "arg_names": [], "import_names": [], "rhs_call_name": "D", "annotation": ""}, "snippet": " D(\"All source files found: %s\", sourceFiles)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L335_C8", "label": "bundles = _getBundles()", "type": "assigned_variable", "loc": [335, 335], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "vector": [14, 2, 0.5301, 0.0016, 2, 0.76, 0.625, 355, 3, 1, 0, 0, 416, 10, 1], "semantic": {"name": "bundles", "arg_names": [], "import_names": [], "rhs_call_name": "_getBundles", "annotation": ""}, "snippet": " bundles = self._getBundles(sourceFiles)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L336_C8", "label": "D()", "type": "expression", "loc": [336, 336], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "vector": [8, 2, 0.5316, 0.0016, 2, 0.76, 0.75, 939, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "D", "arg_names": [], "import_names": [], "rhs_call_name": "D", "annotation": ""}, "snippet": " D(\"All bundles: %s\", pprint.pformat(bundles))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L337_C8", "label": "if", "type": "if", "loc": [337, 338], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "vector": [4, 2, 0.534, 0.0032, 2, 0.76, 0.875, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.opts.flat:\n self._checkForCollisions(bundles)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L338_C12", "label": "_checkForCollisions()", "type": "expression", "loc": [338, 338], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L337_C8", "vector": [8, 3, 0.5348, 0.0016, 3, 0.67, 0.0, 465, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_checkForCollisions", "arg_names": [], "import_names": [], "rhs_call_name": "_checkForCollisions", "annotation": ""}, "snippet": " self._checkForCollisions(bundles)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L347_C8", "label": "if", "type": "if", "loc": [347, 380], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "vector": [4, 2, 0.5752, 0.0538, 2, 0.76, 1.0, 0, 0, 0, 0, 0, 0, 0, 14], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.opts.parallel > 1:\n bad_child_exit = 0\n pid_pool = set()\n\n def child_wait():\n pid, status = os.wait()\n pid_pool.remove(pid)\n return os.WEXITSTATUS(status)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L348_C12", "label": "bad_child_exit =", "type": "assigned_variable", "loc": [348, 348], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L347_C8", "vector": [14, 3, 0.5506, 0.0016, 3, 0.59, 0.0, 758, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "bad_child_exit", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " bad_child_exit = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L349_C12", "label": "pid_pool = set()", "type": "assigned_variable", "loc": [349, 349], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L347_C8", "vector": [14, 3, 0.5522, 0.0016, 3, 0.59, 0.1667, 207, 3, 0, 0, 0, 21, 10, 1], "semantic": {"name": "pid_pool", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " pid_pool = set()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L351_C12", "label": "child_wait", "type": "function", "loc": [351, 354], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L347_C8", "vector": [2, 3, 0.5578, 0.0063, 3, 0.59, 0.3333, 67, 0, 0, 1, 0, 0, 0, 3], "semantic": {"name": "child_wait", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def child_wait():\n pid, status = os.wait()\n pid_pool.remove(pid)\n return os.WEXITSTATUS(status)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L352_C16", "label": "pid, status = wait()", "type": "assigned_variable", "loc": [352, 352], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L351_C12", "vector": [14, 4, 0.557, 0.0016, 4, 0.53, 0.0, 30, 3, 0, 0, 0, 243, 10, 1], "semantic": {"name": "pid, status", "arg_names": [], "import_names": [], "rhs_call_name": "wait", "annotation": ""}, "snippet": " pid, status = os.wait()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L353_C16", "label": "remove()", "type": "expression", "loc": [353, 353], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L351_C12", "vector": [8, 4, 0.5585, 0.0016, 4, 0.53, 0.5, 185, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove", "arg_names": [], "import_names": [], "rhs_call_name": "remove", "annotation": ""}, "snippet": " pid_pool.remove(pid)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L354_C16", "label": "return", "type": "return", "loc": [354, 354], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L351_C12", "vector": [13, 4, 0.5601, 0.0016, 4, 0.53, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return os.WEXITSTATUS(status)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L356_C12", "label": "while", "type": "while", "loc": [356, 368], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L347_C8", "vector": [5, 3, 0.5728, 0.0206, 3, 0.59, 0.5, 0, 2, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while bundles:\n b = bundles.pop()\n pid = os.fork()\n if pid:\n pid_pool.add(pid)\n else:\n self._compileOrFillBundle(b)\n sys.exit(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L357_C16", "label": "b = pop()", "type": "assigned_variable", "loc": [357, 357], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L356_C12", "vector": [14, 4, 0.5649, 0.0016, 4, 0.26, 0.0, 756, 3, 0, 0, 0, 969, 10, 1], "semantic": {"name": "b", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " b = bundles.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L358_C16", "label": "pid = fork()", "type": "assigned_variable", "loc": [358, 358], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L356_C12", "vector": [14, 4, 0.5665, 0.0016, 4, 0.26, 0.3333, 838, 3, 0, 0, 0, 694, 10, 1], "semantic": {"name": "pid", "arg_names": [], "import_names": [], "rhs_call_name": "fork", "annotation": ""}, "snippet": " pid = os.fork()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L359_C16", "label": "if", "type": "if", "loc": [359, 363], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L356_C12", "vector": [4, 4, 0.5712, 0.0079, 4, 0.26, 0.6667, 0, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pid:\n pid_pool.add(pid)\n else:\n self._compileOrFillBundle(b)\n sys.exit(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L360_C20", "label": "add()", "type": "expression", "loc": [360, 360], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L359_C16", "vector": [8, 5, 0.5696, 0.0016, 5, 0.96, 0.0, 241, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add", "arg_names": [], "import_names": [], "rhs_call_name": "add", "annotation": ""}, "snippet": " pid_pool.add(pid)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L362_C20", "label": "_compileOrFillBundle()", "type": "expression", "loc": [362, 362], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L359_C16", "vector": [8, 5, 0.5728, 0.0016, 5, 0.96, 0.5, 777, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_compileOrFillBundle", "arg_names": [], "import_names": [], "rhs_call_name": "_compileOrFillBundle", "annotation": ""}, "snippet": " self._compileOrFillBundle(b)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L363_C20", "label": "exit()", "type": "expression", "loc": [363, 363], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L359_C16", "vector": [8, 5, 0.5744, 0.0016, 5, 0.96, 1.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L365_C16", "label": "if", "type": "if", "loc": [365, 368], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L356_C12", "vector": [4, 4, 0.5799, 0.0063, 4, 0.26, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(pid_pool) == self.opts.parallel:\n bad_child_exit = child_wait()\n if bad_child_exit:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L366_C20", "label": "bad_child_exit = child_wait()", "type": "assigned_variable", "loc": [366, 366], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L365_C16", "vector": [14, 5, 0.5791, 0.0016, 5, 0.7, 0.0, 758, 3, 0, 0, 0, 67, 10, 1], "semantic": {"name": "bad_child_exit", "arg_names": [], "import_names": [], "rhs_call_name": "child_wait", "annotation": ""}, "snippet": " bad_child_exit = child_wait()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L367_C20", "label": "if", "type": "if", "loc": [367, 368], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L365_C16", "vector": [4, 5, 0.5815, 0.0032, 5, 0.7, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if bad_child_exit:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L370_C12", "label": "while", "type": "while", "loc": [370, 373], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L347_C8", "vector": [5, 3, 0.5878, 0.0063, 3, 0.59, 0.6667, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while pid_pool:\n child_exit = child_wait()\n if not bad_child_exit:\n bad_child_exit = child_exit"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L371_C16", "label": "child_exit = child_wait()", "type": "assigned_variable", "loc": [371, 371], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L370_C12", "vector": [14, 4, 0.587, 0.0016, 4, 0.97, 0.0, 149, 3, 0, 0, 0, 67, 10, 1], "semantic": {"name": "child_exit", "arg_names": [], "import_names": [], "rhs_call_name": "child_wait", "annotation": ""}, "snippet": " child_exit = child_wait()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L372_C16", "label": "if", "type": "if", "loc": [372, 373], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L370_C12", "vector": [4, 4, 0.5894, 0.0032, 4, 0.97, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not bad_child_exit:\n bad_child_exit = child_exit"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L373_C20", "label": "bad_child_exit =", "type": "assigned_variable", "loc": [373, 373], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L372_C16", "vector": [14, 5, 0.5902, 0.0016, 5, 0.7, 0.0, 758, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "bad_child_exit", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " bad_child_exit = child_exit"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L375_C12", "label": "if", "type": "if", "loc": [375, 376], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L347_C8", "vector": [4, 3, 0.5941, 0.0032, 3, 0.59, 0.8333, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if bad_child_exit:\n sys.exit(\"Child process failed, exited with code %d\" % bad_child_exit)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L376_C16", "label": "exit()", "type": "expression", "loc": [376, 376], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L375_C12", "vector": [8, 4, 0.5949, 0.0016, 4, 0.89, 0.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(\"Child process failed, exited with code %d\" % bad_child_exit)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L379_C12", "label": "for b", "type": "for", "loc": [379, 380], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L347_C8", "vector": [6, 3, 0.6005, 0.0032, 3, 0.59, 1.0, 756, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "b", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for b in bundles:\n self._compileOrFillBundle(b)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L380_C16", "label": "_compileOrFillBundle()", "type": "expression", "loc": [380, 380], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L379_C12", "vector": [8, 4, 0.6013, 0.0016, 4, 0.53, 0.0, 777, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_compileOrFillBundle", "arg_names": [], "import_names": [], "rhs_call_name": "_compileOrFillBundle", "annotation": ""}, "snippet": " self._compileOrFillBundle(b)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "label": "_checkForCollisions", "type": "function", "loc": [382, 404], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.6218, 0.0364, 1, 0.74, 0.7308, 465, 0, 2, 0, 0, 0, 0, 7], "semantic": {"name": "_checkForCollisions", "arg_names": ["self", "bundles"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _checkForCollisions(self, bundles):\n \"\"\"Check for multiple source paths writing to the same destination\n path.\n \"\"\"\n C, D, W = self.chatter, self.debug, self.warn\n isError = False\n dstSources = {}\n for b in bundles:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L383_C8", "label": "expression", "type": "expression", "loc": [383, 385], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "vector": [8, 2, 0.6076, 0.0047, 2, 0.99, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Check for multiple source paths writing to the same destination\n path.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L386_C8", "label": "C, D, W =", "type": "assigned_variable", "loc": [386, 386], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "vector": [14, 2, 0.6108, 0.0016, 2, 0.99, 0.1429, 533, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "C, D, W", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " C, D, W = self.chatter, self.debug, self.warn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L387_C8", "label": "isError =", "type": "assigned_variable", "loc": [387, 387], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "vector": [14, 2, 0.6123, 0.0016, 2, 0.99, 0.2857, 414, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "isError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isError = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L388_C8", "label": "dstSources =", "type": "assigned_variable", "loc": [388, 388], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "vector": [14, 2, 0.6139, 0.0016, 2, 0.99, 0.4286, 368, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "dstSources", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " dstSources = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L389_C8", "label": "for b", "type": "for", "loc": [389, 393], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "vector": [6, 2, 0.6187, 0.0079, 2, 0.99, 0.5714, 756, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "b", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for b in bundles:\n if b.dst in dstSources:\n dstSources[b.dst].append(b.src)\n else:\n dstSources[b.dst] = [b.src]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L390_C12", "label": "if", "type": "if", "loc": [390, 393], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L389_C8", "vector": [4, 3, 0.6195, 0.0063, 3, 0.58, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if b.dst in dstSources:\n dstSources[b.dst].append(b.src)\n else:\n dstSources[b.dst] = [b.src]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L391_C16", "label": "append()", "type": "expression", "loc": [391, 391], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L390_C12", "vector": [8, 4, 0.6187, 0.0016, 4, 0.9, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " dstSources[b.dst].append(b.src)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L393_C16", "label": "assign", "type": "assigned_variable", "loc": [393, 393], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L390_C12", "vector": [14, 4, 0.6218, 0.0016, 4, 0.9, 1.0, 0, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " dstSources[b.dst] = [b.src]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L394_C8", "label": "keys = sorted()", "type": "assigned_variable", "loc": [394, 394], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "vector": [14, 2, 0.6234, 0.0016, 2, 0.99, 0.7143, 204, 3, 1, 0, 0, 134, 10, 2], "semantic": {"name": "keys", "arg_names": [], "import_names": [], "rhs_call_name": "sorted", "annotation": ""}, "snippet": " keys = sorted(dstSources.keys())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L395_C8", "label": "for dst", "type": "for", "loc": [395, 401], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "vector": [6, 2, 0.6297, 0.0111, 2, 0.99, 0.8571, 856, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "dst", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for dst in keys:\n sources = dstSources[dst]\n if len(sources) > 1:\n isError = True\n sources.sort()\n fmt = \"Collision: multiple source files %s map to one destination file %s\"\n W(fmt, sources, dst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L396_C12", "label": "sources =", "type": "assigned_variable", "loc": [396, 396], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L395_C8", "vector": [14, 3, 0.6266, 0.0016, 3, 0.68, 0.0, 648, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "sources", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sources = dstSources[dst]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L397_C12", "label": "if", "type": "if", "loc": [397, 401], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L395_C8", "vector": [4, 3, 0.6313, 0.0079, 3, 0.68, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(sources) > 1:\n isError = True\n sources.sort()\n fmt = \"Collision: multiple source files %s map to one destination file %s\"\n W(fmt, sources, dst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L398_C16", "label": "isError =", "type": "assigned_variable", "loc": [398, 398], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L397_C12", "vector": [14, 4, 0.6297, 0.0016, 4, 0.97, 0.0, 414, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "isError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isError = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L399_C16", "label": "sort()", "type": "expression", "loc": [399, 399], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L397_C12", "vector": [8, 4, 0.6313, 0.0016, 4, 0.97, 0.3333, 489, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "sort", "arg_names": [], "import_names": [], "rhs_call_name": "sort", "annotation": ""}, "snippet": " sources.sort()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L400_C16", "label": "fmt =", "type": "assigned_variable", "loc": [400, 400], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L397_C12", "vector": [14, 4, 0.6329, 0.0016, 4, 0.97, 0.6667, 913, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "fmt", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " fmt = \"Collision: multiple source files %s map to one destination file %s\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L401_C16", "label": "W()", "type": "expression", "loc": [401, 401], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L397_C12", "vector": [8, 4, 0.6345, 0.0016, 4, 0.97, 1.0, 94, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "W", "arg_names": [], "import_names": [], "rhs_call_name": "W", "annotation": ""}, "snippet": " W(fmt, sources, dst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L402_C8", "label": "if", "type": "if", "loc": [402, 404], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "vector": [4, 2, 0.6377, 0.0047, 2, 0.99, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isError:\n what = self.isCompile and \"Compilation\" or \"Filling\"\n sys.exit(\"%s aborted due to collisions\" % what)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L403_C12", "label": "what =", "type": "assigned_variable", "loc": [403, 403], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L402_C8", "vector": [14, 3, 0.6377, 0.0016, 3, 0.52, 0.0, 63, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "what", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " what = self.isCompile and \"Compilation\" or \"Filling\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L404_C12", "label": "exit()", "type": "expression", "loc": [404, 404], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L402_C8", "vector": [8, 3, 0.6392, 0.0016, 3, 0.52, 1.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(\"%s aborted due to collisions\" % what)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L407_C4", "label": "_expandSourceFilesWalk", "type": "function", "loc": [407, 418], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.6527, 0.019, 1, 0.74, 0.7692, 367, 0, 4, 0, 0, 0, 0, 7], "semantic": {"name": "_expandSourceFilesWalk", "arg_names": ["self", "arg", "dir", "files"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _expandSourceFilesWalk(self, arg, dir, files):\n \"\"\"Recursion extension for .expandSourceFiles().\n This method is a callback for os.path.walk().\n 'arg' is a list to which successful paths will be appended.\n \"\"\"\n iext = self.opts.iext\n for f in files:\n path = os.path.join(dir, f)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L408_C8", "label": "expression", "type": "expression", "loc": [408, 411], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L407_C4", "vector": [8, 2, 0.6479, 0.0063, 2, 0.52, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Recursion extension for .expandSourceFiles().\n This method is a callback for os.path.walk().\n 'arg' is a list to which successful paths will be appended.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L412_C8", "label": "iext =", "type": "assigned_variable", "loc": [412, 412], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L407_C4", "vector": [14, 2, 0.6519, 0.0016, 2, 0.52, 0.5, 816, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "iext", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " iext = self.opts.iext"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L413_C8", "label": "for f", "type": "for", "loc": [413, 418], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L407_C4", "vector": [6, 2, 0.6574, 0.0095, 2, 0.52, 1.0, 899, 2, 0, 0, 0, 0, 0, 7], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for f in files:\n path = os.path.join(dir, f)\n if path.endswith(iext) and os.path.isfile(path):\n arg.append(path)\n elif os.path.islink(path) and os.path.isdir(path):\n os.path.walk(path, self._expandSourceFilesWalk, arg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L414_C12", "label": "path = join()", "type": "assigned_variable", "loc": [414, 414], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L413_C8", "vector": [14, 3, 0.6551, 0.0016, 3, 0.9, 0.0, 358, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " path = os.path.join(dir, f)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L415_C12", "label": "if", "type": "if", "loc": [415, 418], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L413_C8", "vector": [4, 3, 0.659, 0.0063, 3, 0.9, 1.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if path.endswith(iext) and os.path.isfile(path):\n arg.append(path)\n elif os.path.islink(path) and os.path.isdir(path):\n os.path.walk(path, self._expandSourceFilesWalk, arg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L416_C16", "label": "append()", "type": "expression", "loc": [416, 416], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L415_C12", "vector": [8, 4, 0.6582, 0.0016, 4, 0.25, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " arg.append(path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L417_C12", "label": "if", "type": "if", "loc": [417, 418], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L415_C12", "vector": [4, 4, 0.6606, 0.0032, 4, 0.25, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif os.path.islink(path) and os.path.isdir(path):\n os.path.walk(path, self._expandSourceFilesWalk, arg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L418_C16", "label": "walk()", "type": "expression", "loc": [418, 418], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L417_C12", "vector": [8, 5, 0.6614, 0.0016, 5, 0.45, 0.0, 511, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "walk", "arg_names": [], "import_names": [], "rhs_call_name": "walk", "annotation": ""}, "snippet": " os.path.walk(path, self._expandSourceFilesWalk, arg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L422_C4", "label": "_expandSourceFiles", "type": "function", "loc": [422, 452], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.6915, 0.0491, 1, 0.74, 0.8077, 419, 0, 4, 1, 0, 0, 0, 16], "semantic": {"name": "_expandSourceFiles", "arg_names": ["self", "files", "recurse", "addIextIfMissing"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _expandSourceFiles(self, files, recurse, addIextIfMissing):\n \"\"\"Calculate source paths from 'files' by applying the \n command-line options.\n \"\"\"\n C, D, W = self.chatter, self.debug, self.warn\n idir = self.opts.idir\n iext = self.opts.iext\n files = [] "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L423_C8", "label": "expression", "type": "expression", "loc": [423, 425], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L422_C4", "vector": [8, 2, 0.6709, 0.0047, 2, 0.51, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Calculate source paths from 'files' by applying the \n command-line options.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L426_C8", "label": "C, D, W =", "type": "assigned_variable", "loc": [426, 426], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L422_C4", "vector": [14, 2, 0.6741, 0.0016, 2, 0.51, 0.1667, 533, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "C, D, W", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " C, D, W = self.chatter, self.debug, self.warn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L427_C8", "label": "idir =", "type": "assigned_variable", "loc": [427, 427], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L422_C4", "vector": [14, 2, 0.6756, 0.0016, 2, 0.51, 0.3333, 25, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "idir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " idir = self.opts.idir"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L428_C8", "label": "iext =", "type": "assigned_variable", "loc": [428, 428], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L422_C4", "vector": [14, 2, 0.6772, 0.0016, 2, 0.51, 0.5, 816, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "iext", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " iext = self.opts.iext"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L429_C8", "label": "files =", "type": "assigned_variable", "loc": [429, 429], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L422_C4", "vector": [14, 2, 0.6788, 0.0016, 2, 0.51, 0.6667, 598, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "files", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " files = [] "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L430_C8", "label": "for f", "type": "for", "loc": [430, 451], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L422_C4", "vector": [6, 2, 0.697, 0.0348, 2, 0.51, 0.8333, 899, 7, 0, 0, 0, 0, 0, 16], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for f in self.pathArgs:\n oldFilesLen = len(files)\n D(\"Expanding %s\", f)\n path = os.path.join(idir, f)\n pathWithExt = path + iext # May or may not be valid.\n if os.path.isdir(path):\n if recurse:\n os.path.walk(path, self._expandSourceFilesWalk, files)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L431_C12", "label": "oldFilesLen = len()", "type": "assigned_variable", "loc": [431, 431], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L430_C8", "vector": [14, 3, 0.682, 0.0016, 3, 0.72, 0.0, 463, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "oldFilesLen", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " oldFilesLen = len(files)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L432_C12", "label": "D()", "type": "expression", "loc": [432, 432], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L430_C8", "vector": [8, 3, 0.6835, 0.0016, 3, 0.72, 0.2, 939, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "D", "arg_names": [], "import_names": [], "rhs_call_name": "D", "annotation": ""}, "snippet": " D(\"Expanding %s\", f)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L433_C12", "label": "path = join()", "type": "assigned_variable", "loc": [433, 433], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L430_C8", "vector": [14, 3, 0.6851, 0.0016, 3, 0.72, 0.4, 358, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " path = os.path.join(idir, f)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L434_C12", "label": "pathWithExt =", "type": "assigned_variable", "loc": [434, 434], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L430_C8", "vector": [14, 3, 0.6867, 0.0016, 3, 0.72, 0.6, 70, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pathWithExt", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pathWithExt = path + iext # May or may not be valid."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L435_C12", "label": "if", "type": "if", "loc": [435, 449], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L430_C8", "vector": [4, 3, 0.6994, 0.0237, 3, 0.72, 0.8, 0, 3, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if os.path.isdir(path):\n if recurse:\n os.path.walk(path, self._expandSourceFilesWalk, files)\n else:\n raise Error(\"source file '%s' is a directory\" % path)\n elif os.path.isfile(path):\n files.append(path)\n elif (addIextIfMissing and not path.endswith(iext) and "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L436_C16", "label": "if", "type": "if", "loc": [436, 439], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L435_C12", "vector": [4, 4, 0.6922, 0.0063, 4, 0.23, 0.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if recurse:\n os.path.walk(path, self._expandSourceFilesWalk, files)\n else:\n raise Error(\"source file '%s' is a directory\" % path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L437_C20", "label": "walk()", "type": "expression", "loc": [437, 437], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L436_C16", "vector": [8, 5, 0.6915, 0.0016, 5, 0.72, 0.0, 511, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "walk", "arg_names": [], "import_names": [], "rhs_call_name": "walk", "annotation": ""}, "snippet": " os.path.walk(path, self._expandSourceFilesWalk, files)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L440_C12", "label": "if", "type": "if", "loc": [440, 449], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L435_C12", "vector": [4, 4, 0.7033, 0.0158, 4, 0.23, 1.0, 0, 3, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif os.path.isfile(path):\n files.append(path)\n elif (addIextIfMissing and not path.endswith(iext) and \n os.path.isfile(pathWithExt)):\n files.append(pathWithExt)\n # Do not recurse directories discovered by iext appending.\n elif os.path.exists(path):\n W(\"Skipping source file '%s', not a plain file.\", path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L441_C16", "label": "append()", "type": "expression", "loc": [441, 441], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L440_C12", "vector": [8, 5, 0.6978, 0.0016, 5, 0.75, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " files.append(path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L442_C12", "label": "if", "type": "if", "loc": [442, 449], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L440_C12", "vector": [4, 5, 0.7049, 0.0127, 5, 0.75, 1.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif (addIextIfMissing and not path.endswith(iext) and \n os.path.isfile(pathWithExt)):\n files.append(pathWithExt)\n # Do not recurse directories discovered by iext appending.\n elif os.path.exists(path):\n W(\"Skipping source file '%s', not a plain file.\", path)\n else:\n W(\"Skipping source file '%s', not found.\", path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L444_C16", "label": "append()", "type": "expression", "loc": [444, 444], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L442_C12", "vector": [8, 6, 0.7025, 0.0016, 6, 0.11, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " files.append(pathWithExt)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L446_C12", "label": "if", "type": "if", "loc": [446, 449], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L442_C12", "vector": [4, 6, 0.7081, 0.0063, 6, 0.11, 1.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif os.path.exists(path):\n W(\"Skipping source file '%s', not a plain file.\", path)\n else:\n W(\"Skipping source file '%s', not found.\", path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L447_C16", "label": "W()", "type": "expression", "loc": [447, 447], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L446_C12", "vector": [8, 7, 0.7073, 0.0016, 7, 0.78, 0.0, 94, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "W", "arg_names": [], "import_names": [], "rhs_call_name": "W", "annotation": ""}, "snippet": " W(\"Skipping source file '%s', not a plain file.\", path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L449_C16", "label": "W()", "type": "expression", "loc": [449, 449], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L446_C12", "vector": [8, 7, 0.7104, 0.0016, 7, 0.78, 1.0, 94, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "W", "arg_names": [], "import_names": [], "rhs_call_name": "W", "annotation": ""}, "snippet": " W(\"Skipping source file '%s', not found.\", path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L450_C12", "label": "if", "type": "if", "loc": [450, 451], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L430_C8", "vector": [4, 3, 0.7128, 0.0032, 3, 0.72, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(files) > oldFilesLen:\n D(\" ... found %s\", files[oldFilesLen:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L451_C16", "label": "D()", "type": "expression", "loc": [451, 451], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L450_C12", "vector": [8, 4, 0.7136, 0.0016, 4, 0.81, 0.0, 939, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "D", "arg_names": [], "import_names": [], "rhs_call_name": "D", "annotation": ""}, "snippet": " D(\" ... found %s\", files[oldFilesLen:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L452_C8", "label": "return", "type": "return", "loc": [452, 452], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L422_C4", "vector": [13, 2, 0.7152, 0.0016, 2, 0.51, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return files"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "label": "_getBundles", "type": "function", "loc": [455, 494], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.7508, 0.0633, 1, 0.74, 0.8462, 416, 0, 2, 1, 0, 0, 0, 14], "semantic": {"name": "_getBundles", "arg_names": ["self", "sourceFiles"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _getBundles(self, sourceFiles):\n flat = self.opts.flat\n idir = self.opts.idir\n iext = self.opts.iext\n nobackup = self.opts.nobackup\n odir = self.opts.odir\n oext = self.opts.oext\n idirSlash = idir + os.sep"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L456_C8", "label": "flat =", "type": "assigned_variable", "loc": [456, 456], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "vector": [14, 2, 0.7215, 0.0016, 2, 0.49, 0.0, 363, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "flat", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " flat = self.opts.flat"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L457_C8", "label": "idir =", "type": "assigned_variable", "loc": [457, 457], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "vector": [14, 2, 0.7231, 0.0016, 2, 0.49, 0.1111, 25, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "idir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " idir = self.opts.idir"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L458_C8", "label": "iext =", "type": "assigned_variable", "loc": [458, 458], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "vector": [14, 2, 0.7247, 0.0016, 2, 0.49, 0.2222, 816, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "iext", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " iext = self.opts.iext"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L459_C8", "label": "nobackup =", "type": "assigned_variable", "loc": [459, 459], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "vector": [14, 2, 0.7263, 0.0016, 2, 0.49, 0.3333, 625, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "nobackup", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " nobackup = self.opts.nobackup"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L460_C8", "label": "odir =", "type": "assigned_variable", "loc": [460, 460], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "vector": [14, 2, 0.7278, 0.0016, 2, 0.49, 0.4444, 63, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "odir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " odir = self.opts.odir"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L461_C8", "label": "oext =", "type": "assigned_variable", "loc": [461, 461], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "vector": [14, 2, 0.7294, 0.0016, 2, 0.49, 0.5556, 558, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "oext", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " oext = self.opts.oext"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L462_C8", "label": "idirSlash =", "type": "assigned_variable", "loc": [462, 462], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "vector": [14, 2, 0.731, 0.0016, 2, 0.49, 0.6667, 54, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "idirSlash", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " idirSlash = idir + os.sep"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L463_C8", "label": "bundles =", "type": "assigned_variable", "loc": [463, 463], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "vector": [14, 2, 0.7326, 0.0016, 2, 0.49, 0.7778, 355, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "bundles", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " bundles = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "label": "for src", "type": "for", "loc": [464, 493], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "vector": [6, 2, 0.7571, 0.0475, 2, 0.49, 0.8889, 345, 2, 0, 0, 0, 0, 0, 14], "semantic": {"name": "src", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for src in sourceFiles:\n # 'base' is the subdirectory plus basename.\n base = src\n if idir and src.startswith(idirSlash):\n base = src[len(idirSlash):]\n if iext and base.endswith(iext):\n base = base[:-len(iext)]\n basename = os.path.basename(base)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L466_C12", "label": "base =", "type": "assigned_variable", "loc": [466, 466], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "vector": [14, 3, 0.7373, 0.0016, 3, 0.29, 0.0, 47, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " base = src"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L467_C12", "label": "if", "type": "if", "loc": [467, 468], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "vector": [4, 3, 0.7397, 0.0032, 3, 0.29, 0.1429, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if idir and src.startswith(idirSlash):\n base = src[len(idirSlash):]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L468_C16", "label": "base =", "type": "assigned_variable", "loc": [468, 468], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L467_C12", "vector": [14, 4, 0.7405, 0.0016, 4, 0.56, 0.0, 47, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "base", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " base = src[len(idirSlash):]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L469_C12", "label": "if", "type": "if", "loc": [469, 470], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "vector": [4, 3, 0.7429, 0.0032, 3, 0.29, 0.2857, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if iext and base.endswith(iext):\n base = base[:-len(iext)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L470_C16", "label": "base =", "type": "assigned_variable", "loc": [470, 470], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L469_C12", "vector": [14, 4, 0.7437, 0.0016, 4, 0.76, 0.0, 47, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "base", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " base = base[:-len(iext)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L471_C12", "label": "basename = basename()", "type": "assigned_variable", "loc": [471, 471], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "vector": [14, 3, 0.7453, 0.0016, 3, 0.29, 0.4286, 164, 3, 1, 0, 0, 164, 10, 1], "semantic": {"name": "basename", "arg_names": [], "import_names": [], "rhs_call_name": "basename", "annotation": ""}, "snippet": " basename = os.path.basename(base)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L472_C12", "label": "if", "type": "if", "loc": [472, 490], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "vector": [4, 3, 0.7611, 0.0301, 3, 0.29, 0.5714, 0, 2, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if flat:\n dst = os.path.join(odir, basename + oext)\n else:\n dbn = basename\n if odir and base.startswith(os.sep):\n odd = odir\n while odd != '':\n idx = base.find(odd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L473_C16", "label": "dst = join()", "type": "assigned_variable", "loc": [473, 473], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L472_C12", "vector": [14, 4, 0.7484, 0.0016, 4, 0.34, 0.0, 856, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "dst", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " dst = os.path.join(odir, basename + oext)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L475_C16", "label": "dbn =", "type": "assigned_variable", "loc": [475, 475], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L472_C12", "vector": [14, 4, 0.7516, 0.0016, 4, 0.34, 0.5, 717, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "dbn", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " dbn = basename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L476_C16", "label": "if", "type": "if", "loc": [476, 490], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L472_C12", "vector": [4, 4, 0.7642, 0.0237, 4, 0.34, 1.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if odir and base.startswith(os.sep):\n odd = odir\n while odd != '':\n idx = base.find(odd)\n if idx == 0:\n dbn = base[len(odd):]\n if dbn[0] == '/':\n dbn = dbn[1:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L477_C20", "label": "odd =", "type": "assigned_variable", "loc": [477, 477], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L476_C16", "vector": [14, 5, 0.7547, 0.0016, 5, 0.58, 0.0, 24, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "odd", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " odd = odir"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L478_C20", "label": "while", "type": "while", "loc": [478, 487], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L476_C16", "vector": [5, 5, 0.7634, 0.0158, 5, 0.58, 0.3333, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while odd != '':\n idx = base.find(odd)\n if idx == 0:\n dbn = base[len(odd):]\n if dbn[0] == '/':\n dbn = dbn[1:]\n break\n odd = os.path.dirname(odd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L479_C24", "label": "idx = find()", "type": "assigned_variable", "loc": [479, 479], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L478_C20", "vector": [14, 6, 0.7579, 0.0016, 6, 0.22, 0.0, 187, 3, 1, 0, 0, 340, 10, 1], "semantic": {"name": "idx", "arg_names": [], "import_names": [], "rhs_call_name": "find", "annotation": ""}, "snippet": " idx = base.find(odd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L480_C24", "label": "if", "type": "if", "loc": [480, 484], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L478_C20", "vector": [4, 6, 0.7627, 0.0079, 6, 0.22, 0.3333, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if idx == 0:\n dbn = base[len(odd):]\n if dbn[0] == '/':\n dbn = dbn[1:]\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L481_C28", "label": "dbn =", "type": "assigned_variable", "loc": [481, 481], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L480_C24", "vector": [14, 7, 0.7611, 0.0016, 7, 0.28, 0.0, 717, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dbn", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " dbn = base[len(odd):]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L482_C28", "label": "if", "type": "if", "loc": [482, 483], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L480_C24", "vector": [4, 7, 0.7634, 0.0032, 7, 0.28, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if dbn[0] == '/':\n dbn = dbn[1:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L483_C32", "label": "dbn =", "type": "assigned_variable", "loc": [483, 483], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L482_C28", "vector": [14, 8, 0.7642, 0.0016, 8, 0.49, 0.0, 717, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "dbn", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " dbn = dbn[1:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L485_C24", "label": "odd = dirname()", "type": "assigned_variable", "loc": [485, 485], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L478_C20", "vector": [14, 6, 0.7674, 0.0016, 6, 0.22, 0.6667, 24, 3, 1, 0, 0, 959, 10, 1], "semantic": {"name": "odd", "arg_names": [], "import_names": [], "rhs_call_name": "dirname", "annotation": ""}, "snippet": " odd = os.path.dirname(odd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L486_C24", "label": "if", "type": "if", "loc": [486, 487], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L478_C20", "vector": [4, 6, 0.7698, 0.0032, 6, 0.22, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if odd == '/':\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L488_C20", "label": "dst = join()", "type": "assigned_variable", "loc": [488, 488], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L476_C16", "vector": [14, 5, 0.7722, 0.0016, 5, 0.58, 0.6667, 856, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "dst", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " dst = os.path.join(odir, dbn + oext)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L490_C20", "label": "dst = join()", "type": "assigned_variable", "loc": [490, 490], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L476_C16", "vector": [14, 5, 0.7753, 0.0016, 5, 0.58, 1.0, 856, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "dst", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " dst = os.path.join(odir, base + oext)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L491_C12", "label": "bak =", "type": "assigned_variable", "loc": [491, 491], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "vector": [14, 3, 0.7769, 0.0016, 3, 0.29, 0.7143, 660, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "bak", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " bak = dst + self.BACKUP_SUFFIX"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L492_C12", "label": "b = Bundle()", "type": "assigned_variable", "loc": [492, 492], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "vector": [14, 3, 0.7785, 0.0016, 3, 0.29, 0.8571, 756, 3, 5, 0, 0, 478, 10, 1], "semantic": {"name": "b", "arg_names": [], "import_names": [], "rhs_call_name": "Bundle", "annotation": ""}, "snippet": " b = Bundle(src=src, dst=dst, bak=bak, base=base, basename=basename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L493_C12", "label": "append()", "type": "expression", "loc": [493, 493], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "vector": [8, 3, 0.7801, 0.0016, 3, 0.29, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " bundles.append(b)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L494_C8", "label": "return", "type": "return", "loc": [494, 494], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "vector": [13, 2, 0.7816, 0.0016, 2, 0.49, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return bundles"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "label": "_getTemplateClass", "type": "function", "loc": [497, 528], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.8109, 0.0506, 1, 0.74, 0.8846, 717, 0, 1, 1, 0, 0, 0, 9], "semantic": {"name": "_getTemplateClass", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _getTemplateClass(self):\n C, D, W = self.chatter, self.debug, self.warn\n modname = None\n if self._templateClass:\n return self._templateClass\n\n modname = self.opts.templateClassName\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L498_C8", "label": "C, D, W =", "type": "assigned_variable", "loc": [498, 498], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "vector": [14, 2, 0.788, 0.0016, 2, 0.6, 0.0, 533, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "C, D, W", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " C, D, W = self.chatter, self.debug, self.warn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L499_C8", "label": "modname =", "type": "assigned_variable", "loc": [499, 499], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "vector": [14, 2, 0.7896, 0.0016, 2, 0.6, 0.0909, 909, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "modname", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " modname = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L500_C8", "label": "if", "type": "if", "loc": [500, 501], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "vector": [4, 2, 0.7919, 0.0032, 2, 0.6, 0.1818, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._templateClass:\n return self._templateClass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L501_C12", "label": "return", "type": "return", "loc": [501, 501], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L500_C8", "vector": [13, 3, 0.7927, 0.0016, 3, 0.99, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._templateClass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L503_C8", "label": "modname =", "type": "assigned_variable", "loc": [503, 503], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "vector": [14, 2, 0.7959, 0.0016, 2, 0.6, 0.2727, 909, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "modname", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " modname = self.opts.templateClassName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L505_C8", "label": "if", "type": "if", "loc": [505, 506], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "vector": [4, 2, 0.7998, 0.0032, 2, 0.6, 0.3636, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not modname:\n return Template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L506_C12", "label": "return", "type": "return", "loc": [506, 506], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L505_C8", "vector": [13, 3, 0.8006, 0.0016, 3, 0.98, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return Template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L507_C8", "label": "p = rfind()", "type": "assigned_variable", "loc": [507, 507], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "vector": [14, 2, 0.8022, 0.0016, 2, 0.6, 0.4545, 491, 3, 1, 0, 0, 634, 10, 1], "semantic": {"name": "p", "arg_names": [], "import_names": [], "rhs_call_name": "rfind", "annotation": ""}, "snippet": " p = modname.rfind('.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L508_C8", "label": "if", "type": "if", "loc": [508, 511], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "vector": [4, 2, 0.8062, 0.0063, 2, 0.6, 0.5455, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if ':' not in modname:\n self.error('The value of option --templateAPIClass is invalid\\n'\n 'It must be in the form \"module:class\", '\n 'e.g. \"Cheetah.Template:Template\"')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L509_C12", "label": "error()", "type": "expression", "loc": [509, 511], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L508_C8", "vector": [8, 3, 0.807, 0.0047, 3, 0.26, 0.0, 771, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "error", "arg_names": [], "import_names": [], "rhs_call_name": "error", "annotation": ""}, "snippet": " self.error('The value of option --templateAPIClass is invalid\\n'\n 'It must be in the form \"module:class\", '\n 'e.g. \"Cheetah.Template:Template\"')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L513_C8", "label": "modname, classname = split()", "type": "assigned_variable", "loc": [513, 513], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "vector": [14, 2, 0.8117, 0.0016, 2, 0.6, 0.6364, 621, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "modname, classname", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " modname, classname = modname.split(':')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L515_C8", "label": "C()", "type": "expression", "loc": [515, 515], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "vector": [8, 2, 0.8149, 0.0016, 2, 0.6, 0.7273, 619, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "C", "arg_names": [], "import_names": [], "rhs_call_name": "C", "annotation": ""}, "snippet": " C('using --templateAPIClass=%s:%s'%(modname, classname))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L517_C8", "label": "if", "type": "if", "loc": [517, 520], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "vector": [4, 2, 0.8204, 0.0063, 2, 0.6, 0.8182, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if p >= 0:\n mod = getattr(__import__(modname[:p], {}, {}, [modname[p+1:]]), modname[p+1:])\n else:\n mod = __import__(modname, {}, {}, [])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L518_C12", "label": "mod = getattr()", "type": "assigned_variable", "loc": [518, 518], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L517_C8", "vector": [14, 3, 0.8196, 0.0016, 3, 0.2, 0.0, 25, 3, 2, 0, 0, 121, 10, 2], "semantic": {"name": "mod", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " mod = getattr(__import__(modname[:p], {}, {}, [modname[p+1:]]), modname[p+1:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L520_C12", "label": "mod = __import__()", "type": "assigned_variable", "loc": [520, 520], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L517_C8", "vector": [14, 3, 0.8228, 0.0016, 3, 0.2, 1.0, 25, 3, 4, 0, 0, 744, 10, 1], "semantic": {"name": "mod", "arg_names": [], "import_names": [], "rhs_call_name": "__import__", "annotation": ""}, "snippet": " mod = __import__(modname, {}, {}, [])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L522_C8", "label": "klass = getattr()", "type": "assigned_variable", "loc": [522, 522], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "vector": [14, 2, 0.8259, 0.0016, 2, 0.6, 0.9091, 35, 3, 3, 0, 0, 121, 10, 1], "semantic": {"name": "klass", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " klass = getattr(mod, classname, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L523_C8", "label": "if", "type": "if", "loc": [523, 528], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "vector": [4, 2, 0.8315, 0.0095, 2, 0.6, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if klass:\n self._templateClass = klass\n return klass\n else:\n self.error('**Template class specified in option --templateAPIClass not found\\n'\n '**Falling back on Cheetah.Template:Template')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L524_C12", "label": "self._templateClass =", "type": "assigned_variable", "loc": [524, 524], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L523_C8", "vector": [14, 3, 0.8291, 0.0016, 3, 0.19, 0.0, 178, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._templateClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._templateClass = klass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L525_C12", "label": "return", "type": "return", "loc": [525, 525], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L523_C8", "vector": [13, 3, 0.8307, 0.0016, 3, 0.19, 0.5, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return klass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L527_C12", "label": "error()", "type": "expression", "loc": [527, 528], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L523_C8", "vector": [8, 3, 0.8347, 0.0032, 3, 0.19, 1.0, 771, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "error", "arg_names": [], "import_names": [], "rhs_call_name": "error", "annotation": ""}, "snippet": " self.error('**Template class specified in option --templateAPIClass not found\\n'\n '**Falling back on Cheetah.Template:Template')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L531_C4", "label": "_getCompilerSettings", "type": "function", "loc": [531, 555], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.8592, 0.0396, 1, 0.74, 0.9231, 24, 0, 1, 1, 0, 0, 0, 6], "semantic": {"name": "_getCompilerSettings", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _getCompilerSettings(self):\n if self._compilerSettings:\n return self._compilerSettings\n\n def getkws(**kws):\n return kws\n if self.opts.compilerSettingsString:\n try:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L532_C8", "label": "if", "type": "if", "loc": [532, 533], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L531_C4", "vector": [4, 2, 0.8426, 0.0032, 2, 0.21, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._compilerSettings:\n return self._compilerSettings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L533_C12", "label": "return", "type": "return", "loc": [533, 533], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L532_C8", "vector": [13, 3, 0.8434, 0.0016, 3, 0.22, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._compilerSettings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L535_C8", "label": "getkws", "type": "function", "loc": [535, 536], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L531_C4", "vector": [2, 2, 0.8473, 0.0032, 2, 0.21, 0.5, 466, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "getkws", "arg_names": ["kws"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getkws(**kws):\n return kws"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L536_C12", "label": "return", "type": "return", "loc": [536, 536], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L535_C8", "vector": [13, 3, 0.8481, 0.0016, 3, 0.51, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return kws"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L537_C8", "label": "if", "type": "if", "loc": [537, 555], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L531_C4", "vector": [4, 2, 0.8639, 0.0301, 2, 0.21, 1.0, 0, 7, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.opts.compilerSettingsString:\n try:\n exec('settings = getkws(%s)'%self.opts.compilerSettingsString)\n except: \n self.error(\"There's an error in your --settings option.\"\n \"It must be valid Python syntax.\\n\"\n +\" --settings='%s'\\n\"%self.opts.compilerSettingsString\n +\" %s: %s\"%sys.exc_info()[:2] "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L538_C12", "label": "try", "type": "try", "loc": [538, 545], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L537_C8", "vector": [7, 3, 0.8568, 0.0127, 3, 0.72, 0.0, 0, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n exec('settings = getkws(%s)'%self.opts.compilerSettingsString)\n except: \n self.error(\"There's an error in your --settings option.\"\n \"It must be valid Python syntax.\\n\"\n +\" --settings='%s'\\n\"%self.opts.compilerSettingsString\n +\" %s: %s\"%sys.exc_info()[:2] \n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L539_C16", "label": "exec()", "type": "expression", "loc": [539, 539], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L538_C12", "vector": [8, 4, 0.8528, 0.0016, 4, 0.7, 0.0, 272, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exec", "arg_names": [], "import_names": [], "rhs_call_name": "exec", "annotation": ""}, "snippet": " exec('settings = getkws(%s)'%self.opts.compilerSettingsString)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L541_C16", "label": "error()", "type": "expression", "loc": [541, 545], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L538_C12", "vector": [8, 4, 0.8592, 0.0079, 4, 0.7, 0.0, 771, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "error", "arg_names": [], "import_names": [], "rhs_call_name": "error", "annotation": ""}, "snippet": " self.error(\"There's an error in your --settings option.\"\n \"It must be valid Python syntax.\\n\"\n +\" --settings='%s'\\n\"%self.opts.compilerSettingsString\n +\" %s: %s\"%sys.exc_info()[:2] \n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L547_C12", "label": "validKeys = keys()", "type": "assigned_variable", "loc": [547, 547], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L537_C8", "vector": [14, 3, 0.8655, 0.0016, 3, 0.72, 0.2, 609, 3, 0, 0, 0, 204, 10, 1], "semantic": {"name": "validKeys", "arg_names": [], "import_names": [], "rhs_call_name": "keys", "annotation": ""}, "snippet": " validKeys = DEFAULT_COMPILER_SETTINGS.keys()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L548_C12", "label": "if", "type": "if", "loc": [548, 550], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L537_C8", "vector": [4, 3, 0.8687, 0.0047, 3, 0.72, 0.4, 0, 5, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if [k for k in settings.keys() if k not in validKeys]:\n self.error(\n 'The --setting \"%s\" is not a valid compiler setting name.'%k)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L549_C16", "label": "error()", "type": "expression", "loc": [549, 550], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L548_C12", "vector": [8, 4, 0.8695, 0.0032, 4, 0.26, 0.0, 771, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "error", "arg_names": [], "import_names": [], "rhs_call_name": "error", "annotation": ""}, "snippet": " self.error(\n 'The --setting \"%s\" is not a valid compiler setting name.'%k)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L552_C12", "label": "self._compilerSettings =", "type": "assigned_variable", "loc": [552, 552], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L537_C8", "vector": [14, 3, 0.8734, 0.0016, 3, 0.72, 0.6, 683, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._compilerSettings", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._compilerSettings = settings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L553_C12", "label": "return", "type": "return", "loc": [553, 553], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L537_C8", "vector": [13, 3, 0.875, 0.0016, 3, 0.72, 0.8, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return settings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L555_C12", "label": "return", "type": "return", "loc": [555, 555], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L537_C8", "vector": [13, 3, 0.8782, 0.0016, 3, 0.72, 1.0, 0, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L557_C4", "label": "_compileOrFillStdin", "type": "function", "loc": [557, 567], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.8892, 0.0174, 1, 0.74, 0.9615, 467, 0, 1, 0, 0, 0, 0, 6], "semantic": {"name": "_compileOrFillStdin", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _compileOrFillStdin(self):\n TemplateClass = self._getTemplateClass()\n compilerSettings = self._getCompilerSettings()\n if self.isCompile:\n pysrc = TemplateClass.compile(file=sys.stdin,\n compilerSettings=compilerSettings,\n returnAClass=False)\n output = pysrc"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L558_C8", "label": "TemplateClass = _getTemplateClass()", "type": "assigned_variable", "loc": [558, 558], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L557_C4", "vector": [14, 2, 0.8829, 0.0016, 2, 0.8, 0.0, 751, 3, 0, 0, 0, 717, 10, 1], "semantic": {"name": "TemplateClass", "arg_names": [], "import_names": [], "rhs_call_name": "_getTemplateClass", "annotation": ""}, "snippet": " TemplateClass = self._getTemplateClass()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L559_C8", "label": "compilerSettings = _getCompilerSettings()", "type": "assigned_variable", "loc": [559, 559], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L557_C4", "vector": [14, 2, 0.8845, 0.0016, 2, 0.8, 0.3333, 181, 3, 0, 0, 0, 24, 10, 1], "semantic": {"name": "compilerSettings", "arg_names": [], "import_names": [], "rhs_call_name": "_getCompilerSettings", "annotation": ""}, "snippet": " compilerSettings = self._getCompilerSettings()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L560_C8", "label": "if", "type": "if", "loc": [560, 566], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L557_C4", "vector": [4, 2, 0.8908, 0.0111, 2, 0.8, 0.6667, 0, 7, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.isCompile:\n pysrc = TemplateClass.compile(file=sys.stdin,\n compilerSettings=compilerSettings,\n returnAClass=False)\n output = pysrc\n else:\n output = str(TemplateClass(file=sys.stdin, compilerSettings=compilerSettings))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L561_C12", "label": "pysrc = compile()", "type": "assigned_variable", "loc": [561, 563], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L560_C8", "vector": [14, 3, 0.8892, 0.0047, 3, 0.79, 0.0, 789, 3, 3, 0, 0, 821, 10, 1], "semantic": {"name": "pysrc", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " pysrc = TemplateClass.compile(file=sys.stdin,\n compilerSettings=compilerSettings,\n returnAClass=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L564_C12", "label": "output =", "type": "assigned_variable", "loc": [564, 564], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L560_C8", "vector": [14, 3, 0.8924, 0.0016, 3, 0.79, 0.5, 886, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "output", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " output = pysrc"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L566_C12", "label": "output = str()", "type": "assigned_variable", "loc": [566, 566], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L560_C8", "vector": [14, 3, 0.8956, 0.0016, 3, 0.79, 1.0, 886, 3, 1, 0, 0, 52, 10, 2], "semantic": {"name": "output", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " output = str(TemplateClass(file=sys.stdin, compilerSettings=compilerSettings))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L567_C8", "label": "write()", "type": "expression", "loc": [567, 567], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L557_C4", "vector": [8, 2, 0.8972, 0.0016, 2, 0.8, 1.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stdout.write(output)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "label": "_compileOrFillBundle", "type": "function", "loc": [569, 615], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "vector": [2, 1, 0.9367, 0.0744, 1, 0.74, 1.0, 777, 0, 2, 0, 0, 0, 0, 21], "semantic": {"name": "_compileOrFillBundle", "arg_names": ["self", "b"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _compileOrFillBundle(self, b):\n C, D, W = self.chatter, self.debug, self.warn\n TemplateClass = self._getTemplateClass()\n compilerSettings = self._getCompilerSettings()\n src = b.src\n dst = b.dst\n base = b.base\n basename = b.basename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L570_C8", "label": "C, D, W =", "type": "assigned_variable", "loc": [570, 570], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "vector": [14, 2, 0.9019, 0.0016, 2, 0.0, 0.0, 533, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "C, D, W", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " C, D, W = self.chatter, self.debug, self.warn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L571_C8", "label": "TemplateClass = _getTemplateClass()", "type": "assigned_variable", "loc": [571, 571], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "vector": [14, 2, 0.9035, 0.0016, 2, 0.0, 0.0714, 751, 3, 0, 0, 0, 717, 10, 1], "semantic": {"name": "TemplateClass", "arg_names": [], "import_names": [], "rhs_call_name": "_getTemplateClass", "annotation": ""}, "snippet": " TemplateClass = self._getTemplateClass()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L572_C8", "label": "compilerSettings = _getCompilerSettings()", "type": "assigned_variable", "loc": [572, 572], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "vector": [14, 2, 0.9051, 0.0016, 2, 0.0, 0.1429, 181, 3, 0, 0, 0, 24, 10, 1], "semantic": {"name": "compilerSettings", "arg_names": [], "import_names": [], "rhs_call_name": "_getCompilerSettings", "annotation": ""}, "snippet": " compilerSettings = self._getCompilerSettings()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L573_C8", "label": "src =", "type": "assigned_variable", "loc": [573, 573], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "vector": [14, 2, 0.9066, 0.0016, 2, 0.0, 0.2143, 345, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "src", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " src = b.src"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L574_C8", "label": "dst =", "type": "assigned_variable", "loc": [574, 574], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "vector": [14, 2, 0.9082, 0.0016, 2, 0.0, 0.2857, 856, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "dst", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " dst = b.dst"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L575_C8", "label": "base =", "type": "assigned_variable", "loc": [575, 575], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "vector": [14, 2, 0.9098, 0.0016, 2, 0.0, 0.3571, 47, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " base = b.base"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L576_C8", "label": "basename =", "type": "assigned_variable", "loc": [576, 576], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "vector": [14, 2, 0.9114, 0.0016, 2, 0.0, 0.4286, 164, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "basename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " basename = b.basename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L577_C8", "label": "dstDir = dirname()", "type": "assigned_variable", "loc": [577, 577], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "vector": [14, 2, 0.913, 0.0016, 2, 0.0, 0.5, 540, 3, 1, 0, 0, 959, 10, 1], "semantic": {"name": "dstDir", "arg_names": [], "import_names": [], "rhs_call_name": "dirname", "annotation": ""}, "snippet": " dstDir = os.path.dirname(dst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L578_C8", "label": "what =", "type": "assigned_variable", "loc": [578, 578], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "vector": [14, 2, 0.9146, 0.0016, 2, 0.0, 0.5714, 63, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "what", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " what = self.isCompile and \"Compiling\" or \"Filling\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L579_C8", "label": "C()", "type": "expression", "loc": [579, 579], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "vector": [8, 2, 0.9161, 0.0016, 2, 0.0, 0.6429, 619, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "C", "arg_names": [], "import_names": [], "rhs_call_name": "C", "annotation": ""}, "snippet": " C(\"%s %s -> %s^\", what, src, dst) # No trailing newline."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L580_C8", "label": "if", "type": "if", "loc": [580, 585], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "vector": [4, 2, 0.9217, 0.0095, 2, 0.0, 0.7143, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if os.path.exists(dst) and not self.opts.nobackup:\n bak = b.bak\n C(\" (backup %s)\", bak) # On same line as previous message.\n else:\n bak = None\n C(\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L581_C12", "label": "bak =", "type": "assigned_variable", "loc": [581, 581], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L580_C8", "vector": [14, 3, 0.9193, 0.0016, 3, 0.39, 0.0, 660, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "bak", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " bak = b.bak"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L582_C12", "label": "C()", "type": "expression", "loc": [582, 582], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L580_C8", "vector": [8, 3, 0.9209, 0.0016, 3, 0.39, 0.3333, 619, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "C", "arg_names": [], "import_names": [], "rhs_call_name": "C", "annotation": ""}, "snippet": " C(\" (backup %s)\", bak) # On same line as previous message."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L584_C12", "label": "bak =", "type": "assigned_variable", "loc": [584, 584], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L580_C8", "vector": [14, 3, 0.9241, 0.0016, 3, 0.39, 0.6667, 660, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "bak", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " bak = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L585_C12", "label": "C()", "type": "expression", "loc": [585, 585], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L580_C8", "vector": [8, 3, 0.9256, 0.0016, 3, 0.39, 1.0, 619, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "C", "arg_names": [], "import_names": [], "rhs_call_name": "C", "annotation": ""}, "snippet": " C(\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L586_C8", "label": "if", "type": "if", "loc": [586, 601], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "vector": [4, 2, 0.9391, 0.0253, 2, 0.0, 0.7857, 0, 7, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.isCompile:\n if not moduleNameRE.match(basename):\n tup = basename, src\n raise Error(\"\"\"\\\n%s: base name %s contains invalid characters. It must\nbe named according to the same rules as Python modules.\"\"\" % tup)\n pysrc = TemplateClass.compile(file=src, returnAClass=False,\n moduleName=basename,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L587_C12", "label": "if", "type": "if", "loc": [587, 591], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L586_C8", "vector": [4, 3, 0.932, 0.0079, 3, 0.62, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not moduleNameRE.match(basename):\n tup = basename, src\n raise Error(\"\"\"\\\n%s: base name %s contains invalid characters. It must\nbe named according to the same rules as Python modules.\"\"\" % tup)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L588_C16", "label": "tup =", "type": "assigned_variable", "loc": [588, 588], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L587_C12", "vector": [14, 4, 0.9304, 0.0016, 4, 0.83, 0.0, 218, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "tup", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " tup = basename, src"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L592_C12", "label": "pysrc = compile()", "type": "assigned_variable", "loc": [592, 596], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L586_C8", "vector": [14, 3, 0.9399, 0.0079, 3, 0.62, 0.25, 789, 3, 6, 0, 0, 821, 10, 1], "semantic": {"name": "pysrc", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " pysrc = TemplateClass.compile(file=src, returnAClass=False,\n moduleName=basename,\n className=basename,\n commandlineopts=self.opts,\n compilerSettings=compilerSettings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L597_C12", "label": "output =", "type": "assigned_variable", "loc": [597, 597], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L586_C8", "vector": [14, 3, 0.9446, 0.0016, 3, 0.62, 0.5, 886, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "output", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " output = pysrc"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L600_C12", "label": "tclass = compile()", "type": "assigned_variable", "loc": [600, 600], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L586_C8", "vector": [14, 3, 0.9494, 0.0016, 3, 0.62, 0.75, 293, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "tclass", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " tclass = TemplateClass.compile(file=src, compilerSettings=compilerSettings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L601_C12", "label": "output = str()", "type": "assigned_variable", "loc": [601, 601], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L586_C8", "vector": [14, 3, 0.9509, 0.0016, 3, 0.62, 1.0, 886, 3, 1, 0, 0, 52, 10, 2], "semantic": {"name": "output", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " output = str(tclass(searchList=self.searchList))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L603_C8", "label": "if", "type": "if", "loc": [603, 604], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "vector": [4, 2, 0.9549, 0.0032, 2, 0.0, 0.8571, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if bak:\n shutil.copyfile(dst, bak)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L604_C12", "label": "copyfile()", "type": "expression", "loc": [604, 604], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L603_C8", "vector": [8, 3, 0.9557, 0.0016, 3, 0.27, 0.0, 918, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "copyfile", "arg_names": [], "import_names": [], "rhs_call_name": "copyfile", "annotation": ""}, "snippet": " shutil.copyfile(dst, bak)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L605_C8", "label": "if", "type": "if", "loc": [605, 609], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "vector": [4, 2, 0.9604, 0.0079, 2, 0.0, 0.9286, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if dstDir and not os.path.exists(dstDir):\n if self.isCompile:\n mkdirsWithPyInitFiles(dstDir)\n else:\n os.makedirs(dstDir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L606_C12", "label": "if", "type": "if", "loc": [606, 609], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L605_C8", "vector": [4, 3, 0.9612, 0.0063, 3, 0.2, 0.0, 0, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.isCompile:\n mkdirsWithPyInitFiles(dstDir)\n else:\n os.makedirs(dstDir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L607_C16", "label": "mkdirsWithPyInitFiles()", "type": "expression", "loc": [607, 607], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L606_C12", "vector": [8, 4, 0.9604, 0.0016, 4, 0.83, 0.0, 198, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "mkdirsWithPyInitFiles", "arg_names": [], "import_names": [], "rhs_call_name": "mkdirsWithPyInitFiles", "annotation": ""}, "snippet": " mkdirsWithPyInitFiles(dstDir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L609_C16", "label": "makedirs()", "type": "expression", "loc": [609, 609], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L606_C12", "vector": [8, 4, 0.9636, 0.0016, 4, 0.83, 1.0, 349, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "makedirs", "arg_names": [], "import_names": [], "rhs_call_name": "makedirs", "annotation": ""}, "snippet": " os.makedirs(dstDir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L610_C8", "label": "if", "type": "if", "loc": [610, 615], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "vector": [4, 2, 0.9691, 0.0095, 2, 0.0, 1.0, 0, 7, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.opts.stdout:\n sys.stdout.write(output)\n else:\n f = open(dst, 'w')\n f.write(output)\n f.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L611_C12", "label": "write()", "type": "expression", "loc": [611, 611], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L610_C8", "vector": [8, 3, 0.9668, 0.0016, 3, 0.69, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stdout.write(output)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L613_C12", "label": "f = open()", "type": "assigned_variable", "loc": [613, 613], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L610_C8", "vector": [14, 3, 0.9699, 0.0016, 3, 0.69, 0.3333, 899, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " f = open(dst, 'w')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L614_C12", "label": "write()", "type": "expression", "loc": [614, 614], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L610_C8", "vector": [8, 3, 0.9715, 0.0016, 3, 0.69, 0.6667, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " f.write(output)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L615_C12", "label": "close()", "type": "expression", "loc": [615, 615], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L610_C8", "vector": [8, 3, 0.9731, 0.0016, 3, 0.69, 1.0, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " f.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L619_C0", "label": "_cheetah", "type": "function", "loc": [619, 620], "level": 0, "parent": null, "vector": [2, 0, 0.9802, 0.0032, 0, 0.66, 0.9, 423, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "_cheetah", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def _cheetah():\n CheetahWrapper().main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L620_C4", "label": "main()", "type": "expression", "loc": [620, 620], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L619_C0", "vector": [8, 1, 0.981, 0.0016, 1, 0.6, 0.0, 624, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " CheetahWrapper().main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L623_C0", "label": "_cheetah_compile", "type": "function", "loc": [623, 625], "level": 0, "parent": null, "vector": [2, 0, 0.9873, 0.0047, 0, 0.66, 0.95, 21, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "_cheetah_compile", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def _cheetah_compile():\n sys.argv.insert(1, \"compile\")\n CheetahWrapper().main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L624_C4", "label": "insert()", "type": "expression", "loc": [624, 624], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L623_C0", "vector": [8, 1, 0.9873, 0.0016, 1, 0.52, 0.0, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " sys.argv.insert(1, \"compile\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L625_C4", "label": "main()", "type": "expression", "loc": [625, 625], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L623_C0", "vector": [8, 1, 0.9889, 0.0016, 1, 0.52, 1.0, 624, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " CheetahWrapper().main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L630_C0", "label": "if", "type": "if", "loc": [630, 630], "level": 0, "parent": null, "vector": [4, 0, 0.9968, 0.0016, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__': CheetahWrapper().main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L630_C28", "label": "main()", "type": "expression", "loc": [630, 630], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L630_C0", "vector": [8, 1, 0.9968, 0.0016, 1, 0.29, 0.0, 624, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": "if __name__ == '__main__': CheetahWrapper().main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L34_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L35_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L34_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L64_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L64_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L64_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L64_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L67_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L102_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L103_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L104_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L105_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L107_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L109_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L110_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L112_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L113_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L119_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L119_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L120_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L119_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L122_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L122_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L123_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L119_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L126_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L126_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L127_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L126_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L128_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L126_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L129_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L129_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L130_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L129_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L132_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L126_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L134_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L119_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L137_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L119_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L139_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L139_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L140_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L139_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L143_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L139_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L144_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L144_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L148_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L144_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L149_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L119_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L151_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L154_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L155_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L156_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L157_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L158_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L159_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L160_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L161_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L162_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L163_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L164_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L166_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L167_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L168_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L169_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L170_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L171_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L172_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L173_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L174_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L175_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L177_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L178_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L179_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L180_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L179_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L181_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L181_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L182_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L181_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L183_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L183_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L184_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L183_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L186_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L179_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L187_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L188_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L190_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L197_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L197_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L198_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L197_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L199_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L197_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:ImportFrom_L200_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L197_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L201_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L197_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L202_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L197_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L204_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L204_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L205_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L197_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L206_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L209_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L210_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L210_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L211_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L211_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L212_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L211_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L213_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L213_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L214_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L213_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L215_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L218_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L219_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L220_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L221_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L221_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L222_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L221_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L223_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L221_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L224_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L221_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L225_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L230_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L230_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L231_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L233_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:ImportFrom_L234_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L235_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L236_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L238_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L238_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L239_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L241_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L241_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L242_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L246_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L247_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L247_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L248_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L247_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L250_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L247_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L255_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L247_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L256_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:ImportFrom_L258_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Import_L259_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L260_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L261_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L261_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L262_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L263_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L263_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L264_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L265_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L266_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L268_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L268_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L269_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L276_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L277_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L280_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L280_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L281_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L282_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L285_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L285_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L286_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L285_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L289_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L289_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L290_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L292_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L292_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L293_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L292_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L295_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L297_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L297_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L298_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L297_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L300_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L297_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L301_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L307_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L307_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L309_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L307_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L310_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L310_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L311_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L307_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L312_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L312_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L313_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L318_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L319_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L320_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L320_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L321_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L320_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L322_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L320_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L323_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L323_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L324_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L323_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L325_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L323_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L326_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L323_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L327_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L323_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L328_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L323_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L329_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L329_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L330_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L329_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L332_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L333_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L334_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L335_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L336_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L337_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L337_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L338_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L317_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L347_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L347_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L348_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L347_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L349_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L347_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L351_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L351_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L352_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L351_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L353_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L351_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L354_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L347_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L356_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L356_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L357_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L356_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L358_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L356_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L359_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L359_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L360_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L359_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L362_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L359_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L363_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L356_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L365_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L365_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L366_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L365_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L367_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L347_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L370_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L370_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L371_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L370_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L372_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L372_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L373_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L347_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L375_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L375_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L376_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L347_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L379_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L379_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L380_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L383_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L386_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L387_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L388_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L389_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L389_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L390_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L390_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L391_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L390_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L393_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L394_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L395_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L395_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L396_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L395_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L397_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L397_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L398_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L397_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L399_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L397_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L400_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L397_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L401_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L382_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L402_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L402_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L403_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L402_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L404_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L407_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L407_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L408_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L407_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L412_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L407_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L413_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L413_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L414_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L413_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L415_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L415_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L416_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L415_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L417_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L417_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L418_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L422_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L422_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L423_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L422_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L426_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L422_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L427_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L422_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L428_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L422_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L429_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L422_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L430_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L430_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L431_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L430_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L432_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L430_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L433_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L430_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L434_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L430_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L435_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L435_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L436_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L436_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L437_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L435_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L440_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L440_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L441_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L440_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L442_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L442_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L444_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L442_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L446_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L446_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L447_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L446_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L449_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L430_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L450_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L450_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L451_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L422_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L452_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L456_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L457_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L458_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L459_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L460_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L461_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L462_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L463_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L466_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L467_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L467_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L468_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L469_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L469_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L470_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L471_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L472_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L472_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L473_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L472_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L475_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L472_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L476_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L476_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L477_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L476_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L478_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L478_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L479_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L478_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L480_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L480_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L481_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L480_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L482_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L482_C28", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L483_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L478_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L485_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:While_L478_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L486_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L476_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L488_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L476_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L490_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L491_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L492_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:For_L464_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L493_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L455_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L494_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L498_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L499_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L500_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L500_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L501_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L503_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L505_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L505_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L506_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L507_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L508_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L508_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L509_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L513_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L515_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L517_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L517_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L518_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L517_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L520_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L522_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L497_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L523_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L523_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L524_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L523_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L525_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L523_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L527_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L531_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L531_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L532_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L532_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L533_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L531_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L535_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L535_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L536_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L531_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L537_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L537_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L538_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L538_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L539_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:Try_L538_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L541_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L537_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L547_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L537_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L548_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L548_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L549_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L537_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L552_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L537_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L553_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L537_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Return_L555_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L557_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L557_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L558_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L557_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L559_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L557_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L560_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L560_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L561_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L560_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L564_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L560_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L566_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L557_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L567_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:ClassDef_L101_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L570_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L571_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L572_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L573_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L574_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L575_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L576_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L577_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L578_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L579_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L580_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L580_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L581_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L580_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L582_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L580_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L584_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L580_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L585_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L586_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L586_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L587_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L587_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L588_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L586_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L592_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L586_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L597_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L586_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L600_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L586_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L601_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L603_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L603_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L604_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L605_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L605_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L606_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L606_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L607_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L606_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L609_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L569_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L610_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L610_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L611_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L610_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Assign_L613_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L610_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L614_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L610_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L615_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L619_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L620_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L623_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L624_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:FunctionDef_L623_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L625_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1464:If_L630_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1464:Expr_L630_C28"}]
''' Provides an abstract Servlet baseclass for Cheetah's Template class ''' import sys import os.path isWebwareInstalled = False try: try: from ds.appserver.Servlet import Servlet as BaseServlet except: from WebKit.Servlet import Servlet as BaseServlet isWebwareInstalled = True if not issubclass(BaseServlet, object): class NewStyleBaseServlet(BaseServlet, object): pass BaseServlet = NewStyleBaseServlet except: class BaseServlet(object): _reusable = 1 _threadSafe = 0 def awake(self, transaction): pass def sleep(self, transaction): pass def shutdown(self): pass ################################################## ## CLASSES class Servlet(BaseServlet): """This class is an abstract baseclass for Cheetah.Template.Template. It wraps WebKit.Servlet and provides a few extra convenience methods that are also found in WebKit.Page. It doesn't do any of the HTTP method resolution that is done in WebKit.HTTPServlet """ transaction = None application = None request = None session = None def __init__(self, *args, **kwargs): super(Servlet, self).__init__(*args, **kwargs) # this default will be changed by the .awake() method self._CHEETAH__isControlledByWebKit = False ## methods called by Webware during the request-response def awake(self, transaction): super(Servlet, self).awake(transaction) # a hack to signify that the servlet is being run directly from WebKit self._CHEETAH__isControlledByWebKit = True self.transaction = transaction #self.application = transaction.application self.response = response = transaction.response self.request = transaction.request # Temporary hack to accomodate bug in # WebKit.Servlet.Servlet.serverSidePath: it uses # self._request even though this attribute does not exist. # This attribute WILL disappear in the future. self._request = transaction.request() self.session = transaction.session self.write = response().write #self.writeln = response.writeln def respond(self, trans=None): raise NotImplementedError("""\ couldn't find the template's main method. If you are using #extends without #implements, try adding '#implements respond' to your template definition.""") def sleep(self, transaction): super(Servlet, self).sleep(transaction) self.session = None self.request = None self._request = None self.response = None self.transaction = None def shutdown(self): pass def serverSidePath(self, path=None, normpath=os.path.normpath, abspath=os.path.abspath ): if self._CHEETAH__isControlledByWebKit: return super(Servlet, self).serverSidePath(path) elif path: return normpath(abspath(path.replace("\\", '/'))) elif hasattr(self, '_filePath') and self._filePath: return normpath(abspath(self._filePath)) else: return None # vim: shiftwidth=4 tabstop=4 expandtab
ajibawa-2023/Python-Code-Large/train/row_1465
53
112
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0179, 0.0268, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nProvides an abstract Servlet baseclass for Cheetah's Template class\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Import_L5_C0", "label": "sys import sys", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0446, 0.0089, 0, 0.66, 0.2, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Import_L6_C0", "label": "os.path import os.path", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0536, 0.0089, 0, 0.66, 0.4, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os.path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L8_C0", "label": "isWebwareInstalled =", "type": "assigned_variable", "loc": [8, 8], "level": 0, "parent": null, "vector": [14, 0, 0.0714, 0.0089, 0, 0.66, 0.6, 646, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "isWebwareInstalled", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "isWebwareInstalled = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Try_L9_C0", "label": "try", "type": "try", "loc": [9, 32], "level": 0, "parent": null, "vector": [7, 0, 0.183, 0.2143, 0, 0.66, 0.8, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n try:\n from ds.appserver.Servlet import Servlet as BaseServlet\n except:\n from WebKit.Servlet import Servlet as BaseServlet\n isWebwareInstalled = True\n\n if not issubclass(BaseServlet, object):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Try_L10_C4", "label": "try", "type": "try", "loc": [10, 13], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:Try_L9_C0", "vector": [7, 1, 0.1027, 0.0357, 1, 0.32, 0.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n from ds.appserver.Servlet import Servlet as BaseServlet\n except:\n from WebKit.Servlet import Servlet as BaseServlet"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:ImportFrom_L11_C8", "label": "from ds.appserver.Servlet import BaseServlet", "type": "import", "loc": [11, 11], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:Try_L10_C4", "vector": [1, 2, 0.0982, 0.0089, 2, 0.26, 0.0, 228, 0, 1, 0, 0, 228, 0, 0], "semantic": {"name": "ds.appserver.Servlet", "arg_names": [], "import_names": ["BaseServlet"], "rhs_call_name": "", "annotation": ""}, "snippet": " from ds.appserver.Servlet import Servlet as BaseServlet"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:ImportFrom_L13_C8", "label": "from WebKit.Servlet import BaseServlet", "type": "import", "loc": [13, 13], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:Try_L10_C4", "vector": [1, 2, 0.1161, 0.0089, 2, 0.26, 0.0, 348, 0, 1, 0, 0, 348, 0, 0], "semantic": {"name": "WebKit.Servlet", "arg_names": [], "import_names": ["BaseServlet"], "rhs_call_name": "", "annotation": ""}, "snippet": " from WebKit.Servlet import Servlet as BaseServlet"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L14_C4", "label": "isWebwareInstalled =", "type": "assigned_variable", "loc": [14, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:Try_L9_C0", "vector": [14, 1, 0.125, 0.0089, 1, 0.32, 0.5, 646, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "isWebwareInstalled", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isWebwareInstalled = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L16_C4", "label": "if", "type": "if", "loc": [16, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:Try_L9_C0", "vector": [4, 1, 0.1562, 0.0357, 1, 0.32, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not issubclass(BaseServlet, object):\n class NewStyleBaseServlet(BaseServlet, object):\n pass\n BaseServlet = NewStyleBaseServlet"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L17_C8", "label": "NewStyleBaseServlet", "type": "class", "loc": [17, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L16_C4", "vector": [3, 2, 0.1562, 0.0179, 2, 0.13, 0.0, 155, 0, 0, 0, 0, 416, 0, 0], "semantic": {"name": "NewStyleBaseServlet", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class NewStyleBaseServlet(BaseServlet, object):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L19_C8", "label": "BaseServlet =", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L16_C4", "vector": [14, 2, 0.1696, 0.0089, 2, 0.13, 1.0, 416, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "BaseServlet", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " BaseServlet = NewStyleBaseServlet"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L21_C4", "label": "BaseServlet", "type": "class", "loc": [21, 32], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:Try_L9_C0", "vector": [3, 1, 0.2366, 0.1071, 1, 0.32, 0.0, 416, 0, 3, 0, 0, 186, 0, 0], "semantic": {"name": "BaseServlet", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class BaseServlet(object): \n _reusable = 1\n _threadSafe = 0\n \n def awake(self, transaction):\n pass\n \n def sleep(self, transaction):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L22_C8", "label": "_reusable =", "type": "assigned_variable", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L21_C4", "vector": [14, 2, 0.1964, 0.0089, 2, 0.53, 0.0, 212, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "_reusable", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _reusable = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L23_C8", "label": "_threadSafe =", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L21_C4", "vector": [14, 2, 0.2054, 0.0089, 2, 0.53, 0.25, 687, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "_threadSafe", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _threadSafe = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L25_C8", "label": "awake", "type": "function", "loc": [25, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L21_C4", "vector": [2, 2, 0.2277, 0.0179, 2, 0.53, 0.5, 91, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "awake", "arg_names": ["self", "transaction"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def awake(self, transaction):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L28_C8", "label": "sleep", "type": "function", "loc": [28, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L21_C4", "vector": [2, 2, 0.2545, 0.0179, 2, 0.53, 0.75, 476, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "sleep", "arg_names": ["self", "transaction"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def sleep(self, transaction):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L31_C8", "label": "shutdown", "type": "function", "loc": [31, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L21_C4", "vector": [2, 2, 0.2812, 0.0179, 2, 0.53, 1.0, 322, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "shutdown", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def shutdown(self):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "label": "Servlet", "type": "class", "loc": [37, 110], "level": 0, "parent": null, "vector": [3, 0, 0.6562, 0.6607, 0, 0.66, 1.0, 291, 0, 6, 0, 0, 416, 0, 17], "semantic": {"name": "Servlet", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Servlet(BaseServlet):\n \n \"\"\"This class is an abstract baseclass for Cheetah.Template.Template.\n\n It wraps WebKit.Servlet and provides a few extra convenience methods that\n are also found in WebKit.Page. It doesn't do any of the HTTP method\n resolution that is done in WebKit.HTTPServlet\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Expr_L39_C4", "label": "expression", "type": "expression", "loc": [39, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "vector": [8, 1, 0.3705, 0.0536, 1, 0.94, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"This class is an abstract baseclass for Cheetah.Template.Template.\n\n It wraps WebKit.Servlet and provides a few extra convenience methods that\n are also found in WebKit.Page. It doesn't do any of the HTTP method\n resolution that is done in WebKit.HTTPServlet\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L46_C4", "label": "transaction =", "type": "assigned_variable", "loc": [46, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "vector": [14, 1, 0.4107, 0.0089, 1, 0.94, 0.1, 502, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "transaction", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " transaction = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L47_C4", "label": "application =", "type": "assigned_variable", "loc": [47, 47], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "vector": [14, 1, 0.4196, 0.0089, 1, 0.94, 0.2, 244, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "application", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " application = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L48_C4", "label": "request =", "type": "assigned_variable", "loc": [48, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "vector": [14, 1, 0.4286, 0.0089, 1, 0.94, 0.3, 50, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "request", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " request = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L49_C4", "label": "session =", "type": "assigned_variable", "loc": [49, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "vector": [14, 1, 0.4375, 0.0089, 1, 0.94, 0.4, 83, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "session", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " session = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L51_C4", "label": "__init__", "type": "function", "loc": [51, 55], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "vector": [2, 1, 0.4732, 0.0446, 1, 0.94, 0.5, 555, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, *args, **kwargs):\n super(Servlet, self).__init__(*args, **kwargs)\n \n # this default will be changed by the .awake() method\n self._CHEETAH__isControlledByWebKit = False "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Expr_L52_C8", "label": "__init__()", "type": "expression", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L51_C4", "vector": [8, 2, 0.4643, 0.0089, 2, 0.28, 0.0, 555, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(Servlet, self).__init__(*args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L55_C8", "label": "self._CHEETAH__isControlledByWebKit =", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L51_C4", "vector": [14, 2, 0.4911, 0.0089, 2, 0.28, 1.0, 865, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._CHEETAH__isControlledByWebKit", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._CHEETAH__isControlledByWebKit = False "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "label": "awake", "type": "function", "loc": [59, 78], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "vector": [2, 1, 0.6116, 0.1786, 1, 0.94, 0.6, 91, 0, 2, 0, 0, 0, 0, 4], "semantic": {"name": "awake", "arg_names": ["self", "transaction"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def awake(self, transaction):\n super(Servlet, self).awake(transaction)\n \n # a hack to signify that the servlet is being run directly from WebKit\n self._CHEETAH__isControlledByWebKit = True\n \n self.transaction = transaction \n #self.application = transaction.application"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Expr_L60_C8", "label": "awake()", "type": "expression", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "vector": [8, 2, 0.5357, 0.0089, 2, 0.98, 0.0, 91, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "awake", "arg_names": [], "import_names": [], "rhs_call_name": "awake", "annotation": ""}, "snippet": " super(Servlet, self).awake(transaction)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L63_C8", "label": "self._CHEETAH__isControlledByWebKit =", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "vector": [14, 2, 0.5625, 0.0089, 2, 0.98, 0.1429, 865, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._CHEETAH__isControlledByWebKit", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._CHEETAH__isControlledByWebKit = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L65_C8", "label": "self.transaction =", "type": "assigned_variable", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "vector": [14, 2, 0.5804, 0.0089, 2, 0.98, 0.2857, 936, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.transaction", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.transaction = transaction "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L67_C8", "label": "self.response =", "type": "assigned_variable", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "vector": [14, 2, 0.5982, 0.0089, 2, 0.98, 0.4286, 498, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.response", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.response = response = transaction.response"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L68_C8", "label": "self.request =", "type": "assigned_variable", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "vector": [14, 2, 0.6071, 0.0089, 2, 0.98, 0.5714, 952, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.request", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.request = transaction.request"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L74_C8", "label": "self._request = request()", "type": "assigned_variable", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "vector": [14, 2, 0.6607, 0.0089, 2, 0.98, 0.7143, 149, 3, 0, 0, 0, 50, 10, 1], "semantic": {"name": "self._request", "arg_names": [], "import_names": [], "rhs_call_name": "request", "annotation": ""}, "snippet": " self._request = transaction.request()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L77_C8", "label": "self.session =", "type": "assigned_variable", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "vector": [14, 2, 0.6875, 0.0089, 2, 0.98, 0.8571, 77, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.session", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.session = transaction.session"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L78_C8", "label": "self.write =", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "vector": [14, 2, 0.6964, 0.0089, 2, 0.98, 1.0, 877, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "self.write", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.write = response().write"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L81_C4", "label": "respond", "type": "function", "loc": [81, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "vector": [2, 1, 0.7411, 0.0446, 1, 0.94, 0.7, 100, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "respond", "arg_names": ["self", "trans"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def respond(self, trans=None):\n raise NotImplementedError(\"\"\"\\\ncouldn't find the template's main method. If you are using #extends\nwithout #implements, try adding '#implements respond' to your template\ndefinition.\"\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L87_C4", "label": "sleep", "type": "function", "loc": [87, 93], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "vector": [2, 1, 0.8036, 0.0625, 1, 0.94, 0.8, 476, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "sleep", "arg_names": ["self", "transaction"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def sleep(self, transaction):\n super(Servlet, self).sleep(transaction)\n self.session = None\n self.request = None\n self._request = None \n self.response = None\n self.transaction = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Expr_L88_C8", "label": "sleep()", "type": "expression", "loc": [88, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L87_C4", "vector": [8, 2, 0.7857, 0.0089, 2, 0.16, 0.0, 476, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "sleep", "arg_names": [], "import_names": [], "rhs_call_name": "sleep", "annotation": ""}, "snippet": " super(Servlet, self).sleep(transaction)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L89_C8", "label": "self.session =", "type": "assigned_variable", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L87_C4", "vector": [14, 2, 0.7946, 0.0089, 2, 0.16, 0.2, 77, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.session", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.session = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L90_C8", "label": "self.request =", "type": "assigned_variable", "loc": [90, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L87_C4", "vector": [14, 2, 0.8036, 0.0089, 2, 0.16, 0.4, 952, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.request", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.request = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L91_C8", "label": "self._request =", "type": "assigned_variable", "loc": [91, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L87_C4", "vector": [14, 2, 0.8125, 0.0089, 2, 0.16, 0.6, 149, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._request", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._request = None "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L92_C8", "label": "self.response =", "type": "assigned_variable", "loc": [92, 92], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L87_C4", "vector": [14, 2, 0.8214, 0.0089, 2, 0.16, 0.8, 498, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.response", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.response = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L93_C8", "label": "self.transaction =", "type": "assigned_variable", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L87_C4", "vector": [14, 2, 0.8304, 0.0089, 2, 0.16, 1.0, 936, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.transaction", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.transaction = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L95_C4", "label": "shutdown", "type": "function", "loc": [95, 96], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "vector": [2, 1, 0.8527, 0.0179, 1, 0.94, 0.9, 322, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "shutdown", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def shutdown(self):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L98_C4", "label": "serverSidePath", "type": "function", "loc": [98, 110], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "vector": [2, 1, 0.9286, 0.1161, 1, 0.94, 1.0, 516, 0, 4, 1, 0, 0, 0, 8], "semantic": {"name": "serverSidePath", "arg_names": ["self", "path", "normpath", "abspath"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def serverSidePath(self, path=None,\n normpath=os.path.normpath,\n abspath=os.path.abspath\n ):\n \n if self._CHEETAH__isControlledByWebKit:\n return super(Servlet, self).serverSidePath(path)\n elif path:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L103_C8", "label": "if", "type": "if", "loc": [103, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L98_C4", "vector": [4, 2, 0.9509, 0.0714, 2, 0.97, 0.0, 0, 7, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._CHEETAH__isControlledByWebKit:\n return super(Servlet, self).serverSidePath(path)\n elif path:\n return normpath(abspath(path.replace(\"\\\\\", '/')))\n elif hasattr(self, '_filePath') and self._filePath:\n return normpath(abspath(self._filePath))\n else:\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Return_L104_C12", "label": "return", "type": "return", "loc": [104, 104], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L103_C8", "vector": [13, 3, 0.9286, 0.0089, 3, 0.41, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return super(Servlet, self).serverSidePath(path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L105_C8", "label": "if", "type": "if", "loc": [105, 110], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L103_C8", "vector": [4, 3, 0.9598, 0.0536, 3, 0.41, 1.0, 0, 2, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif path:\n return normpath(abspath(path.replace(\"\\\\\", '/')))\n elif hasattr(self, '_filePath') and self._filePath:\n return normpath(abspath(self._filePath))\n else:\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Return_L106_C12", "label": "return", "type": "return", "loc": [106, 106], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L105_C8", "vector": [13, 4, 0.9464, 0.0089, 4, 0.98, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return normpath(abspath(path.replace(\"\\\\\", '/')))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L107_C8", "label": "if", "type": "if", "loc": [107, 110], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L105_C8", "vector": [4, 4, 0.9688, 0.0357, 4, 0.98, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif hasattr(self, '_filePath') and self._filePath:\n return normpath(abspath(self._filePath))\n else:\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Return_L108_C12", "label": "return", "type": "return", "loc": [108, 108], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L107_C8", "vector": [13, 5, 0.9643, 0.0089, 5, 0.74, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return normpath(abspath(self._filePath))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1465:Return_L110_C12", "label": "return", "type": "return", "loc": [110, 110], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L107_C8", "vector": [13, 5, 0.9821, 0.0089, 5, 0.74, 1.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1465:Try_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Try_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:Try_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:ImportFrom_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:Try_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:ImportFrom_L13_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:Try_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:Try_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:Try_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L25_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L28_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Expr_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Expr_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Expr_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L67_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L74_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L81_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L87_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L87_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Expr_L88_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L87_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L89_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L87_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L90_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L87_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L91_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L87_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L87_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Assign_L93_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L98_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L103_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L103_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Return_L104_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L103_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L105_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L105_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Return_L106_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L105_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L107_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Return_L108_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1465:If_L107_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1465:Return_L110_C12"}]
# $Id: ErrorCatchers.py,v 1.7 2005/01/03 19:59:07 tavis_rudd Exp $ """ErrorCatcher class for Cheetah Templates Meta-Data ================================================================================ Author: Tavis Rudd <tavis@damnsimple.com> Version: $Revision: 1.7 $ Start Date: 2001/08/01 Last Revision Date: $Date: 2005/01/03 19:59:07 $ """ __author__ = "Tavis Rudd <tavis@damnsimple.com>" __revision__ = "$Revision: 1.7 $"[11:-2] import time from Cheetah.NameMapper import NotFound class Error(Exception): pass class ErrorCatcher: _exceptionsToCatch = (NotFound,) def __init__(self, templateObj): pass def exceptions(self): return self._exceptionsToCatch def warn(self, exc_val, code, rawCode, lineCol): return rawCode ## make an alias Echo = ErrorCatcher class BigEcho(ErrorCatcher): def warn(self, exc_val, code, rawCode, lineCol): return "="*15 + "&lt;" + rawCode + " could not be found&gt;" + "="*15 class KeyError(ErrorCatcher): def warn(self, exc_val, code, rawCode, lineCol): raise KeyError("no '%s' in this Template Object's Search List" % rawCode) class ListErrors(ErrorCatcher): """Accumulate a list of errors.""" _timeFormat = "%c" def __init__(self, templateObj): ErrorCatcher.__init__(self, templateObj) self._errors = [] def warn(self, exc_val, code, rawCode, lineCol): dict = locals().copy() del dict['self'] dict['time'] = time.strftime(self._timeFormat, time.localtime(time.time())) self._errors.append(dict) return rawCode def listErrors(self): """Return the list of errors.""" return self._errors
ajibawa-2023/Python-Code-Large/train/row_1467
33
62
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0968, 0.1452, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"ErrorCatcher class for Cheetah Templates\n\nMeta-Data\n================================================================================\nAuthor: Tavis Rudd <tavis@damnsimple.com>\nVersion: $Revision: 1.7 $\nStart Date: 2001/08/01\nLast Revision Date: $Date: 2005/01/03 19:59:07 $"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Assign_L11_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.1774, 0.0161, 0, 0.66, 0.1, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__author__ = \"Tavis Rudd <tavis@damnsimple.com>\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Assign_L12_C0", "label": "__revision__ =", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.1935, 0.0161, 0, 0.66, 0.2, 809, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__revision__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__revision__ = \"$Revision: 1.7 $\"[11:-2]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Import_L14_C0", "label": "time import time", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.2258, 0.0161, 0, 0.66, 0.3, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:ImportFrom_L15_C0", "label": "from Cheetah.NameMapper import NotFound", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2419, 0.0161, 0, 0.66, 0.4, 308, 0, 1, 0, 0, 308, 0, 0], "semantic": {"name": "Cheetah.NameMapper", "arg_names": [], "import_names": ["NotFound"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.NameMapper import NotFound"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L17_C0", "label": "Error", "type": "class", "loc": [17, 18], "level": 0, "parent": null, "vector": [3, 0, 0.2823, 0.0323, 0, 0.66, 0.5, 529, 0, 0, 0, 0, 645, 0, 0], "semantic": {"name": "Error", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Error(Exception):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L20_C0", "label": "ErrorCatcher", "type": "class", "loc": [20, 30], "level": 0, "parent": null, "vector": [3, 0, 0.4032, 0.1774, 0, 0.66, 0.6, 837, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "ErrorCatcher", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ErrorCatcher:\n _exceptionsToCatch = (NotFound,)\n \n def __init__(self, templateObj):\n pass\n \n def exceptions(self):\n return self._exceptionsToCatch"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Assign_L21_C4", "label": "_exceptionsToCatch =", "type": "assigned_variable", "loc": [21, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L20_C0", "vector": [14, 1, 0.3387, 0.0161, 1, 0.62, 0.0, 699, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "_exceptionsToCatch", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _exceptionsToCatch = (NotFound,)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L23_C4", "label": "__init__", "type": "function", "loc": [23, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L20_C0", "vector": [2, 1, 0.379, 0.0323, 1, 0.62, 0.3333, 555, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "templateObj"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, templateObj):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L26_C4", "label": "exceptions", "type": "function", "loc": [26, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L20_C0", "vector": [2, 1, 0.4274, 0.0323, 1, 0.62, 0.6667, 63, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "exceptions", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def exceptions(self):\n return self._exceptionsToCatch"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Return_L27_C8", "label": "return", "type": "return", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L26_C4", "vector": [13, 2, 0.4355, 0.0161, 2, 0.42, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._exceptionsToCatch"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L29_C4", "label": "warn", "type": "function", "loc": [29, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L20_C0", "vector": [2, 1, 0.4758, 0.0323, 1, 0.62, 1.0, 960, 0, 5, 1, 0, 0, 0, 0], "semantic": {"name": "warn", "arg_names": ["self", "exc_val", "code", "rawCode", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def warn(self, exc_val, code, rawCode, lineCol):\n return rawCode"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Return_L30_C8", "label": "return", "type": "return", "loc": [30, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L29_C4", "vector": [13, 2, 0.4839, 0.0161, 2, 0.39, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return rawCode"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Assign_L32_C0", "label": "Echo =", "type": "assigned_variable", "loc": [32, 32], "level": 0, "parent": null, "vector": [14, 0, 0.5161, 0.0161, 0, 0.66, 0.7, 165, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "Echo", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "Echo = ErrorCatcher"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L34_C0", "label": "BigEcho", "type": "class", "loc": [34, 36], "level": 0, "parent": null, "vector": [3, 0, 0.5645, 0.0484, 0, 0.66, 0.8, 117, 0, 1, 0, 0, 837, 0, 0], "semantic": {"name": "BigEcho", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class BigEcho(ErrorCatcher):\n def warn(self, exc_val, code, rawCode, lineCol):\n return \"=\"*15 + \"&lt;\" + rawCode + \" could not be found&gt;\" + \"=\"*15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L35_C4", "label": "warn", "type": "function", "loc": [35, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L34_C0", "vector": [2, 1, 0.5726, 0.0323, 1, 0.85, 0.0, 960, 0, 5, 1, 0, 0, 0, 0], "semantic": {"name": "warn", "arg_names": ["self", "exc_val", "code", "rawCode", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def warn(self, exc_val, code, rawCode, lineCol):\n return \"=\"*15 + \"&lt;\" + rawCode + \" could not be found&gt;\" + \"=\"*15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Return_L36_C8", "label": "return", "type": "return", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L35_C4", "vector": [13, 2, 0.5806, 0.0161, 2, 0.75, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return \"=\"*15 + \"&lt;\" + rawCode + \" could not be found&gt;\" + \"=\"*15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L38_C0", "label": "KeyError", "type": "class", "loc": [38, 40], "level": 0, "parent": null, "vector": [3, 0, 0.629, 0.0484, 0, 0.66, 0.9, 149, 0, 1, 0, 0, 837, 0, 1], "semantic": {"name": "KeyError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class KeyError(ErrorCatcher):\n def warn(self, exc_val, code, rawCode, lineCol):\n raise KeyError(\"no '%s' in this Template Object's Search List\" % rawCode) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L39_C4", "label": "warn", "type": "function", "loc": [39, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L38_C0", "vector": [2, 1, 0.6371, 0.0323, 1, 0.51, 0.0, 960, 0, 5, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": ["self", "exc_val", "code", "rawCode", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def warn(self, exc_val, code, rawCode, lineCol):\n raise KeyError(\"no '%s' in this Template Object's Search List\" % rawCode) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L42_C0", "label": "ListErrors", "type": "class", "loc": [42, 60], "level": 0, "parent": null, "vector": [3, 0, 0.8226, 0.3065, 0, 0.66, 1.0, 716, 0, 3, 0, 0, 837, 0, 7], "semantic": {"name": "ListErrors", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ListErrors(ErrorCatcher):\n \"\"\"Accumulate a list of errors.\"\"\"\n _timeFormat = \"%c\"\n \n def __init__(self, templateObj):\n ErrorCatcher.__init__(self, templateObj)\n self._errors = []\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Expr_L43_C4", "label": "expression", "type": "expression", "loc": [43, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L42_C0", "vector": [8, 1, 0.6935, 0.0161, 1, 0.53, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Accumulate a list of errors.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Assign_L44_C4", "label": "_timeFormat =", "type": "assigned_variable", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L42_C0", "vector": [14, 1, 0.7097, 0.0161, 1, 0.53, 0.25, 764, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "_timeFormat", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _timeFormat = \"%c\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L46_C4", "label": "__init__", "type": "function", "loc": [46, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L42_C0", "vector": [2, 1, 0.7581, 0.0484, 1, 0.53, 0.5, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "templateObj"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, templateObj):\n ErrorCatcher.__init__(self, templateObj)\n self._errors = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Expr_L47_C8", "label": "__init__()", "type": "expression", "loc": [47, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L46_C4", "vector": [8, 2, 0.7581, 0.0161, 2, 0.21, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " ErrorCatcher.__init__(self, templateObj)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Assign_L48_C8", "label": "self._errors =", "type": "assigned_variable", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L46_C4", "vector": [14, 2, 0.7742, 0.0161, 2, 0.21, 1.0, 39, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._errors", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._errors = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L50_C4", "label": "warn", "type": "function", "loc": [50, 56], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L42_C0", "vector": [2, 1, 0.8548, 0.1129, 1, 0.53, 0.75, 960, 0, 5, 1, 0, 0, 0, 6], "semantic": {"name": "warn", "arg_names": ["self", "exc_val", "code", "rawCode", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def warn(self, exc_val, code, rawCode, lineCol):\n dict = locals().copy()\n del dict['self']\n dict['time'] = time.strftime(self._timeFormat,\n time.localtime(time.time()))\n self._errors.append(dict)\n return rawCode"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Assign_L51_C8", "label": "dict = copy()", "type": "assigned_variable", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L50_C4", "vector": [14, 2, 0.8226, 0.0161, 2, 0.9, 0.0, 827, 3, 0, 0, 0, 739, 10, 2], "semantic": {"name": "dict", "arg_names": [], "import_names": [], "rhs_call_name": "copy", "annotation": ""}, "snippet": " dict = locals().copy()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Assign_L53_C8", "label": " = strftime()", "type": "assigned_variable", "loc": [53, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L50_C4", "vector": [14, 2, 0.8629, 0.0323, 2, 0.9, 0.3333, 0, 3, 2, 0, 0, 668, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "strftime", "annotation": ""}, "snippet": " dict['time'] = time.strftime(self._timeFormat,\n time.localtime(time.time()))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Expr_L55_C8", "label": "append()", "type": "expression", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L50_C4", "vector": [8, 2, 0.8871, 0.0161, 2, 0.9, 0.6667, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._errors.append(dict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Return_L56_C8", "label": "return", "type": "return", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L50_C4", "vector": [13, 2, 0.9032, 0.0161, 2, 0.9, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return rawCode"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L58_C4", "label": "listErrors", "type": "function", "loc": [58, 60], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L42_C0", "vector": [2, 1, 0.9516, 0.0484, 1, 0.53, 1.0, 165, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "listErrors", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def listErrors(self):\n \"\"\"Return the list of errors.\"\"\"\n return self._errors"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Expr_L59_C8", "label": "expression", "type": "expression", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L58_C4", "vector": [8, 2, 0.9516, 0.0161, 2, 0.32, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Return the list of errors.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1467:Return_L60_C8", "label": "return", "type": "return", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L58_C4", "vector": [13, 2, 0.9677, 0.0161, 2, 0.32, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._errors"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:Return_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:Return_L30_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:Return_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:Expr_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:Expr_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:Assign_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:Assign_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:Assign_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:Expr_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:Return_L56_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:ClassDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L58_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:Expr_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1467:FunctionDef_L58_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1467:Return_L60_C8"}]
""" Nothing, but in a friendly way. Good for filling in for objects you want to hide. If $form.f1 is a RecursiveNull object, then $form.f1.anything["you"].might("use") will resolve to the empty string. This module was contributed by Ian Bicking. """ class RecursiveNull(object): def __getattr__(self, attr): return self def __getitem__(self, item): return self def __call__(self, *args, **kwargs): return self def __str__(self): return '' def __repr__(self): return '' def __nonzero__(self): return 0 def __eq__(self, x): if x: return False return True def __ne__(self, x): return x and True or False
ajibawa-2023/Python-Code-Large/train/row_1468
20
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1468:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1429, 0.25, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nNothing, but in a friendly way. Good for filling in for objects you want to\nhide. If $form.f1 is a RecursiveNull object, then\n$form.f1.anything[\"you\"].might(\"use\") will resolve to the empty string.\n\nThis module was contributed by Ian Bicking.\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "label": "RecursiveNull", "type": "class", "loc": [9, 27], "level": 0, "parent": null, "vector": [3, 0, 0.6429, 0.6786, 0, 0.66, 1.0, 956, 0, 8, 0, 0, 186, 0, 0], "semantic": {"name": "RecursiveNull", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class RecursiveNull(object):\n def __getattr__(self, attr):\n return self\n def __getitem__(self, item):\n return self\n def __call__(self, *args, **kwargs):\n return self\n def __str__(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L10_C4", "label": "__getattr__", "type": "function", "loc": [10, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "vector": [2, 1, 0.375, 0.0714, 1, 0.66, 0.0, 210, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "__getattr__", "arg_names": ["self", "attr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __getattr__(self, attr):\n return self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L11_C8", "label": "return", "type": "return", "loc": [11, 11], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L10_C4", "vector": [13, 2, 0.3929, 0.0357, 2, 0.1, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L12_C4", "label": "__getitem__", "type": "function", "loc": [12, 13], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "vector": [2, 1, 0.4464, 0.0714, 1, 0.66, 0.1429, 698, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "__getitem__", "arg_names": ["self", "item"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __getitem__(self, item):\n return self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L13_C8", "label": "return", "type": "return", "loc": [13, 13], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L12_C4", "vector": [13, 2, 0.4643, 0.0357, 2, 0.5, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L14_C4", "label": "__call__", "type": "function", "loc": [14, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "vector": [2, 1, 0.5179, 0.0714, 1, 0.66, 0.2857, 319, 0, 3, 1, 0, 0, 0, 0], "semantic": {"name": "__call__", "arg_names": ["self", "args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __call__(self, *args, **kwargs):\n return self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L15_C8", "label": "return", "type": "return", "loc": [15, 15], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L14_C4", "vector": [13, 2, 0.5357, 0.0357, 2, 0.29, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L16_C4", "label": "__str__", "type": "function", "loc": [16, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "vector": [2, 1, 0.5893, 0.0714, 1, 0.66, 0.4286, 527, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__str__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __str__(self):\n return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L17_C8", "label": "return", "type": "return", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L16_C4", "vector": [13, 2, 0.6071, 0.0357, 2, 0.17, 0.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L18_C4", "label": "__repr__", "type": "function", "loc": [18, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "vector": [2, 1, 0.6607, 0.0714, 1, 0.66, 0.5714, 204, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__repr__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __repr__(self):\n return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L19_C8", "label": "return", "type": "return", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L18_C4", "vector": [13, 2, 0.6786, 0.0357, 2, 0.72, 0.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L20_C4", "label": "__nonzero__", "type": "function", "loc": [20, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "vector": [2, 1, 0.7321, 0.0714, 1, 0.66, 0.7143, 322, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__nonzero__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __nonzero__(self):\n return 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L21_C8", "label": "return", "type": "return", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L20_C4", "vector": [13, 2, 0.75, 0.0357, 2, 0.19, 0.0, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L22_C4", "label": "__eq__", "type": "function", "loc": [22, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "vector": [2, 1, 0.8393, 0.1429, 1, 0.66, 0.8571, 763, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "__eq__", "arg_names": ["self", "x"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __eq__(self, x):\n if x:\n return False\n return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:If_L23_C8", "label": "if", "type": "if", "loc": [23, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L22_C4", "vector": [4, 2, 0.8393, 0.0714, 2, 0.22, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if x:\n return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L24_C12", "label": "return", "type": "return", "loc": [24, 24], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:If_L23_C8", "vector": [13, 3, 0.8571, 0.0357, 3, 0.49, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L25_C8", "label": "return", "type": "return", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L22_C4", "vector": [13, 2, 0.8929, 0.0357, 2, 0.22, 1.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L26_C4", "label": "__ne__", "type": "function", "loc": [26, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "vector": [2, 1, 0.9464, 0.0714, 1, 0.66, 1.0, 254, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "__ne__", "arg_names": ["self", "x"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __ne__(self, x):\n return x and True or False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L27_C8", "label": "return", "type": "return", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L26_C4", "vector": [13, 2, 0.9643, 0.0357, 2, 0.98, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return x and True or False"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L13_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L20_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:If_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:If_L23_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L24_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L25_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1468:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1468:Return_L27_C8"}]
""" @@TR: This code is pretty much unsupported. MondoReport.py -- Batching module for Python and Cheetah. Version 2001-Nov-18. Doesn't do much practical yet, but the companion testMondoReport.py passes all its tests. -Mike Orr (Iron) TODO: BatchRecord.prev/next/prev_batches/next_batches/query, prev.query, next.query. How about Report: .page(), .all(), .summary()? Or PageBreaker. """ import operator try: from functools import reduce except ImportError: # If functools doesn't exist, we must be on an old # enough version that has reduce() in builtins pass try: from Cheetah.NameMapper import valueForKey as lookup_func except ImportError: def lookup_func(obj, name): if hasattr(obj, name): return getattr(obj, name) else: return obj[name] # Raises KeyError. ########## PUBLIC GENERIC FUNCTIONS ############################## class NegativeError(ValueError): pass def isNumeric(v): return isinstance(v, (int, float)) def isNonNegative(v): ret = isNumeric(v) if ret and v < 0: raise NegativeError(v) def isNotNone(v): return v is not None def Roman(n): n = int(n) # Raises TypeError. if n < 1: raise ValueError("roman numeral for zero or negative undefined: " + n) roman = '' while n >= 1000: n = n - 1000 roman = roman + 'M' while n >= 500: n = n - 500 roman = roman + 'D' while n >= 100: n = n - 100 roman = roman + 'C' while n >= 50: n = n - 50 roman = roman + 'L' while n >= 10: n = n - 10 roman = roman + 'X' while n >= 5: n = n - 5 roman = roman + 'V' while n < 5 and n >= 1: n = n - 1 roman = roman + 'I' roman = roman.replace('DCCCC', 'CM') roman = roman.replace('CCCC', 'CD') roman = roman.replace('LXXXX', 'XC') roman = roman.replace('XXXX', 'XL') roman = roman.replace('VIIII', 'IX') roman = roman.replace('IIII', 'IV') return roman def sum(lis): return reduce(operator.add, lis, 0) def mean(lis): """Always returns a floating-point number. """ lis_len = len(lis) if lis_len == 0: return 0.00 # Avoid ZeroDivisionError (not raised for floats anyway) total = float( sum(lis) ) return total / lis_len def median(lis): lis = sorted(lis[:]) return lis[int(len(lis)/2)] def variance(lis): raise NotImplementedError() def variance_n(lis): raise NotImplementedError() def standardDeviation(lis): raise NotImplementedError() def standardDeviation_n(lis): raise NotImplementedError() class IndexFormats: """Eight ways to display a subscript index. ("Fifty ways to leave your lover....") """ def __init__(self, index, item=None): self._index = index self._number = index + 1 self._item = item def index(self): return self._index __call__ = index def number(self): return self._number def even(self): return self._number % 2 == 0 def odd(self): return not self.even() def even_i(self): return self._index % 2 == 0 def odd_i(self): return not self.even_i() def letter(self): return self.Letter().lower() def Letter(self): n = ord('A') + self._index return chr(n) def roman(self): return self.Roman().lower() def Roman(self): return Roman(self._number) def item(self): return self._item ########## PRIVATE CLASSES ############################## class ValuesGetterMixin: def __init__(self, origList): self._origList = origList def _getValues(self, field=None, criteria=None): if field: ret = [lookup_func(elm, field) for elm in self._origList] else: ret = self._origList if criteria: ret = list(filter(criteria, ret)) return ret class RecordStats(IndexFormats, ValuesGetterMixin): """The statistics that depend on the current record. """ def __init__(self, origList, index): record = origList[index] # Raises IndexError. IndexFormats.__init__(self, index, record) ValuesGetterMixin.__init__(self, origList) def length(self): return len(self._origList) def first(self): return self._index == 0 def last(self): return self._index >= len(self._origList) - 1 def _firstOrLastValue(self, field, currentIndex, otherIndex): currentValue = self._origList[currentIndex] # Raises IndexError. try: otherValue = self._origList[otherIndex] except IndexError: return True if field: currentValue = lookup_func(currentValue, field) otherValue = lookup_func(otherValue, field) return currentValue != otherValue def firstValue(self, field=None): return self._firstOrLastValue(field, self._index, self._index - 1) def lastValue(self, field=None): return self._firstOrLastValue(field, self._index, self._index + 1) # firstPage and lastPage not implemented. Needed? def percentOfTotal(self, field=None, suffix='%', default='N/A', decimals=2): rec = self._origList[self._index] if field: val = lookup_func(rec, field) else: val = rec try: lis = self._getValues(field, isNumeric) except NegativeError: return default total = sum(lis) if total == 0.00: # Avoid ZeroDivisionError. return default val = float(val) try: percent = (val / total) * 100 except ZeroDivisionError: return default if decimals == 0: percent = int(percent) else: percent = round(percent, decimals) if suffix: return str(percent) + suffix # String. else: return percent # Numeric. def __call__(self): # Overrides IndexFormats.__call__ """This instance is not callable, so we override the super method. """ raise NotImplementedError() def prev(self): if self._index == 0: return None else: length = self.length() start = self._index - length return PrevNextPage(self._origList, length, start) def next(self): if self._index + self.length() == self.length(): return None else: length = self.length() start = self._index + length return PrevNextPage(self._origList, length, start) def prevPages(self): raise NotImplementedError() def nextPages(self): raise NotImplementedError() prev_batches = prevPages next_batches = nextPages def summary(self): raise NotImplementedError() def _prevNextHelper(self, start, end, size, orphan, sequence): """Copied from Zope's DT_InSV.py's "opt" function. """ if size < 1: if start > 0 and end > 0 and end >= start: size=end+1-start else: size=7 if start > 0: try: sequence[start-1] except: start=len(sequence) # if start > l: start=l if end > 0: if end < start: end=start else: end=start+size-1 try: sequence[end+orphan-1] except: end=len(sequence) # if l - end < orphan: end=l elif end > 0: try: sequence[end-1] except: end=len(sequence) # if end > l: end=l start=end+1-size if start - 1 < orphan: start=1 else: start=1 end=start+size-1 try: sequence[end+orphan-1] except: end=len(sequence) # if l - end < orphan: end=l return start, end, size class Summary(ValuesGetterMixin): """The summary statistics, that don't depend on the current record. """ def __init__(self, origList): ValuesGetterMixin.__init__(self, origList) def sum(self, field=None): lis = self._getValues(field, isNumeric) return sum(lis) total = sum def count(self, field=None): lis = self._getValues(field, isNotNone) return len(lis) def min(self, field=None): lis = self._getValues(field, isNotNone) return min(lis) # Python builtin function min. def max(self, field=None): lis = self._getValues(field, isNotNone) return max(lis) # Python builtin function max. def mean(self, field=None): """Always returns a floating point number. """ lis = self._getValues(field, isNumeric) return mean(lis) average = mean def median(self, field=None): lis = self._getValues(field, isNumeric) return median(lis) def variance(self, field=None): raiseNotImplementedError() def variance_n(self, field=None): raiseNotImplementedError() def standardDeviation(self, field=None): raiseNotImplementedError() def standardDeviation_n(self, field=None): raiseNotImplementedError() class PrevNextPage: def __init__(self, origList, size, start): end = start + size self.start = IndexFormats(start, origList[start]) self.end = IndexFormats(end, origList[end]) self.length = size ########## MAIN PUBLIC CLASS ############################## class MondoReport: _RecordStatsClass = RecordStats _SummaryClass = Summary def __init__(self, origlist): self._origList = origlist def page(self, size, start, overlap=0, orphan=0): """Returns list of ($r, $a, $b) """ if overlap != 0: raise NotImplementedError("non-zero overlap") if orphan != 0: raise NotImplementedError("non-zero orphan") origList = self._origList origList_len = len(origList) start = max(0, start) end = min( start + size, len(self._origList) ) mySlice = origList[start:end] ret = [] for rel in range(size): abs_ = start + rel r = mySlice[rel] a = self._RecordStatsClass(origList, abs_) b = self._RecordStatsClass(mySlice, rel) tup = r, a, b ret.append(tup) return ret batch = page def all(self): origList_len = len(self._origList) return self.page(origList_len, 0, 0, 0) def summary(self): return self._SummaryClass(self._origList) """ ********************************** Return a pageful of records from a sequence, with statistics. in : origlist, list or tuple. The entire set of records. This is usually a list of objects or a list of dictionaries. page, int >= 0. Which page to display. size, int >= 1. How many records per page. widow, int >=0. Not implemented. orphan, int >=0. Not implemented. base, int >=0. Number of first page (usually 0 or 1). out: list of (o, b) pairs. The records for the current page. 'o' is the original element from 'origlist' unchanged. 'b' is a Batch object containing meta-info about 'o'. exc: IndexError if 'page' or 'size' is < 1. If 'origlist' is empty or 'page' is too high, it returns an empty list rather than raising an error. origlist_len = len(origlist) start = (page + base) * size end = min(start + size, origlist_len) ret = [] # widow, orphan calculation: adjust 'start' and 'end' up and down, # Set 'widow', 'orphan', 'first_nonwidow', 'first_nonorphan' attributes. for i in range(start, end): o = origlist[i] b = Batch(origlist, size, i) tup = o, b ret.append(tup) return ret def prev(self): # return a PrevNextPage or None def next(self): # return a PrevNextPage or None def prev_batches(self): # return a list of SimpleBatch for the previous batches def next_batches(self): # return a list of SimpleBatch for the next batches ########## PUBLIC MIXIN CLASS FOR CHEETAH TEMPLATES ############## class MondoReportMixin: def batch(self, origList, size=None, start=0, overlap=0, orphan=0): bat = MondoReport(origList) return bat.batch(size, start, overlap, orphan) def batchstats(self, origList): bat = MondoReport(origList) return bat.stats() """ # vim: shiftwidth=4 tabstop=4 expandtab textwidth=79
ajibawa-2023/Python-Code-Large/train/row_1469
270
464
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 14], "level": 0, "parent": null, "vector": [8, 0, 0.0162, 0.0302, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\n@@TR: This code is pretty much unsupported.\n\nMondoReport.py -- Batching module for Python and Cheetah.\n\nVersion 2001-Nov-18. Doesn't do much practical yet, but the companion\ntestMondoReport.py passes all its tests.\n-Mike Orr (Iron)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Import_L15_C0", "label": "operator import operator", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0022, 0, 0.66, 0.0455, 616, 0, 1, 0, 0, 616, 0, 0], "semantic": {"name": "operator", "arg_names": [], "import_names": ["operator"], "rhs_call_name": "", "annotation": ""}, "snippet": "import operator"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L16_C0", "label": "try", "type": "try", "loc": [16, 21], "level": 0, "parent": null, "vector": [7, 0, 0.0399, 0.0129, 0, 0.66, 0.0909, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n from functools import reduce\nexcept ImportError:\n # If functools doesn't exist, we must be on an old \n # enough version that has reduce() in builtins\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:ImportFrom_L17_C4", "label": "from functools import reduce", "type": "import", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L16_C0", "vector": [1, 1, 0.0366, 0.0022, 1, 0.85, 0.0, 711, 0, 1, 0, 0, 711, 0, 0], "semantic": {"name": "functools", "arg_names": [], "import_names": ["reduce"], "rhs_call_name": "", "annotation": ""}, "snippet": " from functools import reduce"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L23_C0", "label": "try", "type": "try", "loc": [23, 30], "level": 0, "parent": null, "vector": [7, 0, 0.0571, 0.0172, 0, 0.66, 0.1364, 0, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n from Cheetah.NameMapper import valueForKey as lookup_func\nexcept ImportError:\n def lookup_func(obj, name):\n if hasattr(obj, name):\n return getattr(obj, name)\n else:\n return obj[name] # Raises KeyError."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:ImportFrom_L24_C4", "label": "from Cheetah.NameMapper import lookup_func", "type": "import", "loc": [24, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L23_C0", "vector": [1, 1, 0.0517, 0.0022, 1, 0.42, 0.0, 308, 0, 1, 0, 0, 308, 0, 0], "semantic": {"name": "Cheetah.NameMapper", "arg_names": [], "import_names": ["lookup_func"], "rhs_call_name": "", "annotation": ""}, "snippet": " from Cheetah.NameMapper import valueForKey as lookup_func"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L26_C4", "label": "lookup_func", "type": "function", "loc": [26, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L23_C0", "vector": [2, 1, 0.0603, 0.0108, 1, 0.42, 0.0, 197, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "lookup_func", "arg_names": ["obj", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def lookup_func(obj, name):\n if hasattr(obj, name):\n return getattr(obj, name)\n else:\n return obj[name] # Raises KeyError."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L27_C8", "label": "if", "type": "if", "loc": [27, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L26_C4", "vector": [4, 2, 0.0614, 0.0086, 2, 0.58, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if hasattr(obj, name):\n return getattr(obj, name)\n else:\n return obj[name] # Raises KeyError."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L28_C12", "label": "return", "type": "return", "loc": [28, 28], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L27_C8", "vector": [13, 3, 0.0603, 0.0022, 3, 0.88, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return getattr(obj, name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L30_C12", "label": "return", "type": "return", "loc": [30, 30], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L27_C8", "vector": [13, 3, 0.0647, 0.0022, 3, 0.88, 1.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return obj[name] # Raises KeyError."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L34_C0", "label": "NegativeError", "type": "class", "loc": [34, 35], "level": 0, "parent": null, "vector": [3, 0, 0.0744, 0.0043, 0, 0.66, 0.1818, 530, 0, 0, 0, 0, 690, 0, 0], "semantic": {"name": "NegativeError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class NegativeError(ValueError):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L37_C0", "label": "isNumeric", "type": "function", "loc": [37, 38], "level": 0, "parent": null, "vector": [2, 0, 0.0808, 0.0043, 0, 0.66, 0.2273, 477, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "isNumeric", "arg_names": ["v"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def isNumeric(v):\n return isinstance(v, (int, float))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L38_C4", "label": "return", "type": "return", "loc": [38, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L37_C0", "vector": [13, 1, 0.0819, 0.0022, 1, 0.39, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return isinstance(v, (int, float))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L40_C0", "label": "isNonNegative", "type": "function", "loc": [40, 43], "level": 0, "parent": null, "vector": [2, 0, 0.0894, 0.0086, 0, 0.66, 0.2727, 677, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "isNonNegative", "arg_names": ["v"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def isNonNegative(v):\n ret = isNumeric(v)\n if ret and v < 0:\n raise NegativeError(v)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L41_C4", "label": "ret = isNumeric()", "type": "assigned_variable", "loc": [41, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L40_C0", "vector": [14, 1, 0.0884, 0.0022, 1, 0.39, 0.0, 501, 3, 1, 0, 0, 477, 10, 1], "semantic": {"name": "ret", "arg_names": [], "import_names": [], "rhs_call_name": "isNumeric", "annotation": ""}, "snippet": " ret = isNumeric(v)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L42_C4", "label": "if", "type": "if", "loc": [42, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L40_C0", "vector": [4, 1, 0.0916, 0.0043, 1, 0.39, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if ret and v < 0:\n raise NegativeError(v)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L45_C0", "label": "isNotNone", "type": "function", "loc": [45, 46], "level": 0, "parent": null, "vector": [2, 0, 0.0981, 0.0043, 0, 0.66, 0.3182, 378, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "isNotNone", "arg_names": ["v"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def isNotNone(v):\n return v is not None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L46_C4", "label": "return", "type": "return", "loc": [46, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L45_C0", "vector": [13, 1, 0.0991, 0.0022, 1, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return v is not None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "label": "Roman", "type": "function", "loc": [48, 80], "level": 0, "parent": null, "vector": [2, 0, 0.1379, 0.0711, 0, 0.66, 0.3636, 9, 0, 1, 1, 0, 0, 0, 8], "semantic": {"name": "Roman", "arg_names": ["n"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def Roman(n):\n n = int(n) # Raises TypeError.\n if n < 1:\n raise ValueError(\"roman numeral for zero or negative undefined: \" + n)\n roman = ''\n while n >= 1000:\n n = n - 1000\n roman = roman + 'M'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L49_C4", "label": "n = int()", "type": "assigned_variable", "loc": [49, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [14, 1, 0.1056, 0.0022, 1, 0.86, 0.0, 773, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " n = int(n) # Raises TypeError."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L50_C4", "label": "if", "type": "if", "loc": [50, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [4, 1, 0.1088, 0.0043, 1, 0.86, 0.0625, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if n < 1:\n raise ValueError(\"roman numeral for zero or negative undefined: \" + n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L52_C4", "label": "roman =", "type": "assigned_variable", "loc": [52, 52], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [14, 1, 0.1121, 0.0022, 1, 0.86, 0.125, 522, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "roman", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " roman = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L53_C4", "label": "while", "type": "while", "loc": [53, 55], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [5, 1, 0.1164, 0.0065, 1, 0.86, 0.1875, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while n >= 1000:\n n = n - 1000\n roman = roman + 'M'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L54_C12", "label": "n =", "type": "assigned_variable", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L53_C4", "vector": [14, 2, 0.1164, 0.0022, 2, 0.68, 0.0, 773, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " n = n - 1000"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L55_C12", "label": "roman =", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L53_C4", "vector": [14, 2, 0.1185, 0.0022, 2, 0.68, 1.0, 522, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "roman", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " roman = roman + 'M'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L56_C4", "label": "while", "type": "while", "loc": [56, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [5, 1, 0.1228, 0.0065, 1, 0.86, 0.25, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while n >= 500:\n n = n - 500\n roman = roman + 'D'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L57_C12", "label": "n =", "type": "assigned_variable", "loc": [57, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L56_C4", "vector": [14, 2, 0.1228, 0.0022, 2, 0.45, 0.0, 773, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " n = n - 500"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L58_C12", "label": "roman =", "type": "assigned_variable", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L56_C4", "vector": [14, 2, 0.125, 0.0022, 2, 0.45, 1.0, 522, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "roman", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " roman = roman + 'D'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L59_C4", "label": "while", "type": "while", "loc": [59, 61], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [5, 1, 0.1293, 0.0065, 1, 0.86, 0.3125, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while n >= 100:\n n = n - 100\n roman = roman + 'C'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L60_C12", "label": "n =", "type": "assigned_variable", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L59_C4", "vector": [14, 2, 0.1293, 0.0022, 2, 0.71, 0.0, 773, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " n = n - 100"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L61_C12", "label": "roman =", "type": "assigned_variable", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L59_C4", "vector": [14, 2, 0.1315, 0.0022, 2, 0.71, 1.0, 522, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "roman", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " roman = roman + 'C'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L62_C4", "label": "while", "type": "while", "loc": [62, 64], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [5, 1, 0.1358, 0.0065, 1, 0.86, 0.375, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while n >= 50:\n n = n - 50\n roman = roman + 'L'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L63_C12", "label": "n =", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L62_C4", "vector": [14, 2, 0.1358, 0.0022, 2, 0.53, 0.0, 773, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " n = n - 50"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L64_C12", "label": "roman =", "type": "assigned_variable", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L62_C4", "vector": [14, 2, 0.1379, 0.0022, 2, 0.53, 1.0, 522, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "roman", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " roman = roman + 'L'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L65_C4", "label": "while", "type": "while", "loc": [65, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [5, 1, 0.1422, 0.0065, 1, 0.86, 0.4375, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while n >= 10:\n n = n - 10\n roman = roman + 'X'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L66_C12", "label": "n =", "type": "assigned_variable", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L65_C4", "vector": [14, 2, 0.1422, 0.0022, 2, 0.41, 0.0, 773, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " n = n - 10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L67_C12", "label": "roman =", "type": "assigned_variable", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L65_C4", "vector": [14, 2, 0.1444, 0.0022, 2, 0.41, 1.0, 522, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "roman", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " roman = roman + 'X'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L68_C4", "label": "while", "type": "while", "loc": [68, 70], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [5, 1, 0.1487, 0.0065, 1, 0.86, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while n >= 5:\n n = n - 5\n roman = roman + 'V'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L69_C12", "label": "n =", "type": "assigned_variable", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L68_C4", "vector": [14, 2, 0.1487, 0.0022, 2, 0.47, 0.0, 773, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " n = n - 5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L70_C12", "label": "roman =", "type": "assigned_variable", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L68_C4", "vector": [14, 2, 0.1509, 0.0022, 2, 0.47, 1.0, 522, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "roman", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " roman = roman + 'V'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L71_C4", "label": "while", "type": "while", "loc": [71, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [5, 1, 0.1552, 0.0065, 1, 0.86, 0.5625, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while n < 5 and n >= 1:\n n = n - 1\n roman = roman + 'I'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L72_C12", "label": "n =", "type": "assigned_variable", "loc": [72, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L71_C4", "vector": [14, 2, 0.1552, 0.0022, 2, 0.66, 0.0, 773, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " n = n - 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L73_C12", "label": "roman =", "type": "assigned_variable", "loc": [73, 73], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L71_C4", "vector": [14, 2, 0.1573, 0.0022, 2, 0.66, 1.0, 522, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "roman", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " roman = roman + 'I'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L74_C4", "label": "roman = replace()", "type": "assigned_variable", "loc": [74, 74], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [14, 1, 0.1595, 0.0022, 1, 0.86, 0.625, 522, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "roman", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " roman = roman.replace('DCCCC', 'CM')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L75_C4", "label": "roman = replace()", "type": "assigned_variable", "loc": [75, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [14, 1, 0.1616, 0.0022, 1, 0.86, 0.6875, 522, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "roman", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " roman = roman.replace('CCCC', 'CD')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L76_C4", "label": "roman = replace()", "type": "assigned_variable", "loc": [76, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [14, 1, 0.1638, 0.0022, 1, 0.86, 0.75, 522, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "roman", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " roman = roman.replace('LXXXX', 'XC')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L77_C4", "label": "roman = replace()", "type": "assigned_variable", "loc": [77, 77], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [14, 1, 0.1659, 0.0022, 1, 0.86, 0.8125, 522, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "roman", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " roman = roman.replace('XXXX', 'XL')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L78_C4", "label": "roman = replace()", "type": "assigned_variable", "loc": [78, 78], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [14, 1, 0.1681, 0.0022, 1, 0.86, 0.875, 522, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "roman", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " roman = roman.replace('VIIII', 'IX')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L79_C4", "label": "roman = replace()", "type": "assigned_variable", "loc": [79, 79], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [14, 1, 0.1703, 0.0022, 1, 0.86, 0.9375, 522, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "roman", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " roman = roman.replace('IIII', 'IV')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L80_C4", "label": "return", "type": "return", "loc": [80, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "vector": [13, 1, 0.1724, 0.0022, 1, 0.86, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return roman"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L83_C0", "label": "sum", "type": "function", "loc": [83, 84], "level": 0, "parent": null, "vector": [2, 0, 0.18, 0.0043, 0, 0.66, 0.4091, 824, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "sum", "arg_names": ["lis"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def sum(lis):\n return reduce(operator.add, lis, 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L84_C4", "label": "return", "type": "return", "loc": [84, 84], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L83_C0", "vector": [13, 1, 0.181, 0.0022, 1, 0.98, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return reduce(operator.add, lis, 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L86_C0", "label": "mean", "type": "function", "loc": [86, 93], "level": 0, "parent": null, "vector": [2, 0, 0.1929, 0.0172, 0, 0.66, 0.4545, 856, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "mean", "arg_names": ["lis"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def mean(lis):\n \"\"\"Always returns a floating-point number.\n \"\"\"\n lis_len = len(lis)\n if lis_len == 0:\n return 0.00 # Avoid ZeroDivisionError (not raised for floats anyway)\n total = float( sum(lis) )\n return total / lis_len"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L87_C4", "label": "expression", "type": "expression", "loc": [87, 88], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L86_C0", "vector": [8, 1, 0.1886, 0.0043, 1, 0.53, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Always returns a floating-point number.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L89_C4", "label": "lis_len = len()", "type": "assigned_variable", "loc": [89, 89], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L86_C0", "vector": [14, 1, 0.1918, 0.0022, 1, 0.53, 0.25, 906, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "lis_len", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " lis_len = len(lis)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L90_C4", "label": "if", "type": "if", "loc": [90, 91], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L86_C0", "vector": [4, 1, 0.195, 0.0043, 1, 0.53, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if lis_len == 0:\n return 0.00 # Avoid ZeroDivisionError (not raised for floats anyway)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L91_C8", "label": "return", "type": "return", "loc": [91, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L90_C4", "vector": [13, 2, 0.1961, 0.0022, 2, 0.64, 0.0, 0, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return 0.00 # Avoid ZeroDivisionError (not raised for floats anyway)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L92_C4", "label": "total = float()", "type": "assigned_variable", "loc": [92, 92], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L86_C0", "vector": [14, 1, 0.1983, 0.0022, 1, 0.53, 0.75, 878, 3, 1, 0, 0, 639, 10, 2], "semantic": {"name": "total", "arg_names": [], "import_names": [], "rhs_call_name": "float", "annotation": ""}, "snippet": " total = float( sum(lis) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L93_C4", "label": "return", "type": "return", "loc": [93, 93], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L86_C0", "vector": [13, 1, 0.2004, 0.0022, 1, 0.53, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return total / lis_len"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L95_C0", "label": "median", "type": "function", "loc": [95, 97], "level": 0, "parent": null, "vector": [2, 0, 0.2069, 0.0065, 0, 0.66, 0.5, 247, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "median", "arg_names": ["lis"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def median(lis):\n lis = sorted(lis[:])\n return lis[int(len(lis)/2)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L96_C4", "label": "lis = sorted()", "type": "assigned_variable", "loc": [96, 96], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L95_C0", "vector": [14, 1, 0.2069, 0.0022, 1, 0.77, 0.0, 96, 3, 1, 0, 0, 134, 10, 1], "semantic": {"name": "lis", "arg_names": [], "import_names": [], "rhs_call_name": "sorted", "annotation": ""}, "snippet": " lis = sorted(lis[:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L97_C4", "label": "return", "type": "return", "loc": [97, 97], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L95_C0", "vector": [13, 1, 0.2091, 0.0022, 1, 0.77, 1.0, 0, 6, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return lis[int(len(lis)/2)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L100_C0", "label": "variance", "type": "function", "loc": [100, 101], "level": 0, "parent": null, "vector": [2, 0, 0.2166, 0.0043, 0, 0.66, 0.5455, 818, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "variance", "arg_names": ["lis"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def variance(lis):\n raise NotImplementedError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L103_C0", "label": "variance_n", "type": "function", "loc": [103, 104], "level": 0, "parent": null, "vector": [2, 0, 0.2231, 0.0043, 0, 0.66, 0.5909, 439, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "variance_n", "arg_names": ["lis"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def variance_n(lis):\n raise NotImplementedError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L106_C0", "label": "standardDeviation", "type": "function", "loc": [106, 107], "level": 0, "parent": null, "vector": [2, 0, 0.2295, 0.0043, 0, 0.66, 0.6364, 500, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "standardDeviation", "arg_names": ["lis"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def standardDeviation(lis):\n raise NotImplementedError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L109_C0", "label": "standardDeviation_n", "type": "function", "loc": [109, 110], "level": 0, "parent": null, "vector": [2, 0, 0.236, 0.0043, 0, 0.66, 0.6818, 636, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "standardDeviation_n", "arg_names": ["lis"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def standardDeviation_n(lis):\n raise NotImplementedError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "label": "IndexFormats", "type": "class", "loc": [114, 157], "level": 0, "parent": null, "vector": [3, 0, 0.292, 0.0948, 0, 0.66, 0.7273, 787, 0, 12, 0, 0, 0, 0, 9], "semantic": {"name": "IndexFormats", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class IndexFormats:\n \"\"\"Eight ways to display a subscript index.\n (\"Fifty ways to leave your lover....\")\n \"\"\"\n def __init__(self, index, item=None):\n self._index = index\n self._number = index + 1\n self._item = item"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L115_C4", "label": "expression", "type": "expression", "loc": [115, 117], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "vector": [8, 1, 0.25, 0.0065, 1, 0.44, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Eight ways to display a subscript index.\n (\"Fifty ways to leave your lover....\")\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L118_C4", "label": "__init__", "type": "function", "loc": [118, 121], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "vector": [2, 1, 0.2575, 0.0086, 1, 0.44, 0.0769, 555, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "index", "item"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, index, item=None):\n self._index = index\n self._number = index + 1\n self._item = item"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L119_C8", "label": "self._index =", "type": "assigned_variable", "loc": [119, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L118_C4", "vector": [14, 2, 0.2565, 0.0022, 2, 0.51, 0.0, 679, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._index", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._index = index"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L120_C8", "label": "self._number =", "type": "assigned_variable", "loc": [120, 120], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L118_C4", "vector": [14, 2, 0.2586, 0.0022, 2, 0.51, 0.5, 203, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._number", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._number = index + 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L121_C8", "label": "self._item =", "type": "assigned_variable", "loc": [121, 121], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L118_C4", "vector": [14, 2, 0.2608, 0.0022, 2, 0.51, 1.0, 201, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._item = item"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L123_C4", "label": "index", "type": "function", "loc": [123, 124], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "vector": [2, 1, 0.2662, 0.0043, 1, 0.44, 0.1538, 780, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "index", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def index(self):\n return self._index"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L124_C8", "label": "return", "type": "return", "loc": [124, 124], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L123_C4", "vector": [13, 2, 0.2672, 0.0022, 2, 0.02, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._index"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L126_C4", "label": "__call__ =", "type": "assigned_variable", "loc": [126, 126], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "vector": [14, 1, 0.2716, 0.0022, 1, 0.44, 0.2308, 319, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__call__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __call__ = index"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L128_C4", "label": "number", "type": "function", "loc": [128, 129], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "vector": [2, 1, 0.2769, 0.0043, 1, 0.44, 0.3077, 408, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "number", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def number(self):\n return self._number"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L129_C8", "label": "return", "type": "return", "loc": [129, 129], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L128_C4", "vector": [13, 2, 0.278, 0.0022, 2, 0.95, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._number"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L131_C4", "label": "even", "type": "function", "loc": [131, 132], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "vector": [2, 1, 0.2834, 0.0043, 1, 0.44, 0.3846, 646, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "even", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def even(self):\n return self._number % 2 == 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L132_C8", "label": "return", "type": "return", "loc": [132, 132], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L131_C4", "vector": [13, 2, 0.2845, 0.0022, 2, 0.33, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._number % 2 == 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L134_C4", "label": "odd", "type": "function", "loc": [134, 135], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "vector": [2, 1, 0.2899, 0.0043, 1, 0.44, 0.4615, 24, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "odd", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def odd(self):\n return not self.even()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L135_C8", "label": "return", "type": "return", "loc": [135, 135], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L134_C4", "vector": [13, 2, 0.2909, 0.0022, 2, 0.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return not self.even()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L137_C4", "label": "even_i", "type": "function", "loc": [137, 138], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "vector": [2, 1, 0.2963, 0.0043, 1, 0.44, 0.5385, 592, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "even_i", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def even_i(self):\n return self._index % 2 == 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L138_C8", "label": "return", "type": "return", "loc": [138, 138], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L137_C4", "vector": [13, 2, 0.2974, 0.0022, 2, 0.79, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._index % 2 == 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L140_C4", "label": "odd_i", "type": "function", "loc": [140, 141], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "vector": [2, 1, 0.3028, 0.0043, 1, 0.44, 0.6154, 375, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "odd_i", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def odd_i(self):\n return not self.even_i()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L141_C8", "label": "return", "type": "return", "loc": [141, 141], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L140_C4", "vector": [13, 2, 0.3039, 0.0022, 2, 0.05, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return not self.even_i()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L143_C4", "label": "letter", "type": "function", "loc": [143, 144], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "vector": [2, 1, 0.3093, 0.0043, 1, 0.44, 0.6923, 762, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "letter", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def letter(self):\n return self.Letter().lower()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L144_C8", "label": "return", "type": "return", "loc": [144, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L143_C4", "vector": [13, 2, 0.3103, 0.0022, 2, 0.48, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.Letter().lower()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L146_C4", "label": "Letter", "type": "function", "loc": [146, 148], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "vector": [2, 1, 0.3168, 0.0065, 1, 0.44, 0.7692, 847, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "Letter", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Letter(self):\n n = ord('A') + self._index\n return chr(n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L147_C8", "label": "n =", "type": "assigned_variable", "loc": [147, 147], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L146_C4", "vector": [14, 2, 0.3168, 0.0022, 2, 0.28, 0.0, 773, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " n = ord('A') + self._index"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L148_C8", "label": "return", "type": "return", "loc": [148, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L146_C4", "vector": [13, 2, 0.319, 0.0022, 2, 0.28, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return chr(n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L150_C4", "label": "roman", "type": "function", "loc": [150, 151], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "vector": [2, 1, 0.3244, 0.0043, 1, 0.44, 0.8462, 522, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "roman", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def roman(self):\n return self.Roman().lower()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L151_C8", "label": "return", "type": "return", "loc": [151, 151], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L150_C4", "vector": [13, 2, 0.3254, 0.0022, 2, 0.8, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.Roman().lower()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L153_C4", "label": "Roman", "type": "function", "loc": [153, 154], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "vector": [2, 1, 0.3308, 0.0043, 1, 0.44, 0.9231, 9, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "Roman", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Roman(self):\n return Roman(self._number)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L154_C8", "label": "return", "type": "return", "loc": [154, 154], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L153_C4", "vector": [13, 2, 0.3319, 0.0022, 2, 0.58, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return Roman(self._number)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L156_C4", "label": "item", "type": "function", "loc": [156, 157], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "vector": [2, 1, 0.3373, 0.0043, 1, 0.44, 1.0, 434, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "item", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def item(self):\n return self._item"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L157_C8", "label": "return", "type": "return", "loc": [157, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L156_C4", "vector": [13, 2, 0.3384, 0.0022, 2, 0.32, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._item"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L163_C0", "label": "ValuesGetterMixin", "type": "class", "loc": [163, 174], "level": 0, "parent": null, "vector": [3, 0, 0.3631, 0.0259, 0, 0.66, 0.7727, 385, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "ValuesGetterMixin", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ValuesGetterMixin:\n def __init__(self, origList):\n self._origList = origList\n\n def _getValues(self, field=None, criteria=None):\n if field:\n ret = [lookup_func(elm, field) for elm in self._origList]\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L164_C4", "label": "__init__", "type": "function", "loc": [164, 165], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L163_C0", "vector": [2, 1, 0.3545, 0.0043, 1, 0.94, 0.0, 555, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "origList"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, origList):\n self._origList = origList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L165_C8", "label": "self._origList =", "type": "assigned_variable", "loc": [165, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L164_C4", "vector": [14, 2, 0.3556, 0.0022, 2, 0.74, 0.0, 562, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._origList", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._origList = origList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L167_C4", "label": "_getValues", "type": "function", "loc": [167, 174], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L163_C0", "vector": [2, 1, 0.3675, 0.0172, 1, 0.94, 1.0, 31, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "_getValues", "arg_names": ["self", "field", "criteria"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _getValues(self, field=None, criteria=None):\n if field:\n ret = [lookup_func(elm, field) for elm in self._origList]\n else:\n ret = self._origList\n if criteria:\n ret = list(filter(criteria, ret))\n return ret"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L168_C8", "label": "if", "type": "if", "loc": [168, 171], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L167_C4", "vector": [4, 2, 0.3653, 0.0086, 2, 0.51, 0.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if field:\n ret = [lookup_func(elm, field) for elm in self._origList]\n else:\n ret = self._origList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L169_C12", "label": "ret =", "type": "assigned_variable", "loc": [169, 169], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L168_C8", "vector": [14, 3, 0.3642, 0.0022, 3, 0.77, 0.0, 501, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "ret", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ret = [lookup_func(elm, field) for elm in self._origList]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L171_C12", "label": "ret =", "type": "assigned_variable", "loc": [171, 171], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L168_C8", "vector": [14, 3, 0.3685, 0.0022, 3, 0.77, 1.0, 501, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "ret", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ret = self._origList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L172_C8", "label": "if", "type": "if", "loc": [172, 173], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L167_C4", "vector": [4, 2, 0.3718, 0.0043, 2, 0.51, 0.5, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if criteria:\n ret = list(filter(criteria, ret))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L173_C12", "label": "ret = list()", "type": "assigned_variable", "loc": [173, 173], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L172_C8", "vector": [14, 3, 0.3728, 0.0022, 3, 0.69, 0.0, 501, 3, 1, 0, 0, 430, 10, 2], "semantic": {"name": "ret", "arg_names": [], "import_names": [], "rhs_call_name": "list", "annotation": ""}, "snippet": " ret = list(filter(criteria, ret))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L174_C8", "label": "return", "type": "return", "loc": [174, 174], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L167_C4", "vector": [13, 2, 0.375, 0.0022, 2, 0.51, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ret"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "label": "RecordStats", "type": "class", "loc": [177, 308], "level": 0, "parent": null, "vector": [3, 0, 0.5226, 0.2845, 0, 0.66, 0.8182, 82, 0, 15, 0, 0, 787, 0, 29], "semantic": {"name": "RecordStats", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class RecordStats(IndexFormats, ValuesGetterMixin):\n \"\"\"The statistics that depend on the current record.\n \"\"\"\n def __init__(self, origList, index):\n record = origList[index] # Raises IndexError.\n IndexFormats.__init__(self, index, record)\n ValuesGetterMixin.__init__(self, origList)\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L178_C4", "label": "expression", "type": "expression", "loc": [178, 179], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [8, 1, 0.3847, 0.0043, 1, 0.59, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"The statistics that depend on the current record.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L180_C4", "label": "__init__", "type": "function", "loc": [180, 183], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [2, 1, 0.3912, 0.0086, 1, 0.59, 0.0588, 555, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "origList", "index"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, origList, index):\n record = origList[index] # Raises IndexError.\n IndexFormats.__init__(self, index, record)\n ValuesGetterMixin.__init__(self, origList)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L181_C8", "label": "record =", "type": "assigned_variable", "loc": [181, 181], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L180_C4", "vector": [14, 2, 0.3901, 0.0022, 2, 0.83, 0.0, 667, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "record", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " record = origList[index] # Raises IndexError."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L182_C8", "label": "__init__()", "type": "expression", "loc": [182, 182], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L180_C4", "vector": [8, 2, 0.3922, 0.0022, 2, 0.83, 0.5, 555, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " IndexFormats.__init__(self, index, record)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L183_C8", "label": "__init__()", "type": "expression", "loc": [183, 183], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L180_C4", "vector": [8, 2, 0.3944, 0.0022, 2, 0.83, 1.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " ValuesGetterMixin.__init__(self, origList)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L185_C4", "label": "length", "type": "function", "loc": [185, 186], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [2, 1, 0.3998, 0.0043, 1, 0.59, 0.1176, 221, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "length", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def length(self):\n return len(self._origList)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L186_C8", "label": "return", "type": "return", "loc": [186, 186], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L185_C4", "vector": [13, 2, 0.4009, 0.0022, 2, 0.0, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return len(self._origList)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L188_C4", "label": "first", "type": "function", "loc": [188, 189], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [2, 1, 0.4062, 0.0043, 1, 0.59, 0.1765, 199, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "first", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def first(self):\n return self._index == 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L189_C8", "label": "return", "type": "return", "loc": [189, 189], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L188_C4", "vector": [13, 2, 0.4073, 0.0022, 2, 0.34, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._index == 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L191_C4", "label": "last", "type": "function", "loc": [191, 192], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [2, 1, 0.4127, 0.0043, 1, 0.59, 0.2353, 95, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "last", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def last(self):\n return self._index >= len(self._origList) - 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L192_C8", "label": "return", "type": "return", "loc": [192, 192], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L191_C4", "vector": [13, 2, 0.4138, 0.0022, 2, 0.01, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._index >= len(self._origList) - 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L194_C4", "label": "_firstOrLastValue", "type": "function", "loc": [194, 203], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [2, 1, 0.4278, 0.0216, 1, 0.59, 0.2941, 174, 0, 4, 1, 0, 0, 0, 2], "semantic": {"name": "_firstOrLastValue", "arg_names": ["self", "field", "currentIndex", "otherIndex"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _firstOrLastValue(self, field, currentIndex, otherIndex):\n currentValue = self._origList[currentIndex] # Raises IndexError.\n try:\n otherValue = self._origList[otherIndex]\n except IndexError:\n return True\n if field:\n currentValue = lookup_func(currentValue, field)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L195_C8", "label": "currentValue =", "type": "assigned_variable", "loc": [195, 195], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L194_C4", "vector": [14, 2, 0.4203, 0.0022, 2, 0.71, 0.0, 651, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "currentValue", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " currentValue = self._origList[currentIndex] # Raises IndexError."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L196_C8", "label": "try", "type": "try", "loc": [196, 199], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L194_C4", "vector": [7, 2, 0.4256, 0.0086, 2, 0.71, 0.3333, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n otherValue = self._origList[otherIndex]\n except IndexError:\n return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L197_C12", "label": "otherValue =", "type": "assigned_variable", "loc": [197, 197], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L196_C8", "vector": [14, 3, 0.4246, 0.0022, 3, 0.28, 0.0, 789, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "otherValue", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " otherValue = self._origList[otherIndex]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L199_C12", "label": "return", "type": "return", "loc": [199, 199], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L196_C8", "vector": [13, 3, 0.4289, 0.0022, 3, 0.28, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L200_C8", "label": "if", "type": "if", "loc": [200, 202], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L194_C4", "vector": [4, 2, 0.4332, 0.0065, 2, 0.71, 0.6667, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if field:\n currentValue = lookup_func(currentValue, field)\n otherValue = lookup_func(otherValue, field)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L201_C12", "label": "currentValue = lookup_func()", "type": "assigned_variable", "loc": [201, 201], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L200_C8", "vector": [14, 3, 0.4332, 0.0022, 3, 0.27, 0.0, 651, 3, 2, 0, 0, 197, 10, 1], "semantic": {"name": "currentValue", "arg_names": [], "import_names": [], "rhs_call_name": "lookup_func", "annotation": ""}, "snippet": " currentValue = lookup_func(currentValue, field)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L202_C12", "label": "otherValue = lookup_func()", "type": "assigned_variable", "loc": [202, 202], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L200_C8", "vector": [14, 3, 0.4353, 0.0022, 3, 0.27, 1.0, 789, 3, 2, 0, 0, 197, 10, 1], "semantic": {"name": "otherValue", "arg_names": [], "import_names": [], "rhs_call_name": "lookup_func", "annotation": ""}, "snippet": " otherValue = lookup_func(otherValue, field)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L203_C8", "label": "return", "type": "return", "loc": [203, 203], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L194_C4", "vector": [13, 2, 0.4375, 0.0022, 2, 0.71, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return currentValue != otherValue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L205_C4", "label": "firstValue", "type": "function", "loc": [205, 206], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [2, 1, 0.4429, 0.0043, 1, 0.59, 0.3529, 9, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "firstValue", "arg_names": ["self", "field"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def firstValue(self, field=None):\n return self._firstOrLastValue(field, self._index, self._index - 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L206_C8", "label": "return", "type": "return", "loc": [206, 206], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L205_C4", "vector": [13, 2, 0.444, 0.0022, 2, 0.7, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._firstOrLastValue(field, self._index, self._index - 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L208_C4", "label": "lastValue", "type": "function", "loc": [208, 209], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [2, 1, 0.4494, 0.0043, 1, 0.59, 0.4118, 751, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "lastValue", "arg_names": ["self", "field"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def lastValue(self, field=None):\n return self._firstOrLastValue(field, self._index, self._index + 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L209_C8", "label": "return", "type": "return", "loc": [209, 209], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L208_C4", "vector": [13, 2, 0.4504, 0.0022, 2, 0.39, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._firstOrLastValue(field, self._index, self._index + 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "label": "percentOfTotal", "type": "function", "loc": [213, 238], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [2, 1, 0.486, 0.056, 1, 0.59, 0.4706, 326, 0, 5, 1, 0, 0, 0, 7], "semantic": {"name": "percentOfTotal", "arg_names": ["self", "field", "suffix", "default", "decimals"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def percentOfTotal(self, field=None, suffix='%', default='N/A', decimals=2):\n rec = self._origList[self._index]\n if field:\n val = lookup_func(rec, field)\n else:\n val = rec\n try:\n lis = self._getValues(field, isNumeric)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L214_C8", "label": "rec =", "type": "assigned_variable", "loc": [214, 214], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "vector": [14, 2, 0.4612, 0.0022, 2, 0.58, 0.0, 100, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "rec", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rec = self._origList[self._index]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L215_C8", "label": "if", "type": "if", "loc": [215, 218], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "vector": [4, 2, 0.4666, 0.0086, 2, 0.58, 0.125, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if field:\n val = lookup_func(rec, field)\n else:\n val = rec"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L216_C12", "label": "val = lookup_func()", "type": "assigned_variable", "loc": [216, 216], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L215_C8", "vector": [14, 3, 0.4655, 0.0022, 3, 0.33, 0.0, 618, 3, 2, 0, 0, 197, 10, 1], "semantic": {"name": "val", "arg_names": [], "import_names": [], "rhs_call_name": "lookup_func", "annotation": ""}, "snippet": " val = lookup_func(rec, field)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L218_C12", "label": "val =", "type": "assigned_variable", "loc": [218, 218], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L215_C8", "vector": [14, 3, 0.4698, 0.0022, 3, 0.33, 1.0, 618, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "val", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " val = rec"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L219_C8", "label": "try", "type": "try", "loc": [219, 222], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "vector": [7, 2, 0.4752, 0.0086, 2, 0.58, 0.25, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n lis = self._getValues(field, isNumeric)\n except NegativeError:\n return default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L220_C12", "label": "lis = _getValues()", "type": "assigned_variable", "loc": [220, 220], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L219_C8", "vector": [14, 3, 0.4741, 0.0022, 3, 0.08, 0.0, 96, 3, 2, 0, 0, 31, 10, 1], "semantic": {"name": "lis", "arg_names": [], "import_names": [], "rhs_call_name": "_getValues", "annotation": ""}, "snippet": " lis = self._getValues(field, isNumeric)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L222_C12", "label": "return", "type": "return", "loc": [222, 222], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L219_C8", "vector": [13, 3, 0.4784, 0.0022, 3, 0.08, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L223_C8", "label": "total = sum()", "type": "assigned_variable", "loc": [223, 223], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "vector": [14, 2, 0.4806, 0.0022, 2, 0.58, 0.375, 878, 3, 1, 0, 0, 824, 10, 1], "semantic": {"name": "total", "arg_names": [], "import_names": [], "rhs_call_name": "sum", "annotation": ""}, "snippet": " total = sum(lis)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L224_C8", "label": "if", "type": "if", "loc": [224, 225], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "vector": [4, 2, 0.4838, 0.0043, 2, 0.58, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if total == 0.00: # Avoid ZeroDivisionError.\n return default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L225_C12", "label": "return", "type": "return", "loc": [225, 225], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L224_C8", "vector": [13, 3, 0.4849, 0.0022, 3, 0.72, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L226_C8", "label": "val = float()", "type": "assigned_variable", "loc": [226, 226], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "vector": [14, 2, 0.4871, 0.0022, 2, 0.58, 0.625, 618, 3, 1, 0, 0, 639, 10, 1], "semantic": {"name": "val", "arg_names": [], "import_names": [], "rhs_call_name": "float", "annotation": ""}, "snippet": " val = float(val)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L227_C8", "label": "try", "type": "try", "loc": [227, 230], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "vector": [7, 2, 0.4925, 0.0086, 2, 0.58, 0.75, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n percent = (val / total) * 100\n except ZeroDivisionError:\n return default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L228_C12", "label": "percent =", "type": "assigned_variable", "loc": [228, 228], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L227_C8", "vector": [14, 3, 0.4914, 0.0022, 3, 0.12, 0.0, 948, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "percent", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " percent = (val / total) * 100"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L230_C12", "label": "return", "type": "return", "loc": [230, 230], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L227_C8", "vector": [13, 3, 0.4957, 0.0022, 3, 0.12, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L231_C8", "label": "if", "type": "if", "loc": [231, 234], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "vector": [4, 2, 0.5011, 0.0086, 2, 0.58, 0.875, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if decimals == 0:\n percent = int(percent)\n else:\n percent = round(percent, decimals)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L232_C12", "label": "percent = int()", "type": "assigned_variable", "loc": [232, 232], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L231_C8", "vector": [14, 3, 0.5, 0.0022, 3, 0.73, 0.0, 948, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "percent", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " percent = int(percent)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L234_C12", "label": "percent = round()", "type": "assigned_variable", "loc": [234, 234], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L231_C8", "vector": [14, 3, 0.5043, 0.0022, 3, 0.73, 1.0, 948, 3, 2, 0, 0, 19, 10, 1], "semantic": {"name": "percent", "arg_names": [], "import_names": [], "rhs_call_name": "round", "annotation": ""}, "snippet": " percent = round(percent, decimals)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L235_C8", "label": "if", "type": "if", "loc": [235, 238], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "vector": [4, 2, 0.5097, 0.0086, 2, 0.58, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if suffix:\n return str(percent) + suffix # String.\n else:\n return percent # Numeric."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L236_C12", "label": "return", "type": "return", "loc": [236, 236], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L235_C8", "vector": [13, 3, 0.5086, 0.0022, 3, 0.97, 0.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return str(percent) + suffix # String."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L238_C12", "label": "return", "type": "return", "loc": [238, 238], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L235_C8", "vector": [13, 3, 0.5129, 0.0022, 3, 0.97, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return percent # Numeric."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L240_C4", "label": "__call__", "type": "function", "loc": [240, 243], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [2, 1, 0.5205, 0.0086, 1, 0.59, 0.5294, 319, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "__call__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __call__(self): # Overrides IndexFormats.__call__\n \"\"\"This instance is not callable, so we override the super method.\n \"\"\"\n raise NotImplementedError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L241_C8", "label": "expression", "type": "expression", "loc": [241, 242], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L240_C4", "vector": [8, 2, 0.5205, 0.0043, 2, 0.06, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"This instance is not callable, so we override the super method.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L245_C4", "label": "prev", "type": "function", "loc": [245, 251], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [2, 1, 0.5345, 0.0151, 1, 0.59, 0.5882, 749, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "prev", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def prev(self):\n if self._index == 0:\n return None\n else:\n length = self.length()\n start = self._index - length\n return PrevNextPage(self._origList, length, start)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L246_C8", "label": "if", "type": "if", "loc": [246, 251], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L245_C4", "vector": [4, 2, 0.5356, 0.0129, 2, 0.73, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._index == 0:\n return None\n else:\n length = self.length()\n start = self._index - length\n return PrevNextPage(self._origList, length, start)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L247_C12", "label": "return", "type": "return", "loc": [247, 247], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L246_C8", "vector": [13, 3, 0.5323, 0.0022, 3, 0.13, 0.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L249_C12", "label": "length = length()", "type": "assigned_variable", "loc": [249, 249], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L246_C8", "vector": [14, 3, 0.5366, 0.0022, 3, 0.13, 0.3333, 221, 3, 0, 0, 0, 221, 10, 1], "semantic": {"name": "length", "arg_names": [], "import_names": [], "rhs_call_name": "length", "annotation": ""}, "snippet": " length = self.length()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L250_C12", "label": "start =", "type": "assigned_variable", "loc": [250, 250], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L246_C8", "vector": [14, 3, 0.5388, 0.0022, 3, 0.13, 0.6667, 511, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " start = self._index - length"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L251_C12", "label": "return", "type": "return", "loc": [251, 251], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L246_C8", "vector": [13, 3, 0.5409, 0.0022, 3, 0.13, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return PrevNextPage(self._origList, length, start)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L253_C4", "label": "next", "type": "function", "loc": [253, 259], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [2, 1, 0.5517, 0.0151, 1, 0.59, 0.6471, 11, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "next", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def next(self):\n if self._index + self.length() == self.length():\n return None\n else:\n length = self.length()\n start = self._index + length\n return PrevNextPage(self._origList, length, start)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L254_C8", "label": "if", "type": "if", "loc": [254, 259], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L253_C4", "vector": [4, 2, 0.5528, 0.0129, 2, 0.12, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._index + self.length() == self.length():\n return None\n else:\n length = self.length()\n start = self._index + length\n return PrevNextPage(self._origList, length, start)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L255_C12", "label": "return", "type": "return", "loc": [255, 255], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L254_C8", "vector": [13, 3, 0.5496, 0.0022, 3, 0.67, 0.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L257_C12", "label": "length = length()", "type": "assigned_variable", "loc": [257, 257], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L254_C8", "vector": [14, 3, 0.5539, 0.0022, 3, 0.67, 0.3333, 221, 3, 0, 0, 0, 221, 10, 1], "semantic": {"name": "length", "arg_names": [], "import_names": [], "rhs_call_name": "length", "annotation": ""}, "snippet": " length = self.length()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L258_C12", "label": "start =", "type": "assigned_variable", "loc": [258, 258], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L254_C8", "vector": [14, 3, 0.556, 0.0022, 3, 0.67, 0.6667, 511, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " start = self._index + length"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L259_C12", "label": "return", "type": "return", "loc": [259, 259], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L254_C8", "vector": [13, 3, 0.5582, 0.0022, 3, 0.67, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return PrevNextPage(self._origList, length, start)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L261_C4", "label": "prevPages", "type": "function", "loc": [261, 262], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [2, 1, 0.5636, 0.0043, 1, 0.59, 0.7059, 243, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "prevPages", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def prevPages(self):\n raise NotImplementedError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L264_C4", "label": "nextPages", "type": "function", "loc": [264, 265], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [2, 1, 0.57, 0.0043, 1, 0.59, 0.7647, 592, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "nextPages", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def nextPages(self):\n raise NotImplementedError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L267_C4", "label": "prev_batches =", "type": "assigned_variable", "loc": [267, 267], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [14, 1, 0.5754, 0.0022, 1, 0.59, 0.8235, 105, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "prev_batches", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " prev_batches = prevPages"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L268_C4", "label": "next_batches =", "type": "assigned_variable", "loc": [268, 268], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [14, 1, 0.5776, 0.0022, 1, 0.59, 0.8824, 535, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "next_batches", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " next_batches = nextPages"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L270_C4", "label": "summary", "type": "function", "loc": [270, 271], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [2, 1, 0.583, 0.0043, 1, 0.59, 0.9412, 977, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "summary", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def summary(self):\n raise NotImplementedError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L275_C4", "label": "_prevNextHelper", "type": "function", "loc": [275, 308], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "vector": [2, 1, 0.6282, 0.0733, 1, 0.59, 1.0, 805, 0, 6, 1, 0, 0, 0, 4], "semantic": {"name": "_prevNextHelper", "arg_names": ["self", "start", "end", "size", "orphan", "sequence"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _prevNextHelper(self, start, end, size, orphan, sequence):\n \"\"\"Copied from Zope's DT_InSV.py's \"opt\" function.\n \"\"\"\n if size < 1:\n if start > 0 and end > 0 and end >= start:\n size=end+1-start\n else: size=7\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L276_C8", "label": "expression", "type": "expression", "loc": [276, 277], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L275_C4", "vector": [8, 2, 0.5959, 0.0043, 2, 0.02, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Copied from Zope's DT_InSV.py's \"opt\" function.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L278_C8", "label": "if", "type": "if", "loc": [278, 281], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L275_C4", "vector": [4, 2, 0.6024, 0.0086, 2, 0.02, 0.3333, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if size < 1:\n if start > 0 and end > 0 and end >= start:\n size=end+1-start\n else: size=7"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L279_C12", "label": "if", "type": "if", "loc": [279, 281], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L278_C8", "vector": [4, 3, 0.6034, 0.0065, 3, 0.56, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if start > 0 and end > 0 and end >= start:\n size=end+1-start\n else: size=7"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L280_C16", "label": "size =", "type": "assigned_variable", "loc": [280, 280], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L279_C12", "vector": [14, 4, 0.6034, 0.0022, 4, 0.96, 0.0, 714, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "size", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " size=end+1-start"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L281_C18", "label": "size =", "type": "assigned_variable", "loc": [281, 281], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L279_C12", "vector": [14, 4, 0.6056, 0.0022, 4, 0.96, 1.0, 714, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "size", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " else: size=7"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L283_C8", "label": "if", "type": "if", "loc": [283, 306], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L275_C4", "vector": [4, 2, 0.6347, 0.0517, 2, 0.02, 0.6667, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if start > 0:\n\n try: sequence[start-1]\n except: start=len(sequence)\n # if start > l: start=l\n\n if end > 0:\n if end < start: end=start"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L285_C12", "label": "try", "type": "try", "loc": [285, 286], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L283_C8", "vector": [7, 3, 0.6153, 0.0043, 3, 0.16, 0.0, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try: sequence[start-1]\n except: start=len(sequence)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L285_C17", "label": "expression", "type": "expression", "loc": [285, 285], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L285_C12", "vector": [8, 4, 0.6142, 0.0022, 4, 0.85, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try: sequence[start-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L286_C20", "label": "start = len()", "type": "assigned_variable", "loc": [286, 286], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L285_C12", "vector": [14, 4, 0.6164, 0.0022, 4, 0.85, 0.0, 511, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " except: start=len(sequence)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L289_C12", "label": "if", "type": "if", "loc": [289, 294], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L283_C8", "vector": [4, 3, 0.6282, 0.0129, 3, 0.16, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if end > 0:\n if end < start: end=start\n else:\n end=start+size-1\n try: sequence[end+orphan-1]\n except: end=len(sequence)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L290_C16", "label": "if", "type": "if", "loc": [290, 290], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L289_C12", "vector": [4, 4, 0.625, 0.0022, 4, 0.86, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if end < start: end=start"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L290_C32", "label": "end =", "type": "assigned_variable", "loc": [290, 290], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L290_C16", "vector": [14, 5, 0.625, 0.0022, 5, 0.64, 0.0, 128, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "end", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if end < start: end=start"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L292_C16", "label": "end =", "type": "assigned_variable", "loc": [292, 292], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L289_C12", "vector": [14, 4, 0.6293, 0.0022, 4, 0.86, 0.5, 128, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "end", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end=start+size-1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L293_C16", "label": "try", "type": "try", "loc": [293, 294], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L289_C12", "vector": [7, 4, 0.6325, 0.0043, 4, 0.86, 1.0, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try: sequence[end+orphan-1]\n except: end=len(sequence)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L293_C21", "label": "expression", "type": "expression", "loc": [293, 293], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L293_C16", "vector": [8, 5, 0.6315, 0.0022, 5, 0.14, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try: sequence[end+orphan-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L294_C24", "label": "end = len()", "type": "assigned_variable", "loc": [294, 294], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L293_C16", "vector": [14, 5, 0.6336, 0.0022, 5, 0.14, 0.0, 128, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "end", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " except: end=len(sequence)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L296_C8", "label": "if", "type": "if", "loc": [296, 306], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L283_C8", "vector": [4, 3, 0.6487, 0.0237, 3, 0.16, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif end > 0:\n try: sequence[end-1]\n except: end=len(sequence)\n # if end > l: end=l\n start=end+1-size\n if start - 1 < orphan: start=1\n else:\n start=1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L297_C12", "label": "try", "type": "try", "loc": [297, 298], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L296_C8", "vector": [7, 4, 0.6412, 0.0043, 4, 0.47, 0.0, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try: sequence[end-1]\n except: end=len(sequence)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L297_C17", "label": "expression", "type": "expression", "loc": [297, 297], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L297_C12", "vector": [8, 5, 0.6401, 0.0022, 5, 0.25, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try: sequence[end-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L298_C20", "label": "end = len()", "type": "assigned_variable", "loc": [298, 298], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L297_C12", "vector": [14, 5, 0.6422, 0.0022, 5, 0.25, 0.0, 128, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "end", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " except: end=len(sequence)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L300_C12", "label": "start =", "type": "assigned_variable", "loc": [300, 300], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L296_C8", "vector": [14, 4, 0.6466, 0.0022, 4, 0.47, 0.2, 511, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " start=end+1-size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L301_C12", "label": "if", "type": "if", "loc": [301, 301], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L296_C8", "vector": [4, 4, 0.6487, 0.0022, 4, 0.47, 0.4, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if start - 1 < orphan: start=1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L301_C35", "label": "start =", "type": "assigned_variable", "loc": [301, 301], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L301_C12", "vector": [14, 5, 0.6487, 0.0022, 5, 0.69, 0.0, 511, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if start - 1 < orphan: start=1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L303_C12", "label": "start =", "type": "assigned_variable", "loc": [303, 303], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L296_C8", "vector": [14, 4, 0.653, 0.0022, 4, 0.47, 0.6, 511, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " start=1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L304_C12", "label": "end =", "type": "assigned_variable", "loc": [304, 304], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L296_C8", "vector": [14, 4, 0.6552, 0.0022, 4, 0.47, 0.8, 128, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "end", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end=start+size-1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L305_C12", "label": "try", "type": "try", "loc": [305, 306], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L296_C8", "vector": [7, 4, 0.6584, 0.0043, 4, 0.47, 1.0, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try: sequence[end+orphan-1]\n except: end=len(sequence)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L305_C17", "label": "expression", "type": "expression", "loc": [305, 305], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L305_C12", "vector": [8, 5, 0.6573, 0.0022, 5, 0.53, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try: sequence[end+orphan-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L306_C20", "label": "end = len()", "type": "assigned_variable", "loc": [306, 306], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L305_C12", "vector": [14, 5, 0.6595, 0.0022, 5, 0.53, 0.0, 128, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "end", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " except: end=len(sequence)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L308_C8", "label": "return", "type": "return", "loc": [308, 308], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L275_C4", "vector": [13, 2, 0.6638, 0.0022, 2, 0.02, 1.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return start, end, size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "label": "Summary", "type": "class", "loc": [312, 358], "level": 0, "parent": null, "vector": [3, 0, 0.722, 0.1013, 0, 0.66, 0.8636, 245, 0, 11, 0, 0, 385, 0, 17], "semantic": {"name": "Summary", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Summary(ValuesGetterMixin):\n \"\"\"The summary statistics, that don't depend on the current record.\n \"\"\"\n def __init__(self, origList):\n ValuesGetterMixin.__init__(self, origList)\n \n def sum(self, field=None):\n lis = self._getValues(field, isNumeric)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L313_C4", "label": "expression", "type": "expression", "loc": [313, 314], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "vector": [8, 1, 0.6756, 0.0043, 1, 0.58, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"The summary statistics, that don't depend on the current record.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L315_C4", "label": "__init__", "type": "function", "loc": [315, 316], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "vector": [2, 1, 0.68, 0.0043, 1, 0.58, 0.0769, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "origList"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, origList):\n ValuesGetterMixin.__init__(self, origList)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L316_C8", "label": "__init__()", "type": "expression", "loc": [316, 316], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L315_C4", "vector": [8, 2, 0.681, 0.0022, 2, 0.2, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " ValuesGetterMixin.__init__(self, origList)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L318_C4", "label": "sum", "type": "function", "loc": [318, 320], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "vector": [2, 1, 0.6875, 0.0065, 1, 0.58, 0.1538, 824, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "sum", "arg_names": ["self", "field"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def sum(self, field=None):\n lis = self._getValues(field, isNumeric)\n return sum(lis)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L319_C8", "label": "lis = _getValues()", "type": "assigned_variable", "loc": [319, 319], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L318_C4", "vector": [14, 2, 0.6875, 0.0022, 2, 0.1, 0.0, 96, 3, 2, 0, 0, 31, 10, 1], "semantic": {"name": "lis", "arg_names": [], "import_names": [], "rhs_call_name": "_getValues", "annotation": ""}, "snippet": " lis = self._getValues(field, isNumeric)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L320_C8", "label": "return", "type": "return", "loc": [320, 320], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L318_C4", "vector": [13, 2, 0.6897, 0.0022, 2, 0.1, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return sum(lis)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L322_C4", "label": "total =", "type": "assigned_variable", "loc": [322, 322], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "vector": [14, 1, 0.694, 0.0022, 1, 0.58, 0.2308, 878, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "total", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " total = sum"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L324_C4", "label": "count", "type": "function", "loc": [324, 326], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "vector": [2, 1, 0.7004, 0.0065, 1, 0.58, 0.3077, 778, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "count", "arg_names": ["self", "field"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def count(self, field=None):\n lis = self._getValues(field, isNotNone)\n return len(lis)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L325_C8", "label": "lis = _getValues()", "type": "assigned_variable", "loc": [325, 325], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L324_C4", "vector": [14, 2, 0.7004, 0.0022, 2, 0.01, 0.0, 96, 3, 2, 0, 0, 31, 10, 1], "semantic": {"name": "lis", "arg_names": [], "import_names": [], "rhs_call_name": "_getValues", "annotation": ""}, "snippet": " lis = self._getValues(field, isNotNone)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L326_C8", "label": "return", "type": "return", "loc": [326, 326], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L324_C4", "vector": [13, 2, 0.7026, 0.0022, 2, 0.01, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return len(lis)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L328_C4", "label": "min", "type": "function", "loc": [328, 330], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "vector": [2, 1, 0.7091, 0.0065, 1, 0.58, 0.3846, 867, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "min", "arg_names": ["self", "field"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def min(self, field=None):\n lis = self._getValues(field, isNotNone)\n return min(lis) # Python builtin function min."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L329_C8", "label": "lis = _getValues()", "type": "assigned_variable", "loc": [329, 329], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L328_C4", "vector": [14, 2, 0.7091, 0.0022, 2, 0.41, 0.0, 96, 3, 2, 0, 0, 31, 10, 1], "semantic": {"name": "lis", "arg_names": [], "import_names": [], "rhs_call_name": "_getValues", "annotation": ""}, "snippet": " lis = self._getValues(field, isNotNone)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L330_C8", "label": "return", "type": "return", "loc": [330, 330], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L328_C4", "vector": [13, 2, 0.7112, 0.0022, 2, 0.41, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return min(lis) # Python builtin function min."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L332_C4", "label": "max", "type": "function", "loc": [332, 334], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "vector": [2, 1, 0.7177, 0.0065, 1, 0.58, 0.4615, 442, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "max", "arg_names": ["self", "field"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def max(self, field=None):\n lis = self._getValues(field, isNotNone)\n return max(lis) # Python builtin function max."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L333_C8", "label": "lis = _getValues()", "type": "assigned_variable", "loc": [333, 333], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L332_C4", "vector": [14, 2, 0.7177, 0.0022, 2, 0.32, 0.0, 96, 3, 2, 0, 0, 31, 10, 1], "semantic": {"name": "lis", "arg_names": [], "import_names": [], "rhs_call_name": "_getValues", "annotation": ""}, "snippet": " lis = self._getValues(field, isNotNone)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L334_C8", "label": "return", "type": "return", "loc": [334, 334], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L332_C4", "vector": [13, 2, 0.7198, 0.0022, 2, 0.32, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return max(lis) # Python builtin function max."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L336_C4", "label": "mean", "type": "function", "loc": [336, 340], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "vector": [2, 1, 0.7284, 0.0108, 1, 0.58, 0.5385, 856, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "mean", "arg_names": ["self", "field"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def mean(self, field=None):\n \"\"\"Always returns a floating point number.\n \"\"\"\n lis = self._getValues(field, isNumeric)\n return mean(lis)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L337_C8", "label": "expression", "type": "expression", "loc": [337, 338], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L336_C4", "vector": [8, 2, 0.7274, 0.0043, 2, 0.67, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Always returns a floating point number.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L339_C8", "label": "lis = _getValues()", "type": "assigned_variable", "loc": [339, 339], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L336_C4", "vector": [14, 2, 0.7306, 0.0022, 2, 0.67, 0.5, 96, 3, 2, 0, 0, 31, 10, 1], "semantic": {"name": "lis", "arg_names": [], "import_names": [], "rhs_call_name": "_getValues", "annotation": ""}, "snippet": " lis = self._getValues(field, isNumeric)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L340_C8", "label": "return", "type": "return", "loc": [340, 340], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L336_C4", "vector": [13, 2, 0.7328, 0.0022, 2, 0.67, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return mean(lis)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L342_C4", "label": "average =", "type": "assigned_variable", "loc": [342, 342], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "vector": [14, 1, 0.7371, 0.0022, 1, 0.58, 0.6154, 273, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "average", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " average = mean"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L344_C4", "label": "median", "type": "function", "loc": [344, 346], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "vector": [2, 1, 0.7435, 0.0065, 1, 0.58, 0.6923, 247, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "median", "arg_names": ["self", "field"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def median(self, field=None):\n lis = self._getValues(field, isNumeric)\n return median(lis)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L345_C8", "label": "lis = _getValues()", "type": "assigned_variable", "loc": [345, 345], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L344_C4", "vector": [14, 2, 0.7435, 0.0022, 2, 0.72, 0.0, 96, 3, 2, 0, 0, 31, 10, 1], "semantic": {"name": "lis", "arg_names": [], "import_names": [], "rhs_call_name": "_getValues", "annotation": ""}, "snippet": " lis = self._getValues(field, isNumeric)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L346_C8", "label": "return", "type": "return", "loc": [346, 346], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L344_C4", "vector": [13, 2, 0.7457, 0.0022, 2, 0.72, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return median(lis)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L348_C4", "label": "variance", "type": "function", "loc": [348, 349], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "vector": [2, 1, 0.7511, 0.0043, 1, 0.58, 0.7692, 818, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "variance", "arg_names": ["self", "field"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def variance(self, field=None):\n raiseNotImplementedError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L349_C8", "label": "raiseNotImplementedError()", "type": "expression", "loc": [349, 349], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L348_C4", "vector": [8, 2, 0.7522, 0.0022, 2, 0.22, 0.0, 234, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "raiseNotImplementedError", "arg_names": [], "import_names": [], "rhs_call_name": "raiseNotImplementedError", "annotation": ""}, "snippet": " raiseNotImplementedError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L351_C4", "label": "variance_n", "type": "function", "loc": [351, 352], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "vector": [2, 1, 0.7575, 0.0043, 1, 0.58, 0.8462, 439, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "variance_n", "arg_names": ["self", "field"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def variance_n(self, field=None):\n raiseNotImplementedError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L352_C8", "label": "raiseNotImplementedError()", "type": "expression", "loc": [352, 352], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L351_C4", "vector": [8, 2, 0.7586, 0.0022, 2, 0.85, 0.0, 234, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "raiseNotImplementedError", "arg_names": [], "import_names": [], "rhs_call_name": "raiseNotImplementedError", "annotation": ""}, "snippet": " raiseNotImplementedError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L354_C4", "label": "standardDeviation", "type": "function", "loc": [354, 355], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "vector": [2, 1, 0.764, 0.0043, 1, 0.58, 0.9231, 500, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "standardDeviation", "arg_names": ["self", "field"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def standardDeviation(self, field=None):\n raiseNotImplementedError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L355_C8", "label": "raiseNotImplementedError()", "type": "expression", "loc": [355, 355], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L354_C4", "vector": [8, 2, 0.7651, 0.0022, 2, 0.39, 0.0, 234, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "raiseNotImplementedError", "arg_names": [], "import_names": [], "rhs_call_name": "raiseNotImplementedError", "annotation": ""}, "snippet": " raiseNotImplementedError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L357_C4", "label": "standardDeviation_n", "type": "function", "loc": [357, 358], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "vector": [2, 1, 0.7705, 0.0043, 1, 0.58, 1.0, 636, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "standardDeviation_n", "arg_names": ["self", "field"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def standardDeviation_n(self, field=None):\n raiseNotImplementedError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L358_C8", "label": "raiseNotImplementedError()", "type": "expression", "loc": [358, 358], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L357_C4", "vector": [8, 2, 0.7716, 0.0022, 2, 0.69, 0.0, 234, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "raiseNotImplementedError", "arg_names": [], "import_names": [], "rhs_call_name": "raiseNotImplementedError", "annotation": ""}, "snippet": " raiseNotImplementedError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L361_C0", "label": "PrevNextPage", "type": "class", "loc": [361, 366], "level": 0, "parent": null, "vector": [3, 0, 0.7834, 0.0129, 0, 0.66, 0.9091, 923, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "PrevNextPage", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class PrevNextPage:\n def __init__(self, origList, size, start):\n end = start + size\n self.start = IndexFormats(start, origList[start])\n self.end = IndexFormats(end, origList[end])\n self.length = size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L362_C4", "label": "__init__", "type": "function", "loc": [362, 366], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L361_C0", "vector": [2, 1, 0.7845, 0.0108, 1, 0.29, 0.0, 555, 0, 4, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "origList", "size", "start"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, origList, size, start):\n end = start + size\n self.start = IndexFormats(start, origList[start])\n self.end = IndexFormats(end, origList[end])\n self.length = size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L363_C8", "label": "end =", "type": "assigned_variable", "loc": [363, 363], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L362_C4", "vector": [14, 2, 0.7823, 0.0022, 2, 0.82, 0.0, 128, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "end", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end = start + size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L364_C8", "label": "self.start = IndexFormats()", "type": "assigned_variable", "loc": [364, 364], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L362_C4", "vector": [14, 2, 0.7845, 0.0022, 2, 0.82, 0.3333, 45, 3, 2, 0, 0, 787, 10, 1], "semantic": {"name": "self.start", "arg_names": [], "import_names": [], "rhs_call_name": "IndexFormats", "annotation": ""}, "snippet": " self.start = IndexFormats(start, origList[start])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L365_C8", "label": "self.end = IndexFormats()", "type": "assigned_variable", "loc": [365, 365], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L362_C4", "vector": [14, 2, 0.7866, 0.0022, 2, 0.82, 0.6667, 266, 3, 2, 0, 0, 787, 10, 1], "semantic": {"name": "self.end", "arg_names": [], "import_names": [], "rhs_call_name": "IndexFormats", "annotation": ""}, "snippet": " self.end = IndexFormats(end, origList[end])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L366_C8", "label": "self.length =", "type": "assigned_variable", "loc": [366, 366], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L362_C4", "vector": [14, 2, 0.7888, 0.0022, 2, 0.82, 1.0, 879, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.length", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.length = size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L370_C0", "label": "MondoReport", "type": "class", "loc": [370, 408], "level": 0, "parent": null, "vector": [3, 0, 0.8384, 0.0841, 0, 0.66, 0.9545, 6, 0, 4, 0, 0, 0, 0, 13], "semantic": {"name": "MondoReport", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class MondoReport:\n _RecordStatsClass = RecordStats\n _SummaryClass = Summary\n\n def __init__(self, origlist):\n self._origList = origlist\n\n def page(self, size, start, overlap=0, orphan=0):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L371_C4", "label": "_RecordStatsClass =", "type": "assigned_variable", "loc": [371, 371], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L370_C0", "vector": [14, 1, 0.7996, 0.0022, 1, 0.18, 0.0, 8, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_RecordStatsClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _RecordStatsClass = RecordStats"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L372_C4", "label": "_SummaryClass =", "type": "assigned_variable", "loc": [372, 372], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L370_C0", "vector": [14, 1, 0.8017, 0.0022, 1, 0.18, 0.1667, 887, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_SummaryClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _SummaryClass = Summary"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L374_C4", "label": "__init__", "type": "function", "loc": [374, 375], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L370_C0", "vector": [2, 1, 0.8071, 0.0043, 1, 0.18, 0.3333, 555, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "origlist"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, origlist):\n self._origList = origlist"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L375_C8", "label": "self._origList =", "type": "assigned_variable", "loc": [375, 375], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L374_C4", "vector": [14, 2, 0.8082, 0.0022, 2, 0.31, 0.0, 562, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._origList", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._origList = origlist"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "label": "page", "type": "function", "loc": [377, 397], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L370_C0", "vector": [2, 1, 0.8341, 0.0453, 1, 0.18, 0.5, 623, 0, 5, 1, 0, 0, 0, 10], "semantic": {"name": "page", "arg_names": ["self", "size", "start", "overlap", "orphan"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def page(self, size, start, overlap=0, orphan=0):\n \"\"\"Returns list of ($r, $a, $b)\n \"\"\"\n if overlap != 0:\n raise NotImplementedError(\"non-zero overlap\")\n if orphan != 0:\n raise NotImplementedError(\"non-zero orphan\")\n origList = self._origList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L378_C8", "label": "expression", "type": "expression", "loc": [378, 379], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "vector": [8, 2, 0.8157, 0.0043, 2, 0.05, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Returns list of ($r, $a, $b)\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L380_C8", "label": "if", "type": "if", "loc": [380, 381], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "vector": [4, 2, 0.82, 0.0043, 2, 0.05, 0.1, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if overlap != 0:\n raise NotImplementedError(\"non-zero overlap\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L382_C8", "label": "if", "type": "if", "loc": [382, 383], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "vector": [4, 2, 0.8244, 0.0043, 2, 0.05, 0.2, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if orphan != 0:\n raise NotImplementedError(\"non-zero orphan\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L384_C8", "label": "origList =", "type": "assigned_variable", "loc": [384, 384], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "vector": [14, 2, 0.8276, 0.0022, 2, 0.05, 0.3, 97, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "origList", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " origList = self._origList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L385_C8", "label": "origList_len = len()", "type": "assigned_variable", "loc": [385, 385], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "vector": [14, 2, 0.8297, 0.0022, 2, 0.05, 0.4, 234, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "origList_len", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " origList_len = len(origList)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L386_C8", "label": "start = max()", "type": "assigned_variable", "loc": [386, 386], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "vector": [14, 2, 0.8319, 0.0022, 2, 0.05, 0.5, 511, 3, 2, 0, 0, 442, 10, 1], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "max", "annotation": ""}, "snippet": " start = max(0, start)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L387_C8", "label": "end = min()", "type": "assigned_variable", "loc": [387, 387], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "vector": [14, 2, 0.8341, 0.0022, 2, 0.05, 0.6, 128, 3, 2, 0, 0, 867, 10, 2], "semantic": {"name": "end", "arg_names": [], "import_names": [], "rhs_call_name": "min", "annotation": ""}, "snippet": " end = min( start + size, len(self._origList) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L388_C8", "label": "mySlice =", "type": "assigned_variable", "loc": [388, 388], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "vector": [14, 2, 0.8362, 0.0022, 2, 0.05, 0.7, 757, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "mySlice", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " mySlice = origList[start:end]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L389_C8", "label": "ret =", "type": "assigned_variable", "loc": [389, 389], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "vector": [14, 2, 0.8384, 0.0022, 2, 0.05, 0.8, 501, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "ret", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ret = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:For_L390_C8", "label": "for rel", "type": "for", "loc": [390, 396], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "vector": [6, 2, 0.847, 0.0151, 2, 0.05, 0.9, 773, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "rel", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for rel in range(size):\n abs_ = start + rel\n r = mySlice[rel]\n a = self._RecordStatsClass(origList, abs_)\n b = self._RecordStatsClass(mySlice, rel)\n tup = r, a, b\n ret.append(tup)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L391_C12", "label": "abs_ =", "type": "assigned_variable", "loc": [391, 391], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:For_L390_C8", "vector": [14, 3, 0.8427, 0.0022, 3, 0.13, 0.0, 599, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "abs_", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " abs_ = start + rel"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L392_C12", "label": "r =", "type": "assigned_variable", "loc": [392, 392], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:For_L390_C8", "vector": [14, 3, 0.8448, 0.0022, 3, 0.13, 0.2, 436, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "r", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " r = mySlice[rel]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L393_C12", "label": "a = _RecordStatsClass()", "type": "assigned_variable", "loc": [393, 393], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:For_L390_C8", "vector": [14, 3, 0.847, 0.0022, 3, 0.13, 0.4, 475, 3, 2, 0, 0, 8, 10, 1], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "_RecordStatsClass", "annotation": ""}, "snippet": " a = self._RecordStatsClass(origList, abs_)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L394_C12", "label": "b = _RecordStatsClass()", "type": "assigned_variable", "loc": [394, 394], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:For_L390_C8", "vector": [14, 3, 0.8491, 0.0022, 3, 0.13, 0.6, 756, 3, 2, 0, 0, 8, 10, 1], "semantic": {"name": "b", "arg_names": [], "import_names": [], "rhs_call_name": "_RecordStatsClass", "annotation": ""}, "snippet": " b = self._RecordStatsClass(mySlice, rel)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L395_C12", "label": "tup =", "type": "assigned_variable", "loc": [395, 395], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:For_L390_C8", "vector": [14, 3, 0.8513, 0.0022, 3, 0.13, 0.8, 218, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "tup", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " tup = r, a, b"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L396_C12", "label": "append()", "type": "expression", "loc": [396, 396], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:For_L390_C8", "vector": [8, 3, 0.8534, 0.0022, 3, 0.13, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " ret.append(tup)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L397_C8", "label": "return", "type": "return", "loc": [397, 397], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "vector": [13, 2, 0.8556, 0.0022, 2, 0.05, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ret"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L400_C4", "label": "batch =", "type": "assigned_variable", "loc": [400, 400], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L370_C0", "vector": [14, 1, 0.8621, 0.0022, 1, 0.18, 0.6667, 34, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "batch", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " batch = page"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L402_C4", "label": "all", "type": "function", "loc": [402, 404], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L370_C0", "vector": [2, 1, 0.8685, 0.0065, 1, 0.18, 0.8333, 895, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "all", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def all(self):\n origList_len = len(self._origList)\n return self.page(origList_len, 0, 0, 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L403_C8", "label": "origList_len = len()", "type": "assigned_variable", "loc": [403, 403], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L402_C4", "vector": [14, 2, 0.8685, 0.0022, 2, 0.21, 0.0, 234, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "origList_len", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " origList_len = len(self._origList)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L404_C8", "label": "return", "type": "return", "loc": [404, 404], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L402_C4", "vector": [13, 2, 0.8707, 0.0022, 2, 0.21, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.page(origList_len, 0, 0, 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L407_C4", "label": "summary", "type": "function", "loc": [407, 408], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L370_C0", "vector": [2, 1, 0.8782, 0.0043, 1, 0.18, 1.0, 977, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "summary", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def summary(self):\n return self._SummaryClass(self._origList)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L408_C8", "label": "return", "type": "return", "loc": [408, 408], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L407_C4", "vector": [13, 2, 0.8793, 0.0022, 2, 0.87, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._SummaryClass(self._origList)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L410_C0", "label": "expression", "type": "expression", "loc": [410, 462], "level": 0, "parent": null, "vector": [8, 0, 0.9397, 0.1142, 0, 0.66, 1.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\n**********************************\n Return a pageful of records from a sequence, with statistics.\n\n in : origlist, list or tuple. The entire set of records. This is\n usually a list of objects or a list of dictionaries.\n page, int >= 0. Which page to display.\n size, int >= 1. How many records per page."}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:ImportFrom_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:ImportFrom_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L27_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L28_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L27_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L30_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L54_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L55_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L57_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L58_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L60_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L61_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L63_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L64_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L65_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L66_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L67_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L68_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L69_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L68_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L70_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L72_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:While_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L73_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L77_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L78_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L79_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L80_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L83_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L84_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L86_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L87_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L86_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L86_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L90_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L91_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L86_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L92_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L86_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L95_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L95_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L115_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L118_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L119_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L120_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L121_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L123_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L123_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L124_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L126_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L128_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L128_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L129_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L131_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L131_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L132_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L134_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L134_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L135_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L137_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L137_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L138_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L140_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L140_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L143_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L143_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L144_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L146_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L146_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L146_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L148_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L150_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L150_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L151_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L153_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L154_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L156_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L156_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L157_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L163_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L164_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L164_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L163_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L167_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L167_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L168_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L168_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L169_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L168_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L171_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L167_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L172_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L172_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L173_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L167_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L174_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L178_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L180_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L180_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L181_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L180_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L182_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L180_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L183_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L185_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L185_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L186_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L188_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L188_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L189_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L191_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L191_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L192_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L194_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L194_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L195_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L194_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L196_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L196_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L197_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L196_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L199_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L194_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L200_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L200_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L201_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L200_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L202_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L194_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L203_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L205_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L205_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L206_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L208_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L208_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L209_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L214_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L215_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L215_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L216_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L215_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L218_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L219_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L220_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L222_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L223_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L224_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L224_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L225_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L226_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L227_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L227_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L228_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L227_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L230_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L231_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L231_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L232_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L231_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L234_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L213_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L235_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L235_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L236_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L235_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L238_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L240_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L240_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L241_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L245_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L246_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L246_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L247_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L246_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L249_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L246_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L250_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L246_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L251_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L253_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L253_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L254_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L254_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L255_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L254_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L257_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L254_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L258_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L254_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L259_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L261_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L264_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L267_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L268_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L270_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L275_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L276_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L278_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L278_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L279_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L279_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L280_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L279_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L281_C18"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L283_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L283_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L285_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L285_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L285_C17"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L285_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L286_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L283_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L289_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L289_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L290_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L290_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L290_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L289_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L292_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L289_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L293_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L293_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L293_C21"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L293_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L294_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L283_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L296_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L296_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L297_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L297_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L297_C17"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L297_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L298_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L296_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L300_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L296_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L301_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L301_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L301_C35"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L296_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L303_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L296_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L304_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L296_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L305_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L305_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L305_C17"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:Try_L305_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L306_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L308_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L313_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L315_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L315_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L316_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L318_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L318_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L319_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L318_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L320_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L322_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L324_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L324_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L325_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L324_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L326_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L328_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L328_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L329_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L328_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L330_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L332_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L332_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L333_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L332_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L334_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L336_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L336_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L337_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L336_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L339_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L336_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L340_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L342_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L344_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L344_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L345_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L344_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L346_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L348_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L348_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L349_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L351_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L351_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L352_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L354_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L354_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L355_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L312_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L357_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L357_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L358_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L361_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L362_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L362_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L363_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L362_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L364_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L362_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L365_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L362_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L366_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L370_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L371_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L370_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L372_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L370_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L374_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L374_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L375_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L370_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L378_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L380_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:If_L382_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L384_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L385_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L386_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L387_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L388_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L389_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:For_L390_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:For_L390_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L391_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:For_L390_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L392_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:For_L390_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L393_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:For_L390_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L394_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:For_L390_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L395_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:For_L390_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Expr_L396_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L377_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L397_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L370_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L400_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L370_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L402_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L402_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Assign_L403_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L402_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L404_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:ClassDef_L370_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L407_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1469:FunctionDef_L407_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1469:Return_L408_C8"}]
"""This package contains classes, functions, objects and packages contributed by Cheetah users. They are not used by Cheetah itself. There is no guarantee that this directory will be included in Cheetah releases, that these objects will remain here forever, or that they will remain backward-compatible. """ # vim: shiftwidth=5 tabstop=5 expandtab
ajibawa-2023/Python-Code-Large/train/row_1470
1
8
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1470:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.4375, 0.75, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"This package contains classes, functions, objects and packages contributed\n by Cheetah users. They are not used by Cheetah itself. There is no\n guarantee that this directory will be included in Cheetah releases, that\n these objects will remain here forever, or that they will remain\n backward-compatible.\n\"\"\""}]
[]
# $Id: CGITemplate.py,v 1.6 2006/01/29 02:09:59 tavis_rudd Exp $ """A subclass of Cheetah.Template for use in CGI scripts. Usage in a template: #extends Cheetah.Tools.CGITemplate #implements respond $cgiHeaders#slurp Usage in a template inheriting a Python class: 1. The template #extends MyPythonClass #implements respond $cgiHeaders#slurp 2. The Python class from Cheetah.Tools import CGITemplate class MyPythonClass(CGITemplate): def cgiHeadersHook(self): return "Content-Type: text/html; charset=koi8-r\n\n" To read GET/POST variables, use the .webInput method defined in Cheetah.Utils.WebInputMixin (available in all templates without importing anything), use Python's 'cgi' module, or make your own arrangements. This class inherits from Cheetah.Template to make it usable in Cheetah's single-inheritance model. Meta-Data ================================================================================ Author: Mike Orr <iron@mso.oz.net> License: This software is released for unlimited distribution under the terms of the MIT license. See the LICENSE file. Version: $Revision: 1.6 $ Start Date: 2001/10/03 Last Revision Date: $Date: 2006/01/29 02:09:59 $ """ __author__ = "Mike Orr <iron@mso.oz.net>" __revision__ = "$Revision: 1.6 $"[11:-2] import os from Cheetah.Template import Template class CGITemplate(Template): """Methods useful in CGI scripts. Any class that inherits this mixin must also inherit Cheetah.Servlet. """ def cgiHeaders(self): """Outputs the CGI headers if this is a CGI script. Usage: $cgiHeaders#slurp Override .cgiHeadersHook() if you want to customize the headers. """ if self.isCgi(): return self.cgiHeadersHook() def cgiHeadersHook(self): """Override if you want to customize the CGI headers. """ return "Content-type: text/html\n\n" def isCgi(self): """Is this a CGI script? """ env = 'REQUEST_METHOD' in os.environ wk = self._CHEETAH__isControlledByWebKit return env and not wk # vim: shiftwidth=4 tabstop=4 expandtab
ajibawa-2023/Python-Code-Large/train/row_1471
19
77
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1471:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 37], "level": 0, "parent": null, "vector": [8, 0, 0.2532, 0.4675, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"A subclass of Cheetah.Template for use in CGI scripts.\n\nUsage in a template:\n #extends Cheetah.Tools.CGITemplate\n #implements respond\n $cgiHeaders#slurp\n\nUsage in a template inheriting a Python class:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:Assign_L38_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [38, 38], "level": 0, "parent": null, "vector": [14, 0, 0.4935, 0.013, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__author__ = \"Mike Orr <iron@mso.oz.net>\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:Assign_L39_C0", "label": "__revision__ =", "type": "assigned_variable", "loc": [39, 39], "level": 0, "parent": null, "vector": [14, 0, 0.5065, 0.013, 0, 0.66, 0.4, 809, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__revision__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__revision__ = \"$Revision: 1.6 $\"[11:-2]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:Import_L41_C0", "label": "os import os", "type": "import", "loc": [41, 41], "level": 0, "parent": null, "vector": [1, 0, 0.5325, 0.013, 0, 0.66, 0.6, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:ImportFrom_L42_C0", "label": "from Cheetah.Template import Template", "type": "import", "loc": [42, 42], "level": 0, "parent": null, "vector": [1, 0, 0.5455, 0.013, 0, 0.66, 0.8, 171, 0, 1, 0, 0, 171, 0, 0], "semantic": {"name": "Cheetah.Template", "arg_names": [], "import_names": ["Template"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Template import Template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:ClassDef_L44_C0", "label": "CGITemplate", "type": "class", "loc": [44, 73], "level": 0, "parent": null, "vector": [3, 0, 0.7597, 0.3896, 0, 0.66, 1.0, 937, 0, 3, 0, 0, 137, 0, 2], "semantic": {"name": "CGITemplate", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CGITemplate(Template):\n \"\"\"Methods useful in CGI scripts.\n\n Any class that inherits this mixin must also inherit Cheetah.Servlet.\n \"\"\"\n \n\n def cgiHeaders(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:Expr_L45_C4", "label": "expression", "type": "expression", "loc": [45, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1471:ClassDef_L44_C0", "vector": [8, 1, 0.6039, 0.0519, 1, 0.07, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Methods useful in CGI scripts.\n\n Any class that inherits this mixin must also inherit Cheetah.Servlet.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L51_C4", "label": "cgiHeaders", "type": "function", "loc": [51, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1471:ClassDef_L44_C0", "vector": [2, 1, 0.7078, 0.1039, 1, 0.07, 0.3333, 235, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "cgiHeaders", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def cgiHeaders(self):\n \"\"\"Outputs the CGI headers if this is a CGI script.\n\n Usage: $cgiHeaders#slurp\n Override .cgiHeadersHook() if you want to customize the headers.\n \"\"\"\n if self.isCgi():\n return self.cgiHeadersHook()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:Expr_L52_C8", "label": "expression", "type": "expression", "loc": [52, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L51_C4", "vector": [8, 2, 0.7013, 0.0649, 2, 0.81, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Outputs the CGI headers if this is a CGI script.\n\n Usage: $cgiHeaders#slurp\n Override .cgiHeadersHook() if you want to customize the headers.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:If_L57_C8", "label": "if", "type": "if", "loc": [57, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L51_C4", "vector": [4, 2, 0.7468, 0.026, 2, 0.81, 1.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.isCgi():\n return self.cgiHeadersHook()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:Return_L58_C12", "label": "return", "type": "return", "loc": [58, 58], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1471:If_L57_C8", "vector": [13, 3, 0.7532, 0.013, 3, 0.72, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.cgiHeadersHook()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L62_C4", "label": "cgiHeadersHook", "type": "function", "loc": [62, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1471:ClassDef_L44_C0", "vector": [2, 1, 0.8247, 0.0519, 1, 0.07, 0.6667, 574, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "cgiHeadersHook", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def cgiHeadersHook(self):\n \"\"\"Override if you want to customize the CGI headers.\n \"\"\"\n return \"Content-type: text/html\\n\\n\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:Expr_L63_C8", "label": "expression", "type": "expression", "loc": [63, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L62_C4", "vector": [8, 2, 0.8247, 0.026, 2, 0.61, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Override if you want to customize the CGI headers.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:Return_L65_C8", "label": "return", "type": "return", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L62_C4", "vector": [13, 2, 0.8442, 0.013, 2, 0.61, 1.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return \"Content-type: text/html\\n\\n\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L68_C4", "label": "isCgi", "type": "function", "loc": [68, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1471:ClassDef_L44_C0", "vector": [2, 1, 0.9156, 0.0779, 1, 0.07, 1.0, 884, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "isCgi", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def isCgi(self):\n \"\"\"Is this a CGI script?\n \"\"\"\n env = 'REQUEST_METHOD' in os.environ \n wk = self._CHEETAH__isControlledByWebKit\n return env and not wk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:Expr_L69_C8", "label": "expression", "type": "expression", "loc": [69, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L68_C4", "vector": [8, 2, 0.9026, 0.026, 2, 0.14, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Is this a CGI script?\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:Assign_L71_C8", "label": "env =", "type": "assigned_variable", "loc": [71, 71], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L68_C4", "vector": [14, 2, 0.9221, 0.013, 2, 0.14, 0.3333, 803, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "env", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " env = 'REQUEST_METHOD' in os.environ "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:Assign_L72_C8", "label": "wk =", "type": "assigned_variable", "loc": [72, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L68_C4", "vector": [14, 2, 0.9351, 0.013, 2, 0.14, 0.6667, 286, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "wk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " wk = self._CHEETAH__isControlledByWebKit"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1471:Return_L73_C8", "label": "return", "type": "return", "loc": [73, 73], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L68_C4", "vector": [13, 2, 0.9481, 0.013, 2, 0.14, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return env and not wk"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1471:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1471:Expr_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1471:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1471:Expr_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1471:If_L57_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1471:If_L57_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1471:Return_L58_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1471:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1471:Expr_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1471:Return_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1471:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L68_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1471:Expr_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L68_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1471:Assign_L71_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L68_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1471:Assign_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1471:FunctionDef_L68_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1471:Return_L73_C8"}]
# $Id: SiteHierarchy.py,v 1.1 2001/10/11 03:25:54 tavis_rudd Exp $ """Create menus and crumbs from a site hierarchy. You define the site hierarchy as lists/tuples. Each location in the hierarchy is a (url, description) tuple. Each list has the base URL/text in the 0 position, and all the children coming after it. Any child can be a list, representing further depth to the hierarchy. See the end of the file for an example hierarchy. Use Hierarchy(contents, currentURL), where contents is this hierarchy, and currentURL is the position you are currently in. The menubar and crumbs methods give you the HTML output. There are methods you can override to customize the HTML output. """ ################################################## ## DEPENDENCIES import string try: from cStringIO import StringIO except ImportError: from StringIO import StringIO ################################################## ## CLASSES class Hierarchy: def __init__(self, hierarchy, currentURL, prefix='', menuCSSClass=None, crumbCSSClass=None): """ hierarchy is described above, currentURL should be somewhere in the hierarchy. prefix will be added before all of the URLs (to help mitigate the problems with absolute URLs), and if given, cssClass will be used for both links *and* nonlinks. """ self._contents = hierarchy self._currentURL = currentURL if menuCSSClass: self._menuCSSClass = ' class="%s"' % menuCSSClass else: self._menuCSSClass = '' if crumbCSSClass: self._crumbCSSClass = ' class="%s"' % crumbCSSClass else: self._crumbCSSClass = '' self._prefix=prefix ## Main output methods def menuList(self, menuCSSClass=None): """An indented menu list""" if menuCSSClass: self._menuCSSClass = ' class="%s"' % menuCSSClass stream = StringIO() for item in self._contents[1:]: self._menubarRecurse(item, 0, stream) return stream.getvalue() def crumbs(self, crumbCSSClass=None): """The home>where>you>are crumbs""" if crumbCSSClass: self._crumbCSSClass = ' class="%s"' % crumbCSSClass path = [] pos = self._contents while True: ## This is not the fastest algorithm, I'm afraid. ## But it probably won't be for a huge hierarchy anyway. foundAny = False path.append(pos[0]) for item in pos[1:]: if self._inContents(item): if isinstance(item, tuple): path.append(item) break else: pos = item foundAny = True break if not foundAny: break if len(path) == 1: return self.emptyCrumb() return string.join(map(lambda x, self=self: self.crumbLink(x[0], x[1]), path), self.crumbSeperator()) + \ self.crumbTerminator() ## Methods to control the Aesthetics # - override these methods for your own look def menuLink(self, url, text, indent): if url == self._currentURL or self._prefix + url == self._currentURL: return '%s<B%s>%s</B> <BR>\n' % ('&nbsp;'*2*indent, self._menuCSSClass, text) else: return '%s<A HREF="%s%s"%s>%s</A> <BR>\n' % \ ('&nbsp;'*2*indent, self._prefix, url, self._menuCSSClass, text) def crumbLink(self, url, text): if url == self._currentURL or self._prefix + url == self._currentURL: return '<B%s>%s</B>' % (text, self._crumbCSSClass) else: return '<A HREF="%s%s"%s>%s</A>' % \ (self._prefix, url, self._crumbCSSClass, text) def crumbSeperator(self): return '&nbsp;&gt;&nbsp;' def crumbTerminator(self): return '' def emptyCrumb(self): """When you are at the homepage""" return '' ## internal methods def _menubarRecurse(self, contents, indent, stream): if isinstance(contents, tuple): url, text = contents rest = [] else: url, text = contents[0] rest = contents[1:] stream.write(self.menuLink(url, text, indent)) if self._inContents(contents): for item in rest: self._menubarRecurse(item, indent+1, stream) def _inContents(self, contents): if isinstance(contents, tuple): return self._currentURL == contents[0] for item in contents: if self._inContents(item): return True return False ################################################## ## from the command line if __name__ == '__main__': hierarchy = [('/', 'home'), ('/about', 'About Us'), [('/services', 'Services'), [('/services/products', 'Products'), ('/services/products/widget', 'The Widget'), ('/services/products/wedge', 'The Wedge'), ('/services/products/thimble', 'The Thimble'), ], ('/services/prices', 'Prices'), ], ('/contact', 'Contact Us'), ] for url in ['/', '/services', '/services/products/widget', '/contact']: print('<p>', '='*50) print('<br> %s: <br>\n' % url) n = Hierarchy(hierarchy, url, menuCSSClass='menu', crumbCSSClass='crumb', prefix='/here') print(n.menuList()) print('<p>', '-'*50) print(n.crumbs())
ajibawa-2023/Python-Code-Large/train/row_1472
85
166
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0512, 0.0843, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"Create menus and crumbs from a site hierarchy.\n\nYou define the site hierarchy as lists/tuples. Each location in the hierarchy\nis a (url, description) tuple. Each list has the base URL/text in the 0\nposition, and all the children coming after it. Any child can be a list,\nrepresenting further depth to the hierarchy. See the end of the file for an\nexample hierarchy.\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Import_L19_C0", "label": "string import string", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.1145, 0.006, 0, 0.66, 0.25, 890, 0, 1, 0, 0, 890, 0, 0], "semantic": {"name": "string", "arg_names": [], "import_names": ["string"], "rhs_call_name": "", "annotation": ""}, "snippet": "import string"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Try_L20_C0", "label": "try", "type": "try", "loc": [20, 23], "level": 0, "parent": null, "vector": [7, 0, 0.1295, 0.0241, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n from cStringIO import StringIO\nexcept ImportError:\n from StringIO import StringIO"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:ImportFrom_L21_C4", "label": "from cStringIO import StringIO", "type": "import", "loc": [21, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:Try_L20_C0", "vector": [1, 1, 0.1265, 0.006, 1, 0.32, 0.0, 764, 0, 1, 0, 0, 764, 0, 0], "semantic": {"name": "cStringIO", "arg_names": [], "import_names": ["StringIO"], "rhs_call_name": "", "annotation": ""}, "snippet": " from cStringIO import StringIO"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:ImportFrom_L23_C4", "label": "from StringIO import StringIO", "type": "import", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:Try_L20_C0", "vector": [1, 1, 0.1386, 0.006, 1, 0.32, 0.0, 609, 0, 1, 0, 0, 609, 0, 0], "semantic": {"name": "StringIO", "arg_names": [], "import_names": ["StringIO"], "rhs_call_name": "", "annotation": ""}, "snippet": " from StringIO import StringIO"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "label": "Hierarchy", "type": "class", "loc": [28, 141], "level": 0, "parent": null, "vector": [3, 0, 0.509, 0.6867, 0, 0.66, 0.75, 831, 0, 10, 0, 0, 0, 0, 21], "semantic": {"name": "Hierarchy", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Hierarchy:\n def __init__(self, hierarchy, currentURL, prefix='', menuCSSClass=None,\n crumbCSSClass=None):\n \"\"\"\n hierarchy is described above, currentURL should be somewhere in\n the hierarchy. prefix will be added before all of the URLs (to\n help mitigate the problems with absolute URLs), and if given,\n cssClass will be used for both links *and* nonlinks."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L29_C4", "label": "__init__", "type": "function", "loc": [29, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "vector": [2, 1, 0.2319, 0.1205, 1, 0.2, 0.0, 555, 0, 6, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "hierarchy", "currentURL", "prefix", "menuCSSClass", "crumbCSSClass"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, hierarchy, currentURL, prefix='', menuCSSClass=None,\n crumbCSSClass=None):\n \"\"\"\n hierarchy is described above, currentURL should be somewhere in\n the hierarchy. prefix will be added before all of the URLs (to\n help mitigate the problems with absolute URLs), and if given,\n cssClass will be used for both links *and* nonlinks.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L31_C8", "label": "expression", "type": "expression", "loc": [31, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L29_C4", "vector": [8, 2, 0.2018, 0.0361, 2, 0.48, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n hierarchy is described above, currentURL should be somewhere in\n the hierarchy. prefix will be added before all of the URLs (to\n help mitigate the problems with absolute URLs), and if given,\n cssClass will be used for both links *and* nonlinks.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L38_C8", "label": "self._contents =", "type": "assigned_variable", "loc": [38, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L29_C4", "vector": [14, 2, 0.2289, 0.006, 2, 0.48, 0.2, 117, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._contents", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._contents = hierarchy"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L39_C8", "label": "self._currentURL =", "type": "assigned_variable", "loc": [39, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L29_C4", "vector": [14, 2, 0.2349, 0.006, 2, 0.48, 0.4, 991, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._currentURL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentURL = currentURL"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L40_C8", "label": "if", "type": "if", "loc": [40, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L29_C4", "vector": [4, 2, 0.25, 0.0241, 2, 0.48, 0.6, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if menuCSSClass:\n self._menuCSSClass = ' class=\"%s\"' % menuCSSClass\n else:\n self._menuCSSClass = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L41_C12", "label": "self._menuCSSClass =", "type": "assigned_variable", "loc": [41, 41], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L40_C8", "vector": [14, 3, 0.247, 0.006, 3, 0.1, 0.0, 458, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._menuCSSClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._menuCSSClass = ' class=\"%s\"' % menuCSSClass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L43_C12", "label": "self._menuCSSClass =", "type": "assigned_variable", "loc": [43, 43], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L40_C8", "vector": [14, 3, 0.259, 0.006, 3, 0.1, 1.0, 458, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self._menuCSSClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._menuCSSClass = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L44_C8", "label": "if", "type": "if", "loc": [44, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L29_C4", "vector": [4, 2, 0.2741, 0.0241, 2, 0.48, 0.8, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if crumbCSSClass:\n self._crumbCSSClass = ' class=\"%s\"' % crumbCSSClass\n else:\n self._crumbCSSClass = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L45_C12", "label": "self._crumbCSSClass =", "type": "assigned_variable", "loc": [45, 45], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L44_C8", "vector": [14, 3, 0.2711, 0.006, 3, 0.45, 0.0, 476, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._crumbCSSClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._crumbCSSClass = ' class=\"%s\"' % crumbCSSClass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L47_C12", "label": "self._crumbCSSClass =", "type": "assigned_variable", "loc": [47, 47], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L44_C8", "vector": [14, 3, 0.2831, 0.006, 3, 0.45, 1.0, 476, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self._crumbCSSClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._crumbCSSClass = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L48_C8", "label": "self._prefix =", "type": "assigned_variable", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L29_C4", "vector": [14, 2, 0.2892, 0.006, 2, 0.48, 1.0, 989, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._prefix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._prefix=prefix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L53_C4", "label": "menuList", "type": "function", "loc": [53, 61], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "vector": [2, 1, 0.3434, 0.0542, 1, 0.2, 0.1111, 774, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "menuList", "arg_names": ["self", "menuCSSClass"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def menuList(self, menuCSSClass=None):\n \"\"\"An indented menu list\"\"\"\n if menuCSSClass:\n self._menuCSSClass = ' class=\"%s\"' % menuCSSClass\n \n stream = StringIO()\n for item in self._contents[1:]:\n self._menubarRecurse(item, 0, stream)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L54_C8", "label": "expression", "type": "expression", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L53_C4", "vector": [8, 2, 0.3253, 0.006, 2, 0.32, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"An indented menu list\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L55_C8", "label": "if", "type": "if", "loc": [55, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L53_C4", "vector": [4, 2, 0.3343, 0.012, 2, 0.32, 0.25, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if menuCSSClass:\n self._menuCSSClass = ' class=\"%s\"' % menuCSSClass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L56_C12", "label": "self._menuCSSClass =", "type": "assigned_variable", "loc": [56, 56], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L55_C8", "vector": [14, 3, 0.3373, 0.006, 3, 0.07, 0.0, 458, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._menuCSSClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._menuCSSClass = ' class=\"%s\"' % menuCSSClass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L58_C8", "label": "stream = StringIO()", "type": "assigned_variable", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L53_C4", "vector": [14, 2, 0.3494, 0.006, 2, 0.32, 0.5, 517, 3, 0, 0, 0, 609, 10, 1], "semantic": {"name": "stream", "arg_names": [], "import_names": [], "rhs_call_name": "StringIO", "annotation": ""}, "snippet": " stream = StringIO()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L59_C8", "label": "for item", "type": "for", "loc": [59, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L53_C4", "vector": [6, 2, 0.3584, 0.012, 2, 0.32, 0.75, 434, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for item in self._contents[1:]:\n self._menubarRecurse(item, 0, stream)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L60_C12", "label": "_menubarRecurse()", "type": "expression", "loc": [60, 60], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L59_C8", "vector": [8, 3, 0.3614, 0.006, 3, 0.31, 0.0, 794, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "_menubarRecurse", "arg_names": [], "import_names": [], "rhs_call_name": "_menubarRecurse", "annotation": ""}, "snippet": " self._menubarRecurse(item, 0, stream)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L61_C8", "label": "return", "type": "return", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L53_C4", "vector": [13, 2, 0.3675, 0.006, 2, 0.32, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return stream.getvalue()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L63_C4", "label": "crumbs", "type": "function", "loc": [63, 90], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "vector": [2, 1, 0.4608, 0.1687, 1, 0.2, 0.2222, 347, 0, 2, 1, 0, 0, 0, 11], "semantic": {"name": "crumbs", "arg_names": ["self", "crumbCSSClass"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def crumbs(self, crumbCSSClass=None):\n \"\"\"The home>where>you>are crumbs\"\"\"\n if crumbCSSClass:\n self._crumbCSSClass = ' class=\"%s\"' % crumbCSSClass\n \n path = []\n pos = self._contents\n while True:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L64_C8", "label": "expression", "type": "expression", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L63_C4", "vector": [8, 2, 0.3855, 0.006, 2, 0.23, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"The home>where>you>are crumbs\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L65_C8", "label": "if", "type": "if", "loc": [65, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L63_C4", "vector": [4, 2, 0.3946, 0.012, 2, 0.23, 0.1667, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if crumbCSSClass:\n self._crumbCSSClass = ' class=\"%s\"' % crumbCSSClass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L66_C12", "label": "self._crumbCSSClass =", "type": "assigned_variable", "loc": [66, 66], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L65_C8", "vector": [14, 3, 0.3976, 0.006, 3, 0.08, 0.0, 476, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._crumbCSSClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._crumbCSSClass = ' class=\"%s\"' % crumbCSSClass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L68_C8", "label": "path =", "type": "assigned_variable", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L63_C4", "vector": [14, 2, 0.4096, 0.006, 2, 0.23, 0.3333, 358, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L69_C8", "label": "pos =", "type": "assigned_variable", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L63_C4", "vector": [14, 2, 0.4157, 0.006, 2, 0.23, 0.5, 627, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = self._contents"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:While_L70_C8", "label": "while", "type": "while", "loc": [70, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L63_C4", "vector": [5, 2, 0.4669, 0.0964, 2, 0.23, 0.6667, 0, 1, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while True:\n ## This is not the fastest algorithm, I'm afraid.\n ## But it probably won't be for a huge hierarchy anyway.\n foundAny = False\n path.append(pos[0])\n for item in pos[1:]:\n if self._inContents(item):\n if isinstance(item, tuple):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L73_C12", "label": "foundAny =", "type": "assigned_variable", "loc": [73, 73], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:While_L70_C8", "vector": [14, 3, 0.4398, 0.006, 3, 0.52, 0.0, 734, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "foundAny", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " foundAny = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L74_C12", "label": "append()", "type": "expression", "loc": [74, 74], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:While_L70_C8", "vector": [8, 3, 0.4458, 0.006, 3, 0.52, 0.3333, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " path.append(pos[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L75_C12", "label": "for item", "type": "for", "loc": [75, 83], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:While_L70_C8", "vector": [6, 3, 0.4759, 0.0542, 3, 0.52, 0.6667, 434, 6, 0, 0, 0, 0, 0, 3], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for item in pos[1:]:\n if self._inContents(item):\n if isinstance(item, tuple):\n path.append(item)\n break\n else:\n pos = item\n foundAny = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L76_C16", "label": "if", "type": "if", "loc": [76, 83], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L75_C12", "vector": [4, 4, 0.4789, 0.0482, 4, 0.23, 0.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._inContents(item):\n if isinstance(item, tuple):\n path.append(item)\n break\n else:\n pos = item\n foundAny = True\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L77_C20", "label": "if", "type": "if", "loc": [77, 83], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L76_C16", "vector": [4, 5, 0.4819, 0.0422, 5, 0.49, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(item, tuple):\n path.append(item)\n break\n else:\n pos = item\n foundAny = True\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L78_C24", "label": "append()", "type": "expression", "loc": [78, 78], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L77_C20", "vector": [8, 6, 0.4699, 0.006, 6, 0.67, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " path.append(item)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L81_C24", "label": "pos =", "type": "assigned_variable", "loc": [81, 81], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L77_C20", "vector": [14, 6, 0.488, 0.006, 6, 0.67, 0.5, 627, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = item"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L82_C24", "label": "foundAny =", "type": "assigned_variable", "loc": [82, 82], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L77_C20", "vector": [14, 6, 0.494, 0.006, 6, 0.67, 1.0, 734, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "foundAny", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " foundAny = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L84_C12", "label": "if", "type": "if", "loc": [84, 85], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:While_L70_C8", "vector": [4, 3, 0.509, 0.012, 3, 0.52, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not foundAny:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L86_C8", "label": "if", "type": "if", "loc": [86, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L63_C4", "vector": [4, 2, 0.5211, 0.012, 2, 0.23, 0.8333, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(path) == 1:\n return self.emptyCrumb()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L87_C12", "label": "return", "type": "return", "loc": [87, 87], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L86_C8", "vector": [13, 3, 0.5241, 0.006, 3, 0.5, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.emptyCrumb()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L88_C8", "label": "return", "type": "return", "loc": [88, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L63_C4", "vector": [13, 2, 0.5361, 0.0181, 2, 0.23, 1.0, 0, 4, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return string.join(map(lambda x, self=self: self.crumbLink(x[0], x[1]),\n path), self.crumbSeperator()) + \\\n self.crumbTerminator()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L95_C4", "label": "menuLink", "type": "function", "loc": [95, 102], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "vector": [2, 1, 0.5934, 0.0482, 1, 0.2, 0.3333, 231, 0, 4, 1, 0, 0, 0, 0], "semantic": {"name": "menuLink", "arg_names": ["self", "url", "text", "indent"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def menuLink(self, url, text, indent):\n if url == self._currentURL or self._prefix + url == self._currentURL:\n return '%s<B%s>%s</B> <BR>\\n' % ('&nbsp;'*2*indent,\n self._menuCSSClass, text)\n else:\n return '%s<A HREF=\"%s%s\"%s>%s</A> <BR>\\n' % \\\n ('&nbsp;'*2*indent, self._prefix, url,\n self._menuCSSClass, text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L96_C8", "label": "if", "type": "if", "loc": [96, 102], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L95_C4", "vector": [4, 2, 0.5964, 0.0422, 2, 0.34, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if url == self._currentURL or self._prefix + url == self._currentURL:\n return '%s<B%s>%s</B> <BR>\\n' % ('&nbsp;'*2*indent,\n self._menuCSSClass, text)\n else:\n return '%s<A HREF=\"%s%s\"%s>%s</A> <BR>\\n' % \\\n ('&nbsp;'*2*indent, self._prefix, url,\n self._menuCSSClass, text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L97_C12", "label": "return", "type": "return", "loc": [97, 98], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L96_C8", "vector": [13, 3, 0.5873, 0.012, 3, 0.19, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '%s<B%s>%s</B> <BR>\\n' % ('&nbsp;'*2*indent,\n self._menuCSSClass, text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L100_C12", "label": "return", "type": "return", "loc": [100, 102], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L96_C8", "vector": [13, 3, 0.6084, 0.0181, 3, 0.19, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '%s<A HREF=\"%s%s\"%s>%s</A> <BR>\\n' % \\\n ('&nbsp;'*2*indent, self._prefix, url,\n self._menuCSSClass, text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L104_C4", "label": "crumbLink", "type": "function", "loc": [104, 109], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "vector": [2, 1, 0.6416, 0.0361, 1, 0.2, 0.4444, 891, 0, 3, 1, 0, 0, 0, 0], "semantic": {"name": "crumbLink", "arg_names": ["self", "url", "text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def crumbLink(self, url, text):\n if url == self._currentURL or self._prefix + url == self._currentURL:\n return '<B%s>%s</B>' % (text, self._crumbCSSClass)\n else:\n return '<A HREF=\"%s%s\"%s>%s</A>' % \\\n (self._prefix, url, self._crumbCSSClass, text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L105_C8", "label": "if", "type": "if", "loc": [105, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L104_C4", "vector": [4, 2, 0.6446, 0.0301, 2, 0.25, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if url == self._currentURL or self._prefix + url == self._currentURL:\n return '<B%s>%s</B>' % (text, self._crumbCSSClass)\n else:\n return '<A HREF=\"%s%s\"%s>%s</A>' % \\\n (self._prefix, url, self._crumbCSSClass, text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L106_C12", "label": "return", "type": "return", "loc": [106, 106], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L105_C8", "vector": [13, 3, 0.6386, 0.006, 3, 0.99, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '<B%s>%s</B>' % (text, self._crumbCSSClass)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L108_C12", "label": "return", "type": "return", "loc": [108, 109], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L105_C8", "vector": [13, 3, 0.6536, 0.012, 3, 0.99, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '<A HREF=\"%s%s\"%s>%s</A>' % \\\n (self._prefix, url, self._crumbCSSClass, text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L111_C4", "label": "crumbSeperator", "type": "function", "loc": [111, 112], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "vector": [2, 1, 0.6717, 0.012, 1, 0.2, 0.5556, 357, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "crumbSeperator", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def crumbSeperator(self):\n return '&nbsp;&gt;&nbsp;'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L112_C8", "label": "return", "type": "return", "loc": [112, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L111_C4", "vector": [13, 2, 0.6747, 0.006, 2, 0.0, 0.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '&nbsp;&gt;&nbsp;'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L114_C4", "label": "crumbTerminator", "type": "function", "loc": [114, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "vector": [2, 1, 0.6898, 0.012, 1, 0.2, 0.6667, 575, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "crumbTerminator", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def crumbTerminator(self):\n return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L115_C8", "label": "return", "type": "return", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L114_C4", "vector": [13, 2, 0.6928, 0.006, 2, 0.56, 0.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L117_C4", "label": "emptyCrumb", "type": "function", "loc": [117, 119], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "vector": [2, 1, 0.7108, 0.0181, 1, 0.2, 0.7778, 217, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "emptyCrumb", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def emptyCrumb(self):\n \"\"\"When you are at the homepage\"\"\"\n return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L118_C8", "label": "expression", "type": "expression", "loc": [118, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L117_C4", "vector": [8, 2, 0.7108, 0.006, 2, 0.19, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"When you are at the homepage\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L119_C8", "label": "return", "type": "return", "loc": [119, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L117_C4", "vector": [13, 2, 0.7169, 0.006, 2, 0.19, 1.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L123_C4", "label": "_menubarRecurse", "type": "function", "loc": [123, 133], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "vector": [2, 1, 0.7711, 0.0663, 1, 0.2, 0.8889, 794, 0, 4, 0, 0, 0, 0, 5], "semantic": {"name": "_menubarRecurse", "arg_names": ["self", "contents", "indent", "stream"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _menubarRecurse(self, contents, indent, stream):\n if isinstance(contents, tuple):\n url, text = contents\n rest = []\n else:\n url, text = contents[0]\n rest = contents[1:]\n stream.write(self.menuLink(url, text, indent))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L124_C8", "label": "if", "type": "if", "loc": [124, 129], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L123_C4", "vector": [4, 2, 0.762, 0.0361, 2, 0.79, 0.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(contents, tuple):\n url, text = contents\n rest = []\n else:\n url, text = contents[0]\n rest = contents[1:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L125_C12", "label": "url, text =", "type": "assigned_variable", "loc": [125, 125], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L124_C8", "vector": [14, 3, 0.753, 0.006, 3, 0.83, 0.0, 505, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "url, text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " url, text = contents"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L126_C12", "label": "rest =", "type": "assigned_variable", "loc": [126, 126], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L124_C8", "vector": [14, 3, 0.759, 0.006, 3, 0.83, 0.3333, 788, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "rest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rest = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L128_C12", "label": "url, text =", "type": "assigned_variable", "loc": [128, 128], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L124_C8", "vector": [14, 3, 0.7711, 0.006, 3, 0.83, 0.6667, 505, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "url, text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " url, text = contents[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L129_C12", "label": "rest =", "type": "assigned_variable", "loc": [129, 129], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L124_C8", "vector": [14, 3, 0.7771, 0.006, 3, 0.83, 1.0, 788, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "rest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rest = contents[1:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L130_C8", "label": "write()", "type": "expression", "loc": [130, 130], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L123_C4", "vector": [8, 2, 0.7831, 0.006, 2, 0.79, 0.5, 837, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " stream.write(self.menuLink(url, text, indent))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L131_C8", "label": "if", "type": "if", "loc": [131, 133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L123_C4", "vector": [4, 2, 0.7952, 0.0181, 2, 0.79, 1.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._inContents(contents):\n for item in rest:\n self._menubarRecurse(item, indent+1, stream)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L132_C12", "label": "for item", "type": "for", "loc": [132, 133], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L131_C8", "vector": [6, 3, 0.7982, 0.012, 3, 0.12, 0.0, 434, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for item in rest:\n self._menubarRecurse(item, indent+1, stream)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L133_C16", "label": "_menubarRecurse()", "type": "expression", "loc": [133, 133], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L132_C12", "vector": [8, 4, 0.8012, 0.006, 4, 0.67, 0.0, 794, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "_menubarRecurse", "arg_names": [], "import_names": [], "rhs_call_name": "_menubarRecurse", "annotation": ""}, "snippet": " self._menubarRecurse(item, indent+1, stream)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L135_C4", "label": "_inContents", "type": "function", "loc": [135, 141], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "vector": [2, 1, 0.8313, 0.0422, 1, 0.2, 1.0, 230, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "_inContents", "arg_names": ["self", "contents"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _inContents(self, contents):\n if isinstance(contents, tuple):\n return self._currentURL == contents[0]\n for item in contents:\n if self._inContents(item):\n return True\n return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L136_C8", "label": "if", "type": "if", "loc": [136, 137], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L135_C4", "vector": [4, 2, 0.8223, 0.012, 2, 0.6, 0.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(contents, tuple):\n return self._currentURL == contents[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L137_C12", "label": "return", "type": "return", "loc": [137, 137], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L136_C8", "vector": [13, 3, 0.8253, 0.006, 3, 0.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._currentURL == contents[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L138_C8", "label": "for item", "type": "for", "loc": [138, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L135_C4", "vector": [6, 2, 0.8373, 0.0181, 2, 0.6, 0.5, 434, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for item in contents:\n if self._inContents(item):\n return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L139_C12", "label": "if", "type": "if", "loc": [139, 140], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L138_C8", "vector": [4, 3, 0.8404, 0.012, 3, 0.95, 0.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._inContents(item):\n return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L140_C16", "label": "return", "type": "return", "loc": [140, 140], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L139_C12", "vector": [13, 4, 0.8434, 0.006, 4, 0.76, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L141_C8", "label": "return", "type": "return", "loc": [141, 141], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L135_C4", "vector": [13, 2, 0.8494, 0.006, 2, 0.6, 1.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L145_C0", "label": "if", "type": "if", "loc": [145, 166], "level": 0, "parent": null, "vector": [4, 0, 0.9367, 0.1325, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n hierarchy = [('/', 'home'),\n ('/about', 'About Us'),\n [('/services', 'Services'),\n [('/services/products', 'Products'),\n ('/services/products/widget', 'The Widget'),\n ('/services/products/wedge', 'The Wedge'),\n ('/services/products/thimble', 'The Thimble'),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L146_C4", "label": "hierarchy =", "type": "assigned_variable", "loc": [146, 157], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L145_C0", "vector": [14, 1, 0.9127, 0.0723, 1, 0.14, 0.0, 959, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "hierarchy", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " hierarchy = [('/', 'home'),\n ('/about', 'About Us'),\n [('/services', 'Services'),\n [('/services/products', 'Products'),\n ('/services/products/widget', 'The Widget'),\n ('/services/products/wedge', 'The Wedge'),\n ('/services/products/thimble', 'The Thimble'),\n ],"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L159_C4", "label": "for url", "type": "for", "loc": [159, 166], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L145_C0", "vector": [6, 1, 0.9789, 0.0482, 1, 0.14, 1.0, 789, 0, 0, 0, 0, 0, 0, 8], "semantic": {"name": "url", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for url in ['/', '/services', '/services/products/widget', '/contact']:\n print('<p>', '='*50)\n print('<br> %s: <br>\\n' % url)\n n = Hierarchy(hierarchy, url, menuCSSClass='menu', crumbCSSClass='crumb',\n prefix='/here')\n print(n.menuList())\n print('<p>', '-'*50)\n print(n.crumbs())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L160_C8", "label": "print()", "type": "expression", "loc": [160, 160], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L159_C4", "vector": [8, 2, 0.9639, 0.006, 2, 0.32, 0.0, 535, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('<p>', '='*50)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L161_C8", "label": "print()", "type": "expression", "loc": [161, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L159_C4", "vector": [8, 2, 0.9699, 0.006, 2, 0.32, 0.2, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('<br> %s: <br>\\n' % url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L162_C8", "label": "n = Hierarchy()", "type": "assigned_variable", "loc": [162, 163], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L159_C4", "vector": [14, 2, 0.9789, 0.012, 2, 0.32, 0.4, 773, 3, 5, 0, 0, 831, 10, 1], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "Hierarchy", "annotation": ""}, "snippet": " n = Hierarchy(hierarchy, url, menuCSSClass='menu', crumbCSSClass='crumb',\n prefix='/here')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L164_C8", "label": "print()", "type": "expression", "loc": [164, 164], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L159_C4", "vector": [8, 2, 0.988, 0.006, 2, 0.32, 0.6, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(n.menuList())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L165_C8", "label": "print()", "type": "expression", "loc": [165, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L159_C4", "vector": [8, 2, 0.994, 0.006, 2, 0.32, 0.8, 535, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('<p>', '-'*50)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L166_C8", "label": "print()", "type": "expression", "loc": [166, 166], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L159_C4", "vector": [8, 2, 1.0, 0.006, 2, 0.32, 1.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(n.crumbs())"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1472:Try_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:ImportFrom_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:Try_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:ImportFrom_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L39_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L40_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L41_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L40_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L43_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L44_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L44_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L45_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L44_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L47_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L55_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L56_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L58_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L59_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L60_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L65_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L66_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:While_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:While_L70_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L73_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:While_L70_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L74_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:While_L70_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L75_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L75_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L76_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L76_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L77_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L77_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L78_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L77_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L81_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L77_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L82_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:While_L70_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L84_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L86_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L86_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L87_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L88_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L95_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L96_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L97_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L96_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L100_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L104_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L104_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L105_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L105_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L106_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L105_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L108_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L111_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L111_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L112_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L114_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L114_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L117_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L118_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L119_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L123_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L123_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L124_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L124_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L125_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L124_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L126_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L124_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L128_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L124_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L129_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L123_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L130_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L123_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L131_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L131_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L132_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L132_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L133_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L135_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L136_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L136_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L137_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L138_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L138_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L139_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L139_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L140_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:FunctionDef_L135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Return_L141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L145_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L146_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:If_L145_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L159_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L160_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L161_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Assign_L162_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L164_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1472:For_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1472:Expr_L166_C8"}]
#
ajibawa-2023/Python-Code-Large/train/row_1473
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
from turbocheetah import cheetahsupport TurboCheetah = cheetahsupport.TurboCheetah __all__ = ["TurboCheetah"]
ajibawa-2023/Python-Code-Large/train/row_1474
3
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1474:ImportFrom_L1_C0", "label": "from turbocheetah import cheetahsupport", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 172, 0, 1, 0, 0, 172, 0, 0], "semantic": {"name": "turbocheetah", "arg_names": [], "import_names": ["cheetahsupport"], "rhs_call_name": "", "annotation": ""}, "snippet": "from turbocheetah import cheetahsupport"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1474:Assign_L3_C0", "label": "TurboCheetah =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.6, 0.2, 0, 0.66, 0.5, 316, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "TurboCheetah", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TurboCheetah = cheetahsupport.TurboCheetah"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1474:Assign_L5_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.2, 0, 0.66, 1.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__all__ = [\"TurboCheetah\"]"}]
[]
"Template support for Cheetah" import sys, os, imp from Cheetah import Compiler import pkg_resources def _recompile_template(package, basename, tfile, classname): tmpl = pkg_resources.resource_string(package, "%s.tmpl" % basename) c = Compiler.Compiler(source=tmpl, mainClassName='GenTemplate') code = str(c) mod = imp.new_module(classname) ns = dict() exec(code, ns) tempclass = ns.get("GenTemplate", ns.get('DynamicallyCompiledCheetahTemplate')) assert tempclass tempclass.__name__ = basename setattr(mod, basename, tempclass) sys.modules[classname] = mod return mod class TurboCheetah: extension = "tmpl" def __init__(self, extra_vars_func=None, options=None): if options is None: options = dict() self.get_extra_vars = extra_vars_func self.options = options self.compiledTemplates = {} self.search_path = [] def load_template(self, template=None, template_string=None, template_file=None, loadingSite=False): """Searches for a template along the Python path. Template files must end in ".tmpl" and be in legitimate packages. """ given = len([_f for _f in (template, template_string, template_file) if _f]) if given > 1: raise TypeError( "You may give only one of template, template_string, and " "template_file") if not given: raise TypeError( "You must give one of template, template_string, or " "template_file") if template: return self.load_template_module(template) elif template_string: return self.load_template_string(template_string) elif template_file: return self.load_template_file(template_file) def load_template_module(self, classname): ct = self.compiledTemplates divider = classname.rfind(".") if divider > -1: package = classname[0:divider] basename = classname[divider+1:] else: raise ValueError("All templates must be in a package") if not self.options.get("cheetah.precompiled", False): tfile = pkg_resources.resource_filename(package, "%s.%s" % (basename, self.extension)) if classname in ct: mtime = os.stat(tfile).st_mtime if ct[classname] != mtime: ct[classname] = mtime del sys.modules[classname] mod = _recompile_template(package, basename, tfile, classname) else: mod = __import__(classname, dict(), dict(), [basename]) else: ct[classname] = os.stat(tfile).st_mtime mod = _recompile_template(package, basename, tfile, classname) else: mod = __import__(classname, dict(), dict(), [basename]) tempclass = getattr(mod, basename) return tempclass def load_template_string(self, content): raise NotImplementedError def load_template_file(self, filename): raise NotImplementedError def render(self, info, format="html", fragment=False, template=None, template_string=None, template_file=None): tclass = self.load_template( template=template, template_string=template_string, template_file=template_file) if self.get_extra_vars: extra = self.get_extra_vars() else: extra = {} tempobj = tclass(searchList=[info, extra]) if fragment: return tempobj.fragment() else: return tempobj.respond()
ajibawa-2023/Python-Code-Large/train/row_1475
66
110
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0091, 0.0091, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"Template support for Cheetah\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Import_L3_C0", "label": "sys import sys, os, imp", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0273, 0.0091, 0, 0.66, 0.2, 509, 0, 3, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "os", "imp"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys, os, imp"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:ImportFrom_L5_C0", "label": "from Cheetah import Compiler", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0455, 0.0091, 0, 0.66, 0.4, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "Cheetah", "arg_names": [], "import_names": ["Compiler"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah import Compiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Import_L6_C0", "label": "pkg_resources import pkg_resources", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0545, 0.0091, 0, 0.66, 0.6, 947, 0, 1, 0, 0, 947, 0, 0], "semantic": {"name": "pkg_resources", "arg_names": [], "import_names": ["pkg_resources"], "rhs_call_name": "", "annotation": ""}, "snippet": "import pkg_resources"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "label": "_recompile_template", "type": "function", "loc": [8, 21], "level": 0, "parent": null, "vector": [2, 0, 0.1318, 0.1273, 0, 0.66, 0.8, 752, 0, 4, 1, 0, 0, 0, 9], "semantic": {"name": "_recompile_template", "arg_names": ["package", "basename", "tfile", "classname"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def _recompile_template(package, basename, tfile, classname):\n tmpl = pkg_resources.resource_string(package, \"%s.tmpl\" % basename)\n c = Compiler.Compiler(source=tmpl, mainClassName='GenTemplate')\n code = str(c)\n mod = imp.new_module(classname)\n ns = dict()\n exec(code, ns)\n tempclass = ns.get(\"GenTemplate\","}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L9_C4", "label": "tmpl = resource_string()", "type": "assigned_variable", "loc": [9, 9], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "vector": [14, 1, 0.0818, 0.0091, 1, 0.32, 0.0, 407, 3, 2, 0, 0, 814, 10, 1], "semantic": {"name": "tmpl", "arg_names": [], "import_names": [], "rhs_call_name": "resource_string", "annotation": ""}, "snippet": " tmpl = pkg_resources.resource_string(package, \"%s.tmpl\" % basename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L10_C4", "label": "c = Compiler()", "type": "assigned_variable", "loc": [10, 10], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "vector": [14, 1, 0.0909, 0.0091, 1, 0.32, 0.1, 411, 3, 2, 0, 0, 478, 10, 1], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "Compiler", "annotation": ""}, "snippet": " c = Compiler.Compiler(source=tmpl, mainClassName='GenTemplate')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L11_C4", "label": "code = str()", "type": "assigned_variable", "loc": [11, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "vector": [14, 1, 0.1, 0.0091, 1, 0.32, 0.2, 44, 3, 1, 0, 0, 52, 10, 1], "semantic": {"name": "code", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " code = str(c)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L12_C4", "label": "mod = new_module()", "type": "assigned_variable", "loc": [12, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "vector": [14, 1, 0.1091, 0.0091, 1, 0.32, 0.3, 25, 3, 1, 0, 0, 649, 10, 1], "semantic": {"name": "mod", "arg_names": [], "import_names": [], "rhs_call_name": "new_module", "annotation": ""}, "snippet": " mod = imp.new_module(classname)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L13_C4", "label": "ns = dict()", "type": "assigned_variable", "loc": [13, 13], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "vector": [14, 1, 0.1182, 0.0091, 1, 0.32, 0.4, 638, 3, 0, 0, 0, 827, 10, 1], "semantic": {"name": "ns", "arg_names": [], "import_names": [], "rhs_call_name": "dict", "annotation": ""}, "snippet": " ns = dict()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Expr_L14_C4", "label": "exec()", "type": "expression", "loc": [14, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "vector": [8, 1, 0.1273, 0.0091, 1, 0.32, 0.5, 272, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "exec", "arg_names": [], "import_names": [], "rhs_call_name": "exec", "annotation": ""}, "snippet": " exec(code, ns)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L15_C4", "label": "tempclass = get()", "type": "assigned_variable", "loc": [15, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "vector": [14, 1, 0.1409, 0.0182, 1, 0.32, 0.6, 949, 3, 2, 0, 0, 607, 10, 2], "semantic": {"name": "tempclass", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " tempclass = ns.get(\"GenTemplate\",\n ns.get('DynamicallyCompiledCheetahTemplate'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L18_C4", "label": "tempclass.__name__ =", "type": "assigned_variable", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "vector": [14, 1, 0.1636, 0.0091, 1, 0.32, 0.7, 618, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "tempclass.__name__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " tempclass.__name__ = basename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Expr_L19_C4", "label": "setattr()", "type": "expression", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "vector": [8, 1, 0.1727, 0.0091, 1, 0.32, 0.8, 501, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setattr", "arg_names": [], "import_names": [], "rhs_call_name": "setattr", "annotation": ""}, "snippet": " setattr(mod, basename, tempclass)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L20_C4", "label": "assign", "type": "assigned_variable", "loc": [20, 20], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "vector": [14, 1, 0.1818, 0.0091, 1, 0.32, 0.9, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sys.modules[classname] = mod"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Return_L21_C4", "label": "return", "type": "return", "loc": [21, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "vector": [13, 1, 0.1909, 0.0091, 1, 0.32, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return mod"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:ClassDef_L23_C0", "label": "TurboCheetah", "type": "class", "loc": [23, 110], "level": 0, "parent": null, "vector": [3, 0, 0.6045, 0.8, 0, 0.66, 1.0, 316, 0, 6, 0, 0, 0, 0, 27], "semantic": {"name": "TurboCheetah", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TurboCheetah:\n extension = \"tmpl\"\n \n def __init__(self, extra_vars_func=None, options=None):\n if options is None:\n options = dict()\n self.get_extra_vars = extra_vars_func\n self.options = options"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L24_C4", "label": "extension =", "type": "assigned_variable", "loc": [24, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:ClassDef_L23_C0", "vector": [14, 1, 0.2182, 0.0091, 1, 0.65, 0.0, 14, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "extension", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " extension = \"tmpl\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L26_C4", "label": "__init__", "type": "function", "loc": [26, 32], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:ClassDef_L23_C0", "vector": [2, 1, 0.2636, 0.0636, 1, 0.65, 0.1667, 555, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "extra_vars_func", "options"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, extra_vars_func=None, options=None):\n if options is None:\n options = dict()\n self.get_extra_vars = extra_vars_func\n self.options = options\n self.compiledTemplates = {}\n self.search_path = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L27_C8", "label": "if", "type": "if", "loc": [27, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L26_C4", "vector": [4, 2, 0.25, 0.0182, 2, 0.64, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if options is None:\n options = dict()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L28_C12", "label": "options = dict()", "type": "assigned_variable", "loc": [28, 28], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L27_C8", "vector": [14, 3, 0.2545, 0.0091, 3, 0.36, 0.0, 707, 3, 0, 0, 0, 827, 10, 1], "semantic": {"name": "options", "arg_names": [], "import_names": [], "rhs_call_name": "dict", "annotation": ""}, "snippet": " options = dict()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L29_C8", "label": "self.get_extra_vars =", "type": "assigned_variable", "loc": [29, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L26_C4", "vector": [14, 2, 0.2636, 0.0091, 2, 0.64, 0.25, 549, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.get_extra_vars", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.get_extra_vars = extra_vars_func"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L30_C8", "label": "self.options =", "type": "assigned_variable", "loc": [30, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L26_C4", "vector": [14, 2, 0.2727, 0.0091, 2, 0.64, 0.5, 968, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.options", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.options = options"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L31_C8", "label": "self.compiledTemplates =", "type": "assigned_variable", "loc": [31, 31], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L26_C4", "vector": [14, 2, 0.2818, 0.0091, 2, 0.64, 0.75, 759, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self.compiledTemplates", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.compiledTemplates = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L32_C8", "label": "self.search_path =", "type": "assigned_variable", "loc": [32, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L26_C4", "vector": [14, 2, 0.2909, 0.0091, 2, 0.64, 1.0, 430, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.search_path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.search_path = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L34_C4", "label": "load_template", "type": "function", "loc": [34, 55], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:ClassDef_L23_C0", "vector": [2, 1, 0.4045, 0.2, 1, 0.65, 0.3333, 24, 0, 5, 1, 0, 0, 0, 6], "semantic": {"name": "load_template", "arg_names": ["self", "template", "template_string", "template_file", "loadingSite"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def load_template(self, template=None,\n template_string=None, template_file=None,\n loadingSite=False):\n \"\"\"Searches for a template along the Python path.\n\n Template files must end in \".tmpl\" and be in legitimate packages.\n \"\"\"\n given = len([_f for _f in (template, template_string, template_file) if _f])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Expr_L37_C8", "label": "expression", "type": "expression", "loc": [37, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L34_C4", "vector": [8, 2, 0.35, 0.0364, 2, 0.21, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Searches for a template along the Python path.\n\n Template files must end in \".tmpl\" and be in legitimate packages.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L41_C8", "label": "given = len()", "type": "assigned_variable", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L34_C4", "vector": [14, 2, 0.3727, 0.0091, 2, 0.21, 0.25, 398, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "given", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " given = len([_f for _f in (template, template_string, template_file) if _f])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L42_C8", "label": "if", "type": "if", "loc": [42, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L34_C4", "vector": [4, 2, 0.3955, 0.0364, 2, 0.21, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if given > 1:\n raise TypeError(\n \"You may give only one of template, template_string, and \"\n \"template_file\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L46_C8", "label": "if", "type": "if", "loc": [46, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L34_C4", "vector": [4, 2, 0.4318, 0.0364, 2, 0.21, 0.75, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not given:\n raise TypeError(\n \"You must give one of template, template_string, or \"\n \"template_file\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L50_C8", "label": "if", "type": "if", "loc": [50, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L34_C4", "vector": [4, 2, 0.4773, 0.0545, 2, 0.21, 1.0, 0, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if template:\n return self.load_template_module(template)\n elif template_string:\n return self.load_template_string(template_string)\n elif template_file:\n return self.load_template_file(template_file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Return_L51_C12", "label": "return", "type": "return", "loc": [51, 51], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L50_C8", "vector": [13, 3, 0.4636, 0.0091, 3, 0.39, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.load_template_module(template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L52_C8", "label": "if", "type": "if", "loc": [52, 55], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L50_C8", "vector": [4, 3, 0.4864, 0.0364, 3, 0.39, 1.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif template_string:\n return self.load_template_string(template_string)\n elif template_file:\n return self.load_template_file(template_file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Return_L53_C12", "label": "return", "type": "return", "loc": [53, 53], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L52_C8", "vector": [13, 4, 0.4818, 0.0091, 4, 0.96, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.load_template_string(template_string)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L54_C8", "label": "if", "type": "if", "loc": [54, 55], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L52_C8", "vector": [4, 4, 0.4955, 0.0182, 4, 0.96, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif template_file:\n return self.load_template_file(template_file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Return_L55_C12", "label": "return", "type": "return", "loc": [55, 55], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L54_C8", "vector": [13, 5, 0.5, 0.0091, 5, 0.33, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.load_template_file(template_file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L57_C4", "label": "load_template_module", "type": "function", "loc": [57, 89], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:ClassDef_L23_C0", "vector": [2, 1, 0.6636, 0.3, 1, 0.65, 0.5, 576, 0, 2, 1, 0, 0, 0, 15], "semantic": {"name": "load_template_module", "arg_names": ["self", "classname"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def load_template_module(self, classname):\n\n ct = self.compiledTemplates\n\n divider = classname.rfind(\".\")\n if divider > -1:\n package = classname[0:divider]\n basename = classname[divider+1:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L59_C8", "label": "ct =", "type": "assigned_variable", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L57_C4", "vector": [14, 2, 0.5364, 0.0091, 2, 0.16, 0.0, 147, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "ct", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ct = self.compiledTemplates"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L61_C8", "label": "divider = rfind()", "type": "assigned_variable", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L57_C4", "vector": [14, 2, 0.5545, 0.0091, 2, 0.16, 0.2, 275, 3, 1, 0, 0, 634, 10, 1], "semantic": {"name": "divider", "arg_names": [], "import_names": [], "rhs_call_name": "rfind", "annotation": ""}, "snippet": " divider = classname.rfind(\".\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L62_C8", "label": "if", "type": "if", "loc": [62, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L57_C4", "vector": [4, 2, 0.5818, 0.0455, 2, 0.16, 0.4, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if divider > -1:\n package = classname[0:divider]\n basename = classname[divider+1:]\n else:\n raise ValueError(\"All templates must be in a package\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L63_C12", "label": "package =", "type": "assigned_variable", "loc": [63, 63], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L62_C8", "vector": [14, 3, 0.5727, 0.0091, 3, 0.52, 0.0, 187, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "package", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " package = classname[0:divider]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L64_C12", "label": "basename =", "type": "assigned_variable", "loc": [64, 64], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L62_C8", "vector": [14, 3, 0.5818, 0.0091, 3, 0.52, 1.0, 164, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "basename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " basename = classname[divider+1:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L68_C8", "label": "if", "type": "if", "loc": [68, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L57_C4", "vector": [4, 2, 0.7045, 0.1818, 2, 0.16, 0.6, 0, 0, 0, 0, 0, 0, 0, 12], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.options.get(\"cheetah.precompiled\", False):\n tfile = pkg_resources.resource_filename(package, \n \"%s.%s\" % \n (basename,\n self.extension))\n if classname in ct:\n mtime = os.stat(tfile).st_mtime\n if ct[classname] != mtime:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L69_C12", "label": "tfile = resource_filename()", "type": "assigned_variable", "loc": [69, 72], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L68_C8", "vector": [14, 3, 0.6409, 0.0364, 3, 0.18, 0.0, 647, 3, 2, 0, 0, 208, 10, 1], "semantic": {"name": "tfile", "arg_names": [], "import_names": [], "rhs_call_name": "resource_filename", "annotation": ""}, "snippet": " tfile = pkg_resources.resource_filename(package, \n \"%s.%s\" % \n (basename,\n self.extension))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L73_C12", "label": "if", "type": "if", "loc": [73, 85], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L68_C8", "vector": [4, 3, 0.7182, 0.1182, 3, 0.18, 0.5, 0, 0, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if classname in ct:\n mtime = os.stat(tfile).st_mtime\n if ct[classname] != mtime:\n ct[classname] = mtime\n del sys.modules[classname]\n mod = _recompile_template(package, basename, \n tfile, classname)\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L74_C16", "label": "mtime =", "type": "assigned_variable", "loc": [74, 74], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L73_C12", "vector": [14, 4, 0.6727, 0.0091, 4, 0.88, 0.0, 900, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "mtime", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " mtime = os.stat(tfile).st_mtime"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L75_C16", "label": "if", "type": "if", "loc": [75, 81], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L73_C12", "vector": [4, 4, 0.7091, 0.0636, 4, 0.88, 0.3333, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if ct[classname] != mtime:\n ct[classname] = mtime\n del sys.modules[classname]\n mod = _recompile_template(package, basename, \n tfile, classname)\n else:\n mod = __import__(classname, dict(), dict(), [basename])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L76_C20", "label": "assign", "type": "assigned_variable", "loc": [76, 76], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L75_C16", "vector": [14, 5, 0.6909, 0.0091, 5, 0.0, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ct[classname] = mtime"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L78_C20", "label": "mod = _recompile_template()", "type": "assigned_variable", "loc": [78, 79], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L75_C16", "vector": [14, 5, 0.7136, 0.0182, 5, 0.0, 0.5, 25, 3, 4, 0, 0, 752, 10, 1], "semantic": {"name": "mod", "arg_names": [], "import_names": [], "rhs_call_name": "_recompile_template", "annotation": ""}, "snippet": " mod = _recompile_template(package, basename, \n tfile, classname)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L81_C20", "label": "mod = __import__()", "type": "assigned_variable", "loc": [81, 81], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L75_C16", "vector": [14, 5, 0.7364, 0.0091, 5, 0.0, 1.0, 25, 3, 4, 0, 0, 744, 10, 3], "semantic": {"name": "mod", "arg_names": [], "import_names": [], "rhs_call_name": "__import__", "annotation": ""}, "snippet": " mod = __import__(classname, dict(), dict(), [basename])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L83_C16", "label": "assign", "type": "assigned_variable", "loc": [83, 83], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L73_C12", "vector": [14, 4, 0.7545, 0.0091, 4, 0.88, 0.6667, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ct[classname] = os.stat(tfile).st_mtime"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L84_C16", "label": "mod = _recompile_template()", "type": "assigned_variable", "loc": [84, 85], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L73_C12", "vector": [14, 4, 0.7682, 0.0182, 4, 0.88, 1.0, 25, 3, 4, 0, 0, 752, 10, 1], "semantic": {"name": "mod", "arg_names": [], "import_names": [], "rhs_call_name": "_recompile_template", "annotation": ""}, "snippet": " mod = _recompile_template(package, basename, \n tfile, classname)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L87_C12", "label": "mod = __import__()", "type": "assigned_variable", "loc": [87, 87], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L68_C8", "vector": [14, 3, 0.7909, 0.0091, 3, 0.18, 1.0, 25, 3, 4, 0, 0, 744, 10, 3], "semantic": {"name": "mod", "arg_names": [], "import_names": [], "rhs_call_name": "__import__", "annotation": ""}, "snippet": " mod = __import__(classname, dict(), dict(), [basename])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L88_C8", "label": "tempclass = getattr()", "type": "assigned_variable", "loc": [88, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L57_C4", "vector": [14, 2, 0.8, 0.0091, 2, 0.16, 0.8, 949, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "tempclass", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " tempclass = getattr(mod, basename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Return_L89_C8", "label": "return", "type": "return", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L57_C4", "vector": [13, 2, 0.8091, 0.0091, 2, 0.16, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return tempclass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L91_C4", "label": "load_template_string", "type": "function", "loc": [91, 92], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:ClassDef_L23_C0", "vector": [2, 1, 0.8318, 0.0182, 1, 0.65, 0.6667, 826, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "load_template_string", "arg_names": ["self", "content"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def load_template_string(self, content):\n raise NotImplementedError"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L94_C4", "label": "load_template_file", "type": "function", "loc": [94, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:ClassDef_L23_C0", "vector": [2, 1, 0.8591, 0.0182, 1, 0.65, 0.8333, 361, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "load_template_file", "arg_names": ["self", "filename"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def load_template_file(self, filename):\n raise NotImplementedError"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L97_C4", "label": "render", "type": "function", "loc": [97, 110], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:ClassDef_L23_C0", "vector": [2, 1, 0.9409, 0.1273, 1, 0.65, 1.0, 24, 0, 7, 1, 0, 0, 0, 5], "semantic": {"name": "render", "arg_names": ["self", "info", "format", "fragment", "template", "template_string", "template_file"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def render(self, info, format=\"html\", fragment=False, template=None,\n template_string=None, template_file=None):\n tclass = self.load_template(\n template=template, template_string=template_string,\n template_file=template_file)\n if self.get_extra_vars:\n extra = self.get_extra_vars()\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L99_C8", "label": "tclass = load_template()", "type": "assigned_variable", "loc": [99, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L97_C4", "vector": [14, 2, 0.9091, 0.0273, 2, 0.05, 0.0, 293, 3, 3, 0, 0, 24, 10, 1], "semantic": {"name": "tclass", "arg_names": [], "import_names": [], "rhs_call_name": "load_template", "annotation": ""}, "snippet": " tclass = self.load_template(\n template=template, template_string=template_string,\n template_file=template_file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L102_C8", "label": "if", "type": "if", "loc": [102, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L97_C4", "vector": [4, 2, 0.9409, 0.0364, 2, 0.05, 0.3333, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.get_extra_vars:\n extra = self.get_extra_vars()\n else:\n extra = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L103_C12", "label": "extra = get_extra_vars()", "type": "assigned_variable", "loc": [103, 103], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L102_C8", "vector": [14, 3, 0.9364, 0.0091, 3, 0.83, 0.0, 980, 3, 0, 0, 0, 878, 10, 1], "semantic": {"name": "extra", "arg_names": [], "import_names": [], "rhs_call_name": "get_extra_vars", "annotation": ""}, "snippet": " extra = self.get_extra_vars()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L105_C12", "label": "extra =", "type": "assigned_variable", "loc": [105, 105], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L102_C8", "vector": [14, 3, 0.9545, 0.0091, 3, 0.83, 1.0, 980, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "extra", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " extra = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L106_C8", "label": "tempobj = tclass()", "type": "assigned_variable", "loc": [106, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L97_C4", "vector": [14, 2, 0.9636, 0.0091, 2, 0.05, 0.6667, 406, 3, 1, 0, 0, 293, 10, 1], "semantic": {"name": "tempobj", "arg_names": [], "import_names": [], "rhs_call_name": "tclass", "annotation": ""}, "snippet": " tempobj = tclass(searchList=[info, extra])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L107_C8", "label": "if", "type": "if", "loc": [107, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L97_C4", "vector": [4, 2, 0.9864, 0.0364, 2, 0.05, 1.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if fragment:\n return tempobj.fragment()\n else:\n return tempobj.respond()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Return_L108_C12", "label": "return", "type": "return", "loc": [108, 108], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L107_C8", "vector": [13, 3, 0.9818, 0.0091, 3, 0.98, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return tempobj.fragment()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1475:Return_L110_C12", "label": "return", "type": "return", "loc": [110, 110], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L107_C8", "vector": [13, 3, 1.0, 0.0091, 3, 0.98, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return tempobj.respond()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Return_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L27_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L28_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L29_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L30_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L34_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Expr_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L34_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L34_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L42_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L34_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L34_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L50_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Return_L51_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L50_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L52_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Return_L53_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L52_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L54_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Return_L55_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L62_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L63_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L62_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L64_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L68_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L69_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L68_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L73_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L73_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L74_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L73_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L75_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L75_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L76_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L75_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L78_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L75_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L81_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L73_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L83_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L73_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L84_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L68_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L87_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L88_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Return_L89_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L91_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L94_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L97_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L97_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L102_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L102_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L103_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L102_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L105_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L97_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Assign_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:FunctionDef_L97_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L107_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Return_L108_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1475:If_L107_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1475:Return_L110_C12"}]
import Cheetah.Template def render(template_file, **kwargs): ''' Cheetah.Django.render() takes the template filename (the filename should be a file in your Django TEMPLATE_DIRS) Any additional keyword arguments are passed into the template are propogated into the template's searchList ''' import django.http import django.template.loader source, loader = django.template.loader.find_template_source(template_file) t = Cheetah.Template.Template(source, searchList=[kwargs]) return django.http.HttpResponse(t.__str__())
ajibawa-2023/Python-Code-Large/train/row_1477
8
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1477:Import_L1_C0", "label": "Cheetah.Template import Cheetah.Template", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 171, 0, 1, 0, 0, 171, 0, 0], "semantic": {"name": "Cheetah.Template", "arg_names": [], "import_names": ["Cheetah.Template"], "rhs_call_name": "", "annotation": ""}, "snippet": "import Cheetah.Template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1477:FunctionDef_L3_C0", "label": "render", "type": "function", "loc": [3, 16], "level": 0, "parent": null, "vector": [2, 0, 0.5938, 0.875, 0, 0.66, 1.0, 24, 0, 2, 1, 0, 0, 0, 4], "semantic": {"name": "render", "arg_names": ["template_file", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def render(template_file, **kwargs):\n '''\n Cheetah.Django.render() takes the template filename \n (the filename should be a file in your Django \n TEMPLATE_DIRS)\n\n Any additional keyword arguments are passed into the \n template are propogated into the template's searchList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1477:Expr_L4_C4", "label": "expression", "type": "expression", "loc": [4, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1477:FunctionDef_L3_C0", "vector": [8, 1, 0.4688, 0.5, 1, 0.44, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Cheetah.Django.render() takes the template filename \n (the filename should be a file in your Django \n TEMPLATE_DIRS)\n\n Any additional keyword arguments are passed into the \n template are propogated into the template's searchList\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1477:Import_L12_C4", "label": "django.http import django.http", "type": "import", "loc": [12, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1477:FunctionDef_L3_C0", "vector": [1, 1, 0.75, 0.0625, 1, 0.44, 0.2, 779, 0, 1, 0, 0, 779, 0, 0], "semantic": {"name": "django.http", "arg_names": [], "import_names": ["django.http"], "rhs_call_name": "", "annotation": ""}, "snippet": " import django.http"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1477:Import_L13_C4", "label": "django.template.loader import django.template.loader", "type": "import", "loc": [13, 13], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1477:FunctionDef_L3_C0", "vector": [1, 1, 0.8125, 0.0625, 1, 0.44, 0.4, 970, 0, 1, 0, 0, 970, 0, 0], "semantic": {"name": "django.template.loader", "arg_names": [], "import_names": ["django.template.loader"], "rhs_call_name": "", "annotation": ""}, "snippet": " import django.template.loader"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1477:Assign_L14_C4", "label": "source, loader = find_template_source()", "type": "assigned_variable", "loc": [14, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1477:FunctionDef_L3_C0", "vector": [14, 1, 0.875, 0.0625, 1, 0.44, 0.6, 733, 3, 1, 0, 0, 59, 10, 1], "semantic": {"name": "source, loader", "arg_names": [], "import_names": [], "rhs_call_name": "find_template_source", "annotation": ""}, "snippet": " source, loader = django.template.loader.find_template_source(template_file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1477:Assign_L15_C4", "label": "t = Template()", "type": "assigned_variable", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1477:FunctionDef_L3_C0", "vector": [14, 1, 0.9375, 0.0625, 1, 0.44, 0.8, 15, 3, 2, 0, 0, 137, 10, 1], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "Template", "annotation": ""}, "snippet": " t = Cheetah.Template.Template(source, searchList=[kwargs])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1477:Return_L16_C4", "label": "return", "type": "return", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1477:FunctionDef_L3_C0", "vector": [13, 1, 1.0, 0.0625, 1, 0.44, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return django.http.HttpResponse(t.__str__())"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1477:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1477:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1477:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1477:Import_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1477:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1477:Import_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1477:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1477:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1477:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1477:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1477:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1477:Return_L16_C4"}]
''' Provides several CacheStore backends for Cheetah's caching framework. The methods provided by these classes have the same semantics as those in the python-memcached API, except for their return values: set(key, val, time=0) set the value unconditionally add(key, val, time=0) set only if the server doesn't already have this key replace(key, val, time=0) set only if the server already have this key get(key, val) returns val or raises a KeyError delete(key) deletes or raises a KeyError ''' import time from Cheetah.Utils.memcache import Client as MemcachedClient class Error(Exception): pass class AbstractCacheStore(object): def set(self, key, val, time=None): raise NotImplementedError def add(self, key, val, time=None): raise NotImplementedError def replace(self, key, val, time=None): raise NotImplementedError def delete(self, key): raise NotImplementedError def get(self, key): raise NotImplementedError class MemoryCacheStore(AbstractCacheStore): def __init__(self): self._data = {} def set(self, key, val, time=0): self._data[key] = (val, time) def add(self, key, val, time=0): if key in self._data: raise Error('a value for key %r is already in the cache'%key) self._data[key] = (val, time) def replace(self, key, val, time=0): if key in self._data: raise Error('a value for key %r is already in the cache'%key) self._data[key] = (val, time) def delete(self, key): del self._data[key] def get(self, key): (val, exptime) = self._data[key] if exptime and time.time() > exptime: del self._data[key] raise KeyError(key) else: return val def clear(self): self._data.clear() class MemcachedCacheStore(AbstractCacheStore): servers = ('127.0.0.1:11211') def __init__(self, servers=None, debug=False): if servers is None: servers = self.servers self._client = MemcachedClient(servers, debug) def set(self, key, val, time=0): self._client.set(key, val, time) def add(self, key, val, time=0): res = self._client.add(key, val, time) if not res: raise Error('a value for key %r is already in the cache'%key) self._data[key] = (val, time) def replace(self, key, val, time=0): res = self._client.replace(key, val, time) if not res: raise Error('a value for key %r is already in the cache'%key) self._data[key] = (val, time) def delete(self, key): res = self._client.delete(key, time=0) if not res: raise KeyError(key) def get(self, key): val = self._client.get(key) if val is None: raise KeyError(key) else: return val def clear(self): self._client.flush_all()
ajibawa-2023/Python-Code-Large/train/row_1479
53
108
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 16], "level": 0, "parent": null, "vector": [8, 0, 0.0787, 0.1481, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nProvides several CacheStore backends for Cheetah's caching framework. The\nmethods provided by these classes have the same semantics as those in the\npython-memcached API, except for their return values:\n\nset(key, val, time=0)\n set the value unconditionally\nadd(key, val, time=0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Import_L17_C0", "label": "time import time", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.1574, 0.0093, 0, 0.66, 0.1667, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:ImportFrom_L19_C0", "label": "from Cheetah.Utils.memcache import MemcachedClient", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.1759, 0.0093, 0, 0.66, 0.3333, 402, 0, 1, 0, 0, 402, 0, 0], "semantic": {"name": "Cheetah.Utils.memcache", "arg_names": [], "import_names": ["MemcachedClient"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Utils.memcache import Client as MemcachedClient"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L21_C0", "label": "Error", "type": "class", "loc": [21, 22], "level": 0, "parent": null, "vector": [3, 0, 0.1991, 0.0185, 0, 0.66, 0.5, 529, 0, 0, 0, 0, 645, 0, 0], "semantic": {"name": "Error", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Error(Exception):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L24_C0", "label": "AbstractCacheStore", "type": "class", "loc": [24, 39], "level": 0, "parent": null, "vector": [3, 0, 0.2917, 0.1481, 0, 0.66, 0.6667, 70, 0, 5, 0, 0, 186, 0, 0], "semantic": {"name": "AbstractCacheStore", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class AbstractCacheStore(object):\n\n def set(self, key, val, time=None):\n raise NotImplementedError\n\n def add(self, key, val, time=None):\n raise NotImplementedError\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L26_C4", "label": "set", "type": "function", "loc": [26, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L24_C0", "vector": [2, 1, 0.2454, 0.0185, 1, 0.29, 0.0, 21, 0, 4, 0, 0, 0, 0, 0], "semantic": {"name": "set", "arg_names": ["self", "key", "val", "time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def set(self, key, val, time=None):\n raise NotImplementedError"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L29_C4", "label": "add", "type": "function", "loc": [29, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L24_C0", "vector": [2, 1, 0.2731, 0.0185, 1, 0.29, 0.25, 241, 0, 4, 0, 0, 0, 0, 0], "semantic": {"name": "add", "arg_names": ["self", "key", "val", "time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def add(self, key, val, time=None):\n raise NotImplementedError"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L32_C4", "label": "replace", "type": "function", "loc": [32, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L24_C0", "vector": [2, 1, 0.3009, 0.0185, 1, 0.29, 0.5, 293, 0, 4, 0, 0, 0, 0, 0], "semantic": {"name": "replace", "arg_names": ["self", "key", "val", "time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def replace(self, key, val, time=None):\n raise NotImplementedError"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L35_C4", "label": "delete", "type": "function", "loc": [35, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L24_C0", "vector": [2, 1, 0.3287, 0.0185, 1, 0.29, 0.75, 266, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "delete", "arg_names": ["self", "key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def delete(self, key):\n raise NotImplementedError"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L38_C4", "label": "get", "type": "function", "loc": [38, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L24_C0", "vector": [2, 1, 0.3565, 0.0185, 1, 0.29, 1.0, 607, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "get", "arg_names": ["self", "key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get(self, key):\n raise NotImplementedError"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L41_C0", "label": "MemoryCacheStore", "type": "class", "loc": [41, 70], "level": 0, "parent": null, "vector": [3, 0, 0.5139, 0.2778, 0, 0.66, 0.8333, 489, 0, 7, 0, 0, 70, 0, 5], "semantic": {"name": "MemoryCacheStore", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class MemoryCacheStore(AbstractCacheStore):\n def __init__(self):\n self._data = {}\n\n def set(self, key, val, time=0):\n self._data[key] = (val, time)\n\n def add(self, key, val, time=0):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L42_C4", "label": "__init__", "type": "function", "loc": [42, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L41_C0", "vector": [2, 1, 0.3935, 0.0185, 1, 0.27, 0.0, 555, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self):\n self._data = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L43_C8", "label": "self._data =", "type": "assigned_variable", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L42_C4", "vector": [14, 2, 0.3981, 0.0093, 2, 0.72, 0.0, 753, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._data", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._data = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L45_C4", "label": "set", "type": "function", "loc": [45, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L41_C0", "vector": [2, 1, 0.4213, 0.0185, 1, 0.27, 0.1667, 21, 0, 4, 0, 0, 0, 0, 0], "semantic": {"name": "set", "arg_names": ["self", "key", "val", "time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def set(self, key, val, time=0):\n self._data[key] = (val, time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L46_C8", "label": "assign", "type": "assigned_variable", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L45_C4", "vector": [14, 2, 0.4259, 0.0093, 2, 0.11, 0.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._data[key] = (val, time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L48_C4", "label": "add", "type": "function", "loc": [48, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L41_C0", "vector": [2, 1, 0.4583, 0.037, 1, 0.27, 0.3333, 241, 0, 4, 0, 0, 0, 0, 1], "semantic": {"name": "add", "arg_names": ["self", "key", "val", "time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def add(self, key, val, time=0):\n if key in self._data:\n raise Error('a value for key %r is already in the cache'%key)\n self._data[key] = (val, time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L49_C8", "label": "if", "type": "if", "loc": [49, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L48_C4", "vector": [4, 2, 0.4583, 0.0185, 2, 0.36, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if key in self._data:\n raise Error('a value for key %r is already in the cache'%key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L51_C8", "label": "assign", "type": "assigned_variable", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L48_C4", "vector": [14, 2, 0.4722, 0.0093, 2, 0.36, 1.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._data[key] = (val, time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L53_C4", "label": "replace", "type": "function", "loc": [53, 56], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L41_C0", "vector": [2, 1, 0.5046, 0.037, 1, 0.27, 0.5, 293, 0, 4, 0, 0, 0, 0, 1], "semantic": {"name": "replace", "arg_names": ["self", "key", "val", "time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def replace(self, key, val, time=0):\n if key in self._data:\n raise Error('a value for key %r is already in the cache'%key)\n self._data[key] = (val, time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L54_C8", "label": "if", "type": "if", "loc": [54, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L53_C4", "vector": [4, 2, 0.5046, 0.0185, 2, 0.48, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if key in self._data:\n raise Error('a value for key %r is already in the cache'%key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L56_C8", "label": "assign", "type": "assigned_variable", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L53_C4", "vector": [14, 2, 0.5185, 0.0093, 2, 0.48, 1.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._data[key] = (val, time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L58_C4", "label": "delete", "type": "function", "loc": [58, 59], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L41_C0", "vector": [2, 1, 0.5417, 0.0185, 1, 0.27, 0.6667, 266, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "delete", "arg_names": ["self", "key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def delete(self, key):\n del self._data[key]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L61_C4", "label": "get", "type": "function", "loc": [61, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L41_C0", "vector": [2, 1, 0.5926, 0.0648, 1, 0.27, 0.8333, 607, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "get", "arg_names": ["self", "key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get(self, key):\n (val, exptime) = self._data[key]\n if exptime and time.time() > exptime:\n del self._data[key]\n raise KeyError(key)\n else:\n return val"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L62_C8", "label": "val, exptime =", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L61_C4", "vector": [14, 2, 0.5741, 0.0093, 2, 0.85, 0.0, 615, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "val, exptime", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " (val, exptime) = self._data[key]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L63_C8", "label": "if", "type": "if", "loc": [63, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L61_C4", "vector": [4, 2, 0.6019, 0.0463, 2, 0.85, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if exptime and time.time() > exptime:\n del self._data[key]\n raise KeyError(key)\n else:\n return val"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Return_L67_C12", "label": "return", "type": "return", "loc": [67, 67], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L63_C8", "vector": [13, 3, 0.6204, 0.0093, 3, 0.02, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return val"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L69_C4", "label": "clear", "type": "function", "loc": [69, 70], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L41_C0", "vector": [2, 1, 0.6435, 0.0185, 1, 0.27, 1.0, 712, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def clear(self):\n self._data.clear() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Expr_L70_C8", "label": "clear()", "type": "expression", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L69_C4", "vector": [8, 2, 0.6481, 0.0093, 2, 0.1, 0.0, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " self._data.clear() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "label": "MemcachedCacheStore", "type": "class", "loc": [72, 108], "level": 0, "parent": null, "vector": [3, 0, 0.8333, 0.3426, 0, 0.66, 1.0, 560, 0, 7, 0, 0, 70, 0, 11], "semantic": {"name": "MemcachedCacheStore", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class MemcachedCacheStore(AbstractCacheStore):\n servers = ('127.0.0.1:11211')\n def __init__(self, servers=None, debug=False):\n if servers is None:\n servers = self.servers\n \n self._client = MemcachedClient(servers, debug)\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L73_C4", "label": "servers =", "type": "assigned_variable", "loc": [73, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "vector": [14, 1, 0.6759, 0.0093, 1, 0.47, 0.0, 128, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "servers", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " servers = ('127.0.0.1:11211')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L74_C4", "label": "__init__", "type": "function", "loc": [74, 78], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "vector": [2, 1, 0.7037, 0.0463, 1, 0.47, 0.1429, 555, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "servers", "debug"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, servers=None, debug=False):\n if servers is None:\n servers = self.servers\n \n self._client = MemcachedClient(servers, debug)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L75_C8", "label": "if", "type": "if", "loc": [75, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L74_C4", "vector": [4, 2, 0.6991, 0.0185, 2, 0.34, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if servers is None:\n servers = self.servers"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L76_C12", "label": "servers =", "type": "assigned_variable", "loc": [76, 76], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L75_C8", "vector": [14, 3, 0.7037, 0.0093, 3, 0.5, 0.0, 128, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "servers", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " servers = self.servers"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L78_C8", "label": "self._client = MemcachedClient()", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L74_C4", "vector": [14, 2, 0.7222, 0.0093, 2, 0.34, 1.0, 496, 3, 2, 0, 0, 457, 10, 1], "semantic": {"name": "self._client", "arg_names": [], "import_names": [], "rhs_call_name": "MemcachedClient", "annotation": ""}, "snippet": " self._client = MemcachedClient(servers, debug)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L80_C4", "label": "set", "type": "function", "loc": [80, 81], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "vector": [2, 1, 0.7454, 0.0185, 1, 0.47, 0.2857, 21, 0, 4, 0, 0, 0, 0, 1], "semantic": {"name": "set", "arg_names": ["self", "key", "val", "time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def set(self, key, val, time=0):\n self._client.set(key, val, time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Expr_L81_C8", "label": "set()", "type": "expression", "loc": [81, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L80_C4", "vector": [8, 2, 0.75, 0.0093, 2, 0.28, 0.0, 21, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "set", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " self._client.set(key, val, time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L83_C4", "label": "add", "type": "function", "loc": [83, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "vector": [2, 1, 0.787, 0.0463, 1, 0.47, 0.4286, 241, 0, 4, 0, 0, 0, 0, 2], "semantic": {"name": "add", "arg_names": ["self", "key", "val", "time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def add(self, key, val, time=0):\n res = self._client.add(key, val, time) \n if not res:\n raise Error('a value for key %r is already in the cache'%key)\n self._data[key] = (val, time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L84_C8", "label": "res = add()", "type": "assigned_variable", "loc": [84, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L83_C4", "vector": [14, 2, 0.7778, 0.0093, 2, 0.23, 0.0, 413, 3, 3, 0, 0, 241, 10, 1], "semantic": {"name": "res", "arg_names": [], "import_names": [], "rhs_call_name": "add", "annotation": ""}, "snippet": " res = self._client.add(key, val, time) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L85_C8", "label": "if", "type": "if", "loc": [85, 86], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L83_C4", "vector": [4, 2, 0.7917, 0.0185, 2, 0.23, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not res:\n raise Error('a value for key %r is already in the cache'%key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L87_C8", "label": "assign", "type": "assigned_variable", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L83_C4", "vector": [14, 2, 0.8056, 0.0093, 2, 0.23, 1.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._data[key] = (val, time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L89_C4", "label": "replace", "type": "function", "loc": [89, 93], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "vector": [2, 1, 0.8426, 0.0463, 1, 0.47, 0.5714, 293, 0, 4, 0, 0, 0, 0, 2], "semantic": {"name": "replace", "arg_names": ["self", "key", "val", "time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def replace(self, key, val, time=0):\n res = self._client.replace(key, val, time) \n if not res:\n raise Error('a value for key %r is already in the cache'%key)\n self._data[key] = (val, time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L90_C8", "label": "res = replace()", "type": "assigned_variable", "loc": [90, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L89_C4", "vector": [14, 2, 0.8333, 0.0093, 2, 0.03, 0.0, 413, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "res", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " res = self._client.replace(key, val, time) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L91_C8", "label": "if", "type": "if", "loc": [91, 92], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L89_C4", "vector": [4, 2, 0.8472, 0.0185, 2, 0.03, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not res:\n raise Error('a value for key %r is already in the cache'%key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L93_C8", "label": "assign", "type": "assigned_variable", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L89_C4", "vector": [14, 2, 0.8611, 0.0093, 2, 0.03, 1.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._data[key] = (val, time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L95_C4", "label": "delete", "type": "function", "loc": [95, 98], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "vector": [2, 1, 0.8935, 0.037, 1, 0.47, 0.7143, 266, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "delete", "arg_names": ["self", "key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def delete(self, key):\n res = self._client.delete(key, time=0) \n if not res:\n raise KeyError(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L96_C8", "label": "res = delete()", "type": "assigned_variable", "loc": [96, 96], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L95_C4", "vector": [14, 2, 0.8889, 0.0093, 2, 0.8, 0.0, 413, 3, 2, 0, 0, 266, 10, 1], "semantic": {"name": "res", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " res = self._client.delete(key, time=0) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L97_C8", "label": "if", "type": "if", "loc": [97, 98], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L95_C4", "vector": [4, 2, 0.9028, 0.0185, 2, 0.8, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not res:\n raise KeyError(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L100_C4", "label": "get", "type": "function", "loc": [100, 105], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "vector": [2, 1, 0.9491, 0.0556, 1, 0.47, 0.8571, 607, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "get", "arg_names": ["self", "key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get(self, key):\n val = self._client.get(key)\n if val is None:\n raise KeyError(key)\n else:\n return val"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L101_C8", "label": "val = get()", "type": "assigned_variable", "loc": [101, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L100_C4", "vector": [14, 2, 0.9352, 0.0093, 2, 0.49, 0.0, 618, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "val", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " val = self._client.get(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L102_C8", "label": "if", "type": "if", "loc": [102, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L100_C4", "vector": [4, 2, 0.9583, 0.037, 2, 0.49, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if val is None:\n raise KeyError(key)\n else:\n return val"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Return_L105_C12", "label": "return", "type": "return", "loc": [105, 105], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L102_C8", "vector": [13, 3, 0.9722, 0.0093, 3, 0.42, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return val"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L107_C4", "label": "clear", "type": "function", "loc": [107, 108], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "vector": [2, 1, 0.9954, 0.0185, 1, 0.47, 1.0, 712, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def clear(self):\n self._client.flush_all() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1479:Expr_L108_C8", "label": "flush_all()", "type": "expression", "loc": [108, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L107_C4", "vector": [8, 2, 1.0, 0.0093, 2, 0.39, 0.0, 218, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "flush_all", "arg_names": [], "import_names": [], "rhs_call_name": "flush_all", "annotation": ""}, "snippet": " self._client.flush_all() "}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L43_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L56_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L63_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Return_L67_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Expr_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L73_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L74_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L75_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L75_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L76_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L74_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L80_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L80_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Expr_L81_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L83_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L84_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L83_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L85_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L83_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L87_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L89_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L90_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L89_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L91_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L89_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L93_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L95_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L95_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L100_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L100_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Assign_L101_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L100_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L102_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:If_L102_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Return_L105_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:ClassDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L107_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1479:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1479:Expr_L108_C8"}]
try: from ds.sys.Unspecified import Unspecified except ImportError: class _Unspecified: def __repr__(self): return 'Unspecified' def __str__(self): return 'Unspecified' Unspecified = _Unspecified()
ajibawa-2023/Python-Code-Large/train/row_1480
8
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1480:Try_L1_C0", "label": "try", "type": "try", "loc": [1, 9], "level": 0, "parent": null, "vector": [7, 0, 0.5556, 1.0, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n from ds.sys.Unspecified import Unspecified\nexcept ImportError:\n class _Unspecified:\n def __repr__(self):\n return 'Unspecified' \n def __str__(self):\n return 'Unspecified'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1480:ImportFrom_L2_C4", "label": "from ds.sys.Unspecified import Unspecified", "type": "import", "loc": [2, 2], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1480:Try_L1_C0", "vector": [1, 1, 0.2222, 0.1111, 1, 0.02, 0.0, 219, 0, 1, 0, 0, 219, 0, 0], "semantic": {"name": "ds.sys.Unspecified", "arg_names": [], "import_names": ["Unspecified"], "rhs_call_name": "", "annotation": ""}, "snippet": " from ds.sys.Unspecified import Unspecified"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1480:ClassDef_L4_C4", "label": "_Unspecified", "type": "class", "loc": [4, 8], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1480:Try_L1_C0", "vector": [3, 1, 0.6667, 0.5556, 1, 0.02, 0.0, 569, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "_Unspecified", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class _Unspecified:\n def __repr__(self):\n return 'Unspecified' \n def __str__(self):\n return 'Unspecified'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1480:FunctionDef_L5_C8", "label": "__repr__", "type": "function", "loc": [5, 6], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1480:ClassDef_L4_C4", "vector": [2, 2, 0.6111, 0.2222, 2, 0.63, 0.0, 204, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__repr__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __repr__(self):\n return 'Unspecified' "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1480:Return_L6_C12", "label": "return", "type": "return", "loc": [6, 6], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1480:FunctionDef_L5_C8", "vector": [13, 3, 0.6667, 0.1111, 3, 0.05, 0.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return 'Unspecified' "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1480:FunctionDef_L7_C8", "label": "__str__", "type": "function", "loc": [7, 8], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1480:ClassDef_L4_C4", "vector": [2, 2, 0.8333, 0.2222, 2, 0.63, 1.0, 527, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__str__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __str__(self):\n return 'Unspecified'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1480:Return_L8_C12", "label": "return", "type": "return", "loc": [8, 8], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1480:FunctionDef_L7_C8", "vector": [13, 3, 0.8889, 0.1111, 3, 0.04, 0.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return 'Unspecified'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1480:Assign_L9_C4", "label": "Unspecified = _Unspecified()", "type": "assigned_variable", "loc": [9, 9], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1480:Try_L1_C0", "vector": [14, 1, 1.0, 0.1111, 1, 0.02, 1.0, 778, 3, 0, 0, 0, 569, 10, 1], "semantic": {"name": "Unspecified", "arg_names": [], "import_names": [], "rhs_call_name": "_Unspecified", "annotation": ""}, "snippet": " Unspecified = _Unspecified()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1480:Try_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1480:ImportFrom_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1480:Try_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1480:ClassDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1480:ClassDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1480:FunctionDef_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1480:FunctionDef_L5_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1480:Return_L6_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1480:ClassDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1480:FunctionDef_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1480:FunctionDef_L7_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1480:Return_L8_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1480:Try_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1480:Assign_L9_C4"}]
# $Id: CacheRegion.py,v 1.3 2006/01/28 04:19:30 tavis_rudd Exp $ ''' Cache holder classes for Cheetah: Cache regions are defined using the #cache Cheetah directive. Each cache region can be viewed as a dictionary (keyed by cacheRegionID) handling at least one cache item (the default one). It's possible to add cacheItems in a region by using the `varyBy` #cache directive parameter as in the following example:: #def getArticle this is the article content. #end def #cache varyBy=$getArticleID() $getArticle($getArticleID()) #end cache The code above will generate a CacheRegion and add new cacheItem for each value of $getArticleID(). ''' try: from hashlib import md5 except ImportError: from md5 import md5 import time import Cheetah.CacheStore class CacheItem(object): ''' A CacheItem is a container storing: - cacheID (string) - refreshTime (timestamp or None) : last time the cache was refreshed - data (string) : the content of the cache ''' def __init__(self, cacheItemID, cacheStore): self._cacheItemID = cacheItemID self._cacheStore = cacheStore self._refreshTime = None self._expiryTime = 0 def hasExpired(self): return (self._expiryTime and time.time() > self._expiryTime) def setExpiryTime(self, time): self._expiryTime = time def getExpiryTime(self): return self._expiryTime def setData(self, data): self._refreshTime = time.time() self._cacheStore.set(self._cacheItemID, data, self._expiryTime) def getRefreshTime(self): return self._refreshTime def getData(self): assert self._refreshTime return self._cacheStore.get(self._cacheItemID) def renderOutput(self): """Can be overridden to implement edge-caching""" return self.getData() or "" def clear(self): self._cacheStore.delete(self._cacheItemID) self._refreshTime = None class _CacheDataStoreWrapper(object): def __init__(self, dataStore, keyPrefix): self._dataStore = dataStore self._keyPrefix = keyPrefix def get(self, key): return self._dataStore.get(self._keyPrefix+key) def delete(self, key): self._dataStore.delete(self._keyPrefix+key) def set(self, key, val, time=0): self._dataStore.set(self._keyPrefix+key, val, time=time) class CacheRegion(object): ''' A `CacheRegion` stores some `CacheItem` instances. This implementation stores the data in the memory of the current process. If you need a more advanced data store, create a cacheStore class that works with Cheetah's CacheStore protocol and provide it as the cacheStore argument to __init__. For example you could use Cheetah.CacheStore.MemcachedCacheStore, a wrapper around the Python memcached API (http://www.danga.com/memcached). ''' _cacheItemClass = CacheItem def __init__(self, regionID, templateCacheIdPrefix='', cacheStore=None): self._isNew = True self._regionID = regionID self._templateCacheIdPrefix = templateCacheIdPrefix if not cacheStore: cacheStore = Cheetah.CacheStore.MemoryCacheStore() self._cacheStore = cacheStore self._wrappedCacheDataStore = _CacheDataStoreWrapper( cacheStore, keyPrefix=templateCacheIdPrefix+':'+regionID+':') self._cacheItems = {} def isNew(self): return self._isNew def clear(self): " drop all the caches stored in this cache region " for cacheItemId in self._cacheItems.keys(): cacheItem = self._cacheItems[cacheItemId] cacheItem.clear() del self._cacheItems[cacheItemId] def getCacheItem(self, cacheItemID): """ Lazy access to a cacheItem Try to find a cache in the stored caches. If it doesn't exist, it's created. Returns a `CacheItem` instance. """ cacheItemID = md5(str(cacheItemID)).hexdigest() if cacheItemID not in self._cacheItems: cacheItem = self._cacheItemClass( cacheItemID=cacheItemID, cacheStore=self._wrappedCacheDataStore) self._cacheItems[cacheItemID] = cacheItem self._isNew = False return self._cacheItems[cacheItemID]
ajibawa-2023/Python-Code-Large/train/row_1481
69
136
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 20], "level": 0, "parent": null, "vector": [8, 0, 0.0809, 0.1397, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nCache holder classes for Cheetah:\n\nCache regions are defined using the #cache Cheetah directive. Each\ncache region can be viewed as a dictionary (keyed by cacheRegionID)\nhandling at least one cache item (the default one). It's possible to add\ncacheItems in a region by using the `varyBy` #cache directive parameter as\nin the following example::"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Try_L22_C0", "label": "try", "type": "try", "loc": [22, 25], "level": 0, "parent": null, "vector": [7, 0, 0.1728, 0.0294, 0, 0.66, 0.1667, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n from hashlib import md5\nexcept ImportError:\n from md5 import md5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:ImportFrom_L23_C4", "label": "from hashlib import md5", "type": "import", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:Try_L22_C0", "vector": [1, 1, 0.1691, 0.0074, 1, 0.17, 0.0, 154, 0, 1, 0, 0, 154, 0, 0], "semantic": {"name": "hashlib", "arg_names": [], "import_names": ["md5"], "rhs_call_name": "", "annotation": ""}, "snippet": " from hashlib import md5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:ImportFrom_L25_C4", "label": "from md5 import md5", "type": "import", "loc": [25, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:Try_L22_C0", "vector": [1, 1, 0.1838, 0.0074, 1, 0.17, 0.0, 604, 0, 1, 0, 0, 604, 0, 0], "semantic": {"name": "md5", "arg_names": [], "import_names": ["md5"], "rhs_call_name": "", "annotation": ""}, "snippet": " from md5 import md5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Import_L27_C0", "label": "time import time", "type": "import", "loc": [27, 27], "level": 0, "parent": null, "vector": [1, 0, 0.1985, 0.0074, 0, 0.66, 0.3333, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Import_L28_C0", "label": "Cheetah.CacheStore import Cheetah.CacheStore", "type": "import", "loc": [28, 28], "level": 0, "parent": null, "vector": [1, 0, 0.2059, 0.0074, 0, 0.66, 0.5, 491, 0, 1, 0, 0, 491, 0, 0], "semantic": {"name": "Cheetah.CacheStore", "arg_names": [], "import_names": ["Cheetah.CacheStore"], "rhs_call_name": "", "annotation": ""}, "snippet": "import Cheetah.CacheStore"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "label": "CacheItem", "type": "class", "loc": [30, 71], "level": 0, "parent": null, "vector": [3, 0, 0.3713, 0.3088, 0, 0.66, 0.6667, 299, 0, 9, 0, 0, 186, 0, 6], "semantic": {"name": "CacheItem", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CacheItem(object):\n '''\n A CacheItem is a container storing:\n\n - cacheID (string)\n - refreshTime (timestamp or None) : last time the cache was refreshed\n - data (string) : the content of the cache\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L31_C4", "label": "expression", "type": "expression", "loc": [31, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "vector": [8, 1, 0.25, 0.0515, 1, 0.56, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n A CacheItem is a container storing:\n\n - cacheID (string)\n - refreshTime (timestamp or None) : last time the cache was refreshed\n - data (string) : the content of the cache\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L39_C4", "label": "__init__", "type": "function", "loc": [39, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "vector": [2, 1, 0.3015, 0.0368, 1, 0.56, 0.1111, 555, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "cacheItemID", "cacheStore"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, cacheItemID, cacheStore):\n self._cacheItemID = cacheItemID\n self._cacheStore = cacheStore\n self._refreshTime = None\n self._expiryTime = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L40_C8", "label": "self._cacheItemID =", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L39_C4", "vector": [14, 2, 0.2941, 0.0074, 2, 0.62, 0.0, 647, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._cacheItemID", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._cacheItemID = cacheItemID"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L41_C8", "label": "self._cacheStore =", "type": "assigned_variable", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L39_C4", "vector": [14, 2, 0.3015, 0.0074, 2, 0.62, 0.3333, 952, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._cacheStore", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._cacheStore = cacheStore"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L42_C8", "label": "self._refreshTime =", "type": "assigned_variable", "loc": [42, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L39_C4", "vector": [14, 2, 0.3088, 0.0074, 2, 0.62, 0.6667, 907, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._refreshTime", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._refreshTime = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L43_C8", "label": "self._expiryTime =", "type": "assigned_variable", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L39_C4", "vector": [14, 2, 0.3162, 0.0074, 2, 0.62, 1.0, 294, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self._expiryTime", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._expiryTime = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L45_C4", "label": "hasExpired", "type": "function", "loc": [45, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "vector": [2, 1, 0.3346, 0.0147, 1, 0.56, 0.2222, 110, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "hasExpired", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def hasExpired(self):\n return (self._expiryTime and time.time() > self._expiryTime)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Return_L46_C8", "label": "return", "type": "return", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L45_C4", "vector": [13, 2, 0.3382, 0.0074, 2, 0.95, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return (self._expiryTime and time.time() > self._expiryTime)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L48_C4", "label": "setExpiryTime", "type": "function", "loc": [48, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "vector": [2, 1, 0.3566, 0.0147, 1, 0.56, 0.3333, 460, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "setExpiryTime", "arg_names": ["self", "time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setExpiryTime(self, time):\n self._expiryTime = time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L49_C8", "label": "self._expiryTime =", "type": "assigned_variable", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L48_C4", "vector": [14, 2, 0.3603, 0.0074, 2, 0.43, 0.0, 294, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._expiryTime", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._expiryTime = time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L51_C4", "label": "getExpiryTime", "type": "function", "loc": [51, 52], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "vector": [2, 1, 0.3787, 0.0147, 1, 0.56, 0.4444, 508, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "getExpiryTime", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getExpiryTime(self):\n return self._expiryTime"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Return_L52_C8", "label": "return", "type": "return", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L51_C4", "vector": [13, 2, 0.3824, 0.0074, 2, 0.47, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._expiryTime"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L54_C4", "label": "setData", "type": "function", "loc": [54, 56], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "vector": [2, 1, 0.4044, 0.0221, 1, 0.56, 0.5556, 960, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "setData", "arg_names": ["self", "data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setData(self, data):\n self._refreshTime = time.time()\n self._cacheStore.set(self._cacheItemID, data, self._expiryTime)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L55_C8", "label": "self._refreshTime = time()", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L54_C4", "vector": [14, 2, 0.4044, 0.0074, 2, 0.04, 0.0, 907, 3, 0, 0, 0, 654, 10, 1], "semantic": {"name": "self._refreshTime", "arg_names": [], "import_names": [], "rhs_call_name": "time", "annotation": ""}, "snippet": " self._refreshTime = time.time()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L56_C8", "label": "set()", "type": "expression", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L54_C4", "vector": [8, 2, 0.4118, 0.0074, 2, 0.04, 1.0, 21, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "set", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " self._cacheStore.set(self._cacheItemID, data, self._expiryTime)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L58_C4", "label": "getRefreshTime", "type": "function", "loc": [58, 59], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "vector": [2, 1, 0.4301, 0.0147, 1, 0.56, 0.6667, 889, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "getRefreshTime", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getRefreshTime(self):\n return self._refreshTime"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Return_L59_C8", "label": "return", "type": "return", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L58_C4", "vector": [13, 2, 0.4338, 0.0074, 2, 0.81, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._refreshTime"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L61_C4", "label": "getData", "type": "function", "loc": [61, 63], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "vector": [2, 1, 0.4559, 0.0221, 1, 0.56, 0.7778, 275, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "getData", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getData(self):\n assert self._refreshTime\n return self._cacheStore.get(self._cacheItemID)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Return_L63_C8", "label": "return", "type": "return", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L61_C4", "vector": [13, 2, 0.4632, 0.0074, 2, 0.95, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._cacheStore.get(self._cacheItemID)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L65_C4", "label": "renderOutput", "type": "function", "loc": [65, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "vector": [2, 1, 0.4853, 0.0221, 1, 0.56, 0.8889, 347, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "renderOutput", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def renderOutput(self):\n \"\"\"Can be overridden to implement edge-caching\"\"\"\n return self.getData() or \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L66_C8", "label": "expression", "type": "expression", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L65_C4", "vector": [8, 2, 0.4853, 0.0074, 2, 0.96, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Can be overridden to implement edge-caching\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Return_L67_C8", "label": "return", "type": "return", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L65_C4", "vector": [13, 2, 0.4926, 0.0074, 2, 0.96, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.getData() or \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L69_C4", "label": "clear", "type": "function", "loc": [69, 71], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "vector": [2, 1, 0.5147, 0.0221, 1, 0.56, 1.0, 712, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def clear(self):\n self._cacheStore.delete(self._cacheItemID)\n self._refreshTime = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L70_C8", "label": "delete()", "type": "expression", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L69_C4", "vector": [8, 2, 0.5147, 0.0074, 2, 0.54, 0.0, 266, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "delete", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " self._cacheStore.delete(self._cacheItemID)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L71_C8", "label": "self._refreshTime =", "type": "assigned_variable", "loc": [71, 71], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L69_C4", "vector": [14, 2, 0.5221, 0.0074, 2, 0.54, 1.0, 907, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._refreshTime", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._refreshTime = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L73_C0", "label": "_CacheDataStoreWrapper", "type": "class", "loc": [73, 85], "level": 0, "parent": null, "vector": [3, 0, 0.5809, 0.0956, 0, 0.66, 0.8333, 823, 0, 4, 0, 0, 186, 0, 3], "semantic": {"name": "_CacheDataStoreWrapper", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class _CacheDataStoreWrapper(object):\n def __init__(self, dataStore, keyPrefix):\n self._dataStore = dataStore\n self._keyPrefix = keyPrefix\n \n def get(self, key):\n return self._dataStore.get(self._keyPrefix+key)\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L74_C4", "label": "__init__", "type": "function", "loc": [74, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L73_C0", "vector": [2, 1, 0.5515, 0.0221, 1, 0.8, 0.0, 555, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "dataStore", "keyPrefix"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, dataStore, keyPrefix):\n self._dataStore = dataStore\n self._keyPrefix = keyPrefix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L75_C8", "label": "self._dataStore =", "type": "assigned_variable", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L74_C4", "vector": [14, 2, 0.5515, 0.0074, 2, 0.78, 0.0, 933, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._dataStore", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._dataStore = dataStore"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L76_C8", "label": "self._keyPrefix =", "type": "assigned_variable", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L74_C4", "vector": [14, 2, 0.5588, 0.0074, 2, 0.78, 1.0, 41, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._keyPrefix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._keyPrefix = keyPrefix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L78_C4", "label": "get", "type": "function", "loc": [78, 79], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L73_C0", "vector": [2, 1, 0.5772, 0.0147, 1, 0.8, 0.3333, 607, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "get", "arg_names": ["self", "key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get(self, key):\n return self._dataStore.get(self._keyPrefix+key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Return_L79_C8", "label": "return", "type": "return", "loc": [79, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L78_C4", "vector": [13, 2, 0.5809, 0.0074, 2, 0.67, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._dataStore.get(self._keyPrefix+key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L81_C4", "label": "delete", "type": "function", "loc": [81, 82], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L73_C0", "vector": [2, 1, 0.5993, 0.0147, 1, 0.8, 0.6667, 266, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "delete", "arg_names": ["self", "key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def delete(self, key):\n self._dataStore.delete(self._keyPrefix+key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L82_C8", "label": "delete()", "type": "expression", "loc": [82, 82], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L81_C4", "vector": [8, 2, 0.6029, 0.0074, 2, 0.99, 0.0, 266, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "delete", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " self._dataStore.delete(self._keyPrefix+key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L84_C4", "label": "set", "type": "function", "loc": [84, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L73_C0", "vector": [2, 1, 0.6213, 0.0147, 1, 0.8, 1.0, 21, 0, 4, 0, 0, 0, 0, 1], "semantic": {"name": "set", "arg_names": ["self", "key", "val", "time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def set(self, key, val, time=0): \n self._dataStore.set(self._keyPrefix+key, val, time=time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L85_C8", "label": "set()", "type": "expression", "loc": [85, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L84_C4", "vector": [8, 2, 0.625, 0.0074, 2, 0.32, 0.0, 21, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "set", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " self._dataStore.set(self._keyPrefix+key, val, time=time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L87_C0", "label": "CacheRegion", "type": "class", "loc": [87, 136], "level": 0, "parent": null, "vector": [3, 0, 0.8199, 0.3676, 0, 0.66, 1.0, 324, 0, 4, 0, 0, 186, 0, 8], "semantic": {"name": "CacheRegion", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CacheRegion(object):\n '''\n A `CacheRegion` stores some `CacheItem` instances.\n\n This implementation stores the data in the memory of the current process.\n If you need a more advanced data store, create a cacheStore class that works\n with Cheetah's CacheStore protocol and provide it as the cacheStore argument\n to __init__. For example you could use"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L88_C4", "label": "expression", "type": "expression", "loc": [88, 97], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L87_C0", "vector": [8, 1, 0.6801, 0.0735, 1, 0.31, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n A `CacheRegion` stores some `CacheItem` instances.\n\n This implementation stores the data in the memory of the current process.\n If you need a more advanced data store, create a cacheStore class that works\n with Cheetah's CacheStore protocol and provide it as the cacheStore argument\n to __init__. For example you could use\n Cheetah.CacheStore.MemcachedCacheStore, a wrapper around the Python"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L98_C4", "label": "_cacheItemClass =", "type": "assigned_variable", "loc": [98, 98], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L87_C0", "vector": [14, 1, 0.7206, 0.0074, 1, 0.31, 0.2, 989, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_cacheItemClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _cacheItemClass = CacheItem"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L100_C4", "label": "__init__", "type": "function", "loc": [100, 109], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L87_C0", "vector": [2, 1, 0.7684, 0.0735, 1, 0.31, 0.4, 555, 0, 4, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "regionID", "templateCacheIdPrefix", "cacheStore"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, regionID, templateCacheIdPrefix='', cacheStore=None):\n self._isNew = True\n self._regionID = regionID\n self._templateCacheIdPrefix = templateCacheIdPrefix\n if not cacheStore:\n cacheStore = Cheetah.CacheStore.MemoryCacheStore()\n self._cacheStore = cacheStore\n self._wrappedCacheDataStore = _CacheDataStoreWrapper("}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L101_C8", "label": "self._isNew =", "type": "assigned_variable", "loc": [101, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L100_C4", "vector": [14, 2, 0.7426, 0.0074, 2, 0.75, 0.0, 53, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._isNew", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._isNew = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L102_C8", "label": "self._regionID =", "type": "assigned_variable", "loc": [102, 102], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L100_C4", "vector": [14, 2, 0.75, 0.0074, 2, 0.75, 0.1667, 489, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._regionID", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._regionID = regionID"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L103_C8", "label": "self._templateCacheIdPrefix =", "type": "assigned_variable", "loc": [103, 103], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L100_C4", "vector": [14, 2, 0.7574, 0.0074, 2, 0.75, 0.3333, 568, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._templateCacheIdPrefix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._templateCacheIdPrefix = templateCacheIdPrefix"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:If_L104_C8", "label": "if", "type": "if", "loc": [104, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L100_C4", "vector": [4, 2, 0.7684, 0.0147, 2, 0.75, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not cacheStore:\n cacheStore = Cheetah.CacheStore.MemoryCacheStore()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L105_C12", "label": "cacheStore = MemoryCacheStore()", "type": "assigned_variable", "loc": [105, 105], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:If_L104_C8", "vector": [14, 3, 0.7721, 0.0074, 3, 0.0, 0.0, 550, 3, 0, 0, 0, 489, 10, 1], "semantic": {"name": "cacheStore", "arg_names": [], "import_names": [], "rhs_call_name": "MemoryCacheStore", "annotation": ""}, "snippet": " cacheStore = Cheetah.CacheStore.MemoryCacheStore()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L106_C8", "label": "self._cacheStore =", "type": "assigned_variable", "loc": [106, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L100_C4", "vector": [14, 2, 0.7794, 0.0074, 2, 0.75, 0.6667, 952, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._cacheStore", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._cacheStore = cacheStore"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L107_C8", "label": "self._wrappedCacheDataStore = _CacheDataStoreWrapper()", "type": "assigned_variable", "loc": [107, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L100_C4", "vector": [14, 2, 0.7904, 0.0147, 2, 0.75, 0.8333, 936, 3, 2, 0, 0, 823, 10, 1], "semantic": {"name": "self._wrappedCacheDataStore", "arg_names": [], "import_names": [], "rhs_call_name": "_CacheDataStoreWrapper", "annotation": ""}, "snippet": " self._wrappedCacheDataStore = _CacheDataStoreWrapper(\n cacheStore, keyPrefix=templateCacheIdPrefix+':'+regionID+':')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L109_C8", "label": "self._cacheItems =", "type": "assigned_variable", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L100_C4", "vector": [14, 2, 0.8015, 0.0074, 2, 0.75, 1.0, 228, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._cacheItems", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._cacheItems = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L111_C4", "label": "isNew", "type": "function", "loc": [111, 112], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L87_C0", "vector": [2, 1, 0.8199, 0.0147, 1, 0.31, 0.6, 827, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "isNew", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def isNew(self):\n return self._isNew"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Return_L112_C8", "label": "return", "type": "return", "loc": [112, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L111_C4", "vector": [13, 2, 0.8235, 0.0074, 2, 0.5, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._isNew"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L114_C4", "label": "clear", "type": "function", "loc": [114, 119], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L87_C0", "vector": [2, 1, 0.8566, 0.0441, 1, 0.31, 0.8, 712, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "clear", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def clear(self):\n \" drop all the caches stored in this cache region \"\n for cacheItemId in self._cacheItems.keys():\n cacheItem = self._cacheItems[cacheItemId]\n cacheItem.clear()\n del self._cacheItems[cacheItemId]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L115_C8", "label": "expression", "type": "expression", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L114_C4", "vector": [8, 2, 0.8456, 0.0074, 2, 0.29, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \" drop all the caches stored in this cache region \""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:For_L116_C8", "label": "for cacheItemId", "type": "for", "loc": [116, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L114_C4", "vector": [6, 2, 0.864, 0.0294, 2, 0.29, 1.0, 582, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "cacheItemId", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for cacheItemId in self._cacheItems.keys():\n cacheItem = self._cacheItems[cacheItemId]\n cacheItem.clear()\n del self._cacheItems[cacheItemId]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L117_C12", "label": "cacheItem =", "type": "assigned_variable", "loc": [117, 117], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:For_L116_C8", "vector": [14, 3, 0.8603, 0.0074, 3, 0.17, 0.0, 899, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cacheItem", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cacheItem = self._cacheItems[cacheItemId]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L118_C12", "label": "clear()", "type": "expression", "loc": [118, 118], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:For_L116_C8", "vector": [8, 3, 0.8676, 0.0074, 3, 0.17, 1.0, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " cacheItem.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L121_C4", "label": "getCacheItem", "type": "function", "loc": [121, 136], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L87_C0", "vector": [2, 1, 0.9449, 0.1176, 1, 0.31, 1.0, 952, 0, 2, 1, 0, 0, 0, 4], "semantic": {"name": "getCacheItem", "arg_names": ["self", "cacheItemID"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getCacheItem(self, cacheItemID):\n \"\"\" Lazy access to a cacheItem\n\n Try to find a cache in the stored caches. If it doesn't\n exist, it's created.\n \n Returns a `CacheItem` instance.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L122_C8", "label": "expression", "type": "expression", "loc": [122, 128], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L121_C4", "vector": [8, 2, 0.9191, 0.0515, 2, 0.56, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\" Lazy access to a cacheItem\n\n Try to find a cache in the stored caches. If it doesn't\n exist, it's created.\n \n Returns a `CacheItem` instance.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L129_C8", "label": "cacheItemID = hexdigest()", "type": "assigned_variable", "loc": [129, 129], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L121_C4", "vector": [14, 2, 0.9485, 0.0074, 2, 0.56, 0.3333, 340, 3, 0, 0, 0, 89, 10, 3], "semantic": {"name": "cacheItemID", "arg_names": [], "import_names": [], "rhs_call_name": "hexdigest", "annotation": ""}, "snippet": " cacheItemID = md5(str(cacheItemID)).hexdigest()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:If_L131_C8", "label": "if", "type": "if", "loc": [131, 135], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L121_C4", "vector": [4, 2, 0.9779, 0.0368, 2, 0.56, 0.6667, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if cacheItemID not in self._cacheItems:\n cacheItem = self._cacheItemClass(\n cacheItemID=cacheItemID, cacheStore=self._wrappedCacheDataStore)\n self._cacheItems[cacheItemID] = cacheItem\n self._isNew = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L132_C12", "label": "cacheItem = _cacheItemClass()", "type": "assigned_variable", "loc": [132, 133], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:If_L131_C8", "vector": [14, 3, 0.9743, 0.0147, 3, 0.12, 0.0, 899, 3, 2, 0, 0, 989, 10, 1], "semantic": {"name": "cacheItem", "arg_names": [], "import_names": [], "rhs_call_name": "_cacheItemClass", "annotation": ""}, "snippet": " cacheItem = self._cacheItemClass(\n cacheItemID=cacheItemID, cacheStore=self._wrappedCacheDataStore)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L134_C12", "label": "assign", "type": "assigned_variable", "loc": [134, 134], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:If_L131_C8", "vector": [14, 3, 0.9853, 0.0074, 3, 0.12, 0.5, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._cacheItems[cacheItemID] = cacheItem"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L135_C12", "label": "self._isNew =", "type": "assigned_variable", "loc": [135, 135], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:If_L131_C8", "vector": [14, 3, 0.9926, 0.0074, 3, 0.12, 1.0, 53, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._isNew", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._isNew = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1481:Return_L136_C8", "label": "return", "type": "return", "loc": [136, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L121_C4", "vector": [13, 2, 1.0, 0.0074, 2, 0.56, 1.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._cacheItems[cacheItemID]"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1481:Try_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:ImportFrom_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:Try_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:ImportFrom_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L42_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L43_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Return_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L51_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Return_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L56_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L58_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Return_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Return_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L65_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Return_L67_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L71_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L73_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L74_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L75_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L74_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L73_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L78_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L78_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Return_L79_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L73_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L81_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L81_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L73_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L84_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L84_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L85_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L87_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L88_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L87_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L98_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L87_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L100_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L100_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L101_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L100_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L102_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L100_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L103_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L100_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:If_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:If_L104_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L105_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L100_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L100_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L100_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L109_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L87_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L111_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L111_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Return_L112_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L87_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L114_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L114_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L114_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:For_L116_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:For_L116_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L117_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:For_L116_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L118_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:ClassDef_L87_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L121_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L121_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Expr_L122_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L121_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L129_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L121_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:If_L131_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:If_L131_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L132_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:If_L131_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L134_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:If_L131_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Assign_L135_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1481:FunctionDef_L121_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1481:Return_L136_C8"}]
#!/usr/bin/env python ''' Tests for the 'cheetah' command. Besides unittest usage, recognizes the following command-line options: --list CheetahWrapper.py List all scenarios that are tested. The argument is the path of this script. --nodelete Don't delete scratch directory at end. --output Show the output of each subcommand. (Normally suppressed.) ''' import os import os.path import pdb import re # Used by listTests. import shutil import sys import tempfile import unittest from optparse import OptionParser from Cheetah.CheetahWrapper import CheetahWrapper # Used by NoBackup. try: from subprocess import Popen, PIPE, STDOUT class Popen4(Popen): def __init__(self, cmd, bufsize=-1, shell=True, close_fds=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, **kwargs): super(Popen4, self).__init__(cmd, bufsize=bufsize, shell=shell, close_fds=close_fds, stdin=stdin, stdout=stdout, stderr=stderr, **kwargs) self.tochild = self.stdin self.fromchild = self.stdout self.childerr = self.stderr except ImportError: from popen2 import Popen4 DELETE = True # True to clean up after ourselves, False for debugging. OUTPUT = False # Normally False, True for debugging. BACKUP_SUFFIX = CheetahWrapper.BACKUP_SUFFIX def warn(msg): sys.stderr.write(msg + '\n') class CFBase(unittest.TestCase): """Base class for "cheetah compile" and "cheetah fill" unit tests. """ srcDir = '' # Nonblank to create source directory. subdirs = ('child', 'child/grandkid') # Delete in reverse order. srcFiles = ('a.tmpl', 'child/a.tmpl', 'child/grandkid/a.tmpl') expectError = False # Used by --list option. def inform(self, message): if self.verbose: print(message) def setUp(self): """Create the top-level directories, subdirectories and .tmpl files. """ I = self.inform # Step 1: Create the scratch directory and chdir into it. self.scratchDir = scratchDir = tempfile.mktemp() os.mkdir(scratchDir) self.origCwd = os.getcwd() os.chdir(scratchDir) if self.srcDir: os.mkdir(self.srcDir) # Step 2: Create source subdirectories. for dir in self.subdirs: os.mkdir(dir) # Step 3: Create the .tmpl files, each in its proper directory. for fil in self.srcFiles: f = open(fil, 'w') f.write("Hello, world!\n") f.close() def tearDown(self): os.chdir(self.origCwd) if DELETE: shutil.rmtree(self.scratchDir, True) # Ignore errors. if os.path.exists(self.scratchDir): warn("Warning: unable to delete scratch directory %s") else: warn("Warning: not deleting scratch directory %s" % self.scratchDir) def _checkDestFileHelper(self, path, expected, allowSurroundingText, errmsg): """Low-level helper to check a destination file. in : path, string, the destination path. expected, string, the expected contents. allowSurroundingtext, bool, allow the result to contain additional text around the 'expected' substring? errmsg, string, the error message. It may contain the following "%"-operator keys: path, expected, result. out: None """ path = os.path.abspath(path) exists = os.path.exists(path) msg = "destination file missing: %s" % path self.failUnless(exists, msg) f = open(path, 'r') result = f.read() f.close() if allowSurroundingText: success = result.find(expected) != -1 else: success = result == expected msg = errmsg % locals() self.failUnless(success, msg) def checkCompile(self, path): # Raw string to prevent "\n" from being converted to a newline. #expected = R"write('Hello, world!\n')" expected = "Hello, world!" # might output a u'' string errmsg = """\ destination file %(path)s doesn't contain expected substring: %(expected)r""" self._checkDestFileHelper(path, expected, True, errmsg) def checkFill(self, path): expected = "Hello, world!\n" errmsg = """\ destination file %(path)s contains wrong result. Expected %(expected)r Found %(result)r""" self._checkDestFileHelper(path, expected, False, errmsg) def checkSubdirPyInit(self, path): """Verify a destination subdirectory exists and contains an __init__.py file. """ exists = os.path.exists(path) msg = "destination subdirectory %s misssing" % path self.failUnless(exists, msg) initPath = os.path.join(path, "__init__.py") exists = os.path.exists(initPath) msg = "destination init file missing: %s" % initPath self.failUnless(exists, msg) def checkNoBackup(self, path): """Verify 'path' does not exist. (To check --nobackup.) """ exists = os.path.exists(path) msg = "backup file exists in spite of --nobackup: %s" % path self.failIf(exists, msg) def locate_command(self, cmd): paths = os.getenv('PATH') if not paths: return cmd parts = cmd.split(' ') paths = paths.split(':') for p in paths: p = p + os.path.sep + parts[0] if os.path.isfile(p): return ' '.join([p] + parts[1:]) return ' '.join(parts) def assertWin32Subprocess(self, cmd): _in, _out = os.popen4(cmd) _in.close() output = _out.read() rc = _out.close() if rc is None: rc = 0 return rc, output def assertPosixSubprocess(self, cmd): cmd = self.locate_command(cmd) process = Popen4(cmd, env=os.environ) process.tochild.close() output = process.fromchild.read() status = process.wait() process.fromchild.close() return status, output def assertSubprocess(self, cmd, nonzero=False): status, output = None, None if sys.platform == 'win32': status, output = self.assertWin32Subprocess(cmd) else: status, output = self.assertPosixSubprocess(cmd) if not nonzero: self.failUnlessEqual(status, 0, '''Subprocess exited with a non-zero status (%d) %s''' % (status, output)) else: self.failIfEqual(status, 0, '''Subprocess exited with a zero status (%d) %s''' % (status, output)) return output def go(self, cmd, expectedStatus=0, expectedOutputSubstring=None): """Run a "cheetah compile" or "cheetah fill" subcommand. in : cmd, string, the command to run. expectedStatus, int, subcommand's expected output status. 0 if the subcommand is expected to succeed, 1-255 otherwise. expectedOutputSubstring, string, substring which much appear in the standard output or standard error. None to skip this test. out: None. """ output = self.assertSubprocess(cmd) if expectedOutputSubstring is not None: msg = "substring %r not found in subcommand output: %s" % \ (expectedOutputSubstring, cmd) substringTest = output.find(expectedOutputSubstring) != -1 self.failUnless(substringTest, msg) class CFIdirBase(CFBase): """Subclass for tests with --idir. """ srcDir = 'SRC' subdirs = ('SRC/child', 'SRC/child/grandkid') # Delete in reverse order. srcFiles = ('SRC/a.tmpl', 'SRC/child/a.tmpl', 'SRC/child/grandkid/a.tmpl') ################################################## ## TEST CASE CLASSES class OneFile(CFBase): def testCompile(self): self.go("cheetah compile a.tmpl") self.checkCompile("a.py") def testFill(self): self.go("cheetah fill a.tmpl") self.checkFill("a.html") def testText(self): self.go("cheetah fill --oext txt a.tmpl") self.checkFill("a.txt") class OneFileNoExtension(CFBase): def testCompile(self): self.go("cheetah compile a") self.checkCompile("a.py") def testFill(self): self.go("cheetah fill a") self.checkFill("a.html") def testText(self): self.go("cheetah fill --oext txt a") self.checkFill("a.txt") class SplatTmpl(CFBase): def testCompile(self): self.go("cheetah compile *.tmpl") self.checkCompile("a.py") def testFill(self): self.go("cheetah fill *.tmpl") self.checkFill("a.html") def testText(self): self.go("cheetah fill --oext txt *.tmpl") self.checkFill("a.txt") class ThreeFilesWithSubdirectories(CFBase): def testCompile(self): self.go("cheetah compile a.tmpl child/a.tmpl child/grandkid/a.tmpl") self.checkCompile("a.py") self.checkCompile("child/a.py") self.checkCompile("child/grandkid/a.py") def testFill(self): self.go("cheetah fill a.tmpl child/a.tmpl child/grandkid/a.tmpl") self.checkFill("a.html") self.checkFill("child/a.html") self.checkFill("child/grandkid/a.html") def testText(self): self.go("cheetah fill --oext txt a.tmpl child/a.tmpl child/grandkid/a.tmpl") self.checkFill("a.txt") self.checkFill("child/a.txt") self.checkFill("child/grandkid/a.txt") class ThreeFilesWithSubdirectoriesNoExtension(CFBase): def testCompile(self): self.go("cheetah compile a child/a child/grandkid/a") self.checkCompile("a.py") self.checkCompile("child/a.py") self.checkCompile("child/grandkid/a.py") def testFill(self): self.go("cheetah fill a child/a child/grandkid/a") self.checkFill("a.html") self.checkFill("child/a.html") self.checkFill("child/grandkid/a.html") def testText(self): self.go("cheetah fill --oext txt a child/a child/grandkid/a") self.checkFill("a.txt") self.checkFill("child/a.txt") self.checkFill("child/grandkid/a.txt") class SplatTmplWithSubdirectories(CFBase): def testCompile(self): self.go("cheetah compile *.tmpl child/*.tmpl child/grandkid/*.tmpl") self.checkCompile("a.py") self.checkCompile("child/a.py") self.checkCompile("child/grandkid/a.py") def testFill(self): self.go("cheetah fill *.tmpl child/*.tmpl child/grandkid/*.tmpl") self.checkFill("a.html") self.checkFill("child/a.html") self.checkFill("child/grandkid/a.html") def testText(self): self.go("cheetah fill --oext txt *.tmpl child/*.tmpl child/grandkid/*.tmpl") self.checkFill("a.txt") self.checkFill("child/a.txt") self.checkFill("child/grandkid/a.txt") class OneFileWithOdir(CFBase): def testCompile(self): self.go("cheetah compile --odir DEST a.tmpl") self.checkSubdirPyInit("DEST") self.checkCompile("DEST/a.py") def testFill(self): self.go("cheetah fill --odir DEST a.tmpl") self.checkFill("DEST/a.html") def testText(self): self.go("cheetah fill --odir DEST --oext txt a.tmpl") self.checkFill("DEST/a.txt") class VarietyWithOdir(CFBase): def testCompile(self): self.go("cheetah compile --odir DEST a.tmpl child/a child/grandkid/*.tmpl") self.checkSubdirPyInit("DEST") self.checkSubdirPyInit("DEST/child") self.checkSubdirPyInit("DEST/child/grandkid") self.checkCompile("DEST/a.py") self.checkCompile("DEST/child/a.py") self.checkCompile("DEST/child/grandkid/a.py") def testFill(self): self.go("cheetah fill --odir DEST a.tmpl child/a child/grandkid/*.tmpl") self.checkFill("DEST/a.html") self.checkFill("DEST/child/a.html") self.checkFill("DEST/child/grandkid/a.html") def testText(self): self.go("cheetah fill --odir DEST --oext txt a.tmpl child/a child/grandkid/*.tmpl") self.checkFill("DEST/a.txt") self.checkFill("DEST/child/a.txt") self.checkFill("DEST/child/grandkid/a.txt") class RecurseExplicit(CFBase): def testCompile(self): self.go("cheetah compile -R child") self.checkCompile("child/a.py") self.checkCompile("child/grandkid/a.py") def testFill(self): self.go("cheetah fill -R child") self.checkFill("child/a.html") self.checkFill("child/grandkid/a.html") def testText(self): self.go("cheetah fill -R --oext txt child") self.checkFill("child/a.txt") self.checkFill("child/grandkid/a.txt") class RecurseImplicit(CFBase): def testCompile(self): self.go("cheetah compile -R") self.checkCompile("child/a.py") self.checkCompile("child/grandkid/a.py") def testFill(self): self.go("cheetah fill -R") self.checkFill("a.html") self.checkFill("child/a.html") self.checkFill("child/grandkid/a.html") def testText(self): self.go("cheetah fill -R --oext txt") self.checkFill("a.txt") self.checkFill("child/a.txt") self.checkFill("child/grandkid/a.txt") class RecurseExplicitWIthOdir(CFBase): def testCompile(self): self.go("cheetah compile -R --odir DEST child") self.checkSubdirPyInit("DEST/child") self.checkSubdirPyInit("DEST/child/grandkid") self.checkCompile("DEST/child/a.py") self.checkCompile("DEST/child/grandkid/a.py") def testFill(self): self.go("cheetah fill -R --odir DEST child") self.checkFill("DEST/child/a.html") self.checkFill("DEST/child/grandkid/a.html") def testText(self): self.go("cheetah fill -R --odir DEST --oext txt child") self.checkFill("DEST/child/a.txt") self.checkFill("DEST/child/grandkid/a.txt") class Flat(CFBase): def testCompile(self): self.go("cheetah compile --flat child/a.tmpl") self.checkCompile("a.py") def testFill(self): self.go("cheetah fill --flat child/a.tmpl") self.checkFill("a.html") def testText(self): self.go("cheetah fill --flat --oext txt child/a.tmpl") self.checkFill("a.txt") class FlatRecurseCollision(CFBase): expectError = True def testCompile(self): self.assertSubprocess("cheetah compile -R --flat", nonzero=True) def testFill(self): self.assertSubprocess("cheetah fill -R --flat", nonzero=True) def testText(self): self.assertSubprocess("cheetah fill -R --flat", nonzero=True) class IdirRecurse(CFIdirBase): def testCompile(self): self.go("cheetah compile -R --idir SRC child") self.checkSubdirPyInit("child") self.checkSubdirPyInit("child/grandkid") self.checkCompile("child/a.py") self.checkCompile("child/grandkid/a.py") def testFill(self): self.go("cheetah fill -R --idir SRC child") self.checkFill("child/a.html") self.checkFill("child/grandkid/a.html") def testText(self): self.go("cheetah fill -R --idir SRC --oext txt child") self.checkFill("child/a.txt") self.checkFill("child/grandkid/a.txt") class IdirOdirRecurse(CFIdirBase): def testCompile(self): self.go("cheetah compile -R --idir SRC --odir DEST child") self.checkSubdirPyInit("DEST/child") self.checkSubdirPyInit("DEST/child/grandkid") self.checkCompile("DEST/child/a.py") self.checkCompile("DEST/child/grandkid/a.py") def testFill(self): self.go("cheetah fill -R --idir SRC --odir DEST child") self.checkFill("DEST/child/a.html") self.checkFill("DEST/child/grandkid/a.html") def testText(self): self.go("cheetah fill -R --idir SRC --odir DEST --oext txt child") self.checkFill("DEST/child/a.txt") self.checkFill("DEST/child/grandkid/a.txt") class IdirFlatRecurseCollision(CFIdirBase): expectError = True def testCompile(self): self.assertSubprocess("cheetah compile -R --flat --idir SRC", nonzero=True) def testFill(self): self.assertSubprocess("cheetah fill -R --flat --idir SRC", nonzero=True) def testText(self): self.assertSubprocess("cheetah fill -R --flat --idir SRC --oext txt", nonzero=True) class NoBackup(CFBase): """Run the command twice each time and verify a backup file is *not* created. """ def testCompile(self): self.go("cheetah compile --nobackup a.tmpl") self.go("cheetah compile --nobackup a.tmpl") self.checkNoBackup("a.py" + BACKUP_SUFFIX) def testFill(self): self.go("cheetah fill --nobackup a.tmpl") self.go("cheetah fill --nobackup a.tmpl") self.checkNoBackup("a.html" + BACKUP_SUFFIX) def testText(self): self.go("cheetah fill --nobackup --oext txt a.tmpl") self.go("cheetah fill --nobackup --oext txt a.tmpl") self.checkNoBackup("a.txt" + BACKUP_SUFFIX) def listTests(cheetahWrapperFile): """cheetahWrapperFile, string, path of this script. XXX TODO: don't print test where expectError is true. """ rx = re.compile( R'self\.go\("(.*?)"\)' ) f = open(cheetahWrapperFile) while True: lin = f.readline() if not lin: break m = rx.search(lin) if m: print(m.group(1)) f.close() def main(): global DELETE, OUTPUT parser = OptionParser() parser.add_option("--list", action="store", dest="listTests") parser.add_option("--nodelete", action="store_true") parser.add_option("--output", action="store_true") # The following options are passed to unittest. parser.add_option("-e", "--explain", action="store_true") parser.add_option("-v", "--verbose", action="store_true") parser.add_option("-q", "--quiet", action="store_true") opts, files = parser.parse_args() if opts.nodelete: DELETE = False if opts.output: OUTPUT = True if opts.listTests: listTests(opts.listTests) else: # Eliminate script-specific command-line arguments to prevent # errors in unittest. del sys.argv[1:] for opt in ("explain", "verbose", "quiet"): if getattr(opts, opt): sys.argv.append("--" + opt) sys.argv.extend(files) unittest.main() if __name__ == '__main__': main() # vim: sw=4 ts=4 expandtab
ajibawa-2023/Python-Code-Large/train/row_1483
394
573
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 13], "level": 0, "parent": null, "vector": [8, 0, 0.0131, 0.0209, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nTests for the 'cheetah' command.\n\nBesides unittest usage, recognizes the following command-line options:\n --list CheetahWrapper.py\n List all scenarios that are tested. The argument is the path\n of this script.\n --nodelete"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Import_L14_C0", "label": "os import os", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0244, 0.0017, 0, 0.66, 0.027, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Import_L15_C0", "label": "os.path import os.path", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0262, 0.0017, 0, 0.66, 0.0541, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os.path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Import_L16_C0", "label": "pdb import pdb", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.0279, 0.0017, 0, 0.66, 0.0811, 91, 0, 1, 0, 0, 91, 0, 0], "semantic": {"name": "pdb", "arg_names": [], "import_names": ["pdb"], "rhs_call_name": "", "annotation": ""}, "snippet": "import pdb"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Import_L17_C0", "label": "re import re", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.0297, 0.0017, 0, 0.66, 0.1081, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re # Used by listTests."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Import_L18_C0", "label": "shutil import shutil", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0314, 0.0017, 0, 0.66, 0.1351, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "shutil", "arg_names": [], "import_names": ["shutil"], "rhs_call_name": "", "annotation": ""}, "snippet": "import shutil"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Import_L19_C0", "label": "sys import sys", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.0332, 0.0017, 0, 0.66, 0.1622, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Import_L20_C0", "label": "tempfile import tempfile", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.0349, 0.0017, 0, 0.66, 0.1892, 516, 0, 1, 0, 0, 516, 0, 0], "semantic": {"name": "tempfile", "arg_names": [], "import_names": ["tempfile"], "rhs_call_name": "", "annotation": ""}, "snippet": "import tempfile"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Import_L21_C0", "label": "unittest import unittest", "type": "import", "loc": [21, 21], "level": 0, "parent": null, "vector": [1, 0, 0.0366, 0.0017, 0, 0.66, 0.2162, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], "rhs_call_name": "", "annotation": ""}, "snippet": "import unittest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ImportFrom_L23_C0", "label": "from optparse import OptionParser", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.0401, 0.0017, 0, 0.66, 0.2432, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "optparse", "arg_names": [], "import_names": ["OptionParser"], "rhs_call_name": "", "annotation": ""}, "snippet": "from optparse import OptionParser"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ImportFrom_L24_C0", "label": "from Cheetah.CheetahWrapper import CheetahWrapper", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.0419, 0.0017, 0, 0.66, 0.2703, 799, 0, 1, 0, 0, 799, 0, 0], "semantic": {"name": "Cheetah.CheetahWrapper", "arg_names": [], "import_names": ["CheetahWrapper"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.CheetahWrapper import CheetahWrapper # Used by NoBackup."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Try_L26_C0", "label": "try", "type": "try", "loc": [26, 40], "level": 0, "parent": null, "vector": [7, 0, 0.0576, 0.0262, 0, 0.66, 0.2973, 0, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n from subprocess import Popen, PIPE, STDOUT\n class Popen4(Popen):\n def __init__(self, cmd, bufsize=-1, shell=True, close_fds=True,\n stdin=PIPE, stdout=PIPE, stderr=STDOUT, **kwargs):\n\n super(Popen4, self).__init__(cmd, bufsize=bufsize, shell=shell,\n close_fds=close_fds, stdin=stdin, stdout=stdout,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ImportFrom_L27_C4", "label": "from subprocess import Popen, PIPE, STDOUT", "type": "import", "loc": [27, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:Try_L26_C0", "vector": [1, 1, 0.0471, 0.0017, 1, 0.78, 0.0, 394, 0, 3, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ["Popen", "PIPE", "STDOUT"], "rhs_call_name": "", "annotation": ""}, "snippet": " from subprocess import Popen, PIPE, STDOUT"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L28_C4", "label": "Popen4", "type": "class", "loc": [28, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:Try_L26_C0", "vector": [3, 1, 0.0576, 0.0192, 1, 0.78, 1.0, 457, 0, 1, 0, 0, 568, 0, 2], "semantic": {"name": "Popen4", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class Popen4(Popen):\n def __init__(self, cmd, bufsize=-1, shell=True, close_fds=True,\n stdin=PIPE, stdout=PIPE, stderr=STDOUT, **kwargs):\n\n super(Popen4, self).__init__(cmd, bufsize=bufsize, shell=shell,\n close_fds=close_fds, stdin=stdin, stdout=stdout,\n stderr=stderr, **kwargs)\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L29_C8", "label": "__init__", "type": "function", "loc": [29, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L28_C4", "vector": [2, 2, 0.0585, 0.0175, 2, 0.37, 0.0, 555, 0, 9, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "cmd", "bufsize", "shell", "close_fds", "stdin", "stdout", "stderr", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, cmd, bufsize=-1, shell=True, close_fds=True,\n stdin=PIPE, stdout=PIPE, stderr=STDOUT, **kwargs):\n\n super(Popen4, self).__init__(cmd, bufsize=bufsize, shell=shell,\n close_fds=close_fds, stdin=stdin, stdout=stdout,\n stderr=stderr, **kwargs)\n\n self.tochild = self.stdin"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L32_C12", "label": "__init__()", "type": "expression", "loc": [32, 34], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L29_C8", "vector": [8, 3, 0.0576, 0.0052, 3, 0.58, 0.0, 555, 3, 8, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(Popen4, self).__init__(cmd, bufsize=bufsize, shell=shell,\n close_fds=close_fds, stdin=stdin, stdout=stdout,\n stderr=stderr, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L36_C12", "label": "self.tochild =", "type": "assigned_variable", "loc": [36, 36], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L29_C8", "vector": [14, 3, 0.0628, 0.0017, 3, 0.58, 0.3333, 240, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.tochild", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.tochild = self.stdin"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L37_C12", "label": "self.fromchild =", "type": "assigned_variable", "loc": [37, 37], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L29_C8", "vector": [14, 3, 0.0646, 0.0017, 3, 0.58, 0.6667, 138, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.fromchild", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.fromchild = self.stdout"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L38_C12", "label": "self.childerr =", "type": "assigned_variable", "loc": [38, 38], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L29_C8", "vector": [14, 3, 0.0663, 0.0017, 3, 0.58, 1.0, 237, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.childerr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.childerr = self.stderr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ImportFrom_L40_C4", "label": "from popen2 import Popen4", "type": "import", "loc": [40, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:Try_L26_C0", "vector": [1, 1, 0.0698, 0.0017, 1, 0.78, 0.0, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "popen2", "arg_names": [], "import_names": ["Popen4"], "rhs_call_name": "", "annotation": ""}, "snippet": " from popen2 import Popen4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L42_C0", "label": "DELETE =", "type": "assigned_variable", "loc": [42, 42], "level": 0, "parent": null, "vector": [14, 0, 0.0733, 0.0017, 0, 0.66, 0.3243, 77, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "DELETE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DELETE = True # True to clean up after ourselves, False for debugging."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L43_C0", "label": "OUTPUT =", "type": "assigned_variable", "loc": [43, 43], "level": 0, "parent": null, "vector": [14, 0, 0.075, 0.0017, 0, 0.66, 0.3514, 592, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "OUTPUT", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "OUTPUT = False # Normally False, True for debugging."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L45_C0", "label": "BACKUP_SUFFIX =", "type": "assigned_variable", "loc": [45, 45], "level": 0, "parent": null, "vector": [14, 0, 0.0785, 0.0017, 0, 0.66, 0.3784, 288, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "BACKUP_SUFFIX", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BACKUP_SUFFIX = CheetahWrapper.BACKUP_SUFFIX"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L47_C0", "label": "warn", "type": "function", "loc": [47, 48], "level": 0, "parent": null, "vector": [2, 0, 0.0829, 0.0035, 0, 0.66, 0.4054, 960, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": ["msg"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def warn(msg):\n sys.stderr.write(msg + '\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L48_C4", "label": "write()", "type": "expression", "loc": [48, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L47_C0", "vector": [8, 1, 0.0838, 0.0017, 1, 0.85, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stderr.write(msg + '\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "label": "CFBase", "type": "class", "loc": [50, 221], "level": 0, "parent": null, "vector": [3, 0, 0.2365, 0.3002, 0, 0.66, 0.4324, 157, 0, 13, 0, 0, 878, 0, 56], "semantic": {"name": "CFBase", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CFBase(unittest.TestCase):\n \"\"\"Base class for \"cheetah compile\" and \"cheetah fill\" unit tests.\n \"\"\"\n srcDir = '' # Nonblank to create source directory.\n subdirs = ('child', 'child/grandkid') # Delete in reverse order.\n srcFiles = ('a.tmpl', 'child/a.tmpl', 'child/grandkid/a.tmpl')\n expectError = False # Used by --list option.\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L51_C4", "label": "expression", "type": "expression", "loc": [51, 52], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [8, 1, 0.0899, 0.0035, 1, 0.81, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Base class for \"cheetah compile\" and \"cheetah fill\" unit tests.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L53_C4", "label": "srcDir =", "type": "assigned_variable", "loc": [53, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [14, 1, 0.0925, 0.0017, 1, 0.81, 0.0588, 96, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "srcDir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " srcDir = '' # Nonblank to create source directory."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L54_C4", "label": "subdirs =", "type": "assigned_variable", "loc": [54, 54], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [14, 1, 0.0942, 0.0017, 1, 0.81, 0.1176, 536, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "subdirs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " subdirs = ('child', 'child/grandkid') # Delete in reverse order."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L55_C4", "label": "srcFiles =", "type": "assigned_variable", "loc": [55, 55], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [14, 1, 0.096, 0.0017, 1, 0.81, 0.1765, 995, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "srcFiles", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " srcFiles = ('a.tmpl', 'child/a.tmpl', 'child/grandkid/a.tmpl')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L56_C4", "label": "expectError =", "type": "assigned_variable", "loc": [56, 56], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [14, 1, 0.0977, 0.0017, 1, 0.81, 0.2353, 478, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "expectError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expectError = False # Used by --list option."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L58_C4", "label": "inform", "type": "function", "loc": [58, 60], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [2, 1, 0.103, 0.0052, 1, 0.81, 0.2941, 515, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "inform", "arg_names": ["self", "message"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def inform(self, message):\n if self.verbose:\n print(message)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L59_C8", "label": "if", "type": "if", "loc": [59, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L58_C4", "vector": [4, 2, 0.1038, 0.0035, 2, 0.38, 0.0, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.verbose:\n print(message)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L60_C12", "label": "print()", "type": "expression", "loc": [60, 60], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L59_C8", "vector": [8, 3, 0.1047, 0.0017, 3, 0.4, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(message)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "label": "setUp", "type": "function", "loc": [62, 81], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [2, 1, 0.1248, 0.0349, 1, 0.81, 0.3529, 952, 0, 1, 0, 0, 0, 0, 9], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n \"\"\"Create the top-level directories, subdirectories and .tmpl\n files.\n \"\"\"\n I = self.inform\n # Step 1: Create the scratch directory and chdir into it.\n self.scratchDir = scratchDir = tempfile.mktemp() \n os.mkdir(scratchDir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L63_C8", "label": "expression", "type": "expression", "loc": [63, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "vector": [8, 2, 0.1117, 0.0052, 2, 0.26, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Create the top-level directories, subdirectories and .tmpl\n files.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L66_C8", "label": "I =", "type": "assigned_variable", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "vector": [14, 2, 0.1152, 0.0017, 2, 0.26, 0.125, 134, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "I", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " I = self.inform"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L68_C8", "label": "self.scratchDir = mktemp()", "type": "assigned_variable", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "vector": [14, 2, 0.1187, 0.0017, 2, 0.26, 0.25, 188, 3, 0, 0, 0, 357, 10, 1], "semantic": {"name": "self.scratchDir", "arg_names": [], "import_names": [], "rhs_call_name": "mktemp", "annotation": ""}, "snippet": " self.scratchDir = scratchDir = tempfile.mktemp() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L69_C8", "label": "mkdir()", "type": "expression", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "vector": [8, 2, 0.1204, 0.0017, 2, 0.26, 0.375, 853, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "mkdir", "arg_names": [], "import_names": [], "rhs_call_name": "mkdir", "annotation": ""}, "snippet": " os.mkdir(scratchDir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L70_C8", "label": "self.origCwd = getcwd()", "type": "assigned_variable", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "vector": [14, 2, 0.1222, 0.0017, 2, 0.26, 0.5, 140, 3, 0, 0, 0, 320, 10, 1], "semantic": {"name": "self.origCwd", "arg_names": [], "import_names": [], "rhs_call_name": "getcwd", "annotation": ""}, "snippet": " self.origCwd = os.getcwd()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L71_C8", "label": "chdir()", "type": "expression", "loc": [71, 71], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "vector": [8, 2, 0.1239, 0.0017, 2, 0.26, 0.625, 122, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "chdir", "arg_names": [], "import_names": [], "rhs_call_name": "chdir", "annotation": ""}, "snippet": " os.chdir(scratchDir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L72_C8", "label": "if", "type": "if", "loc": [72, 73], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "vector": [4, 2, 0.1265, 0.0035, 2, 0.26, 0.75, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.srcDir:\n os.mkdir(self.srcDir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L73_C12", "label": "mkdir()", "type": "expression", "loc": [73, 73], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L72_C8", "vector": [8, 3, 0.1274, 0.0017, 3, 0.29, 0.0, 853, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "mkdir", "arg_names": [], "import_names": [], "rhs_call_name": "mkdir", "annotation": ""}, "snippet": " os.mkdir(self.srcDir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L75_C8", "label": "for dir", "type": "for", "loc": [75, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "vector": [6, 2, 0.1318, 0.0035, 2, 0.26, 0.875, 152, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for dir in self.subdirs:\n os.mkdir(dir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L76_C12", "label": "mkdir()", "type": "expression", "loc": [76, 76], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L75_C8", "vector": [8, 3, 0.1326, 0.0017, 3, 0.02, 0.0, 853, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "mkdir", "arg_names": [], "import_names": [], "rhs_call_name": "mkdir", "annotation": ""}, "snippet": " os.mkdir(dir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L78_C8", "label": "for fil", "type": "for", "loc": [78, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "vector": [6, 2, 0.1387, 0.007, 2, 0.26, 1.0, 238, 7, 0, 0, 0, 0, 0, 3], "semantic": {"name": "fil", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for fil in self.srcFiles:\n f = open(fil, 'w')\n f.write(\"Hello, world!\\n\")\n f.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L79_C12", "label": "f = open()", "type": "assigned_variable", "loc": [79, 79], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L78_C8", "vector": [14, 3, 0.1379, 0.0017, 3, 0.29, 0.0, 899, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " f = open(fil, 'w')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L80_C12", "label": "write()", "type": "expression", "loc": [80, 80], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L78_C8", "vector": [8, 3, 0.1396, 0.0017, 3, 0.29, 0.5, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " f.write(\"Hello, world!\\n\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L81_C12", "label": "close()", "type": "expression", "loc": [81, 81], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L78_C8", "vector": [8, 3, 0.1414, 0.0017, 3, 0.29, 1.0, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " f.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L84_C4", "label": "tearDown", "type": "function", "loc": [84, 91], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [2, 1, 0.1527, 0.014, 1, 0.81, 0.4118, 530, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "tearDown", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def tearDown(self):\n os.chdir(self.origCwd)\n if DELETE:\n shutil.rmtree(self.scratchDir, True) # Ignore errors.\n if os.path.exists(self.scratchDir):\n warn(\"Warning: unable to delete scratch directory %s\")\n else:\n warn(\"Warning: not deleting scratch directory %s\" % self.scratchDir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L85_C8", "label": "chdir()", "type": "expression", "loc": [85, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L84_C4", "vector": [8, 2, 0.1483, 0.0017, 2, 0.55, 0.0, 122, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "chdir", "arg_names": [], "import_names": [], "rhs_call_name": "chdir", "annotation": ""}, "snippet": " os.chdir(self.origCwd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L86_C8", "label": "if", "type": "if", "loc": [86, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L84_C4", "vector": [4, 2, 0.1545, 0.0105, 2, 0.55, 1.0, 0, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if DELETE:\n shutil.rmtree(self.scratchDir, True) # Ignore errors.\n if os.path.exists(self.scratchDir):\n warn(\"Warning: unable to delete scratch directory %s\")\n else:\n warn(\"Warning: not deleting scratch directory %s\" % self.scratchDir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L87_C12", "label": "rmtree()", "type": "expression", "loc": [87, 87], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L86_C8", "vector": [8, 3, 0.1518, 0.0017, 3, 0.37, 0.0, 317, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "rmtree", "arg_names": [], "import_names": [], "rhs_call_name": "rmtree", "annotation": ""}, "snippet": " shutil.rmtree(self.scratchDir, True) # Ignore errors."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L88_C12", "label": "if", "type": "if", "loc": [88, 89], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L86_C8", "vector": [4, 3, 0.1545, 0.0035, 3, 0.37, 0.5, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if os.path.exists(self.scratchDir):\n warn(\"Warning: unable to delete scratch directory %s\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L89_C16", "label": "warn()", "type": "expression", "loc": [89, 89], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L88_C12", "vector": [8, 4, 0.1553, 0.0017, 4, 0.87, 0.0, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " warn(\"Warning: unable to delete scratch directory %s\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L91_C12", "label": "warn()", "type": "expression", "loc": [91, 91], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L86_C8", "vector": [8, 3, 0.1588, 0.0017, 3, 0.37, 1.0, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " warn(\"Warning: not deleting scratch directory %s\" % self.scratchDir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "label": "_checkDestFileHelper", "type": "function", "loc": [94, 118], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [2, 1, 0.185, 0.0436, 1, 0.81, 0.4706, 932, 0, 5, 0, 0, 0, 0, 9], "semantic": {"name": "_checkDestFileHelper", "arg_names": ["self", "path", "expected", "allowSurroundingText", "errmsg"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _checkDestFileHelper(self, path, expected, \n allowSurroundingText, errmsg):\n \"\"\"Low-level helper to check a destination file.\n\n in : path, string, the destination path.\n expected, string, the expected contents.\n allowSurroundingtext, bool, allow the result to contain\n additional text around the 'expected' substring?"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L96_C8", "label": "expression", "type": "expression", "loc": [96, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "vector": [8, 2, 0.1754, 0.0175, 2, 0.94, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Low-level helper to check a destination file.\n\n in : path, string, the destination path.\n expected, string, the expected contents.\n allowSurroundingtext, bool, allow the result to contain\n additional text around the 'expected' substring?\n errmsg, string, the error message. It may contain the\n following \"%\"-operator keys: path, expected, result."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L106_C8", "label": "path = abspath()", "type": "assigned_variable", "loc": [106, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "vector": [14, 2, 0.185, 0.0017, 2, 0.94, 0.1, 358, 3, 1, 0, 0, 142, 10, 1], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "abspath", "annotation": ""}, "snippet": " path = os.path.abspath(path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L107_C8", "label": "exists = exists()", "type": "assigned_variable", "loc": [107, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "vector": [14, 2, 0.1867, 0.0017, 2, 0.94, 0.2, 829, 3, 1, 0, 0, 829, 10, 1], "semantic": {"name": "exists", "arg_names": [], "import_names": [], "rhs_call_name": "exists", "annotation": ""}, "snippet": " exists = os.path.exists(path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L108_C8", "label": "msg =", "type": "assigned_variable", "loc": [108, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "vector": [14, 2, 0.1885, 0.0017, 2, 0.94, 0.3, 712, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "msg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " msg = \"destination file missing: %s\" % path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L109_C8", "label": "failUnless()", "type": "expression", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "vector": [8, 2, 0.1902, 0.0017, 2, 0.94, 0.4, 252, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "failUnless", "arg_names": [], "import_names": [], "rhs_call_name": "failUnless", "annotation": ""}, "snippet": " self.failUnless(exists, msg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L110_C8", "label": "f = open()", "type": "assigned_variable", "loc": [110, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "vector": [14, 2, 0.192, 0.0017, 2, 0.94, 0.5, 899, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " f = open(path, 'r')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L111_C8", "label": "result = read()", "type": "assigned_variable", "loc": [111, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "vector": [14, 2, 0.1937, 0.0017, 2, 0.94, 0.6, 51, 3, 0, 0, 0, 453, 10, 1], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " result = f.read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L112_C8", "label": "close()", "type": "expression", "loc": [112, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "vector": [8, 2, 0.1955, 0.0017, 2, 0.94, 0.7, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " f.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L113_C8", "label": "if", "type": "if", "loc": [113, 116], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "vector": [4, 2, 0.1998, 0.007, 2, 0.94, 0.8, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if allowSurroundingText:\n success = result.find(expected) != -1\n else:\n success = result == expected"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L114_C12", "label": "success =", "type": "assigned_variable", "loc": [114, 114], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L113_C8", "vector": [14, 3, 0.199, 0.0017, 3, 0.81, 0.0, 761, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "success", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " success = result.find(expected) != -1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L116_C12", "label": "success =", "type": "assigned_variable", "loc": [116, 116], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L113_C8", "vector": [14, 3, 0.2024, 0.0017, 3, 0.81, 1.0, 761, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "success", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " success = result == expected"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L117_C8", "label": "msg =", "type": "assigned_variable", "loc": [117, 117], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "vector": [14, 2, 0.2042, 0.0017, 2, 0.94, 0.9, 712, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "msg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " msg = errmsg % locals()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L118_C8", "label": "failUnless()", "type": "expression", "loc": [118, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "vector": [8, 2, 0.2059, 0.0017, 2, 0.94, 1.0, 252, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "failUnless", "arg_names": [], "import_names": [], "rhs_call_name": "failUnless", "annotation": ""}, "snippet": " self.failUnless(success, msg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L121_C4", "label": "checkCompile", "type": "function", "loc": [121, 128], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [2, 1, 0.2173, 0.014, 1, 0.81, 0.5294, 787, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": ["self", "path"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def checkCompile(self, path):\n # Raw string to prevent \"\\n\" from being converted to a newline.\n #expected = R\"write('Hello, world!\\n')\"\n expected = \"Hello, world!\" # might output a u'' string\n errmsg = \"\"\"\\\ndestination file %(path)s doesn't contain expected substring:\n%(expected)r\"\"\"\n self._checkDestFileHelper(path, expected, True, errmsg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L124_C8", "label": "expected =", "type": "assigned_variable", "loc": [124, 124], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L121_C4", "vector": [14, 2, 0.2164, 0.0017, 2, 0.23, 0.0, 361, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "expected", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expected = \"Hello, world!\" # might output a u'' string"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L125_C8", "label": "errmsg =", "type": "assigned_variable", "loc": [125, 127], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L121_C4", "vector": [14, 2, 0.2199, 0.0052, 2, 0.23, 0.5, 400, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "errmsg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " errmsg = \"\"\"\\\ndestination file %(path)s doesn't contain expected substring:\n%(expected)r\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L128_C8", "label": "_checkDestFileHelper()", "type": "expression", "loc": [128, 128], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L121_C4", "vector": [8, 2, 0.2234, 0.0017, 2, 0.23, 1.0, 932, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "_checkDestFileHelper", "arg_names": [], "import_names": [], "rhs_call_name": "_checkDestFileHelper", "annotation": ""}, "snippet": " self._checkDestFileHelper(path, expected, True, errmsg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L131_C4", "label": "checkFill", "type": "function", "loc": [131, 137], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [2, 1, 0.2339, 0.0122, 1, 0.81, 0.5882, 930, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": ["self", "path"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def checkFill(self, path):\n expected = \"Hello, world!\\n\"\n errmsg = \"\"\"\\\ndestination file %(path)s contains wrong result.\nExpected %(expected)r\nFound %(result)r\"\"\"\n self._checkDestFileHelper(path, expected, False, errmsg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L132_C8", "label": "expected =", "type": "assigned_variable", "loc": [132, 132], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L131_C4", "vector": [14, 2, 0.2304, 0.0017, 2, 0.16, 0.0, 361, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "expected", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expected = \"Hello, world!\\n\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L133_C8", "label": "errmsg =", "type": "assigned_variable", "loc": [133, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L131_C4", "vector": [14, 2, 0.2347, 0.007, 2, 0.16, 0.5, 400, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "errmsg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " errmsg = \"\"\"\\\ndestination file %(path)s contains wrong result.\nExpected %(expected)r\nFound %(result)r\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L137_C8", "label": "_checkDestFileHelper()", "type": "expression", "loc": [137, 137], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L131_C4", "vector": [8, 2, 0.2391, 0.0017, 2, 0.16, 1.0, 932, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "_checkDestFileHelper", "arg_names": [], "import_names": [], "rhs_call_name": "_checkDestFileHelper", "annotation": ""}, "snippet": " self._checkDestFileHelper(path, expected, False, errmsg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "label": "checkSubdirPyInit", "type": "function", "loc": [140, 150], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [2, 1, 0.2531, 0.0192, 1, 0.81, 0.6471, 238, 0, 2, 0, 0, 0, 0, 5], "semantic": {"name": "checkSubdirPyInit", "arg_names": ["self", "path"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def checkSubdirPyInit(self, path):\n \"\"\"Verify a destination subdirectory exists and contains an\n __init__.py file.\n \"\"\"\n exists = os.path.exists(path)\n msg = \"destination subdirectory %s misssing\" % path\n self.failUnless(exists, msg)\n initPath = os.path.join(path, \"__init__.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L141_C8", "label": "expression", "type": "expression", "loc": [141, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "vector": [8, 2, 0.2478, 0.0052, 2, 0.28, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Verify a destination subdirectory exists and contains an\n __init__.py file.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L144_C8", "label": "exists = exists()", "type": "assigned_variable", "loc": [144, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "vector": [14, 2, 0.2513, 0.0017, 2, 0.28, 0.1429, 829, 3, 1, 0, 0, 829, 10, 1], "semantic": {"name": "exists", "arg_names": [], "import_names": [], "rhs_call_name": "exists", "annotation": ""}, "snippet": " exists = os.path.exists(path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L145_C8", "label": "msg =", "type": "assigned_variable", "loc": [145, 145], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "vector": [14, 2, 0.2531, 0.0017, 2, 0.28, 0.2857, 712, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "msg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " msg = \"destination subdirectory %s misssing\" % path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L146_C8", "label": "failUnless()", "type": "expression", "loc": [146, 146], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "vector": [8, 2, 0.2548, 0.0017, 2, 0.28, 0.4286, 252, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "failUnless", "arg_names": [], "import_names": [], "rhs_call_name": "failUnless", "annotation": ""}, "snippet": " self.failUnless(exists, msg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L147_C8", "label": "initPath = join()", "type": "assigned_variable", "loc": [147, 147], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "vector": [14, 2, 0.2565, 0.0017, 2, 0.28, 0.5714, 603, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "initPath", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " initPath = os.path.join(path, \"__init__.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L148_C8", "label": "exists = exists()", "type": "assigned_variable", "loc": [148, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "vector": [14, 2, 0.2583, 0.0017, 2, 0.28, 0.7143, 829, 3, 1, 0, 0, 829, 10, 1], "semantic": {"name": "exists", "arg_names": [], "import_names": [], "rhs_call_name": "exists", "annotation": ""}, "snippet": " exists = os.path.exists(initPath)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L149_C8", "label": "msg =", "type": "assigned_variable", "loc": [149, 149], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "vector": [14, 2, 0.26, 0.0017, 2, 0.28, 0.8571, 712, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "msg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " msg = \"destination init file missing: %s\" % initPath"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L150_C8", "label": "failUnless()", "type": "expression", "loc": [150, 150], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "vector": [8, 2, 0.2618, 0.0017, 2, 0.28, 1.0, 252, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "failUnless", "arg_names": [], "import_names": [], "rhs_call_name": "failUnless", "annotation": ""}, "snippet": " self.failUnless(exists, msg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L153_C4", "label": "checkNoBackup", "type": "function", "loc": [153, 158], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [2, 1, 0.2714, 0.0105, 1, 0.81, 0.7059, 72, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "checkNoBackup", "arg_names": ["self", "path"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def checkNoBackup(self, path):\n \"\"\"Verify 'path' does not exist. (To check --nobackup.)\n \"\"\"\n exists = os.path.exists(path)\n msg = \"backup file exists in spite of --nobackup: %s\" % path\n self.failIf(exists, msg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L154_C8", "label": "expression", "type": "expression", "loc": [154, 155], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L153_C4", "vector": [8, 2, 0.2696, 0.0035, 2, 0.14, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Verify 'path' does not exist. (To check --nobackup.)\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L156_C8", "label": "exists = exists()", "type": "assigned_variable", "loc": [156, 156], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L153_C4", "vector": [14, 2, 0.2723, 0.0017, 2, 0.14, 0.3333, 829, 3, 1, 0, 0, 829, 10, 1], "semantic": {"name": "exists", "arg_names": [], "import_names": [], "rhs_call_name": "exists", "annotation": ""}, "snippet": " exists = os.path.exists(path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L157_C8", "label": "msg =", "type": "assigned_variable", "loc": [157, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L153_C4", "vector": [14, 2, 0.274, 0.0017, 2, 0.14, 0.6667, 712, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "msg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " msg = \"backup file exists in spite of --nobackup: %s\" % path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L158_C8", "label": "failIf()", "type": "expression", "loc": [158, 158], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L153_C4", "vector": [8, 2, 0.2757, 0.0017, 2, 0.14, 1.0, 360, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "failIf", "arg_names": [], "import_names": [], "rhs_call_name": "failIf", "annotation": ""}, "snippet": " self.failIf(exists, msg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L160_C4", "label": "locate_command", "type": "function", "loc": [160, 170], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [2, 1, 0.288, 0.0192, 1, 0.81, 0.7647, 542, 0, 2, 1, 0, 0, 0, 6], "semantic": {"name": "locate_command", "arg_names": ["self", "cmd"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def locate_command(self, cmd):\n paths = os.getenv('PATH')\n if not paths:\n return cmd\n parts = cmd.split(' ')\n paths = paths.split(':')\n for p in paths:\n p = p + os.path.sep + parts[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L161_C8", "label": "paths = getenv()", "type": "assigned_variable", "loc": [161, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L160_C4", "vector": [14, 2, 0.281, 0.0017, 2, 0.03, 0.0, 270, 3, 1, 0, 0, 611, 10, 1], "semantic": {"name": "paths", "arg_names": [], "import_names": [], "rhs_call_name": "getenv", "annotation": ""}, "snippet": " paths = os.getenv('PATH')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L162_C8", "label": "if", "type": "if", "loc": [162, 163], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L160_C4", "vector": [4, 2, 0.2836, 0.0035, 2, 0.03, 0.2, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not paths:\n return cmd"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Return_L163_C12", "label": "return", "type": "return", "loc": [163, 163], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L162_C8", "vector": [13, 3, 0.2845, 0.0017, 3, 0.21, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return cmd"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L164_C8", "label": "parts = split()", "type": "assigned_variable", "loc": [164, 164], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L160_C4", "vector": [14, 2, 0.2862, 0.0017, 2, 0.03, 0.4, 13, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "parts", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " parts = cmd.split(' ')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L165_C8", "label": "paths = split()", "type": "assigned_variable", "loc": [165, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L160_C4", "vector": [14, 2, 0.288, 0.0017, 2, 0.03, 0.6, 270, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "paths", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " paths = paths.split(':')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L166_C8", "label": "for p", "type": "for", "loc": [166, 169], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L160_C4", "vector": [6, 2, 0.2923, 0.007, 2, 0.03, 0.8, 491, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "p", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for p in paths:\n p = p + os.path.sep + parts[0]\n if os.path.isfile(p):\n return ' '.join([p] + parts[1:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L167_C12", "label": "p =", "type": "assigned_variable", "loc": [167, 167], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L166_C8", "vector": [14, 3, 0.2914, 0.0017, 3, 0.96, 0.0, 491, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "p", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " p = p + os.path.sep + parts[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L168_C12", "label": "if", "type": "if", "loc": [168, 169], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L166_C8", "vector": [4, 3, 0.2941, 0.0035, 3, 0.96, 1.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if os.path.isfile(p):\n return ' '.join([p] + parts[1:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Return_L169_C16", "label": "return", "type": "return", "loc": [169, 169], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L168_C12", "vector": [13, 4, 0.2949, 0.0017, 4, 0.07, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ' '.join([p] + parts[1:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Return_L170_C8", "label": "return", "type": "return", "loc": [170, 170], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L160_C4", "vector": [13, 2, 0.2967, 0.0017, 2, 0.03, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ' '.join(parts)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L172_C4", "label": "assertWin32Subprocess", "type": "function", "loc": [172, 179], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [2, 1, 0.3063, 0.014, 1, 0.81, 0.8235, 911, 0, 2, 1, 0, 0, 0, 4], "semantic": {"name": "assertWin32Subprocess", "arg_names": ["self", "cmd"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def assertWin32Subprocess(self, cmd):\n _in, _out = os.popen4(cmd)\n _in.close()\n output = _out.read()\n rc = _out.close()\n if rc is None:\n rc = 0\n return rc, output"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L173_C8", "label": "_in, _out = popen4()", "type": "assigned_variable", "loc": [173, 173], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L172_C4", "vector": [14, 2, 0.3019, 0.0017, 2, 0.13, 0.0, 979, 3, 1, 0, 0, 954, 10, 1], "semantic": {"name": "_in, _out", "arg_names": [], "import_names": [], "rhs_call_name": "popen4", "annotation": ""}, "snippet": " _in, _out = os.popen4(cmd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L174_C8", "label": "close()", "type": "expression", "loc": [174, 174], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L172_C4", "vector": [8, 2, 0.3037, 0.0017, 2, 0.13, 0.2, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " _in.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L175_C8", "label": "output = read()", "type": "assigned_variable", "loc": [175, 175], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L172_C4", "vector": [14, 2, 0.3054, 0.0017, 2, 0.13, 0.4, 886, 3, 0, 0, 0, 453, 10, 1], "semantic": {"name": "output", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " output = _out.read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L176_C8", "label": "rc = close()", "type": "assigned_variable", "loc": [176, 176], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L172_C4", "vector": [14, 2, 0.3072, 0.0017, 2, 0.13, 0.6, 401, 3, 0, 0, 0, 77, 10, 1], "semantic": {"name": "rc", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " rc = _out.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L177_C8", "label": "if", "type": "if", "loc": [177, 178], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L172_C4", "vector": [4, 2, 0.3098, 0.0035, 2, 0.13, 0.8, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if rc is None:\n rc = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L178_C12", "label": "rc =", "type": "assigned_variable", "loc": [178, 178], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L177_C8", "vector": [14, 3, 0.3106, 0.0017, 3, 0.53, 0.0, 401, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "rc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rc = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Return_L179_C8", "label": "return", "type": "return", "loc": [179, 179], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L172_C4", "vector": [13, 2, 0.3124, 0.0017, 2, 0.13, 1.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return rc, output"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L181_C4", "label": "assertPosixSubprocess", "type": "function", "loc": [181, 188], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [2, 1, 0.322, 0.014, 1, 0.81, 0.8824, 632, 0, 2, 1, 0, 0, 0, 6], "semantic": {"name": "assertPosixSubprocess", "arg_names": ["self", "cmd"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def assertPosixSubprocess(self, cmd):\n cmd = self.locate_command(cmd)\n process = Popen4(cmd, env=os.environ)\n process.tochild.close()\n output = process.fromchild.read()\n status = process.wait()\n process.fromchild.close()\n return status, output"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L182_C8", "label": "cmd = locate_command()", "type": "assigned_variable", "loc": [182, 182], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L181_C4", "vector": [14, 2, 0.3176, 0.0017, 2, 0.68, 0.0, 604, 3, 1, 0, 0, 542, 10, 1], "semantic": {"name": "cmd", "arg_names": [], "import_names": [], "rhs_call_name": "locate_command", "annotation": ""}, "snippet": " cmd = self.locate_command(cmd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L183_C8", "label": "process = Popen4()", "type": "assigned_variable", "loc": [183, 183], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L181_C4", "vector": [14, 2, 0.3194, 0.0017, 2, 0.68, 0.1667, 712, 3, 2, 0, 0, 457, 10, 1], "semantic": {"name": "process", "arg_names": [], "import_names": [], "rhs_call_name": "Popen4", "annotation": ""}, "snippet": " process = Popen4(cmd, env=os.environ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L184_C8", "label": "close()", "type": "expression", "loc": [184, 184], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L181_C4", "vector": [8, 2, 0.3211, 0.0017, 2, 0.68, 0.3333, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " process.tochild.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L185_C8", "label": "output = read()", "type": "assigned_variable", "loc": [185, 185], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L181_C4", "vector": [14, 2, 0.3229, 0.0017, 2, 0.68, 0.5, 886, 3, 0, 0, 0, 453, 10, 1], "semantic": {"name": "output", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " output = process.fromchild.read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L186_C8", "label": "status = wait()", "type": "assigned_variable", "loc": [186, 186], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L181_C4", "vector": [14, 2, 0.3246, 0.0017, 2, 0.68, 0.6667, 699, 3, 0, 0, 0, 243, 10, 1], "semantic": {"name": "status", "arg_names": [], "import_names": [], "rhs_call_name": "wait", "annotation": ""}, "snippet": " status = process.wait()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L187_C8", "label": "close()", "type": "expression", "loc": [187, 187], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L181_C4", "vector": [8, 2, 0.3264, 0.0017, 2, 0.68, 0.8333, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " process.fromchild.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Return_L188_C8", "label": "return", "type": "return", "loc": [188, 188], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L181_C4", "vector": [13, 2, 0.3281, 0.0017, 2, 0.68, 1.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return status, output"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L190_C4", "label": "assertSubprocess", "type": "function", "loc": [190, 203], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [2, 1, 0.3429, 0.0244, 1, 0.81, 0.9412, 429, 0, 3, 1, 0, 0, 0, 4], "semantic": {"name": "assertSubprocess", "arg_names": ["self", "cmd", "nonzero"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def assertSubprocess(self, cmd, nonzero=False):\n status, output = None, None\n if sys.platform == 'win32':\n status, output = self.assertWin32Subprocess(cmd)\n else:\n status, output = self.assertPosixSubprocess(cmd)\n\n if not nonzero:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L191_C8", "label": "status, output =", "type": "assigned_variable", "loc": [191, 191], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L190_C4", "vector": [14, 2, 0.3333, 0.0017, 2, 0.11, 0.0, 650, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "status, output", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " status, output = None, None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L192_C8", "label": "if", "type": "if", "loc": [192, 195], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L190_C4", "vector": [4, 2, 0.3377, 0.007, 2, 0.11, 0.3333, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if sys.platform == 'win32':\n status, output = self.assertWin32Subprocess(cmd)\n else:\n status, output = self.assertPosixSubprocess(cmd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L193_C12", "label": "status, output = assertWin32Subprocess()", "type": "assigned_variable", "loc": [193, 193], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L192_C8", "vector": [14, 3, 0.3368, 0.0017, 3, 0.34, 0.0, 650, 3, 1, 0, 0, 911, 10, 1], "semantic": {"name": "status, output", "arg_names": [], "import_names": [], "rhs_call_name": "assertWin32Subprocess", "annotation": ""}, "snippet": " status, output = self.assertWin32Subprocess(cmd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L195_C12", "label": "status, output = assertPosixSubprocess()", "type": "assigned_variable", "loc": [195, 195], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L192_C8", "vector": [14, 3, 0.3403, 0.0017, 3, 0.34, 1.0, 650, 3, 1, 0, 0, 632, 10, 1], "semantic": {"name": "status, output", "arg_names": [], "import_names": [], "rhs_call_name": "assertPosixSubprocess", "annotation": ""}, "snippet": " status, output = self.assertPosixSubprocess(cmd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L197_C8", "label": "if", "type": "if", "loc": [197, 202], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L190_C4", "vector": [4, 2, 0.3482, 0.0105, 2, 0.11, 0.6667, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not nonzero:\n self.failUnlessEqual(status, 0, '''Subprocess exited with a non-zero status (%d)\n %s''' % (status, output))\n else:\n self.failIfEqual(status, 0, '''Subprocess exited with a zero status (%d)\n %s''' % (status, output))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L198_C12", "label": "failUnlessEqual()", "type": "expression", "loc": [198, 199], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L197_C8", "vector": [8, 3, 0.3464, 0.0035, 3, 0.46, 0.0, 21, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "failUnlessEqual", "arg_names": [], "import_names": [], "rhs_call_name": "failUnlessEqual", "annotation": ""}, "snippet": " self.failUnlessEqual(status, 0, '''Subprocess exited with a non-zero status (%d)\n %s''' % (status, output))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L201_C12", "label": "failIfEqual()", "type": "expression", "loc": [201, 202], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L197_C8", "vector": [8, 3, 0.3517, 0.0035, 3, 0.46, 1.0, 443, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "failIfEqual", "arg_names": [], "import_names": [], "rhs_call_name": "failIfEqual", "annotation": ""}, "snippet": " self.failIfEqual(status, 0, '''Subprocess exited with a zero status (%d)\n %s''' % (status, output))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Return_L203_C8", "label": "return", "type": "return", "loc": [203, 203], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L190_C4", "vector": [13, 2, 0.3543, 0.0017, 2, 0.11, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return output "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L205_C4", "label": "go", "type": "function", "loc": [205, 221], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "vector": [2, 1, 0.3717, 0.0297, 1, 0.81, 1.0, 917, 0, 4, 0, 0, 0, 0, 3], "semantic": {"name": "go", "arg_names": ["self", "cmd", "expectedStatus", "expectedOutputSubstring"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def go(self, cmd, expectedStatus=0, expectedOutputSubstring=None):\n \"\"\"Run a \"cheetah compile\" or \"cheetah fill\" subcommand.\n\n in : cmd, string, the command to run.\n expectedStatus, int, subcommand's expected output status.\n 0 if the subcommand is expected to succeed, 1-255 otherwise.\n expectedOutputSubstring, string, substring which much appear\n in the standard output or standard error. None to skip this"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L206_C8", "label": "expression", "type": "expression", "loc": [206, 215], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L205_C4", "vector": [8, 2, 0.3674, 0.0175, 2, 0.46, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Run a \"cheetah compile\" or \"cheetah fill\" subcommand.\n\n in : cmd, string, the command to run.\n expectedStatus, int, subcommand's expected output status.\n 0 if the subcommand is expected to succeed, 1-255 otherwise.\n expectedOutputSubstring, string, substring which much appear\n in the standard output or standard error. None to skip this\n test."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L216_C8", "label": "output = assertSubprocess()", "type": "assigned_variable", "loc": [216, 216], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L205_C4", "vector": [14, 2, 0.377, 0.0017, 2, 0.46, 0.5, 886, 3, 1, 0, 0, 429, 10, 1], "semantic": {"name": "output", "arg_names": [], "import_names": [], "rhs_call_name": "assertSubprocess", "annotation": ""}, "snippet": " output = self.assertSubprocess(cmd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L217_C8", "label": "if", "type": "if", "loc": [217, 221], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L205_C4", "vector": [4, 2, 0.3822, 0.0087, 2, 0.46, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if expectedOutputSubstring is not None:\n msg = \"substring %r not found in subcommand output: %s\" % \\\n (expectedOutputSubstring, cmd)\n substringTest = output.find(expectedOutputSubstring) != -1\n self.failUnless(substringTest, msg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L218_C12", "label": "msg =", "type": "assigned_variable", "loc": [218, 219], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L217_C8", "vector": [14, 3, 0.3813, 0.0035, 3, 0.67, 0.0, 712, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "msg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " msg = \"substring %r not found in subcommand output: %s\" % \\\n (expectedOutputSubstring, cmd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L220_C12", "label": "substringTest =", "type": "assigned_variable", "loc": [220, 220], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L217_C8", "vector": [14, 3, 0.3839, 0.0017, 3, 0.67, 0.5, 392, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "substringTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " substringTest = output.find(expectedOutputSubstring) != -1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L221_C12", "label": "failUnless()", "type": "expression", "loc": [221, 221], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L217_C8", "vector": [8, 3, 0.3857, 0.0017, 3, 0.67, 1.0, 252, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "failUnless", "arg_names": [], "import_names": [], "rhs_call_name": "failUnless", "annotation": ""}, "snippet": " self.failUnless(substringTest, msg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L224_C0", "label": "CFIdirBase", "type": "class", "loc": [224, 229], "level": 0, "parent": null, "vector": [3, 0, 0.3953, 0.0105, 0, 0.66, 0.4595, 84, 0, 0, 0, 0, 157, 0, 0], "semantic": {"name": "CFIdirBase", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CFIdirBase(CFBase):\n \"\"\"Subclass for tests with --idir.\n \"\"\"\n srcDir = 'SRC'\n subdirs = ('SRC/child', 'SRC/child/grandkid') # Delete in reverse order.\n srcFiles = ('SRC/a.tmpl', 'SRC/child/a.tmpl', 'SRC/child/grandkid/a.tmpl')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L225_C4", "label": "expression", "type": "expression", "loc": [225, 226], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L224_C0", "vector": [8, 1, 0.3935, 0.0035, 1, 0.9, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Subclass for tests with --idir.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L227_C4", "label": "srcDir =", "type": "assigned_variable", "loc": [227, 227], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L224_C0", "vector": [14, 1, 0.3962, 0.0017, 1, 0.9, 0.3333, 96, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "srcDir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " srcDir = 'SRC'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L228_C4", "label": "subdirs =", "type": "assigned_variable", "loc": [228, 228], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L224_C0", "vector": [14, 1, 0.3979, 0.0017, 1, 0.9, 0.6667, 536, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "subdirs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " subdirs = ('SRC/child', 'SRC/child/grandkid') # Delete in reverse order."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L229_C4", "label": "srcFiles =", "type": "assigned_variable", "loc": [229, 229], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L224_C0", "vector": [14, 1, 0.3997, 0.0017, 1, 0.9, 1.0, 995, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "srcFiles", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " srcFiles = ('SRC/a.tmpl', 'SRC/child/a.tmpl', 'SRC/child/grandkid/a.tmpl')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L236_C0", "label": "OneFile", "type": "class", "loc": [236, 247], "level": 0, "parent": null, "vector": [3, 0, 0.4215, 0.0209, 0, 0.66, 0.4865, 45, 0, 3, 0, 0, 157, 0, 6], "semantic": {"name": "OneFile", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class OneFile(CFBase):\n def testCompile(self):\n self.go(\"cheetah compile a.tmpl\")\n self.checkCompile(\"a.py\")\n\n def testFill(self):\n self.go(\"cheetah fill a.tmpl\")\n self.checkFill(\"a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L237_C4", "label": "testCompile", "type": "function", "loc": [237, 239], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L236_C0", "vector": [2, 1, 0.4154, 0.0052, 1, 0.99, 0.0, 943, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.go(\"cheetah compile a.tmpl\")\n self.checkCompile(\"a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L238_C8", "label": "go()", "type": "expression", "loc": [238, 238], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L237_C4", "vector": [8, 2, 0.4154, 0.0017, 2, 0.51, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah compile a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L239_C8", "label": "checkCompile()", "type": "expression", "loc": [239, 239], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L237_C4", "vector": [8, 2, 0.4171, 0.0017, 2, 0.51, 1.0, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L241_C4", "label": "testFill", "type": "function", "loc": [241, 243], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L236_C0", "vector": [2, 1, 0.4223, 0.0052, 1, 0.99, 0.5, 447, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.go(\"cheetah fill a.tmpl\")\n self.checkFill(\"a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L242_C8", "label": "go()", "type": "expression", "loc": [242, 242], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L241_C4", "vector": [8, 2, 0.4223, 0.0017, 2, 0.96, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L243_C8", "label": "checkFill()", "type": "expression", "loc": [243, 243], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L241_C4", "vector": [8, 2, 0.4241, 0.0017, 2, 0.96, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L245_C4", "label": "testText", "type": "function", "loc": [245, 247], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L236_C0", "vector": [2, 1, 0.4293, 0.0052, 1, 0.99, 1.0, 153, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.go(\"cheetah fill --oext txt a.tmpl\")\n self.checkFill(\"a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L246_C8", "label": "go()", "type": "expression", "loc": [246, 246], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L245_C4", "vector": [8, 2, 0.4293, 0.0017, 2, 0.39, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill --oext txt a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L247_C8", "label": "checkFill()", "type": "expression", "loc": [247, 247], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L245_C4", "vector": [8, 2, 0.4311, 0.0017, 2, 0.39, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L250_C0", "label": "OneFileNoExtension", "type": "class", "loc": [250, 261], "level": 0, "parent": null, "vector": [3, 0, 0.4459, 0.0209, 0, 0.66, 0.5135, 744, 0, 3, 0, 0, 157, 0, 6], "semantic": {"name": "OneFileNoExtension", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class OneFileNoExtension(CFBase):\n def testCompile(self):\n self.go(\"cheetah compile a\")\n self.checkCompile(\"a.py\")\n\n def testFill(self):\n self.go(\"cheetah fill a\")\n self.checkFill(\"a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L251_C4", "label": "testCompile", "type": "function", "loc": [251, 253], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L250_C0", "vector": [2, 1, 0.4398, 0.0052, 1, 0.82, 0.0, 943, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.go(\"cheetah compile a\")\n self.checkCompile(\"a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L252_C8", "label": "go()", "type": "expression", "loc": [252, 252], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L251_C4", "vector": [8, 2, 0.4398, 0.0017, 2, 0.53, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah compile a\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L253_C8", "label": "checkCompile()", "type": "expression", "loc": [253, 253], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L251_C4", "vector": [8, 2, 0.4415, 0.0017, 2, 0.53, 1.0, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L255_C4", "label": "testFill", "type": "function", "loc": [255, 257], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L250_C0", "vector": [2, 1, 0.4468, 0.0052, 1, 0.82, 0.5, 447, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.go(\"cheetah fill a\")\n self.checkFill(\"a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L256_C8", "label": "go()", "type": "expression", "loc": [256, 256], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L255_C4", "vector": [8, 2, 0.4468, 0.0017, 2, 0.03, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill a\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L257_C8", "label": "checkFill()", "type": "expression", "loc": [257, 257], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L255_C4", "vector": [8, 2, 0.4485, 0.0017, 2, 0.03, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L259_C4", "label": "testText", "type": "function", "loc": [259, 261], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L250_C0", "vector": [2, 1, 0.4538, 0.0052, 1, 0.82, 1.0, 153, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.go(\"cheetah fill --oext txt a\")\n self.checkFill(\"a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L260_C8", "label": "go()", "type": "expression", "loc": [260, 260], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L259_C4", "vector": [8, 2, 0.4538, 0.0017, 2, 0.54, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill --oext txt a\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L261_C8", "label": "checkFill()", "type": "expression", "loc": [261, 261], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L259_C4", "vector": [8, 2, 0.4555, 0.0017, 2, 0.54, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L264_C0", "label": "SplatTmpl", "type": "class", "loc": [264, 275], "level": 0, "parent": null, "vector": [3, 0, 0.4703, 0.0209, 0, 0.66, 0.5405, 442, 0, 3, 0, 0, 157, 0, 6], "semantic": {"name": "SplatTmpl", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class SplatTmpl(CFBase):\n def testCompile(self):\n self.go(\"cheetah compile *.tmpl\")\n self.checkCompile(\"a.py\")\n\n def testFill(self):\n self.go(\"cheetah fill *.tmpl\")\n self.checkFill(\"a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L265_C4", "label": "testCompile", "type": "function", "loc": [265, 267], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L264_C0", "vector": [2, 1, 0.4642, 0.0052, 1, 0.92, 0.0, 943, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.go(\"cheetah compile *.tmpl\")\n self.checkCompile(\"a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L266_C8", "label": "go()", "type": "expression", "loc": [266, 266], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L265_C4", "vector": [8, 2, 0.4642, 0.0017, 2, 0.59, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah compile *.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L267_C8", "label": "checkCompile()", "type": "expression", "loc": [267, 267], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L265_C4", "vector": [8, 2, 0.466, 0.0017, 2, 0.59, 1.0, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L269_C4", "label": "testFill", "type": "function", "loc": [269, 271], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L264_C0", "vector": [2, 1, 0.4712, 0.0052, 1, 0.92, 0.5, 447, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.go(\"cheetah fill *.tmpl\")\n self.checkFill(\"a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L270_C8", "label": "go()", "type": "expression", "loc": [270, 270], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L269_C4", "vector": [8, 2, 0.4712, 0.0017, 2, 0.32, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill *.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L271_C8", "label": "checkFill()", "type": "expression", "loc": [271, 271], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L269_C4", "vector": [8, 2, 0.4729, 0.0017, 2, 0.32, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L273_C4", "label": "testText", "type": "function", "loc": [273, 275], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L264_C0", "vector": [2, 1, 0.4782, 0.0052, 1, 0.92, 1.0, 153, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.go(\"cheetah fill --oext txt *.tmpl\")\n self.checkFill(\"a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L274_C8", "label": "go()", "type": "expression", "loc": [274, 274], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L273_C4", "vector": [8, 2, 0.4782, 0.0017, 2, 0.42, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill --oext txt *.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L275_C8", "label": "checkFill()", "type": "expression", "loc": [275, 275], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L273_C4", "vector": [8, 2, 0.4799, 0.0017, 2, 0.42, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L277_C0", "label": "ThreeFilesWithSubdirectories", "type": "class", "loc": [277, 294], "level": 0, "parent": null, "vector": [3, 0, 0.4983, 0.0314, 0, 0.66, 0.5676, 102, 0, 3, 0, 0, 157, 0, 12], "semantic": {"name": "ThreeFilesWithSubdirectories", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ThreeFilesWithSubdirectories(CFBase):\n def testCompile(self):\n self.go(\"cheetah compile a.tmpl child/a.tmpl child/grandkid/a.tmpl\")\n self.checkCompile(\"a.py\")\n self.checkCompile(\"child/a.py\")\n self.checkCompile(\"child/grandkid/a.py\")\n\n def testFill(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L278_C4", "label": "testCompile", "type": "function", "loc": [278, 282], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L277_C0", "vector": [2, 1, 0.4887, 0.0087, 1, 0.62, 0.0, 943, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.go(\"cheetah compile a.tmpl child/a.tmpl child/grandkid/a.tmpl\")\n self.checkCompile(\"a.py\")\n self.checkCompile(\"child/a.py\")\n self.checkCompile(\"child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L279_C8", "label": "go()", "type": "expression", "loc": [279, 279], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L278_C4", "vector": [8, 2, 0.4869, 0.0017, 2, 0.66, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah compile a.tmpl child/a.tmpl child/grandkid/a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L280_C8", "label": "checkCompile()", "type": "expression", "loc": [280, 280], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L278_C4", "vector": [8, 2, 0.4887, 0.0017, 2, 0.66, 0.3333, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L281_C8", "label": "checkCompile()", "type": "expression", "loc": [281, 281], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L278_C4", "vector": [8, 2, 0.4904, 0.0017, 2, 0.66, 0.6667, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"child/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L282_C8", "label": "checkCompile()", "type": "expression", "loc": [282, 282], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L278_C4", "vector": [8, 2, 0.4921, 0.0017, 2, 0.66, 1.0, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L284_C4", "label": "testFill", "type": "function", "loc": [284, 288], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L277_C0", "vector": [2, 1, 0.4991, 0.0087, 1, 0.62, 0.5, 447, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.go(\"cheetah fill a.tmpl child/a.tmpl child/grandkid/a.tmpl\")\n self.checkFill(\"a.html\")\n self.checkFill(\"child/a.html\")\n self.checkFill(\"child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L285_C8", "label": "go()", "type": "expression", "loc": [285, 285], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L284_C4", "vector": [8, 2, 0.4974, 0.0017, 2, 0.84, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill a.tmpl child/a.tmpl child/grandkid/a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L286_C8", "label": "checkFill()", "type": "expression", "loc": [286, 286], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L284_C4", "vector": [8, 2, 0.4991, 0.0017, 2, 0.84, 0.3333, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L287_C8", "label": "checkFill()", "type": "expression", "loc": [287, 287], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L284_C4", "vector": [8, 2, 0.5009, 0.0017, 2, 0.84, 0.6667, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L288_C8", "label": "checkFill()", "type": "expression", "loc": [288, 288], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L284_C4", "vector": [8, 2, 0.5026, 0.0017, 2, 0.84, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L290_C4", "label": "testText", "type": "function", "loc": [290, 294], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L277_C0", "vector": [2, 1, 0.5096, 0.0087, 1, 0.62, 1.0, 153, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.go(\"cheetah fill --oext txt a.tmpl child/a.tmpl child/grandkid/a.tmpl\")\n self.checkFill(\"a.txt\")\n self.checkFill(\"child/a.txt\")\n self.checkFill(\"child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L291_C8", "label": "go()", "type": "expression", "loc": [291, 291], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L290_C4", "vector": [8, 2, 0.5079, 0.0017, 2, 0.76, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill --oext txt a.tmpl child/a.tmpl child/grandkid/a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L292_C8", "label": "checkFill()", "type": "expression", "loc": [292, 292], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L290_C4", "vector": [8, 2, 0.5096, 0.0017, 2, 0.76, 0.3333, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L293_C8", "label": "checkFill()", "type": "expression", "loc": [293, 293], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L290_C4", "vector": [8, 2, 0.5113, 0.0017, 2, 0.76, 0.6667, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L294_C8", "label": "checkFill()", "type": "expression", "loc": [294, 294], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L290_C4", "vector": [8, 2, 0.5131, 0.0017, 2, 0.76, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L297_C0", "label": "ThreeFilesWithSubdirectoriesNoExtension", "type": "class", "loc": [297, 314], "level": 0, "parent": null, "vector": [3, 0, 0.5332, 0.0314, 0, 0.66, 0.5946, 168, 0, 3, 0, 0, 157, 0, 12], "semantic": {"name": "ThreeFilesWithSubdirectoriesNoExtension", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ThreeFilesWithSubdirectoriesNoExtension(CFBase):\n def testCompile(self):\n self.go(\"cheetah compile a child/a child/grandkid/a\")\n self.checkCompile(\"a.py\")\n self.checkCompile(\"child/a.py\")\n self.checkCompile(\"child/grandkid/a.py\")\n\n def testFill(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L298_C4", "label": "testCompile", "type": "function", "loc": [298, 302], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L297_C0", "vector": [2, 1, 0.5236, 0.0087, 1, 0.01, 0.0, 943, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.go(\"cheetah compile a child/a child/grandkid/a\")\n self.checkCompile(\"a.py\")\n self.checkCompile(\"child/a.py\")\n self.checkCompile(\"child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L299_C8", "label": "go()", "type": "expression", "loc": [299, 299], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L298_C4", "vector": [8, 2, 0.5218, 0.0017, 2, 0.43, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah compile a child/a child/grandkid/a\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L300_C8", "label": "checkCompile()", "type": "expression", "loc": [300, 300], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L298_C4", "vector": [8, 2, 0.5236, 0.0017, 2, 0.43, 0.3333, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L301_C8", "label": "checkCompile()", "type": "expression", "loc": [301, 301], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L298_C4", "vector": [8, 2, 0.5253, 0.0017, 2, 0.43, 0.6667, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"child/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L302_C8", "label": "checkCompile()", "type": "expression", "loc": [302, 302], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L298_C4", "vector": [8, 2, 0.5271, 0.0017, 2, 0.43, 1.0, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L304_C4", "label": "testFill", "type": "function", "loc": [304, 308], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L297_C0", "vector": [2, 1, 0.534, 0.0087, 1, 0.01, 0.5, 447, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.go(\"cheetah fill a child/a child/grandkid/a\")\n self.checkFill(\"a.html\")\n self.checkFill(\"child/a.html\")\n self.checkFill(\"child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L305_C8", "label": "go()", "type": "expression", "loc": [305, 305], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L304_C4", "vector": [8, 2, 0.5323, 0.0017, 2, 0.42, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill a child/a child/grandkid/a\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L306_C8", "label": "checkFill()", "type": "expression", "loc": [306, 306], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L304_C4", "vector": [8, 2, 0.534, 0.0017, 2, 0.42, 0.3333, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L307_C8", "label": "checkFill()", "type": "expression", "loc": [307, 307], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L304_C4", "vector": [8, 2, 0.5358, 0.0017, 2, 0.42, 0.6667, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L308_C8", "label": "checkFill()", "type": "expression", "loc": [308, 308], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L304_C4", "vector": [8, 2, 0.5375, 0.0017, 2, 0.42, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L310_C4", "label": "testText", "type": "function", "loc": [310, 314], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L297_C0", "vector": [2, 1, 0.5445, 0.0087, 1, 0.01, 1.0, 153, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.go(\"cheetah fill --oext txt a child/a child/grandkid/a\")\n self.checkFill(\"a.txt\")\n self.checkFill(\"child/a.txt\")\n self.checkFill(\"child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L311_C8", "label": "go()", "type": "expression", "loc": [311, 311], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L310_C4", "vector": [8, 2, 0.5428, 0.0017, 2, 0.74, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill --oext txt a child/a child/grandkid/a\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L312_C8", "label": "checkFill()", "type": "expression", "loc": [312, 312], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L310_C4", "vector": [8, 2, 0.5445, 0.0017, 2, 0.74, 0.3333, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L313_C8", "label": "checkFill()", "type": "expression", "loc": [313, 313], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L310_C4", "vector": [8, 2, 0.5462, 0.0017, 2, 0.74, 0.6667, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L314_C8", "label": "checkFill()", "type": "expression", "loc": [314, 314], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L310_C4", "vector": [8, 2, 0.548, 0.0017, 2, 0.74, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L317_C0", "label": "SplatTmplWithSubdirectories", "type": "class", "loc": [317, 334], "level": 0, "parent": null, "vector": [3, 0, 0.5681, 0.0314, 0, 0.66, 0.6216, 871, 0, 3, 0, 0, 157, 0, 12], "semantic": {"name": "SplatTmplWithSubdirectories", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class SplatTmplWithSubdirectories(CFBase):\n def testCompile(self):\n self.go(\"cheetah compile *.tmpl child/*.tmpl child/grandkid/*.tmpl\")\n self.checkCompile(\"a.py\")\n self.checkCompile(\"child/a.py\")\n self.checkCompile(\"child/grandkid/a.py\")\n\n def testFill(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L318_C4", "label": "testCompile", "type": "function", "loc": [318, 322], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L317_C0", "vector": [2, 1, 0.5585, 0.0087, 1, 0.79, 0.0, 943, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.go(\"cheetah compile *.tmpl child/*.tmpl child/grandkid/*.tmpl\")\n self.checkCompile(\"a.py\")\n self.checkCompile(\"child/a.py\")\n self.checkCompile(\"child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L319_C8", "label": "go()", "type": "expression", "loc": [319, 319], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L318_C4", "vector": [8, 2, 0.5567, 0.0017, 2, 0.43, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah compile *.tmpl child/*.tmpl child/grandkid/*.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L320_C8", "label": "checkCompile()", "type": "expression", "loc": [320, 320], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L318_C4", "vector": [8, 2, 0.5585, 0.0017, 2, 0.43, 0.3333, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L321_C8", "label": "checkCompile()", "type": "expression", "loc": [321, 321], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L318_C4", "vector": [8, 2, 0.5602, 0.0017, 2, 0.43, 0.6667, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"child/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L322_C8", "label": "checkCompile()", "type": "expression", "loc": [322, 322], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L318_C4", "vector": [8, 2, 0.562, 0.0017, 2, 0.43, 1.0, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L324_C4", "label": "testFill", "type": "function", "loc": [324, 328], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L317_C0", "vector": [2, 1, 0.5689, 0.0087, 1, 0.79, 0.5, 447, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.go(\"cheetah fill *.tmpl child/*.tmpl child/grandkid/*.tmpl\")\n self.checkFill(\"a.html\")\n self.checkFill(\"child/a.html\")\n self.checkFill(\"child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L325_C8", "label": "go()", "type": "expression", "loc": [325, 325], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L324_C4", "vector": [8, 2, 0.5672, 0.0017, 2, 0.61, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill *.tmpl child/*.tmpl child/grandkid/*.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L326_C8", "label": "checkFill()", "type": "expression", "loc": [326, 326], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L324_C4", "vector": [8, 2, 0.5689, 0.0017, 2, 0.61, 0.3333, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L327_C8", "label": "checkFill()", "type": "expression", "loc": [327, 327], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L324_C4", "vector": [8, 2, 0.5707, 0.0017, 2, 0.61, 0.6667, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L328_C8", "label": "checkFill()", "type": "expression", "loc": [328, 328], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L324_C4", "vector": [8, 2, 0.5724, 0.0017, 2, 0.61, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L330_C4", "label": "testText", "type": "function", "loc": [330, 334], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L317_C0", "vector": [2, 1, 0.5794, 0.0087, 1, 0.79, 1.0, 153, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.go(\"cheetah fill --oext txt *.tmpl child/*.tmpl child/grandkid/*.tmpl\")\n self.checkFill(\"a.txt\")\n self.checkFill(\"child/a.txt\")\n self.checkFill(\"child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L331_C8", "label": "go()", "type": "expression", "loc": [331, 331], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L330_C4", "vector": [8, 2, 0.5777, 0.0017, 2, 0.43, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill --oext txt *.tmpl child/*.tmpl child/grandkid/*.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L332_C8", "label": "checkFill()", "type": "expression", "loc": [332, 332], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L330_C4", "vector": [8, 2, 0.5794, 0.0017, 2, 0.43, 0.3333, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L333_C8", "label": "checkFill()", "type": "expression", "loc": [333, 333], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L330_C4", "vector": [8, 2, 0.5812, 0.0017, 2, 0.43, 0.6667, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L334_C8", "label": "checkFill()", "type": "expression", "loc": [334, 334], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L330_C4", "vector": [8, 2, 0.5829, 0.0017, 2, 0.43, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L337_C0", "label": "OneFileWithOdir", "type": "class", "loc": [337, 349], "level": 0, "parent": null, "vector": [3, 0, 0.5986, 0.0227, 0, 0.66, 0.6486, 142, 0, 3, 0, 0, 157, 0, 7], "semantic": {"name": "OneFileWithOdir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class OneFileWithOdir(CFBase):\n def testCompile(self):\n self.go(\"cheetah compile --odir DEST a.tmpl\")\n self.checkSubdirPyInit(\"DEST\")\n self.checkCompile(\"DEST/a.py\")\n\n def testFill(self):\n self.go(\"cheetah fill --odir DEST a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L338_C4", "label": "testCompile", "type": "function", "loc": [338, 341], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L337_C0", "vector": [2, 1, 0.5925, 0.007, 1, 0.23, 0.0, 943, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.go(\"cheetah compile --odir DEST a.tmpl\")\n self.checkSubdirPyInit(\"DEST\")\n self.checkCompile(\"DEST/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L339_C8", "label": "go()", "type": "expression", "loc": [339, 339], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L338_C4", "vector": [8, 2, 0.5916, 0.0017, 2, 0.43, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah compile --odir DEST a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L340_C8", "label": "checkSubdirPyInit()", "type": "expression", "loc": [340, 340], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L338_C4", "vector": [8, 2, 0.5934, 0.0017, 2, 0.43, 0.5, 238, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkSubdirPyInit", "arg_names": [], "import_names": [], "rhs_call_name": "checkSubdirPyInit", "annotation": ""}, "snippet": " self.checkSubdirPyInit(\"DEST\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L341_C8", "label": "checkCompile()", "type": "expression", "loc": [341, 341], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L338_C4", "vector": [8, 2, 0.5951, 0.0017, 2, 0.43, 1.0, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"DEST/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L343_C4", "label": "testFill", "type": "function", "loc": [343, 345], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L337_C0", "vector": [2, 1, 0.6003, 0.0052, 1, 0.23, 0.5, 447, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.go(\"cheetah fill --odir DEST a.tmpl\")\n self.checkFill(\"DEST/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L344_C8", "label": "go()", "type": "expression", "loc": [344, 344], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L343_C4", "vector": [8, 2, 0.6003, 0.0017, 2, 0.17, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill --odir DEST a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L345_C8", "label": "checkFill()", "type": "expression", "loc": [345, 345], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L343_C4", "vector": [8, 2, 0.6021, 0.0017, 2, 0.17, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"DEST/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L347_C4", "label": "testText", "type": "function", "loc": [347, 349], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L337_C0", "vector": [2, 1, 0.6073, 0.0052, 1, 0.23, 1.0, 153, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.go(\"cheetah fill --odir DEST --oext txt a.tmpl\")\n self.checkFill(\"DEST/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L348_C8", "label": "go()", "type": "expression", "loc": [348, 348], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L347_C4", "vector": [8, 2, 0.6073, 0.0017, 2, 0.67, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill --odir DEST --oext txt a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L349_C8", "label": "checkFill()", "type": "expression", "loc": [349, 349], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L347_C4", "vector": [8, 2, 0.6091, 0.0017, 2, 0.67, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"DEST/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L352_C0", "label": "VarietyWithOdir", "type": "class", "loc": [352, 372], "level": 0, "parent": null, "vector": [3, 0, 0.6318, 0.0366, 0, 0.66, 0.6757, 702, 0, 3, 0, 0, 157, 0, 15], "semantic": {"name": "VarietyWithOdir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class VarietyWithOdir(CFBase):\n def testCompile(self):\n self.go(\"cheetah compile --odir DEST a.tmpl child/a child/grandkid/*.tmpl\")\n self.checkSubdirPyInit(\"DEST\")\n self.checkSubdirPyInit(\"DEST/child\")\n self.checkSubdirPyInit(\"DEST/child/grandkid\")\n self.checkCompile(\"DEST/a.py\")\n self.checkCompile(\"DEST/child/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L353_C4", "label": "testCompile", "type": "function", "loc": [353, 360], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L352_C0", "vector": [2, 1, 0.6222, 0.014, 1, 0.44, 0.0, 943, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.go(\"cheetah compile --odir DEST a.tmpl child/a child/grandkid/*.tmpl\")\n self.checkSubdirPyInit(\"DEST\")\n self.checkSubdirPyInit(\"DEST/child\")\n self.checkSubdirPyInit(\"DEST/child/grandkid\")\n self.checkCompile(\"DEST/a.py\")\n self.checkCompile(\"DEST/child/a.py\")\n self.checkCompile(\"DEST/child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L354_C8", "label": "go()", "type": "expression", "loc": [354, 354], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L353_C4", "vector": [8, 2, 0.6178, 0.0017, 2, 0.89, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah compile --odir DEST a.tmpl child/a child/grandkid/*.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L355_C8", "label": "checkSubdirPyInit()", "type": "expression", "loc": [355, 355], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L353_C4", "vector": [8, 2, 0.6195, 0.0017, 2, 0.89, 0.1667, 238, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkSubdirPyInit", "arg_names": [], "import_names": [], "rhs_call_name": "checkSubdirPyInit", "annotation": ""}, "snippet": " self.checkSubdirPyInit(\"DEST\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L356_C8", "label": "checkSubdirPyInit()", "type": "expression", "loc": [356, 356], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L353_C4", "vector": [8, 2, 0.6213, 0.0017, 2, 0.89, 0.3333, 238, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkSubdirPyInit", "arg_names": [], "import_names": [], "rhs_call_name": "checkSubdirPyInit", "annotation": ""}, "snippet": " self.checkSubdirPyInit(\"DEST/child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L357_C8", "label": "checkSubdirPyInit()", "type": "expression", "loc": [357, 357], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L353_C4", "vector": [8, 2, 0.623, 0.0017, 2, 0.89, 0.5, 238, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkSubdirPyInit", "arg_names": [], "import_names": [], "rhs_call_name": "checkSubdirPyInit", "annotation": ""}, "snippet": " self.checkSubdirPyInit(\"DEST/child/grandkid\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L358_C8", "label": "checkCompile()", "type": "expression", "loc": [358, 358], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L353_C4", "vector": [8, 2, 0.6248, 0.0017, 2, 0.89, 0.6667, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"DEST/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L359_C8", "label": "checkCompile()", "type": "expression", "loc": [359, 359], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L353_C4", "vector": [8, 2, 0.6265, 0.0017, 2, 0.89, 0.8333, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"DEST/child/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L360_C8", "label": "checkCompile()", "type": "expression", "loc": [360, 360], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L353_C4", "vector": [8, 2, 0.6283, 0.0017, 2, 0.89, 1.0, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"DEST/child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L362_C4", "label": "testFill", "type": "function", "loc": [362, 366], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L352_C0", "vector": [2, 1, 0.6353, 0.0087, 1, 0.44, 0.5, 447, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.go(\"cheetah fill --odir DEST a.tmpl child/a child/grandkid/*.tmpl\")\n self.checkFill(\"DEST/a.html\")\n self.checkFill(\"DEST/child/a.html\")\n self.checkFill(\"DEST/child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L363_C8", "label": "go()", "type": "expression", "loc": [363, 363], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L362_C4", "vector": [8, 2, 0.6335, 0.0017, 2, 0.4, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill --odir DEST a.tmpl child/a child/grandkid/*.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L364_C8", "label": "checkFill()", "type": "expression", "loc": [364, 364], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L362_C4", "vector": [8, 2, 0.6353, 0.0017, 2, 0.4, 0.3333, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"DEST/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L365_C8", "label": "checkFill()", "type": "expression", "loc": [365, 365], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L362_C4", "vector": [8, 2, 0.637, 0.0017, 2, 0.4, 0.6667, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"DEST/child/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L366_C8", "label": "checkFill()", "type": "expression", "loc": [366, 366], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L362_C4", "vector": [8, 2, 0.6387, 0.0017, 2, 0.4, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"DEST/child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L368_C4", "label": "testText", "type": "function", "loc": [368, 372], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L352_C0", "vector": [2, 1, 0.6457, 0.0087, 1, 0.44, 1.0, 153, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.go(\"cheetah fill --odir DEST --oext txt a.tmpl child/a child/grandkid/*.tmpl\")\n self.checkFill(\"DEST/a.txt\")\n self.checkFill(\"DEST/child/a.txt\")\n self.checkFill(\"DEST/child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L369_C8", "label": "go()", "type": "expression", "loc": [369, 369], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L368_C4", "vector": [8, 2, 0.644, 0.0017, 2, 0.72, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill --odir DEST --oext txt a.tmpl child/a child/grandkid/*.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L370_C8", "label": "checkFill()", "type": "expression", "loc": [370, 370], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L368_C4", "vector": [8, 2, 0.6457, 0.0017, 2, 0.72, 0.3333, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"DEST/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L371_C8", "label": "checkFill()", "type": "expression", "loc": [371, 371], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L368_C4", "vector": [8, 2, 0.6475, 0.0017, 2, 0.72, 0.6667, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"DEST/child/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L372_C8", "label": "checkFill()", "type": "expression", "loc": [372, 372], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L368_C4", "vector": [8, 2, 0.6492, 0.0017, 2, 0.72, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"DEST/child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L375_C0", "label": "RecurseExplicit", "type": "class", "loc": [375, 389], "level": 0, "parent": null, "vector": [3, 0, 0.6667, 0.0262, 0, 0.66, 0.7027, 561, 0, 3, 0, 0, 157, 0, 9], "semantic": {"name": "RecurseExplicit", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class RecurseExplicit(CFBase):\n def testCompile(self):\n self.go(\"cheetah compile -R child\")\n self.checkCompile(\"child/a.py\")\n self.checkCompile(\"child/grandkid/a.py\")\n\n def testFill(self):\n self.go(\"cheetah fill -R child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L376_C4", "label": "testCompile", "type": "function", "loc": [376, 379], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L375_C0", "vector": [2, 1, 0.6588, 0.007, 1, 0.38, 0.0, 943, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.go(\"cheetah compile -R child\")\n self.checkCompile(\"child/a.py\")\n self.checkCompile(\"child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L377_C8", "label": "go()", "type": "expression", "loc": [377, 377], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L376_C4", "vector": [8, 2, 0.6579, 0.0017, 2, 0.81, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah compile -R child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L378_C8", "label": "checkCompile()", "type": "expression", "loc": [378, 378], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L376_C4", "vector": [8, 2, 0.6597, 0.0017, 2, 0.81, 0.5, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"child/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L379_C8", "label": "checkCompile()", "type": "expression", "loc": [379, 379], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L376_C4", "vector": [8, 2, 0.6614, 0.0017, 2, 0.81, 1.0, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L381_C4", "label": "testFill", "type": "function", "loc": [381, 384], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L375_C0", "vector": [2, 1, 0.6675, 0.007, 1, 0.38, 0.5, 447, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.go(\"cheetah fill -R child\")\n self.checkFill(\"child/a.html\")\n self.checkFill(\"child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L382_C8", "label": "go()", "type": "expression", "loc": [382, 382], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L381_C4", "vector": [8, 2, 0.6667, 0.0017, 2, 0.7, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill -R child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L383_C8", "label": "checkFill()", "type": "expression", "loc": [383, 383], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L381_C4", "vector": [8, 2, 0.6684, 0.0017, 2, 0.7, 0.5, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L384_C8", "label": "checkFill()", "type": "expression", "loc": [384, 384], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L381_C4", "vector": [8, 2, 0.6702, 0.0017, 2, 0.7, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L386_C4", "label": "testText", "type": "function", "loc": [386, 389], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L375_C0", "vector": [2, 1, 0.6763, 0.007, 1, 0.38, 1.0, 153, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.go(\"cheetah fill -R --oext txt child\")\n self.checkFill(\"child/a.txt\")\n self.checkFill(\"child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L387_C8", "label": "go()", "type": "expression", "loc": [387, 387], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L386_C4", "vector": [8, 2, 0.6754, 0.0017, 2, 0.64, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill -R --oext txt child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L388_C8", "label": "checkFill()", "type": "expression", "loc": [388, 388], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L386_C4", "vector": [8, 2, 0.6771, 0.0017, 2, 0.64, 0.5, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L389_C8", "label": "checkFill()", "type": "expression", "loc": [389, 389], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L386_C4", "vector": [8, 2, 0.6789, 0.0017, 2, 0.64, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L392_C0", "label": "RecurseImplicit", "type": "class", "loc": [392, 408], "level": 0, "parent": null, "vector": [3, 0, 0.6981, 0.0297, 0, 0.66, 0.7297, 656, 0, 3, 0, 0, 157, 0, 11], "semantic": {"name": "RecurseImplicit", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class RecurseImplicit(CFBase):\n def testCompile(self):\n self.go(\"cheetah compile -R\")\n self.checkCompile(\"child/a.py\")\n self.checkCompile(\"child/grandkid/a.py\")\n\n def testFill(self):\n self.go(\"cheetah fill -R\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L393_C4", "label": "testCompile", "type": "function", "loc": [393, 396], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L392_C0", "vector": [2, 1, 0.6885, 0.007, 1, 0.61, 0.0, 943, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.go(\"cheetah compile -R\")\n self.checkCompile(\"child/a.py\")\n self.checkCompile(\"child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L394_C8", "label": "go()", "type": "expression", "loc": [394, 394], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L393_C4", "vector": [8, 2, 0.6876, 0.0017, 2, 0.44, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah compile -R\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L395_C8", "label": "checkCompile()", "type": "expression", "loc": [395, 395], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L393_C4", "vector": [8, 2, 0.6894, 0.0017, 2, 0.44, 0.5, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"child/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L396_C8", "label": "checkCompile()", "type": "expression", "loc": [396, 396], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L393_C4", "vector": [8, 2, 0.6911, 0.0017, 2, 0.44, 1.0, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L398_C4", "label": "testFill", "type": "function", "loc": [398, 402], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L392_C0", "vector": [2, 1, 0.6981, 0.0087, 1, 0.61, 0.5, 447, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.go(\"cheetah fill -R\")\n self.checkFill(\"a.html\")\n self.checkFill(\"child/a.html\")\n self.checkFill(\"child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L399_C8", "label": "go()", "type": "expression", "loc": [399, 399], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L398_C4", "vector": [8, 2, 0.6963, 0.0017, 2, 0.97, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill -R\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L400_C8", "label": "checkFill()", "type": "expression", "loc": [400, 400], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L398_C4", "vector": [8, 2, 0.6981, 0.0017, 2, 0.97, 0.3333, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L401_C8", "label": "checkFill()", "type": "expression", "loc": [401, 401], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L398_C4", "vector": [8, 2, 0.6998, 0.0017, 2, 0.97, 0.6667, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L402_C8", "label": "checkFill()", "type": "expression", "loc": [402, 402], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L398_C4", "vector": [8, 2, 0.7016, 0.0017, 2, 0.97, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L404_C4", "label": "testText", "type": "function", "loc": [404, 408], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L392_C0", "vector": [2, 1, 0.7086, 0.0087, 1, 0.61, 1.0, 153, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.go(\"cheetah fill -R --oext txt\")\n self.checkFill(\"a.txt\")\n self.checkFill(\"child/a.txt\")\n self.checkFill(\"child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L405_C8", "label": "go()", "type": "expression", "loc": [405, 405], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L404_C4", "vector": [8, 2, 0.7068, 0.0017, 2, 0.98, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill -R --oext txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L406_C8", "label": "checkFill()", "type": "expression", "loc": [406, 406], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L404_C4", "vector": [8, 2, 0.7086, 0.0017, 2, 0.98, 0.3333, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L407_C8", "label": "checkFill()", "type": "expression", "loc": [407, 407], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L404_C4", "vector": [8, 2, 0.7103, 0.0017, 2, 0.98, 0.6667, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L408_C8", "label": "checkFill()", "type": "expression", "loc": [408, 408], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L404_C4", "vector": [8, 2, 0.712, 0.0017, 2, 0.98, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L411_C0", "label": "RecurseExplicitWIthOdir", "type": "class", "loc": [411, 427], "level": 0, "parent": null, "vector": [3, 0, 0.7312, 0.0297, 0, 0.66, 0.7568, 503, 0, 3, 0, 0, 157, 0, 11], "semantic": {"name": "RecurseExplicitWIthOdir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class RecurseExplicitWIthOdir(CFBase):\n def testCompile(self):\n self.go(\"cheetah compile -R --odir DEST child\")\n self.checkSubdirPyInit(\"DEST/child\")\n self.checkSubdirPyInit(\"DEST/child/grandkid\")\n self.checkCompile(\"DEST/child/a.py\")\n self.checkCompile(\"DEST/child/grandkid/a.py\")\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L412_C4", "label": "testCompile", "type": "function", "loc": [412, 417], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L411_C0", "vector": [2, 1, 0.7234, 0.0105, 1, 0.13, 0.0, 943, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.go(\"cheetah compile -R --odir DEST child\")\n self.checkSubdirPyInit(\"DEST/child\")\n self.checkSubdirPyInit(\"DEST/child/grandkid\")\n self.checkCompile(\"DEST/child/a.py\")\n self.checkCompile(\"DEST/child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L413_C8", "label": "go()", "type": "expression", "loc": [413, 413], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L412_C4", "vector": [8, 2, 0.7208, 0.0017, 2, 0.47, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah compile -R --odir DEST child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L414_C8", "label": "checkSubdirPyInit()", "type": "expression", "loc": [414, 414], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L412_C4", "vector": [8, 2, 0.7225, 0.0017, 2, 0.47, 0.25, 238, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkSubdirPyInit", "arg_names": [], "import_names": [], "rhs_call_name": "checkSubdirPyInit", "annotation": ""}, "snippet": " self.checkSubdirPyInit(\"DEST/child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L415_C8", "label": "checkSubdirPyInit()", "type": "expression", "loc": [415, 415], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L412_C4", "vector": [8, 2, 0.7243, 0.0017, 2, 0.47, 0.5, 238, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkSubdirPyInit", "arg_names": [], "import_names": [], "rhs_call_name": "checkSubdirPyInit", "annotation": ""}, "snippet": " self.checkSubdirPyInit(\"DEST/child/grandkid\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L416_C8", "label": "checkCompile()", "type": "expression", "loc": [416, 416], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L412_C4", "vector": [8, 2, 0.726, 0.0017, 2, 0.47, 0.75, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"DEST/child/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L417_C8", "label": "checkCompile()", "type": "expression", "loc": [417, 417], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L412_C4", "vector": [8, 2, 0.7277, 0.0017, 2, 0.47, 1.0, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"DEST/child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L419_C4", "label": "testFill", "type": "function", "loc": [419, 422], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L411_C0", "vector": [2, 1, 0.7339, 0.007, 1, 0.13, 0.5, 447, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.go(\"cheetah fill -R --odir DEST child\")\n self.checkFill(\"DEST/child/a.html\")\n self.checkFill(\"DEST/child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L420_C8", "label": "go()", "type": "expression", "loc": [420, 420], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L419_C4", "vector": [8, 2, 0.733, 0.0017, 2, 0.89, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill -R --odir DEST child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L421_C8", "label": "checkFill()", "type": "expression", "loc": [421, 421], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L419_C4", "vector": [8, 2, 0.7347, 0.0017, 2, 0.89, 0.5, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"DEST/child/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L422_C8", "label": "checkFill()", "type": "expression", "loc": [422, 422], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L419_C4", "vector": [8, 2, 0.7365, 0.0017, 2, 0.89, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"DEST/child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L424_C4", "label": "testText", "type": "function", "loc": [424, 427], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L411_C0", "vector": [2, 1, 0.7426, 0.007, 1, 0.13, 1.0, 153, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.go(\"cheetah fill -R --odir DEST --oext txt child\")\n self.checkFill(\"DEST/child/a.txt\")\n self.checkFill(\"DEST/child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L425_C8", "label": "go()", "type": "expression", "loc": [425, 425], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L424_C4", "vector": [8, 2, 0.7417, 0.0017, 2, 0.87, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill -R --odir DEST --oext txt child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L426_C8", "label": "checkFill()", "type": "expression", "loc": [426, 426], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L424_C4", "vector": [8, 2, 0.7435, 0.0017, 2, 0.87, 0.5, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"DEST/child/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L427_C8", "label": "checkFill()", "type": "expression", "loc": [427, 427], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L424_C4", "vector": [8, 2, 0.7452, 0.0017, 2, 0.87, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"DEST/child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L430_C0", "label": "Flat", "type": "class", "loc": [430, 441], "level": 0, "parent": null, "vector": [3, 0, 0.76, 0.0209, 0, 0.66, 0.7838, 159, 0, 3, 0, 0, 157, 0, 6], "semantic": {"name": "Flat", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Flat(CFBase):\n def testCompile(self):\n self.go(\"cheetah compile --flat child/a.tmpl\")\n self.checkCompile(\"a.py\")\n\n def testFill(self):\n self.go(\"cheetah fill --flat child/a.tmpl\")\n self.checkFill(\"a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L431_C4", "label": "testCompile", "type": "function", "loc": [431, 433], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L430_C0", "vector": [2, 1, 0.7539, 0.0052, 1, 0.78, 0.0, 943, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.go(\"cheetah compile --flat child/a.tmpl\")\n self.checkCompile(\"a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L432_C8", "label": "go()", "type": "expression", "loc": [432, 432], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L431_C4", "vector": [8, 2, 0.7539, 0.0017, 2, 0.48, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah compile --flat child/a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L433_C8", "label": "checkCompile()", "type": "expression", "loc": [433, 433], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L431_C4", "vector": [8, 2, 0.7557, 0.0017, 2, 0.48, 1.0, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L435_C4", "label": "testFill", "type": "function", "loc": [435, 437], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L430_C0", "vector": [2, 1, 0.7609, 0.0052, 1, 0.78, 0.5, 447, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.go(\"cheetah fill --flat child/a.tmpl\")\n self.checkFill(\"a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L436_C8", "label": "go()", "type": "expression", "loc": [436, 436], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L435_C4", "vector": [8, 2, 0.7609, 0.0017, 2, 0.13, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill --flat child/a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L437_C8", "label": "checkFill()", "type": "expression", "loc": [437, 437], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L435_C4", "vector": [8, 2, 0.7627, 0.0017, 2, 0.13, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L439_C4", "label": "testText", "type": "function", "loc": [439, 441], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L430_C0", "vector": [2, 1, 0.7679, 0.0052, 1, 0.78, 1.0, 153, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.go(\"cheetah fill --flat --oext txt child/a.tmpl\")\n self.checkFill(\"a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L440_C8", "label": "go()", "type": "expression", "loc": [440, 440], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L439_C4", "vector": [8, 2, 0.7679, 0.0017, 2, 0.21, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill --flat --oext txt child/a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L441_C8", "label": "checkFill()", "type": "expression", "loc": [441, 441], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L439_C4", "vector": [8, 2, 0.7696, 0.0017, 2, 0.21, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L444_C0", "label": "FlatRecurseCollision", "type": "class", "loc": [444, 454], "level": 0, "parent": null, "vector": [3, 0, 0.7836, 0.0192, 0, 0.66, 0.8108, 719, 0, 3, 0, 0, 157, 0, 3], "semantic": {"name": "FlatRecurseCollision", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class FlatRecurseCollision(CFBase):\n expectError = True\n\n def testCompile(self):\n self.assertSubprocess(\"cheetah compile -R --flat\", nonzero=True)\n\n def testFill(self):\n self.assertSubprocess(\"cheetah fill -R --flat\", nonzero=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L445_C4", "label": "expectError =", "type": "assigned_variable", "loc": [445, 445], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L444_C0", "vector": [14, 1, 0.7766, 0.0017, 1, 0.79, 0.0, 478, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "expectError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expectError = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L447_C4", "label": "testCompile", "type": "function", "loc": [447, 448], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L444_C0", "vector": [2, 1, 0.781, 0.0035, 1, 0.79, 0.3333, 943, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.assertSubprocess(\"cheetah compile -R --flat\", nonzero=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L448_C8", "label": "assertSubprocess()", "type": "expression", "loc": [448, 448], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L447_C4", "vector": [8, 2, 0.7818, 0.0017, 2, 0.95, 0.0, 429, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertSubprocess", "arg_names": [], "import_names": [], "rhs_call_name": "assertSubprocess", "annotation": ""}, "snippet": " self.assertSubprocess(\"cheetah compile -R --flat\", nonzero=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L450_C4", "label": "testFill", "type": "function", "loc": [450, 451], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L444_C0", "vector": [2, 1, 0.7862, 0.0035, 1, 0.79, 0.6667, 447, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.assertSubprocess(\"cheetah fill -R --flat\", nonzero=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L451_C8", "label": "assertSubprocess()", "type": "expression", "loc": [451, 451], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L450_C4", "vector": [8, 2, 0.7871, 0.0017, 2, 0.28, 0.0, 429, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertSubprocess", "arg_names": [], "import_names": [], "rhs_call_name": "assertSubprocess", "annotation": ""}, "snippet": " self.assertSubprocess(\"cheetah fill -R --flat\", nonzero=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L453_C4", "label": "testText", "type": "function", "loc": [453, 454], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L444_C0", "vector": [2, 1, 0.7914, 0.0035, 1, 0.79, 1.0, 153, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.assertSubprocess(\"cheetah fill -R --flat\", nonzero=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L454_C8", "label": "assertSubprocess()", "type": "expression", "loc": [454, 454], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L453_C4", "vector": [8, 2, 0.7923, 0.0017, 2, 0.52, 0.0, 429, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertSubprocess", "arg_names": [], "import_names": [], "rhs_call_name": "assertSubprocess", "annotation": ""}, "snippet": " self.assertSubprocess(\"cheetah fill -R --flat\", nonzero=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L457_C0", "label": "IdirRecurse", "type": "class", "loc": [457, 473], "level": 0, "parent": null, "vector": [3, 0, 0.8115, 0.0297, 0, 0.66, 0.8378, 285, 0, 3, 0, 0, 84, 0, 11], "semantic": {"name": "IdirRecurse", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class IdirRecurse(CFIdirBase):\n def testCompile(self):\n self.go(\"cheetah compile -R --idir SRC child\")\n self.checkSubdirPyInit(\"child\")\n self.checkSubdirPyInit(\"child/grandkid\")\n self.checkCompile(\"child/a.py\")\n self.checkCompile(\"child/grandkid/a.py\")\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L458_C4", "label": "testCompile", "type": "function", "loc": [458, 463], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L457_C0", "vector": [2, 1, 0.8037, 0.0105, 1, 0.7, 0.0, 943, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.go(\"cheetah compile -R --idir SRC child\")\n self.checkSubdirPyInit(\"child\")\n self.checkSubdirPyInit(\"child/grandkid\")\n self.checkCompile(\"child/a.py\")\n self.checkCompile(\"child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L459_C8", "label": "go()", "type": "expression", "loc": [459, 459], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L458_C4", "vector": [8, 2, 0.801, 0.0017, 2, 0.94, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah compile -R --idir SRC child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L460_C8", "label": "checkSubdirPyInit()", "type": "expression", "loc": [460, 460], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L458_C4", "vector": [8, 2, 0.8028, 0.0017, 2, 0.94, 0.25, 238, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkSubdirPyInit", "arg_names": [], "import_names": [], "rhs_call_name": "checkSubdirPyInit", "annotation": ""}, "snippet": " self.checkSubdirPyInit(\"child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L461_C8", "label": "checkSubdirPyInit()", "type": "expression", "loc": [461, 461], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L458_C4", "vector": [8, 2, 0.8045, 0.0017, 2, 0.94, 0.5, 238, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkSubdirPyInit", "arg_names": [], "import_names": [], "rhs_call_name": "checkSubdirPyInit", "annotation": ""}, "snippet": " self.checkSubdirPyInit(\"child/grandkid\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L462_C8", "label": "checkCompile()", "type": "expression", "loc": [462, 462], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L458_C4", "vector": [8, 2, 0.8063, 0.0017, 2, 0.94, 0.75, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"child/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L463_C8", "label": "checkCompile()", "type": "expression", "loc": [463, 463], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L458_C4", "vector": [8, 2, 0.808, 0.0017, 2, 0.94, 1.0, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L465_C4", "label": "testFill", "type": "function", "loc": [465, 468], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L457_C0", "vector": [2, 1, 0.8141, 0.007, 1, 0.7, 0.5, 447, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.go(\"cheetah fill -R --idir SRC child\")\n self.checkFill(\"child/a.html\")\n self.checkFill(\"child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L466_C8", "label": "go()", "type": "expression", "loc": [466, 466], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L465_C4", "vector": [8, 2, 0.8133, 0.0017, 2, 0.58, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill -R --idir SRC child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L467_C8", "label": "checkFill()", "type": "expression", "loc": [467, 467], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L465_C4", "vector": [8, 2, 0.815, 0.0017, 2, 0.58, 0.5, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L468_C8", "label": "checkFill()", "type": "expression", "loc": [468, 468], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L465_C4", "vector": [8, 2, 0.8168, 0.0017, 2, 0.58, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L470_C4", "label": "testText", "type": "function", "loc": [470, 473], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L457_C0", "vector": [2, 1, 0.8229, 0.007, 1, 0.7, 1.0, 153, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.go(\"cheetah fill -R --idir SRC --oext txt child\")\n self.checkFill(\"child/a.txt\")\n self.checkFill(\"child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L471_C8", "label": "go()", "type": "expression", "loc": [471, 471], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L470_C4", "vector": [8, 2, 0.822, 0.0017, 2, 0.67, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill -R --idir SRC --oext txt child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L472_C8", "label": "checkFill()", "type": "expression", "loc": [472, 472], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L470_C4", "vector": [8, 2, 0.8237, 0.0017, 2, 0.67, 0.5, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L473_C8", "label": "checkFill()", "type": "expression", "loc": [473, 473], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L470_C4", "vector": [8, 2, 0.8255, 0.0017, 2, 0.67, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L476_C0", "label": "IdirOdirRecurse", "type": "class", "loc": [476, 492], "level": 0, "parent": null, "vector": [3, 0, 0.8447, 0.0297, 0, 0.66, 0.8649, 972, 0, 3, 0, 0, 84, 0, 11], "semantic": {"name": "IdirOdirRecurse", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class IdirOdirRecurse(CFIdirBase):\n def testCompile(self):\n self.go(\"cheetah compile -R --idir SRC --odir DEST child\")\n self.checkSubdirPyInit(\"DEST/child\")\n self.checkSubdirPyInit(\"DEST/child/grandkid\")\n self.checkCompile(\"DEST/child/a.py\")\n self.checkCompile(\"DEST/child/grandkid/a.py\")\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L477_C4", "label": "testCompile", "type": "function", "loc": [477, 482], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L476_C0", "vector": [2, 1, 0.8368, 0.0105, 1, 0.98, 0.0, 943, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.go(\"cheetah compile -R --idir SRC --odir DEST child\")\n self.checkSubdirPyInit(\"DEST/child\")\n self.checkSubdirPyInit(\"DEST/child/grandkid\")\n self.checkCompile(\"DEST/child/a.py\")\n self.checkCompile(\"DEST/child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L478_C8", "label": "go()", "type": "expression", "loc": [478, 478], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L477_C4", "vector": [8, 2, 0.8342, 0.0017, 2, 0.17, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah compile -R --idir SRC --odir DEST child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L479_C8", "label": "checkSubdirPyInit()", "type": "expression", "loc": [479, 479], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L477_C4", "vector": [8, 2, 0.836, 0.0017, 2, 0.17, 0.25, 238, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkSubdirPyInit", "arg_names": [], "import_names": [], "rhs_call_name": "checkSubdirPyInit", "annotation": ""}, "snippet": " self.checkSubdirPyInit(\"DEST/child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L480_C8", "label": "checkSubdirPyInit()", "type": "expression", "loc": [480, 480], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L477_C4", "vector": [8, 2, 0.8377, 0.0017, 2, 0.17, 0.5, 238, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkSubdirPyInit", "arg_names": [], "import_names": [], "rhs_call_name": "checkSubdirPyInit", "annotation": ""}, "snippet": " self.checkSubdirPyInit(\"DEST/child/grandkid\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L481_C8", "label": "checkCompile()", "type": "expression", "loc": [481, 481], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L477_C4", "vector": [8, 2, 0.8394, 0.0017, 2, 0.17, 0.75, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"DEST/child/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L482_C8", "label": "checkCompile()", "type": "expression", "loc": [482, 482], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L477_C4", "vector": [8, 2, 0.8412, 0.0017, 2, 0.17, 1.0, 787, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkCompile", "arg_names": [], "import_names": [], "rhs_call_name": "checkCompile", "annotation": ""}, "snippet": " self.checkCompile(\"DEST/child/grandkid/a.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L484_C4", "label": "testFill", "type": "function", "loc": [484, 487], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L476_C0", "vector": [2, 1, 0.8473, 0.007, 1, 0.98, 0.5, 447, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.go(\"cheetah fill -R --idir SRC --odir DEST child\")\n self.checkFill(\"DEST/child/a.html\")\n self.checkFill(\"DEST/child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L485_C8", "label": "go()", "type": "expression", "loc": [485, 485], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L484_C4", "vector": [8, 2, 0.8464, 0.0017, 2, 0.13, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill -R --idir SRC --odir DEST child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L486_C8", "label": "checkFill()", "type": "expression", "loc": [486, 486], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L484_C4", "vector": [8, 2, 0.8482, 0.0017, 2, 0.13, 0.5, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"DEST/child/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L487_C8", "label": "checkFill()", "type": "expression", "loc": [487, 487], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L484_C4", "vector": [8, 2, 0.8499, 0.0017, 2, 0.13, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"DEST/child/grandkid/a.html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L489_C4", "label": "testText", "type": "function", "loc": [489, 492], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L476_C0", "vector": [2, 1, 0.856, 0.007, 1, 0.98, 1.0, 153, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.go(\"cheetah fill -R --idir SRC --odir DEST --oext txt child\")\n self.checkFill(\"DEST/child/a.txt\")\n self.checkFill(\"DEST/child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L490_C8", "label": "go()", "type": "expression", "loc": [490, 490], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L489_C4", "vector": [8, 2, 0.8551, 0.0017, 2, 0.17, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill -R --idir SRC --odir DEST --oext txt child\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L491_C8", "label": "checkFill()", "type": "expression", "loc": [491, 491], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L489_C4", "vector": [8, 2, 0.8569, 0.0017, 2, 0.17, 0.5, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"DEST/child/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L492_C8", "label": "checkFill()", "type": "expression", "loc": [492, 492], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L489_C4", "vector": [8, 2, 0.8586, 0.0017, 2, 0.17, 1.0, 930, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkFill", "arg_names": [], "import_names": [], "rhs_call_name": "checkFill", "annotation": ""}, "snippet": " self.checkFill(\"DEST/child/grandkid/a.txt\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L495_C0", "label": "IdirFlatRecurseCollision", "type": "class", "loc": [495, 505], "level": 0, "parent": null, "vector": [3, 0, 0.8726, 0.0192, 0, 0.66, 0.8919, 293, 0, 3, 0, 0, 84, 0, 3], "semantic": {"name": "IdirFlatRecurseCollision", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class IdirFlatRecurseCollision(CFIdirBase):\n expectError = True\n\n def testCompile(self):\n self.assertSubprocess(\"cheetah compile -R --flat --idir SRC\", nonzero=True)\n\n def testFill(self):\n self.assertSubprocess(\"cheetah fill -R --flat --idir SRC\", nonzero=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L496_C4", "label": "expectError =", "type": "assigned_variable", "loc": [496, 496], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L495_C0", "vector": [14, 1, 0.8656, 0.0017, 1, 0.08, 0.0, 478, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "expectError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expectError = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L498_C4", "label": "testCompile", "type": "function", "loc": [498, 499], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L495_C0", "vector": [2, 1, 0.87, 0.0035, 1, 0.08, 0.3333, 943, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.assertSubprocess(\"cheetah compile -R --flat --idir SRC\", nonzero=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L499_C8", "label": "assertSubprocess()", "type": "expression", "loc": [499, 499], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L498_C4", "vector": [8, 2, 0.8709, 0.0017, 2, 0.35, 0.0, 429, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertSubprocess", "arg_names": [], "import_names": [], "rhs_call_name": "assertSubprocess", "annotation": ""}, "snippet": " self.assertSubprocess(\"cheetah compile -R --flat --idir SRC\", nonzero=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L501_C4", "label": "testFill", "type": "function", "loc": [501, 502], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L495_C0", "vector": [2, 1, 0.8752, 0.0035, 1, 0.08, 0.6667, 447, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.assertSubprocess(\"cheetah fill -R --flat --idir SRC\", nonzero=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L502_C8", "label": "assertSubprocess()", "type": "expression", "loc": [502, 502], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L501_C4", "vector": [8, 2, 0.8761, 0.0017, 2, 0.86, 0.0, 429, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertSubprocess", "arg_names": [], "import_names": [], "rhs_call_name": "assertSubprocess", "annotation": ""}, "snippet": " self.assertSubprocess(\"cheetah fill -R --flat --idir SRC\", nonzero=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L504_C4", "label": "testText", "type": "function", "loc": [504, 505], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L495_C0", "vector": [2, 1, 0.8805, 0.0035, 1, 0.08, 1.0, 153, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.assertSubprocess(\"cheetah fill -R --flat --idir SRC --oext txt\", nonzero=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L505_C8", "label": "assertSubprocess()", "type": "expression", "loc": [505, 505], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L504_C4", "vector": [8, 2, 0.8813, 0.0017, 2, 0.86, 0.0, 429, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertSubprocess", "arg_names": [], "import_names": [], "rhs_call_name": "assertSubprocess", "annotation": ""}, "snippet": " self.assertSubprocess(\"cheetah fill -R --flat --idir SRC --oext txt\", nonzero=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L508_C0", "label": "NoBackup", "type": "class", "loc": [508, 525], "level": 0, "parent": null, "vector": [3, 0, 0.9014, 0.0314, 0, 0.66, 0.9189, 45, 0, 3, 0, 0, 157, 0, 9], "semantic": {"name": "NoBackup", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class NoBackup(CFBase):\n \"\"\"Run the command twice each time and verify a backup file is \n *not* created.\n \"\"\"\n def testCompile(self):\n self.go(\"cheetah compile --nobackup a.tmpl\")\n self.go(\"cheetah compile --nobackup a.tmpl\")\n self.checkNoBackup(\"a.py\" + BACKUP_SUFFIX)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L509_C4", "label": "expression", "type": "expression", "loc": [509, 511], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L508_C0", "vector": [8, 1, 0.8901, 0.0052, 1, 0.07, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Run the command twice each time and verify a backup file is \n *not* created.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L512_C4", "label": "testCompile", "type": "function", "loc": [512, 515], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L508_C0", "vector": [2, 1, 0.8962, 0.007, 1, 0.07, 0.3333, 943, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "testCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testCompile(self):\n self.go(\"cheetah compile --nobackup a.tmpl\")\n self.go(\"cheetah compile --nobackup a.tmpl\")\n self.checkNoBackup(\"a.py\" + BACKUP_SUFFIX)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L513_C8", "label": "go()", "type": "expression", "loc": [513, 513], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L512_C4", "vector": [8, 2, 0.8953, 0.0017, 2, 0.38, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah compile --nobackup a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L514_C8", "label": "go()", "type": "expression", "loc": [514, 514], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L512_C4", "vector": [8, 2, 0.897, 0.0017, 2, 0.38, 0.5, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah compile --nobackup a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L515_C8", "label": "checkNoBackup()", "type": "expression", "loc": [515, 515], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L512_C4", "vector": [8, 2, 0.8988, 0.0017, 2, 0.38, 1.0, 72, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkNoBackup", "arg_names": [], "import_names": [], "rhs_call_name": "checkNoBackup", "annotation": ""}, "snippet": " self.checkNoBackup(\"a.py\" + BACKUP_SUFFIX)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L517_C4", "label": "testFill", "type": "function", "loc": [517, 520], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L508_C0", "vector": [2, 1, 0.9049, 0.007, 1, 0.07, 0.6667, 447, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "testFill", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testFill(self):\n self.go(\"cheetah fill --nobackup a.tmpl\")\n self.go(\"cheetah fill --nobackup a.tmpl\")\n self.checkNoBackup(\"a.html\" + BACKUP_SUFFIX)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L518_C8", "label": "go()", "type": "expression", "loc": [518, 518], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L517_C4", "vector": [8, 2, 0.904, 0.0017, 2, 0.17, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill --nobackup a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L519_C8", "label": "go()", "type": "expression", "loc": [519, 519], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L517_C4", "vector": [8, 2, 0.9058, 0.0017, 2, 0.17, 0.5, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill --nobackup a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L520_C8", "label": "checkNoBackup()", "type": "expression", "loc": [520, 520], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L517_C4", "vector": [8, 2, 0.9075, 0.0017, 2, 0.17, 1.0, 72, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkNoBackup", "arg_names": [], "import_names": [], "rhs_call_name": "checkNoBackup", "annotation": ""}, "snippet": " self.checkNoBackup(\"a.html\" + BACKUP_SUFFIX)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L522_C4", "label": "testText", "type": "function", "loc": [522, 525], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L508_C0", "vector": [2, 1, 0.9136, 0.007, 1, 0.07, 1.0, 153, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "testText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testText(self):\n self.go(\"cheetah fill --nobackup --oext txt a.tmpl\")\n self.go(\"cheetah fill --nobackup --oext txt a.tmpl\")\n self.checkNoBackup(\"a.txt\" + BACKUP_SUFFIX)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L523_C8", "label": "go()", "type": "expression", "loc": [523, 523], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L522_C4", "vector": [8, 2, 0.9127, 0.0017, 2, 0.32, 0.0, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill --nobackup --oext txt a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L524_C8", "label": "go()", "type": "expression", "loc": [524, 524], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L522_C4", "vector": [8, 2, 0.9145, 0.0017, 2, 0.32, 0.5, 917, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "go", "arg_names": [], "import_names": [], "rhs_call_name": "go", "annotation": ""}, "snippet": " self.go(\"cheetah fill --nobackup --oext txt a.tmpl\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L525_C8", "label": "checkNoBackup()", "type": "expression", "loc": [525, 525], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L522_C4", "vector": [8, 2, 0.9162, 0.0017, 2, 0.32, 1.0, 72, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkNoBackup", "arg_names": [], "import_names": [], "rhs_call_name": "checkNoBackup", "annotation": ""}, "snippet": " self.checkNoBackup(\"a.txt\" + BACKUP_SUFFIX)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L527_C0", "label": "listTests", "type": "function", "loc": [527, 541], "level": 0, "parent": null, "vector": [2, 0, 0.9319, 0.0262, 0, 0.66, 0.9459, 866, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "listTests", "arg_names": ["cheetahWrapperFile"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def listTests(cheetahWrapperFile):\n \"\"\"cheetahWrapperFile, string, path of this script.\n\n XXX TODO: don't print test where expectError is true.\n \"\"\"\n rx = re.compile( R'self\\.go\\(\"(.*?)\"\\)' )\n f = open(cheetahWrapperFile)\n while True:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L528_C4", "label": "expression", "type": "expression", "loc": [528, 531], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L527_C0", "vector": [8, 1, 0.9241, 0.007, 1, 0.45, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"cheetahWrapperFile, string, path of this script.\n\n XXX TODO: don't print test where expectError is true.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L532_C4", "label": "rx = compile()", "type": "assigned_variable", "loc": [532, 532], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L527_C0", "vector": [14, 1, 0.9284, 0.0017, 1, 0.45, 0.25, 179, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "rx", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " rx = re.compile( R'self\\.go\\(\"(.*?)\"\\)' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L533_C4", "label": "f = open()", "type": "assigned_variable", "loc": [533, 533], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L527_C0", "vector": [14, 1, 0.9302, 0.0017, 1, 0.45, 0.5, 899, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " f = open(cheetahWrapperFile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:While_L534_C4", "label": "while", "type": "while", "loc": [534, 540], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L527_C0", "vector": [5, 1, 0.9372, 0.0122, 1, 0.45, 0.75, 0, 1, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while True:\n lin = f.readline()\n if not lin:\n break\n m = rx.search(lin)\n if m:\n print(m.group(1))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L535_C8", "label": "lin = readline()", "type": "assigned_variable", "loc": [535, 535], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:While_L534_C4", "vector": [14, 2, 0.9337, 0.0017, 2, 0.84, 0.0, 182, 3, 0, 0, 0, 303, 10, 1], "semantic": {"name": "lin", "arg_names": [], "import_names": [], "rhs_call_name": "readline", "annotation": ""}, "snippet": " lin = f.readline()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L536_C8", "label": "if", "type": "if", "loc": [536, 537], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:While_L534_C4", "vector": [4, 2, 0.9363, 0.0035, 2, 0.84, 0.3333, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not lin:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L538_C8", "label": "m = search()", "type": "assigned_variable", "loc": [538, 538], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:While_L534_C4", "vector": [14, 2, 0.9389, 0.0017, 2, 0.84, 0.6667, 711, 3, 1, 0, 0, 163, 10, 1], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "search", "annotation": ""}, "snippet": " m = rx.search(lin)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L539_C8", "label": "if", "type": "if", "loc": [539, 540], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:While_L534_C4", "vector": [4, 2, 0.9415, 0.0035, 2, 0.84, 1.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if m:\n print(m.group(1))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L540_C12", "label": "print()", "type": "expression", "loc": [540, 540], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L539_C8", "vector": [8, 3, 0.9424, 0.0017, 3, 0.35, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(m.group(1))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L541_C4", "label": "close()", "type": "expression", "loc": [541, 541], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L527_C0", "vector": [8, 1, 0.9442, 0.0017, 1, 0.45, 1.0, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " f.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "label": "main", "type": "function", "loc": [543, 568], "level": 0, "parent": null, "vector": [2, 0, 0.9695, 0.0454, 0, 0.66, 0.973, 624, 0, 0, 0, 0, 0, 0, 13], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n global DELETE, OUTPUT\n parser = OptionParser()\n parser.add_option(\"--list\", action=\"store\", dest=\"listTests\")\n parser.add_option(\"--nodelete\", action=\"store_true\")\n parser.add_option(\"--output\", action=\"store_true\")\n # The following options are passed to unittest.\n parser.add_option(\"-e\", \"--explain\", action=\"store_true\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L545_C4", "label": "parser = OptionParser()", "type": "assigned_variable", "loc": [545, 545], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "vector": [14, 1, 0.9511, 0.0017, 1, 0.81, 0.0, 968, 3, 0, 0, 0, 894, 10, 1], "semantic": {"name": "parser", "arg_names": [], "import_names": [], "rhs_call_name": "OptionParser", "annotation": ""}, "snippet": " parser = OptionParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L546_C4", "label": "add_option()", "type": "expression", "loc": [546, 546], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "vector": [8, 1, 0.9529, 0.0017, 1, 0.81, 0.1, 176, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": " parser.add_option(\"--list\", action=\"store\", dest=\"listTests\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L547_C4", "label": "add_option()", "type": "expression", "loc": [547, 547], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "vector": [8, 1, 0.9546, 0.0017, 1, 0.81, 0.2, 176, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": " parser.add_option(\"--nodelete\", action=\"store_true\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L548_C4", "label": "add_option()", "type": "expression", "loc": [548, 548], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "vector": [8, 1, 0.9564, 0.0017, 1, 0.81, 0.3, 176, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": " parser.add_option(\"--output\", action=\"store_true\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L550_C4", "label": "add_option()", "type": "expression", "loc": [550, 550], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "vector": [8, 1, 0.9599, 0.0017, 1, 0.81, 0.4, 176, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": " parser.add_option(\"-e\", \"--explain\", action=\"store_true\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L551_C4", "label": "add_option()", "type": "expression", "loc": [551, 551], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "vector": [8, 1, 0.9616, 0.0017, 1, 0.81, 0.5, 176, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": " parser.add_option(\"-v\", \"--verbose\", action=\"store_true\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L552_C4", "label": "add_option()", "type": "expression", "loc": [552, 552], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "vector": [8, 1, 0.9634, 0.0017, 1, 0.81, 0.6, 176, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": " parser.add_option(\"-q\", \"--quiet\", action=\"store_true\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L553_C4", "label": "opts, files = parse_args()", "type": "assigned_variable", "loc": [553, 553], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "vector": [14, 1, 0.9651, 0.0017, 1, 0.81, 0.7, 463, 3, 0, 0, 0, 187, 10, 1], "semantic": {"name": "opts, files", "arg_names": [], "import_names": [], "rhs_call_name": "parse_args", "annotation": ""}, "snippet": " opts, files = parser.parse_args()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L554_C4", "label": "if", "type": "if", "loc": [554, 555], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "vector": [4, 1, 0.9677, 0.0035, 1, 0.81, 0.8, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if opts.nodelete:\n DELETE = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L555_C8", "label": "DELETE =", "type": "assigned_variable", "loc": [555, 555], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L554_C4", "vector": [14, 2, 0.9686, 0.0017, 2, 0.62, 0.0, 77, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "DELETE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " DELETE = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L556_C4", "label": "if", "type": "if", "loc": [556, 557], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "vector": [4, 1, 0.9712, 0.0035, 1, 0.81, 0.9, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if opts.output:\n OUTPUT = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L557_C8", "label": "OUTPUT =", "type": "assigned_variable", "loc": [557, 557], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L556_C4", "vector": [14, 2, 0.9721, 0.0017, 2, 0.11, 0.0, 592, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "OUTPUT", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " OUTPUT = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L558_C4", "label": "if", "type": "if", "loc": [558, 568], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "vector": [4, 1, 0.9825, 0.0192, 1, 0.81, 1.0, 0, 7, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if opts.listTests:\n listTests(opts.listTests)\n else:\n # Eliminate script-specific command-line arguments to prevent\n # errors in unittest.\n del sys.argv[1:]\n for opt in (\"explain\", \"verbose\", \"quiet\"):\n if getattr(opts, opt):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L559_C8", "label": "listTests()", "type": "expression", "loc": [559, 559], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L558_C4", "vector": [8, 2, 0.9756, 0.0017, 2, 0.4, 0.0, 866, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "listTests", "arg_names": [], "import_names": [], "rhs_call_name": "listTests", "annotation": ""}, "snippet": " listTests(opts.listTests)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L564_C8", "label": "for opt", "type": "for", "loc": [564, 566], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L558_C4", "vector": [6, 2, 0.986, 0.0052, 2, 0.4, 0.3333, 536, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "opt", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for opt in (\"explain\", \"verbose\", \"quiet\"):\n if getattr(opts, opt):\n sys.argv.append(\"--\" + opt)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L565_C12", "label": "if", "type": "if", "loc": [565, 566], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L564_C8", "vector": [4, 3, 0.9869, 0.0035, 3, 0.22, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if getattr(opts, opt):\n sys.argv.append(\"--\" + opt)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L566_C16", "label": "append()", "type": "expression", "loc": [566, 566], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L565_C12", "vector": [8, 4, 0.9878, 0.0017, 4, 0.2, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " sys.argv.append(\"--\" + opt)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L567_C8", "label": "extend()", "type": "expression", "loc": [567, 567], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L558_C4", "vector": [8, 2, 0.9895, 0.0017, 2, 0.4, 0.6667, 660, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "extend", "arg_names": [], "import_names": [], "rhs_call_name": "extend", "annotation": ""}, "snippet": " sys.argv.extend(files)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L568_C8", "label": "main()", "type": "expression", "loc": [568, 568], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L558_C4", "vector": [8, 2, 0.9913, 0.0017, 2, 0.4, 1.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " unittest.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L570_C0", "label": "if", "type": "if", "loc": [570, 571], "level": 0, "parent": null, "vector": [4, 0, 0.9956, 0.0035, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L571_C4", "label": "main()", "type": "expression", "loc": [571, 571], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L570_C0", "vector": [8, 1, 0.9965, 0.0017, 1, 0.75, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1483:Try_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:ImportFrom_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:Try_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L28_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L29_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L29_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L32_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L29_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L36_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L29_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L37_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L29_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L38_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:Try_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:ImportFrom_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L58_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L59_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L60_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L71_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L72_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L73_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L75_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L75_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L76_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L78_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L79_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L78_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L80_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L78_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L81_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L84_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L84_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L85_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L84_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L86_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L86_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L87_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L86_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L88_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L88_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L89_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L86_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L91_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L109_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L110_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L112_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L113_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L113_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L114_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L113_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L116_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L117_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L94_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L118_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L121_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L121_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L124_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L121_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L125_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L121_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L128_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L131_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L131_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L132_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L131_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L133_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L131_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L137_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L144_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L145_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L146_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L148_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L149_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L140_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L150_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L153_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L154_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L156_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L157_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L158_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L160_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L160_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L161_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L160_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L162_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L162_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Return_L163_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L160_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L164_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L160_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L160_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L166_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L166_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L167_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L166_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L168_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L168_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Return_L169_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L160_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Return_L170_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L172_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L173_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L174_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L175_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L176_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L177_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L177_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L178_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Return_L179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L181_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L181_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L182_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L181_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L183_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L181_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L184_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L181_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L185_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L181_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L186_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L181_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L187_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L181_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Return_L188_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L190_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L191_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L192_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L192_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L193_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L192_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L195_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L197_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L197_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L198_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L197_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L201_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Return_L203_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L205_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L205_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L206_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L205_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L216_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L205_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L217_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L217_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L218_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L217_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L220_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L217_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L221_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L224_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L225_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L224_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L227_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L224_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L228_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L224_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L229_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L236_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L237_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L237_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L238_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L237_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L239_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L236_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L241_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L241_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L242_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L241_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L243_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L236_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L245_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L246_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L247_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L250_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L251_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L251_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L252_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L251_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L253_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L250_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L255_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L255_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L256_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L255_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L257_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L250_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L259_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L259_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L260_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L259_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L261_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L265_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L265_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L266_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L265_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L267_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L269_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L269_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L270_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L269_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L271_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L264_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L273_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L273_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L274_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L273_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L275_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L277_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L278_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L278_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L279_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L278_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L280_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L278_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L281_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L278_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L282_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L277_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L284_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L284_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L285_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L284_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L286_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L284_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L287_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L284_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L288_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L277_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L290_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L290_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L291_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L290_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L292_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L290_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L293_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L290_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L294_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L297_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L298_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L298_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L299_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L298_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L300_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L298_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L301_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L298_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L302_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L297_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L304_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L304_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L305_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L304_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L306_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L304_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L307_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L304_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L308_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L297_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L310_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L310_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L311_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L310_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L312_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L310_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L313_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L310_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L314_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L317_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L318_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L318_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L319_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L318_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L320_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L318_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L321_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L318_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L322_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L317_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L324_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L324_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L325_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L324_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L326_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L324_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L327_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L324_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L328_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L317_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L330_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L330_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L331_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L330_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L332_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L330_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L333_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L330_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L334_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L337_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L338_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L338_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L339_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L338_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L340_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L338_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L341_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L337_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L343_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L343_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L344_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L343_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L345_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L337_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L347_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L347_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L348_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L347_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L349_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L352_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L353_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L354_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L355_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L356_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L357_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L358_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L359_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L360_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L352_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L362_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L362_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L363_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L362_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L364_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L362_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L365_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L362_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L366_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L352_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L368_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L368_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L369_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L368_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L370_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L368_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L371_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L368_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L372_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L375_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L376_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L376_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L377_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L376_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L378_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L376_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L379_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L375_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L381_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L382_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L383_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L381_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L384_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L375_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L386_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L386_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L387_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L386_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L388_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L386_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L389_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L392_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L393_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L393_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L394_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L393_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L395_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L393_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L396_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L392_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L398_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L398_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L399_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L398_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L400_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L398_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L401_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L398_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L402_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L392_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L404_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L404_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L405_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L404_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L406_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L404_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L407_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L404_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L408_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L411_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L412_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L412_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L413_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L412_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L414_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L412_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L415_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L412_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L416_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L412_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L417_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L411_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L419_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L419_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L420_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L419_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L421_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L419_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L422_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L411_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L424_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L424_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L425_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L424_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L426_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L424_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L427_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L430_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L431_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L431_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L432_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L431_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L433_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L430_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L435_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L435_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L436_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L435_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L437_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L430_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L439_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L439_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L440_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L439_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L441_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L444_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L445_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L444_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L447_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L447_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L448_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L444_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L450_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L450_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L451_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L444_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L453_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L453_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L454_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L457_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L458_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L458_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L459_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L458_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L460_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L458_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L461_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L458_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L462_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L458_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L463_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L457_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L465_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L465_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L466_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L465_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L467_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L465_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L468_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L457_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L470_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L470_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L471_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L470_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L472_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L470_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L473_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L476_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L477_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L477_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L478_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L477_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L479_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L477_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L480_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L477_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L481_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L477_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L482_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L476_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L484_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L484_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L485_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L484_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L486_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L484_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L487_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L476_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L489_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L489_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L490_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L489_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L491_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L489_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L492_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L495_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L496_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L495_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L498_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L498_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L499_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L495_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L501_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L501_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L502_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L495_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L504_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L504_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L505_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L508_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L509_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L508_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L512_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L512_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L513_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L512_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L514_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L512_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L515_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L508_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L517_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L517_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L518_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L517_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L519_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L517_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L520_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:ClassDef_L508_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L522_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L522_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L523_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L522_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L524_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L522_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L525_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L527_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L528_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L527_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L532_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L527_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L533_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L527_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:While_L534_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:While_L534_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L535_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:While_L534_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L536_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:While_L534_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L538_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:While_L534_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L539_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L539_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L540_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L527_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L541_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L545_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L546_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L547_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L548_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L550_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L551_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L552_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L553_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L554_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L554_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L555_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L556_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L556_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Assign_L557_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:FunctionDef_L543_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L558_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L558_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L559_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L558_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L564_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:For_L564_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L565_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L565_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L566_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L558_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L567_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L558_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L568_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1483:If_L570_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1483:Expr_L571_C4"}]
#!/usr/bin/env python ''' Core module of Cheetah's Unit-testing framework TODO ================================================================================ # combo tests # negative test cases for expected exceptions # black-box vs clear-box testing # do some tests that run the Template for long enough to check that the refresh code works ''' import sys import unittest from Cheetah.Tests import SyntaxAndOutput from Cheetah.Tests import NameMapper from Cheetah.Tests import Misc from Cheetah.Tests import Filters from Cheetah.Tests import Template from Cheetah.Tests import Cheps from Cheetah.Tests import Parser from Cheetah.Tests import Regressions from Cheetah.Tests import Unicode from Cheetah.Tests import CheetahWrapper from Cheetah.Tests import Analyzer SyntaxAndOutput.install_eols() suites = [ unittest.findTestCases(SyntaxAndOutput), unittest.findTestCases(NameMapper), unittest.findTestCases(Filters), unittest.findTestCases(Template), #unittest.findTestCases(Cheps), unittest.findTestCases(Regressions), unittest.findTestCases(Unicode), unittest.findTestCases(Misc), unittest.findTestCases(Parser), unittest.findTestCases(Analyzer), ] if not sys.platform.startswith('java'): suites.append(unittest.findTestCases(CheetahWrapper)) if __name__ == '__main__': runner = unittest.TextTestRunner() if 'xml' in sys.argv: import xmlrunner runner = xmlrunner.XMLTestRunner(filename='Cheetah-Tests.xml') results = runner.run(unittest.TestSuite(suites))
ajibawa-2023/Python-Code-Large/train/row_1484
24
53
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1484:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 11], "level": 0, "parent": null, "vector": [8, 0, 0.1226, 0.1887, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nCore module of Cheetah's Unit-testing framework\n\nTODO\n================================================================================\n# combo tests\n# negative test cases for expected exceptions\n# black-box vs clear-box testing"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:Import_L13_C0", "label": "sys import sys", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.2453, 0.0189, 0, 0.66, 0.0588, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:Import_L14_C0", "label": "unittest import unittest", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.2642, 0.0189, 0, 0.66, 0.1176, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], "rhs_call_name": "", "annotation": ""}, "snippet": "import unittest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:ImportFrom_L16_C0", "label": "from Cheetah.Tests import SyntaxAndOutput", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.3019, 0.0189, 0, 0.66, 0.1765, 815, 0, 1, 0, 0, 815, 0, 0], "semantic": {"name": "Cheetah.Tests", "arg_names": [], "import_names": ["SyntaxAndOutput"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Tests import SyntaxAndOutput"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:ImportFrom_L17_C0", "label": "from Cheetah.Tests import NameMapper", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.3208, 0.0189, 0, 0.66, 0.2353, 815, 0, 1, 0, 0, 815, 0, 0], "semantic": {"name": "Cheetah.Tests", "arg_names": [], "import_names": ["NameMapper"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Tests import NameMapper"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:ImportFrom_L18_C0", "label": "from Cheetah.Tests import Misc", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.3396, 0.0189, 0, 0.66, 0.2941, 815, 0, 1, 0, 0, 815, 0, 0], "semantic": {"name": "Cheetah.Tests", "arg_names": [], "import_names": ["Misc"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Tests import Misc"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:ImportFrom_L19_C0", "label": "from Cheetah.Tests import Filters", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.3585, 0.0189, 0, 0.66, 0.3529, 815, 0, 1, 0, 0, 815, 0, 0], "semantic": {"name": "Cheetah.Tests", "arg_names": [], "import_names": ["Filters"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Tests import Filters"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:ImportFrom_L20_C0", "label": "from Cheetah.Tests import Template", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.3774, 0.0189, 0, 0.66, 0.4118, 815, 0, 1, 0, 0, 815, 0, 0], "semantic": {"name": "Cheetah.Tests", "arg_names": [], "import_names": ["Template"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Tests import Template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:ImportFrom_L21_C0", "label": "from Cheetah.Tests import Cheps", "type": "import", "loc": [21, 21], "level": 0, "parent": null, "vector": [1, 0, 0.3962, 0.0189, 0, 0.66, 0.4706, 815, 0, 1, 0, 0, 815, 0, 0], "semantic": {"name": "Cheetah.Tests", "arg_names": [], "import_names": ["Cheps"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Tests import Cheps"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:ImportFrom_L22_C0", "label": "from Cheetah.Tests import Parser", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.4151, 0.0189, 0, 0.66, 0.5294, 815, 0, 1, 0, 0, 815, 0, 0], "semantic": {"name": "Cheetah.Tests", "arg_names": [], "import_names": ["Parser"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Tests import Parser"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:ImportFrom_L23_C0", "label": "from Cheetah.Tests import Regressions", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.434, 0.0189, 0, 0.66, 0.5882, 815, 0, 1, 0, 0, 815, 0, 0], "semantic": {"name": "Cheetah.Tests", "arg_names": [], "import_names": ["Regressions"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Tests import Regressions"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:ImportFrom_L24_C0", "label": "from Cheetah.Tests import Unicode", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.4528, 0.0189, 0, 0.66, 0.6471, 815, 0, 1, 0, 0, 815, 0, 0], "semantic": {"name": "Cheetah.Tests", "arg_names": [], "import_names": ["Unicode"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Tests import Unicode"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:ImportFrom_L25_C0", "label": "from Cheetah.Tests import CheetahWrapper", "type": "import", "loc": [25, 25], "level": 0, "parent": null, "vector": [1, 0, 0.4717, 0.0189, 0, 0.66, 0.7059, 815, 0, 1, 0, 0, 815, 0, 0], "semantic": {"name": "Cheetah.Tests", "arg_names": [], "import_names": ["CheetahWrapper"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Tests import CheetahWrapper"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:ImportFrom_L26_C0", "label": "from Cheetah.Tests import Analyzer", "type": "import", "loc": [26, 26], "level": 0, "parent": null, "vector": [1, 0, 0.4906, 0.0189, 0, 0.66, 0.7647, 815, 0, 1, 0, 0, 815, 0, 0], "semantic": {"name": "Cheetah.Tests", "arg_names": [], "import_names": ["Analyzer"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Tests import Analyzer"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:Expr_L28_C0", "label": "install_eols()", "type": "expression", "loc": [28, 28], "level": 0, "parent": null, "vector": [8, 0, 0.5283, 0.0189, 0, 0.66, 0.8235, 435, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "install_eols", "arg_names": [], "import_names": [], "rhs_call_name": "install_eols", "annotation": ""}, "snippet": "SyntaxAndOutput.install_eols()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:Assign_L30_C0", "label": "suites =", "type": "assigned_variable", "loc": [30, 41], "level": 0, "parent": null, "vector": [14, 0, 0.6698, 0.2264, 0, 0.66, 0.8824, 481, 0, 0, 0, 0, 0, 5, 9], "semantic": {"name": "suites", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "suites = [\n unittest.findTestCases(SyntaxAndOutput),\n unittest.findTestCases(NameMapper),\n unittest.findTestCases(Filters),\n unittest.findTestCases(Template),\n #unittest.findTestCases(Cheps),\n unittest.findTestCases(Regressions),\n unittest.findTestCases(Unicode),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:If_L43_C0", "label": "if", "type": "if", "loc": [43, 44], "level": 0, "parent": null, "vector": [4, 0, 0.8208, 0.0377, 0, 0.66, 0.9412, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if not sys.platform.startswith('java'):\n suites.append(unittest.findTestCases(CheetahWrapper))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:Expr_L44_C4", "label": "append()", "type": "expression", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1484:If_L43_C0", "vector": [8, 1, 0.8302, 0.0189, 1, 0.04, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " suites.append(unittest.findTestCases(CheetahWrapper))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:If_L46_C0", "label": "if", "type": "if", "loc": [46, 52], "level": 0, "parent": null, "vector": [4, 0, 0.9245, 0.1321, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n runner = unittest.TextTestRunner()\n if 'xml' in sys.argv:\n import xmlrunner\n runner = xmlrunner.XMLTestRunner(filename='Cheetah-Tests.xml')\n \n results = runner.run(unittest.TestSuite(suites))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:Assign_L47_C4", "label": "runner = TextTestRunner()", "type": "assigned_variable", "loc": [47, 47], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1484:If_L46_C0", "vector": [14, 1, 0.8868, 0.0189, 1, 0.47, 0.0, 180, 3, 0, 0, 0, 130, 10, 1], "semantic": {"name": "runner", "arg_names": [], "import_names": [], "rhs_call_name": "TextTestRunner", "annotation": ""}, "snippet": " runner = unittest.TextTestRunner()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:If_L48_C4", "label": "if", "type": "if", "loc": [48, 50], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1484:If_L46_C0", "vector": [4, 1, 0.9245, 0.0566, 1, 0.47, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'xml' in sys.argv:\n import xmlrunner\n runner = xmlrunner.XMLTestRunner(filename='Cheetah-Tests.xml')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:Import_L49_C8", "label": "xmlrunner import xmlrunner", "type": "import", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1484:If_L48_C4", "vector": [1, 2, 0.9245, 0.0189, 2, 0.9, 0.0, 249, 0, 1, 0, 0, 249, 0, 0], "semantic": {"name": "xmlrunner", "arg_names": [], "import_names": ["xmlrunner"], "rhs_call_name": "", "annotation": ""}, "snippet": " import xmlrunner"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:Assign_L50_C8", "label": "runner = XMLTestRunner()", "type": "assigned_variable", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1484:If_L48_C4", "vector": [14, 2, 0.9434, 0.0189, 2, 0.9, 1.0, 180, 3, 1, 0, 0, 746, 10, 1], "semantic": {"name": "runner", "arg_names": [], "import_names": [], "rhs_call_name": "XMLTestRunner", "annotation": ""}, "snippet": " runner = xmlrunner.XMLTestRunner(filename='Cheetah-Tests.xml')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1484:Assign_L52_C4", "label": "results = run()", "type": "assigned_variable", "loc": [52, 52], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1484:If_L46_C0", "vector": [14, 1, 0.9811, 0.0189, 1, 0.47, 1.0, 143, 3, 1, 0, 0, 679, 10, 2], "semantic": {"name": "results", "arg_names": [], "import_names": [], "rhs_call_name": "run", "annotation": ""}, "snippet": " results = runner.run(unittest.TestSuite(suites))"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1484:If_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1484:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1484:If_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1484:Assign_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1484:If_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1484:If_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1484:If_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1484:Import_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1484:If_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1484:Assign_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1484:If_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1484:Assign_L52_C4"}]
""" XML Test Runner for PyUnit """ # Written by Sebastian Rittau <srittau@jroger.in-berlin.de> and placed in # the Public Domain. With contributions by Paolo Borelli. __revision__ = "$Id: /private/python/stdlib/xmlrunner.py 16654 2007-11-12T12:46:35.368945Z srittau $" import os.path import re import sys import time import traceback import unittest from StringIO import StringIO from xml.sax.saxutils import escape from StringIO import StringIO class _TestInfo(object): """Information about a particular test. Used by _XMLTestResult. """ def __init__(self, test, time): _pieces = test.id().split('.') (self._class, self._method) = ('.'.join(_pieces[:-1]), _pieces[-1]) self._time = time self._error = None self._failure = None def print_report(self, stream): """Print information about this test case in XML format to the supplied stream. """ stream.write(' <testcase classname="%(class)s" name="%(method)s" time="%(time).4f">' % \ { "class": self._class, "method": self._method, "time": self._time, }) if self._failure != None: self._print_error(stream, 'failure', self._failure) if self._error != None: self._print_error(stream, 'error', self._error) stream.write('</testcase>\n') def _print_error(self, stream, tagname, error): """Print information from a failure or error to the supplied stream.""" text = escape(str(error[1])) stream.write('\n') stream.write(' <%s type="%s">%s\n' \ % (tagname, issubclass(error[0], Exception) and error[0].__name__ or str(error[0]), text)) tb_stream = StringIO() traceback.print_tb(error[2], None, tb_stream) stream.write(escape(tb_stream.getvalue())) stream.write(' </%s>\n' % tagname) stream.write(' ') # Module level functions since Python 2.3 doesn't grok decorators def create_success(test, time): """Create a _TestInfo instance for a successful test.""" return _TestInfo(test, time) def create_failure(test, time, failure): """Create a _TestInfo instance for a failed test.""" info = _TestInfo(test, time) info._failure = failure return info def create_error(test, time, error): """Create a _TestInfo instance for an erroneous test.""" info = _TestInfo(test, time) info._error = error return info class _XMLTestResult(unittest.TestResult): """A test result class that stores result as XML. Used by XMLTestRunner. """ def __init__(self, classname): unittest.TestResult.__init__(self) self._test_name = classname self._start_time = None self._tests = [] self._error = None self._failure = None def startTest(self, test): unittest.TestResult.startTest(self, test) self._error = None self._failure = None self._start_time = time.time() def stopTest(self, test): time_taken = time.time() - self._start_time unittest.TestResult.stopTest(self, test) if self._error: info = create_error(test, time_taken, self._error) elif self._failure: info = create_failure(test, time_taken, self._failure) else: info = create_success(test, time_taken) self._tests.append(info) def addError(self, test, err): unittest.TestResult.addError(self, test, err) self._error = err def addFailure(self, test, err): unittest.TestResult.addFailure(self, test, err) self._failure = err def print_report(self, stream, time_taken, out, err): """Prints the XML report to the supplied stream. The time the tests took to perform as well as the captured standard output and standard error streams must be passed in.a """ stream.write('<testsuite errors="%(e)d" failures="%(f)d" ' % \ { "e": len(self.errors), "f": len(self.failures) }) stream.write('name="%(n)s" tests="%(t)d" time="%(time).3f">\n' % \ { "n": self._test_name, "t": self.testsRun, "time": time_taken, }) for info in self._tests: info.print_report(stream) stream.write(' <system-out><![CDATA[%s]]></system-out>\n' % out) stream.write(' <system-err><![CDATA[%s]]></system-err>\n' % err) stream.write('</testsuite>\n') class XMLTestRunner(object): """A test runner that stores results in XML format compatible with JUnit. XMLTestRunner(stream=None) -> XML test runner The XML file is written to the supplied stream. If stream is None, the results are stored in a file called TEST-<module>.<class>.xml in the current working directory (if not overridden with the path property), where <module> and <class> are the module and class name of the test class. """ def __init__(self, *args, **kwargs): self._stream = kwargs.get('stream') self._filename = kwargs.get('filename') self._path = "." def run(self, test): """Run the given test case or test suite.""" class_ = test.__class__ classname = class_.__module__ + "." + class_.__name__ if self._stream == None: filename = "TEST-%s.xml" % classname if self._filename: filename = self._filename stream = file(os.path.join(self._path, filename), "w") stream.write('<?xml version="1.0" encoding="utf-8"?>\n') else: stream = self._stream result = _XMLTestResult(classname) start_time = time.time() # TODO: Python 2.5: Use the with statement old_stdout = sys.stdout old_stderr = sys.stderr sys.stdout = StringIO() sys.stderr = StringIO() try: test(result) try: out_s = sys.stdout.getvalue() except AttributeError: out_s = "" try: err_s = sys.stderr.getvalue() except AttributeError: err_s = "" finally: sys.stdout = old_stdout sys.stderr = old_stderr time_taken = time.time() - start_time result.print_report(stream, time_taken, out_s, err_s) if self._stream == None: stream.close() return result def _set_path(self, path): self._path = path path = property(lambda self: self._path, _set_path, None, """The path where the XML files are stored. This property is ignored when the XML file is written to a file stream.""") class XMLTestRunnerTest(unittest.TestCase): def setUp(self): self._stream = StringIO() def _try_test_run(self, test_class, expected): """Run the test suite against the supplied test class and compare the XML result against the expected XML string. Fail if the expected string doesn't match the actual string. All time attribute in the expected string should have the value "0.000". All error and failure messages are reduced to "Foobar". """ runner = XMLTestRunner(self._stream) runner.run(unittest.makeSuite(test_class)) got = self._stream.getvalue() # Replace all time="X.YYY" attributes by time="0.000" to enable a # simple string comparison. got = re.sub(r'time="\d+\.\d+"', 'time="0.000"', got) # Likewise, replace all failure and error messages by a simple "Foobar" # string. got = re.sub(r'(?s)<failure (.*?)>.*?</failure>', r'<failure \1>Foobar</failure>', got) got = re.sub(r'(?s)<error (.*?)>.*?</error>', r'<error \1>Foobar</error>', got) self.assertEqual(expected, got) def test_no_tests(self): """Regression test: Check whether a test run without any tests matches a previous run. """ class TestTest(unittest.TestCase): pass self._try_test_run(TestTest, """<testsuite errors="0" failures="0" name="unittest.TestSuite" tests="0" time="0.000"> <system-out><![CDATA[]]></system-out> <system-err><![CDATA[]]></system-err> </testsuite> """) def test_success(self): """Regression test: Check whether a test run with a successful test matches a previous run. """ class TestTest(unittest.TestCase): def test_foo(self): pass self._try_test_run(TestTest, """<testsuite errors="0" failures="0" name="unittest.TestSuite" tests="1" time="0.000"> <testcase classname="__main__.TestTest" name="test_foo" time="0.000"></testcase> <system-out><![CDATA[]]></system-out> <system-err><![CDATA[]]></system-err> </testsuite> """) def test_failure(self): """Regression test: Check whether a test run with a failing test matches a previous run. """ class TestTest(unittest.TestCase): def test_foo(self): self.assert_(False) self._try_test_run(TestTest, """<testsuite errors="0" failures="1" name="unittest.TestSuite" tests="1" time="0.000"> <testcase classname="__main__.TestTest" name="test_foo" time="0.000"> <failure type="exceptions.AssertionError">Foobar</failure> </testcase> <system-out><![CDATA[]]></system-out> <system-err><![CDATA[]]></system-err> </testsuite> """) def test_error(self): """Regression test: Check whether a test run with a erroneous test matches a previous run. """ class TestTest(unittest.TestCase): def test_foo(self): raise IndexError() self._try_test_run(TestTest, """<testsuite errors="1" failures="0" name="unittest.TestSuite" tests="1" time="0.000"> <testcase classname="__main__.TestTest" name="test_foo" time="0.000"> <error type="exceptions.IndexError">Foobar</error> </testcase> <system-out><![CDATA[]]></system-out> <system-err><![CDATA[]]></system-err> </testsuite> """) def test_stdout_capture(self): """Regression test: Check whether a test run with output to stdout matches a previous run. """ class TestTest(unittest.TestCase): def test_foo(self): print("Test") self._try_test_run(TestTest, """<testsuite errors="0" failures="0" name="unittest.TestSuite" tests="1" time="0.000"> <testcase classname="__main__.TestTest" name="test_foo" time="0.000"></testcase> <system-out><![CDATA[Test ]]></system-out> <system-err><![CDATA[]]></system-err> </testsuite> """) def test_stderr_capture(self): """Regression test: Check whether a test run with output to stderr matches a previous run. """ class TestTest(unittest.TestCase): def test_foo(self): sys.stderr.write('Test\n') self._try_test_run(TestTest, """<testsuite errors="0" failures="0" name="unittest.TestSuite" tests="1" time="0.000"> <testcase classname="__main__.TestTest" name="test_foo" time="0.000"></testcase> <system-out><![CDATA[]]></system-out> <system-err><![CDATA[Test ]]></system-err> </testsuite> """) class NullStream(object): """A file-like object that discards everything written to it.""" def write(self, buffer): pass def test_unittests_changing_stdout(self): """Check whether the XMLTestRunner recovers gracefully from unit tests that change stdout, but don't change it back properly. """ class TestTest(unittest.TestCase): def test_foo(self): sys.stdout = XMLTestRunnerTest.NullStream() runner = XMLTestRunner(self._stream) runner.run(unittest.makeSuite(TestTest)) def test_unittests_changing_stderr(self): """Check whether the XMLTestRunner recovers gracefully from unit tests that change stderr, but don't change it back properly. """ class TestTest(unittest.TestCase): def test_foo(self): sys.stderr = XMLTestRunnerTest.NullStream() runner = XMLTestRunner(self._stream) runner.run(unittest.makeSuite(TestTest)) class XMLTestProgram(unittest.TestProgram): def runTests(self): if self.testRunner is None: self.testRunner = XMLTestRunner() unittest.TestProgram.runTests(self) main = XMLTestProgram if __name__ == "__main__": main(module=None)
ajibawa-2023/Python-Code-Large/train/row_1485
198
381
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0052, 0.0079, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nXML Test Runner for PyUnit\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L8_C0", "label": "__revision__ =", "type": "assigned_variable", "loc": [8, 8], "level": 0, "parent": null, "vector": [14, 0, 0.021, 0.0026, 0, 0.66, 0.05, 809, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__revision__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__revision__ = \"$Id: /private/python/stdlib/xmlrunner.py 16654 2007-11-12T12:46:35.368945Z srittau $\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Import_L10_C0", "label": "os.path import os.path", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0262, 0.0026, 0, 0.66, 0.1, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os.path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Import_L11_C0", "label": "re import re", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.0289, 0.0026, 0, 0.66, 0.15, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Import_L12_C0", "label": "sys import sys", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.0315, 0.0026, 0, 0.66, 0.2, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Import_L13_C0", "label": "time import time", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0341, 0.0026, 0, 0.66, 0.25, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Import_L14_C0", "label": "traceback import traceback", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0367, 0.0026, 0, 0.66, 0.3, 423, 0, 1, 0, 0, 423, 0, 0], "semantic": {"name": "traceback", "arg_names": [], "import_names": ["traceback"], "rhs_call_name": "", "annotation": ""}, "snippet": "import traceback"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Import_L15_C0", "label": "unittest import unittest", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0394, 0.0026, 0, 0.66, 0.35, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], "rhs_call_name": "", "annotation": ""}, "snippet": "import unittest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ImportFrom_L16_C0", "label": "from StringIO import StringIO", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.042, 0.0026, 0, 0.66, 0.4, 609, 0, 1, 0, 0, 609, 0, 0], "semantic": {"name": "StringIO", "arg_names": [], "import_names": ["StringIO"], "rhs_call_name": "", "annotation": ""}, "snippet": "from StringIO import StringIO"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ImportFrom_L17_C0", "label": "from xml.sax.saxutils import escape", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.0446, 0.0026, 0, 0.66, 0.45, 759, 0, 1, 0, 0, 759, 0, 0], "semantic": {"name": "xml.sax.saxutils", "arg_names": [], "import_names": ["escape"], "rhs_call_name": "", "annotation": ""}, "snippet": "from xml.sax.saxutils import escape"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ImportFrom_L19_C0", "label": "from StringIO import StringIO", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.0499, 0.0026, 0, 0.66, 0.5, 609, 0, 1, 0, 0, 609, 0, 0], "semantic": {"name": "StringIO", "arg_names": [], "import_names": ["StringIO"], "rhs_call_name": "", "annotation": ""}, "snippet": "from StringIO import StringIO"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L23_C0", "label": "_TestInfo", "type": "class", "loc": [23, 66], "level": 0, "parent": null, "vector": [3, 0, 0.1168, 0.1155, 0, 0.66, 0.55, 270, 0, 3, 0, 0, 186, 0, 20], "semantic": {"name": "_TestInfo", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class _TestInfo(object):\n\n \"\"\"Information about a particular test.\n \n Used by _XMLTestResult.\n \n \"\"\"\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L25_C4", "label": "expression", "type": "expression", "loc": [25, 29], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L23_C0", "vector": [8, 1, 0.0709, 0.0131, 1, 0.22, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Information about a particular test.\n \n Used by _XMLTestResult.\n \n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L31_C4", "label": "__init__", "type": "function", "loc": [31, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L23_C0", "vector": [2, 1, 0.0879, 0.0157, 1, 0.22, 0.3333, 555, 0, 3, 0, 0, 0, 0, 3], "semantic": {"name": "__init__", "arg_names": ["self", "test", "time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, test, time):\n _pieces = test.id().split('.')\n (self._class, self._method) = ('.'.join(_pieces[:-1]), _pieces[-1])\n self._time = time\n self._error = None\n self._failure = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L32_C8", "label": "_pieces = split()", "type": "assigned_variable", "loc": [32, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L31_C4", "vector": [14, 2, 0.084, 0.0026, 2, 0.91, 0.0, 706, 3, 1, 0, 0, 908, 10, 2], "semantic": {"name": "_pieces", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " _pieces = test.id().split('.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L33_C8", "label": "assign", "type": "assigned_variable", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L31_C4", "vector": [14, 2, 0.0866, 0.0026, 2, 0.91, 0.25, 0, 0, 0, 0, 0, 0, 8, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " (self._class, self._method) = ('.'.join(_pieces[:-1]), _pieces[-1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L34_C8", "label": "self._time =", "type": "assigned_variable", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L31_C4", "vector": [14, 2, 0.0892, 0.0026, 2, 0.91, 0.5, 102, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._time = time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L35_C8", "label": "self._error =", "type": "assigned_variable", "loc": [35, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L31_C4", "vector": [14, 2, 0.0919, 0.0026, 2, 0.91, 0.75, 654, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._error", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._error = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L36_C8", "label": "self._failure =", "type": "assigned_variable", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L31_C4", "vector": [14, 2, 0.0945, 0.0026, 2, 0.91, 1.0, 434, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._failure", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._failure = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L39_C4", "label": "print_report", "type": "function", "loc": [39, 54], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L23_C0", "vector": [2, 1, 0.122, 0.042, 1, 0.22, 0.6667, 160, 0, 2, 0, 0, 0, 0, 4], "semantic": {"name": "print_report", "arg_names": ["self", "stream"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def print_report(self, stream):\n \"\"\"Print information about this test case in XML format to the\n supplied stream.\n\n \"\"\"\n stream.write(' <testcase classname=\"%(class)s\" name=\"%(method)s\" time=\"%(time).4f\">' % \\\n {\n \"class\": self._class,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L40_C8", "label": "expression", "type": "expression", "loc": [40, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L39_C4", "vector": [8, 2, 0.1089, 0.0105, 2, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Print information about this test case in XML format to the\n supplied stream.\n\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L44_C8", "label": "write()", "type": "expression", "loc": [44, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L39_C4", "vector": [8, 2, 0.122, 0.0157, 2, 0.66, 0.25, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " stream.write(' <testcase classname=\"%(class)s\" name=\"%(method)s\" time=\"%(time).4f\">' % \\\n {\n \"class\": self._class,\n \"method\": self._method,\n \"time\": self._time,\n })"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L50_C8", "label": "if", "type": "if", "loc": [50, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L39_C4", "vector": [4, 2, 0.1325, 0.0052, 2, 0.66, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._failure != None:\n self._print_error(stream, 'failure', self._failure)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L51_C12", "label": "_print_error()", "type": "expression", "loc": [51, 51], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L50_C8", "vector": [8, 3, 0.1339, 0.0026, 3, 0.84, 0.0, 468, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "_print_error", "arg_names": [], "import_names": [], "rhs_call_name": "_print_error", "annotation": ""}, "snippet": " self._print_error(stream, 'failure', self._failure)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L52_C8", "label": "if", "type": "if", "loc": [52, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L39_C4", "vector": [4, 2, 0.1378, 0.0052, 2, 0.66, 0.75, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._error != None:\n self._print_error(stream, 'error', self._error)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L53_C12", "label": "_print_error()", "type": "expression", "loc": [53, 53], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L52_C8", "vector": [8, 3, 0.1391, 0.0026, 3, 0.05, 0.0, 468, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "_print_error", "arg_names": [], "import_names": [], "rhs_call_name": "_print_error", "annotation": ""}, "snippet": " self._print_error(stream, 'error', self._error)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L54_C8", "label": "write()", "type": "expression", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L39_C4", "vector": [8, 2, 0.1417, 0.0026, 2, 0.66, 1.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " stream.write('</testcase>\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "label": "_print_error", "type": "function", "loc": [56, 66], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L23_C0", "vector": [2, 1, 0.1601, 0.0289, 1, 0.22, 1.0, 468, 0, 4, 0, 0, 0, 0, 13], "semantic": {"name": "_print_error", "arg_names": ["self", "stream", "tagname", "error"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _print_error(self, stream, tagname, error):\n \"\"\"Print information from a failure or error to the supplied stream.\"\"\"\n text = escape(str(error[1]))\n stream.write('\\n')\n stream.write(' <%s type=\"%s\">%s\\n' \\\n % (tagname, issubclass(error[0], Exception) and error[0].__name__ or str(error[0]), text))\n tb_stream = StringIO()\n traceback.print_tb(error[2], None, tb_stream)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L57_C8", "label": "expression", "type": "expression", "loc": [57, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "vector": [8, 2, 0.1496, 0.0026, 2, 0.84, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Print information from a failure or error to the supplied stream.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L58_C8", "label": "text = escape()", "type": "assigned_variable", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "vector": [14, 2, 0.1522, 0.0026, 2, 0.84, 0.125, 439, 3, 1, 0, 0, 494, 10, 2], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "escape", "annotation": ""}, "snippet": " text = escape(str(error[1]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L59_C8", "label": "write()", "type": "expression", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "vector": [8, 2, 0.1549, 0.0026, 2, 0.84, 0.25, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " stream.write('\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L60_C8", "label": "write()", "type": "expression", "loc": [60, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "vector": [8, 2, 0.1588, 0.0052, 2, 0.84, 0.375, 837, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " stream.write(' <%s type=\"%s\">%s\\n' \\\n % (tagname, issubclass(error[0], Exception) and error[0].__name__ or str(error[0]), text))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L62_C8", "label": "tb_stream = StringIO()", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "vector": [14, 2, 0.1627, 0.0026, 2, 0.84, 0.5, 603, 3, 0, 0, 0, 609, 10, 1], "semantic": {"name": "tb_stream", "arg_names": [], "import_names": [], "rhs_call_name": "StringIO", "annotation": ""}, "snippet": " tb_stream = StringIO()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L63_C8", "label": "print_tb()", "type": "expression", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "vector": [8, 2, 0.1654, 0.0026, 2, 0.84, 0.625, 673, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "print_tb", "arg_names": [], "import_names": [], "rhs_call_name": "print_tb", "annotation": ""}, "snippet": " traceback.print_tb(error[2], None, tb_stream)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L64_C8", "label": "write()", "type": "expression", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "vector": [8, 2, 0.168, 0.0026, 2, 0.84, 0.75, 837, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " stream.write(escape(tb_stream.getvalue()))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L65_C8", "label": "write()", "type": "expression", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "vector": [8, 2, 0.1706, 0.0026, 2, 0.84, 0.875, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " stream.write(' </%s>\\n' % tagname)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L66_C8", "label": "write()", "type": "expression", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "vector": [8, 2, 0.1732, 0.0026, 2, 0.84, 1.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " stream.write(' ')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L69_C0", "label": "create_success", "type": "function", "loc": [69, 71], "level": 0, "parent": null, "vector": [2, 0, 0.1837, 0.0079, 0, 0.66, 0.6, 552, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "create_success", "arg_names": ["test", "time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def create_success(test, time):\n \"\"\"Create a _TestInfo instance for a successful test.\"\"\"\n return _TestInfo(test, time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L70_C4", "label": "expression", "type": "expression", "loc": [70, 70], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L69_C0", "vector": [8, 1, 0.1837, 0.0026, 1, 0.79, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Create a _TestInfo instance for a successful test.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Return_L71_C4", "label": "return", "type": "return", "loc": [71, 71], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L69_C0", "vector": [13, 1, 0.1864, 0.0026, 1, 0.79, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return _TestInfo(test, time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L73_C0", "label": "create_failure", "type": "function", "loc": [73, 77], "level": 0, "parent": null, "vector": [2, 0, 0.1969, 0.0131, 0, 0.66, 0.65, 664, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "create_failure", "arg_names": ["test", "time", "failure"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def create_failure(test, time, failure):\n \"\"\"Create a _TestInfo instance for a failed test.\"\"\"\n info = _TestInfo(test, time)\n info._failure = failure\n return info"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L74_C4", "label": "expression", "type": "expression", "loc": [74, 74], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L73_C0", "vector": [8, 1, 0.1942, 0.0026, 1, 0.72, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Create a _TestInfo instance for a failed test.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L75_C4", "label": "info = _TestInfo()", "type": "assigned_variable", "loc": [75, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L73_C0", "vector": [14, 1, 0.1969, 0.0026, 1, 0.72, 0.3333, 730, 3, 2, 0, 0, 270, 10, 1], "semantic": {"name": "info", "arg_names": [], "import_names": [], "rhs_call_name": "_TestInfo", "annotation": ""}, "snippet": " info = _TestInfo(test, time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L76_C4", "label": "info._failure =", "type": "assigned_variable", "loc": [76, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L73_C0", "vector": [14, 1, 0.1995, 0.0026, 1, 0.72, 0.6667, 43, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "info._failure", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " info._failure = failure"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Return_L77_C4", "label": "return", "type": "return", "loc": [77, 77], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L73_C0", "vector": [13, 1, 0.2021, 0.0026, 1, 0.72, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return info"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L79_C0", "label": "create_error", "type": "function", "loc": [79, 83], "level": 0, "parent": null, "vector": [2, 0, 0.2126, 0.0131, 0, 0.66, 0.7, 543, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "create_error", "arg_names": ["test", "time", "error"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def create_error(test, time, error):\n \"\"\"Create a _TestInfo instance for an erroneous test.\"\"\"\n info = _TestInfo(test, time)\n info._error = error\n return info"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L80_C4", "label": "expression", "type": "expression", "loc": [80, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L79_C0", "vector": [8, 1, 0.21, 0.0026, 1, 0.37, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Create a _TestInfo instance for an erroneous test.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L81_C4", "label": "info = _TestInfo()", "type": "assigned_variable", "loc": [81, 81], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L79_C0", "vector": [14, 1, 0.2126, 0.0026, 1, 0.37, 0.3333, 730, 3, 2, 0, 0, 270, 10, 1], "semantic": {"name": "info", "arg_names": [], "import_names": [], "rhs_call_name": "_TestInfo", "annotation": ""}, "snippet": " info = _TestInfo(test, time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L82_C4", "label": "info._error =", "type": "assigned_variable", "loc": [82, 82], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L79_C0", "vector": [14, 1, 0.2152, 0.0026, 1, 0.37, 0.6667, 854, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "info._error", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " info._error = error"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Return_L83_C4", "label": "return", "type": "return", "loc": [83, 83], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L79_C0", "vector": [13, 1, 0.2178, 0.0026, 1, 0.37, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return info"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L85_C0", "label": "_XMLTestResult", "type": "class", "loc": [85, 145], "level": 0, "parent": null, "vector": [3, 0, 0.3018, 0.1601, 0, 0.66, 0.75, 296, 0, 6, 0, 0, 366, 0, 19], "semantic": {"name": "_XMLTestResult", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class _XMLTestResult(unittest.TestResult):\n\n \"\"\"A test result class that stores result as XML.\n\n Used by XMLTestRunner.\n\n \"\"\"\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L87_C4", "label": "expression", "type": "expression", "loc": [87, 91], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L85_C0", "vector": [8, 1, 0.2336, 0.0131, 1, 0.12, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"A test result class that stores result as XML.\n\n Used by XMLTestRunner.\n\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L93_C4", "label": "__init__", "type": "function", "loc": [93, 99], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L85_C0", "vector": [2, 1, 0.252, 0.0184, 1, 0.12, 0.1667, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "classname"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, classname):\n unittest.TestResult.__init__(self)\n self._test_name = classname\n self._start_time = None\n self._tests = []\n self._error = None\n self._failure = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L94_C8", "label": "__init__()", "type": "expression", "loc": [94, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L93_C4", "vector": [8, 2, 0.2467, 0.0026, 2, 0.45, 0.0, 555, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " unittest.TestResult.__init__(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L95_C8", "label": "self._test_name =", "type": "assigned_variable", "loc": [95, 95], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L93_C4", "vector": [14, 2, 0.2493, 0.0026, 2, 0.45, 0.2, 895, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._test_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._test_name = classname"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L96_C8", "label": "self._start_time =", "type": "assigned_variable", "loc": [96, 96], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L93_C4", "vector": [14, 2, 0.252, 0.0026, 2, 0.45, 0.4, 910, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._start_time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._start_time = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L97_C8", "label": "self._tests =", "type": "assigned_variable", "loc": [97, 97], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L93_C4", "vector": [14, 2, 0.2546, 0.0026, 2, 0.45, 0.6, 482, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._tests", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._tests = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L98_C8", "label": "self._error =", "type": "assigned_variable", "loc": [98, 98], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L93_C4", "vector": [14, 2, 0.2572, 0.0026, 2, 0.45, 0.8, 654, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._error", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._error = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L99_C8", "label": "self._failure =", "type": "assigned_variable", "loc": [99, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L93_C4", "vector": [14, 2, 0.2598, 0.0026, 2, 0.45, 1.0, 434, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._failure", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._failure = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L101_C4", "label": "startTest", "type": "function", "loc": [101, 105], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L85_C0", "vector": [2, 1, 0.2703, 0.0131, 1, 0.12, 0.3333, 503, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "startTest", "arg_names": ["self", "test"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def startTest(self, test):\n unittest.TestResult.startTest(self, test)\n self._error = None\n self._failure = None\n self._start_time = time.time()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L102_C8", "label": "startTest()", "type": "expression", "loc": [102, 102], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L101_C4", "vector": [8, 2, 0.2677, 0.0026, 2, 0.33, 0.0, 503, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "startTest", "arg_names": [], "import_names": [], "rhs_call_name": "startTest", "annotation": ""}, "snippet": " unittest.TestResult.startTest(self, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L103_C8", "label": "self._error =", "type": "assigned_variable", "loc": [103, 103], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L101_C4", "vector": [14, 2, 0.2703, 0.0026, 2, 0.33, 0.3333, 654, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._error", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._error = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L104_C8", "label": "self._failure =", "type": "assigned_variable", "loc": [104, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L101_C4", "vector": [14, 2, 0.273, 0.0026, 2, 0.33, 0.6667, 434, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._failure", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._failure = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L105_C8", "label": "self._start_time = time()", "type": "assigned_variable", "loc": [105, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L101_C4", "vector": [14, 2, 0.2756, 0.0026, 2, 0.33, 1.0, 910, 3, 0, 0, 0, 654, 10, 1], "semantic": {"name": "self._start_time", "arg_names": [], "import_names": [], "rhs_call_name": "time", "annotation": ""}, "snippet": " self._start_time = time.time()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L107_C4", "label": "stopTest", "type": "function", "loc": [107, 116], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L85_C0", "vector": [2, 1, 0.2927, 0.0262, 1, 0.12, 0.5, 725, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "stopTest", "arg_names": ["self", "test"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def stopTest(self, test):\n time_taken = time.time() - self._start_time\n unittest.TestResult.stopTest(self, test)\n if self._error:\n info = create_error(test, time_taken, self._error)\n elif self._failure:\n info = create_failure(test, time_taken, self._failure)\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L108_C8", "label": "time_taken =", "type": "assigned_variable", "loc": [108, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L107_C4", "vector": [14, 2, 0.2835, 0.0026, 2, 0.01, 0.0, 287, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "time_taken", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " time_taken = time.time() - self._start_time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L109_C8", "label": "stopTest()", "type": "expression", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L107_C4", "vector": [8, 2, 0.2861, 0.0026, 2, 0.01, 0.3333, 725, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "stopTest", "arg_names": [], "import_names": [], "rhs_call_name": "stopTest", "annotation": ""}, "snippet": " unittest.TestResult.stopTest(self, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L110_C8", "label": "if", "type": "if", "loc": [110, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L107_C4", "vector": [4, 2, 0.2953, 0.0157, 2, 0.01, 0.6667, 0, 7, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._error:\n info = create_error(test, time_taken, self._error)\n elif self._failure:\n info = create_failure(test, time_taken, self._failure)\n else:\n info = create_success(test, time_taken)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L111_C12", "label": "info = create_error()", "type": "assigned_variable", "loc": [111, 111], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L110_C8", "vector": [14, 3, 0.2913, 0.0026, 3, 0.5, 0.0, 730, 3, 3, 0, 0, 543, 10, 1], "semantic": {"name": "info", "arg_names": [], "import_names": [], "rhs_call_name": "create_error", "annotation": ""}, "snippet": " info = create_error(test, time_taken, self._error)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L112_C8", "label": "if", "type": "if", "loc": [112, 115], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L110_C8", "vector": [4, 3, 0.2979, 0.0105, 3, 0.5, 1.0, 0, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self._failure:\n info = create_failure(test, time_taken, self._failure)\n else:\n info = create_success(test, time_taken)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L113_C12", "label": "info = create_failure()", "type": "assigned_variable", "loc": [113, 113], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L112_C8", "vector": [14, 4, 0.2966, 0.0026, 4, 0.6, 0.0, 730, 3, 3, 0, 0, 664, 10, 1], "semantic": {"name": "info", "arg_names": [], "import_names": [], "rhs_call_name": "create_failure", "annotation": ""}, "snippet": " info = create_failure(test, time_taken, self._failure)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L115_C12", "label": "info = create_success()", "type": "assigned_variable", "loc": [115, 115], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L112_C8", "vector": [14, 4, 0.3018, 0.0026, 4, 0.6, 1.0, 730, 3, 2, 0, 0, 552, 10, 1], "semantic": {"name": "info", "arg_names": [], "import_names": [], "rhs_call_name": "create_success", "annotation": ""}, "snippet": " info = create_success(test, time_taken)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L116_C8", "label": "append()", "type": "expression", "loc": [116, 116], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L107_C4", "vector": [8, 2, 0.3045, 0.0026, 2, 0.01, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._tests.append(info)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L118_C4", "label": "addError", "type": "function", "loc": [118, 120], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L85_C0", "vector": [2, 1, 0.3123, 0.0079, 1, 0.12, 0.6667, 635, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addError", "arg_names": ["self", "test", "err"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addError(self, test, err):\n unittest.TestResult.addError(self, test, err)\n self._error = err"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L119_C8", "label": "addError()", "type": "expression", "loc": [119, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L118_C4", "vector": [8, 2, 0.3123, 0.0026, 2, 0.89, 0.0, 635, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addError", "arg_names": [], "import_names": [], "rhs_call_name": "addError", "annotation": ""}, "snippet": " unittest.TestResult.addError(self, test, err)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L120_C8", "label": "self._error =", "type": "assigned_variable", "loc": [120, 120], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L118_C4", "vector": [14, 2, 0.315, 0.0026, 2, 0.89, 1.0, 654, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._error", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._error = err"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L122_C4", "label": "addFailure", "type": "function", "loc": [122, 124], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L85_C0", "vector": [2, 1, 0.3228, 0.0079, 1, 0.12, 0.8333, 242, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addFailure", "arg_names": ["self", "test", "err"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addFailure(self, test, err):\n unittest.TestResult.addFailure(self, test, err)\n self._failure = err"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L123_C8", "label": "addFailure()", "type": "expression", "loc": [123, 123], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L122_C4", "vector": [8, 2, 0.3228, 0.0026, 2, 0.31, 0.0, 242, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addFailure", "arg_names": [], "import_names": [], "rhs_call_name": "addFailure", "annotation": ""}, "snippet": " unittest.TestResult.addFailure(self, test, err)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L124_C8", "label": "self._failure =", "type": "assigned_variable", "loc": [124, 124], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L122_C4", "vector": [14, 2, 0.3255, 0.0026, 2, 0.31, 1.0, 434, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._failure", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._failure = err"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L126_C4", "label": "print_report", "type": "function", "loc": [126, 145], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L85_C0", "vector": [2, 1, 0.3556, 0.0525, 1, 0.12, 1.0, 160, 0, 5, 0, 0, 0, 0, 8], "semantic": {"name": "print_report", "arg_names": ["self", "stream", "time_taken", "out", "err"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def print_report(self, stream, time_taken, out, err):\n \"\"\"Prints the XML report to the supplied stream.\n \n The time the tests took to perform as well as the captured standard\n output and standard error streams must be passed in.a\n\n \"\"\"\n stream.write('<testsuite errors=\"%(e)d\" failures=\"%(f)d\" ' % \\"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L127_C8", "label": "expression", "type": "expression", "loc": [127, 132], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L126_C4", "vector": [8, 2, 0.3399, 0.0157, 2, 0.12, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Prints the XML report to the supplied stream.\n \n The time the tests took to perform as well as the captured standard\n output and standard error streams must be passed in.a\n\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L133_C8", "label": "write()", "type": "expression", "loc": [133, 134], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L126_C4", "vector": [8, 2, 0.3504, 0.0052, 2, 0.12, 0.1667, 837, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " stream.write('<testsuite errors=\"%(e)d\" failures=\"%(f)d\" ' % \\\n { \"e\": len(self.errors), \"f\": len(self.failures) })"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L135_C8", "label": "write()", "type": "expression", "loc": [135, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L126_C4", "vector": [8, 2, 0.3609, 0.0157, 2, 0.12, 0.3333, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " stream.write('name=\"%(n)s\" tests=\"%(t)d\" time=\"%(time).3f\">\\n' % \\\n {\n \"n\": self._test_name,\n \"t\": self.testsRun,\n \"time\": time_taken,\n })"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:For_L141_C8", "label": "for info", "type": "for", "loc": [141, 142], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L126_C4", "vector": [6, 2, 0.3714, 0.0052, 2, 0.12, 0.5, 730, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "info", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for info in self._tests:\n info.print_report(stream)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L142_C12", "label": "print_report()", "type": "expression", "loc": [142, 142], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:For_L141_C8", "vector": [8, 3, 0.3727, 0.0026, 3, 0.7, 0.0, 160, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print_report", "arg_names": [], "import_names": [], "rhs_call_name": "print_report", "annotation": ""}, "snippet": " info.print_report(stream)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L143_C8", "label": "write()", "type": "expression", "loc": [143, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L126_C4", "vector": [8, 2, 0.3753, 0.0026, 2, 0.12, 0.6667, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " stream.write(' <system-out><![CDATA[%s]]></system-out>\\n' % out)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L144_C8", "label": "write()", "type": "expression", "loc": [144, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L126_C4", "vector": [8, 2, 0.378, 0.0026, 2, 0.12, 0.8333, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " stream.write(' <system-err><![CDATA[%s]]></system-err>\\n' % err)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L145_C8", "label": "write()", "type": "expression", "loc": [145, 145], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L126_C4", "vector": [8, 2, 0.3806, 0.0026, 2, 0.12, 1.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " stream.write('</testsuite>\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L148_C0", "label": "XMLTestRunner", "type": "class", "loc": [148, 216], "level": 0, "parent": null, "vector": [3, 0, 0.4777, 0.1811, 0, 0.66, 0.8, 746, 0, 3, 0, 0, 186, 0, 16], "semantic": {"name": "XMLTestRunner", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class XMLTestRunner(object):\n\n \"\"\"A test runner that stores results in XML format compatible with JUnit.\n\n XMLTestRunner(stream=None) -> XML test runner\n\n The XML file is written to the supplied stream. If stream is None, the\n results are stored in a file called TEST-<module>.<class>.xml in the"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L150_C4", "label": "expression", "type": "expression", "loc": [150, 159], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L148_C0", "vector": [8, 1, 0.4055, 0.0262, 1, 0.72, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"A test runner that stores results in XML format compatible with JUnit.\n\n XMLTestRunner(stream=None) -> XML test runner\n\n The XML file is written to the supplied stream. If stream is None, the\n results are stored in a file called TEST-<module>.<class>.xml in the\n current working directory (if not overridden with the path property),\n where <module> and <class> are the module and class name of the test class."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L161_C4", "label": "__init__", "type": "function", "loc": [161, 164], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L148_C0", "vector": [2, 1, 0.4265, 0.0105, 1, 0.72, 0.25, 555, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, *args, **kwargs):\n self._stream = kwargs.get('stream')\n self._filename = kwargs.get('filename')\n self._path = \".\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L162_C8", "label": "self._stream = get()", "type": "assigned_variable", "loc": [162, 162], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L161_C4", "vector": [14, 2, 0.4252, 0.0026, 2, 0.81, 0.0, 214, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "self._stream", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " self._stream = kwargs.get('stream')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L163_C8", "label": "self._filename = get()", "type": "assigned_variable", "loc": [163, 163], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L161_C4", "vector": [14, 2, 0.4278, 0.0026, 2, 0.81, 0.5, 146, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "self._filename", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " self._filename = kwargs.get('filename')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L164_C8", "label": "self._path =", "type": "assigned_variable", "loc": [164, 164], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L161_C4", "vector": [14, 2, 0.4304, 0.0026, 2, 0.81, 1.0, 249, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self._path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._path = \".\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "label": "run", "type": "function", "loc": [166, 207], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L148_C0", "vector": [2, 1, 0.4895, 0.1102, 1, 0.72, 0.5, 679, 0, 2, 1, 0, 0, 0, 13], "semantic": {"name": "run", "arg_names": ["self", "test"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def run(self, test):\n \"\"\"Run the given test case or test suite.\"\"\"\n class_ = test.__class__\n classname = class_.__module__ + \".\" + class_.__name__\n if self._stream == None:\n filename = \"TEST-%s.xml\" % classname\n if self._filename:\n filename = self._filename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L167_C8", "label": "expression", "type": "expression", "loc": [167, 167], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "vector": [8, 2, 0.4383, 0.0026, 2, 0.02, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Run the given test case or test suite.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L168_C8", "label": "class_ =", "type": "assigned_variable", "loc": [168, 168], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "vector": [14, 2, 0.4409, 0.0026, 2, 0.02, 0.0714, 469, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "class_", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class_ = test.__class__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L169_C8", "label": "classname =", "type": "assigned_variable", "loc": [169, 169], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "vector": [14, 2, 0.4436, 0.0026, 2, 0.02, 0.1429, 583, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "classname", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " classname = class_.__module__ + \".\" + class_.__name__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L170_C8", "label": "if", "type": "if", "loc": [170, 177], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "vector": [4, 2, 0.4554, 0.021, 2, 0.02, 0.2143, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._stream == None:\n filename = \"TEST-%s.xml\" % classname\n if self._filename:\n filename = self._filename\n stream = file(os.path.join(self._path, filename), \"w\")\n stream.write('<?xml version=\"1.0\" encoding=\"utf-8\"?>\\n')\n else:\n stream = self._stream"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L171_C12", "label": "filename =", "type": "assigned_variable", "loc": [171, 171], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L170_C8", "vector": [14, 3, 0.4488, 0.0026, 3, 0.65, 0.0, 275, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " filename = \"TEST-%s.xml\" % classname"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L172_C12", "label": "if", "type": "if", "loc": [172, 173], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L170_C8", "vector": [4, 3, 0.4528, 0.0052, 3, 0.65, 0.25, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._filename:\n filename = self._filename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L173_C16", "label": "filename =", "type": "assigned_variable", "loc": [173, 173], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L172_C12", "vector": [14, 4, 0.4541, 0.0026, 4, 0.68, 0.0, 275, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " filename = self._filename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L174_C12", "label": "stream = file()", "type": "assigned_variable", "loc": [174, 174], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L170_C8", "vector": [14, 3, 0.4567, 0.0026, 3, 0.65, 0.5, 517, 3, 2, 0, 0, 107, 10, 2], "semantic": {"name": "stream", "arg_names": [], "import_names": [], "rhs_call_name": "file", "annotation": ""}, "snippet": " stream = file(os.path.join(self._path, filename), \"w\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L175_C12", "label": "write()", "type": "expression", "loc": [175, 175], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L170_C8", "vector": [8, 3, 0.4593, 0.0026, 3, 0.65, 0.75, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " stream.write('<?xml version=\"1.0\" encoding=\"utf-8\"?>\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L177_C12", "label": "stream =", "type": "assigned_variable", "loc": [177, 177], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L170_C8", "vector": [14, 3, 0.4646, 0.0026, 3, 0.65, 1.0, 517, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "stream", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " stream = self._stream"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L179_C8", "label": "result = _XMLTestResult()", "type": "assigned_variable", "loc": [179, 179], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "vector": [14, 2, 0.4698, 0.0026, 2, 0.02, 0.2857, 51, 3, 1, 0, 0, 296, 10, 1], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "_XMLTestResult", "annotation": ""}, "snippet": " result = _XMLTestResult(classname)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L180_C8", "label": "start_time = time()", "type": "assigned_variable", "loc": [180, 180], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "vector": [14, 2, 0.4724, 0.0026, 2, 0.02, 0.3571, 511, 3, 0, 0, 0, 654, 10, 1], "semantic": {"name": "start_time", "arg_names": [], "import_names": [], "rhs_call_name": "time", "annotation": ""}, "snippet": " start_time = time.time()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L183_C8", "label": "old_stdout =", "type": "assigned_variable", "loc": [183, 183], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "vector": [14, 2, 0.4803, 0.0026, 2, 0.02, 0.4286, 888, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "old_stdout", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " old_stdout = sys.stdout"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L184_C8", "label": "old_stderr =", "type": "assigned_variable", "loc": [184, 184], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "vector": [14, 2, 0.4829, 0.0026, 2, 0.02, 0.5, 816, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "old_stderr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " old_stderr = sys.stderr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L185_C8", "label": "sys.stdout = StringIO()", "type": "assigned_variable", "loc": [185, 185], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "vector": [14, 2, 0.4856, 0.0026, 2, 0.02, 0.5714, 260, 3, 0, 0, 0, 609, 10, 1], "semantic": {"name": "sys.stdout", "arg_names": [], "import_names": [], "rhs_call_name": "StringIO", "annotation": ""}, "snippet": " sys.stdout = StringIO()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L186_C8", "label": "sys.stderr = StringIO()", "type": "assigned_variable", "loc": [186, 186], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "vector": [14, 2, 0.4882, 0.0026, 2, 0.02, 0.6429, 387, 3, 0, 0, 0, 609, 10, 1], "semantic": {"name": "sys.stderr", "arg_names": [], "import_names": [], "rhs_call_name": "StringIO", "annotation": ""}, "snippet": " sys.stderr = StringIO()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L188_C8", "label": "try", "type": "try", "loc": [188, 200], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "vector": [7, 2, 0.5092, 0.0341, 2, 0.02, 0.7143, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n test(result)\n try:\n out_s = sys.stdout.getvalue()\n except AttributeError:\n out_s = \"\"\n try:\n err_s = sys.stderr.getvalue()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L189_C12", "label": "test()", "type": "expression", "loc": [189, 189], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L188_C8", "vector": [8, 3, 0.4961, 0.0026, 3, 0.65, 0.0, 224, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test", "arg_names": [], "import_names": [], "rhs_call_name": "test", "annotation": ""}, "snippet": " test(result)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L190_C12", "label": "try", "type": "try", "loc": [190, 193], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L188_C8", "vector": [7, 3, 0.5026, 0.0105, 3, 0.65, 0.25, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n out_s = sys.stdout.getvalue()\n except AttributeError:\n out_s = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L191_C16", "label": "out_s = getvalue()", "type": "assigned_variable", "loc": [191, 191], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L190_C12", "vector": [14, 4, 0.5013, 0.0026, 4, 0.62, 0.0, 320, 3, 0, 0, 0, 626, 10, 1], "semantic": {"name": "out_s", "arg_names": [], "import_names": [], "rhs_call_name": "getvalue", "annotation": ""}, "snippet": " out_s = sys.stdout.getvalue()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L193_C16", "label": "out_s =", "type": "assigned_variable", "loc": [193, 193], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L190_C12", "vector": [14, 4, 0.5066, 0.0026, 4, 0.62, 0.0, 320, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "out_s", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " out_s = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L194_C12", "label": "try", "type": "try", "loc": [194, 197], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L188_C8", "vector": [7, 3, 0.5131, 0.0105, 3, 0.65, 0.5, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n err_s = sys.stderr.getvalue()\n except AttributeError:\n err_s = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L195_C16", "label": "err_s = getvalue()", "type": "assigned_variable", "loc": [195, 195], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L194_C12", "vector": [14, 4, 0.5118, 0.0026, 4, 0.04, 0.0, 745, 3, 0, 0, 0, 626, 10, 1], "semantic": {"name": "err_s", "arg_names": [], "import_names": [], "rhs_call_name": "getvalue", "annotation": ""}, "snippet": " err_s = sys.stderr.getvalue()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L197_C16", "label": "err_s =", "type": "assigned_variable", "loc": [197, 197], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L194_C12", "vector": [14, 4, 0.5171, 0.0026, 4, 0.04, 0.0, 745, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "err_s", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " err_s = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L199_C12", "label": "sys.stdout =", "type": "assigned_variable", "loc": [199, 199], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L188_C8", "vector": [14, 3, 0.5223, 0.0026, 3, 0.65, 0.75, 260, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "sys.stdout", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sys.stdout = old_stdout"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L200_C12", "label": "sys.stderr =", "type": "assigned_variable", "loc": [200, 200], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L188_C8", "vector": [14, 3, 0.5249, 0.0026, 3, 0.65, 1.0, 387, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "sys.stderr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sys.stderr = old_stderr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L202_C8", "label": "time_taken =", "type": "assigned_variable", "loc": [202, 202], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "vector": [14, 2, 0.5302, 0.0026, 2, 0.02, 0.7857, 287, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "time_taken", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " time_taken = time.time() - start_time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L203_C8", "label": "print_report()", "type": "expression", "loc": [203, 203], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "vector": [8, 2, 0.5328, 0.0026, 2, 0.02, 0.8571, 160, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "print_report", "arg_names": [], "import_names": [], "rhs_call_name": "print_report", "annotation": ""}, "snippet": " result.print_report(stream, time_taken, out_s, err_s)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L204_C8", "label": "if", "type": "if", "loc": [204, 205], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "vector": [4, 2, 0.5367, 0.0052, 2, 0.02, 0.9286, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._stream == None:\n stream.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L205_C12", "label": "close()", "type": "expression", "loc": [205, 205], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L204_C8", "vector": [8, 3, 0.5381, 0.0026, 3, 0.98, 0.0, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " stream.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Return_L207_C8", "label": "return", "type": "return", "loc": [207, 207], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "vector": [13, 2, 0.5433, 0.0026, 2, 0.02, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L209_C4", "label": "_set_path", "type": "function", "loc": [209, 210], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L148_C0", "vector": [2, 1, 0.5499, 0.0052, 1, 0.72, 0.75, 721, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "_set_path", "arg_names": ["self", "path"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _set_path(self, path):\n self._path = path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L210_C8", "label": "self._path =", "type": "assigned_variable", "loc": [210, 210], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L209_C4", "vector": [14, 2, 0.5512, 0.0026, 2, 0.91, 0.0, 249, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._path = path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L212_C4", "label": "path = property()", "type": "assigned_variable", "loc": [212, 216], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L148_C0", "vector": [14, 1, 0.5617, 0.0131, 1, 0.72, 1.0, 358, 3, 4, 0, 0, 244, 10, 1], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "property", "annotation": ""}, "snippet": " path = property(lambda self: self._path, _set_path, None,\n \"\"\"The path where the XML files are stored.\n \n This property is ignored when the XML file is written to a file\n stream.\"\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "label": "XMLTestRunnerTest", "type": "class", "loc": [219, 368], "level": 0, "parent": null, "vector": [3, 0, 0.7703, 0.3937, 0, 0.66, 0.85, 375, 0, 18, 0, 0, 878, 0, 27], "semantic": {"name": "XMLTestRunnerTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class XMLTestRunnerTest(unittest.TestCase):\n def setUp(self):\n self._stream = StringIO()\n\n def _try_test_run(self, test_class, expected):\n\n \"\"\"Run the test suite against the supplied test class and compare the\n XML result against the expected XML string. Fail if the expected"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L220_C4", "label": "setUp", "type": "function", "loc": [220, 221], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "vector": [2, 1, 0.5787, 0.0052, 1, 0.63, 0.0, 952, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n self._stream = StringIO()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L221_C8", "label": "self._stream = StringIO()", "type": "assigned_variable", "loc": [221, 221], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L220_C4", "vector": [14, 2, 0.5801, 0.0026, 2, 0.7, 0.0, 214, 3, 0, 0, 0, 609, 10, 1], "semantic": {"name": "self._stream", "arg_names": [], "import_names": [], "rhs_call_name": "StringIO", "annotation": ""}, "snippet": " self._stream = StringIO()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "label": "_try_test_run", "type": "function", "loc": [223, 245], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "vector": [2, 1, 0.6142, 0.0604, 1, 0.63, 0.1, 313, 0, 3, 0, 0, 0, 0, 8], "semantic": {"name": "_try_test_run", "arg_names": ["self", "test_class", "expected"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _try_test_run(self, test_class, expected):\n\n \"\"\"Run the test suite against the supplied test class and compare the\n XML result against the expected XML string. Fail if the expected\n string doesn't match the actual string. All time attribute in the\n expected string should have the value \"0.000\". All error and failure\n messages are reduced to \"Foobar\".\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L225_C8", "label": "expression", "type": "expression", "loc": [225, 231], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "vector": [8, 2, 0.5984, 0.0184, 2, 0.06, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Run the test suite against the supplied test class and compare the\n XML result against the expected XML string. Fail if the expected\n string doesn't match the actual string. All time attribute in the\n expected string should have the value \"0.000\". All error and failure\n messages are reduced to \"Foobar\".\n\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L233_C8", "label": "runner = XMLTestRunner()", "type": "assigned_variable", "loc": [233, 233], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "vector": [14, 2, 0.6115, 0.0026, 2, 0.06, 0.1429, 180, 3, 1, 0, 0, 746, 10, 1], "semantic": {"name": "runner", "arg_names": [], "import_names": [], "rhs_call_name": "XMLTestRunner", "annotation": ""}, "snippet": " runner = XMLTestRunner(self._stream)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L234_C8", "label": "run()", "type": "expression", "loc": [234, 234], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "vector": [8, 2, 0.6142, 0.0026, 2, 0.06, 0.2857, 679, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "run", "arg_names": [], "import_names": [], "rhs_call_name": "run", "annotation": ""}, "snippet": " runner.run(unittest.makeSuite(test_class))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L236_C8", "label": "got = getvalue()", "type": "assigned_variable", "loc": [236, 236], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "vector": [14, 2, 0.6194, 0.0026, 2, 0.06, 0.4286, 852, 3, 0, 0, 0, 626, 10, 1], "semantic": {"name": "got", "arg_names": [], "import_names": [], "rhs_call_name": "getvalue", "annotation": ""}, "snippet": " got = self._stream.getvalue()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L239_C8", "label": "got = sub()", "type": "assigned_variable", "loc": [239, 239], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "vector": [14, 2, 0.6273, 0.0026, 2, 0.06, 0.5714, 852, 3, 3, 0, 0, 819, 10, 1], "semantic": {"name": "got", "arg_names": [], "import_names": [], "rhs_call_name": "sub", "annotation": ""}, "snippet": " got = re.sub(r'time=\"\\d+\\.\\d+\"', 'time=\"0.000\"', got)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L242_C8", "label": "got = sub()", "type": "assigned_variable", "loc": [242, 242], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "vector": [14, 2, 0.6352, 0.0026, 2, 0.06, 0.7143, 852, 3, 3, 0, 0, 819, 10, 1], "semantic": {"name": "got", "arg_names": [], "import_names": [], "rhs_call_name": "sub", "annotation": ""}, "snippet": " got = re.sub(r'(?s)<failure (.*?)>.*?</failure>', r'<failure \\1>Foobar</failure>', got)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L243_C8", "label": "got = sub()", "type": "assigned_variable", "loc": [243, 243], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "vector": [14, 2, 0.6378, 0.0026, 2, 0.06, 0.8571, 852, 3, 3, 0, 0, 819, 10, 1], "semantic": {"name": "got", "arg_names": [], "import_names": [], "rhs_call_name": "sub", "annotation": ""}, "snippet": " got = re.sub(r'(?s)<error (.*?)>.*?</error>', r'<error \\1>Foobar</error>', got)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L245_C8", "label": "assertEqual()", "type": "expression", "loc": [245, 245], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "vector": [8, 2, 0.643, 0.0026, 2, 0.06, 1.0, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(expected, got)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L247_C4", "label": "test_no_tests", "type": "function", "loc": [247, 258], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "vector": [2, 1, 0.6627, 0.0315, 1, 0.63, 0.2, 771, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test_no_tests", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_no_tests(self):\n \"\"\"Regression test: Check whether a test run without any tests\n matches a previous run.\n \n \"\"\"\n class TestTest(unittest.TestCase):\n pass\n self._try_test_run(TestTest, \"\"\"<testsuite errors=\"0\" failures=\"0\" name=\"unittest.TestSuite\" tests=\"0\" time=\"0.000\">"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L248_C8", "label": "expression", "type": "expression", "loc": [248, 251], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L247_C4", "vector": [8, 2, 0.6549, 0.0105, 2, 0.54, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Regression test: Check whether a test run without any tests\n matches a previous run.\n \n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L252_C8", "label": "TestTest", "type": "class", "loc": [252, 253], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L247_C4", "vector": [3, 2, 0.6627, 0.0052, 2, 0.54, 0.5, 600, 0, 0, 0, 0, 878, 0, 0], "semantic": {"name": "TestTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class TestTest(unittest.TestCase):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L254_C8", "label": "_try_test_run()", "type": "expression", "loc": [254, 258], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L247_C4", "vector": [8, 2, 0.6719, 0.0131, 2, 0.54, 1.0, 313, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_try_test_run", "arg_names": [], "import_names": [], "rhs_call_name": "_try_test_run", "annotation": ""}, "snippet": " self._try_test_run(TestTest, \"\"\"<testsuite errors=\"0\" failures=\"0\" name=\"unittest.TestSuite\" tests=\"0\" time=\"0.000\">\n <system-out><![CDATA[]]></system-out>\n <system-err><![CDATA[]]></system-err>\n</testsuite>\n\"\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L260_C4", "label": "test_success", "type": "function", "loc": [260, 273], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "vector": [2, 1, 0.6995, 0.0367, 1, 0.63, 0.3, 610, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test_success", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_success(self):\n \"\"\"Regression test: Check whether a test run with a successful test\n matches a previous run.\n \n \"\"\"\n class TestTest(unittest.TestCase):\n def test_foo(self):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L261_C8", "label": "expression", "type": "expression", "loc": [261, 264], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L260_C4", "vector": [8, 2, 0.689, 0.0105, 2, 0.39, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Regression test: Check whether a test run with a successful test\n matches a previous run.\n \n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L265_C8", "label": "TestTest", "type": "class", "loc": [265, 267], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L260_C4", "vector": [3, 2, 0.6982, 0.0079, 2, 0.39, 0.5, 600, 0, 1, 0, 0, 878, 0, 0], "semantic": {"name": "TestTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class TestTest(unittest.TestCase):\n def test_foo(self):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L266_C12", "label": "test_foo", "type": "function", "loc": [266, 267], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L265_C8", "vector": [2, 3, 0.6995, 0.0052, 3, 0.01, 0.0, 834, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "test_foo", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_foo(self):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L268_C8", "label": "_try_test_run()", "type": "expression", "loc": [268, 273], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L260_C4", "vector": [8, 2, 0.71, 0.0157, 2, 0.39, 1.0, 313, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_try_test_run", "arg_names": [], "import_names": [], "rhs_call_name": "_try_test_run", "annotation": ""}, "snippet": " self._try_test_run(TestTest, \"\"\"<testsuite errors=\"0\" failures=\"0\" name=\"unittest.TestSuite\" tests=\"1\" time=\"0.000\">\n <testcase classname=\"__main__.TestTest\" name=\"test_foo\" time=\"0.000\"></testcase>\n <system-out><![CDATA[]]></system-out>\n <system-err><![CDATA[]]></system-err>\n</testsuite>\n\"\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L275_C4", "label": "test_failure", "type": "function", "loc": [275, 290], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "vector": [2, 1, 0.7415, 0.042, 1, 0.63, 0.4, 640, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test_failure", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_failure(self):\n \"\"\"Regression test: Check whether a test run with a failing test\n matches a previous run.\n \n \"\"\"\n class TestTest(unittest.TestCase):\n def test_foo(self):\n self.assert_(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L276_C8", "label": "expression", "type": "expression", "loc": [276, 279], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L275_C4", "vector": [8, 2, 0.7283, 0.0105, 2, 0.87, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Regression test: Check whether a test run with a failing test\n matches a previous run.\n \n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L280_C8", "label": "TestTest", "type": "class", "loc": [280, 282], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L275_C4", "vector": [3, 2, 0.7375, 0.0079, 2, 0.87, 0.5, 600, 0, 1, 0, 0, 878, 0, 1], "semantic": {"name": "TestTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class TestTest(unittest.TestCase):\n def test_foo(self):\n self.assert_(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L281_C12", "label": "test_foo", "type": "function", "loc": [281, 282], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L280_C8", "vector": [2, 3, 0.7388, 0.0052, 3, 0.3, 0.0, 834, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test_foo", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_foo(self):\n self.assert_(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L282_C16", "label": "assert_()", "type": "expression", "loc": [282, 282], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L281_C12", "vector": [8, 4, 0.7402, 0.0026, 4, 0.81, 0.0, 17, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "assert_", "arg_names": [], "import_names": [], "rhs_call_name": "assert_", "annotation": ""}, "snippet": " self.assert_(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L283_C8", "label": "_try_test_run()", "type": "expression", "loc": [283, 290], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L275_C4", "vector": [8, 2, 0.752, 0.021, 2, 0.87, 1.0, 313, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_try_test_run", "arg_names": [], "import_names": [], "rhs_call_name": "_try_test_run", "annotation": ""}, "snippet": " self._try_test_run(TestTest, \"\"\"<testsuite errors=\"0\" failures=\"1\" name=\"unittest.TestSuite\" tests=\"1\" time=\"0.000\">\n <testcase classname=\"__main__.TestTest\" name=\"test_foo\" time=\"0.000\">\n <failure type=\"exceptions.AssertionError\">Foobar</failure>\n </testcase>\n <system-out><![CDATA[]]></system-out>\n <system-err><![CDATA[]]></system-err>\n</testsuite>\n\"\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L292_C4", "label": "test_error", "type": "function", "loc": [292, 307], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "vector": [2, 1, 0.7861, 0.042, 1, 0.63, 0.5, 11, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test_error", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_error(self):\n \"\"\"Regression test: Check whether a test run with a erroneous test\n matches a previous run.\n \n \"\"\"\n class TestTest(unittest.TestCase):\n def test_foo(self):\n raise IndexError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L293_C8", "label": "expression", "type": "expression", "loc": [293, 296], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L292_C4", "vector": [8, 2, 0.773, 0.0105, 2, 0.81, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Regression test: Check whether a test run with a erroneous test\n matches a previous run.\n \n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L297_C8", "label": "TestTest", "type": "class", "loc": [297, 299], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L292_C4", "vector": [3, 2, 0.7822, 0.0079, 2, 0.81, 0.5, 600, 0, 1, 0, 0, 878, 0, 1], "semantic": {"name": "TestTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class TestTest(unittest.TestCase):\n def test_foo(self):\n raise IndexError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L298_C12", "label": "test_foo", "type": "function", "loc": [298, 299], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L297_C8", "vector": [2, 3, 0.7835, 0.0052, 3, 0.72, 0.0, 834, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test_foo", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_foo(self):\n raise IndexError()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L300_C8", "label": "_try_test_run()", "type": "expression", "loc": [300, 307], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L292_C4", "vector": [8, 2, 0.7966, 0.021, 2, 0.81, 1.0, 313, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_try_test_run", "arg_names": [], "import_names": [], "rhs_call_name": "_try_test_run", "annotation": ""}, "snippet": " self._try_test_run(TestTest, \"\"\"<testsuite errors=\"1\" failures=\"0\" name=\"unittest.TestSuite\" tests=\"1\" time=\"0.000\">\n <testcase classname=\"__main__.TestTest\" name=\"test_foo\" time=\"0.000\">\n <error type=\"exceptions.IndexError\">Foobar</error>\n </testcase>\n <system-out><![CDATA[]]></system-out>\n <system-err><![CDATA[]]></system-err>\n</testsuite>\n\"\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L309_C4", "label": "test_stdout_capture", "type": "function", "loc": [309, 323], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "vector": [2, 1, 0.8294, 0.0394, 1, 0.63, 0.6, 422, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test_stdout_capture", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_stdout_capture(self):\n \"\"\"Regression test: Check whether a test run with output to stdout\n matches a previous run.\n \n \"\"\"\n class TestTest(unittest.TestCase):\n def test_foo(self):\n print(\"Test\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L310_C8", "label": "expression", "type": "expression", "loc": [310, 313], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L309_C4", "vector": [8, 2, 0.8176, 0.0105, 2, 0.21, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Regression test: Check whether a test run with output to stdout\n matches a previous run.\n \n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L314_C8", "label": "TestTest", "type": "class", "loc": [314, 316], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L309_C4", "vector": [3, 2, 0.8268, 0.0079, 2, 0.21, 0.5, 600, 0, 1, 0, 0, 878, 0, 1], "semantic": {"name": "TestTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class TestTest(unittest.TestCase):\n def test_foo(self):\n print(\"Test\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L315_C12", "label": "test_foo", "type": "function", "loc": [315, 316], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L314_C8", "vector": [2, 3, 0.8281, 0.0052, 3, 0.39, 0.0, 834, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test_foo", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_foo(self):\n print(\"Test\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L316_C16", "label": "print()", "type": "expression", "loc": [316, 316], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L315_C12", "vector": [8, 4, 0.8294, 0.0026, 4, 0.19, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"Test\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L317_C8", "label": "_try_test_run()", "type": "expression", "loc": [317, 323], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L309_C4", "vector": [8, 2, 0.8399, 0.0184, 2, 0.21, 1.0, 313, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_try_test_run", "arg_names": [], "import_names": [], "rhs_call_name": "_try_test_run", "annotation": ""}, "snippet": " self._try_test_run(TestTest, \"\"\"<testsuite errors=\"0\" failures=\"0\" name=\"unittest.TestSuite\" tests=\"1\" time=\"0.000\">\n <testcase classname=\"__main__.TestTest\" name=\"test_foo\" time=\"0.000\"></testcase>\n <system-out><![CDATA[Test\n]]></system-out>\n <system-err><![CDATA[]]></system-err>\n</testsuite>\n\"\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L325_C4", "label": "test_stderr_capture", "type": "function", "loc": [325, 339], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "vector": [2, 1, 0.8714, 0.0394, 1, 0.63, 0.7, 598, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test_stderr_capture", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_stderr_capture(self):\n \"\"\"Regression test: Check whether a test run with output to stderr\n matches a previous run.\n \n \"\"\"\n class TestTest(unittest.TestCase):\n def test_foo(self):\n sys.stderr.write('Test\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L326_C8", "label": "expression", "type": "expression", "loc": [326, 329], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L325_C4", "vector": [8, 2, 0.8596, 0.0105, 2, 0.79, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Regression test: Check whether a test run with output to stderr\n matches a previous run.\n \n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L330_C8", "label": "TestTest", "type": "class", "loc": [330, 332], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L325_C4", "vector": [3, 2, 0.8688, 0.0079, 2, 0.79, 0.5, 600, 0, 1, 0, 0, 878, 0, 1], "semantic": {"name": "TestTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class TestTest(unittest.TestCase):\n def test_foo(self):\n sys.stderr.write('Test\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L331_C12", "label": "test_foo", "type": "function", "loc": [331, 332], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L330_C8", "vector": [2, 3, 0.8701, 0.0052, 3, 0.91, 0.0, 834, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test_foo", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_foo(self):\n sys.stderr.write('Test\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L332_C16", "label": "write()", "type": "expression", "loc": [332, 332], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L331_C12", "vector": [8, 4, 0.8714, 0.0026, 4, 0.21, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stderr.write('Test\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L333_C8", "label": "_try_test_run()", "type": "expression", "loc": [333, 339], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L325_C4", "vector": [8, 2, 0.8819, 0.0184, 2, 0.79, 1.0, 313, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_try_test_run", "arg_names": [], "import_names": [], "rhs_call_name": "_try_test_run", "annotation": ""}, "snippet": " self._try_test_run(TestTest, \"\"\"<testsuite errors=\"0\" failures=\"0\" name=\"unittest.TestSuite\" tests=\"1\" time=\"0.000\">\n <testcase classname=\"__main__.TestTest\" name=\"test_foo\" time=\"0.000\"></testcase>\n <system-out><![CDATA[]]></system-out>\n <system-err><![CDATA[Test\n]]></system-err>\n</testsuite>\n\"\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L341_C4", "label": "NullStream", "type": "class", "loc": [341, 344], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "vector": [3, 1, 0.899, 0.0105, 1, 0.63, 0.8, 337, 0, 1, 0, 0, 186, 0, 0], "semantic": {"name": "NullStream", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class NullStream(object):\n \"\"\"A file-like object that discards everything written to it.\"\"\"\n def write(self, buffer):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L342_C8", "label": "expression", "type": "expression", "loc": [342, 342], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L341_C4", "vector": [8, 2, 0.8976, 0.0026, 2, 0.25, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"A file-like object that discards everything written to it.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L343_C8", "label": "write", "type": "function", "loc": [343, 344], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L341_C4", "vector": [2, 2, 0.9016, 0.0052, 2, 0.25, 1.0, 837, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "write", "arg_names": ["self", "buffer"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def write(self, buffer):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L346_C4", "label": "test_unittests_changing_stdout", "type": "function", "loc": [346, 356], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "vector": [2, 1, 0.9213, 0.0289, 1, 0.63, 0.9, 741, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "test_unittests_changing_stdout", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_unittests_changing_stdout(self):\n \"\"\"Check whether the XMLTestRunner recovers gracefully from unit tests\n that change stdout, but don't change it back properly.\n\n \"\"\"\n class TestTest(unittest.TestCase):\n def test_foo(self):\n sys.stdout = XMLTestRunnerTest.NullStream()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L347_C8", "label": "expression", "type": "expression", "loc": [347, 350], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L346_C4", "vector": [8, 2, 0.9147, 0.0105, 2, 0.85, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Check whether the XMLTestRunner recovers gracefully from unit tests\n that change stdout, but don't change it back properly.\n\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L351_C8", "label": "TestTest", "type": "class", "loc": [351, 353], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L346_C4", "vector": [3, 2, 0.9239, 0.0079, 2, 0.85, 0.3333, 600, 0, 1, 0, 0, 878, 0, 1], "semantic": {"name": "TestTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class TestTest(unittest.TestCase):\n def test_foo(self):\n sys.stdout = XMLTestRunnerTest.NullStream()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L352_C12", "label": "test_foo", "type": "function", "loc": [352, 353], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L351_C8", "vector": [2, 3, 0.9252, 0.0052, 3, 0.47, 0.0, 834, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test_foo", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_foo(self):\n sys.stdout = XMLTestRunnerTest.NullStream()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L353_C16", "label": "sys.stdout = NullStream()", "type": "assigned_variable", "loc": [353, 353], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L352_C12", "vector": [14, 4, 0.9265, 0.0026, 4, 0.15, 0.0, 260, 3, 0, 0, 0, 337, 10, 1], "semantic": {"name": "sys.stdout", "arg_names": [], "import_names": [], "rhs_call_name": "NullStream", "annotation": ""}, "snippet": " sys.stdout = XMLTestRunnerTest.NullStream()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L355_C8", "label": "runner = XMLTestRunner()", "type": "assigned_variable", "loc": [355, 355], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L346_C4", "vector": [14, 2, 0.9318, 0.0026, 2, 0.85, 0.6667, 180, 3, 1, 0, 0, 746, 10, 1], "semantic": {"name": "runner", "arg_names": [], "import_names": [], "rhs_call_name": "XMLTestRunner", "annotation": ""}, "snippet": " runner = XMLTestRunner(self._stream)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L356_C8", "label": "run()", "type": "expression", "loc": [356, 356], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L346_C4", "vector": [8, 2, 0.9344, 0.0026, 2, 0.85, 1.0, 679, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "run", "arg_names": [], "import_names": [], "rhs_call_name": "run", "annotation": ""}, "snippet": " runner.run(unittest.makeSuite(TestTest))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L358_C4", "label": "test_unittests_changing_stderr", "type": "function", "loc": [358, 368], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "vector": [2, 1, 0.9528, 0.0289, 1, 0.63, 1.0, 672, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "test_unittests_changing_stderr", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_unittests_changing_stderr(self):\n \"\"\"Check whether the XMLTestRunner recovers gracefully from unit tests\n that change stderr, but don't change it back properly.\n\n \"\"\"\n class TestTest(unittest.TestCase):\n def test_foo(self):\n sys.stderr = XMLTestRunnerTest.NullStream()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L359_C8", "label": "expression", "type": "expression", "loc": [359, 362], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L358_C4", "vector": [8, 2, 0.9462, 0.0105, 2, 0.1, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Check whether the XMLTestRunner recovers gracefully from unit tests\n that change stderr, but don't change it back properly.\n\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L363_C8", "label": "TestTest", "type": "class", "loc": [363, 365], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L358_C4", "vector": [3, 2, 0.9554, 0.0079, 2, 0.1, 0.3333, 600, 0, 1, 0, 0, 878, 0, 1], "semantic": {"name": "TestTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class TestTest(unittest.TestCase):\n def test_foo(self):\n sys.stderr = XMLTestRunnerTest.NullStream()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L364_C12", "label": "test_foo", "type": "function", "loc": [364, 365], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L363_C8", "vector": [2, 3, 0.9567, 0.0052, 3, 0.87, 0.0, 834, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test_foo", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_foo(self):\n sys.stderr = XMLTestRunnerTest.NullStream()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L365_C16", "label": "sys.stderr = NullStream()", "type": "assigned_variable", "loc": [365, 365], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L364_C12", "vector": [14, 4, 0.958, 0.0026, 4, 0.28, 0.0, 387, 3, 0, 0, 0, 337, 10, 1], "semantic": {"name": "sys.stderr", "arg_names": [], "import_names": [], "rhs_call_name": "NullStream", "annotation": ""}, "snippet": " sys.stderr = XMLTestRunnerTest.NullStream()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L367_C8", "label": "runner = XMLTestRunner()", "type": "assigned_variable", "loc": [367, 367], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L358_C4", "vector": [14, 2, 0.9633, 0.0026, 2, 0.1, 0.6667, 180, 3, 1, 0, 0, 746, 10, 1], "semantic": {"name": "runner", "arg_names": [], "import_names": [], "rhs_call_name": "XMLTestRunner", "annotation": ""}, "snippet": " runner = XMLTestRunner(self._stream)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L368_C8", "label": "run()", "type": "expression", "loc": [368, 368], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L358_C4", "vector": [8, 2, 0.9659, 0.0026, 2, 0.1, 1.0, 679, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "run", "arg_names": [], "import_names": [], "rhs_call_name": "run", "annotation": ""}, "snippet": " runner.run(unittest.makeSuite(TestTest))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L371_C0", "label": "XMLTestProgram", "type": "class", "loc": [371, 375], "level": 0, "parent": null, "vector": [3, 0, 0.979, 0.0131, 0, 0.66, 0.9, 978, 0, 1, 0, 0, 758, 0, 2], "semantic": {"name": "XMLTestProgram", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class XMLTestProgram(unittest.TestProgram):\n def runTests(self):\n if self.testRunner is None:\n self.testRunner = XMLTestRunner()\n unittest.TestProgram.runTests(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L372_C4", "label": "runTests", "type": "function", "loc": [372, 375], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L371_C0", "vector": [2, 1, 0.9803, 0.0105, 1, 0.51, 0.0, 713, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "runTests", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def runTests(self):\n if self.testRunner is None:\n self.testRunner = XMLTestRunner()\n unittest.TestProgram.runTests(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L373_C8", "label": "if", "type": "if", "loc": [373, 374], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L372_C4", "vector": [4, 2, 0.9803, 0.0052, 2, 0.98, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.testRunner is None:\n self.testRunner = XMLTestRunner()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L374_C12", "label": "self.testRunner = XMLTestRunner()", "type": "assigned_variable", "loc": [374, 374], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L373_C8", "vector": [14, 3, 0.9816, 0.0026, 3, 0.86, 0.0, 613, 3, 0, 0, 0, 746, 10, 1], "semantic": {"name": "self.testRunner", "arg_names": [], "import_names": [], "rhs_call_name": "XMLTestRunner", "annotation": ""}, "snippet": " self.testRunner = XMLTestRunner()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L375_C8", "label": "runTests()", "type": "expression", "loc": [375, 375], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L372_C4", "vector": [8, 2, 0.9843, 0.0026, 2, 0.98, 1.0, 713, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "runTests", "arg_names": [], "import_names": [], "rhs_call_name": "runTests", "annotation": ""}, "snippet": " unittest.TestProgram.runTests(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L377_C0", "label": "main =", "type": "assigned_variable", "loc": [377, 377], "level": 0, "parent": null, "vector": [14, 0, 0.9895, 0.0026, 0, 0.66, 0.95, 624, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "main = XMLTestProgram"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L380_C0", "label": "if", "type": "if", "loc": [380, 381], "level": 0, "parent": null, "vector": [4, 0, 0.9987, 0.0052, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == \"__main__\":\n main(module=None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L381_C4", "label": "main()", "type": "expression", "loc": [381, 381], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L380_C0", "vector": [8, 1, 1.0, 0.0026, 1, 0.24, 0.0, 624, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main(module=None)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L35_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L44_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L50_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L51_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L52_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L53_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L57_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L58_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L69_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L70_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L69_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Return_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L73_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L73_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L73_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L73_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Return_L77_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L79_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L80_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L79_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L81_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L79_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L82_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L79_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Return_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L87_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L93_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L93_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L95_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L93_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L93_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L93_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L98_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L93_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L101_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L101_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L102_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L101_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L103_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L101_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L101_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L105_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L107_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L109_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L110_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L110_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L111_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L110_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L112_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L112_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L113_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L112_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L115_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L116_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L118_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L119_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L120_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L122_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L122_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L123_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L122_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L124_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L126_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L126_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L127_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L126_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L133_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L126_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L135_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L126_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:For_L141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:For_L141_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L142_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L126_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L143_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L126_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L144_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L126_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L145_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L148_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L150_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L148_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L161_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L161_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L162_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L161_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L163_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L161_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L164_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L148_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L167_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L168_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L169_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L170_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L170_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L171_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L170_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L172_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L172_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L173_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L170_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L174_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L170_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L175_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L170_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L177_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L180_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L183_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L184_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L185_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L186_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L188_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L188_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L189_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L188_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L190_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L190_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L191_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L190_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L193_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L188_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L194_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L194_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L195_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L194_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L197_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L188_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L199_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:Try_L188_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L200_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L202_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L203_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L204_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L204_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L205_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L166_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Return_L207_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L148_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L209_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L209_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L210_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L148_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L212_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L220_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L220_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L221_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L225_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L233_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L234_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L236_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L239_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L242_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L243_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L245_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L247_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L247_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L248_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L247_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L252_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L247_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L254_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L260_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L260_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L261_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L260_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L265_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L265_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L266_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L260_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L268_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L275_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L276_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L280_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L280_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L281_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L281_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L282_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L275_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L283_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L292_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L292_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L293_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L292_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L297_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L297_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L298_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L292_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L300_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L309_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L309_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L310_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L309_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L314_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L314_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L315_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L315_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L316_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L309_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L317_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L325_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L325_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L326_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L325_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L330_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L330_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L331_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L331_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L332_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L325_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L333_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L341_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L341_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L342_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L341_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L343_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L346_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L346_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L347_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L346_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L351_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L351_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L352_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L352_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L353_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L346_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L355_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L346_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L356_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L219_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L358_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L358_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L359_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L358_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L363_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L363_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L364_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L364_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L365_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L358_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L367_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L358_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L368_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:ClassDef_L371_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L372_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L372_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L373_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L373_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Assign_L374_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:FunctionDef_L372_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L375_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1485:If_L380_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1485:Expr_L381_C4"}]
#!/usr/bin/env python # -*- encoding: utf8 -*- from Cheetah.Template import Template from Cheetah import CheetahWrapper from Cheetah import DummyTransaction import imp import os import sys import tempfile import unittest class CommandLineTest(unittest.TestCase): def createAndCompile(self, source): sourcefile = '-' while sourcefile.find('-') != -1: sourcefile = tempfile.mktemp() fd = open('%s.tmpl' % sourcefile, 'w') fd.write(source) fd.close() wrap = CheetahWrapper.CheetahWrapper() wrap.main(['cheetah', 'compile', '--quiet', '--nobackup', sourcefile]) module_path, module_name = os.path.split(sourcefile) module = loadModule(module_name, [module_path]) template = getattr(module, module_name) return template class JBQ_UTF8_Test1(unittest.TestCase): def runTest(self): t = Template.compile(source="""Main file with |$v| $other""") otherT = Template.compile(source="Other template with |$v|") other = otherT() t.other = other t.v = u'Unicode String' t.other.v = u'Unicode String' assert unicode(t()) class JBQ_UTF8_Test2(unittest.TestCase): def runTest(self): t = Template.compile(source="""Main file with |$v| $other""") otherT = Template.compile(source="Other template with |$v|") other = otherT() t.other = other t.v = u'Unicode String with eacute é' t.other.v = u'Unicode String' assert unicode(t()) class JBQ_UTF8_Test3(unittest.TestCase): def runTest(self): t = Template.compile(source="""Main file with |$v| $other""") otherT = Template.compile(source="Other template with |$v|") other = otherT() t.other = other t.v = u'Unicode String with eacute é' t.other.v = u'Unicode String and an eacute é' assert unicode(t()) class JBQ_UTF8_Test4(unittest.TestCase): def runTest(self): t = Template.compile(source="""#encoding utf-8 Main file with |$v| and eacute in the template é""") t.v = 'Unicode String' assert unicode(t()) class JBQ_UTF8_Test5(unittest.TestCase): def runTest(self): t = Template.compile(source="""#encoding utf-8 Main file with |$v| and eacute in the template é""") t.v = u'Unicode String' assert unicode(t()) def loadModule(moduleName, path=None): if path: assert isinstance(path, list) try: mod = sys.modules[moduleName] except KeyError: fp = None try: fp, pathname, description = imp.find_module(moduleName, path) mod = imp.load_module(moduleName, fp, pathname, description) finally: if fp: fp.close() return mod class JBQ_UTF8_Test6(unittest.TestCase): def runTest(self): source = """#encoding utf-8 #set $someUnicodeString = u"Bébé" Main file with |$v| and eacute in the template é""" t = Template.compile(source=source) t.v = u'Unicode String' assert unicode(t()) class JBQ_UTF8_Test7(CommandLineTest): def runTest(self): source = """#encoding utf-8 #set $someUnicodeString = u"Bébé" Main file with |$v| and eacute in the template é""" template = self.createAndCompile(source) template.v = u'Unicode String' assert unicode(template()) class JBQ_UTF8_Test8(CommandLineTest): def testStaticCompile(self): source = """#encoding utf-8 #set $someUnicodeString = u"Bébé" $someUnicodeString""" template = self.createAndCompile(source)() a = unicode(template).encode("utf-8") self.assertEquals("Bébé", a) def testDynamicCompile(self): source = """#encoding utf-8 #set $someUnicodeString = u"Bébé" $someUnicodeString""" template = Template(source = source) a = unicode(template).encode("utf-8") self.assertEquals("Bébé", a) class EncodeUnicodeCompatTest(unittest.TestCase): """ Taken initially from Red Hat's bugzilla #529332 https://bugzilla.redhat.com/show_bug.cgi?id=529332 """ def runTest(self): t = Template("""Foo ${var}""", filter='EncodeUnicode') t.var = u"Text with some non-ascii characters: åäö" rc = t.respond() assert isinstance(rc, unicode), ('Template.respond() should return unicode', rc) rc = str(t) assert isinstance(rc, str), ('Template.__str__() should return a UTF-8 encoded string', rc) class Unicode_in_SearchList_Test(CommandLineTest): def test_BasicASCII(self): source = '''This is $adjective''' template = self.createAndCompile(source) assert template and issubclass(template, Template) template = template(searchList=[{'adjective' : u'neat'}]) assert template.respond() def test_Thai(self): # The string is something in Thai source = '''This is $foo $adjective''' template = self.createAndCompile(source) assert template and issubclass(template, Template) template = template(searchList=[{'foo' : 'bar', 'adjective' : u'\u0e22\u0e34\u0e19\u0e14\u0e35\u0e15\u0e49\u0e2d\u0e19\u0e23\u0e31\u0e1a'}]) assert template.respond() def test_Thai_utf8(self): utf8 = '\xe0\xb8\xa2\xe0\xb8\xb4\xe0\xb8\x99\xe0\xb8\x94\xe0\xb8\xb5\xe0\xb8\x95\xe0\xb9\x89\xe0\xb8\xad\xe0\xb8\x99\xe0\xb8\xa3\xe0\xb8\xb1\xe0\xb8\x9a' source = '''This is $adjective''' template = self.createAndCompile(source) assert template and issubclass(template, Template) template = template(searchList=[{'adjective' : utf8}]) assert template.respond() class InlineSpanishTest(unittest.TestCase): def setUp(self): super(InlineSpanishTest, self).setUp() self.template = ''' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Pagina del vendedor</title> </head> <body> $header <h2>Bienvenido $nombre.</h2> <br /><br /><br /> <center> Usted tiene $numpedidos_noconf <a href="">pedidós</a> sin confirmar. <br /><br /> Bodega tiene fecha para $numpedidos_bodega <a href="">pedidos</a>. </center> </body> </html> ''' def test_failure(self): """ Test a template lacking a proper #encoding tag """ self.failUnlessRaises(UnicodeDecodeError, Template, self.template, searchList=[{'header' : '', 'nombre' : '', 'numpedidos_bodega' : '', 'numpedidos_noconf' : ''}]) def test_success(self): """ Test a template with a proper #encoding tag """ template = '#encoding utf-8\n%s' % self.template template = Template(template, searchList=[{'header' : '', 'nombre' : '', 'numpedidos_bodega' : '', 'numpedidos_noconf' : ''}]) self.assertTrue(unicode(template)) if __name__ == '__main__': unittest.main()
ajibawa-2023/Python-Code-Large/train/row_1487
121
237
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1487:ImportFrom_L4_C0", "label": "from Cheetah.Template import Template", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0169, 0.0042, 0, 0.66, 0.0, 171, 0, 1, 0, 0, 171, 0, 0], "semantic": {"name": "Cheetah.Template", "arg_names": [], "import_names": ["Template"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Template import Template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:ImportFrom_L5_C0", "label": "from Cheetah import CheetahWrapper", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0211, 0.0042, 0, 0.66, 0.0476, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "Cheetah", "arg_names": [], "import_names": ["CheetahWrapper"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah import CheetahWrapper"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:ImportFrom_L6_C0", "label": "from Cheetah import DummyTransaction", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0253, 0.0042, 0, 0.66, 0.0952, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "Cheetah", "arg_names": [], "import_names": ["DummyTransaction"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah import DummyTransaction"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Import_L7_C0", "label": "imp import imp", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0295, 0.0042, 0, 0.66, 0.1429, 201, 0, 1, 0, 0, 201, 0, 0], "semantic": {"name": "imp", "arg_names": [], "import_names": ["imp"], "rhs_call_name": "", "annotation": ""}, "snippet": "import imp"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Import_L8_C0", "label": "os import os", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0338, 0.0042, 0, 0.66, 0.1905, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Import_L9_C0", "label": "sys import sys", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.038, 0.0042, 0, 0.66, 0.2381, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Import_L10_C0", "label": "tempfile import tempfile", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0422, 0.0042, 0, 0.66, 0.2857, 516, 0, 1, 0, 0, 516, 0, 0], "semantic": {"name": "tempfile", "arg_names": [], "import_names": ["tempfile"], "rhs_call_name": "", "annotation": ""}, "snippet": "import tempfile"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Import_L11_C0", "label": "unittest import unittest", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.0464, 0.0042, 0, 0.66, 0.3333, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], "rhs_call_name": "", "annotation": ""}, "snippet": "import unittest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L13_C0", "label": "CommandLineTest", "type": "class", "loc": [13, 28], "level": 0, "parent": null, "vector": [3, 0, 0.0865, 0.0675, 0, 0.66, 0.381, 516, 0, 1, 0, 0, 878, 0, 10], "semantic": {"name": "CommandLineTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CommandLineTest(unittest.TestCase):\n def createAndCompile(self, source):\n sourcefile = '-'\n while sourcefile.find('-') != -1:\n sourcefile = tempfile.mktemp()\n \n fd = open('%s.tmpl' % sourcefile, 'w')\n fd.write(source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "label": "createAndCompile", "type": "function", "loc": [14, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L13_C0", "vector": [2, 1, 0.0886, 0.0633, 1, 0.48, 0.0, 995, 0, 2, 1, 0, 0, 0, 10], "semantic": {"name": "createAndCompile", "arg_names": ["self", "source"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def createAndCompile(self, source):\n sourcefile = '-'\n while sourcefile.find('-') != -1:\n sourcefile = tempfile.mktemp()\n \n fd = open('%s.tmpl' % sourcefile, 'w')\n fd.write(source)\n fd.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L15_C8", "label": "sourcefile =", "type": "assigned_variable", "loc": [15, 15], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "vector": [14, 2, 0.0633, 0.0042, 2, 0.46, 0.0, 615, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "sourcefile", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sourcefile = '-'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:While_L16_C8", "label": "while", "type": "while", "loc": [16, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "vector": [5, 2, 0.0696, 0.0084, 2, 0.46, 0.1, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while sourcefile.find('-') != -1:\n sourcefile = tempfile.mktemp()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L17_C12", "label": "sourcefile = mktemp()", "type": "assigned_variable", "loc": [17, 17], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:While_L16_C8", "vector": [14, 3, 0.0717, 0.0042, 3, 0.53, 0.0, 615, 3, 0, 0, 0, 357, 10, 1], "semantic": {"name": "sourcefile", "arg_names": [], "import_names": [], "rhs_call_name": "mktemp", "annotation": ""}, "snippet": " sourcefile = tempfile.mktemp()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L19_C8", "label": "fd = open()", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "vector": [14, 2, 0.0802, 0.0042, 2, 0.46, 0.2, 863, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "fd", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " fd = open('%s.tmpl' % sourcefile, 'w')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L20_C8", "label": "write()", "type": "expression", "loc": [20, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "vector": [8, 2, 0.0844, 0.0042, 2, 0.46, 0.3, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " fd.write(source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L21_C8", "label": "close()", "type": "expression", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "vector": [8, 2, 0.0886, 0.0042, 2, 0.46, 0.4, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " fd.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L23_C8", "label": "wrap = CheetahWrapper()", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "vector": [14, 2, 0.097, 0.0042, 2, 0.46, 0.5, 9, 3, 0, 0, 0, 425, 10, 1], "semantic": {"name": "wrap", "arg_names": [], "import_names": [], "rhs_call_name": "CheetahWrapper", "annotation": ""}, "snippet": " wrap = CheetahWrapper.CheetahWrapper()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L24_C8", "label": "main()", "type": "expression", "loc": [24, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "vector": [8, 2, 0.1013, 0.0042, 2, 0.46, 0.6, 624, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " wrap.main(['cheetah', 'compile', '--quiet', '--nobackup', sourcefile])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L25_C8", "label": "module_path, module_name = split()", "type": "assigned_variable", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "vector": [14, 2, 0.1055, 0.0042, 2, 0.46, 0.7, 880, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "module_path, module_name", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " module_path, module_name = os.path.split(sourcefile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L26_C8", "label": "module = loadModule()", "type": "assigned_variable", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "vector": [14, 2, 0.1097, 0.0042, 2, 0.46, 0.8, 98, 3, 2, 0, 0, 645, 10, 1], "semantic": {"name": "module", "arg_names": [], "import_names": [], "rhs_call_name": "loadModule", "annotation": ""}, "snippet": " module = loadModule(module_name, [module_path])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L27_C8", "label": "template = getattr()", "type": "assigned_variable", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "vector": [14, 2, 0.1139, 0.0042, 2, 0.46, 0.9, 549, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " template = getattr(module, module_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Return_L28_C8", "label": "return", "type": "return", "loc": [28, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "vector": [13, 2, 0.1181, 0.0042, 2, 0.46, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L30_C0", "label": "JBQ_UTF8_Test1", "type": "class", "loc": [30, 43], "level": 0, "parent": null, "vector": [3, 0, 0.154, 0.0591, 0, 0.66, 0.4286, 653, 0, 1, 0, 0, 878, 0, 5], "semantic": {"name": "JBQ_UTF8_Test1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class JBQ_UTF8_Test1(unittest.TestCase):\n def runTest(self):\n t = Template.compile(source=\"\"\"Main file with |$v|\n\n $other\"\"\")\n\n otherT = Template.compile(source=\"Other template with |$v|\")\n other = otherT()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L31_C4", "label": "runTest", "type": "function", "loc": [31, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L30_C0", "vector": [2, 1, 0.1561, 0.0549, 1, 0.89, 0.0, 375, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "runTest", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def runTest(self):\n t = Template.compile(source=\"\"\"Main file with |$v|\n\n $other\"\"\")\n\n otherT = Template.compile(source=\"Other template with |$v|\")\n other = otherT()\n t.other = other"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L32_C8", "label": "t = compile()", "type": "assigned_variable", "loc": [32, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L31_C4", "vector": [14, 2, 0.1392, 0.0127, 2, 0.23, 0.0, 15, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " t = Template.compile(source=\"\"\"Main file with |$v|\n\n $other\"\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L36_C8", "label": "otherT = compile()", "type": "assigned_variable", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L31_C4", "vector": [14, 2, 0.1519, 0.0042, 2, 0.23, 0.2, 881, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "otherT", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " otherT = Template.compile(source=\"Other template with |$v|\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L37_C8", "label": "other = otherT()", "type": "assigned_variable", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L31_C4", "vector": [14, 2, 0.1561, 0.0042, 2, 0.23, 0.4, 341, 3, 0, 0, 0, 881, 10, 1], "semantic": {"name": "other", "arg_names": [], "import_names": [], "rhs_call_name": "otherT", "annotation": ""}, "snippet": " other = otherT()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L38_C8", "label": "t.other =", "type": "assigned_variable", "loc": [38, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L31_C4", "vector": [14, 2, 0.1603, 0.0042, 2, 0.23, 0.6, 706, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "t.other", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " t.other = other"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L40_C8", "label": "t.v =", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L31_C4", "vector": [14, 2, 0.1688, 0.0042, 2, 0.23, 0.8, 36, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "t.v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " t.v = u'Unicode String'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L41_C8", "label": "t.other.v =", "type": "assigned_variable", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L31_C4", "vector": [14, 2, 0.173, 0.0042, 2, 0.23, 1.0, 494, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "t.other.v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " t.other.v = u'Unicode String'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L45_C0", "label": "JBQ_UTF8_Test2", "type": "class", "loc": [45, 58], "level": 0, "parent": null, "vector": [3, 0, 0.2173, 0.0591, 0, 0.66, 0.4762, 78, 0, 1, 0, 0, 878, 0, 5], "semantic": {"name": "JBQ_UTF8_Test2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class JBQ_UTF8_Test2(unittest.TestCase):\n def runTest(self):\n t = Template.compile(source=\"\"\"Main file with |$v|\n\n $other\"\"\")\n\n otherT = Template.compile(source=\"Other template with |$v|\")\n other = otherT()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L46_C4", "label": "runTest", "type": "function", "loc": [46, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L45_C0", "vector": [2, 1, 0.2194, 0.0549, 1, 0.05, 0.0, 375, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "runTest", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def runTest(self):\n t = Template.compile(source=\"\"\"Main file with |$v|\n\n $other\"\"\")\n\n otherT = Template.compile(source=\"Other template with |$v|\")\n other = otherT()\n t.other = other"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L47_C8", "label": "t = compile()", "type": "assigned_variable", "loc": [47, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L46_C4", "vector": [14, 2, 0.2025, 0.0127, 2, 0.13, 0.0, 15, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " t = Template.compile(source=\"\"\"Main file with |$v|\n\n $other\"\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L51_C8", "label": "otherT = compile()", "type": "assigned_variable", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L46_C4", "vector": [14, 2, 0.2152, 0.0042, 2, 0.13, 0.2, 881, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "otherT", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " otherT = Template.compile(source=\"Other template with |$v|\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L52_C8", "label": "other = otherT()", "type": "assigned_variable", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L46_C4", "vector": [14, 2, 0.2194, 0.0042, 2, 0.13, 0.4, 341, 3, 0, 0, 0, 881, 10, 1], "semantic": {"name": "other", "arg_names": [], "import_names": [], "rhs_call_name": "otherT", "annotation": ""}, "snippet": " other = otherT()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L53_C8", "label": "t.other =", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L46_C4", "vector": [14, 2, 0.2236, 0.0042, 2, 0.13, 0.6, 706, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "t.other", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " t.other = other"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L55_C8", "label": "t.v =", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L46_C4", "vector": [14, 2, 0.2321, 0.0042, 2, 0.13, 0.8, 36, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "t.v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " t.v = u'Unicode String with eacute \u00e9'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L56_C8", "label": "t.other.v =", "type": "assigned_variable", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L46_C4", "vector": [14, 2, 0.2363, 0.0042, 2, 0.13, 1.0, 494, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "t.other.v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " t.other.v = u'Unicode String'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L61_C0", "label": "JBQ_UTF8_Test3", "type": "class", "loc": [61, 74], "level": 0, "parent": null, "vector": [3, 0, 0.2848, 0.0591, 0, 0.66, 0.5238, 246, 0, 1, 0, 0, 878, 0, 5], "semantic": {"name": "JBQ_UTF8_Test3", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class JBQ_UTF8_Test3(unittest.TestCase):\n def runTest(self):\n t = Template.compile(source=\"\"\"Main file with |$v|\n\n $other\"\"\")\n\n otherT = Template.compile(source=\"Other template with |$v|\")\n other = otherT()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L62_C4", "label": "runTest", "type": "function", "loc": [62, 74], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L61_C0", "vector": [2, 1, 0.2869, 0.0549, 1, 0.1, 0.0, 375, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "runTest", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def runTest(self):\n t = Template.compile(source=\"\"\"Main file with |$v|\n\n $other\"\"\")\n\n otherT = Template.compile(source=\"Other template with |$v|\")\n other = otherT()\n t.other = other"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L63_C8", "label": "t = compile()", "type": "assigned_variable", "loc": [63, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L62_C4", "vector": [14, 2, 0.27, 0.0127, 2, 0.23, 0.0, 15, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " t = Template.compile(source=\"\"\"Main file with |$v|\n\n $other\"\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L67_C8", "label": "otherT = compile()", "type": "assigned_variable", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L62_C4", "vector": [14, 2, 0.2827, 0.0042, 2, 0.23, 0.2, 881, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "otherT", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " otherT = Template.compile(source=\"Other template with |$v|\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L68_C8", "label": "other = otherT()", "type": "assigned_variable", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L62_C4", "vector": [14, 2, 0.2869, 0.0042, 2, 0.23, 0.4, 341, 3, 0, 0, 0, 881, 10, 1], "semantic": {"name": "other", "arg_names": [], "import_names": [], "rhs_call_name": "otherT", "annotation": ""}, "snippet": " other = otherT()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L69_C8", "label": "t.other =", "type": "assigned_variable", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L62_C4", "vector": [14, 2, 0.2911, 0.0042, 2, 0.23, 0.6, 706, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "t.other", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " t.other = other"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L71_C8", "label": "t.v =", "type": "assigned_variable", "loc": [71, 71], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L62_C4", "vector": [14, 2, 0.2996, 0.0042, 2, 0.23, 0.8, 36, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "t.v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " t.v = u'Unicode String with eacute \u00e9'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L72_C8", "label": "t.other.v =", "type": "assigned_variable", "loc": [72, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L62_C4", "vector": [14, 2, 0.3038, 0.0042, 2, 0.23, 1.0, 494, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "t.other.v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " t.other.v = u'Unicode String and an eacute \u00e9'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L76_C0", "label": "JBQ_UTF8_Test4", "type": "class", "loc": [76, 83], "level": 0, "parent": null, "vector": [3, 0, 0.3354, 0.0338, 0, 0.66, 0.5714, 952, 0, 1, 0, 0, 878, 0, 3], "semantic": {"name": "JBQ_UTF8_Test4", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class JBQ_UTF8_Test4(unittest.TestCase):\n def runTest(self):\n t = Template.compile(source=\"\"\"#encoding utf-8\n Main file with |$v| and eacute in the template \u00e9\"\"\")\n\n t.v = 'Unicode String'\n\n assert unicode(t())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L77_C4", "label": "runTest", "type": "function", "loc": [77, 83], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L76_C0", "vector": [2, 1, 0.3376, 0.0295, 1, 0.61, 0.0, 375, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "runTest", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def runTest(self):\n t = Template.compile(source=\"\"\"#encoding utf-8\n Main file with |$v| and eacute in the template \u00e9\"\"\")\n\n t.v = 'Unicode String'\n\n assert unicode(t())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L78_C8", "label": "t = compile()", "type": "assigned_variable", "loc": [78, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L77_C4", "vector": [14, 2, 0.3312, 0.0084, 2, 0.82, 0.0, 15, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " t = Template.compile(source=\"\"\"#encoding utf-8\n Main file with |$v| and eacute in the template \u00e9\"\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L81_C8", "label": "t.v =", "type": "assigned_variable", "loc": [81, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L77_C4", "vector": [14, 2, 0.3418, 0.0042, 2, 0.82, 1.0, 36, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "t.v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " t.v = 'Unicode String'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L85_C0", "label": "JBQ_UTF8_Test5", "type": "class", "loc": [85, 92], "level": 0, "parent": null, "vector": [3, 0, 0.3734, 0.0338, 0, 0.66, 0.619, 51, 0, 1, 0, 0, 878, 0, 3], "semantic": {"name": "JBQ_UTF8_Test5", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class JBQ_UTF8_Test5(unittest.TestCase):\n def runTest(self):\n t = Template.compile(source=\"\"\"#encoding utf-8\n Main file with |$v| and eacute in the template \u00e9\"\"\")\n\n t.v = u'Unicode String'\n\n assert unicode(t())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L86_C4", "label": "runTest", "type": "function", "loc": [86, 92], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L85_C0", "vector": [2, 1, 0.3755, 0.0295, 1, 0.12, 0.0, 375, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "runTest", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def runTest(self):\n t = Template.compile(source=\"\"\"#encoding utf-8\n Main file with |$v| and eacute in the template \u00e9\"\"\")\n\n t.v = u'Unicode String'\n\n assert unicode(t())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L87_C8", "label": "t = compile()", "type": "assigned_variable", "loc": [87, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L86_C4", "vector": [14, 2, 0.3692, 0.0084, 2, 0.53, 0.0, 15, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " t = Template.compile(source=\"\"\"#encoding utf-8\n Main file with |$v| and eacute in the template \u00e9\"\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L90_C8", "label": "t.v =", "type": "assigned_variable", "loc": [90, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L86_C4", "vector": [14, 2, 0.3797, 0.0042, 2, 0.53, 1.0, 36, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "t.v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " t.v = u'Unicode String'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L94_C0", "label": "loadModule", "type": "function", "loc": [94, 108], "level": 0, "parent": null, "vector": [2, 0, 0.4262, 0.0633, 0, 0.66, 0.6667, 645, 0, 2, 1, 0, 0, 0, 4], "semantic": {"name": "loadModule", "arg_names": ["moduleName", "path"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def loadModule(moduleName, path=None):\n if path:\n assert isinstance(path, list)\n try:\n mod = sys.modules[moduleName]\n except KeyError:\n fp = None\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:If_L95_C4", "label": "if", "type": "if", "loc": [95, 96], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L94_C0", "vector": [4, 1, 0.403, 0.0084, 1, 0.97, 0.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if path:\n assert isinstance(path, list)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Try_L97_C4", "label": "try", "type": "try", "loc": [97, 107], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L94_C0", "vector": [7, 1, 0.4304, 0.0464, 1, 0.97, 0.5, 0, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n mod = sys.modules[moduleName]\n except KeyError:\n fp = None\n\n try:\n fp, pathname, description = imp.find_module(moduleName, path)\n mod = imp.load_module(moduleName, fp, pathname, description)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L98_C8", "label": "mod =", "type": "assigned_variable", "loc": [98, 98], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:Try_L97_C4", "vector": [14, 2, 0.4135, 0.0042, 2, 0.67, 0.0, 25, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "mod", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " mod = sys.modules[moduleName]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L100_C8", "label": "fp =", "type": "assigned_variable", "loc": [100, 100], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:Try_L97_C4", "vector": [14, 2, 0.4219, 0.0042, 2, 0.67, 0.0, 392, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "fp", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " fp = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Try_L102_C8", "label": "try", "type": "try", "loc": [102, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:Try_L97_C4", "vector": [7, 2, 0.4409, 0.0253, 2, 0.67, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n fp, pathname, description = imp.find_module(moduleName, path)\n mod = imp.load_module(moduleName, fp, pathname, description)\n finally:\n if fp:\n fp.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L103_C12", "label": "fp, pathname, description = find_module()", "type": "assigned_variable", "loc": [103, 103], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:Try_L102_C8", "vector": [14, 3, 0.4346, 0.0042, 3, 0.89, 0.0, 578, 3, 2, 0, 0, 222, 10, 1], "semantic": {"name": "fp, pathname, description", "arg_names": [], "import_names": [], "rhs_call_name": "find_module", "annotation": ""}, "snippet": " fp, pathname, description = imp.find_module(moduleName, path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L104_C12", "label": "mod = load_module()", "type": "assigned_variable", "loc": [104, 104], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:Try_L102_C8", "vector": [14, 3, 0.4388, 0.0042, 3, 0.89, 0.5, 25, 3, 4, 0, 0, 654, 10, 1], "semantic": {"name": "mod", "arg_names": [], "import_names": [], "rhs_call_name": "load_module", "annotation": ""}, "snippet": " mod = imp.load_module(moduleName, fp, pathname, description)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:If_L106_C12", "label": "if", "type": "if", "loc": [106, 107], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:Try_L102_C8", "vector": [4, 3, 0.4494, 0.0084, 3, 0.89, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if fp:\n fp.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L107_C16", "label": "close()", "type": "expression", "loc": [107, 107], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:If_L106_C12", "vector": [8, 4, 0.4515, 0.0042, 4, 0.86, 0.0, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " fp.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Return_L108_C4", "label": "return", "type": "return", "loc": [108, 108], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L94_C0", "vector": [13, 1, 0.4557, 0.0042, 1, 0.97, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return mod"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L110_C0", "label": "JBQ_UTF8_Test6", "type": "class", "loc": [110, 119], "level": 0, "parent": null, "vector": [3, 0, 0.4831, 0.0422, 0, 0.66, 0.7143, 577, 0, 1, 0, 0, 878, 0, 3], "semantic": {"name": "JBQ_UTF8_Test6", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class JBQ_UTF8_Test6(unittest.TestCase):\n def runTest(self):\n source = \"\"\"#encoding utf-8\n #set $someUnicodeString = u\"B\u00e9b\u00e9\"\n Main file with |$v| and eacute in the template \u00e9\"\"\"\n t = Template.compile(source=source)\n\n t.v = u'Unicode String'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L111_C4", "label": "runTest", "type": "function", "loc": [111, 119], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L110_C0", "vector": [2, 1, 0.4852, 0.038, 1, 0.66, 0.0, 375, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "runTest", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def runTest(self):\n source = \"\"\"#encoding utf-8\n #set $someUnicodeString = u\"B\u00e9b\u00e9\"\n Main file with |$v| and eacute in the template \u00e9\"\"\"\n t = Template.compile(source=source)\n\n t.v = u'Unicode String'\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L112_C8", "label": "source =", "type": "assigned_variable", "loc": [112, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L111_C4", "vector": [14, 2, 0.4768, 0.0127, 2, 0.54, 0.0, 703, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " source = \"\"\"#encoding utf-8\n #set $someUnicodeString = u\"B\u00e9b\u00e9\"\n Main file with |$v| and eacute in the template \u00e9\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L115_C8", "label": "t = compile()", "type": "assigned_variable", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L111_C4", "vector": [14, 2, 0.4852, 0.0042, 2, 0.54, 0.5, 15, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " t = Template.compile(source=source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L117_C8", "label": "t.v =", "type": "assigned_variable", "loc": [117, 117], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L111_C4", "vector": [14, 2, 0.4937, 0.0042, 2, 0.54, 1.0, 36, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "t.v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " t.v = u'Unicode String'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L121_C0", "label": "JBQ_UTF8_Test7", "type": "class", "loc": [121, 130], "level": 0, "parent": null, "vector": [3, 0, 0.5295, 0.0422, 0, 0.66, 0.7619, 837, 0, 1, 0, 0, 516, 0, 3], "semantic": {"name": "JBQ_UTF8_Test7", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class JBQ_UTF8_Test7(CommandLineTest):\n def runTest(self):\n source = \"\"\"#encoding utf-8\n #set $someUnicodeString = u\"B\u00e9b\u00e9\"\n Main file with |$v| and eacute in the template \u00e9\"\"\"\n\n template = self.createAndCompile(source)\n template.v = u'Unicode String'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L122_C4", "label": "runTest", "type": "function", "loc": [122, 130], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L121_C0", "vector": [2, 1, 0.5316, 0.038, 1, 0.83, 0.0, 375, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "runTest", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def runTest(self):\n source = \"\"\"#encoding utf-8\n #set $someUnicodeString = u\"B\u00e9b\u00e9\"\n Main file with |$v| and eacute in the template \u00e9\"\"\"\n\n template = self.createAndCompile(source)\n template.v = u'Unicode String'\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L123_C8", "label": "source =", "type": "assigned_variable", "loc": [123, 125], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L122_C4", "vector": [14, 2, 0.5232, 0.0127, 2, 0.45, 0.0, 703, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " source = \"\"\"#encoding utf-8\n #set $someUnicodeString = u\"B\u00e9b\u00e9\"\n Main file with |$v| and eacute in the template \u00e9\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L127_C8", "label": "template = createAndCompile()", "type": "assigned_variable", "loc": [127, 127], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L122_C4", "vector": [14, 2, 0.5359, 0.0042, 2, 0.45, 0.5, 549, 3, 1, 0, 0, 995, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "createAndCompile", "annotation": ""}, "snippet": " template = self.createAndCompile(source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L128_C8", "label": "template.v =", "type": "assigned_variable", "loc": [128, 128], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L122_C4", "vector": [14, 2, 0.5401, 0.0042, 2, 0.45, 1.0, 674, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template.v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template.v = u'Unicode String'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L132_C0", "label": "JBQ_UTF8_Test8", "type": "class", "loc": [132, 151], "level": 0, "parent": null, "vector": [3, 0, 0.597, 0.0844, 0, 0.66, 0.8095, 437, 0, 2, 0, 0, 516, 0, 9], "semantic": {"name": "JBQ_UTF8_Test8", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class JBQ_UTF8_Test8(CommandLineTest):\n def testStaticCompile(self):\n source = \"\"\"#encoding utf-8\n#set $someUnicodeString = u\"B\u00e9b\u00e9\"\n$someUnicodeString\"\"\"\n\n template = self.createAndCompile(source)()\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L133_C4", "label": "testStaticCompile", "type": "function", "loc": [133, 141], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L132_C0", "vector": [2, 1, 0.5781, 0.038, 1, 0.18, 0.0, 121, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "testStaticCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testStaticCompile(self):\n source = \"\"\"#encoding utf-8\n#set $someUnicodeString = u\"B\u00e9b\u00e9\"\n$someUnicodeString\"\"\"\n\n template = self.createAndCompile(source)()\n\n a = unicode(template).encode(\"utf-8\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L134_C8", "label": "source =", "type": "assigned_variable", "loc": [134, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L133_C4", "vector": [14, 2, 0.5696, 0.0127, 2, 0.98, 0.0, 703, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " source = \"\"\"#encoding utf-8\n#set $someUnicodeString = u\"B\u00e9b\u00e9\"\n$someUnicodeString\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L138_C8", "label": "template =", "type": "assigned_variable", "loc": [138, 138], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L133_C4", "vector": [14, 2, 0.5823, 0.0042, 2, 0.98, 0.3333, 549, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = self.createAndCompile(source)()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L140_C8", "label": "a = encode()", "type": "assigned_variable", "loc": [140, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L133_C4", "vector": [14, 2, 0.5907, 0.0042, 2, 0.98, 0.6667, 475, 3, 1, 0, 0, 623, 10, 2], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "encode", "annotation": ""}, "snippet": " a = unicode(template).encode(\"utf-8\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L141_C8", "label": "assertEquals()", "type": "expression", "loc": [141, 141], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L133_C4", "vector": [8, 2, 0.5949, 0.0042, 2, 0.98, 1.0, 60, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEquals", "arg_names": [], "import_names": [], "rhs_call_name": "assertEquals", "annotation": ""}, "snippet": " self.assertEquals(\"B\u00e9b\u00e9\", a)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L143_C4", "label": "testDynamicCompile", "type": "function", "loc": [143, 151], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L132_C0", "vector": [2, 1, 0.6203, 0.038, 1, 0.18, 1.0, 877, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "testDynamicCompile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testDynamicCompile(self):\n source = \"\"\"#encoding utf-8\n#set $someUnicodeString = u\"B\u00e9b\u00e9\"\n$someUnicodeString\"\"\"\n\n template = Template(source = source)\n\n a = unicode(template).encode(\"utf-8\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L144_C8", "label": "source =", "type": "assigned_variable", "loc": [144, 146], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L143_C4", "vector": [14, 2, 0.6118, 0.0127, 2, 0.91, 0.0, 703, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " source = \"\"\"#encoding utf-8\n#set $someUnicodeString = u\"B\u00e9b\u00e9\"\n$someUnicodeString\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L148_C8", "label": "template = Template()", "type": "assigned_variable", "loc": [148, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L143_C4", "vector": [14, 2, 0.6245, 0.0042, 2, 0.91, 0.3333, 549, 3, 1, 0, 0, 137, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "Template", "annotation": ""}, "snippet": " template = Template(source = source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L150_C8", "label": "a = encode()", "type": "assigned_variable", "loc": [150, 150], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L143_C4", "vector": [14, 2, 0.6329, 0.0042, 2, 0.91, 0.6667, 475, 3, 1, 0, 0, 623, 10, 2], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "encode", "annotation": ""}, "snippet": " a = unicode(template).encode(\"utf-8\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L151_C8", "label": "assertEquals()", "type": "expression", "loc": [151, 151], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L143_C4", "vector": [8, 2, 0.6371, 0.0042, 2, 0.91, 1.0, 60, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEquals", "arg_names": [], "import_names": [], "rhs_call_name": "assertEquals", "annotation": ""}, "snippet": " self.assertEquals(\"B\u00e9b\u00e9\", a)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L153_C0", "label": "EncodeUnicodeCompatTest", "type": "class", "loc": [153, 166], "level": 0, "parent": null, "vector": [3, 0, 0.673, 0.0591, 0, 0.66, 0.8571, 584, 0, 1, 0, 0, 878, 0, 5], "semantic": {"name": "EncodeUnicodeCompatTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class EncodeUnicodeCompatTest(unittest.TestCase):\n \"\"\"\n Taken initially from Red Hat's bugzilla #529332\n https://bugzilla.redhat.com/show_bug.cgi?id=529332\n \"\"\"\n def runTest(self):\n t = Template(\"\"\"Foo ${var}\"\"\", filter='EncodeUnicode')\n t.var = u\"Text with some non-ascii characters: \u00e5\u00e4\u00f6\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L154_C4", "label": "expression", "type": "expression", "loc": [154, 157], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L153_C0", "vector": [8, 1, 0.6561, 0.0169, 1, 0.37, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Taken initially from Red Hat's bugzilla #529332\n https://bugzilla.redhat.com/show_bug.cgi?id=529332\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L158_C4", "label": "runTest", "type": "function", "loc": [158, 166], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L153_C0", "vector": [2, 1, 0.6835, 0.038, 1, 0.37, 1.0, 375, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "runTest", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def runTest(self):\n t = Template(\"\"\"Foo ${var}\"\"\", filter='EncodeUnicode')\n t.var = u\"Text with some non-ascii characters: \u00e5\u00e4\u00f6\"\n \n rc = t.respond()\n assert isinstance(rc, unicode), ('Template.respond() should return unicode', rc)\n \n rc = str(t)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L159_C8", "label": "t = Template()", "type": "assigned_variable", "loc": [159, 159], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L158_C4", "vector": [14, 2, 0.6709, 0.0042, 2, 0.67, 0.0, 15, 3, 2, 0, 0, 137, 10, 1], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "Template", "annotation": ""}, "snippet": " t = Template(\"\"\"Foo ${var}\"\"\", filter='EncodeUnicode')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L160_C8", "label": "t.var =", "type": "assigned_variable", "loc": [160, 160], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L158_C4", "vector": [14, 2, 0.6751, 0.0042, 2, 0.67, 0.3333, 102, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "t.var", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " t.var = u\"Text with some non-ascii characters: \u00e5\u00e4\u00f6\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L162_C8", "label": "rc = respond()", "type": "assigned_variable", "loc": [162, 162], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L158_C4", "vector": [14, 2, 0.6835, 0.0042, 2, 0.67, 0.6667, 401, 3, 0, 0, 0, 100, 10, 1], "semantic": {"name": "rc", "arg_names": [], "import_names": [], "rhs_call_name": "respond", "annotation": ""}, "snippet": " rc = t.respond()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L165_C8", "label": "rc = str()", "type": "assigned_variable", "loc": [165, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L158_C4", "vector": [14, 2, 0.6962, 0.0042, 2, 0.67, 1.0, 401, 3, 1, 0, 0, 52, 10, 1], "semantic": {"name": "rc", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " rc = str(t)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L169_C0", "label": "Unicode_in_SearchList_Test", "type": "class", "loc": [169, 194], "level": 0, "parent": null, "vector": [3, 0, 0.7658, 0.1097, 0, 0.66, 0.9048, 134, 0, 3, 0, 0, 516, 0, 12], "semantic": {"name": "Unicode_in_SearchList_Test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Unicode_in_SearchList_Test(CommandLineTest):\n def test_BasicASCII(self):\n source = '''This is $adjective'''\n\n template = self.createAndCompile(source)\n assert template and issubclass(template, Template)\n template = template(searchList=[{'adjective' : u'neat'}])\n assert template.respond()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L170_C4", "label": "test_BasicASCII", "type": "function", "loc": [170, 176], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L169_C0", "vector": [2, 1, 0.73, 0.0295, 1, 0.79, 0.0, 763, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "test_BasicASCII", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_BasicASCII(self):\n source = '''This is $adjective'''\n\n template = self.createAndCompile(source)\n assert template and issubclass(template, Template)\n template = template(searchList=[{'adjective' : u'neat'}])\n assert template.respond()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L171_C8", "label": "source =", "type": "assigned_variable", "loc": [171, 171], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L170_C4", "vector": [14, 2, 0.7215, 0.0042, 2, 0.59, 0.0, 703, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " source = '''This is $adjective'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L173_C8", "label": "template = createAndCompile()", "type": "assigned_variable", "loc": [173, 173], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L170_C4", "vector": [14, 2, 0.73, 0.0042, 2, 0.59, 0.5, 549, 3, 1, 0, 0, 995, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "createAndCompile", "annotation": ""}, "snippet": " template = self.createAndCompile(source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L175_C8", "label": "template = template()", "type": "assigned_variable", "loc": [175, 175], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L170_C4", "vector": [14, 2, 0.7384, 0.0042, 2, 0.59, 1.0, 549, 3, 1, 0, 0, 549, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "template", "annotation": ""}, "snippet": " template = template(searchList=[{'adjective' : u'neat'}])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L178_C4", "label": "test_Thai", "type": "function", "loc": [178, 185], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L169_C0", "vector": [2, 1, 0.7658, 0.0338, 1, 0.79, 0.5, 874, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "test_Thai", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_Thai(self):\n # The string is something in Thai\n source = '''This is $foo $adjective'''\n template = self.createAndCompile(source)\n assert template and issubclass(template, Template)\n template = template(searchList=[{'foo' : 'bar', \n 'adjective' : u'\\u0e22\\u0e34\\u0e19\\u0e14\\u0e35\\u0e15\\u0e49\\u0e2d\\u0e19\\u0e23\\u0e31\\u0e1a'}])\n assert template.respond()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L180_C8", "label": "source =", "type": "assigned_variable", "loc": [180, 180], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L178_C4", "vector": [14, 2, 0.7595, 0.0042, 2, 0.45, 0.0, 703, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " source = '''This is $foo $adjective'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L181_C8", "label": "template = createAndCompile()", "type": "assigned_variable", "loc": [181, 181], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L178_C4", "vector": [14, 2, 0.7637, 0.0042, 2, 0.45, 0.5, 549, 3, 1, 0, 0, 995, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "createAndCompile", "annotation": ""}, "snippet": " template = self.createAndCompile(source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L183_C8", "label": "template = template()", "type": "assigned_variable", "loc": [183, 184], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L178_C4", "vector": [14, 2, 0.7743, 0.0084, 2, 0.45, 1.0, 549, 3, 1, 0, 0, 549, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "template", "annotation": ""}, "snippet": " template = template(searchList=[{'foo' : 'bar', \n 'adjective' : u'\\u0e22\\u0e34\\u0e19\\u0e14\\u0e35\\u0e15\\u0e49\\u0e2d\\u0e19\\u0e23\\u0e31\\u0e1a'}])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L187_C4", "label": "test_Thai_utf8", "type": "function", "loc": [187, 194], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L169_C0", "vector": [2, 1, 0.8038, 0.0338, 1, 0.79, 1.0, 162, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "test_Thai_utf8", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_Thai_utf8(self):\n utf8 = '\\xe0\\xb8\\xa2\\xe0\\xb8\\xb4\\xe0\\xb8\\x99\\xe0\\xb8\\x94\\xe0\\xb8\\xb5\\xe0\\xb8\\x95\\xe0\\xb9\\x89\\xe0\\xb8\\xad\\xe0\\xb8\\x99\\xe0\\xb8\\xa3\\xe0\\xb8\\xb1\\xe0\\xb8\\x9a'\n\n source = '''This is $adjective'''\n template = self.createAndCompile(source)\n assert template and issubclass(template, Template)\n template = template(searchList=[{'adjective' : utf8}])\n assert template.respond()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L188_C8", "label": "utf8 =", "type": "assigned_variable", "loc": [188, 188], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L187_C4", "vector": [14, 2, 0.7932, 0.0042, 2, 0.17, 0.0, 414, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "utf8", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " utf8 = '\\xe0\\xb8\\xa2\\xe0\\xb8\\xb4\\xe0\\xb8\\x99\\xe0\\xb8\\x94\\xe0\\xb8\\xb5\\xe0\\xb8\\x95\\xe0\\xb9\\x89\\xe0\\xb8\\xad\\xe0\\xb8\\x99\\xe0\\xb8\\xa3\\xe0\\xb8\\xb1\\xe0\\xb8\\x9a'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L190_C8", "label": "source =", "type": "assigned_variable", "loc": [190, 190], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L187_C4", "vector": [14, 2, 0.8017, 0.0042, 2, 0.17, 0.3333, 703, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " source = '''This is $adjective'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L191_C8", "label": "template = createAndCompile()", "type": "assigned_variable", "loc": [191, 191], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L187_C4", "vector": [14, 2, 0.8059, 0.0042, 2, 0.17, 0.6667, 549, 3, 1, 0, 0, 995, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "createAndCompile", "annotation": ""}, "snippet": " template = self.createAndCompile(source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L193_C8", "label": "template = template()", "type": "assigned_variable", "loc": [193, 193], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L187_C4", "vector": [14, 2, 0.8143, 0.0042, 2, 0.17, 1.0, 549, 3, 1, 0, 0, 549, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "template", "annotation": ""}, "snippet": " template = template(searchList=[{'adjective' : utf8}])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L197_C0", "label": "InlineSpanishTest", "type": "class", "loc": [197, 232], "level": 0, "parent": null, "vector": [3, 0, 0.9051, 0.1519, 0, 0.66, 0.9524, 168, 0, 3, 0, 0, 878, 0, 6], "semantic": {"name": "InlineSpanishTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class InlineSpanishTest(unittest.TestCase):\n def setUp(self):\n super(InlineSpanishTest, self).setUp()\n self.template = '''\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L198_C4", "label": "setUp", "type": "function", "loc": [198, 218], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L197_C0", "vector": [2, 1, 0.8776, 0.0886, 1, 0.4, 0.0, 952, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n super(InlineSpanishTest, self).setUp()\n self.template = '''\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n <title>Pagina del vendedor</title>"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L199_C8", "label": "setUp()", "type": "expression", "loc": [199, 199], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L198_C4", "vector": [8, 2, 0.8397, 0.0042, 2, 0.61, 0.0, 952, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "setUp", "arg_names": [], "import_names": [], "rhs_call_name": "setUp", "annotation": ""}, "snippet": " super(InlineSpanishTest, self).setUp()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L200_C8", "label": "self.template =", "type": "assigned_variable", "loc": [200, 218], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L198_C4", "vector": [14, 2, 0.8819, 0.0802, 2, 0.61, 1.0, 479, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.template = '''\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n <title>Pagina del vendedor</title>\n </head>\n <body>"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L220_C4", "label": "test_failure", "type": "function", "loc": [220, 224], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L197_C0", "vector": [2, 1, 0.9367, 0.0211, 1, 0.4, 0.5, 640, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test_failure", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_failure(self):\n \"\"\" Test a template lacking a proper #encoding tag \"\"\"\n self.failUnlessRaises(UnicodeDecodeError, Template, self.template, searchList=[{'header' : '',\n 'nombre' : '', 'numpedidos_bodega' : '',\n 'numpedidos_noconf' : ''}])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L221_C8", "label": "expression", "type": "expression", "loc": [221, 221], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L220_C4", "vector": [8, 2, 0.9325, 0.0042, 2, 0.94, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\" Test a template lacking a proper #encoding tag \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L222_C8", "label": "failUnlessRaises()", "type": "expression", "loc": [222, 224], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L220_C4", "vector": [8, 2, 0.9409, 0.0127, 2, 0.94, 1.0, 223, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "failUnlessRaises", "arg_names": [], "import_names": [], "rhs_call_name": "failUnlessRaises", "annotation": ""}, "snippet": " self.failUnlessRaises(UnicodeDecodeError, Template, self.template, searchList=[{'header' : '',\n 'nombre' : '', 'numpedidos_bodega' : '',\n 'numpedidos_noconf' : ''}])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L226_C4", "label": "test_success", "type": "function", "loc": [226, 232], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L197_C0", "vector": [2, 1, 0.9662, 0.0295, 1, 0.4, 1.0, 610, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "test_success", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_success(self):\n \"\"\" Test a template with a proper #encoding tag \"\"\"\n template = '#encoding utf-8\\n%s' % self.template\n template = Template(template, searchList=[{'header' : '',\n 'nombre' : '', 'numpedidos_bodega' : '',\n 'numpedidos_noconf' : ''}])\n self.assertTrue(unicode(template))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L227_C8", "label": "expression", "type": "expression", "loc": [227, 227], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L226_C4", "vector": [8, 2, 0.9578, 0.0042, 2, 0.78, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\" Test a template with a proper #encoding tag \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L228_C8", "label": "template =", "type": "assigned_variable", "loc": [228, 228], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L226_C4", "vector": [14, 2, 0.962, 0.0042, 2, 0.78, 0.3333, 549, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '#encoding utf-8\\n%s' % self.template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L229_C8", "label": "template = Template()", "type": "assigned_variable", "loc": [229, 231], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L226_C4", "vector": [14, 2, 0.9705, 0.0127, 2, 0.78, 0.6667, 549, 3, 2, 0, 0, 137, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "Template", "annotation": ""}, "snippet": " template = Template(template, searchList=[{'header' : '',\n 'nombre' : '', 'numpedidos_bodega' : '',\n 'numpedidos_noconf' : ''}])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L232_C8", "label": "assertTrue()", "type": "expression", "loc": [232, 232], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L226_C4", "vector": [8, 2, 0.9789, 0.0042, 2, 0.78, 1.0, 170, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertTrue", "arg_names": [], "import_names": [], "rhs_call_name": "assertTrue", "annotation": ""}, "snippet": " self.assertTrue(unicode(template))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:If_L236_C0", "label": "if", "type": "if", "loc": [236, 237], "level": 0, "parent": null, "vector": [4, 0, 0.9979, 0.0084, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n unittest.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L237_C4", "label": "main()", "type": "expression", "loc": [237, 237], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1487:If_L236_C0", "vector": [8, 1, 1.0, 0.0042, 1, 0.7, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " unittest.main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:While_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:While_L16_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L17_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L25_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Return_L28_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L56_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L61_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L67_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L71_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L76_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L77_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L77_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L77_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L81_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L86_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L87_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L90_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L94_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:If_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L94_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Try_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:Try_L97_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L98_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:Try_L97_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L100_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:Try_L97_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Try_L102_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:Try_L102_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L103_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:Try_L102_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L104_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:Try_L102_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:If_L106_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:If_L106_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L107_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L94_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Return_L108_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L110_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L111_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L111_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L112_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L111_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L111_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L117_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L121_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L122_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L122_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L123_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L122_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L127_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L122_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L128_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L132_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L133_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L134_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L138_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L133_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L132_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L143_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L143_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L144_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L143_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L148_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L143_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L150_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L143_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L151_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L153_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L154_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L153_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L158_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L158_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L159_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L158_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L160_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L158_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L162_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L158_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L169_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L170_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L170_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L171_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L170_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L173_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L170_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L175_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L169_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L178_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L180_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L181_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L183_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L169_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L187_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L187_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L188_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L187_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L190_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L187_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L191_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L187_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L193_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L197_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L198_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L198_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L199_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L198_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L200_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L197_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L220_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L220_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L221_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L220_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L222_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:ClassDef_L197_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L226_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L226_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L227_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L226_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L228_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L226_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Assign_L229_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:FunctionDef_L226_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L232_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1487:If_L236_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1487:Expr_L237_C4"}]
#!/usr/bin/env python import sys import types import os import os.path import unittest from Cheetah.NameMapper import NotFound, valueForKey, \ valueForName, valueFromSearchList, valueFromFrame, valueFromFrameOrSearchList class DummyClass: classVar1 = 123 def __init__(self): self.instanceVar1 = 123 def __str__(self): return 'object' def meth(self, arg="arff"): return str(arg) def meth1(self, arg="doo"): return arg def meth2(self, arg1="a1", arg2="a2"): raise ValueError def meth3(self): """Tests a bug that Jeff Johnson reported on Oct 1, 2001""" x = 'A string' try: for i in [1, 2, 3, 4]: if x == 2: pass if x == 'xx': pass return x except: raise def dummyFunc(arg="Scooby"): return arg def funcThatRaises(): raise ValueError testNamespace = { 'aStr': 'blarg', 'anInt': 1, 'aFloat': 1.5, 'aDict': {'one': 'item1', 'two': 'item2', 'nestedDict': {'one': 'nestedItem1', 'two': 'nestedItem2', 'funcThatRaises': funcThatRaises, 'aClass': DummyClass, }, 'nestedFunc': dummyFunc, }, 'aClass': DummyClass, 'aFunc': dummyFunc, 'anObj': DummyClass(), 'aMeth': DummyClass().meth1, 'none': None, 'emptyString': '', 'funcThatRaises': funcThatRaises, } autoCallResults = {'aFunc': 'Scooby', 'aMeth': 'doo', } results = testNamespace.copy() results.update({'anObj.meth1': 'doo', 'aDict.one': 'item1', 'aDict.nestedDict': testNamespace['aDict']['nestedDict'], 'aDict.nestedDict.one': 'nestedItem1', 'aDict.nestedDict.aClass': DummyClass, 'aDict.nestedFunc': 'Scooby', 'aClass.classVar1': 123, 'anObj.instanceVar1': 123, 'anObj.meth3': 'A string', }) for k in testNamespace.keys(): # put them in the globals for the valueFromFrame tests exec('%s = testNamespace[k]'%k) ################################################## ## TEST BASE CLASSES class NameMapperTest(unittest.TestCase): failureException = (NotFound, AssertionError) _testNamespace = testNamespace _results = results def namespace(self): return self._testNamespace def VFN(self, name, autocall=True): return valueForName(self.namespace(), name, autocall) def VFS(self, searchList, name, autocall=True): return valueFromSearchList(searchList, name, autocall) # alias to be overriden later get = VFN def check(self, name): got = self.get(name) if name in autoCallResults: expected = autoCallResults[name] else: expected = self._results[name] assert got == expected ################################################## ## TEST CASE CLASSES class VFN(NameMapperTest): def test1(self): """string in dict lookup""" self.check('aStr') def test2(self): """string in dict lookup in a loop""" for i in range(10): self.check('aStr') def test3(self): """int in dict lookup""" self.check('anInt') def test4(self): """int in dict lookup in a loop""" for i in range(10): self.check('anInt') def test5(self): """float in dict lookup""" self.check('aFloat') def test6(self): """float in dict lookup in a loop""" for i in range(10): self.check('aFloat') def test7(self): """class in dict lookup""" self.check('aClass') def test8(self): """class in dict lookup in a loop""" for i in range(10): self.check('aClass') def test9(self): """aFunc in dict lookup""" self.check('aFunc') def test10(self): """aFunc in dict lookup in a loop""" for i in range(10): self.check('aFunc') def test11(self): """aMeth in dict lookup""" self.check('aMeth') def test12(self): """aMeth in dict lookup in a loop""" for i in range(10): self.check('aMeth') def test13(self): """aMeth in dict lookup""" self.check('aMeth') def test14(self): """aMeth in dict lookup in a loop""" for i in range(10): self.check('aMeth') def test15(self): """anObj in dict lookup""" self.check('anObj') def test16(self): """anObj in dict lookup in a loop""" for i in range(10): self.check('anObj') def test17(self): """aDict in dict lookup""" self.check('aDict') def test18(self): """aDict in dict lookup in a loop""" for i in range(10): self.check('aDict') def test17(self): """aDict in dict lookup""" self.check('aDict') def test18(self): """aDict in dict lookup in a loop""" for i in range(10): self.check('aDict') def test19(self): """aClass.classVar1 in dict lookup""" self.check('aClass.classVar1') def test20(self): """aClass.classVar1 in dict lookup in a loop""" for i in range(10): self.check('aClass.classVar1') def test23(self): """anObj.instanceVar1 in dict lookup""" self.check('anObj.instanceVar1') def test24(self): """anObj.instanceVar1 in dict lookup in a loop""" for i in range(10): self.check('anObj.instanceVar1') ## tests 22, 25, and 26 removed when the underscored lookup was removed def test27(self): """anObj.meth1 in dict lookup""" self.check('anObj.meth1') def test28(self): """anObj.meth1 in dict lookup in a loop""" for i in range(10): self.check('anObj.meth1') def test29(self): """aDict.one in dict lookup""" self.check('aDict.one') def test30(self): """aDict.one in dict lookup in a loop""" for i in range(10): self.check('aDict.one') def test31(self): """aDict.nestedDict in dict lookup""" self.check('aDict.nestedDict') def test32(self): """aDict.nestedDict in dict lookup in a loop""" for i in range(10): self.check('aDict.nestedDict') def test33(self): """aDict.nestedDict.one in dict lookup""" self.check('aDict.nestedDict.one') def test34(self): """aDict.nestedDict.one in dict lookup in a loop""" for i in range(10): self.check('aDict.nestedDict.one') def test35(self): """aDict.nestedFunc in dict lookup""" self.check('aDict.nestedFunc') def test36(self): """aDict.nestedFunc in dict lookup in a loop""" for i in range(10): self.check('aDict.nestedFunc') def test37(self): """aDict.nestedFunc in dict lookup - without autocalling""" assert self.get('aDict.nestedFunc', False) == dummyFunc def test38(self): """aDict.nestedFunc in dict lookup in a loop - without autocalling""" for i in range(10): assert self.get('aDict.nestedFunc', False) == dummyFunc def test39(self): """aMeth in dict lookup - without autocalling""" assert self.get('aMeth', False) == self.namespace()['aMeth'] def test40(self): """aMeth in dict lookup in a loop - without autocalling""" for i in range(10): assert self.get('aMeth', False) == self.namespace()['aMeth'] def test41(self): """anObj.meth3 in dict lookup""" self.check('anObj.meth3') def test42(self): """aMeth in dict lookup in a loop""" for i in range(10): self.check('anObj.meth3') def test43(self): """NotFound test""" def test(self=self): self.get('anObj.methX') self.assertRaises(NotFound, test) def test44(self): """NotFound test in a loop""" def test(self=self): self.get('anObj.methX') for i in range(10): self.assertRaises(NotFound, test) def test45(self): """Other exception from meth test""" def test(self=self): self.get('anObj.meth2') self.assertRaises(ValueError, test) def test46(self): """Other exception from meth test in a loop""" def test(self=self): self.get('anObj.meth2') for i in range(10): self.assertRaises(ValueError, test) def test47(self): """None in dict lookup""" self.check('none') def test48(self): """None in dict lookup in a loop""" for i in range(10): self.check('none') def test49(self): """EmptyString in dict lookup""" self.check('emptyString') def test50(self): """EmptyString in dict lookup in a loop""" for i in range(10): self.check('emptyString') def test51(self): """Other exception from func test""" def test(self=self): self.get('funcThatRaises') self.assertRaises(ValueError, test) def test52(self): """Other exception from func test in a loop""" def test(self=self): self.get('funcThatRaises') for i in range(10): self.assertRaises(ValueError, test) def test53(self): """Other exception from func test""" def test(self=self): self.get('aDict.nestedDict.funcThatRaises') self.assertRaises(ValueError, test) def test54(self): """Other exception from func test in a loop""" def test(self=self): self.get('aDict.nestedDict.funcThatRaises') for i in range(10): self.assertRaises(ValueError, test) def test55(self): """aDict.nestedDict.aClass in dict lookup""" self.check('aDict.nestedDict.aClass') def test56(self): """aDict.nestedDict.aClass in dict lookup in a loop""" for i in range(10): self.check('aDict.nestedDict.aClass') def test57(self): """aDict.nestedDict.aClass in dict lookup - without autocalling""" assert self.get('aDict.nestedDict.aClass', False) == DummyClass def test58(self): """aDict.nestedDict.aClass in dict lookup in a loop - without autocalling""" for i in range(10): assert self.get('aDict.nestedDict.aClass', False) == DummyClass def test59(self): """Other exception from func test -- but without autocalling shouldn't raise""" self.get('aDict.nestedDict.funcThatRaises', False) def test60(self): """Other exception from func test in a loop -- but without autocalling shouldn't raise""" for i in range(10): self.get('aDict.nestedDict.funcThatRaises', False) class VFS(VFN): _searchListLength = 1 def searchList(self): lng = self._searchListLength if lng == 1: return [self.namespace()] elif lng == 2: return [self.namespace(), {'dummy':1234}] elif lng == 3: # a tuple for kicks return ({'dummy':1234}, self.namespace(), {'dummy':1234}) elif lng == 4: # a generator for more kicks return self.searchListGenerator() def searchListGenerator(self): class Test: pass for i in [Test(), {'dummy':1234}, self.namespace(), {'dummy':1234}]: yield i def get(self, name, autocall=True): return self.VFS(self.searchList(), name, autocall) class VFS_2namespaces(VFS): _searchListLength = 2 class VFS_3namespaces(VFS): _searchListLength = 3 class VFS_4namespaces(VFS): _searchListLength = 4 class VFF(VFN): def get(self, name, autocall=True): ns = self._testNamespace aStr = ns['aStr'] aFloat = ns['aFloat'] none = 'some' return valueFromFrame(name, autocall) def setUp(self): """Mod some of the data """ self._testNamespace = ns = self._testNamespace.copy() self._results = res = self._results.copy() ns['aStr'] = res['aStr'] = 'BLARG' ns['aFloat'] = res['aFloat'] = 0.1234 res['none'] = 'some' res['True'] = True res['False'] = False res['None'] = None res['eval'] = eval def test_VFF_1(self): """Builtins""" self.check('True') self.check('None') self.check('False') assert self.get('eval', False)==eval assert self.get('range', False)==range class VFFSL(VFS): _searchListLength = 1 def setUp(self): """Mod some of the data """ self._testNamespace = ns = self._testNamespace.copy() self._results = res = self._results.copy() ns['aStr'] = res['aStr'] = 'BLARG' ns['aFloat'] = res['aFloat'] = 0.1234 res['none'] = 'some' del ns['anInt'] # will be picked up by globals def VFFSL(self, searchList, name, autocall=True): anInt = 1 none = 'some' return valueFromFrameOrSearchList(searchList, name, autocall) def get(self, name, autocall=True): return self.VFFSL(self.searchList(), name, autocall) class VFFSL_2(VFFSL): _searchListLength = 2 class VFFSL_3(VFFSL): _searchListLength = 3 class VFFSL_4(VFFSL): _searchListLength = 4 if sys.platform.startswith('java'): del VFF, VFFSL, VFFSL_2, VFFSL_3, VFFSL_4 ################################################## ## if run from the command line ## if __name__ == '__main__': unittest.main()
ajibawa-2023/Python-Code-Large/train/row_1489
335
525
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0076, 0.0019, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Import_L5_C0", "label": "types import types", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0095, 0.0019, 0, 0.66, 0.0385, 209, 0, 1, 0, 0, 209, 0, 0], "semantic": {"name": "types", "arg_names": [], "import_names": ["types"], "rhs_call_name": "", "annotation": ""}, "snippet": "import types"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Import_L6_C0", "label": "os import os", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0114, 0.0019, 0, 0.66, 0.0769, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Import_L7_C0", "label": "os.path import os.path", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0133, 0.0019, 0, 0.66, 0.1154, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os.path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Import_L9_C0", "label": "unittest import unittest", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0171, 0.0019, 0, 0.66, 0.1538, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], "rhs_call_name": "", "annotation": ""}, "snippet": "import unittest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:ImportFrom_L10_C0", "label": "from Cheetah.NameMapper import NotFound, valueForKey, valueForName\u2026", "type": "import", "loc": [10, 11], "level": 0, "parent": null, "vector": [1, 0, 0.02, 0.0038, 0, 0.66, 0.1923, 308, 0, 6, 0, 0, 308, 0, 0], "semantic": {"name": "Cheetah.NameMapper", "arg_names": [], "import_names": ["NotFound", "valueForKey", "valueForName", "valueFromSearchList", "valueFromFrame", "valueFromFrameOrSearchList"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.NameMapper import NotFound, valueForKey, \\\n valueForName, valueFromSearchList, valueFromFrame, valueFromFrameOrSearchList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L14_C0", "label": "DummyClass", "type": "class", "loc": [14, 45], "level": 0, "parent": null, "vector": [3, 0, 0.0562, 0.061, 0, 0.66, 0.2308, 9, 0, 6, 0, 0, 0, 0, 1], "semantic": {"name": "DummyClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class DummyClass:\n classVar1 = 123\n\n def __init__(self):\n self.instanceVar1 = 123\n \n def __str__(self):\n return 'object'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L15_C4", "label": "classVar1 =", "type": "assigned_variable", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L14_C0", "vector": [14, 1, 0.0286, 0.0019, 1, 0.57, 0.0, 874, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "classVar1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " classVar1 = 123"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L17_C4", "label": "__init__", "type": "function", "loc": [17, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L14_C0", "vector": [2, 1, 0.0333, 0.0038, 1, 0.57, 0.1667, 555, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self):\n self.instanceVar1 = 123"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L18_C8", "label": "self.instanceVar1 =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L17_C4", "vector": [14, 2, 0.0343, 0.0019, 2, 0.87, 0.0, 895, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.instanceVar1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.instanceVar1 = 123"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L20_C4", "label": "__str__", "type": "function", "loc": [20, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L14_C0", "vector": [2, 1, 0.039, 0.0038, 1, 0.57, 0.3333, 527, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__str__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __str__(self):\n return 'object'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L21_C8", "label": "return", "type": "return", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L20_C4", "vector": [13, 2, 0.04, 0.0019, 2, 0.34, 0.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return 'object'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L23_C4", "label": "meth", "type": "function", "loc": [23, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L14_C0", "vector": [2, 1, 0.0448, 0.0038, 1, 0.57, 0.5, 110, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "meth", "arg_names": ["self", "arg"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def meth(self, arg=\"arff\"):\n return str(arg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L24_C8", "label": "return", "type": "return", "loc": [24, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L23_C4", "vector": [13, 2, 0.0457, 0.0019, 2, 0.88, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return str(arg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L26_C4", "label": "meth1", "type": "function", "loc": [26, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L14_C0", "vector": [2, 1, 0.0505, 0.0038, 1, 0.57, 0.6667, 831, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "meth1", "arg_names": ["self", "arg"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def meth1(self, arg=\"doo\"):\n return arg"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L27_C8", "label": "return", "type": "return", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L26_C4", "vector": [13, 2, 0.0514, 0.0019, 2, 0.63, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return arg"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L29_C4", "label": "meth2", "type": "function", "loc": [29, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L14_C0", "vector": [2, 1, 0.0562, 0.0038, 1, 0.57, 0.8333, 374, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "meth2", "arg_names": ["self", "arg1", "arg2"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def meth2(self, arg1=\"a1\", arg2=\"a2\"):\n raise ValueError"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L32_C4", "label": "meth3", "type": "function", "loc": [32, 45], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L14_C0", "vector": [2, 1, 0.0733, 0.0267, 1, 0.57, 1.0, 198, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "meth3", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def meth3(self):\n \"\"\"Tests a bug that Jeff Johnson reported on Oct 1, 2001\"\"\"\n \n x = 'A string'\n try:\n for i in [1, 2, 3, 4]:\n if x == 2:\t\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L33_C8", "label": "expression", "type": "expression", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L32_C4", "vector": [8, 2, 0.0629, 0.0019, 2, 0.15, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Tests a bug that Jeff Johnson reported on Oct 1, 2001\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L35_C8", "label": "x =", "type": "assigned_variable", "loc": [35, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L32_C4", "vector": [14, 2, 0.0667, 0.0019, 2, 0.15, 0.5, 190, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " x = 'A string'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Try_L36_C8", "label": "try", "type": "try", "loc": [36, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L32_C4", "vector": [7, 2, 0.0771, 0.019, 2, 0.15, 1.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n for i in [1, 2, 3, 4]:\n if x == 2:\t\n pass\n \n if x == 'xx':\n pass\n return x"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L37_C12", "label": "for i", "type": "for", "loc": [37, 42], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:Try_L36_C8", "vector": [6, 3, 0.0752, 0.0114, 3, 0.91, 0.0, 826, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in [1, 2, 3, 4]:\n if x == 2:\t\n pass\n \n if x == 'xx':\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L38_C16", "label": "if", "type": "if", "loc": [38, 39], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L37_C12", "vector": [4, 4, 0.0733, 0.0038, 4, 0.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if x == 2:\t\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L41_C16", "label": "if", "type": "if", "loc": [41, 42], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L37_C12", "vector": [4, 4, 0.079, 0.0038, 4, 0.5, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if x == 'xx':\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L43_C12", "label": "return", "type": "return", "loc": [43, 43], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:Try_L36_C8", "vector": [13, 3, 0.0819, 0.0019, 3, 0.91, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return x"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L48_C0", "label": "dummyFunc", "type": "function", "loc": [48, 49], "level": 0, "parent": null, "vector": [2, 0, 0.0924, 0.0038, 0, 0.66, 0.2692, 216, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "dummyFunc", "arg_names": ["arg"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def dummyFunc(arg=\"Scooby\"):\n return arg"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L49_C4", "label": "return", "type": "return", "loc": [49, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L48_C0", "vector": [13, 1, 0.0933, 0.0019, 1, 0.09, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return arg"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L51_C0", "label": "funcThatRaises", "type": "function", "loc": [51, 52], "level": 0, "parent": null, "vector": [2, 0, 0.0981, 0.0038, 0, 0.66, 0.3077, 968, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "funcThatRaises", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def funcThatRaises():\n raise ValueError"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L55_C0", "label": "testNamespace =", "type": "assigned_variable", "loc": [55, 75], "level": 0, "parent": null, "vector": [14, 0, 0.1238, 0.04, 0, 0.66, 0.3462, 883, 0, 0, 0, 0, 0, 6, 2], "semantic": {"name": "testNamespace", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "testNamespace = {\n 'aStr': 'blarg',\n 'anInt': 1,\n 'aFloat': 1.5,\n 'aDict': {'one': 'item1',\n 'two': 'item2',\n 'nestedDict': {'one': 'nestedItem1',\n 'two': 'nestedItem2',"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L77_C0", "label": "autoCallResults =", "type": "assigned_variable", "loc": [77, 79], "level": 0, "parent": null, "vector": [14, 0, 0.1486, 0.0057, 0, 0.66, 0.3846, 276, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "autoCallResults", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "autoCallResults = {'aFunc': 'Scooby',\n 'aMeth': 'doo',\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L81_C0", "label": "results = copy()", "type": "assigned_variable", "loc": [81, 81], "level": 0, "parent": null, "vector": [14, 0, 0.1543, 0.0019, 0, 0.66, 0.4231, 143, 3, 0, 0, 0, 739, 10, 1], "semantic": {"name": "results", "arg_names": [], "import_names": [], "rhs_call_name": "copy", "annotation": ""}, "snippet": "results = testNamespace.copy()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L82_C0", "label": "update()", "type": "expression", "loc": [82, 91], "level": 0, "parent": null, "vector": [8, 0, 0.1648, 0.019, 0, 0.66, 0.4615, 637, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": "results.update({'anObj.meth1': 'doo',\n 'aDict.one': 'item1',\n 'aDict.nestedDict': testNamespace['aDict']['nestedDict'],\n 'aDict.nestedDict.one': 'nestedItem1',\n 'aDict.nestedDict.aClass': DummyClass,\n 'aDict.nestedFunc': 'Scooby',\n 'aClass.classVar1': 123,\n 'anObj.instanceVar1': 123,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L93_C0", "label": "for k", "type": "for", "loc": [93, 95], "level": 0, "parent": null, "vector": [6, 0, 0.179, 0.0057, 0, 0.66, 0.5, 954, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "k", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for k in testNamespace.keys():\n # put them in the globals for the valueFromFrame tests\n exec('%s = testNamespace[k]'%k)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L95_C4", "label": "exec()", "type": "expression", "loc": [95, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L93_C0", "vector": [8, 1, 0.181, 0.0019, 1, 0.39, 0.0, 272, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exec", "arg_names": [], "import_names": [], "rhs_call_name": "exec", "annotation": ""}, "snippet": " exec('%s = testNamespace[k]'%k)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "label": "NameMapperTest", "type": "class", "loc": [100, 124], "level": 0, "parent": null, "vector": [3, 0, 0.2133, 0.0476, 0, 0.66, 0.5385, 441, 0, 4, 0, 0, 878, 0, 4], "semantic": {"name": "NameMapperTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class NameMapperTest(unittest.TestCase):\n failureException = (NotFound, AssertionError)\n _testNamespace = testNamespace\n _results = results\n \n def namespace(self):\n return self._testNamespace\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L101_C4", "label": "failureException =", "type": "assigned_variable", "loc": [101, 101], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "vector": [14, 1, 0.1924, 0.0019, 1, 0.11, 0.0, 935, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "failureException", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " failureException = (NotFound, AssertionError)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L102_C4", "label": "_testNamespace =", "type": "assigned_variable", "loc": [102, 102], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "vector": [14, 1, 0.1943, 0.0019, 1, 0.11, 0.1429, 779, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_testNamespace", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _testNamespace = testNamespace"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L103_C4", "label": "_results =", "type": "assigned_variable", "loc": [103, 103], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "vector": [14, 1, 0.1962, 0.0019, 1, 0.11, 0.2857, 429, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_results", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _results = results"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L105_C4", "label": "namespace", "type": "function", "loc": [105, 106], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "vector": [2, 1, 0.201, 0.0038, 1, 0.11, 0.4286, 127, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "namespace", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def namespace(self):\n return self._testNamespace"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L106_C8", "label": "return", "type": "return", "loc": [106, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L105_C4", "vector": [13, 2, 0.2019, 0.0019, 2, 0.69, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._testNamespace"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L108_C4", "label": "VFN", "type": "function", "loc": [108, 109], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "vector": [2, 1, 0.2067, 0.0038, 1, 0.11, 0.5714, 174, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "VFN", "arg_names": ["self", "name", "autocall"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def VFN(self, name, autocall=True):\n return valueForName(self.namespace(), name, autocall)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L109_C8", "label": "return", "type": "return", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L108_C4", "vector": [13, 2, 0.2076, 0.0019, 2, 0.11, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return valueForName(self.namespace(), name, autocall)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L111_C4", "label": "VFS", "type": "function", "loc": [111, 112], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "vector": [2, 1, 0.2124, 0.0038, 1, 0.11, 0.7143, 85, 0, 4, 1, 0, 0, 0, 1], "semantic": {"name": "VFS", "arg_names": ["self", "searchList", "name", "autocall"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def VFS(self, searchList, name, autocall=True):\n return valueFromSearchList(searchList, name, autocall)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L112_C8", "label": "return", "type": "return", "loc": [112, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L111_C4", "vector": [13, 2, 0.2133, 0.0019, 2, 0.7, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return valueFromSearchList(searchList, name, autocall)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L116_C4", "label": "get =", "type": "assigned_variable", "loc": [116, 116], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "vector": [14, 1, 0.221, 0.0019, 1, 0.11, 0.8571, 607, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "get", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " get = VFN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L118_C4", "label": "check", "type": "function", "loc": [118, 124], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "vector": [2, 1, 0.2305, 0.0133, 1, 0.11, 1.0, 803, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def check(self, name):\n got = self.get(name)\n if name in autoCallResults:\n expected = autoCallResults[name]\n else:\n expected = self._results[name]\n assert got == expected"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L119_C8", "label": "got = get()", "type": "assigned_variable", "loc": [119, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L118_C4", "vector": [14, 2, 0.2267, 0.0019, 2, 0.56, 0.0, 852, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "got", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " got = self.get(name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L120_C8", "label": "if", "type": "if", "loc": [120, 123], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L118_C4", "vector": [4, 2, 0.2314, 0.0076, 2, 0.56, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name in autoCallResults:\n expected = autoCallResults[name]\n else:\n expected = self._results[name]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L121_C12", "label": "expected =", "type": "assigned_variable", "loc": [121, 121], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L120_C8", "vector": [14, 3, 0.2305, 0.0019, 3, 0.83, 0.0, 361, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "expected", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expected = autoCallResults[name]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L123_C12", "label": "expected =", "type": "assigned_variable", "loc": [123, 123], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L120_C8", "vector": [14, 3, 0.2343, 0.0019, 3, 0.83, 1.0, 361, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "expected", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expected = self._results[name]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "label": "VFN", "type": "class", "loc": [130, 421], "level": 0, "parent": null, "vector": [3, 0, 0.5248, 0.5562, 0, 0.66, 0.5769, 174, 0, 66, 0, 0, 441, 0, 97], "semantic": {"name": "VFN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class VFN(NameMapperTest):\n\n def test1(self):\n \"\"\"string in dict lookup\"\"\"\n self.check('aStr')\n\n def test2(self):\n \"\"\"string in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L132_C4", "label": "test1", "type": "function", "loc": [132, 134], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.2533, 0.0057, 1, 0.65, 0.0, 410, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test1", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test1(self):\n \"\"\"string in dict lookup\"\"\"\n self.check('aStr')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L133_C8", "label": "expression", "type": "expression", "loc": [133, 133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L132_C4", "vector": [8, 2, 0.2533, 0.0019, 2, 0.71, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"string in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L134_C8", "label": "check()", "type": "expression", "loc": [134, 134], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L132_C4", "vector": [8, 2, 0.2552, 0.0019, 2, 0.71, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aStr')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L136_C4", "label": "test2", "type": "function", "loc": [136, 139], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.2619, 0.0076, 1, 0.65, 0.0175, 869, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test2", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test2(self):\n \"\"\"string in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('aStr')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L137_C8", "label": "expression", "type": "expression", "loc": [137, 137], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L136_C4", "vector": [8, 2, 0.261, 0.0019, 2, 0.76, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"string in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L138_C8", "label": "for i", "type": "for", "loc": [138, 139], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L136_C4", "vector": [6, 2, 0.2638, 0.0038, 2, 0.76, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('aStr')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L139_C12", "label": "check()", "type": "expression", "loc": [139, 139], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L138_C8", "vector": [8, 3, 0.2648, 0.0019, 3, 0.74, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aStr')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L141_C4", "label": "test3", "type": "function", "loc": [141, 143], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.2705, 0.0057, 1, 0.65, 0.0351, 741, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test3", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test3(self):\n \"\"\"int in dict lookup\"\"\"\n self.check('anInt')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L142_C8", "label": "expression", "type": "expression", "loc": [142, 142], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L141_C4", "vector": [8, 2, 0.2705, 0.0019, 2, 0.45, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"int in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L143_C8", "label": "check()", "type": "expression", "loc": [143, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L141_C4", "vector": [8, 2, 0.2724, 0.0019, 2, 0.45, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('anInt')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L145_C4", "label": "test4", "type": "function", "loc": [145, 148], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.279, 0.0076, 1, 0.65, 0.0526, 436, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test4", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test4(self):\n \"\"\"int in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('anInt')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L146_C8", "label": "expression", "type": "expression", "loc": [146, 146], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L145_C4", "vector": [8, 2, 0.2781, 0.0019, 2, 0.84, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"int in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L147_C8", "label": "for i", "type": "for", "loc": [147, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L145_C4", "vector": [6, 2, 0.281, 0.0038, 2, 0.84, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('anInt')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L148_C12", "label": "check()", "type": "expression", "loc": [148, 148], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L147_C8", "vector": [8, 3, 0.2819, 0.0019, 3, 0.69, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('anInt')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L150_C4", "label": "test5", "type": "function", "loc": [150, 152], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.2876, 0.0057, 1, 0.65, 0.0702, 18, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test5", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test5(self):\n \"\"\"float in dict lookup\"\"\"\n self.check('aFloat')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L151_C8", "label": "expression", "type": "expression", "loc": [151, 151], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L150_C4", "vector": [8, 2, 0.2876, 0.0019, 2, 0.89, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"float in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L152_C8", "label": "check()", "type": "expression", "loc": [152, 152], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L150_C4", "vector": [8, 2, 0.2895, 0.0019, 2, 0.89, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aFloat')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L154_C4", "label": "test6", "type": "function", "loc": [154, 157], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.2962, 0.0076, 1, 0.65, 0.0877, 660, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test6", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test6(self):\n \"\"\"float in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('aFloat')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L155_C8", "label": "expression", "type": "expression", "loc": [155, 155], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L154_C4", "vector": [8, 2, 0.2952, 0.0019, 2, 0.6, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"float in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L156_C8", "label": "for i", "type": "for", "loc": [156, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L154_C4", "vector": [6, 2, 0.2981, 0.0038, 2, 0.6, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('aFloat')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L157_C12", "label": "check()", "type": "expression", "loc": [157, 157], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L156_C8", "vector": [8, 3, 0.299, 0.0019, 3, 0.4, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aFloat')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L159_C4", "label": "test7", "type": "function", "loc": [159, 161], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.3048, 0.0057, 1, 0.65, 0.1053, 163, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test7", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test7(self):\n \"\"\"class in dict lookup\"\"\"\n self.check('aClass')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L160_C8", "label": "expression", "type": "expression", "loc": [160, 160], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L159_C4", "vector": [8, 2, 0.3048, 0.0019, 2, 0.94, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"class in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L161_C8", "label": "check()", "type": "expression", "loc": [161, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L159_C4", "vector": [8, 2, 0.3067, 0.0019, 2, 0.94, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aClass')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L163_C4", "label": "test8", "type": "function", "loc": [163, 166], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.3133, 0.0076, 1, 0.65, 0.1228, 125, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test8", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test8(self):\n \"\"\"class in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('aClass')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L164_C8", "label": "expression", "type": "expression", "loc": [164, 164], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L163_C4", "vector": [8, 2, 0.3124, 0.0019, 2, 0.32, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"class in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L165_C8", "label": "for i", "type": "for", "loc": [165, 166], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L163_C4", "vector": [6, 2, 0.3152, 0.0038, 2, 0.32, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('aClass')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L166_C12", "label": "check()", "type": "expression", "loc": [166, 166], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L165_C8", "vector": [8, 3, 0.3162, 0.0019, 3, 0.2, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aClass')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L168_C4", "label": "test9", "type": "function", "loc": [168, 170], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.3219, 0.0057, 1, 0.65, 0.1404, 387, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test9", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test9(self):\n \"\"\"aFunc in dict lookup\"\"\"\n self.check('aFunc')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L169_C8", "label": "expression", "type": "expression", "loc": [169, 169], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L168_C4", "vector": [8, 2, 0.3219, 0.0019, 2, 0.18, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aFunc in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L170_C8", "label": "check()", "type": "expression", "loc": [170, 170], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L168_C4", "vector": [8, 2, 0.3238, 0.0019, 2, 0.18, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aFunc')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L172_C4", "label": "test10", "type": "function", "loc": [172, 175], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.3305, 0.0076, 1, 0.65, 0.1579, 519, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test10", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test10(self):\n \"\"\"aFunc in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('aFunc')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L173_C8", "label": "expression", "type": "expression", "loc": [173, 173], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L172_C4", "vector": [8, 2, 0.3295, 0.0019, 2, 0.16, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aFunc in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L174_C8", "label": "for i", "type": "for", "loc": [174, 175], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L172_C4", "vector": [6, 2, 0.3324, 0.0038, 2, 0.16, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('aFunc')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L175_C12", "label": "check()", "type": "expression", "loc": [175, 175], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L174_C8", "vector": [8, 3, 0.3333, 0.0019, 3, 0.19, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aFunc')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L177_C4", "label": "test11", "type": "function", "loc": [177, 179], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.339, 0.0057, 1, 0.65, 0.1754, 714, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test11", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test11(self):\n \"\"\"aMeth in dict lookup\"\"\"\n self.check('aMeth')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L178_C8", "label": "expression", "type": "expression", "loc": [178, 178], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L177_C4", "vector": [8, 2, 0.339, 0.0019, 2, 0.31, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aMeth in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L179_C8", "label": "check()", "type": "expression", "loc": [179, 179], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L177_C4", "vector": [8, 2, 0.341, 0.0019, 2, 0.31, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aMeth')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L181_C4", "label": "test12", "type": "function", "loc": [181, 184], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.3476, 0.0076, 1, 0.65, 0.193, 789, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test12", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test12(self):\n \"\"\"aMeth in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('aMeth')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L182_C8", "label": "expression", "type": "expression", "loc": [182, 182], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L181_C4", "vector": [8, 2, 0.3467, 0.0019, 2, 0.35, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aMeth in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L183_C8", "label": "for i", "type": "for", "loc": [183, 184], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L181_C4", "vector": [6, 2, 0.3495, 0.0038, 2, 0.35, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('aMeth')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L184_C12", "label": "check()", "type": "expression", "loc": [184, 184], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L183_C8", "vector": [8, 3, 0.3505, 0.0019, 3, 0.71, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aMeth')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L186_C4", "label": "test13", "type": "function", "loc": [186, 188], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.3562, 0.0057, 1, 0.65, 0.2105, 631, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test13", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test13(self):\n \"\"\"aMeth in dict lookup\"\"\"\n self.check('aMeth')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L187_C8", "label": "expression", "type": "expression", "loc": [187, 187], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L186_C4", "vector": [8, 2, 0.3562, 0.0019, 2, 0.81, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aMeth in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L188_C8", "label": "check()", "type": "expression", "loc": [188, 188], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L186_C4", "vector": [8, 2, 0.3581, 0.0019, 2, 0.81, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aMeth')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L190_C4", "label": "test14", "type": "function", "loc": [190, 193], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.3648, 0.0076, 1, 0.65, 0.2281, 395, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test14", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test14(self):\n \"\"\"aMeth in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('aMeth')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L191_C8", "label": "expression", "type": "expression", "loc": [191, 191], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L190_C4", "vector": [8, 2, 0.3638, 0.0019, 2, 0.4, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aMeth in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L192_C8", "label": "for i", "type": "for", "loc": [192, 193], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L190_C4", "vector": [6, 2, 0.3667, 0.0038, 2, 0.4, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('aMeth')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L193_C12", "label": "check()", "type": "expression", "loc": [193, 193], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L192_C8", "vector": [8, 3, 0.3676, 0.0019, 3, 0.02, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aMeth')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L195_C4", "label": "test15", "type": "function", "loc": [195, 197], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.3733, 0.0057, 1, 0.65, 0.2456, 475, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test15", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test15(self):\n \"\"\"anObj in dict lookup\"\"\"\n self.check('anObj')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L196_C8", "label": "expression", "type": "expression", "loc": [196, 196], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L195_C4", "vector": [8, 2, 0.3733, 0.0019, 2, 0.05, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"anObj in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L197_C8", "label": "check()", "type": "expression", "loc": [197, 197], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L195_C4", "vector": [8, 2, 0.3752, 0.0019, 2, 0.05, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('anObj')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L199_C4", "label": "test16", "type": "function", "loc": [199, 202], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.3819, 0.0076, 1, 0.65, 0.2632, 400, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test16", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test16(self):\n \"\"\"anObj in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('anObj')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L200_C8", "label": "expression", "type": "expression", "loc": [200, 200], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L199_C4", "vector": [8, 2, 0.381, 0.0019, 2, 0.98, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"anObj in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L201_C8", "label": "for i", "type": "for", "loc": [201, 202], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L199_C4", "vector": [6, 2, 0.3838, 0.0038, 2, 0.98, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('anObj')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L202_C12", "label": "check()", "type": "expression", "loc": [202, 202], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L201_C8", "vector": [8, 3, 0.3848, 0.0019, 3, 0.95, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('anObj')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L204_C4", "label": "test17", "type": "function", "loc": [204, 206], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.3905, 0.0057, 1, 0.65, 0.2807, 184, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test17", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test17(self):\n \"\"\"aDict in dict lookup\"\"\"\n self.check('aDict')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L205_C8", "label": "expression", "type": "expression", "loc": [205, 205], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L204_C4", "vector": [8, 2, 0.3905, 0.0019, 2, 0.62, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L206_C8", "label": "check()", "type": "expression", "loc": [206, 206], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L204_C4", "vector": [8, 2, 0.3924, 0.0019, 2, 0.62, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aDict')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L208_C4", "label": "test18", "type": "function", "loc": [208, 211], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.399, 0.0076, 1, 0.65, 0.2982, 889, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test18", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test18(self):\n \"\"\"aDict in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('aDict')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L209_C8", "label": "expression", "type": "expression", "loc": [209, 209], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L208_C4", "vector": [8, 2, 0.3981, 0.0019, 2, 0.9, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L210_C8", "label": "for i", "type": "for", "loc": [210, 211], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L208_C4", "vector": [6, 2, 0.401, 0.0038, 2, 0.9, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('aDict')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L211_C12", "label": "check()", "type": "expression", "loc": [211, 211], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L210_C8", "vector": [8, 3, 0.4019, 0.0019, 3, 0.76, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aDict')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L213_C4", "label": "test17", "type": "function", "loc": [213, 215], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.4076, 0.0057, 1, 0.65, 0.3158, 184, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test17", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test17(self):\n \"\"\"aDict in dict lookup\"\"\"\n self.check('aDict')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L214_C8", "label": "expression", "type": "expression", "loc": [214, 214], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L213_C4", "vector": [8, 2, 0.4076, 0.0019, 2, 0.56, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L215_C8", "label": "check()", "type": "expression", "loc": [215, 215], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L213_C4", "vector": [8, 2, 0.4095, 0.0019, 2, 0.56, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aDict')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L217_C4", "label": "test18", "type": "function", "loc": [217, 220], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.4162, 0.0076, 1, 0.65, 0.3333, 889, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test18", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test18(self):\n \"\"\"aDict in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('aDict')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L218_C8", "label": "expression", "type": "expression", "loc": [218, 218], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L217_C4", "vector": [8, 2, 0.4152, 0.0019, 2, 0.51, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L219_C8", "label": "for i", "type": "for", "loc": [219, 220], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L217_C4", "vector": [6, 2, 0.4181, 0.0038, 2, 0.51, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('aDict')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L220_C12", "label": "check()", "type": "expression", "loc": [220, 220], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L219_C8", "vector": [8, 3, 0.419, 0.0019, 3, 0.4, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aDict')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L222_C4", "label": "test19", "type": "function", "loc": [222, 224], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.4248, 0.0057, 1, 0.65, 0.3509, 702, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test19", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test19(self):\n \"\"\"aClass.classVar1 in dict lookup\"\"\"\n self.check('aClass.classVar1')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L223_C8", "label": "expression", "type": "expression", "loc": [223, 223], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L222_C4", "vector": [8, 2, 0.4248, 0.0019, 2, 0.45, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aClass.classVar1 in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L224_C8", "label": "check()", "type": "expression", "loc": [224, 224], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L222_C4", "vector": [8, 2, 0.4267, 0.0019, 2, 0.45, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aClass.classVar1')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L226_C4", "label": "test20", "type": "function", "loc": [226, 229], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.4333, 0.0076, 1, 0.65, 0.3684, 350, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test20", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test20(self):\n \"\"\"aClass.classVar1 in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('aClass.classVar1')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L227_C8", "label": "expression", "type": "expression", "loc": [227, 227], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L226_C4", "vector": [8, 2, 0.4324, 0.0019, 2, 0.34, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aClass.classVar1 in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L228_C8", "label": "for i", "type": "for", "loc": [228, 229], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L226_C4", "vector": [6, 2, 0.4352, 0.0038, 2, 0.34, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('aClass.classVar1')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L229_C12", "label": "check()", "type": "expression", "loc": [229, 229], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L228_C8", "vector": [8, 3, 0.4362, 0.0019, 3, 0.67, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aClass.classVar1')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L232_C4", "label": "test23", "type": "function", "loc": [232, 234], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.4438, 0.0057, 1, 0.65, 0.386, 602, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test23", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test23(self):\n \"\"\"anObj.instanceVar1 in dict lookup\"\"\"\n self.check('anObj.instanceVar1')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L233_C8", "label": "expression", "type": "expression", "loc": [233, 233], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L232_C4", "vector": [8, 2, 0.4438, 0.0019, 2, 0.52, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"anObj.instanceVar1 in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L234_C8", "label": "check()", "type": "expression", "loc": [234, 234], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L232_C4", "vector": [8, 2, 0.4457, 0.0019, 2, 0.52, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('anObj.instanceVar1')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L236_C4", "label": "test24", "type": "function", "loc": [236, 239], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.4524, 0.0076, 1, 0.65, 0.4035, 306, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test24", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test24(self):\n \"\"\"anObj.instanceVar1 in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('anObj.instanceVar1')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L237_C8", "label": "expression", "type": "expression", "loc": [237, 237], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L236_C4", "vector": [8, 2, 0.4514, 0.0019, 2, 0.87, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"anObj.instanceVar1 in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L238_C8", "label": "for i", "type": "for", "loc": [238, 239], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L236_C4", "vector": [6, 2, 0.4543, 0.0038, 2, 0.87, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('anObj.instanceVar1')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L239_C12", "label": "check()", "type": "expression", "loc": [239, 239], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L238_C8", "vector": [8, 3, 0.4552, 0.0019, 3, 0.49, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('anObj.instanceVar1')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L243_C4", "label": "test27", "type": "function", "loc": [243, 245], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.4648, 0.0057, 1, 0.65, 0.4211, 353, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test27", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test27(self):\n \"\"\"anObj.meth1 in dict lookup\"\"\"\n self.check('anObj.meth1')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L244_C8", "label": "expression", "type": "expression", "loc": [244, 244], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L243_C4", "vector": [8, 2, 0.4648, 0.0019, 2, 0.2, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"anObj.meth1 in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L245_C8", "label": "check()", "type": "expression", "loc": [245, 245], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L243_C4", "vector": [8, 2, 0.4667, 0.0019, 2, 0.2, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('anObj.meth1')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L247_C4", "label": "test28", "type": "function", "loc": [247, 250], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.4733, 0.0076, 1, 0.65, 0.4386, 27, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test28", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test28(self):\n \"\"\"anObj.meth1 in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('anObj.meth1')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L248_C8", "label": "expression", "type": "expression", "loc": [248, 248], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L247_C4", "vector": [8, 2, 0.4724, 0.0019, 2, 0.47, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"anObj.meth1 in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L249_C8", "label": "for i", "type": "for", "loc": [249, 250], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L247_C4", "vector": [6, 2, 0.4752, 0.0038, 2, 0.47, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('anObj.meth1')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L250_C12", "label": "check()", "type": "expression", "loc": [250, 250], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L249_C8", "vector": [8, 3, 0.4762, 0.0019, 3, 0.4, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('anObj.meth1')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L252_C4", "label": "test29", "type": "function", "loc": [252, 254], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.4819, 0.0057, 1, 0.65, 0.4561, 523, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test29", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test29(self):\n \"\"\"aDict.one in dict lookup\"\"\"\n self.check('aDict.one')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L253_C8", "label": "expression", "type": "expression", "loc": [253, 253], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L252_C4", "vector": [8, 2, 0.4819, 0.0019, 2, 0.52, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict.one in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L254_C8", "label": "check()", "type": "expression", "loc": [254, 254], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L252_C4", "vector": [8, 2, 0.4838, 0.0019, 2, 0.52, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aDict.one')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L256_C4", "label": "test30", "type": "function", "loc": [256, 259], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.4905, 0.0076, 1, 0.65, 0.4737, 635, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test30", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test30(self):\n \"\"\"aDict.one in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('aDict.one')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L257_C8", "label": "expression", "type": "expression", "loc": [257, 257], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L256_C4", "vector": [8, 2, 0.4895, 0.0019, 2, 0.05, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict.one in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L258_C8", "label": "for i", "type": "for", "loc": [258, 259], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L256_C4", "vector": [6, 2, 0.4924, 0.0038, 2, 0.05, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('aDict.one')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L259_C12", "label": "check()", "type": "expression", "loc": [259, 259], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L258_C8", "vector": [8, 3, 0.4933, 0.0019, 3, 0.15, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aDict.one')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L261_C4", "label": "test31", "type": "function", "loc": [261, 263], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.499, 0.0057, 1, 0.65, 0.4912, 470, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test31", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test31(self):\n \"\"\"aDict.nestedDict in dict lookup\"\"\"\n self.check('aDict.nestedDict')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L262_C8", "label": "expression", "type": "expression", "loc": [262, 262], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L261_C4", "vector": [8, 2, 0.499, 0.0019, 2, 0.05, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict.nestedDict in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L263_C8", "label": "check()", "type": "expression", "loc": [263, 263], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L261_C4", "vector": [8, 2, 0.501, 0.0019, 2, 0.05, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aDict.nestedDict')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L265_C4", "label": "test32", "type": "function", "loc": [265, 268], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.5076, 0.0076, 1, 0.65, 0.5088, 452, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test32", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test32(self):\n \"\"\"aDict.nestedDict in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('aDict.nestedDict')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L266_C8", "label": "expression", "type": "expression", "loc": [266, 266], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L265_C4", "vector": [8, 2, 0.5067, 0.0019, 2, 0.44, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict.nestedDict in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L267_C8", "label": "for i", "type": "for", "loc": [267, 268], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L265_C4", "vector": [6, 2, 0.5095, 0.0038, 2, 0.44, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('aDict.nestedDict')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L268_C12", "label": "check()", "type": "expression", "loc": [268, 268], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L267_C8", "vector": [8, 3, 0.5105, 0.0019, 3, 0.5, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aDict.nestedDict')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L270_C4", "label": "test33", "type": "function", "loc": [270, 272], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.5162, 0.0057, 1, 0.65, 0.5263, 871, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test33", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test33(self):\n \"\"\"aDict.nestedDict.one in dict lookup\"\"\"\n self.check('aDict.nestedDict.one')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L271_C8", "label": "expression", "type": "expression", "loc": [271, 271], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L270_C4", "vector": [8, 2, 0.5162, 0.0019, 2, 0.91, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict.nestedDict.one in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L272_C8", "label": "check()", "type": "expression", "loc": [272, 272], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L270_C4", "vector": [8, 2, 0.5181, 0.0019, 2, 0.91, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aDict.nestedDict.one')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L274_C4", "label": "test34", "type": "function", "loc": [274, 277], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.5248, 0.0076, 1, 0.65, 0.5439, 94, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test34", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test34(self):\n \"\"\"aDict.nestedDict.one in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('aDict.nestedDict.one')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L275_C8", "label": "expression", "type": "expression", "loc": [275, 275], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L274_C4", "vector": [8, 2, 0.5238, 0.0019, 2, 0.33, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict.nestedDict.one in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L276_C8", "label": "for i", "type": "for", "loc": [276, 277], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L274_C4", "vector": [6, 2, 0.5267, 0.0038, 2, 0.33, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('aDict.nestedDict.one')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L277_C12", "label": "check()", "type": "expression", "loc": [277, 277], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L276_C8", "vector": [8, 3, 0.5276, 0.0019, 3, 0.17, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aDict.nestedDict.one')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L279_C4", "label": "test35", "type": "function", "loc": [279, 281], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.5333, 0.0057, 1, 0.65, 0.5614, 884, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test35", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test35(self):\n \"\"\"aDict.nestedFunc in dict lookup\"\"\"\n self.check('aDict.nestedFunc')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L280_C8", "label": "expression", "type": "expression", "loc": [280, 280], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L279_C4", "vector": [8, 2, 0.5333, 0.0019, 2, 0.73, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict.nestedFunc in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L281_C8", "label": "check()", "type": "expression", "loc": [281, 281], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L279_C4", "vector": [8, 2, 0.5352, 0.0019, 2, 0.73, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aDict.nestedFunc')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L283_C4", "label": "test36", "type": "function", "loc": [283, 286], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.5419, 0.0076, 1, 0.65, 0.5789, 163, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test36", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test36(self):\n \"\"\"aDict.nestedFunc in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('aDict.nestedFunc')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L284_C8", "label": "expression", "type": "expression", "loc": [284, 284], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L283_C4", "vector": [8, 2, 0.541, 0.0019, 2, 0.8, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict.nestedFunc in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L285_C8", "label": "for i", "type": "for", "loc": [285, 286], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L283_C4", "vector": [6, 2, 0.5438, 0.0038, 2, 0.8, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('aDict.nestedFunc')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L286_C12", "label": "check()", "type": "expression", "loc": [286, 286], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L285_C8", "vector": [8, 3, 0.5448, 0.0019, 3, 0.71, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aDict.nestedFunc')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L288_C4", "label": "test37", "type": "function", "loc": [288, 290], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.5505, 0.0057, 1, 0.65, 0.5965, 935, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test37", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test37(self):\n \"\"\"aDict.nestedFunc in dict lookup - without autocalling\"\"\"\n assert self.get('aDict.nestedFunc', False) == dummyFunc"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L289_C8", "label": "expression", "type": "expression", "loc": [289, 289], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L288_C4", "vector": [8, 2, 0.5505, 0.0019, 2, 0.54, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict.nestedFunc in dict lookup - without autocalling\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L292_C4", "label": "test38", "type": "function", "loc": [292, 295], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.559, 0.0076, 1, 0.65, 0.614, 937, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test38", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test38(self):\n \"\"\"aDict.nestedFunc in dict lookup in a loop - without autocalling\"\"\"\n for i in range(10):\n assert self.get('aDict.nestedFunc', False) == dummyFunc"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L293_C8", "label": "expression", "type": "expression", "loc": [293, 293], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L292_C4", "vector": [8, 2, 0.5581, 0.0019, 2, 0.71, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict.nestedFunc in dict lookup in a loop - without autocalling\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L294_C8", "label": "for i", "type": "for", "loc": [294, 295], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L292_C4", "vector": [6, 2, 0.561, 0.0038, 2, 0.71, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n assert self.get('aDict.nestedFunc', False) == dummyFunc"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L297_C4", "label": "test39", "type": "function", "loc": [297, 299], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.5676, 0.0057, 1, 0.65, 0.6316, 478, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test39", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test39(self):\n \"\"\"aMeth in dict lookup - without autocalling\"\"\"\n assert self.get('aMeth', False) == self.namespace()['aMeth']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L298_C8", "label": "expression", "type": "expression", "loc": [298, 298], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L297_C4", "vector": [8, 2, 0.5676, 0.0019, 2, 0.79, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aMeth in dict lookup - without autocalling\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L301_C4", "label": "test40", "type": "function", "loc": [301, 304], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.5762, 0.0076, 1, 0.65, 0.6491, 205, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "test40", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test40(self):\n \"\"\"aMeth in dict lookup in a loop - without autocalling\"\"\"\n for i in range(10):\n assert self.get('aMeth', False) == self.namespace()['aMeth']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L302_C8", "label": "expression", "type": "expression", "loc": [302, 302], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L301_C4", "vector": [8, 2, 0.5752, 0.0019, 2, 0.24, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aMeth in dict lookup in a loop - without autocalling\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L303_C8", "label": "for i", "type": "for", "loc": [303, 304], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L301_C4", "vector": [6, 2, 0.5781, 0.0038, 2, 0.24, 1.0, 826, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n assert self.get('aMeth', False) == self.namespace()['aMeth']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L306_C4", "label": "test41", "type": "function", "loc": [306, 308], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.5848, 0.0057, 1, 0.65, 0.6667, 69, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test41", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test41(self):\n \"\"\"anObj.meth3 in dict lookup\"\"\"\n self.check('anObj.meth3')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L307_C8", "label": "expression", "type": "expression", "loc": [307, 307], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L306_C4", "vector": [8, 2, 0.5848, 0.0019, 2, 0.48, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"anObj.meth3 in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L308_C8", "label": "check()", "type": "expression", "loc": [308, 308], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L306_C4", "vector": [8, 2, 0.5867, 0.0019, 2, 0.48, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('anObj.meth3')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L310_C4", "label": "test42", "type": "function", "loc": [310, 313], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.5933, 0.0076, 1, 0.65, 0.6842, 406, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test42", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test42(self):\n \"\"\"aMeth in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('anObj.meth3')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L311_C8", "label": "expression", "type": "expression", "loc": [311, 311], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L310_C4", "vector": [8, 2, 0.5924, 0.0019, 2, 0.22, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aMeth in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L312_C8", "label": "for i", "type": "for", "loc": [312, 313], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L310_C4", "vector": [6, 2, 0.5952, 0.0038, 2, 0.22, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('anObj.meth3')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L313_C12", "label": "check()", "type": "expression", "loc": [313, 313], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L312_C8", "vector": [8, 3, 0.5962, 0.0019, 3, 0.66, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('anObj.meth3')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L315_C4", "label": "test43", "type": "function", "loc": [315, 320], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.6048, 0.0114, 1, 0.65, 0.7018, 587, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test43", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test43(self):\n \"\"\"NotFound test\"\"\"\n\n def test(self=self):\n self.get('anObj.methX') \n self.assertRaises(NotFound, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L316_C8", "label": "expression", "type": "expression", "loc": [316, 316], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L315_C4", "vector": [8, 2, 0.6019, 0.0019, 2, 0.94, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"NotFound test\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L318_C8", "label": "test", "type": "function", "loc": [318, 319], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L315_C4", "vector": [2, 2, 0.6067, 0.0038, 2, 0.94, 0.5, 224, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test(self=self):\n self.get('anObj.methX') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L319_C12", "label": "get()", "type": "expression", "loc": [319, 319], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L318_C8", "vector": [8, 3, 0.6076, 0.0019, 3, 0.03, 0.0, 607, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "get", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " self.get('anObj.methX') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L320_C8", "label": "assertRaises()", "type": "expression", "loc": [320, 320], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L315_C4", "vector": [8, 2, 0.6095, 0.0019, 2, 0.94, 1.0, 11, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(NotFound, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L322_C4", "label": "test44", "type": "function", "loc": [322, 328], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.619, 0.0133, 1, 0.65, 0.7193, 308, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "test44", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test44(self):\n \"\"\"NotFound test in a loop\"\"\"\n def test(self=self):\n self.get('anObj.methX') \n\n for i in range(10):\n self.assertRaises(NotFound, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L323_C8", "label": "expression", "type": "expression", "loc": [323, 323], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L322_C4", "vector": [8, 2, 0.6152, 0.0019, 2, 0.77, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"NotFound test in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L324_C8", "label": "test", "type": "function", "loc": [324, 325], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L322_C4", "vector": [2, 2, 0.6181, 0.0038, 2, 0.77, 0.5, 224, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test(self=self):\n self.get('anObj.methX') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L325_C12", "label": "get()", "type": "expression", "loc": [325, 325], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L324_C8", "vector": [8, 3, 0.619, 0.0019, 3, 0.75, 0.0, 607, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "get", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " self.get('anObj.methX') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L327_C8", "label": "for i", "type": "for", "loc": [327, 328], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L322_C4", "vector": [6, 2, 0.6238, 0.0038, 2, 0.77, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.assertRaises(NotFound, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L328_C12", "label": "assertRaises()", "type": "expression", "loc": [328, 328], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L327_C8", "vector": [8, 3, 0.6248, 0.0019, 3, 0.99, 0.0, 11, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(NotFound, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L330_C4", "label": "test45", "type": "function", "loc": [330, 335], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.6333, 0.0114, 1, 0.65, 0.7368, 492, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test45", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test45(self):\n \"\"\"Other exception from meth test\"\"\"\n\n def test(self=self):\n self.get('anObj.meth2') \n self.assertRaises(ValueError, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L331_C8", "label": "expression", "type": "expression", "loc": [331, 331], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L330_C4", "vector": [8, 2, 0.6305, 0.0019, 2, 0.96, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Other exception from meth test\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L333_C8", "label": "test", "type": "function", "loc": [333, 334], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L330_C4", "vector": [2, 2, 0.6352, 0.0038, 2, 0.96, 0.5, 224, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test(self=self):\n self.get('anObj.meth2') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L334_C12", "label": "get()", "type": "expression", "loc": [334, 334], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L333_C8", "vector": [8, 3, 0.6362, 0.0019, 3, 0.27, 0.0, 607, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "get", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " self.get('anObj.meth2') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L335_C8", "label": "assertRaises()", "type": "expression", "loc": [335, 335], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L330_C4", "vector": [8, 2, 0.6381, 0.0019, 2, 0.96, 1.0, 11, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(ValueError, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L337_C4", "label": "test46", "type": "function", "loc": [337, 343], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.6476, 0.0133, 1, 0.65, 0.7544, 113, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "test46", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test46(self):\n \"\"\"Other exception from meth test in a loop\"\"\"\n def test(self=self):\n self.get('anObj.meth2') \n\n for i in range(10):\n self.assertRaises(ValueError, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L338_C8", "label": "expression", "type": "expression", "loc": [338, 338], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L337_C4", "vector": [8, 2, 0.6438, 0.0019, 2, 0.57, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Other exception from meth test in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L339_C8", "label": "test", "type": "function", "loc": [339, 340], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L337_C4", "vector": [2, 2, 0.6467, 0.0038, 2, 0.57, 0.5, 224, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test(self=self):\n self.get('anObj.meth2') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L340_C12", "label": "get()", "type": "expression", "loc": [340, 340], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L339_C8", "vector": [8, 3, 0.6476, 0.0019, 3, 0.97, 0.0, 607, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "get", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " self.get('anObj.meth2') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L342_C8", "label": "for i", "type": "for", "loc": [342, 343], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L337_C4", "vector": [6, 2, 0.6524, 0.0038, 2, 0.57, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.assertRaises(ValueError, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L343_C12", "label": "assertRaises()", "type": "expression", "loc": [343, 343], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L342_C8", "vector": [8, 3, 0.6533, 0.0019, 3, 0.39, 0.0, 11, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(ValueError, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L345_C4", "label": "test47", "type": "function", "loc": [345, 347], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.659, 0.0057, 1, 0.65, 0.7719, 2, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test47", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test47(self):\n \"\"\"None in dict lookup\"\"\"\n self.check('none')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L346_C8", "label": "expression", "type": "expression", "loc": [346, 346], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L345_C4", "vector": [8, 2, 0.659, 0.0019, 2, 0.13, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"None in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L347_C8", "label": "check()", "type": "expression", "loc": [347, 347], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L345_C4", "vector": [8, 2, 0.661, 0.0019, 2, 0.13, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('none')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L349_C4", "label": "test48", "type": "function", "loc": [349, 352], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.6676, 0.0076, 1, 0.65, 0.7895, 662, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test48", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test48(self):\n \"\"\"None in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('none')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L350_C8", "label": "expression", "type": "expression", "loc": [350, 350], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L349_C4", "vector": [8, 2, 0.6667, 0.0019, 2, 0.26, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"None in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L351_C8", "label": "for i", "type": "for", "loc": [351, 352], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L349_C4", "vector": [6, 2, 0.6695, 0.0038, 2, 0.26, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('none')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L352_C12", "label": "check()", "type": "expression", "loc": [352, 352], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L351_C8", "vector": [8, 3, 0.6705, 0.0019, 3, 0.77, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('none')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L354_C4", "label": "test49", "type": "function", "loc": [354, 356], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.6762, 0.0057, 1, 0.65, 0.807, 514, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test49", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test49(self):\n \"\"\"EmptyString in dict lookup\"\"\"\n self.check('emptyString')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L355_C8", "label": "expression", "type": "expression", "loc": [355, 355], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L354_C4", "vector": [8, 2, 0.6762, 0.0019, 2, 0.58, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"EmptyString in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L356_C8", "label": "check()", "type": "expression", "loc": [356, 356], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L354_C4", "vector": [8, 2, 0.6781, 0.0019, 2, 0.58, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('emptyString')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L358_C4", "label": "test50", "type": "function", "loc": [358, 361], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.6848, 0.0076, 1, 0.65, 0.8246, 476, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test50", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test50(self):\n \"\"\"EmptyString in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('emptyString')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L359_C8", "label": "expression", "type": "expression", "loc": [359, 359], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L358_C4", "vector": [8, 2, 0.6838, 0.0019, 2, 0.91, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"EmptyString in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L360_C8", "label": "for i", "type": "for", "loc": [360, 361], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L358_C4", "vector": [6, 2, 0.6867, 0.0038, 2, 0.91, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('emptyString')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L361_C12", "label": "check()", "type": "expression", "loc": [361, 361], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L360_C8", "vector": [8, 3, 0.6876, 0.0019, 3, 0.86, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('emptyString')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L363_C4", "label": "test51", "type": "function", "loc": [363, 368], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.6962, 0.0114, 1, 0.65, 0.8421, 923, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test51", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test51(self):\n \"\"\"Other exception from func test\"\"\"\n\n def test(self=self):\n self.get('funcThatRaises') \n self.assertRaises(ValueError, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L364_C8", "label": "expression", "type": "expression", "loc": [364, 364], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L363_C4", "vector": [8, 2, 0.6933, 0.0019, 2, 0.35, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Other exception from func test\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L366_C8", "label": "test", "type": "function", "loc": [366, 367], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L363_C4", "vector": [2, 2, 0.6981, 0.0038, 2, 0.35, 0.5, 224, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test(self=self):\n self.get('funcThatRaises') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L367_C12", "label": "get()", "type": "expression", "loc": [367, 367], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L366_C8", "vector": [8, 3, 0.699, 0.0019, 3, 0.82, 0.0, 607, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "get", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " self.get('funcThatRaises') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L368_C8", "label": "assertRaises()", "type": "expression", "loc": [368, 368], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L363_C4", "vector": [8, 2, 0.701, 0.0019, 2, 0.35, 1.0, 11, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(ValueError, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L370_C4", "label": "test52", "type": "function", "loc": [370, 376], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.7105, 0.0133, 1, 0.65, 0.8596, 536, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "test52", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test52(self):\n \"\"\"Other exception from func test in a loop\"\"\"\n def test(self=self):\n self.get('funcThatRaises') \n\n for i in range(10):\n self.assertRaises(ValueError, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L371_C8", "label": "expression", "type": "expression", "loc": [371, 371], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L370_C4", "vector": [8, 2, 0.7067, 0.0019, 2, 0.12, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Other exception from func test in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L372_C8", "label": "test", "type": "function", "loc": [372, 373], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L370_C4", "vector": [2, 2, 0.7095, 0.0038, 2, 0.12, 0.5, 224, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test(self=self):\n self.get('funcThatRaises') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L373_C12", "label": "get()", "type": "expression", "loc": [373, 373], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L372_C8", "vector": [8, 3, 0.7105, 0.0019, 3, 0.99, 0.0, 607, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "get", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " self.get('funcThatRaises') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L375_C8", "label": "for i", "type": "for", "loc": [375, 376], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L370_C4", "vector": [6, 2, 0.7152, 0.0038, 2, 0.12, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.assertRaises(ValueError, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L376_C12", "label": "assertRaises()", "type": "expression", "loc": [376, 376], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L375_C8", "vector": [8, 3, 0.7162, 0.0019, 3, 0.66, 0.0, 11, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(ValueError, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L379_C4", "label": "test53", "type": "function", "loc": [379, 384], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.7267, 0.0114, 1, 0.65, 0.8772, 740, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test53", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test53(self):\n \"\"\"Other exception from func test\"\"\"\n\n def test(self=self):\n self.get('aDict.nestedDict.funcThatRaises') \n self.assertRaises(ValueError, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L380_C8", "label": "expression", "type": "expression", "loc": [380, 380], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L379_C4", "vector": [8, 2, 0.7238, 0.0019, 2, 0.06, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Other exception from func test\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L382_C8", "label": "test", "type": "function", "loc": [382, 383], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L379_C4", "vector": [2, 2, 0.7286, 0.0038, 2, 0.06, 0.5, 224, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test(self=self):\n self.get('aDict.nestedDict.funcThatRaises') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L383_C12", "label": "get()", "type": "expression", "loc": [383, 383], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L382_C8", "vector": [8, 3, 0.7295, 0.0019, 3, 0.68, 0.0, 607, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "get", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " self.get('aDict.nestedDict.funcThatRaises') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L384_C8", "label": "assertRaises()", "type": "expression", "loc": [384, 384], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L379_C4", "vector": [8, 2, 0.7314, 0.0019, 2, 0.06, 1.0, 11, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(ValueError, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L386_C4", "label": "test54", "type": "function", "loc": [386, 392], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.741, 0.0133, 1, 0.65, 0.8947, 230, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "test54", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test54(self):\n \"\"\"Other exception from func test in a loop\"\"\"\n def test(self=self):\n self.get('aDict.nestedDict.funcThatRaises') \n\n for i in range(10):\n self.assertRaises(ValueError, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L387_C8", "label": "expression", "type": "expression", "loc": [387, 387], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L386_C4", "vector": [8, 2, 0.7371, 0.0019, 2, 0.01, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Other exception from func test in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L388_C8", "label": "test", "type": "function", "loc": [388, 389], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L386_C4", "vector": [2, 2, 0.74, 0.0038, 2, 0.01, 0.5, 224, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test(self=self):\n self.get('aDict.nestedDict.funcThatRaises') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L389_C12", "label": "get()", "type": "expression", "loc": [389, 389], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L388_C8", "vector": [8, 3, 0.741, 0.0019, 3, 0.93, 0.0, 607, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "get", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " self.get('aDict.nestedDict.funcThatRaises') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L391_C8", "label": "for i", "type": "for", "loc": [391, 392], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L386_C4", "vector": [6, 2, 0.7457, 0.0038, 2, 0.01, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.assertRaises(ValueError, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L392_C12", "label": "assertRaises()", "type": "expression", "loc": [392, 392], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L391_C8", "vector": [8, 3, 0.7467, 0.0019, 3, 0.44, 0.0, 11, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertRaises", "arg_names": [], "import_names": [], "rhs_call_name": "assertRaises", "annotation": ""}, "snippet": " self.assertRaises(ValueError, test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L394_C4", "label": "test55", "type": "function", "loc": [394, 396], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.7524, 0.0057, 1, 0.65, 0.9123, 846, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test55", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test55(self):\n \"\"\"aDict.nestedDict.aClass in dict lookup\"\"\"\n self.check('aDict.nestedDict.aClass')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L395_C8", "label": "expression", "type": "expression", "loc": [395, 395], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L394_C4", "vector": [8, 2, 0.7524, 0.0019, 2, 0.41, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict.nestedDict.aClass in dict lookup\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L396_C8", "label": "check()", "type": "expression", "loc": [396, 396], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L394_C4", "vector": [8, 2, 0.7543, 0.0019, 2, 0.41, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aDict.nestedDict.aClass')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L398_C4", "label": "test56", "type": "function", "loc": [398, 401], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.761, 0.0076, 1, 0.65, 0.9298, 302, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test56", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test56(self):\n \"\"\"aDict.nestedDict.aClass in dict lookup in a loop\"\"\"\n for i in range(10):\n self.check('aDict.nestedDict.aClass')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L399_C8", "label": "expression", "type": "expression", "loc": [399, 399], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L398_C4", "vector": [8, 2, 0.76, 0.0019, 2, 0.91, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict.nestedDict.aClass in dict lookup in a loop\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L400_C8", "label": "for i", "type": "for", "loc": [400, 401], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L398_C4", "vector": [6, 2, 0.7629, 0.0038, 2, 0.91, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.check('aDict.nestedDict.aClass')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L401_C12", "label": "check()", "type": "expression", "loc": [401, 401], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L400_C8", "vector": [8, 3, 0.7638, 0.0019, 3, 0.94, 0.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('aDict.nestedDict.aClass')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L403_C4", "label": "test57", "type": "function", "loc": [403, 405], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.7695, 0.0057, 1, 0.65, 0.9474, 86, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test57", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test57(self):\n \"\"\"aDict.nestedDict.aClass in dict lookup - without autocalling\"\"\"\n assert self.get('aDict.nestedDict.aClass', False) == DummyClass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L404_C8", "label": "expression", "type": "expression", "loc": [404, 404], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L403_C4", "vector": [8, 2, 0.7695, 0.0019, 2, 0.53, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict.nestedDict.aClass in dict lookup - without autocalling\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L407_C4", "label": "test58", "type": "function", "loc": [407, 410], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.7781, 0.0076, 1, 0.65, 0.9649, 778, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test58", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test58(self):\n \"\"\"aDict.nestedDict.aClass in dict lookup in a loop - without autocalling\"\"\"\n for i in range(10):\n assert self.get('aDict.nestedDict.aClass', False) == DummyClass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L408_C8", "label": "expression", "type": "expression", "loc": [408, 408], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L407_C4", "vector": [8, 2, 0.7771, 0.0019, 2, 0.53, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"aDict.nestedDict.aClass in dict lookup in a loop - without autocalling\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L409_C8", "label": "for i", "type": "for", "loc": [409, 410], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L407_C4", "vector": [6, 2, 0.78, 0.0038, 2, 0.53, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n assert self.get('aDict.nestedDict.aClass', False) == DummyClass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L412_C4", "label": "test59", "type": "function", "loc": [412, 415], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.7876, 0.0076, 1, 0.65, 0.9825, 400, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test59", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test59(self):\n \"\"\"Other exception from func test -- but without autocalling shouldn't raise\"\"\"\n\n self.get('aDict.nestedDict.funcThatRaises', False) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L413_C8", "label": "expression", "type": "expression", "loc": [413, 413], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L412_C4", "vector": [8, 2, 0.7867, 0.0019, 2, 0.65, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Other exception from func test -- but without autocalling shouldn't raise\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L415_C8", "label": "get()", "type": "expression", "loc": [415, 415], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L412_C4", "vector": [8, 2, 0.7905, 0.0019, 2, 0.65, 1.0, 607, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "get", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " self.get('aDict.nestedDict.funcThatRaises', False) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L417_C4", "label": "test60", "type": "function", "loc": [417, 421], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "vector": [2, 1, 0.7981, 0.0095, 1, 0.65, 1.0, 616, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test60", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test60(self):\n \"\"\"Other exception from func test in a loop -- but without autocalling shouldn't raise\"\"\"\n\n for i in range(10):\n self.get('aDict.nestedDict.funcThatRaises', False) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L418_C8", "label": "expression", "type": "expression", "loc": [418, 418], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L417_C4", "vector": [8, 2, 0.7962, 0.0019, 2, 0.64, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Other exception from func test in a loop -- but without autocalling shouldn't raise\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L420_C8", "label": "for i", "type": "for", "loc": [420, 421], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L417_C4", "vector": [6, 2, 0.801, 0.0038, 2, 0.64, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(10):\n self.get('aDict.nestedDict.funcThatRaises', False) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L421_C12", "label": "get()", "type": "expression", "loc": [421, 421], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L420_C8", "vector": [8, 3, 0.8019, 0.0019, 3, 0.24, 0.0, 607, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "get", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " self.get('aDict.nestedDict.funcThatRaises', False) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L423_C0", "label": "VFS", "type": "class", "loc": [423, 446], "level": 0, "parent": null, "vector": [3, 0, 0.8276, 0.0457, 0, 0.66, 0.6154, 85, 0, 3, 0, 0, 174, 0, 8], "semantic": {"name": "VFS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class VFS(VFN):\n _searchListLength = 1\n \n def searchList(self):\n lng = self._searchListLength\n if lng == 1:\n return [self.namespace()]\n elif lng == 2:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L424_C4", "label": "_searchListLength =", "type": "assigned_variable", "loc": [424, 424], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L423_C0", "vector": [14, 1, 0.8076, 0.0019, 1, 0.76, 0.0, 79, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "_searchListLength", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _searchListLength = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L426_C4", "label": "searchList", "type": "function", "loc": [426, 437], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L423_C0", "vector": [2, 1, 0.8219, 0.0229, 1, 0.76, 0.3333, 818, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "searchList", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def searchList(self):\n lng = self._searchListLength\n if lng == 1:\n return [self.namespace()]\n elif lng == 2:\n return [self.namespace(), {'dummy':1234}]\n elif lng == 3:\n # a tuple for kicks"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L427_C8", "label": "lng =", "type": "assigned_variable", "loc": [427, 427], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L426_C4", "vector": [14, 2, 0.8133, 0.0019, 2, 0.16, 0.0, 546, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "lng", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " lng = self._searchListLength"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L428_C8", "label": "if", "type": "if", "loc": [428, 437], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L426_C4", "vector": [4, 2, 0.8238, 0.019, 2, 0.16, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if lng == 1:\n return [self.namespace()]\n elif lng == 2:\n return [self.namespace(), {'dummy':1234}]\n elif lng == 3:\n # a tuple for kicks\n return ({'dummy':1234}, self.namespace(), {'dummy':1234})\n elif lng == 4:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L429_C12", "label": "return", "type": "return", "loc": [429, 429], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L428_C8", "vector": [13, 3, 0.8171, 0.0019, 3, 0.82, 0.0, 0, 0, 0, 0, 0, 0, 5, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return [self.namespace()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L430_C8", "label": "if", "type": "if", "loc": [430, 437], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L428_C8", "vector": [4, 3, 0.8257, 0.0152, 3, 0.82, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif lng == 2:\n return [self.namespace(), {'dummy':1234}]\n elif lng == 3:\n # a tuple for kicks\n return ({'dummy':1234}, self.namespace(), {'dummy':1234})\n elif lng == 4:\n # a generator for more kicks\n return self.searchListGenerator()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L431_C12", "label": "return", "type": "return", "loc": [431, 431], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L430_C8", "vector": [13, 4, 0.821, 0.0019, 4, 0.11, 0.0, 0, 0, 0, 0, 0, 0, 5, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return [self.namespace(), {'dummy':1234}]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L432_C8", "label": "if", "type": "if", "loc": [432, 437], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L430_C8", "vector": [4, 4, 0.8276, 0.0114, 4, 0.11, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif lng == 3:\n # a tuple for kicks\n return ({'dummy':1234}, self.namespace(), {'dummy':1234})\n elif lng == 4:\n # a generator for more kicks\n return self.searchListGenerator()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L434_C12", "label": "return", "type": "return", "loc": [434, 434], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L432_C8", "vector": [13, 5, 0.8267, 0.0019, 5, 0.83, 0.0, 0, 0, 0, 0, 0, 0, 8, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ({'dummy':1234}, self.namespace(), {'dummy':1234})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L435_C8", "label": "if", "type": "if", "loc": [435, 437], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L432_C8", "vector": [4, 5, 0.8305, 0.0057, 5, 0.83, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif lng == 4:\n # a generator for more kicks\n return self.searchListGenerator()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L437_C12", "label": "return", "type": "return", "loc": [437, 437], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L435_C8", "vector": [13, 6, 0.8324, 0.0019, 6, 0.84, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.searchListGenerator()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L439_C4", "label": "searchListGenerator", "type": "function", "loc": [439, 443], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L423_C0", "vector": [2, 1, 0.84, 0.0095, 1, 0.76, 0.6667, 20, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "searchListGenerator", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def searchListGenerator(self):\n class Test:\n pass\n for i in [Test(), {'dummy':1234}, self.namespace(), {'dummy':1234}]:\n yield i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L440_C8", "label": "Test", "type": "class", "loc": [440, 441], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L439_C4", "vector": [3, 2, 0.839, 0.0038, 2, 0.19, 0.0, 786, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "Test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class Test:\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L442_C8", "label": "for i", "type": "for", "loc": [442, 443], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L439_C4", "vector": [6, 2, 0.8429, 0.0038, 2, 0.19, 1.0, 826, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in [Test(), {'dummy':1234}, self.namespace(), {'dummy':1234}]:\n yield i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L443_C12", "label": "expression", "type": "expression", "loc": [443, 443], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L442_C8", "vector": [8, 3, 0.8438, 0.0019, 3, 0.73, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L445_C4", "label": "get", "type": "function", "loc": [445, 446], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L423_C0", "vector": [2, 1, 0.8486, 0.0038, 1, 0.76, 1.0, 607, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "get", "arg_names": ["self", "name", "autocall"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get(self, name, autocall=True):\n return self.VFS(self.searchList(), name, autocall)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L446_C8", "label": "return", "type": "return", "loc": [446, 446], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L445_C4", "vector": [13, 2, 0.8495, 0.0019, 2, 0.36, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.VFS(self.searchList(), name, autocall)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L448_C0", "label": "VFS_2namespaces", "type": "class", "loc": [448, 449], "level": 0, "parent": null, "vector": [3, 0, 0.8543, 0.0038, 0, 0.66, 0.6538, 593, 0, 0, 0, 0, 85, 0, 0], "semantic": {"name": "VFS_2namespaces", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class VFS_2namespaces(VFS):\n _searchListLength = 2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L449_C4", "label": "_searchListLength =", "type": "assigned_variable", "loc": [449, 449], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L448_C0", "vector": [14, 1, 0.8552, 0.0019, 1, 0.58, 0.0, 79, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "_searchListLength", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _searchListLength = 2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L451_C0", "label": "VFS_3namespaces", "type": "class", "loc": [451, 452], "level": 0, "parent": null, "vector": [3, 0, 0.86, 0.0038, 0, 0.66, 0.6923, 776, 0, 0, 0, 0, 85, 0, 0], "semantic": {"name": "VFS_3namespaces", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class VFS_3namespaces(VFS):\n _searchListLength = 3"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L452_C4", "label": "_searchListLength =", "type": "assigned_variable", "loc": [452, 452], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L451_C0", "vector": [14, 1, 0.861, 0.0019, 1, 0.06, 0.0, 79, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "_searchListLength", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _searchListLength = 3"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L454_C0", "label": "VFS_4namespaces", "type": "class", "loc": [454, 455], "level": 0, "parent": null, "vector": [3, 0, 0.8657, 0.0038, 0, 0.66, 0.7308, 847, 0, 0, 0, 0, 85, 0, 0], "semantic": {"name": "VFS_4namespaces", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class VFS_4namespaces(VFS):\n _searchListLength = 4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L455_C4", "label": "_searchListLength =", "type": "assigned_variable", "loc": [455, 455], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L454_C0", "vector": [14, 1, 0.8667, 0.0019, 1, 0.08, 0.0, 79, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "_searchListLength", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _searchListLength = 4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L457_C0", "label": "VFF", "type": "class", "loc": [457, 484], "level": 0, "parent": null, "vector": [3, 0, 0.8962, 0.0533, 0, 0.66, 0.7692, 324, 0, 3, 0, 0, 174, 0, 8], "semantic": {"name": "VFF", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class VFF(VFN): \n def get(self, name, autocall=True):\n ns = self._testNamespace\n aStr = ns['aStr'] \n aFloat = ns['aFloat']\n none = 'some'\n return valueFromFrame(name, autocall)\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L458_C4", "label": "get", "type": "function", "loc": [458, 463], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L457_C0", "vector": [2, 1, 0.8771, 0.0114, 1, 0.39, 0.0, 607, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "get", "arg_names": ["self", "name", "autocall"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get(self, name, autocall=True):\n ns = self._testNamespace\n aStr = ns['aStr'] \n aFloat = ns['aFloat']\n none = 'some'\n return valueFromFrame(name, autocall)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L459_C8", "label": "ns =", "type": "assigned_variable", "loc": [459, 459], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L458_C4", "vector": [14, 2, 0.8743, 0.0019, 2, 0.82, 0.0, 638, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "ns", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ns = self._testNamespace"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L460_C8", "label": "aStr =", "type": "assigned_variable", "loc": [460, 460], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L458_C4", "vector": [14, 2, 0.8762, 0.0019, 2, 0.82, 0.25, 496, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "aStr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " aStr = ns['aStr'] "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L461_C8", "label": "aFloat =", "type": "assigned_variable", "loc": [461, 461], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L458_C4", "vector": [14, 2, 0.8781, 0.0019, 2, 0.82, 0.5, 273, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "aFloat", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " aFloat = ns['aFloat']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L462_C8", "label": "none =", "type": "assigned_variable", "loc": [462, 462], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L458_C4", "vector": [14, 2, 0.88, 0.0019, 2, 0.82, 0.75, 615, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "none", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " none = 'some'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L463_C8", "label": "return", "type": "return", "loc": [463, 463], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L458_C4", "vector": [13, 2, 0.8819, 0.0019, 2, 0.82, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return valueFromFrame(name, autocall)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "label": "setUp", "type": "function", "loc": [465, 476], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L457_C0", "vector": [2, 1, 0.8962, 0.0229, 1, 0.39, 0.5, 952, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n \"\"\"Mod some of the data\n \"\"\"\n self._testNamespace = ns = self._testNamespace.copy()\n self._results = res = self._results.copy()\n ns['aStr'] = res['aStr'] = 'BLARG'\n ns['aFloat'] = res['aFloat'] = 0.1234\n res['none'] = 'some'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L466_C8", "label": "expression", "type": "expression", "loc": [466, 467], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "vector": [8, 2, 0.8886, 0.0038, 2, 0.81, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Mod some of the data\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L468_C8", "label": "self._testNamespace = copy()", "type": "assigned_variable", "loc": [468, 468], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "vector": [14, 2, 0.8914, 0.0019, 2, 0.81, 0.1111, 565, 3, 0, 0, 0, 739, 10, 1], "semantic": {"name": "self._testNamespace", "arg_names": [], "import_names": [], "rhs_call_name": "copy", "annotation": ""}, "snippet": " self._testNamespace = ns = self._testNamespace.copy()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L469_C8", "label": "self._results = copy()", "type": "assigned_variable", "loc": [469, 469], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "vector": [14, 2, 0.8933, 0.0019, 2, 0.81, 0.2222, 936, 3, 0, 0, 0, 739, 10, 1], "semantic": {"name": "self._results", "arg_names": [], "import_names": [], "rhs_call_name": "copy", "annotation": ""}, "snippet": " self._results = res = self._results.copy()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L470_C8", "label": "assign", "type": "assigned_variable", "loc": [470, 470], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "vector": [14, 2, 0.8952, 0.0019, 2, 0.81, 0.3333, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ns['aStr'] = res['aStr'] = 'BLARG'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L471_C8", "label": "assign", "type": "assigned_variable", "loc": [471, 471], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "vector": [14, 2, 0.8971, 0.0019, 2, 0.81, 0.4444, 0, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ns['aFloat'] = res['aFloat'] = 0.1234"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L472_C8", "label": "assign", "type": "assigned_variable", "loc": [472, 472], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "vector": [14, 2, 0.899, 0.0019, 2, 0.81, 0.5556, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " res['none'] = 'some'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L473_C8", "label": "assign", "type": "assigned_variable", "loc": [473, 473], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "vector": [14, 2, 0.901, 0.0019, 2, 0.81, 0.6667, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " res['True'] = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L474_C8", "label": "assign", "type": "assigned_variable", "loc": [474, 474], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "vector": [14, 2, 0.9029, 0.0019, 2, 0.81, 0.7778, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " res['False'] = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L475_C8", "label": "assign", "type": "assigned_variable", "loc": [475, 475], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "vector": [14, 2, 0.9048, 0.0019, 2, 0.81, 0.8889, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " res['None'] = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L476_C8", "label": "assign", "type": "assigned_variable", "loc": [476, 476], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "vector": [14, 2, 0.9067, 0.0019, 2, 0.81, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " res['eval'] = eval"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L478_C4", "label": "test_VFF_1", "type": "function", "loc": [478, 484], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L457_C0", "vector": [2, 1, 0.9162, 0.0133, 1, 0.39, 1.0, 890, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "test_VFF_1", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_VFF_1(self):\n \"\"\"Builtins\"\"\"\n self.check('True')\n self.check('None')\n self.check('False')\n assert self.get('eval', False)==eval\n assert self.get('range', False)==range"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L479_C8", "label": "expression", "type": "expression", "loc": [479, 479], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L478_C4", "vector": [8, 2, 0.9124, 0.0019, 2, 0.95, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Builtins\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L480_C8", "label": "check()", "type": "expression", "loc": [480, 480], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L478_C4", "vector": [8, 2, 0.9143, 0.0019, 2, 0.95, 0.3333, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('True')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L481_C8", "label": "check()", "type": "expression", "loc": [481, 481], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L478_C4", "vector": [8, 2, 0.9162, 0.0019, 2, 0.95, 0.6667, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('None')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L482_C8", "label": "check()", "type": "expression", "loc": [482, 482], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L478_C4", "vector": [8, 2, 0.9181, 0.0019, 2, 0.95, 1.0, 803, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check", "arg_names": [], "import_names": [], "rhs_call_name": "check", "annotation": ""}, "snippet": " self.check('False')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L486_C0", "label": "VFFSL", "type": "class", "loc": [486, 506], "level": 0, "parent": null, "vector": [3, 0, 0.9448, 0.04, 0, 0.66, 0.8077, 158, 0, 3, 0, 0, 85, 0, 5], "semantic": {"name": "VFFSL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class VFFSL(VFS):\n _searchListLength = 1\n\n def setUp(self):\n \"\"\"Mod some of the data\n \"\"\"\n self._testNamespace = ns = self._testNamespace.copy()\n self._results = res = self._results.copy()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L487_C4", "label": "_searchListLength =", "type": "assigned_variable", "loc": [487, 487], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L486_C0", "vector": [14, 1, 0.9276, 0.0019, 1, 0.82, 0.0, 79, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "_searchListLength", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _searchListLength = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L489_C4", "label": "setUp", "type": "function", "loc": [489, 498], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L486_C0", "vector": [2, 1, 0.94, 0.019, 1, 0.82, 0.3333, 952, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n \"\"\"Mod some of the data\n \"\"\"\n self._testNamespace = ns = self._testNamespace.copy()\n self._results = res = self._results.copy()\n ns['aStr'] = res['aStr'] = 'BLARG'\n ns['aFloat'] = res['aFloat'] = 0.1234\n res['none'] = 'some'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L490_C8", "label": "expression", "type": "expression", "loc": [490, 491], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L489_C4", "vector": [8, 2, 0.9343, 0.0038, 2, 0.65, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Mod some of the data\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L492_C8", "label": "self._testNamespace = copy()", "type": "assigned_variable", "loc": [492, 492], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L489_C4", "vector": [14, 2, 0.9371, 0.0019, 2, 0.65, 0.2, 565, 3, 0, 0, 0, 739, 10, 1], "semantic": {"name": "self._testNamespace", "arg_names": [], "import_names": [], "rhs_call_name": "copy", "annotation": ""}, "snippet": " self._testNamespace = ns = self._testNamespace.copy()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L493_C8", "label": "self._results = copy()", "type": "assigned_variable", "loc": [493, 493], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L489_C4", "vector": [14, 2, 0.939, 0.0019, 2, 0.65, 0.4, 936, 3, 0, 0, 0, 739, 10, 1], "semantic": {"name": "self._results", "arg_names": [], "import_names": [], "rhs_call_name": "copy", "annotation": ""}, "snippet": " self._results = res = self._results.copy()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L494_C8", "label": "assign", "type": "assigned_variable", "loc": [494, 494], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L489_C4", "vector": [14, 2, 0.941, 0.0019, 2, 0.65, 0.6, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ns['aStr'] = res['aStr'] = 'BLARG'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L495_C8", "label": "assign", "type": "assigned_variable", "loc": [495, 495], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L489_C4", "vector": [14, 2, 0.9429, 0.0019, 2, 0.65, 0.8, 0, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ns['aFloat'] = res['aFloat'] = 0.1234"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L496_C8", "label": "assign", "type": "assigned_variable", "loc": [496, 496], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L489_C4", "vector": [14, 2, 0.9448, 0.0019, 2, 0.65, 1.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " res['none'] = 'some'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L500_C4", "label": "VFFSL", "type": "function", "loc": [500, 503], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L486_C0", "vector": [2, 1, 0.9552, 0.0076, 1, 0.82, 0.6667, 158, 0, 4, 1, 0, 0, 0, 1], "semantic": {"name": "VFFSL", "arg_names": ["self", "searchList", "name", "autocall"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def VFFSL(self, searchList, name, autocall=True):\n anInt = 1\n none = 'some'\n return valueFromFrameOrSearchList(searchList, name, autocall)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L501_C8", "label": "anInt =", "type": "assigned_variable", "loc": [501, 501], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L500_C4", "vector": [14, 2, 0.9543, 0.0019, 2, 0.24, 0.0, 356, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "anInt", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " anInt = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L502_C8", "label": "none =", "type": "assigned_variable", "loc": [502, 502], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L500_C4", "vector": [14, 2, 0.9562, 0.0019, 2, 0.24, 0.5, 615, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "none", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " none = 'some'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L503_C8", "label": "return", "type": "return", "loc": [503, 503], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L500_C4", "vector": [13, 2, 0.9581, 0.0019, 2, 0.24, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return valueFromFrameOrSearchList(searchList, name, autocall)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L505_C4", "label": "get", "type": "function", "loc": [505, 506], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L486_C0", "vector": [2, 1, 0.9629, 0.0038, 1, 0.82, 1.0, 607, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "get", "arg_names": ["self", "name", "autocall"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get(self, name, autocall=True):\n return self.VFFSL(self.searchList(), name, autocall)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L506_C8", "label": "return", "type": "return", "loc": [506, 506], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L505_C4", "vector": [13, 2, 0.9638, 0.0019, 2, 0.34, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.VFFSL(self.searchList(), name, autocall)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L508_C0", "label": "VFFSL_2", "type": "class", "loc": [508, 509], "level": 0, "parent": null, "vector": [3, 0, 0.9686, 0.0038, 0, 0.66, 0.8462, 556, 0, 0, 0, 0, 158, 0, 0], "semantic": {"name": "VFFSL_2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class VFFSL_2(VFFSL):\n _searchListLength = 2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L509_C4", "label": "_searchListLength =", "type": "assigned_variable", "loc": [509, 509], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L508_C0", "vector": [14, 1, 0.9695, 0.0019, 1, 0.39, 0.0, 79, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "_searchListLength", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _searchListLength = 2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L511_C0", "label": "VFFSL_3", "type": "class", "loc": [511, 512], "level": 0, "parent": null, "vector": [3, 0, 0.9743, 0.0038, 0, 0.66, 0.8846, 332, 0, 0, 0, 0, 158, 0, 0], "semantic": {"name": "VFFSL_3", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class VFFSL_3(VFFSL):\n _searchListLength = 3"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L512_C4", "label": "_searchListLength =", "type": "assigned_variable", "loc": [512, 512], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L511_C0", "vector": [14, 1, 0.9752, 0.0019, 1, 0.1, 0.0, 79, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "_searchListLength", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _searchListLength = 3"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L514_C0", "label": "VFFSL_4", "type": "class", "loc": [514, 515], "level": 0, "parent": null, "vector": [3, 0, 0.98, 0.0038, 0, 0.66, 0.9231, 258, 0, 0, 0, 0, 158, 0, 0], "semantic": {"name": "VFFSL_4", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class VFFSL_4(VFFSL):\n _searchListLength = 4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L515_C4", "label": "_searchListLength =", "type": "assigned_variable", "loc": [515, 515], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L514_C0", "vector": [14, 1, 0.981, 0.0019, 1, 0.86, 0.0, 79, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "_searchListLength", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _searchListLength = 4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L517_C0", "label": "if", "type": "if", "loc": [517, 518], "level": 0, "parent": null, "vector": [4, 0, 0.9857, 0.0038, 0, 0.66, 0.9615, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if sys.platform.startswith('java'):\n del VFF, VFFSL, VFFSL_2, VFFSL_3, VFFSL_4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L524_C0", "label": "if", "type": "if", "loc": [524, 525], "level": 0, "parent": null, "vector": [4, 0, 0.999, 0.0038, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n unittest.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L525_C4", "label": "main()", "type": "expression", "loc": [525, 525], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L524_C0", "vector": [8, 1, 1.0, 0.0019, 1, 0.56, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " unittest.main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L20_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L23_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L35_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Try_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:Try_L36_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L37_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L37_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L38_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L37_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L41_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:Try_L36_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L43_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L101_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L102_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L103_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L105_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L108_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L108_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L109_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L111_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L111_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L112_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L116_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L100_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L118_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L119_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L120_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L120_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L121_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L120_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L123_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L132_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L133_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L134_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L136_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L136_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L137_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L136_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L138_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L138_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L139_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L141_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L141_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L142_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L141_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L143_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L145_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L145_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L146_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L145_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L147_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L148_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L150_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L150_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L151_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L150_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L152_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L154_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L154_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L155_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L154_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L156_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L156_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L157_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L159_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L160_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L161_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L163_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L164_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L165_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L166_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L168_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L168_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L169_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L168_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L170_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L172_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L173_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L174_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L174_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L175_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L177_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L177_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L178_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L177_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L181_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L181_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L182_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L181_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L183_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L183_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L184_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L186_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L186_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L187_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L186_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L188_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L190_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L191_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L192_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L192_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L193_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L195_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L195_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L196_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L195_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L197_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L199_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L199_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L200_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L199_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L201_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L201_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L202_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L204_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L204_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L205_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L204_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L206_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L208_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L208_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L209_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L208_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L210_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L210_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L211_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L213_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L213_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L214_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L213_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L215_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L217_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L217_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L218_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L217_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L219_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L220_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L222_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L222_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L223_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L222_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L224_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L226_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L226_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L227_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L226_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L228_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L228_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L229_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L232_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L232_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L233_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L232_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L234_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L236_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L236_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L237_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L236_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L238_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L238_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L239_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L243_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L243_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L244_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L243_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L245_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L247_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L247_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L248_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L247_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L249_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L249_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L250_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L252_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L252_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L253_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L252_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L254_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L256_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L256_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L257_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L256_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L258_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L258_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L259_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L261_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L261_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L262_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L261_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L263_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L265_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L265_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L266_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L265_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L267_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L267_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L268_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L270_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L270_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L271_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L270_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L272_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L274_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L274_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L275_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L274_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L276_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L276_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L277_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L279_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L279_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L280_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L279_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L281_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L283_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L283_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L284_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L283_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L285_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L285_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L286_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L288_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L288_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L289_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L292_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L292_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L293_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L292_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L294_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L297_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L297_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L298_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L301_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L301_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L302_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L301_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L303_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L306_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L306_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L307_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L306_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L308_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L310_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L310_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L311_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L310_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L312_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L312_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L313_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L315_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L315_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L316_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L315_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L318_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L318_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L319_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L315_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L320_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L322_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L322_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L323_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L322_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L324_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L324_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L325_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L322_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L327_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L327_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L328_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L330_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L330_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L331_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L330_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L333_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L333_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L334_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L330_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L335_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L337_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L337_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L338_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L337_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L339_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L339_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L340_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L337_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L342_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L342_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L343_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L345_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L345_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L346_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L345_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L347_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L349_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L349_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L350_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L349_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L351_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L351_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L352_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L354_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L354_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L355_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L354_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L356_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L358_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L358_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L359_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L358_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L360_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L360_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L361_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L363_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L363_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L364_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L363_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L366_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L366_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L367_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L363_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L368_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L370_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L370_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L371_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L370_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L372_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L372_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L373_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L370_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L375_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L375_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L376_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L379_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L379_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L380_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L379_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L382_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L382_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L383_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L379_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L384_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L386_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L386_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L387_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L386_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L388_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L388_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L389_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L386_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L391_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L391_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L392_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L394_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L394_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L395_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L394_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L396_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L398_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L398_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L399_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L398_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L400_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L400_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L401_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L403_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L403_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L404_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L407_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L407_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L408_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L407_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L409_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L412_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L412_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L413_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L412_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L415_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L417_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L418_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L417_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L420_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L420_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L421_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L423_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L424_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L423_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L426_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L426_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L427_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L426_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L428_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L428_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L429_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L428_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L430_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L430_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L431_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L430_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L432_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L432_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L434_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L432_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L435_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L435_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L437_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L423_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L439_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L439_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L440_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L439_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L442_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:For_L442_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L443_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L423_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L445_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L445_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L446_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L448_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L449_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L451_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L452_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L454_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L455_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L457_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L458_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L458_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L459_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L458_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L460_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L458_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L461_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L458_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L462_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L458_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L463_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L457_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L466_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L468_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L469_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L470_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L471_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L472_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L473_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L474_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L475_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L465_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L476_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L457_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L478_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L478_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L479_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L478_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L480_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L478_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L481_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L478_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L482_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L486_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L487_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L486_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L489_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L489_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L490_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L489_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L492_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L489_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L493_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L489_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L494_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L489_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L495_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L489_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L496_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L486_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L500_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L500_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L501_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L500_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L502_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L500_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L503_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L486_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L505_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:FunctionDef_L505_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Return_L506_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L508_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L509_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L511_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L512_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:ClassDef_L514_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Assign_L515_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1489:If_L524_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1489:Expr_L525_C4"}]
#!/usr/bin/env python import hotshot import hotshot.stats import os import sys import unittest from test import pystone import time import Cheetah.NameMapper import Cheetah.Template # This can be turned on with the `--debug` flag when running the test # and will cause the tests to all just dump out how long they took # insteasd of asserting on duration DEBUG = False # TOLERANCE in Pystones kPS = 1000 TOLERANCE = 0.5*kPS class DurationError(AssertionError): pass _pystone_calibration_mark = None def _pystone_calibration(): global _pystone_calibration_mark if not _pystone_calibration_mark: _pystone_calibration_mark = pystone.pystones(loops=pystone.LOOPS) return _pystone_calibration_mark def perftest(max_num_pystones, current_pystone=None): ''' Performance test decorator based off the 'timedtest' decorator found in this Active State recipe: http://code.activestate.com/recipes/440700/ ''' if not isinstance(max_num_pystones, float): max_num_pystones = float(max_num_pystones) if not current_pystone: current_pystone = _pystone_calibration() def _test(function): def wrapper(*args, **kw): start_time = time.time() try: return function(*args, **kw) finally: total_time = time.time() - start_time if total_time == 0: pystone_total_time = 0 else: pystone_rate = current_pystone[0] / current_pystone[1] pystone_total_time = total_time / pystone_rate global DEBUG if DEBUG: print('The test "%s" took: %s pystones' % (function.func_name, pystone_total_time)) else: if pystone_total_time > (max_num_pystones + TOLERANCE): raise DurationError((('Test too long (%.2f Ps, ' 'need at most %.2f Ps)') % (pystone_total_time, max_num_pystones))) return wrapper return _test class DynamicTemplatePerformanceTest(unittest.TestCase): loops = 10 #@perftest(1200) def test_BasicDynamic(self): template = ''' #def foo(arg1, arg2) #pass #end def ''' for i in range(self.loops): klass = Cheetah.Template.Template.compile(template) assert klass test_BasicDynamic = perftest(1200)(test_BasicDynamic) class PerformanceTest(unittest.TestCase): iterations = 100000 display = False save = False def runTest(self): self.prof = hotshot.Profile('%s.prof' % self.__class__.__name__) self.prof.start() for i in range(self.iterations): if hasattr(self, 'performanceSample'): self.display = True self.performanceSample() self.prof.stop() self.prof.close() if self.display: print('>>> %s (%d iterations) ' % (self.__class__.__name__, self.iterations)) stats = hotshot.stats.load('%s.prof' % self.__class__.__name__) #stats.strip_dirs() stats.sort_stats('time', 'calls') stats.print_stats(50) if not self.save: os.unlink('%s.prof' % self.__class__.__name__) class DynamicMethodCompilationTest(PerformanceTest): def performanceSample(self): template = ''' #import sys #import os #def testMethod() #set foo = [1, 2, 3, 4] #return $foo[0] #end def ''' template = Cheetah.Template.Template.compile(template, keepRefToGeneratedCode=False) template = template() value = template.testMethod() class BunchOfWriteCalls(PerformanceTest): iterations = 1000 def performanceSample(self): template = ''' #import sys #import os #for i in range(1000) $i #end for ''' template = Cheetah.Template.Template.compile(template, keepRefToGeneratedCode=False) template = template() value = template.respond() del value class DynamicSimpleCompilationTest(PerformanceTest): def performanceSample(self): template = ''' #import sys #import os #set foo = [1,2,3,4] Well hello there! This is basic. Here's an array too: $foo ''' template = Cheetah.Template.Template.compile(template, keepRefToGeneratedCode=False) template = template() template = unicode(template) class FilterTest(PerformanceTest): template = None def setUp(self): super(FilterTest, self).setUp() template = ''' #import sys #import os #set foo = [1, 2, 3, 4] $foo, $foo, $foo ''' template = Cheetah.Template.Template.compile(template, keepRefToGeneratedCode=False) self.template = template() def performanceSample(self): value = unicode(self.template) class LongCompileTest(PerformanceTest): ''' Test the compilation on a sufficiently large template ''' def compile(self, template): return Cheetah.Template.Template.compile(template, keepRefToGeneratedCode=False) def performanceSample(self): template = ''' #import sys #import Cheetah.Template #extends Cheetah.Template.Template #def header() <center><h2>This is my header</h2></center> #end def #def footer() #return "Huzzah" #end def #def scripts() #pass #end def #def respond() <html> <head> <title>${title}</title> $scripts() </head> <body> $header() #for $i in $range(10) This is just some stupid page! <br/> #end for <br/> $footer() </body> </html> #end def ''' return self.compile(template) class LongCompile_CompilerSettingsTest(LongCompileTest): def compile(self, template): return Cheetah.Template.Template.compile(template, keepRefToGeneratedCode=False, compilerSettings={'useStackFrames' : True, 'useAutocalling' : True}) class LongCompileAndRun(LongCompileTest): def performanceSample(self): template = super(LongCompileAndRun, self).performanceSample() template = template(searchList=[{'title' : 'foo'}]) template = template.respond() if __name__ == '__main__': if '--debug' in sys.argv: DEBUG = True sys.argv = [arg for arg in sys.argv if not arg == '--debug'] unittest.main()
ajibawa-2023/Python-Code-Large/train/row_1490
114
243
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Import_L3_C0", "label": "hotshot import hotshot", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0123, 0.0041, 0, 0.66, 0.0, 974, 0, 1, 0, 0, 974, 0, 0], "semantic": {"name": "hotshot", "arg_names": [], "import_names": ["hotshot"], "rhs_call_name": "", "annotation": ""}, "snippet": "import hotshot"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Import_L4_C0", "label": "hotshot.stats import hotshot.stats", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0165, 0.0041, 0, 0.66, 0.04, 226, 0, 1, 0, 0, 226, 0, 0], "semantic": {"name": "hotshot.stats", "arg_names": [], "import_names": ["hotshot.stats"], "rhs_call_name": "", "annotation": ""}, "snippet": "import hotshot.stats"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Import_L5_C0", "label": "os import os", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0206, 0.0041, 0, 0.66, 0.08, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Import_L6_C0", "label": "sys import sys", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0247, 0.0041, 0, 0.66, 0.12, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Import_L7_C0", "label": "unittest import unittest", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0288, 0.0041, 0, 0.66, 0.16, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], "rhs_call_name": "", "annotation": ""}, "snippet": "import unittest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:ImportFrom_L9_C0", "label": "from test import pystone", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.0041, 0, 0.66, 0.2, 224, 0, 1, 0, 0, 224, 0, 0], "semantic": {"name": "test", "arg_names": [], "import_names": ["pystone"], "rhs_call_name": "", "annotation": ""}, "snippet": "from test import pystone"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Import_L10_C0", "label": "time import time", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0412, 0.0041, 0, 0.66, 0.24, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Import_L12_C0", "label": "Cheetah.NameMapper import Cheetah.NameMapper", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.0494, 0.0041, 0, 0.66, 0.28, 308, 0, 1, 0, 0, 308, 0, 0], "semantic": {"name": "Cheetah.NameMapper", "arg_names": [], "import_names": ["Cheetah.NameMapper"], "rhs_call_name": "", "annotation": ""}, "snippet": "import Cheetah.NameMapper "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Import_L13_C0", "label": "Cheetah.Template import Cheetah.Template", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0535, 0.0041, 0, 0.66, 0.32, 171, 0, 1, 0, 0, 171, 0, 0], "semantic": {"name": "Cheetah.Template", "arg_names": [], "import_names": ["Cheetah.Template"], "rhs_call_name": "", "annotation": ""}, "snippet": "import Cheetah.Template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L18_C0", "label": "DEBUG =", "type": "assigned_variable", "loc": [18, 18], "level": 0, "parent": null, "vector": [14, 0, 0.0741, 0.0041, 0, 0.66, 0.36, 309, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "DEBUG", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DEBUG = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L21_C0", "label": "kPS =", "type": "assigned_variable", "loc": [21, 21], "level": 0, "parent": null, "vector": [14, 0, 0.0864, 0.0041, 0, 0.66, 0.4, 777, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "kPS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "kPS = 1000"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L22_C0", "label": "TOLERANCE =", "type": "assigned_variable", "loc": [22, 22], "level": 0, "parent": null, "vector": [14, 0, 0.0905, 0.0041, 0, 0.66, 0.44, 489, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "TOLERANCE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TOLERANCE = 0.5*kPS "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L24_C0", "label": "DurationError", "type": "class", "loc": [24, 25], "level": 0, "parent": null, "vector": [3, 0, 0.1008, 0.0082, 0, 0.66, 0.48, 933, 0, 0, 0, 0, 257, 0, 0], "semantic": {"name": "DurationError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class DurationError(AssertionError):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L27_C0", "label": "_pystone_calibration_mark =", "type": "assigned_variable", "loc": [27, 27], "level": 0, "parent": null, "vector": [14, 0, 0.1111, 0.0041, 0, 0.66, 0.52, 396, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "_pystone_calibration_mark", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "_pystone_calibration_mark = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L28_C0", "label": "_pystone_calibration", "type": "function", "loc": [28, 32], "level": 0, "parent": null, "vector": [2, 0, 0.1235, 0.0206, 0, 0.66, 0.56, 729, 0, 0, 1, 0, 0, 0, 1], "semantic": {"name": "_pystone_calibration", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def _pystone_calibration():\n global _pystone_calibration_mark\n if not _pystone_calibration_mark:\n _pystone_calibration_mark = pystone.pystones(loops=pystone.LOOPS)\n return _pystone_calibration_mark"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L30_C4", "label": "if", "type": "if", "loc": [30, 31], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L28_C0", "vector": [4, 1, 0.1255, 0.0082, 1, 0.51, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not _pystone_calibration_mark:\n _pystone_calibration_mark = pystone.pystones(loops=pystone.LOOPS)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L31_C8", "label": "_pystone_calibration_mark = pystones()", "type": "assigned_variable", "loc": [31, 31], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L30_C4", "vector": [14, 2, 0.1276, 0.0041, 2, 0.4, 0.0, 396, 3, 1, 0, 0, 992, 10, 1], "semantic": {"name": "_pystone_calibration_mark", "arg_names": [], "import_names": [], "rhs_call_name": "pystones", "annotation": ""}, "snippet": " _pystone_calibration_mark = pystone.pystones(loops=pystone.LOOPS)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Return_L32_C4", "label": "return", "type": "return", "loc": [32, 32], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L28_C0", "vector": [13, 1, 0.1317, 0.0041, 1, 0.51, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return _pystone_calibration_mark"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L34_C0", "label": "perftest", "type": "function", "loc": [34, 69], "level": 0, "parent": null, "vector": [2, 0, 0.2119, 0.1481, 0, 0.66, 0.6, 22, 0, 2, 1, 0, 0, 0, 8], "semantic": {"name": "perftest", "arg_names": ["max_num_pystones", "current_pystone"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def perftest(max_num_pystones, current_pystone=None):\n '''\n Performance test decorator based off the 'timedtest' \n decorator found in this Active State recipe:\n http://code.activestate.com/recipes/440700/\n '''\n if not isinstance(max_num_pystones, float):\n max_num_pystones = float(max_num_pystones)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L35_C4", "label": "expression", "type": "expression", "loc": [35, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L34_C0", "vector": [8, 1, 0.1523, 0.0206, 1, 0.38, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Performance test decorator based off the 'timedtest' \n decorator found in this Active State recipe:\n http://code.activestate.com/recipes/440700/\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L40_C4", "label": "if", "type": "if", "loc": [40, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L34_C0", "vector": [4, 1, 0.1667, 0.0082, 1, 0.38, 0.25, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not isinstance(max_num_pystones, float):\n max_num_pystones = float(max_num_pystones)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L41_C8", "label": "max_num_pystones = float()", "type": "assigned_variable", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L40_C4", "vector": [14, 2, 0.1687, 0.0041, 2, 0.63, 0.0, 323, 3, 1, 0, 0, 639, 10, 1], "semantic": {"name": "max_num_pystones", "arg_names": [], "import_names": [], "rhs_call_name": "float", "annotation": ""}, "snippet": " max_num_pystones = float(max_num_pystones)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L43_C4", "label": "if", "type": "if", "loc": [43, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L34_C0", "vector": [4, 1, 0.179, 0.0082, 1, 0.38, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not current_pystone:\n current_pystone = _pystone_calibration()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L44_C8", "label": "current_pystone = _pystone_calibration()", "type": "assigned_variable", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L43_C4", "vector": [14, 2, 0.1811, 0.0041, 2, 0.61, 0.0, 745, 3, 0, 0, 0, 729, 10, 1], "semantic": {"name": "current_pystone", "arg_names": [], "import_names": [], "rhs_call_name": "_pystone_calibration", "annotation": ""}, "snippet": " current_pystone = _pystone_calibration()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L46_C4", "label": "_test", "type": "function", "loc": [46, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L34_C0", "vector": [2, 1, 0.2346, 0.0947, 1, 0.38, 0.75, 124, 0, 1, 1, 0, 0, 0, 5], "semantic": {"name": "_test", "arg_names": ["function"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _test(function):\n def wrapper(*args, **kw):\n start_time = time.time()\n try:\n return function(*args, **kw)\n finally:\n total_time = time.time() - start_time\n if total_time == 0:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L47_C8", "label": "wrapper", "type": "function", "loc": [47, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L46_C4", "vector": [2, 2, 0.2346, 0.0864, 2, 0.04, 0.0, 353, 0, 2, 1, 0, 0, 0, 5], "semantic": {"name": "wrapper", "arg_names": ["args", "kw"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def wrapper(*args, **kw):\n start_time = time.time()\n try:\n return function(*args, **kw)\n finally:\n total_time = time.time() - start_time\n if total_time == 0:\n pystone_total_time = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L48_C12", "label": "start_time = time()", "type": "assigned_variable", "loc": [48, 48], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L47_C8", "vector": [14, 3, 0.1975, 0.0041, 3, 0.72, 0.0, 511, 3, 0, 0, 0, 654, 10, 1], "semantic": {"name": "start_time", "arg_names": [], "import_names": [], "rhs_call_name": "time", "annotation": ""}, "snippet": " start_time = time.time()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Try_L49_C12", "label": "try", "type": "try", "loc": [49, 67], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L47_C8", "vector": [7, 3, 0.2387, 0.0782, 3, 0.72, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n return function(*args, **kw)\n finally:\n total_time = time.time() - start_time\n if total_time == 0:\n pystone_total_time = 0\n else:\n pystone_rate = current_pystone[0] / current_pystone[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Return_L50_C16", "label": "return", "type": "return", "loc": [50, 50], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:Try_L49_C12", "vector": [13, 4, 0.2058, 0.0041, 4, 0.22, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return function(*args, **kw)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L52_C16", "label": "total_time =", "type": "assigned_variable", "loc": [52, 52], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:Try_L49_C12", "vector": [14, 4, 0.214, 0.0041, 4, 0.22, 0.3333, 875, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "total_time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " total_time = time.time() - start_time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L53_C16", "label": "if", "type": "if", "loc": [53, 57], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:Try_L49_C12", "vector": [4, 4, 0.2263, 0.0206, 4, 0.22, 0.6667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if total_time == 0:\n pystone_total_time = 0\n else:\n pystone_rate = current_pystone[0] / current_pystone[1]\n pystone_total_time = total_time / pystone_rate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L54_C20", "label": "pystone_total_time =", "type": "assigned_variable", "loc": [54, 54], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L53_C16", "vector": [14, 5, 0.2222, 0.0041, 5, 0.26, 0.0, 641, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "pystone_total_time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pystone_total_time = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L56_C20", "label": "pystone_rate =", "type": "assigned_variable", "loc": [56, 56], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L53_C16", "vector": [14, 5, 0.2305, 0.0041, 5, 0.26, 0.5, 331, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pystone_rate", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pystone_rate = current_pystone[0] / current_pystone[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L57_C20", "label": "pystone_total_time =", "type": "assigned_variable", "loc": [57, 57], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L53_C16", "vector": [14, 5, 0.2346, 0.0041, 5, 0.26, 1.0, 641, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pystone_total_time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pystone_total_time = total_time / pystone_rate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L59_C16", "label": "if", "type": "if", "loc": [59, 67], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:Try_L49_C12", "vector": [4, 4, 0.2593, 0.037, 4, 0.22, 1.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if DEBUG:\n print('The test \"%s\" took: %s pystones' % (function.func_name,\n pystone_total_time))\n else:\n if pystone_total_time > (max_num_pystones + TOLERANCE):\n raise DurationError((('Test too long (%.2f Ps, '\n 'need at most %.2f Ps)')\n % (pystone_total_time,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L60_C20", "label": "print()", "type": "expression", "loc": [60, 61], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L59_C16", "vector": [8, 5, 0.249, 0.0082, 5, 0.28, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('The test \"%s\" took: %s pystones' % (function.func_name,\n pystone_total_time))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L63_C20", "label": "if", "type": "if", "loc": [63, 67], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L59_C16", "vector": [4, 5, 0.2675, 0.0206, 5, 0.28, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pystone_total_time > (max_num_pystones + TOLERANCE):\n raise DurationError((('Test too long (%.2f Ps, '\n 'need at most %.2f Ps)')\n % (pystone_total_time,\n max_num_pystones)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Return_L68_C8", "label": "return", "type": "return", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L46_C4", "vector": [13, 2, 0.2798, 0.0041, 2, 0.04, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return wrapper"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Return_L69_C4", "label": "return", "type": "return", "loc": [69, 69], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L34_C0", "vector": [13, 1, 0.284, 0.0041, 1, 0.38, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return _test"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L72_C0", "label": "DynamicTemplatePerformanceTest", "type": "class", "loc": [72, 84], "level": 0, "parent": null, "vector": [3, 0, 0.321, 0.0535, 0, 0.66, 0.64, 217, 0, 1, 0, 0, 878, 0, 4], "semantic": {"name": "DynamicTemplatePerformanceTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class DynamicTemplatePerformanceTest(unittest.TestCase):\n loops = 10\n #@perftest(1200)\n def test_BasicDynamic(self):\n template = '''\n #def foo(arg1, arg2)\n #pass\n #end def"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L73_C4", "label": "loops =", "type": "assigned_variable", "loc": [73, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L72_C0", "vector": [14, 1, 0.3004, 0.0041, 1, 0.6, 0.0, 981, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "loops", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " loops = 10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L75_C4", "label": "test_BasicDynamic", "type": "function", "loc": [75, 83], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L72_C0", "vector": [2, 1, 0.3251, 0.037, 1, 0.6, 0.5, 854, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test_BasicDynamic", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_BasicDynamic(self):\n template = '''\n #def foo(arg1, arg2)\n #pass\n #end def\n '''\n for i in range(self.loops):\n klass = Cheetah.Template.Template.compile(template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L76_C8", "label": "template =", "type": "assigned_variable", "loc": [76, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L75_C4", "vector": [14, 2, 0.321, 0.0206, 2, 0.66, 0.0, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n #def foo(arg1, arg2)\n #pass\n #end def\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:For_L81_C8", "label": "for i", "type": "for", "loc": [81, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L75_C4", "vector": [6, 2, 0.3374, 0.0123, 2, 0.66, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(self.loops):\n klass = Cheetah.Template.Template.compile(template)\n assert klass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L82_C12", "label": "klass = compile()", "type": "assigned_variable", "loc": [82, 82], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:For_L81_C8", "vector": [14, 3, 0.3374, 0.0041, 3, 0.97, 0.0, 35, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "klass", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " klass = Cheetah.Template.Template.compile(template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L84_C4", "label": "test_BasicDynamic =", "type": "assigned_variable", "loc": [84, 84], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L72_C0", "vector": [14, 1, 0.3457, 0.0041, 1, 0.6, 1.0, 854, 3, 1, 0, 0, 0, 10, 2], "semantic": {"name": "test_BasicDynamic", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " test_BasicDynamic = perftest(1200)(test_BasicDynamic)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L86_C0", "label": "PerformanceTest", "type": "class", "loc": [86, 109], "level": 0, "parent": null, "vector": [3, 0, 0.4012, 0.0988, 0, 0.66, 0.68, 110, 0, 1, 0, 0, 878, 0, 12], "semantic": {"name": "PerformanceTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class PerformanceTest(unittest.TestCase):\n iterations = 100000\n display = False\n save = False\n\n def runTest(self):\n self.prof = hotshot.Profile('%s.prof' % self.__class__.__name__)\n self.prof.start()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L87_C4", "label": "iterations =", "type": "assigned_variable", "loc": [87, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L86_C0", "vector": [14, 1, 0.358, 0.0041, 1, 0.52, 0.0, 143, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "iterations", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " iterations = 100000"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L88_C4", "label": "display =", "type": "assigned_variable", "loc": [88, 88], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L86_C0", "vector": [14, 1, 0.3621, 0.0041, 1, 0.52, 0.3333, 669, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "display", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " display = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L89_C4", "label": "save =", "type": "assigned_variable", "loc": [89, 89], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L86_C0", "vector": [14, 1, 0.3663, 0.0041, 1, 0.52, 0.6667, 928, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "save", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " save = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L91_C4", "label": "runTest", "type": "function", "loc": [91, 109], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L86_C0", "vector": [2, 1, 0.4115, 0.0782, 1, 0.52, 1.0, 375, 0, 1, 0, 0, 0, 0, 12], "semantic": {"name": "runTest", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def runTest(self):\n self.prof = hotshot.Profile('%s.prof' % self.__class__.__name__)\n self.prof.start()\n for i in range(self.iterations):\n if hasattr(self, 'performanceSample'):\n self.display = True\n self.performanceSample()\n self.prof.stop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L92_C8", "label": "self.prof = Profile()", "type": "assigned_variable", "loc": [92, 92], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L91_C4", "vector": [14, 2, 0.3786, 0.0041, 2, 0.92, 0.0, 500, 3, 1, 0, 0, 555, 10, 1], "semantic": {"name": "self.prof", "arg_names": [], "import_names": [], "rhs_call_name": "Profile", "annotation": ""}, "snippet": " self.prof = hotshot.Profile('%s.prof' % self.__class__.__name__)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L93_C8", "label": "start()", "type": "expression", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L91_C4", "vector": [8, 2, 0.3827, 0.0041, 2, 0.92, 0.1667, 511, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "start", "annotation": ""}, "snippet": " self.prof.start()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:For_L94_C8", "label": "for i", "type": "for", "loc": [94, 97], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L91_C4", "vector": [6, 2, 0.393, 0.0165, 2, 0.92, 0.3333, 826, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(self.iterations):\n if hasattr(self, 'performanceSample'):\n self.display = True\n self.performanceSample()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L95_C12", "label": "if", "type": "if", "loc": [95, 97], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:For_L94_C8", "vector": [4, 3, 0.3951, 0.0123, 3, 0.62, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if hasattr(self, 'performanceSample'):\n self.display = True\n self.performanceSample()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L96_C16", "label": "self.display =", "type": "assigned_variable", "loc": [96, 96], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L95_C12", "vector": [14, 4, 0.3951, 0.0041, 4, 0.44, 0.0, 38, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.display", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.display = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L97_C16", "label": "performanceSample()", "type": "expression", "loc": [97, 97], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L95_C12", "vector": [8, 4, 0.3992, 0.0041, 4, 0.44, 1.0, 510, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "performanceSample", "arg_names": [], "import_names": [], "rhs_call_name": "performanceSample", "annotation": ""}, "snippet": " self.performanceSample()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L98_C8", "label": "stop()", "type": "expression", "loc": [98, 98], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L91_C4", "vector": [8, 2, 0.4033, 0.0041, 2, 0.92, 0.5, 343, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "stop", "arg_names": [], "import_names": [], "rhs_call_name": "stop", "annotation": ""}, "snippet": " self.prof.stop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L99_C8", "label": "close()", "type": "expression", "loc": [99, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L91_C4", "vector": [8, 2, 0.4074, 0.0041, 2, 0.92, 0.6667, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " self.prof.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L100_C8", "label": "if", "type": "if", "loc": [100, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L91_C4", "vector": [4, 2, 0.4239, 0.0288, 2, 0.92, 0.8333, 0, 7, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.display:\n print('>>> %s (%d iterations) ' % (self.__class__.__name__,\n self.iterations))\n stats = hotshot.stats.load('%s.prof' % self.__class__.__name__)\n #stats.strip_dirs()\n stats.sort_stats('time', 'calls')\n stats.print_stats(50)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L101_C12", "label": "print()", "type": "expression", "loc": [101, 102], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L100_C8", "vector": [8, 3, 0.4177, 0.0082, 3, 0.26, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('>>> %s (%d iterations) ' % (self.__class__.__name__,\n self.iterations))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L103_C12", "label": "stats = load()", "type": "assigned_variable", "loc": [103, 103], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L100_C8", "vector": [14, 3, 0.4239, 0.0041, 3, 0.26, 0.3333, 318, 3, 1, 0, 0, 37, 10, 1], "semantic": {"name": "stats", "arg_names": [], "import_names": [], "rhs_call_name": "load", "annotation": ""}, "snippet": " stats = hotshot.stats.load('%s.prof' % self.__class__.__name__)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L105_C12", "label": "sort_stats()", "type": "expression", "loc": [105, 105], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L100_C8", "vector": [8, 3, 0.4321, 0.0041, 3, 0.26, 0.6667, 392, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "sort_stats", "arg_names": [], "import_names": [], "rhs_call_name": "sort_stats", "annotation": ""}, "snippet": " stats.sort_stats('time', 'calls')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L106_C12", "label": "print_stats()", "type": "expression", "loc": [106, 106], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L100_C8", "vector": [8, 3, 0.4362, 0.0041, 3, 0.26, 1.0, 764, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print_stats", "arg_names": [], "import_names": [], "rhs_call_name": "print_stats", "annotation": ""}, "snippet": " stats.print_stats(50)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L108_C8", "label": "if", "type": "if", "loc": [108, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L91_C4", "vector": [4, 2, 0.4465, 0.0082, 2, 0.92, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.save:\n os.unlink('%s.prof' % self.__class__.__name__)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L109_C12", "label": "unlink()", "type": "expression", "loc": [109, 109], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L108_C8", "vector": [8, 3, 0.4486, 0.0041, 3, 0.45, 0.0, 701, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "unlink", "arg_names": [], "import_names": [], "rhs_call_name": "unlink", "annotation": ""}, "snippet": " os.unlink('%s.prof' % self.__class__.__name__)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L111_C0", "label": "DynamicMethodCompilationTest", "type": "class", "loc": [111, 124], "level": 0, "parent": null, "vector": [3, 0, 0.4835, 0.0576, 0, 0.66, 0.72, 150, 0, 1, 0, 0, 110, 0, 3], "semantic": {"name": "DynamicMethodCompilationTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class DynamicMethodCompilationTest(PerformanceTest):\n def performanceSample(self):\n template = '''\n #import sys\n #import os\n #def testMethod()\n #set foo = [1, 2, 3, 4]\n #return $foo[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L112_C4", "label": "performanceSample", "type": "function", "loc": [112, 124], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L111_C0", "vector": [2, 1, 0.4856, 0.0535, 1, 0.09, 0.0, 510, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "performanceSample", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def performanceSample(self):\n template = '''\n #import sys\n #import os\n #def testMethod()\n #set foo = [1, 2, 3, 4]\n #return $foo[0]\n #end def"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L113_C8", "label": "template =", "type": "assigned_variable", "loc": [113, 120], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L112_C4", "vector": [14, 2, 0.4794, 0.0329, 2, 0.09, 0.0, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n #import sys\n #import os\n #def testMethod()\n #set foo = [1, 2, 3, 4]\n #return $foo[0]\n #end def\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L121_C8", "label": "template = compile()", "type": "assigned_variable", "loc": [121, 122], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L112_C4", "vector": [14, 2, 0.5, 0.0082, 2, 0.09, 0.3333, 549, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " template = Cheetah.Template.Template.compile(template, \n keepRefToGeneratedCode=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L123_C8", "label": "template = template()", "type": "assigned_variable", "loc": [123, 123], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L112_C4", "vector": [14, 2, 0.5062, 0.0041, 2, 0.09, 0.6667, 549, 3, 0, 0, 0, 549, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "template", "annotation": ""}, "snippet": " template = template()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L124_C8", "label": "value = testMethod()", "type": "assigned_variable", "loc": [124, 124], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L112_C4", "vector": [14, 2, 0.5103, 0.0041, 2, 0.09, 1.0, 441, 3, 0, 0, 0, 823, 10, 1], "semantic": {"name": "value", "arg_names": [], "import_names": [], "rhs_call_name": "testMethod", "annotation": ""}, "snippet": " value = template.testMethod()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L127_C0", "label": "BunchOfWriteCalls", "type": "class", "loc": [127, 141], "level": 0, "parent": null, "vector": [3, 0, 0.5514, 0.0617, 0, 0.66, 0.76, 992, 0, 1, 0, 0, 110, 0, 3], "semantic": {"name": "BunchOfWriteCalls", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class BunchOfWriteCalls(PerformanceTest):\n iterations = 1000\n def performanceSample(self):\n template = '''\n #import sys\n #import os\n #for i in range(1000)\n $i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L128_C4", "label": "iterations =", "type": "assigned_variable", "loc": [128, 128], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L127_C0", "vector": [14, 1, 0.5267, 0.0041, 1, 0.4, 0.0, 143, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "iterations", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " iterations = 1000"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L129_C4", "label": "performanceSample", "type": "function", "loc": [129, 141], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L127_C0", "vector": [2, 1, 0.5556, 0.0535, 1, 0.4, 1.0, 510, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "performanceSample", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def performanceSample(self):\n template = '''\n #import sys\n #import os\n #for i in range(1000)\n $i\n #end for\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L130_C8", "label": "template =", "type": "assigned_variable", "loc": [130, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L129_C4", "vector": [14, 2, 0.5473, 0.0288, 2, 0.22, 0.0, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n #import sys\n #import os\n #for i in range(1000)\n $i\n #end for\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L137_C8", "label": "template = compile()", "type": "assigned_variable", "loc": [137, 138], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L129_C4", "vector": [14, 2, 0.5658, 0.0082, 2, 0.22, 0.3333, 549, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " template = Cheetah.Template.Template.compile(template, \n keepRefToGeneratedCode=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L139_C8", "label": "template = template()", "type": "assigned_variable", "loc": [139, 139], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L129_C4", "vector": [14, 2, 0.572, 0.0041, 2, 0.22, 0.6667, 549, 3, 0, 0, 0, 549, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "template", "annotation": ""}, "snippet": " template = template()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L140_C8", "label": "value = respond()", "type": "assigned_variable", "loc": [140, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L129_C4", "vector": [14, 2, 0.5761, 0.0041, 2, 0.22, 1.0, 441, 3, 0, 0, 0, 100, 10, 1], "semantic": {"name": "value", "arg_names": [], "import_names": [], "rhs_call_name": "respond", "annotation": ""}, "snippet": " value = template.respond()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L143_C0", "label": "DynamicSimpleCompilationTest", "type": "class", "loc": [143, 157], "level": 0, "parent": null, "vector": [3, 0, 0.6173, 0.0617, 0, 0.66, 0.8, 666, 0, 1, 0, 0, 110, 0, 3], "semantic": {"name": "DynamicSimpleCompilationTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class DynamicSimpleCompilationTest(PerformanceTest):\n def performanceSample(self):\n template = '''\n #import sys\n #import os\n #set foo = [1,2,3,4]\n\n Well hello there! This is basic."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L144_C4", "label": "performanceSample", "type": "function", "loc": [144, 157], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L143_C0", "vector": [2, 1, 0.6193, 0.0576, 1, 0.0, 0.0, 510, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "performanceSample", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def performanceSample(self):\n template = '''\n #import sys\n #import os\n #set foo = [1,2,3,4]\n\n Well hello there! This is basic.\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L145_C8", "label": "template =", "type": "assigned_variable", "loc": [145, 153], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L144_C4", "vector": [14, 2, 0.6132, 0.037, 2, 0.09, 0.0, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n #import sys\n #import os\n #set foo = [1,2,3,4]\n\n Well hello there! This is basic.\n\n Here's an array too: $foo"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L154_C8", "label": "template = compile()", "type": "assigned_variable", "loc": [154, 155], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L144_C4", "vector": [14, 2, 0.6358, 0.0082, 2, 0.09, 0.3333, 549, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " template = Cheetah.Template.Template.compile(template, \n keepRefToGeneratedCode=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L156_C8", "label": "template = template()", "type": "assigned_variable", "loc": [156, 156], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L144_C4", "vector": [14, 2, 0.642, 0.0041, 2, 0.09, 0.6667, 549, 3, 0, 0, 0, 549, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "template", "annotation": ""}, "snippet": " template = template()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L157_C8", "label": "template = unicode()", "type": "assigned_variable", "loc": [157, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L144_C4", "vector": [14, 2, 0.6461, 0.0041, 2, 0.09, 1.0, 549, 3, 1, 0, 0, 733, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "unicode", "annotation": ""}, "snippet": " template = unicode(template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L160_C0", "label": "FilterTest", "type": "class", "loc": [160, 176], "level": 0, "parent": null, "vector": [3, 0, 0.6914, 0.07, 0, 0.66, 0.84, 756, 0, 2, 0, 0, 110, 0, 5], "semantic": {"name": "FilterTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class FilterTest(PerformanceTest):\n template = None\n def setUp(self):\n super(FilterTest, self).setUp()\n template = '''\n #import sys\n #import os\n #set foo = [1, 2, 3, 4]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L161_C4", "label": "template =", "type": "assigned_variable", "loc": [161, 161], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L160_C0", "vector": [14, 1, 0.6626, 0.0041, 1, 0.32, 0.0, 549, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L162_C4", "label": "setUp", "type": "function", "loc": [162, 173], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L160_C0", "vector": [2, 1, 0.6893, 0.0494, 1, 0.32, 0.5, 952, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n super(FilterTest, self).setUp()\n template = '''\n #import sys\n #import os\n #set foo = [1, 2, 3, 4]\n\n $foo, $foo, $foo"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L163_C8", "label": "setUp()", "type": "expression", "loc": [163, 163], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L162_C4", "vector": [8, 2, 0.6708, 0.0041, 2, 0.83, 0.0, 952, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "setUp", "arg_names": [], "import_names": [], "rhs_call_name": "setUp", "annotation": ""}, "snippet": " super(FilterTest, self).setUp()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L164_C8", "label": "template =", "type": "assigned_variable", "loc": [164, 170], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L162_C4", "vector": [14, 2, 0.6872, 0.0288, 2, 0.83, 0.3333, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n #import sys\n #import os\n #set foo = [1, 2, 3, 4]\n\n $foo, $foo, $foo\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L171_C8", "label": "template = compile()", "type": "assigned_variable", "loc": [171, 172], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L162_C4", "vector": [14, 2, 0.7058, 0.0082, 2, 0.83, 0.6667, 549, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " template = Cheetah.Template.Template.compile(template, \n keepRefToGeneratedCode=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L173_C8", "label": "self.template = template()", "type": "assigned_variable", "loc": [173, 173], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L162_C4", "vector": [14, 2, 0.7119, 0.0041, 2, 0.83, 1.0, 479, 3, 0, 0, 0, 549, 10, 1], "semantic": {"name": "self.template", "arg_names": [], "import_names": [], "rhs_call_name": "template", "annotation": ""}, "snippet": " self.template = template()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L175_C4", "label": "performanceSample", "type": "function", "loc": [175, 176], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L160_C0", "vector": [2, 1, 0.7222, 0.0082, 1, 0.32, 1.0, 510, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "performanceSample", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def performanceSample(self):\n value = unicode(self.template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L176_C8", "label": "value = unicode()", "type": "assigned_variable", "loc": [176, 176], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L175_C4", "vector": [14, 2, 0.7243, 0.0041, 2, 0.97, 0.0, 441, 3, 1, 0, 0, 733, 10, 1], "semantic": {"name": "value", "arg_names": [], "import_names": [], "rhs_call_name": "unicode", "annotation": ""}, "snippet": " value = unicode(self.template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L179_C0", "label": "LongCompileTest", "type": "class", "loc": [179, 225], "level": 0, "parent": null, "vector": [3, 0, 0.8313, 0.1934, 0, 0.66, 0.88, 135, 0, 2, 0, 0, 110, 0, 2], "semantic": {"name": "LongCompileTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class LongCompileTest(PerformanceTest):\n ''' Test the compilation on a sufficiently large template '''\n def compile(self, template):\n return Cheetah.Template.Template.compile(template, keepRefToGeneratedCode=False)\n\n def performanceSample(self):\n template = '''\n #import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L180_C4", "label": "expression", "type": "expression", "loc": [180, 180], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L179_C0", "vector": [8, 1, 0.7407, 0.0041, 1, 0.63, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ''' Test the compilation on a sufficiently large template '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L181_C4", "label": "compile", "type": "function", "loc": [181, 182], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L179_C0", "vector": [2, 1, 0.7469, 0.0082, 1, 0.63, 0.5, 821, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "compile", "arg_names": ["self", "template"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def compile(self, template):\n return Cheetah.Template.Template.compile(template, keepRefToGeneratedCode=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Return_L182_C8", "label": "return", "type": "return", "loc": [182, 182], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L181_C4", "vector": [13, 2, 0.749, 0.0041, 2, 0.8, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return Cheetah.Template.Template.compile(template, keepRefToGeneratedCode=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L184_C4", "label": "performanceSample", "type": "function", "loc": [184, 225], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L179_C0", "vector": [2, 1, 0.8416, 0.1728, 1, 0.63, 1.0, 510, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "performanceSample", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def performanceSample(self):\n template = '''\n #import sys\n #import Cheetah.Template\n\n #extends Cheetah.Template.Template\n\n #def header()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L185_C8", "label": "template =", "type": "assigned_variable", "loc": [185, 224], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L184_C4", "vector": [14, 2, 0.8416, 0.1646, 2, 0.53, 0.0, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n #import sys\n #import Cheetah.Template\n\n #extends Cheetah.Template.Template\n\n #def header()\n <center><h2>This is my header</h2></center>"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Return_L225_C8", "label": "return", "type": "return", "loc": [225, 225], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L184_C4", "vector": [13, 2, 0.9259, 0.0041, 2, 0.53, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.compile(template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L227_C0", "label": "LongCompile_CompilerSettingsTest", "type": "class", "loc": [227, 230], "level": 0, "parent": null, "vector": [3, 0, 0.9403, 0.0165, 0, 0.66, 0.92, 532, 0, 1, 0, 0, 135, 0, 1], "semantic": {"name": "LongCompile_CompilerSettingsTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class LongCompile_CompilerSettingsTest(LongCompileTest):\n def compile(self, template):\n return Cheetah.Template.Template.compile(template, keepRefToGeneratedCode=False,\n compilerSettings={'useStackFrames' : True, 'useAutocalling' : True})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L228_C4", "label": "compile", "type": "function", "loc": [228, 230], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L227_C0", "vector": [2, 1, 0.9424, 0.0123, 1, 0.76, 0.0, 821, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "compile", "arg_names": ["self", "template"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def compile(self, template):\n return Cheetah.Template.Template.compile(template, keepRefToGeneratedCode=False,\n compilerSettings={'useStackFrames' : True, 'useAutocalling' : True})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Return_L229_C8", "label": "return", "type": "return", "loc": [229, 230], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L228_C4", "vector": [13, 2, 0.9444, 0.0082, 2, 0.17, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return Cheetah.Template.Template.compile(template, keepRefToGeneratedCode=False,\n compilerSettings={'useStackFrames' : True, 'useAutocalling' : True})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L232_C0", "label": "LongCompileAndRun", "type": "class", "loc": [232, 236], "level": 0, "parent": null, "vector": [3, 0, 0.963, 0.0206, 0, 0.66, 0.96, 602, 0, 1, 0, 0, 135, 0, 4], "semantic": {"name": "LongCompileAndRun", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class LongCompileAndRun(LongCompileTest):\n def performanceSample(self):\n template = super(LongCompileAndRun, self).performanceSample()\n template = template(searchList=[{'title' : 'foo'}])\n template = template.respond()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L233_C4", "label": "performanceSample", "type": "function", "loc": [233, 236], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L232_C0", "vector": [2, 1, 0.965, 0.0165, 1, 0.96, 0.0, 510, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "performanceSample", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def performanceSample(self):\n template = super(LongCompileAndRun, self).performanceSample()\n template = template(searchList=[{'title' : 'foo'}])\n template = template.respond()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L234_C8", "label": "template = performanceSample()", "type": "assigned_variable", "loc": [234, 234], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L233_C4", "vector": [14, 2, 0.963, 0.0041, 2, 0.92, 0.0, 549, 3, 0, 0, 0, 510, 10, 2], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "performanceSample", "annotation": ""}, "snippet": " template = super(LongCompileAndRun, self).performanceSample()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L235_C8", "label": "template = template()", "type": "assigned_variable", "loc": [235, 235], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L233_C4", "vector": [14, 2, 0.9671, 0.0041, 2, 0.92, 0.5, 549, 3, 1, 0, 0, 549, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "template", "annotation": ""}, "snippet": " template = template(searchList=[{'title' : 'foo'}])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L236_C8", "label": "template = respond()", "type": "assigned_variable", "loc": [236, 236], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L233_C4", "vector": [14, 2, 0.9712, 0.0041, 2, 0.92, 1.0, 549, 3, 0, 0, 0, 100, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "respond", "annotation": ""}, "snippet": " template = template.respond()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L239_C0", "label": "if", "type": "if", "loc": [239, 243], "level": 0, "parent": null, "vector": [4, 0, 0.9918, 0.0206, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n if '--debug' in sys.argv:\n DEBUG = True\n sys.argv = [arg for arg in sys.argv if not arg == '--debug']\n unittest.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L240_C4", "label": "if", "type": "if", "loc": [240, 242], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L239_C0", "vector": [4, 1, 0.9918, 0.0123, 1, 0.43, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if '--debug' in sys.argv:\n DEBUG = True\n sys.argv = [arg for arg in sys.argv if not arg == '--debug']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L241_C8", "label": "DEBUG =", "type": "assigned_variable", "loc": [241, 241], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L240_C4", "vector": [14, 2, 0.9918, 0.0041, 2, 0.71, 0.0, 309, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "DEBUG", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " DEBUG = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L242_C8", "label": "sys.argv =", "type": "assigned_variable", "loc": [242, 242], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L240_C4", "vector": [14, 2, 0.9959, 0.0041, 2, 0.71, 1.0, 668, 5, 0, 0, 0, 0, 0, 0], "semantic": {"name": "sys.argv", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sys.argv = [arg for arg in sys.argv if not arg == '--debug']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L243_C4", "label": "main()", "type": "expression", "loc": [243, 243], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L239_C0", "vector": [8, 1, 1.0, 0.0041, 1, 0.43, 1.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " unittest.main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Return_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L40_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L43_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L44_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L47_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L48_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L47_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Try_L49_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:Try_L49_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Return_L50_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:Try_L49_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L52_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:Try_L49_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L53_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L53_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L54_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L53_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L56_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L53_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L57_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:Try_L49_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L59_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L59_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L60_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L59_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L63_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Return_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Return_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L73_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L75_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L75_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:For_L81_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:For_L81_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L82_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L84_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L86_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L87_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L86_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L88_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L86_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L86_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L91_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L91_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L91_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L93_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L91_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:For_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:For_L94_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L95_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L95_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L96_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L95_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L97_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L91_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L98_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L91_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L91_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L100_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L100_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L101_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L100_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L103_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L100_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L105_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L100_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L106_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L91_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L108_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L109_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L112_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L112_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L113_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L112_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L121_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L112_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L123_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L112_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L124_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L127_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L128_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L127_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L129_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L129_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L130_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L129_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L137_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L129_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L139_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L129_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L143_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L144_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L144_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L145_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L144_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L154_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L144_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L156_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L144_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L157_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L160_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L161_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L160_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L162_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L162_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L163_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L162_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L164_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L162_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L171_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L162_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L173_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L160_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L175_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L175_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L176_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L179_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L180_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L179_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L181_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L181_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Return_L182_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L179_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L184_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L184_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L185_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L184_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Return_L225_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L227_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L228_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L228_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Return_L229_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:ClassDef_L232_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L233_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L234_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L235_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L236_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L239_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L240_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L240_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L241_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L240_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Assign_L242_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1490:If_L239_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1490:Expr_L243_C4"}]
#!/usr/bin/env python import unittest from Cheetah import DirectiveAnalyzer class AnalyzerTests(unittest.TestCase): def test_set(self): template = ''' #set $foo = "bar" Hello ${foo}! ''' calls = DirectiveAnalyzer.analyze(template) self.assertEquals(1, calls.get('set')) def test_compilersettings(self): template = ''' #compiler-settings useNameMapper = False #end compiler-settings ''' calls = DirectiveAnalyzer.analyze(template) self.assertEquals(1, calls.get('compiler-settings')) if __name__ == '__main__': unittest.main()
ajibawa-2023/Python-Code-Large/train/row_1491
13
29
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1491:Import_L3_C0", "label": "unittest import unittest", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1034, 0.0345, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], "rhs_call_name": "", "annotation": ""}, "snippet": "import unittest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1491:ImportFrom_L5_C0", "label": "from Cheetah import DirectiveAnalyzer", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1724, 0.0345, 0, 0.66, 0.3333, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "Cheetah", "arg_names": [], "import_names": ["DirectiveAnalyzer"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah import DirectiveAnalyzer"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1491:ClassDef_L8_C0", "label": "AnalyzerTests", "type": "class", "loc": [8, 24], "level": 0, "parent": null, "vector": [3, 0, 0.5517, 0.5862, 0, 0.66, 0.6667, 491, 0, 2, 0, 0, 878, 0, 6], "semantic": {"name": "AnalyzerTests", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class AnalyzerTests(unittest.TestCase):\n def test_set(self):\n template = '''\n #set $foo = \"bar\"\n Hello ${foo}!\n '''\n calls = DirectiveAnalyzer.analyze(template)\n self.assertEquals(1, calls.get('set'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1491:FunctionDef_L9_C4", "label": "test_set", "type": "function", "loc": [9, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1491:ClassDef_L8_C0", "vector": [2, 1, 0.4138, 0.2414, 1, 0.71, 0.0, 974, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "test_set", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_set(self):\n template = '''\n #set $foo = \"bar\"\n Hello ${foo}!\n '''\n calls = DirectiveAnalyzer.analyze(template)\n self.assertEquals(1, calls.get('set'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1491:Assign_L10_C8", "label": "template =", "type": "assigned_variable", "loc": [10, 13], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1491:FunctionDef_L9_C4", "vector": [14, 2, 0.3966, 0.1379, 2, 0.27, 0.0, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n #set $foo = \"bar\"\n Hello ${foo}!\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1491:Assign_L14_C8", "label": "calls = analyze()", "type": "assigned_variable", "loc": [14, 14], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1491:FunctionDef_L9_C4", "vector": [14, 2, 0.4828, 0.0345, 2, 0.27, 0.5, 858, 3, 1, 0, 0, 199, 10, 1], "semantic": {"name": "calls", "arg_names": [], "import_names": [], "rhs_call_name": "analyze", "annotation": ""}, "snippet": " calls = DirectiveAnalyzer.analyze(template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1491:Expr_L15_C8", "label": "assertEquals()", "type": "expression", "loc": [15, 15], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1491:FunctionDef_L9_C4", "vector": [8, 2, 0.5172, 0.0345, 2, 0.27, 1.0, 60, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "assertEquals", "arg_names": [], "import_names": [], "rhs_call_name": "assertEquals", "annotation": ""}, "snippet": " self.assertEquals(1, calls.get('set'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1491:FunctionDef_L17_C4", "label": "test_compilersettings", "type": "function", "loc": [17, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1491:ClassDef_L8_C0", "vector": [2, 1, 0.7069, 0.2759, 1, 0.71, 1.0, 874, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "test_compilersettings", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_compilersettings(self):\n template = '''\n#compiler-settings\nuseNameMapper = False\n#end compiler-settings\n '''\n calls = DirectiveAnalyzer.analyze(template)\n self.assertEquals(1, calls.get('compiler-settings'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1491:Assign_L18_C8", "label": "template =", "type": "assigned_variable", "loc": [18, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1491:FunctionDef_L17_C4", "vector": [14, 2, 0.6897, 0.1724, 2, 0.59, 0.0, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n#compiler-settings\nuseNameMapper = False\n#end compiler-settings\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1491:Assign_L23_C8", "label": "calls = analyze()", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1491:FunctionDef_L17_C4", "vector": [14, 2, 0.7931, 0.0345, 2, 0.59, 0.5, 858, 3, 1, 0, 0, 199, 10, 1], "semantic": {"name": "calls", "arg_names": [], "import_names": [], "rhs_call_name": "analyze", "annotation": ""}, "snippet": " calls = DirectiveAnalyzer.analyze(template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1491:Expr_L24_C8", "label": "assertEquals()", "type": "expression", "loc": [24, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1491:FunctionDef_L17_C4", "vector": [8, 2, 0.8276, 0.0345, 2, 0.59, 1.0, 60, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "assertEquals", "arg_names": [], "import_names": [], "rhs_call_name": "assertEquals", "annotation": ""}, "snippet": " self.assertEquals(1, calls.get('compiler-settings'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1491:If_L27_C0", "label": "if", "type": "if", "loc": [27, 28], "level": 0, "parent": null, "vector": [4, 0, 0.9483, 0.069, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n unittest.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1491:Expr_L28_C4", "label": "main()", "type": "expression", "loc": [28, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1491:If_L27_C0", "vector": [8, 1, 0.9655, 0.0345, 1, 0.81, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " unittest.main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1491:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1491:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1491:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1491:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1491:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1491:Assign_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1491:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1491:Expr_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1491:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1491:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1491:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1491:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1491:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1491:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1491:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1491:Expr_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1491:If_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1491:Expr_L28_C4"}]
#!/usr/bin/env python import unittest from Cheetah import SettingsManager class SettingsManagerTests(unittest.TestCase): def test_mergeDictionaries(self): left = {'foo' : 'bar', 'abc' : {'a' : 1, 'b' : 2, 'c' : (3,)}} right = {'xyz' : (10, 9)} expect = {'xyz': (10, 9), 'foo': 'bar', 'abc': {'a': 1, 'c': (3,), 'b': 2}} result = SettingsManager.mergeNestedDictionaries(left, right) self.assertEquals(result, expect) if __name__ == '__main__': unittest.main()
ajibawa-2023/Python-Code-Large/train/row_1493
11
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1493:Import_L3_C0", "label": "unittest import unittest", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.15, 0.05, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], "rhs_call_name": "", "annotation": ""}, "snippet": "import unittest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1493:ImportFrom_L5_C0", "label": "from Cheetah import SettingsManager", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.05, 0, 0.66, 0.3333, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "Cheetah", "arg_names": [], "import_names": ["SettingsManager"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah import SettingsManager"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1493:ClassDef_L8_C0", "label": "SettingsManagerTests", "type": "class", "loc": [8, 15], "level": 0, "parent": null, "vector": [3, 0, 0.575, 0.4, 0, 0.66, 0.6667, 450, 0, 1, 0, 0, 878, 0, 2], "semantic": {"name": "SettingsManagerTests", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class SettingsManagerTests(unittest.TestCase):\n def test_mergeDictionaries(self):\n left = {'foo' : 'bar', 'abc' : {'a' : 1, 'b' : 2, 'c' : (3,)}}\n right = {'xyz' : (10, 9)}\n expect = {'xyz': (10, 9), 'foo': 'bar', 'abc': {'a': 1, 'c': (3,), 'b': 2}}\n\n result = SettingsManager.mergeNestedDictionaries(left, right)\n self.assertEquals(result, expect)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1493:FunctionDef_L9_C4", "label": "test_mergeDictionaries", "type": "function", "loc": [9, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1493:ClassDef_L8_C0", "vector": [2, 1, 0.6, 0.35, 1, 0.17, 0.0, 726, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test_mergeDictionaries", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_mergeDictionaries(self):\n left = {'foo' : 'bar', 'abc' : {'a' : 1, 'b' : 2, 'c' : (3,)}}\n right = {'xyz' : (10, 9)}\n expect = {'xyz': (10, 9), 'foo': 'bar', 'abc': {'a': 1, 'c': (3,), 'b': 2}}\n\n result = SettingsManager.mergeNestedDictionaries(left, right)\n self.assertEquals(result, expect)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1493:Assign_L10_C8", "label": "left =", "type": "assigned_variable", "loc": [10, 10], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1493:FunctionDef_L9_C4", "vector": [14, 2, 0.5, 0.05, 2, 0.12, 0.0, 605, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "left", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " left = {'foo' : 'bar', 'abc' : {'a' : 1, 'b' : 2, 'c' : (3,)}}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1493:Assign_L11_C8", "label": "right =", "type": "assigned_variable", "loc": [11, 11], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1493:FunctionDef_L9_C4", "vector": [14, 2, 0.55, 0.05, 2, 0.12, 0.25, 724, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "right", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " right = {'xyz' : (10, 9)}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1493:Assign_L12_C8", "label": "expect =", "type": "assigned_variable", "loc": [12, 12], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1493:FunctionDef_L9_C4", "vector": [14, 2, 0.6, 0.05, 2, 0.12, 0.5, 754, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "expect", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expect = {'xyz': (10, 9), 'foo': 'bar', 'abc': {'a': 1, 'c': (3,), 'b': 2}}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1493:Assign_L14_C8", "label": "result = mergeNestedDictionaries()", "type": "assigned_variable", "loc": [14, 14], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1493:FunctionDef_L9_C4", "vector": [14, 2, 0.7, 0.05, 2, 0.12, 0.75, 51, 3, 2, 0, 0, 645, 10, 1], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "mergeNestedDictionaries", "annotation": ""}, "snippet": " result = SettingsManager.mergeNestedDictionaries(left, right)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1493:Expr_L15_C8", "label": "assertEquals()", "type": "expression", "loc": [15, 15], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1493:FunctionDef_L9_C4", "vector": [8, 2, 0.75, 0.05, 2, 0.12, 1.0, 60, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEquals", "arg_names": [], "import_names": [], "rhs_call_name": "assertEquals", "annotation": ""}, "snippet": " self.assertEquals(result, expect)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1493:If_L18_C0", "label": "if", "type": "if", "loc": [18, 19], "level": 0, "parent": null, "vector": [4, 0, 0.925, 0.1, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n unittest.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1493:Expr_L19_C4", "label": "main()", "type": "expression", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1493:If_L18_C0", "vector": [8, 1, 0.95, 0.05, 1, 0.04, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " unittest.main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1493:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1493:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1493:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1493:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1493:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1493:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1493:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1493:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1493:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1493:Assign_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1493:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1493:Expr_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1493:If_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1493:Expr_L19_C4"}]
#
ajibawa-2023/Python-Code-Large/train/row_1494
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
#!/usr/bin/env python import Cheetah.NameMapper import Cheetah.Template import sys import unittest majorVer, minorVer = sys.version_info[0], sys.version_info[1] versionTuple = (majorVer, minorVer) def isPython23(): ''' Python 2.3 is still supported by Cheetah, but doesn't support decorators ''' return majorVer == 2 and minorVer < 4 class GetAttrException(Exception): pass class CustomGetAttrClass(object): def __getattr__(self, name): raise GetAttrException('FAIL, %s' % name) class GetAttrTest(unittest.TestCase): ''' Test for an issue occurring when __getatttr__() raises an exception causing NameMapper to raise a NotFound exception ''' def test_ValidException(self): o = CustomGetAttrClass() try: print(o.attr) except GetAttrException, e: # expected return except: self.fail('Invalid exception raised: %s' % e) self.fail('Should have had an exception raised') def test_NotFoundException(self): template = ''' #def raiseme() $obj.attr #end def''' template = Cheetah.Template.Template.compile(template, compilerSettings={}, keepRefToGeneratedCode=True) template = template(searchList=[{'obj' : CustomGetAttrClass()}]) assert template, 'We should have a valid template object by now' self.failUnlessRaises(GetAttrException, template.raiseme) class InlineImportTest(unittest.TestCase): def test_FromFooImportThing(self): ''' Verify that a bug introduced in v2.1.0 where an inline: #from module import class would result in the following code being generated: import class ''' template = ''' #def myfunction() #if True #from os import path #return 17 Hello! #end if #end def ''' template = Cheetah.Template.Template.compile(template, compilerSettings={'useLegacyImportMode' : False}, keepRefToGeneratedCode=True) template = template(searchList=[{}]) assert template, 'We should have a valid template object by now' rc = template.myfunction() assert rc == 17, (template, 'Didn\'t get a proper return value') def test_ImportFailModule(self): template = ''' #try #import invalidmodule #except #set invalidmodule = dict(FOO='BAR!') #end try $invalidmodule.FOO ''' template = Cheetah.Template.Template.compile(template, compilerSettings={'useLegacyImportMode' : False}, keepRefToGeneratedCode=True) template = template(searchList=[{}]) assert template, 'We should have a valid template object by now' assert str(template), 'We weren\'t able to properly generate the result from the template' def test_ProperImportOfBadModule(self): template = ''' #from invalid import fail This should totally $fail ''' self.failUnlessRaises(ImportError, Cheetah.Template.Template.compile, template, compilerSettings={'useLegacyImportMode' : False}, keepRefToGeneratedCode=True) def test_AutoImporting(self): template = ''' #extends FakeyTemplate Boo! ''' self.failUnlessRaises(ImportError, Cheetah.Template.Template.compile, template) def test_StuffBeforeImport_Legacy(self): template = ''' ### ### I like comments before import ### #extends Foo Bar ''' self.failUnlessRaises(ImportError, Cheetah.Template.Template.compile, template, compilerSettings={'useLegacyImportMode' : True}, keepRefToGeneratedCode=True) class Mantis_Issue_11_Regression_Test(unittest.TestCase): ''' Test case for bug outlined in Mantis issue #11: Output: Traceback (most recent call last): File "test.py", line 12, in <module> t.respond() File "DynamicallyCompiledCheetahTemplate.py", line 86, in respond File "/usr/lib64/python2.6/cgi.py", line 1035, in escape s = s.replace("&", "&") # Must be done first! ''' def test_FailingBehavior(self): import cgi template = Cheetah.Template.Template("$escape($request)", searchList=[{'escape' : cgi.escape, 'request' : 'foobar'}]) assert template self.failUnlessRaises(AttributeError, template.respond) def test_FailingBehaviorWithSetting(self): import cgi template = Cheetah.Template.Template("$escape($request)", searchList=[{'escape' : cgi.escape, 'request' : 'foobar'}], compilerSettings={'prioritizeSearchListOverSelf' : True}) assert template assert template.respond() class Mantis_Issue_21_Regression_Test(unittest.TestCase): ''' Test case for bug outlined in issue #21 Effectively @staticmethod and @classmethod decorated methods in templates don't properly define the _filter local, which breaks when using the NameMapper ''' def runTest(self): if isPython23(): return template = ''' #@staticmethod #def testMethod() This is my $output #end def ''' template = Cheetah.Template.Template.compile(template) assert template assert template.testMethod(output='bug') # raises a NameError: global name '_filter' is not defined class Mantis_Issue_22_Regression_Test(unittest.TestCase): ''' Test case for bug outlined in issue #22 When using @staticmethod and @classmethod in conjunction with the #filter directive the generated code for the #filter is reliant on the `self` local, breaking the function ''' def test_NoneFilter(self): # XXX: Disabling this test for now return if isPython23(): return template = ''' #@staticmethod #def testMethod() #filter None This is my $output #end filter #end def ''' template = Cheetah.Template.Template.compile(template) assert template assert template.testMethod(output='bug') def test_DefinedFilter(self): # XXX: Disabling this test for now return if isPython23(): return template = ''' #@staticmethod #def testMethod() #filter Filter This is my $output #end filter #end def ''' # The generated code for the template's testMethod() should look something # like this in the 'error' case: ''' @staticmethod def testMethod(**KWS): ## CHEETAH: generated from #def testMethod() at line 3, col 13. trans = DummyTransaction() _dummyTrans = True write = trans.response().write SL = [KWS] _filter = lambda x, **kwargs: unicode(x) ######################################## ## START - generated method body _orig_filter_18517345 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u' This is my ') _v = VFFSL(SL,"output",True) # u'$output' on line 5, col 32 if _v is not None: write(_filter(_v, rawExpr=u'$output')) # from line 5, col 32. ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ''' template = Cheetah.Template.Template.compile(template) assert template assert template.testMethod(output='bug') if __name__ == '__main__': unittest.main()
ajibawa-2023/Python-Code-Large/train/row_1495
79
246
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Import_L3_C0", "label": "Cheetah.NameMapper import Cheetah.NameMapper", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0122, 0.0041, 0, 0.66, 0.0, 308, 0, 1, 0, 0, 308, 0, 0], "semantic": {"name": "Cheetah.NameMapper", "arg_names": [], "import_names": ["Cheetah.NameMapper"], "rhs_call_name": "", "annotation": ""}, "snippet": "import Cheetah.NameMapper "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Import_L4_C0", "label": "Cheetah.Template import Cheetah.Template", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0163, 0.0041, 0, 0.66, 0.0714, 171, 0, 1, 0, 0, 171, 0, 0], "semantic": {"name": "Cheetah.Template", "arg_names": [], "import_names": ["Cheetah.Template"], "rhs_call_name": "", "annotation": ""}, "snippet": "import Cheetah.Template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Import_L6_C0", "label": "sys import sys", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0244, 0.0041, 0, 0.66, 0.1429, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Import_L7_C0", "label": "unittest import unittest", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0285, 0.0041, 0, 0.66, 0.2143, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], "rhs_call_name": "", "annotation": ""}, "snippet": "import unittest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L10_C0", "label": "majorVer, minorVer =", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.0407, 0.0041, 0, 0.66, 0.2857, 35, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "majorVer, minorVer", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "majorVer, minorVer = sys.version_info[0], sys.version_info[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L11_C0", "label": "versionTuple =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.0447, 0.0041, 0, 0.66, 0.3571, 494, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "versionTuple", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "versionTuple = (majorVer, minorVer)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L13_C0", "label": "isPython23", "type": "function", "loc": [13, 15], "level": 0, "parent": null, "vector": [2, 0, 0.0569, 0.0122, 0, 0.66, 0.4286, 353, 0, 0, 1, 0, 0, 0, 0], "semantic": {"name": "isPython23", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def isPython23():\n ''' Python 2.3 is still supported by Cheetah, but doesn't support decorators '''\n return majorVer == 2 and minorVer < 4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L14_C4", "label": "expression", "type": "expression", "loc": [14, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L13_C0", "vector": [8, 1, 0.0569, 0.0041, 1, 0.82, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ''' Python 2.3 is still supported by Cheetah, but doesn't support decorators '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Return_L15_C4", "label": "return", "type": "return", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L13_C0", "vector": [13, 1, 0.061, 0.0041, 1, 0.82, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return majorVer == 2 and minorVer < 4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L17_C0", "label": "GetAttrException", "type": "class", "loc": [17, 18], "level": 0, "parent": null, "vector": [3, 0, 0.0711, 0.0081, 0, 0.66, 0.5, 787, 0, 0, 0, 0, 645, 0, 0], "semantic": {"name": "GetAttrException", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class GetAttrException(Exception):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L20_C0", "label": "CustomGetAttrClass", "type": "class", "loc": [20, 22], "level": 0, "parent": null, "vector": [3, 0, 0.0854, 0.0122, 0, 0.66, 0.5714, 760, 0, 1, 0, 0, 186, 0, 1], "semantic": {"name": "CustomGetAttrClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CustomGetAttrClass(object):\n def __getattr__(self, name):\n raise GetAttrException('FAIL, %s' % name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L21_C4", "label": "__getattr__", "type": "function", "loc": [21, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L20_C0", "vector": [2, 1, 0.0874, 0.0081, 1, 0.43, 0.0, 210, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__getattr__", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __getattr__(self, name):\n raise GetAttrException('FAIL, %s' % name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L24_C0", "label": "GetAttrTest", "type": "class", "loc": [24, 49], "level": 0, "parent": null, "vector": [3, 0, 0.1484, 0.1057, 0, 0.66, 0.6429, 441, 0, 2, 0, 0, 878, 0, 8], "semantic": {"name": "GetAttrTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class GetAttrTest(unittest.TestCase):\n '''\n Test for an issue occurring when __getatttr__() raises an exception\n causing NameMapper to raise a NotFound exception\n '''\n def test_ValidException(self):\n o = CustomGetAttrClass()\n try:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L25_C4", "label": "expression", "type": "expression", "loc": [25, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L24_C0", "vector": [8, 1, 0.1077, 0.0163, 1, 0.25, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Test for an issue occurring when __getatttr__() raises an exception\n causing NameMapper to raise a NotFound exception\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L29_C4", "label": "test_ValidException", "type": "function", "loc": [29, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L24_C0", "vector": [2, 1, 0.1341, 0.0366, 1, 0.25, 0.5, 831, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "test_ValidException", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_ValidException(self):\n o = CustomGetAttrClass()\n try:\n print(o.attr)\n # expected\n return\n except:\n self.fail('Invalid exception raised: %s' % e)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L30_C8", "label": "o = CustomGetAttrClass()", "type": "assigned_variable", "loc": [30, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L29_C4", "vector": [14, 2, 0.122, 0.0041, 2, 0.23, 0.0, 926, 3, 0, 0, 0, 760, 10, 1], "semantic": {"name": "o", "arg_names": [], "import_names": [], "rhs_call_name": "CustomGetAttrClass", "annotation": ""}, "snippet": " o = CustomGetAttrClass()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Try_L31_C8", "label": "try", "type": "try", "loc": [31, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L29_C4", "vector": [7, 2, 0.1362, 0.0244, 2, 0.23, 0.5, 0, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n print(o.attr)\n # expected\n return\n except:\n self.fail('Invalid exception raised: %s' % e)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L32_C12", "label": "print()", "type": "expression", "loc": [32, 32], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:Try_L31_C8", "vector": [8, 3, 0.1301, 0.0041, 3, 0.63, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(o.attr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Return_L34_C12", "label": "return", "type": "return", "loc": [34, 34], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:Try_L31_C8", "vector": [13, 3, 0.1382, 0.0041, 3, 0.63, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L36_C12", "label": "fail()", "type": "expression", "loc": [36, 36], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:Try_L31_C8", "vector": [8, 3, 0.1463, 0.0041, 3, 0.63, 0.0, 364, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "fail", "arg_names": [], "import_names": [], "rhs_call_name": "fail", "annotation": ""}, "snippet": " self.fail('Invalid exception raised: %s' % e)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L37_C8", "label": "fail()", "type": "expression", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L29_C4", "vector": [8, 2, 0.1504, 0.0041, 2, 0.23, 1.0, 364, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "fail", "arg_names": [], "import_names": [], "rhs_call_name": "fail", "annotation": ""}, "snippet": " self.fail('Should have had an exception raised')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L39_C4", "label": "test_NotFoundException", "type": "function", "loc": [39, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L24_C0", "vector": [2, 1, 0.1789, 0.0447, 1, 0.25, 1.0, 297, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "test_NotFoundException", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_NotFoundException(self):\n template = '''\n #def raiseme()\n $obj.attr\n #end def'''\n\n template = Cheetah.Template.Template.compile(template, compilerSettings={}, keepRefToGeneratedCode=True)\n template = template(searchList=[{'obj' : CustomGetAttrClass()}])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L40_C8", "label": "template =", "type": "assigned_variable", "loc": [40, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L39_C4", "vector": [14, 2, 0.1687, 0.0163, 2, 0.62, 0.0, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n #def raiseme()\n $obj.attr\n #end def'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L45_C8", "label": "template = compile()", "type": "assigned_variable", "loc": [45, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L39_C4", "vector": [14, 2, 0.1829, 0.0041, 2, 0.62, 0.3333, 549, 3, 3, 0, 0, 821, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " template = Cheetah.Template.Template.compile(template, compilerSettings={}, keepRefToGeneratedCode=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L46_C8", "label": "template = template()", "type": "assigned_variable", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L39_C4", "vector": [14, 2, 0.187, 0.0041, 2, 0.62, 0.6667, 549, 3, 1, 0, 0, 549, 10, 2], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "template", "annotation": ""}, "snippet": " template = template(searchList=[{'obj' : CustomGetAttrClass()}])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L49_C8", "label": "failUnlessRaises()", "type": "expression", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L39_C4", "vector": [8, 2, 0.1992, 0.0041, 2, 0.62, 1.0, 223, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "failUnlessRaises", "arg_names": [], "import_names": [], "rhs_call_name": "failUnlessRaises", "annotation": ""}, "snippet": " self.failUnlessRaises(GetAttrException, template.raiseme)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L52_C0", "label": "InlineImportTest", "type": "class", "loc": [52, 117], "level": 0, "parent": null, "vector": [3, 0, 0.3435, 0.2683, 0, 0.66, 0.7143, 176, 0, 5, 0, 0, 878, 0, 9], "semantic": {"name": "InlineImportTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class InlineImportTest(unittest.TestCase):\n def test_FromFooImportThing(self):\n '''\n Verify that a bug introduced in v2.1.0 where an inline:\n #from module import class\n would result in the following code being generated:\n import class\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L53_C4", "label": "test_FromFooImportThing", "type": "function", "loc": [53, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L52_C0", "vector": [2, 1, 0.2602, 0.0935, 1, 0.97, 0.0, 813, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "test_FromFooImportThing", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_FromFooImportThing(self):\n '''\n Verify that a bug introduced in v2.1.0 where an inline:\n #from module import class\n would result in the following code being generated:\n import class\n '''\n template = '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L54_C8", "label": "expression", "type": "expression", "loc": [54, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L53_C4", "vector": [8, 2, 0.2297, 0.0244, 2, 0.63, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Verify that a bug introduced in v2.1.0 where an inline:\n #from module import class\n would result in the following code being generated:\n import class\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L60_C8", "label": "template =", "type": "assigned_variable", "loc": [60, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L53_C4", "vector": [14, 2, 0.2602, 0.0366, 2, 0.63, 0.25, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n #def myfunction()\n #if True\n #from os import path\n #return 17\n Hello!\n #end if\n #end def"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L69_C8", "label": "template = compile()", "type": "assigned_variable", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L53_C4", "vector": [14, 2, 0.2805, 0.0041, 2, 0.63, 0.5, 549, 3, 3, 0, 0, 821, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " template = Cheetah.Template.Template.compile(template, compilerSettings={'useLegacyImportMode' : False}, keepRefToGeneratedCode=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L70_C8", "label": "template = template()", "type": "assigned_variable", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L53_C4", "vector": [14, 2, 0.2846, 0.0041, 2, 0.63, 0.75, 549, 3, 1, 0, 0, 549, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "template", "annotation": ""}, "snippet": " template = template(searchList=[{}])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L74_C8", "label": "rc = myfunction()", "type": "assigned_variable", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L53_C4", "vector": [14, 2, 0.3008, 0.0041, 2, 0.63, 1.0, 401, 3, 0, 0, 0, 204, 10, 1], "semantic": {"name": "rc", "arg_names": [], "import_names": [], "rhs_call_name": "myfunction", "annotation": ""}, "snippet": " rc = template.myfunction()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L77_C4", "label": "test_ImportFailModule", "type": "function", "loc": [77, 91], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L52_C0", "vector": [2, 1, 0.3415, 0.061, 1, 0.97, 0.25, 465, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "test_ImportFailModule", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_ImportFailModule(self):\n template = '''\n #try\n #import invalidmodule\n #except\n #set invalidmodule = dict(FOO='BAR!')\n #end try\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L78_C8", "label": "template =", "type": "assigned_variable", "loc": [78, 86], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L77_C4", "vector": [14, 2, 0.3333, 0.0366, 2, 0.84, 0.0, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n #try\n #import invalidmodule\n #except\n #set invalidmodule = dict(FOO='BAR!')\n #end try\n\n $invalidmodule.FOO"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L87_C8", "label": "template = compile()", "type": "assigned_variable", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L77_C4", "vector": [14, 2, 0.3537, 0.0041, 2, 0.84, 0.5, 549, 3, 3, 0, 0, 821, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " template = Cheetah.Template.Template.compile(template, compilerSettings={'useLegacyImportMode' : False}, keepRefToGeneratedCode=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L88_C8", "label": "template = template()", "type": "assigned_variable", "loc": [88, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L77_C4", "vector": [14, 2, 0.3577, 0.0041, 2, 0.84, 1.0, 549, 3, 1, 0, 0, 549, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "template", "annotation": ""}, "snippet": " template = template(searchList=[{}])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L93_C4", "label": "test_ProperImportOfBadModule", "type": "function", "loc": [93, 99], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L52_C0", "vector": [2, 1, 0.3902, 0.0285, 1, 0.97, 0.5, 24, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test_ProperImportOfBadModule", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_ProperImportOfBadModule(self):\n template = '''\n #from invalid import fail\n \n This should totally $fail\n '''\n self.failUnlessRaises(ImportError, Cheetah.Template.Template.compile, template, compilerSettings={'useLegacyImportMode' : False}, keepRefToGeneratedCode=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L94_C8", "label": "template =", "type": "assigned_variable", "loc": [94, 98], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L93_C4", "vector": [14, 2, 0.3902, 0.0203, 2, 0.16, 0.0, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n #from invalid import fail\n \n This should totally $fail\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L99_C8", "label": "failUnlessRaises()", "type": "expression", "loc": [99, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L93_C4", "vector": [8, 2, 0.4024, 0.0041, 2, 0.16, 1.0, 223, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "failUnlessRaises", "arg_names": [], "import_names": [], "rhs_call_name": "failUnlessRaises", "annotation": ""}, "snippet": " self.failUnlessRaises(ImportError, Cheetah.Template.Template.compile, template, compilerSettings={'useLegacyImportMode' : False}, keepRefToGeneratedCode=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L101_C4", "label": "test_AutoImporting", "type": "function", "loc": [101, 107], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L52_C0", "vector": [2, 1, 0.4228, 0.0285, 1, 0.97, 0.75, 348, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test_AutoImporting", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_AutoImporting(self):\n template = '''\n #extends FakeyTemplate\n\n Boo!\n '''\n self.failUnlessRaises(ImportError, Cheetah.Template.Template.compile, template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L102_C8", "label": "template =", "type": "assigned_variable", "loc": [102, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L101_C4", "vector": [14, 2, 0.4228, 0.0203, 2, 0.43, 0.0, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n #extends FakeyTemplate\n\n Boo!\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L107_C8", "label": "failUnlessRaises()", "type": "expression", "loc": [107, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L101_C4", "vector": [8, 2, 0.435, 0.0041, 2, 0.43, 1.0, 223, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "failUnlessRaises", "arg_names": [], "import_names": [], "rhs_call_name": "failUnlessRaises", "annotation": ""}, "snippet": " self.failUnlessRaises(ImportError, Cheetah.Template.Template.compile, template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L109_C4", "label": "test_StuffBeforeImport_Legacy", "type": "function", "loc": [109, 117], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L52_C0", "vector": [2, 1, 0.4593, 0.0366, 1, 0.97, 1.0, 73, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test_StuffBeforeImport_Legacy", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_StuffBeforeImport_Legacy(self):\n template = '''\n###\n### I like comments before import\n###\n#extends Foo\nBar\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L110_C8", "label": "template =", "type": "assigned_variable", "loc": [110, 116], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L109_C4", "vector": [14, 2, 0.4593, 0.0285, 2, 0.38, 0.0, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n###\n### I like comments before import\n###\n#extends Foo\nBar\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L117_C8", "label": "failUnlessRaises()", "type": "expression", "loc": [117, 117], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L109_C4", "vector": [8, 2, 0.4756, 0.0041, 2, 0.38, 1.0, 223, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "failUnlessRaises", "arg_names": [], "import_names": [], "rhs_call_name": "failUnlessRaises", "annotation": ""}, "snippet": " self.failUnlessRaises(ImportError, Cheetah.Template.Template.compile, template, compilerSettings={'useLegacyImportMode' : True}, keepRefToGeneratedCode=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L120_C0", "label": "Mantis_Issue_11_Regression_Test", "type": "class", "loc": [120, 145], "level": 0, "parent": null, "vector": [3, 0, 0.5386, 0.1057, 0, 0.66, 0.7857, 395, 0, 2, 0, 0, 878, 0, 4], "semantic": {"name": "Mantis_Issue_11_Regression_Test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Mantis_Issue_11_Regression_Test(unittest.TestCase):\n ''' \n Test case for bug outlined in Mantis issue #11:\n \n Output:\n Traceback (most recent call last):\n File \"test.py\", line 12, in <module>\n t.respond()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L121_C4", "label": "expression", "type": "expression", "loc": [121, 131], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L120_C0", "vector": [8, 1, 0.5122, 0.0447, 1, 0.91, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ''' \n Test case for bug outlined in Mantis issue #11:\n \n Output:\n Traceback (most recent call last):\n File \"test.py\", line 12, in <module>\n t.respond()\n File \"DynamicallyCompiledCheetahTemplate.py\", line 86, in respond"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L132_C4", "label": "test_FailingBehavior", "type": "function", "loc": [132, 136], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L120_C0", "vector": [2, 1, 0.5447, 0.0203, 1, 0.91, 0.5, 178, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test_FailingBehavior", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_FailingBehavior(self):\n import cgi\n template = Cheetah.Template.Template(\"$escape($request)\", searchList=[{'escape' : cgi.escape, 'request' : 'foobar'}])\n assert template\n self.failUnlessRaises(AttributeError, template.respond)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Import_L133_C8", "label": "cgi import cgi", "type": "import", "loc": [133, 133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L132_C4", "vector": [1, 2, 0.5407, 0.0041, 2, 0.97, 0.0, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi"], "rhs_call_name": "", "annotation": ""}, "snippet": " import cgi"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L134_C8", "label": "template = Template()", "type": "assigned_variable", "loc": [134, 134], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L132_C4", "vector": [14, 2, 0.5447, 0.0041, 2, 0.97, 0.5, 549, 3, 2, 0, 0, 137, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "Template", "annotation": ""}, "snippet": " template = Cheetah.Template.Template(\"$escape($request)\", searchList=[{'escape' : cgi.escape, 'request' : 'foobar'}])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L136_C8", "label": "failUnlessRaises()", "type": "expression", "loc": [136, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L132_C4", "vector": [8, 2, 0.5528, 0.0041, 2, 0.97, 1.0, 223, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "failUnlessRaises", "arg_names": [], "import_names": [], "rhs_call_name": "failUnlessRaises", "annotation": ""}, "snippet": " self.failUnlessRaises(AttributeError, template.respond)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L139_C4", "label": "test_FailingBehaviorWithSetting", "type": "function", "loc": [139, 145], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L120_C0", "vector": [2, 1, 0.5772, 0.0285, 1, 0.91, 1.0, 617, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "test_FailingBehaviorWithSetting", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_FailingBehaviorWithSetting(self):\n import cgi\n template = Cheetah.Template.Template(\"$escape($request)\", \n searchList=[{'escape' : cgi.escape, 'request' : 'foobar'}], \n compilerSettings={'prioritizeSearchListOverSelf' : True})\n assert template\n assert template.respond()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Import_L140_C8", "label": "cgi import cgi", "type": "import", "loc": [140, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L139_C4", "vector": [1, 2, 0.5691, 0.0041, 2, 0.01, 0.0, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi"], "rhs_call_name": "", "annotation": ""}, "snippet": " import cgi"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L141_C8", "label": "template = Template()", "type": "assigned_variable", "loc": [141, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L139_C4", "vector": [14, 2, 0.5772, 0.0122, 2, 0.01, 1.0, 549, 3, 3, 0, 0, 137, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "Template", "annotation": ""}, "snippet": " template = Cheetah.Template.Template(\"$escape($request)\", \n searchList=[{'escape' : cgi.escape, 'request' : 'foobar'}], \n compilerSettings={'prioritizeSearchListOverSelf' : True})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L147_C0", "label": "Mantis_Issue_21_Regression_Test", "type": "class", "loc": [147, 167], "level": 0, "parent": null, "vector": [3, 0, 0.6382, 0.0854, 0, 0.66, 0.8571, 173, 0, 1, 0, 0, 878, 0, 3], "semantic": {"name": "Mantis_Issue_21_Regression_Test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Mantis_Issue_21_Regression_Test(unittest.TestCase):\n ''' \n Test case for bug outlined in issue #21\n\n Effectively @staticmethod and @classmethod\n decorated methods in templates don't \n properly define the _filter local, which breaks\n when using the NameMapper"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L148_C4", "label": "expression", "type": "expression", "loc": [148, 155], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L147_C0", "vector": [8, 1, 0.6159, 0.0325, 1, 0.54, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ''' \n Test case for bug outlined in issue #21\n\n Effectively @staticmethod and @classmethod\n decorated methods in templates don't \n properly define the _filter local, which breaks\n when using the NameMapper\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L156_C4", "label": "runTest", "type": "function", "loc": [156, 167], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L147_C0", "vector": [2, 1, 0.6565, 0.0488, 1, 0.54, 1.0, 375, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "runTest", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def runTest(self):\n if isPython23():\n return\n template = '''\n #@staticmethod\n #def testMethod()\n This is my $output\n #end def"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:If_L157_C8", "label": "if", "type": "if", "loc": [157, 158], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L156_C4", "vector": [4, 2, 0.6402, 0.0081, 2, 0.72, 0.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isPython23():\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Return_L158_C12", "label": "return", "type": "return", "loc": [158, 158], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:If_L157_C8", "vector": [13, 3, 0.6423, 0.0041, 3, 0.56, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L159_C8", "label": "template =", "type": "assigned_variable", "loc": [159, 164], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L156_C4", "vector": [14, 2, 0.6565, 0.0244, 2, 0.72, 0.5, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n #@staticmethod\n #def testMethod()\n This is my $output\n #end def\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L165_C8", "label": "template = compile()", "type": "assigned_variable", "loc": [165, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L156_C4", "vector": [14, 2, 0.6707, 0.0041, 2, 0.72, 1.0, 549, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " template = Cheetah.Template.Template.compile(template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L170_C0", "label": "Mantis_Issue_22_Regression_Test", "type": "class", "loc": [170, 242], "level": 0, "parent": null, "vector": [3, 0, 0.8374, 0.2967, 0, 0.66, 0.9286, 874, 0, 2, 0, 0, 878, 0, 6], "semantic": {"name": "Mantis_Issue_22_Regression_Test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Mantis_Issue_22_Regression_Test(unittest.TestCase):\n ''' \n Test case for bug outlined in issue #22\n\n When using @staticmethod and @classmethod\n in conjunction with the #filter directive\n the generated code for the #filter is reliant\n on the `self` local, breaking the function"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L171_C4", "label": "expression", "type": "expression", "loc": [171, 178], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L170_C0", "vector": [8, 1, 0.7093, 0.0325, 1, 0.26, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ''' \n Test case for bug outlined in issue #22\n\n When using @staticmethod and @classmethod\n in conjunction with the #filter directive\n the generated code for the #filter is reliant\n on the `self` local, breaking the function\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L179_C4", "label": "test_NoneFilter", "type": "function", "loc": [179, 194], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L170_C0", "vector": [2, 1, 0.7581, 0.065, 1, 0.26, 0.5, 183, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "test_NoneFilter", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_NoneFilter(self):\n # XXX: Disabling this test for now\n return\n if isPython23():\n return\n template = '''\n #@staticmethod\n #def testMethod()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Return_L181_C8", "label": "return", "type": "return", "loc": [181, 181], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L179_C4", "vector": [13, 2, 0.7358, 0.0041, 2, 0.92, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:If_L182_C8", "label": "if", "type": "if", "loc": [182, 183], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L179_C4", "vector": [4, 2, 0.7419, 0.0081, 2, 0.92, 0.3333, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isPython23():\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Return_L183_C12", "label": "return", "type": "return", "loc": [183, 183], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:If_L182_C8", "vector": [13, 3, 0.7439, 0.0041, 3, 0.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L184_C8", "label": "template =", "type": "assigned_variable", "loc": [184, 191], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L179_C4", "vector": [14, 2, 0.7622, 0.0325, 2, 0.92, 0.6667, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n #@staticmethod\n #def testMethod()\n #filter None\n This is my $output\n #end filter\n #end def\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L192_C8", "label": "template = compile()", "type": "assigned_variable", "loc": [192, 192], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L179_C4", "vector": [14, 2, 0.7805, 0.0041, 2, 0.92, 1.0, 549, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " template = Cheetah.Template.Template.compile(template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L196_C4", "label": "test_DefinedFilter", "type": "function", "loc": [196, 242], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L170_C0", "vector": [2, 1, 0.8902, 0.1911, 1, 0.26, 1.0, 134, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "test_DefinedFilter", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_DefinedFilter(self):\n # XXX: Disabling this test for now\n return\n if isPython23():\n return\n template = '''\n #@staticmethod\n #def testMethod()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Return_L198_C8", "label": "return", "type": "return", "loc": [198, 198], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L196_C4", "vector": [13, 2, 0.8049, 0.0041, 2, 0.14, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:If_L199_C8", "label": "if", "type": "if", "loc": [199, 200], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L196_C4", "vector": [4, 2, 0.811, 0.0081, 2, 0.14, 0.25, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isPython23():\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Return_L200_C12", "label": "return", "type": "return", "loc": [200, 200], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:If_L199_C8", "vector": [13, 3, 0.813, 0.0041, 3, 0.39, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L201_C8", "label": "template =", "type": "assigned_variable", "loc": [201, 208], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L196_C4", "vector": [14, 2, 0.8313, 0.0325, 2, 0.14, 0.5, 549, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template = '''\n #@staticmethod\n #def testMethod()\n #filter Filter\n This is my $output\n #end filter\n #end def\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L211_C8", "label": "expression", "type": "expression", "loc": [211, 239], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L196_C4", "vector": [8, 2, 0.9146, 0.1179, 2, 0.14, 0.75, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n @staticmethod\n def testMethod(**KWS):\n ## CHEETAH: generated from #def testMethod() at line 3, col 13.\n trans = DummyTransaction()\n _dummyTrans = True\n write = trans.response().write\n SL = [KWS]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L240_C8", "label": "template = compile()", "type": "assigned_variable", "loc": [240, 240], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L196_C4", "vector": [14, 2, 0.9756, 0.0041, 2, 0.14, 1.0, 549, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " template = Cheetah.Template.Template.compile(template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:If_L245_C0", "label": "if", "type": "if", "loc": [245, 246], "level": 0, "parent": null, "vector": [4, 0, 0.998, 0.0081, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n unittest.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L246_C4", "label": "main()", "type": "expression", "loc": [246, 246], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1495:If_L245_C0", "vector": [8, 1, 1.0, 0.0041, 1, 0.35, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " unittest.main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Return_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L30_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Try_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:Try_L31_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L32_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:Try_L31_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Return_L34_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:Try_L31_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L36_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L74_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L77_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L77_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L77_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L87_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L77_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L88_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L93_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L93_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L101_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L101_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L102_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L101_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L109_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L110_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L117_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L120_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L121_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L120_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L132_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Import_L133_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L134_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L136_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L120_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L139_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Import_L140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L147_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L148_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L147_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L156_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L156_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:If_L157_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:If_L157_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Return_L158_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L156_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L159_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L156_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L170_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L171_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L170_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L179_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L179_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Return_L181_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L179_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:If_L182_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:If_L182_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Return_L183_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L179_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L184_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L179_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L192_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:ClassDef_L170_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L196_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L196_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Return_L198_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L196_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:If_L199_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:If_L199_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Return_L200_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L196_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L201_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L196_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L211_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:FunctionDef_L196_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Assign_L240_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1495:If_L245_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1495:Expr_L246_C4"}]
#!/usr/bin/env python import unittest from Cheetah import Parser class ArgListTest(unittest.TestCase): def setUp(self): super(ArgListTest, self).setUp() self.al = Parser.ArgList() def test_merge1(self): ''' Testing the ArgList case results from Template.Preprocessors.test_complexUsage ''' self.al.add_argument('arg') expect = [('arg', None)] self.assertEquals(expect, self.al.merge()) def test_merge2(self): ''' Testing the ArgList case results from SyntaxAndOutput.BlockDirective.test4 ''' self.al.add_argument('a') self.al.add_default('999') self.al.next() self.al.add_argument('b') self.al.add_default('444') expect = [(u'a', u'999'), (u'b', u'444')] self.assertEquals(expect, self.al.merge()) def test_merge3(self): ''' Testing the ArgList case results from SyntaxAndOutput.BlockDirective.test13 ''' self.al.add_argument('arg') self.al.add_default("'This is my block'") expect = [('arg', "'This is my block'")] self.assertEquals(expect, self.al.merge()) if __name__ == '__main__': unittest.main()
ajibawa-2023/Python-Code-Large/train/row_1496
28
49
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Import_L3_C0", "label": "unittest import unittest", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0612, 0.0204, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], "rhs_call_name": "", "annotation": ""}, "snippet": "import unittest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:ImportFrom_L5_C0", "label": "from Cheetah import Parser", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.102, 0.0204, 0, 0.66, 0.3333, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "Cheetah", "arg_names": [], "import_names": ["Parser"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah import Parser"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:ClassDef_L7_C0", "label": "ArgListTest", "type": "class", "loc": [7, 45], "level": 0, "parent": null, "vector": [3, 0, 0.5306, 0.7959, 0, 0.66, 0.6667, 273, 0, 4, 0, 0, 878, 0, 17], "semantic": {"name": "ArgListTest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ArgListTest(unittest.TestCase):\n def setUp(self):\n super(ArgListTest, self).setUp()\n self.al = Parser.ArgList()\n\n def test_merge1(self):\n ''' \n Testing the ArgList case results from Template.Preprocessors.test_complexUsage "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L8_C4", "label": "setUp", "type": "function", "loc": [8, 10], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:ClassDef_L7_C0", "vector": [2, 1, 0.1837, 0.0612, 1, 0.12, 0.0, 952, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n super(ArgListTest, self).setUp()\n self.al = Parser.ArgList()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L9_C8", "label": "setUp()", "type": "expression", "loc": [9, 9], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L8_C4", "vector": [8, 2, 0.1837, 0.0204, 2, 0.26, 0.0, 952, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "setUp", "arg_names": [], "import_names": [], "rhs_call_name": "setUp", "annotation": ""}, "snippet": " super(ArgListTest, self).setUp()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Assign_L10_C8", "label": "self.al = ArgList()", "type": "assigned_variable", "loc": [10, 10], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L8_C4", "vector": [14, 2, 0.2041, 0.0204, 2, 0.26, 1.0, 350, 3, 0, 0, 0, 179, 10, 1], "semantic": {"name": "self.al", "arg_names": [], "import_names": [], "rhs_call_name": "ArgList", "annotation": ""}, "snippet": " self.al = Parser.ArgList()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L12_C4", "label": "test_merge1", "type": "function", "loc": [12, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:ClassDef_L7_C0", "vector": [2, 1, 0.3163, 0.1633, 1, 0.12, 0.3333, 49, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "test_merge1", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_merge1(self):\n ''' \n Testing the ArgList case results from Template.Preprocessors.test_complexUsage \n '''\n self.al.add_argument('arg')\n expect = [('arg', None)]\n\n self.assertEquals(expect, self.al.merge())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L13_C8", "label": "expression", "type": "expression", "loc": [13, 15], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L12_C4", "vector": [8, 2, 0.2857, 0.0612, 2, 0.8, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ''' \n Testing the ArgList case results from Template.Preprocessors.test_complexUsage \n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L16_C8", "label": "add_argument()", "type": "expression", "loc": [16, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L12_C4", "vector": [8, 2, 0.3265, 0.0204, 2, 0.8, 0.3333, 178, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add_argument", "arg_names": [], "import_names": [], "rhs_call_name": "add_argument", "annotation": ""}, "snippet": " self.al.add_argument('arg')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Assign_L17_C8", "label": "expect =", "type": "assigned_variable", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L12_C4", "vector": [14, 2, 0.3469, 0.0204, 2, 0.8, 0.6667, 754, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "expect", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expect = [('arg', None)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L19_C8", "label": "assertEquals()", "type": "expression", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L12_C4", "vector": [8, 2, 0.3878, 0.0204, 2, 0.8, 1.0, 60, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "assertEquals", "arg_names": [], "import_names": [], "rhs_call_name": "assertEquals", "annotation": ""}, "snippet": " self.assertEquals(expect, self.al.merge())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "label": "test_merge2", "type": "function", "loc": [21, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:ClassDef_L7_C0", "vector": [2, 1, 0.551, 0.2653, 1, 0.12, 0.6667, 911, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "test_merge2", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_merge2(self):\n '''\n Testing the ArgList case results from SyntaxAndOutput.BlockDirective.test4\n '''\n self.al.add_argument('a')\n self.al.add_default('999')\n self.al.next()\n self.al.add_argument('b')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L22_C8", "label": "expression", "type": "expression", "loc": [22, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "vector": [8, 2, 0.4694, 0.0612, 2, 0.59, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Testing the ArgList case results from SyntaxAndOutput.BlockDirective.test4\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L25_C8", "label": "add_argument()", "type": "expression", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "vector": [8, 2, 0.5102, 0.0204, 2, 0.59, 0.1429, 178, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add_argument", "arg_names": [], "import_names": [], "rhs_call_name": "add_argument", "annotation": ""}, "snippet": " self.al.add_argument('a')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L26_C8", "label": "add_default()", "type": "expression", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "vector": [8, 2, 0.5306, 0.0204, 2, 0.59, 0.2857, 48, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add_default", "arg_names": [], "import_names": [], "rhs_call_name": "add_default", "annotation": ""}, "snippet": " self.al.add_default('999')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L27_C8", "label": "next()", "type": "expression", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "vector": [8, 2, 0.551, 0.0204, 2, 0.59, 0.4286, 11, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "next", "arg_names": [], "import_names": [], "rhs_call_name": "next", "annotation": ""}, "snippet": " self.al.next()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L28_C8", "label": "add_argument()", "type": "expression", "loc": [28, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "vector": [8, 2, 0.5714, 0.0204, 2, 0.59, 0.5714, 178, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add_argument", "arg_names": [], "import_names": [], "rhs_call_name": "add_argument", "annotation": ""}, "snippet": " self.al.add_argument('b')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L29_C8", "label": "add_default()", "type": "expression", "loc": [29, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "vector": [8, 2, 0.5918, 0.0204, 2, 0.59, 0.7143, 48, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add_default", "arg_names": [], "import_names": [], "rhs_call_name": "add_default", "annotation": ""}, "snippet": " self.al.add_default('444')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Assign_L31_C8", "label": "expect =", "type": "assigned_variable", "loc": [31, 31], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "vector": [14, 2, 0.6327, 0.0204, 2, 0.59, 0.8571, 754, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "expect", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expect = [(u'a', u'999'), (u'b', u'444')]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L33_C8", "label": "assertEquals()", "type": "expression", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "vector": [8, 2, 0.6735, 0.0204, 2, 0.59, 1.0, 60, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "assertEquals", "arg_names": [], "import_names": [], "rhs_call_name": "assertEquals", "annotation": ""}, "snippet": " self.assertEquals(expect, self.al.merge())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L37_C4", "label": "test_merge3", "type": "function", "loc": [37, 45], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:ClassDef_L7_C0", "vector": [2, 1, 0.8367, 0.1837, 1, 0.12, 1.0, 538, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "test_merge3", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def test_merge3(self):\n '''\n Testing the ArgList case results from SyntaxAndOutput.BlockDirective.test13\n '''\n self.al.add_argument('arg')\n self.al.add_default(\"'This is my block'\")\n expect = [('arg', \"'This is my block'\")]\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L38_C8", "label": "expression", "type": "expression", "loc": [38, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L37_C4", "vector": [8, 2, 0.7959, 0.0612, 2, 0.98, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Testing the ArgList case results from SyntaxAndOutput.BlockDirective.test13\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L41_C8", "label": "add_argument()", "type": "expression", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L37_C4", "vector": [8, 2, 0.8367, 0.0204, 2, 0.98, 0.25, 178, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add_argument", "arg_names": [], "import_names": [], "rhs_call_name": "add_argument", "annotation": ""}, "snippet": " self.al.add_argument('arg')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L42_C8", "label": "add_default()", "type": "expression", "loc": [42, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L37_C4", "vector": [8, 2, 0.8571, 0.0204, 2, 0.98, 0.5, 48, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add_default", "arg_names": [], "import_names": [], "rhs_call_name": "add_default", "annotation": ""}, "snippet": " self.al.add_default(\"'This is my block'\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Assign_L43_C8", "label": "expect =", "type": "assigned_variable", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L37_C4", "vector": [14, 2, 0.8776, 0.0204, 2, 0.98, 0.75, 754, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "expect", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expect = [('arg', \"'This is my block'\")]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L45_C8", "label": "assertEquals()", "type": "expression", "loc": [45, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L37_C4", "vector": [8, 2, 0.9184, 0.0204, 2, 0.98, 1.0, 60, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "assertEquals", "arg_names": [], "import_names": [], "rhs_call_name": "assertEquals", "annotation": ""}, "snippet": " self.assertEquals(expect, self.al.merge())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:If_L47_C0", "label": "if", "type": "if", "loc": [47, 48], "level": 0, "parent": null, "vector": [4, 0, 0.9694, 0.0408, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n unittest.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L48_C4", "label": "main()", "type": "expression", "loc": [48, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1496:If_L47_C0", "vector": [8, 1, 0.9796, 0.0204, 1, 0.14, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " unittest.main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1496:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L25_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L28_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L29_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Assign_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L42_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Assign_L43_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1496:If_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1496:Expr_L48_C4"}]
from glob import glob import os from os import listdir import os.path import re from tempfile import mktemp def _escapeRegexChars(txt, escapeRE=re.compile(r'([\$\^\*\+\.\?\{\}\[\]\(\)\|\\])')): return escapeRE.sub(r'\\\1', txt) def findFiles(*args, **kw): """Recursively find all the files matching a glob pattern. This function is a wrapper around the FileFinder class. See its docstring for details about the accepted arguments, etc.""" return FileFinder(*args, **kw).files() def replaceStrInFiles(files, theStr, repl): """Replace all instances of 'theStr' with 'repl' for each file in the 'files' list. Returns a dictionary with data about the matches found. This is like string.replace() on a multi-file basis. This function is a wrapper around the FindAndReplace class. See its docstring for more details.""" pattern = _escapeRegexChars(theStr) return FindAndReplace(files, pattern, repl).results() def replaceRegexInFiles(files, pattern, repl): """Replace all instances of regex 'pattern' with 'repl' for each file in the 'files' list. Returns a dictionary with data about the matches found. This is like re.sub on a multi-file basis. This function is a wrapper around the FindAndReplace class. See its docstring for more details.""" return FindAndReplace(files, pattern, repl).results() ################################################## ## CLASSES class FileFinder: """Traverses a directory tree and finds all files in it that match one of the specified glob patterns.""" def __init__(self, rootPath, globPatterns=('*',), ignoreBasenames=('CVS', '.svn'), ignoreDirs=(), ): self._rootPath = rootPath self._globPatterns = globPatterns self._ignoreBasenames = ignoreBasenames self._ignoreDirs = ignoreDirs self._files = [] self.walkDirTree(rootPath) def walkDirTree(self, dir='.', listdir=os.listdir, isdir=os.path.isdir, join=os.path.join, ): """Recursively walk through a directory tree and find matching files.""" processDir = self.processDir filterDir = self.filterDir pendingDirs = [dir] addDir = pendingDirs.append getDir = pendingDirs.pop while pendingDirs: dir = getDir() ## process this dir processDir(dir) ## and add sub-dirs for baseName in listdir(dir): fullPath = join(dir, baseName) if isdir(fullPath): if filterDir(baseName, fullPath): addDir( fullPath ) def filterDir(self, baseName, fullPath): """A hook for filtering out certain dirs. """ return not (baseName in self._ignoreBasenames or fullPath in self._ignoreDirs) def processDir(self, dir, glob=glob): extend = self._files.extend for pattern in self._globPatterns: extend( glob(os.path.join(dir, pattern)) ) def files(self): return self._files class _GenSubberFunc: """Converts a 'sub' string in the form that one feeds to re.sub (backrefs, groups, etc.) into a function that can be used to do the substitutions in the FindAndReplace class.""" backrefRE = re.compile(r'\\([1-9][0-9]*)') groupRE = re.compile(r'\\g<([a-zA-Z_][a-zA-Z_]*)>') def __init__(self, replaceStr): self._src = replaceStr self._pos = 0 self._codeChunks = [] self.parse() def src(self): return self._src def pos(self): return self._pos def setPos(self, pos): self._pos = pos def atEnd(self): return self._pos >= len(self._src) def advance(self, offset=1): self._pos += offset def readTo(self, to, start=None): if start == None: start = self._pos self._pos = to if self.atEnd(): return self._src[start:] else: return self._src[start:to] ## match and get methods def matchBackref(self): return self.backrefRE.match(self.src(), self.pos()) def getBackref(self): m = self.matchBackref() self.setPos(m.end()) return m.group(1) def matchGroup(self): return self.groupRE.match(self.src(), self.pos()) def getGroup(self): m = self.matchGroup() self.setPos(m.end()) return m.group(1) ## main parse loop and the eat methods def parse(self): while not self.atEnd(): if self.matchBackref(): self.eatBackref() elif self.matchGroup(): self.eatGroup() else: self.eatStrConst() def eatStrConst(self): startPos = self.pos() while not self.atEnd(): if self.matchBackref() or self.matchGroup(): break else: self.advance() strConst = self.readTo(self.pos(), start=startPos) self.addChunk(repr(strConst)) def eatBackref(self): self.addChunk( 'm.group(' + self.getBackref() + ')' ) def eatGroup(self): self.addChunk( 'm.group("' + self.getGroup() + '")' ) def addChunk(self, chunk): self._codeChunks.append(chunk) ## code wrapping methods def codeBody(self): return ', '.join(self._codeChunks) def code(self): return "def subber(m):\n\treturn ''.join([%s])\n" % (self.codeBody()) def subberFunc(self): exec(self.code()) return subber class FindAndReplace: """Find and replace all instances of 'patternOrRE' with 'replacement' for each file in the 'files' list. This is a multi-file version of re.sub(). 'patternOrRE' can be a raw regex pattern or a regex object as generated by the re module. 'replacement' can be any string that would work with patternOrRE.sub(replacement, fileContents). """ def __init__(self, files, patternOrRE, replacement, recordResults=True): if isinstance(patternOrRE, basestring): self._regex = re.compile(patternOrRE) else: self._regex = patternOrRE if isinstance(replacement, basestring): self._subber = _GenSubberFunc(replacement).subberFunc() else: self._subber = replacement self._pattern = pattern = self._regex.pattern self._files = files self._results = {} self._recordResults = recordResults ## see if we should use pgrep to do the file matching self._usePgrep = False if (os.popen3('pgrep')[2].read()).startswith('Usage:'): ## now check to make sure pgrep understands the pattern tmpFile = mktemp() open(tmpFile, 'w').write('#') if not (os.popen3('pgrep "' + pattern + '" ' + tmpFile)[2].read()): # it didn't print an error msg so we're ok self._usePgrep = True os.remove(tmpFile) self._run() def results(self): return self._results def _run(self): regex = self._regex subber = self._subDispatcher usePgrep = self._usePgrep pattern = self._pattern for file in self._files: if not os.path.isfile(file): continue # skip dirs etc. self._currFile = file found = False if 'orig' in locals(): del orig if self._usePgrep: if os.popen('pgrep "' + pattern + '" ' + file ).read(): found = True else: orig = open(file).read() if regex.search(orig): found = True if found: if 'orig' not in locals(): orig = open(file).read() new = regex.sub(subber, orig) open(file, 'w').write(new) def _subDispatcher(self, match): if self._recordResults: if self._currFile not in self._results: res = self._results[self._currFile] = {} res['count'] = 0 res['matches'] = [] else: res = self._results[self._currFile] res['count'] += 1 res['matches'].append({'contents': match.group(), 'start': match.start(), 'end': match.end(), } ) return self._subber(match) class SourceFileStats: """ """ _fileStats = None def __init__(self, files): self._fileStats = stats = {} for file in files: stats[file] = self.getFileStats(file) def rawStats(self): return self._fileStats def summary(self): codeLines = 0 blankLines = 0 commentLines = 0 totalLines = 0 for fileStats in self.rawStats().values(): codeLines += fileStats['codeLines'] blankLines += fileStats['blankLines'] commentLines += fileStats['commentLines'] totalLines += fileStats['totalLines'] stats = {'codeLines': codeLines, 'blankLines': blankLines, 'commentLines': commentLines, 'totalLines': totalLines, } return stats def printStats(self): pass def getFileStats(self, fileName): codeLines = 0 blankLines = 0 commentLines = 0 commentLineRe = re.compile(r'\s#.*$') blankLineRe = re.compile('\s$') lines = open(fileName).read().splitlines() totalLines = len(lines) for line in lines: if commentLineRe.match(line): commentLines += 1 elif blankLineRe.match(line): blankLines += 1 else: codeLines += 1 stats = {'codeLines': codeLines, 'blankLines': blankLines, 'commentLines': commentLines, 'totalLines': totalLines, } return stats
ajibawa-2023/Python-Code-Large/train/row_1497
199
357
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1497:ImportFrom_L2_C0", "label": "from glob import glob", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0056, 0.0028, 0, 0.66, 0.0, 958, 0, 1, 0, 0, 958, 0, 0], "semantic": {"name": "glob", "arg_names": [], "import_names": ["glob"], "rhs_call_name": "", "annotation": ""}, "snippet": "from glob import glob"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0084, 0.0028, 0, 0.66, 0.0769, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:ImportFrom_L4_C0", "label": "from os import listdir", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0112, 0.0028, 0, 0.66, 0.1538, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["listdir"], "rhs_call_name": "", "annotation": ""}, "snippet": "from os import listdir"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Import_L5_C0", "label": "os.path import os.path", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.014, 0.0028, 0, 0.66, 0.2308, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os.path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Import_L6_C0", "label": "re import re", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0168, 0.0028, 0, 0.66, 0.3077, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:ImportFrom_L7_C0", "label": "from tempfile import mktemp", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0196, 0.0028, 0, 0.66, 0.3846, 516, 0, 1, 0, 0, 516, 0, 0], "semantic": {"name": "tempfile", "arg_names": [], "import_names": ["mktemp"], "rhs_call_name": "", "annotation": ""}, "snippet": "from tempfile import mktemp"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L9_C0", "label": "_escapeRegexChars", "type": "function", "loc": [9, 11], "level": 0, "parent": null, "vector": [2, 0, 0.028, 0.0084, 0, 0.66, 0.4615, 291, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "_escapeRegexChars", "arg_names": ["txt", "escapeRE"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def _escapeRegexChars(txt,\n escapeRE=re.compile(r'([\\$\\^\\*\\+\\.\\?\\{\\}\\[\\]\\(\\)\\|\\\\])')):\n return escapeRE.sub(r'\\\\\\1', txt)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L11_C4", "label": "return", "type": "return", "loc": [11, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L9_C0", "vector": [13, 1, 0.0308, 0.0028, 1, 0.73, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return escapeRE.sub(r'\\\\\\1', txt)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L13_C0", "label": "findFiles", "type": "function", "loc": [13, 19], "level": 0, "parent": null, "vector": [2, 0, 0.0448, 0.0196, 0, 0.66, 0.5385, 618, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "findFiles", "arg_names": ["args", "kw"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def findFiles(*args, **kw):\n \"\"\"Recursively find all the files matching a glob pattern.\n\n This function is a wrapper around the FileFinder class. See its docstring\n for details about the accepted arguments, etc.\"\"\"\n \n return FileFinder(*args, **kw).files()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L14_C4", "label": "expression", "type": "expression", "loc": [14, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L13_C0", "vector": [8, 1, 0.0434, 0.0112, 1, 0.68, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Recursively find all the files matching a glob pattern.\n\n This function is a wrapper around the FileFinder class. See its docstring\n for details about the accepted arguments, etc.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L19_C4", "label": "return", "type": "return", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L13_C0", "vector": [13, 1, 0.0532, 0.0028, 1, 0.68, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return FileFinder(*args, **kw).files()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L21_C0", "label": "replaceStrInFiles", "type": "function", "loc": [21, 32], "level": 0, "parent": null, "vector": [2, 0, 0.0742, 0.0336, 0, 0.66, 0.6154, 414, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "replaceStrInFiles", "arg_names": ["files", "theStr", "repl"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def replaceStrInFiles(files, theStr, repl):\n\n \"\"\"Replace all instances of 'theStr' with 'repl' for each file in the 'files'\n list. Returns a dictionary with data about the matches found.\n\n This is like string.replace() on a multi-file basis.\n\n This function is a wrapper around the FindAndReplace class. See its"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L23_C4", "label": "expression", "type": "expression", "loc": [23, 29], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L21_C0", "vector": [8, 1, 0.0728, 0.0196, 1, 0.29, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Replace all instances of 'theStr' with 'repl' for each file in the 'files'\n list. Returns a dictionary with data about the matches found.\n\n This is like string.replace() on a multi-file basis.\n\n This function is a wrapper around the FindAndReplace class. See its\n docstring for more details.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L31_C4", "label": "pattern = _escapeRegexChars()", "type": "assigned_variable", "loc": [31, 31], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L21_C0", "vector": [14, 1, 0.0868, 0.0028, 1, 0.29, 0.5, 561, 3, 1, 0, 0, 291, 10, 1], "semantic": {"name": "pattern", "arg_names": [], "import_names": [], "rhs_call_name": "_escapeRegexChars", "annotation": ""}, "snippet": " pattern = _escapeRegexChars(theStr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L32_C4", "label": "return", "type": "return", "loc": [32, 32], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L21_C0", "vector": [13, 1, 0.0896, 0.0028, 1, 0.29, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return FindAndReplace(files, pattern, repl).results()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L34_C0", "label": "replaceRegexInFiles", "type": "function", "loc": [34, 44], "level": 0, "parent": null, "vector": [2, 0, 0.1092, 0.0308, 0, 0.66, 0.6923, 434, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "replaceRegexInFiles", "arg_names": ["files", "pattern", "repl"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def replaceRegexInFiles(files, pattern, repl):\n\n \"\"\"Replace all instances of regex 'pattern' with 'repl' for each file in the\n 'files' list. Returns a dictionary with data about the matches found.\n\n This is like re.sub on a multi-file basis.\n\n This function is a wrapper around the FindAndReplace class. See its"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L36_C4", "label": "expression", "type": "expression", "loc": [36, 42], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L34_C0", "vector": [8, 1, 0.1092, 0.0196, 1, 0.41, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Replace all instances of regex 'pattern' with 'repl' for each file in the\n 'files' list. Returns a dictionary with data about the matches found.\n\n This is like re.sub on a multi-file basis.\n\n This function is a wrapper around the FindAndReplace class. See its\n docstring for more details.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L44_C4", "label": "return", "type": "return", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L34_C0", "vector": [13, 1, 0.1232, 0.0028, 1, 0.41, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return FindAndReplace(files, pattern, repl).results()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L50_C0", "label": "FileFinder", "type": "class", "loc": [50, 109], "level": 0, "parent": null, "vector": [3, 0, 0.2227, 0.1681, 0, 0.66, 0.7692, 370, 0, 5, 0, 0, 0, 0, 11], "semantic": {"name": "FileFinder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class FileFinder:\n \n \"\"\"Traverses a directory tree and finds all files in it that match one of\n the specified glob patterns.\"\"\"\n \n def __init__(self, rootPath,\n globPatterns=('*',),\n ignoreBasenames=('CVS', '.svn'),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L52_C4", "label": "expression", "type": "expression", "loc": [52, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L50_C0", "vector": [8, 1, 0.1471, 0.0056, 1, 0.31, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Traverses a directory tree and finds all files in it that match one of\n the specified glob patterns.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L55_C4", "label": "__init__", "type": "function", "loc": [55, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L50_C0", "vector": [2, 1, 0.1709, 0.0364, 1, 0.31, 0.2, 555, 0, 5, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "rootPath", "globPatterns", "ignoreBasenames", "ignoreDirs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, rootPath,\n globPatterns=('*',),\n ignoreBasenames=('CVS', '.svn'),\n ignoreDirs=(),\n ):\n \n self._rootPath = rootPath\n self._globPatterns = globPatterns"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L61_C8", "label": "self._rootPath =", "type": "assigned_variable", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L55_C4", "vector": [14, 2, 0.1709, 0.0028, 2, 0.79, 0.0, 455, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._rootPath", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._rootPath = rootPath"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L62_C8", "label": "self._globPatterns =", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L55_C4", "vector": [14, 2, 0.1737, 0.0028, 2, 0.79, 0.2, 30, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._globPatterns", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._globPatterns = globPatterns"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L63_C8", "label": "self._ignoreBasenames =", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L55_C4", "vector": [14, 2, 0.1765, 0.0028, 2, 0.79, 0.4, 86, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._ignoreBasenames", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._ignoreBasenames = ignoreBasenames"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L64_C8", "label": "self._ignoreDirs =", "type": "assigned_variable", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L55_C4", "vector": [14, 2, 0.1793, 0.0028, 2, 0.79, 0.6, 226, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._ignoreDirs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._ignoreDirs = ignoreDirs"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L65_C8", "label": "self._files =", "type": "assigned_variable", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L55_C4", "vector": [14, 2, 0.1821, 0.0028, 2, 0.79, 0.8, 643, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._files", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._files = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L67_C8", "label": "walkDirTree()", "type": "expression", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L55_C4", "vector": [8, 2, 0.1877, 0.0028, 2, 0.79, 1.0, 306, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "walkDirTree", "arg_names": [], "import_names": [], "rhs_call_name": "walkDirTree", "annotation": ""}, "snippet": " self.walkDirTree(rootPath)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L69_C4", "label": "walkDirTree", "type": "function", "loc": [69, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L50_C0", "vector": [2, 1, 0.2283, 0.0728, 1, 0.31, 0.4, 306, 0, 5, 0, 0, 0, 0, 7], "semantic": {"name": "walkDirTree", "arg_names": ["self", "dir", "listdir", "isdir", "join"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def walkDirTree(self, dir='.',\n \n listdir=os.listdir,\n isdir=os.path.isdir,\n join=os.path.join,\n ):\n\n \"\"\"Recursively walk through a directory tree and find matching files.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L76_C8", "label": "expression", "type": "expression", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L69_C4", "vector": [8, 2, 0.2129, 0.0028, 2, 0.86, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Recursively walk through a directory tree and find matching files.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L77_C8", "label": "processDir =", "type": "assigned_variable", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L69_C4", "vector": [14, 2, 0.2157, 0.0028, 2, 0.86, 0.1667, 260, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "processDir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " processDir = self.processDir"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L78_C8", "label": "filterDir =", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L69_C4", "vector": [14, 2, 0.2185, 0.0028, 2, 0.86, 0.3333, 675, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "filterDir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " filterDir = self.filterDir"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L80_C8", "label": "pendingDirs =", "type": "assigned_variable", "loc": [80, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L69_C4", "vector": [14, 2, 0.2241, 0.0028, 2, 0.86, 0.5, 14, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "pendingDirs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pendingDirs = [dir]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L81_C8", "label": "addDir =", "type": "assigned_variable", "loc": [81, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L69_C4", "vector": [14, 2, 0.2269, 0.0028, 2, 0.86, 0.6667, 988, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "addDir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " addDir = pendingDirs.append"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L82_C8", "label": "getDir =", "type": "assigned_variable", "loc": [82, 82], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L69_C4", "vector": [14, 2, 0.2297, 0.0028, 2, 0.86, 0.8333, 707, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "getDir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " getDir = pendingDirs.pop"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:While_L84_C8", "label": "while", "type": "while", "loc": [84, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L69_C4", "vector": [5, 2, 0.2493, 0.0308, 2, 0.86, 1.0, 0, 2, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while pendingDirs:\n dir = getDir()\n ## process this dir\n processDir(dir)\n \n ## and add sub-dirs \n for baseName in listdir(dir):\n fullPath = join(dir, baseName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L85_C12", "label": "dir = getDir()", "type": "assigned_variable", "loc": [85, 85], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:While_L84_C8", "vector": [14, 3, 0.2381, 0.0028, 3, 0.29, 0.0, 152, 3, 0, 0, 0, 707, 10, 1], "semantic": {"name": "dir", "arg_names": [], "import_names": [], "rhs_call_name": "getDir", "annotation": ""}, "snippet": " dir = getDir()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L87_C12", "label": "processDir()", "type": "expression", "loc": [87, 87], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:While_L84_C8", "vector": [8, 3, 0.2437, 0.0028, 3, 0.29, 0.5, 260, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "processDir", "arg_names": [], "import_names": [], "rhs_call_name": "processDir", "annotation": ""}, "snippet": " processDir(dir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L90_C12", "label": "for baseName", "type": "for", "loc": [90, 94], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:While_L84_C8", "vector": [6, 3, 0.2577, 0.014, 3, 0.29, 1.0, 345, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "baseName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for baseName in listdir(dir):\n fullPath = join(dir, baseName)\n if isdir(fullPath):\n if filterDir(baseName, fullPath):\n addDir( fullPath )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L91_C16", "label": "fullPath = join()", "type": "assigned_variable", "loc": [91, 91], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L90_C12", "vector": [14, 4, 0.2549, 0.0028, 4, 0.47, 0.0, 776, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "fullPath", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " fullPath = join(dir, baseName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L92_C16", "label": "if", "type": "if", "loc": [92, 94], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L90_C12", "vector": [4, 4, 0.2605, 0.0084, 4, 0.47, 1.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isdir(fullPath):\n if filterDir(baseName, fullPath):\n addDir( fullPath )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L93_C20", "label": "if", "type": "if", "loc": [93, 94], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L92_C16", "vector": [4, 5, 0.2619, 0.0056, 5, 0.16, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if filterDir(baseName, fullPath):\n addDir( fullPath )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L94_C24", "label": "addDir()", "type": "expression", "loc": [94, 94], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L93_C20", "vector": [8, 6, 0.2633, 0.0028, 6, 0.68, 0.0, 988, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addDir", "arg_names": [], "import_names": [], "rhs_call_name": "addDir", "annotation": ""}, "snippet": " addDir( fullPath )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L96_C4", "label": "filterDir", "type": "function", "loc": [96, 101], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L50_C0", "vector": [2, 1, 0.2759, 0.0168, 1, 0.31, 0.6, 675, 0, 3, 1, 0, 0, 0, 0], "semantic": {"name": "filterDir", "arg_names": ["self", "baseName", "fullPath"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def filterDir(self, baseName, fullPath):\n \n \"\"\"A hook for filtering out certain dirs. \"\"\"\n \n return not (baseName in self._ignoreBasenames or \n fullPath in self._ignoreDirs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L98_C8", "label": "expression", "type": "expression", "loc": [98, 98], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L96_C4", "vector": [8, 2, 0.2745, 0.0028, 2, 0.9, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"A hook for filtering out certain dirs. \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L100_C8", "label": "return", "type": "return", "loc": [100, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L96_C4", "vector": [13, 2, 0.2815, 0.0056, 2, 0.9, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return not (baseName in self._ignoreBasenames or \n fullPath in self._ignoreDirs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L103_C4", "label": "processDir", "type": "function", "loc": [103, 106], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L50_C0", "vector": [2, 1, 0.2927, 0.0112, 1, 0.31, 0.8, 260, 0, 3, 0, 0, 0, 0, 3], "semantic": {"name": "processDir", "arg_names": ["self", "dir", "glob"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def processDir(self, dir, glob=glob):\n extend = self._files.extend\n for pattern in self._globPatterns:\n extend( glob(os.path.join(dir, pattern)) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L104_C8", "label": "extend =", "type": "assigned_variable", "loc": [104, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L103_C4", "vector": [14, 2, 0.2913, 0.0028, 2, 0.82, 0.0, 660, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "extend", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " extend = self._files.extend"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L105_C8", "label": "for pattern", "type": "for", "loc": [105, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L103_C4", "vector": [6, 2, 0.2955, 0.0056, 2, 0.82, 1.0, 561, 7, 0, 0, 0, 0, 0, 3], "semantic": {"name": "pattern", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for pattern in self._globPatterns:\n extend( glob(os.path.join(dir, pattern)) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L106_C12", "label": "extend()", "type": "expression", "loc": [106, 106], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L105_C8", "vector": [8, 3, 0.2969, 0.0028, 3, 0.72, 0.0, 660, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "extend", "arg_names": [], "import_names": [], "rhs_call_name": "extend", "annotation": ""}, "snippet": " extend( glob(os.path.join(dir, pattern)) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L108_C4", "label": "files", "type": "function", "loc": [108, 109], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L50_C0", "vector": [2, 1, 0.3039, 0.0056, 1, 0.31, 1.0, 598, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "files", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def files(self):\n return self._files"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L109_C8", "label": "return", "type": "return", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L108_C4", "vector": [13, 2, 0.3053, 0.0028, 2, 0.01, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._files"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "label": "_GenSubberFunc", "type": "class", "loc": [111, 208], "level": 0, "parent": null, "vector": [3, 0, 0.4468, 0.2745, 0, 0.66, 0.8462, 815, 0, 19, 0, 0, 0, 0, 43], "semantic": {"name": "_GenSubberFunc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class _GenSubberFunc:\n\n \"\"\"Converts a 'sub' string in the form that one feeds to re.sub (backrefs,\n groups, etc.) into a function that can be used to do the substitutions in\n the FindAndReplace class.\"\"\"\n \n backrefRE = re.compile(r'\\\\([1-9][0-9]*)')\n groupRE = re.compile(r'\\\\g<([a-zA-Z_][a-zA-Z_]*)>')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L113_C4", "label": "expression", "type": "expression", "loc": [113, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [8, 1, 0.3193, 0.0084, 1, 0.75, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Converts a 'sub' string in the form that one feeds to re.sub (backrefs,\n groups, etc.) into a function that can be used to do the substitutions in\n the FindAndReplace class.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L117_C4", "label": "backrefRE = compile()", "type": "assigned_variable", "loc": [117, 117], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [14, 1, 0.3277, 0.0028, 1, 0.75, 0.0476, 612, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "backrefRE", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " backrefRE = re.compile(r'\\\\([1-9][0-9]*)')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L118_C4", "label": "groupRE = compile()", "type": "assigned_variable", "loc": [118, 118], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [14, 1, 0.3305, 0.0028, 1, 0.75, 0.0952, 357, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "groupRE", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " groupRE = re.compile(r'\\\\g<([a-zA-Z_][a-zA-Z_]*)>')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L120_C4", "label": "__init__", "type": "function", "loc": [120, 124], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.3417, 0.014, 1, 0.75, 0.1429, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "replaceStr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, replaceStr):\n self._src = replaceStr\n self._pos = 0\n self._codeChunks = []\n self.parse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L121_C8", "label": "self._src =", "type": "assigned_variable", "loc": [121, 121], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L120_C4", "vector": [14, 2, 0.3389, 0.0028, 2, 0.04, 0.0, 8, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._src", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._src = replaceStr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L122_C8", "label": "self._pos =", "type": "assigned_variable", "loc": [122, 122], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L120_C4", "vector": [14, 2, 0.3417, 0.0028, 2, 0.04, 0.3333, 137, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self._pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._pos = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L123_C8", "label": "self._codeChunks =", "type": "assigned_variable", "loc": [123, 123], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L120_C4", "vector": [14, 2, 0.3445, 0.0028, 2, 0.04, 0.6667, 535, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._codeChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._codeChunks = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L124_C8", "label": "parse()", "type": "expression", "loc": [124, 124], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L120_C4", "vector": [8, 2, 0.3473, 0.0028, 2, 0.04, 1.0, 678, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "parse", "arg_names": [], "import_names": [], "rhs_call_name": "parse", "annotation": ""}, "snippet": " self.parse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L126_C4", "label": "src", "type": "function", "loc": [126, 127], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.3543, 0.0056, 1, 0.75, 0.1905, 345, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "src", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def src(self):\n return self._src"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L127_C8", "label": "return", "type": "return", "loc": [127, 127], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L126_C4", "vector": [13, 2, 0.3557, 0.0028, 2, 0.21, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._src"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L129_C4", "label": "pos", "type": "function", "loc": [129, 130], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.3627, 0.0056, 1, 0.75, 0.2381, 627, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def pos(self):\n return self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L130_C8", "label": "return", "type": "return", "loc": [130, 130], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L129_C4", "vector": [13, 2, 0.3641, 0.0028, 2, 0.96, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L132_C4", "label": "setPos", "type": "function", "loc": [132, 133], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.3711, 0.0056, 1, 0.75, 0.2857, 659, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "setPos", "arg_names": ["self", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setPos(self, pos):\n self._pos = pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L133_C8", "label": "self._pos =", "type": "assigned_variable", "loc": [133, 133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L132_C4", "vector": [14, 2, 0.3725, 0.0028, 2, 0.6, 0.0, 137, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._pos = pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L135_C4", "label": "atEnd", "type": "function", "loc": [135, 136], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.3796, 0.0056, 1, 0.75, 0.3333, 789, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "atEnd", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def atEnd(self):\n return self._pos >= len(self._src)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L136_C8", "label": "return", "type": "return", "loc": [136, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L135_C4", "vector": [13, 2, 0.381, 0.0028, 2, 0.78, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._pos >= len(self._src)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L138_C4", "label": "advance", "type": "function", "loc": [138, 139], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.388, 0.0056, 1, 0.75, 0.381, 341, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "advance", "arg_names": ["self", "offset"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def advance(self, offset=1):\n self._pos += offset"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L141_C4", "label": "readTo", "type": "function", "loc": [141, 148], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.4048, 0.0224, 1, 0.75, 0.4286, 293, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "readTo", "arg_names": ["self", "to", "start"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def readTo(self, to, start=None):\n if start == None:\n start = self._pos\n self._pos = to\n if self.atEnd():\n return self._src[start:]\n else:\n return self._src[start:to]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L142_C8", "label": "if", "type": "if", "loc": [142, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L141_C4", "vector": [4, 2, 0.3992, 0.0056, 2, 0.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if start == None:\n start = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L143_C12", "label": "start =", "type": "assigned_variable", "loc": [143, 143], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L142_C8", "vector": [14, 3, 0.4006, 0.0028, 3, 0.58, 0.0, 511, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " start = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L144_C8", "label": "self._pos =", "type": "assigned_variable", "loc": [144, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L141_C4", "vector": [14, 2, 0.4034, 0.0028, 2, 0.2, 0.5, 137, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._pos = to"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L145_C8", "label": "if", "type": "if", "loc": [145, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L141_C4", "vector": [4, 2, 0.4104, 0.0112, 2, 0.2, 1.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.atEnd():\n return self._src[start:]\n else:\n return self._src[start:to]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L146_C12", "label": "return", "type": "return", "loc": [146, 146], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L145_C8", "vector": [13, 3, 0.409, 0.0028, 3, 0.6, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._src[start:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L148_C12", "label": "return", "type": "return", "loc": [148, 148], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L145_C8", "vector": [13, 3, 0.4146, 0.0028, 3, 0.6, 1.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._src[start:to]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L152_C4", "label": "matchBackref", "type": "function", "loc": [152, 153], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.4272, 0.0056, 1, 0.75, 0.4762, 744, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "matchBackref", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchBackref(self):\n return self.backrefRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L153_C8", "label": "return", "type": "return", "loc": [153, 153], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L152_C4", "vector": [13, 2, 0.4286, 0.0028, 2, 0.13, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.backrefRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L155_C4", "label": "getBackref", "type": "function", "loc": [155, 158], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.4384, 0.0112, 1, 0.75, 0.5238, 51, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "getBackref", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getBackref(self):\n m = self.matchBackref()\n self.setPos(m.end())\n return m.group(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L156_C8", "label": "m = matchBackref()", "type": "assigned_variable", "loc": [156, 156], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L155_C4", "vector": [14, 2, 0.437, 0.0028, 2, 0.95, 0.0, 711, 3, 0, 0, 0, 744, 10, 1], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "matchBackref", "annotation": ""}, "snippet": " m = self.matchBackref()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L157_C8", "label": "setPos()", "type": "expression", "loc": [157, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L155_C4", "vector": [8, 2, 0.4398, 0.0028, 2, 0.95, 0.5, 659, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(m.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L158_C8", "label": "return", "type": "return", "loc": [158, 158], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L155_C4", "vector": [13, 2, 0.4426, 0.0028, 2, 0.95, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return m.group(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L160_C4", "label": "matchGroup", "type": "function", "loc": [160, 161], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.4496, 0.0056, 1, 0.75, 0.5714, 290, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "matchGroup", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchGroup(self):\n return self.groupRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L161_C8", "label": "return", "type": "return", "loc": [161, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L160_C4", "vector": [13, 2, 0.451, 0.0028, 2, 0.58, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.groupRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L163_C4", "label": "getGroup", "type": "function", "loc": [163, 166], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.4608, 0.0112, 1, 0.75, 0.619, 233, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "getGroup", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getGroup(self):\n m = self.matchGroup()\n self.setPos(m.end())\n return m.group(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L164_C8", "label": "m = matchGroup()", "type": "assigned_variable", "loc": [164, 164], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L163_C4", "vector": [14, 2, 0.4594, 0.0028, 2, 0.26, 0.0, 711, 3, 0, 0, 0, 290, 10, 1], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "matchGroup", "annotation": ""}, "snippet": " m = self.matchGroup()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L165_C8", "label": "setPos()", "type": "expression", "loc": [165, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L163_C4", "vector": [8, 2, 0.4622, 0.0028, 2, 0.26, 0.5, 659, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(m.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L166_C8", "label": "return", "type": "return", "loc": [166, 166], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L163_C4", "vector": [13, 2, 0.465, 0.0028, 2, 0.26, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return m.group(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L170_C4", "label": "parse", "type": "function", "loc": [170, 177], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.486, 0.0224, 1, 0.75, 0.6667, 678, 0, 1, 0, 0, 0, 0, 6], "semantic": {"name": "parse", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def parse(self):\n while not self.atEnd():\n if self.matchBackref():\n self.eatBackref()\n elif self.matchGroup():\n self.eatGroup()\n else:\n self.eatStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:While_L171_C8", "label": "while", "type": "while", "loc": [171, 177], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L170_C4", "vector": [5, 2, 0.4874, 0.0196, 2, 0.37, 0.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while not self.atEnd():\n if self.matchBackref():\n self.eatBackref()\n elif self.matchGroup():\n self.eatGroup()\n else:\n self.eatStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L172_C12", "label": "if", "type": "if", "loc": [172, 177], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:While_L171_C8", "vector": [4, 3, 0.4888, 0.0168, 3, 0.46, 0.0, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchBackref():\n self.eatBackref()\n elif self.matchGroup():\n self.eatGroup()\n else:\n self.eatStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L173_C16", "label": "eatBackref()", "type": "expression", "loc": [173, 173], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L172_C12", "vector": [8, 4, 0.4846, 0.0028, 4, 0.66, 0.0, 695, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "eatBackref", "arg_names": [], "import_names": [], "rhs_call_name": "eatBackref", "annotation": ""}, "snippet": " self.eatBackref()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L174_C12", "label": "if", "type": "if", "loc": [174, 177], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L172_C12", "vector": [4, 4, 0.4916, 0.0112, 4, 0.66, 1.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchGroup():\n self.eatGroup()\n else:\n self.eatStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L175_C16", "label": "eatGroup()", "type": "expression", "loc": [175, 175], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L174_C12", "vector": [8, 5, 0.4902, 0.0028, 5, 0.33, 0.0, 807, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "eatGroup", "arg_names": [], "import_names": [], "rhs_call_name": "eatGroup", "annotation": ""}, "snippet": " self.eatGroup()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L177_C16", "label": "eatStrConst()", "type": "expression", "loc": [177, 177], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L174_C12", "vector": [8, 5, 0.4958, 0.0028, 5, 0.33, 1.0, 833, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "eatStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "eatStrConst", "annotation": ""}, "snippet": " self.eatStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L179_C4", "label": "eatStrConst", "type": "function", "loc": [179, 187], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.5126, 0.0252, 1, 0.75, 0.7143, 833, 0, 1, 0, 0, 0, 0, 9], "semantic": {"name": "eatStrConst", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatStrConst(self):\n startPos = self.pos()\n while not self.atEnd():\n if self.matchBackref() or self.matchGroup():\n break\n else:\n self.advance()\n strConst = self.readTo(self.pos(), start=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L180_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [180, 180], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L179_C4", "vector": [14, 2, 0.5042, 0.0028, 2, 0.43, 0.0, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:While_L181_C8", "label": "while", "type": "while", "loc": [181, 185], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L179_C4", "vector": [5, 2, 0.5126, 0.014, 2, 0.43, 0.3333, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while not self.atEnd():\n if self.matchBackref() or self.matchGroup():\n break\n else:\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L182_C12", "label": "if", "type": "if", "loc": [182, 185], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:While_L181_C8", "vector": [4, 3, 0.514, 0.0112, 3, 0.41, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchBackref() or self.matchGroup():\n break\n else:\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L185_C16", "label": "advance()", "type": "expression", "loc": [185, 185], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L182_C12", "vector": [8, 4, 0.5182, 0.0028, 4, 0.91, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L186_C8", "label": "strConst = readTo()", "type": "assigned_variable", "loc": [186, 186], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L179_C4", "vector": [14, 2, 0.521, 0.0028, 2, 0.43, 0.6667, 616, 3, 2, 0, 0, 293, 10, 2], "semantic": {"name": "strConst", "arg_names": [], "import_names": [], "rhs_call_name": "readTo", "annotation": ""}, "snippet": " strConst = self.readTo(self.pos(), start=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L187_C8", "label": "addChunk()", "type": "expression", "loc": [187, 187], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L179_C4", "vector": [8, 2, 0.5238, 0.0028, 2, 0.43, 1.0, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(repr(strConst))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L189_C4", "label": "eatBackref", "type": "function", "loc": [189, 190], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.5308, 0.0056, 1, 0.75, 0.7619, 695, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "eatBackref", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatBackref(self):\n self.addChunk( 'm.group(' + self.getBackref() + ')' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L190_C8", "label": "addChunk()", "type": "expression", "loc": [190, 190], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L189_C4", "vector": [8, 2, 0.5322, 0.0028, 2, 0.1, 0.0, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk( 'm.group(' + self.getBackref() + ')' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L192_C4", "label": "eatGroup", "type": "function", "loc": [192, 193], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.5392, 0.0056, 1, 0.75, 0.8095, 807, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "eatGroup", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatGroup(self):\n self.addChunk( 'm.group(\"' + self.getGroup() + '\")' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L193_C8", "label": "addChunk()", "type": "expression", "loc": [193, 193], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L192_C4", "vector": [8, 2, 0.5406, 0.0028, 2, 0.93, 0.0, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk( 'm.group(\"' + self.getGroup() + '\")' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L195_C4", "label": "addChunk", "type": "function", "loc": [195, 196], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.5476, 0.0056, 1, 0.75, 0.8571, 316, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": ["self", "chunk"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addChunk(self, chunk):\n self._codeChunks.append(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L196_C8", "label": "append()", "type": "expression", "loc": [196, 196], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L195_C4", "vector": [8, 2, 0.549, 0.0028, 2, 0.3, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._codeChunks.append(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L200_C4", "label": "codeBody", "type": "function", "loc": [200, 201], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.5616, 0.0056, 1, 0.75, 0.9048, 972, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "codeBody", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def codeBody(self):\n return ', '.join(self._codeChunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L201_C8", "label": "return", "type": "return", "loc": [201, 201], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L200_C4", "vector": [13, 2, 0.563, 0.0028, 2, 0.55, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ', '.join(self._codeChunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L203_C4", "label": "code", "type": "function", "loc": [203, 204], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.57, 0.0056, 1, 0.75, 0.9524, 44, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "code", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def code(self):\n return \"def subber(m):\\n\\treturn ''.join([%s])\\n\" % (self.codeBody())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L204_C8", "label": "return", "type": "return", "loc": [204, 204], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L203_C4", "vector": [13, 2, 0.5714, 0.0028, 2, 0.33, 0.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return \"def subber(m):\\n\\treturn ''.join([%s])\\n\" % (self.codeBody())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L206_C4", "label": "subberFunc", "type": "function", "loc": [206, 208], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "vector": [2, 1, 0.5798, 0.0084, 1, 0.75, 1.0, 152, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "subberFunc", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def subberFunc(self):\n exec(self.code())\n return subber"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L207_C8", "label": "exec()", "type": "expression", "loc": [207, 207], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L206_C4", "vector": [8, 2, 0.5798, 0.0028, 2, 0.47, 0.0, 272, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "exec", "arg_names": [], "import_names": [], "rhs_call_name": "exec", "annotation": ""}, "snippet": " exec(self.code())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L208_C8", "label": "return", "type": "return", "loc": [208, 208], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L206_C4", "vector": [13, 2, 0.5826, 0.0028, 2, 0.47, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return subber"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L211_C0", "label": "FindAndReplace", "type": "class", "loc": [211, 295], "level": 0, "parent": null, "vector": [3, 0, 0.7087, 0.2381, 0, 0.66, 0.9231, 174, 0, 4, 0, 0, 0, 0, 33], "semantic": {"name": "FindAndReplace", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class FindAndReplace:\n \n \"\"\"Find and replace all instances of 'patternOrRE' with 'replacement' for\n each file in the 'files' list. This is a multi-file version of re.sub().\n\n 'patternOrRE' can be a raw regex pattern or\n a regex object as generated by the re module. 'replacement' can be any\n string that would work with patternOrRE.sub(replacement, fileContents)."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L213_C4", "label": "expression", "type": "expression", "loc": [213, 219], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L211_C0", "vector": [8, 1, 0.605, 0.0196, 1, 0.81, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Find and replace all instances of 'patternOrRE' with 'replacement' for\n each file in the 'files' list. This is a multi-file version of re.sub().\n\n 'patternOrRE' can be a raw regex pattern or\n a regex object as generated by the re module. 'replacement' can be any\n string that would work with patternOrRE.sub(replacement, fileContents).\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "label": "__init__", "type": "function", "loc": [221, 250], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L211_C0", "vector": [2, 1, 0.6597, 0.084, 1, 0.81, 0.25, 555, 0, 5, 0, 0, 0, 0, 15], "semantic": {"name": "__init__", "arg_names": ["self", "files", "patternOrRE", "replacement", "recordResults"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, files, patternOrRE, replacement,\n recordResults=True):\n\n \n if isinstance(patternOrRE, basestring):\n self._regex = re.compile(patternOrRE)\n else:\n self._regex = patternOrRE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L225_C8", "label": "if", "type": "if", "loc": [225, 228], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "vector": [4, 2, 0.6345, 0.0112, 2, 0.34, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(patternOrRE, basestring):\n self._regex = re.compile(patternOrRE)\n else:\n self._regex = patternOrRE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L226_C12", "label": "self._regex = compile()", "type": "assigned_variable", "loc": [226, 226], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L225_C8", "vector": [14, 3, 0.6331, 0.0028, 3, 0.05, 0.0, 372, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "self._regex", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " self._regex = re.compile(patternOrRE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L228_C12", "label": "self._regex =", "type": "assigned_variable", "loc": [228, 228], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L225_C8", "vector": [14, 3, 0.6387, 0.0028, 3, 0.05, 1.0, 372, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._regex", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._regex = patternOrRE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L229_C8", "label": "if", "type": "if", "loc": [229, 232], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "vector": [4, 2, 0.6457, 0.0112, 2, 0.34, 0.125, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(replacement, basestring):\n self._subber = _GenSubberFunc(replacement).subberFunc()\n else:\n self._subber = replacement"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L230_C12", "label": "self._subber = subberFunc()", "type": "assigned_variable", "loc": [230, 230], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L229_C8", "vector": [14, 3, 0.6443, 0.0028, 3, 0.8, 0.0, 499, 3, 0, 0, 0, 152, 10, 2], "semantic": {"name": "self._subber", "arg_names": [], "import_names": [], "rhs_call_name": "subberFunc", "annotation": ""}, "snippet": " self._subber = _GenSubberFunc(replacement).subberFunc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L232_C12", "label": "self._subber =", "type": "assigned_variable", "loc": [232, 232], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L229_C8", "vector": [14, 3, 0.6499, 0.0028, 3, 0.8, 1.0, 499, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._subber", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._subber = replacement"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L234_C8", "label": "self._pattern =", "type": "assigned_variable", "loc": [234, 234], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "vector": [14, 2, 0.6555, 0.0028, 2, 0.34, 0.25, 701, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._pattern", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._pattern = pattern = self._regex.pattern"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L235_C8", "label": "self._files =", "type": "assigned_variable", "loc": [235, 235], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "vector": [14, 2, 0.6583, 0.0028, 2, 0.34, 0.375, 643, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._files", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._files = files"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L236_C8", "label": "self._results =", "type": "assigned_variable", "loc": [236, 236], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "vector": [14, 2, 0.6611, 0.0028, 2, 0.34, 0.5, 936, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._results", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._results = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L237_C8", "label": "self._recordResults =", "type": "assigned_variable", "loc": [237, 237], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "vector": [14, 2, 0.6639, 0.0028, 2, 0.34, 0.625, 154, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._recordResults", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._recordResults = recordResults"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L240_C8", "label": "self._usePgrep =", "type": "assigned_variable", "loc": [240, 240], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "vector": [14, 2, 0.6723, 0.0028, 2, 0.34, 0.75, 327, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._usePgrep", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._usePgrep = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L241_C8", "label": "if", "type": "if", "loc": [241, 248], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "vector": [4, 2, 0.6849, 0.0224, 2, 0.34, 0.875, 0, 3, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (os.popen3('pgrep')[2].read()).startswith('Usage:'):\n ## now check to make sure pgrep understands the pattern\n tmpFile = mktemp()\n open(tmpFile, 'w').write('#')\n if not (os.popen3('pgrep \"' + pattern + '\" ' + tmpFile)[2].read()):\n # it didn't print an error msg so we're ok\n self._usePgrep = True\n os.remove(tmpFile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L243_C12", "label": "tmpFile = mktemp()", "type": "assigned_variable", "loc": [243, 243], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L241_C8", "vector": [14, 3, 0.6807, 0.0028, 3, 0.73, 0.0, 185, 3, 0, 0, 0, 357, 10, 1], "semantic": {"name": "tmpFile", "arg_names": [], "import_names": [], "rhs_call_name": "mktemp", "annotation": ""}, "snippet": " tmpFile = mktemp()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L244_C12", "label": "write()", "type": "expression", "loc": [244, 244], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L241_C8", "vector": [8, 3, 0.6835, 0.0028, 3, 0.73, 0.3333, 837, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " open(tmpFile, 'w').write('#')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L245_C12", "label": "if", "type": "if", "loc": [245, 247], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L241_C8", "vector": [4, 3, 0.6891, 0.0084, 3, 0.73, 0.6667, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not (os.popen3('pgrep \"' + pattern + '\" ' + tmpFile)[2].read()):\n # it didn't print an error msg so we're ok\n self._usePgrep = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L247_C16", "label": "self._usePgrep =", "type": "assigned_variable", "loc": [247, 247], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L245_C12", "vector": [14, 4, 0.6919, 0.0028, 4, 0.74, 0.0, 327, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._usePgrep", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._usePgrep = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L248_C12", "label": "remove()", "type": "expression", "loc": [248, 248], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L241_C8", "vector": [8, 3, 0.6947, 0.0028, 3, 0.73, 1.0, 185, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove", "arg_names": [], "import_names": [], "rhs_call_name": "remove", "annotation": ""}, "snippet": " os.remove(tmpFile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L250_C8", "label": "_run()", "type": "expression", "loc": [250, 250], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "vector": [8, 2, 0.7003, 0.0028, 2, 0.34, 1.0, 736, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_run", "arg_names": [], "import_names": [], "rhs_call_name": "_run", "annotation": ""}, "snippet": " self._run()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L252_C4", "label": "results", "type": "function", "loc": [252, 253], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L211_C0", "vector": [2, 1, 0.7073, 0.0056, 1, 0.81, 0.5, 143, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "results", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def results(self):\n return self._results"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L253_C8", "label": "return", "type": "return", "loc": [253, 253], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L252_C4", "vector": [13, 2, 0.7087, 0.0028, 2, 0.67, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._results"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L255_C4", "label": "_run", "type": "function", "loc": [255, 279], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L211_C0", "vector": [2, 1, 0.7479, 0.07, 1, 0.81, 0.75, 736, 0, 1, 0, 0, 0, 0, 13], "semantic": {"name": "_run", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _run(self):\n regex = self._regex\n subber = self._subDispatcher\n usePgrep = self._usePgrep\n pattern = self._pattern\n for file in self._files:\n if not os.path.isfile(file):\n continue # skip dirs etc."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L256_C8", "label": "regex =", "type": "assigned_variable", "loc": [256, 256], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L255_C4", "vector": [14, 2, 0.7171, 0.0028, 2, 0.36, 0.0, 552, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "regex", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " regex = self._regex"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L257_C8", "label": "subber =", "type": "assigned_variable", "loc": [257, 257], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L255_C4", "vector": [14, 2, 0.7199, 0.0028, 2, 0.36, 0.25, 261, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "subber", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " subber = self._subDispatcher"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L258_C8", "label": "usePgrep =", "type": "assigned_variable", "loc": [258, 258], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L255_C4", "vector": [14, 2, 0.7227, 0.0028, 2, 0.36, 0.5, 825, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "usePgrep", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " usePgrep = self._usePgrep"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L259_C8", "label": "pattern =", "type": "assigned_variable", "loc": [259, 259], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L255_C4", "vector": [14, 2, 0.7255, 0.0028, 2, 0.36, 0.75, 561, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pattern", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pattern = self._pattern"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L260_C8", "label": "for file", "type": "for", "loc": [260, 279], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L255_C4", "vector": [6, 2, 0.7549, 0.056, 2, 0.36, 1.0, 107, 7, 0, 0, 0, 0, 0, 13], "semantic": {"name": "file", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for file in self._files:\n if not os.path.isfile(file):\n continue # skip dirs etc.\n \n self._currFile = file\n found = False\n if 'orig' in locals():\n del orig"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L261_C12", "label": "if", "type": "if", "loc": [261, 262], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L260_C8", "vector": [4, 3, 0.7325, 0.0056, 3, 0.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not os.path.isfile(file):\n continue # skip dirs etc."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L264_C12", "label": "self._currFile =", "type": "assigned_variable", "loc": [264, 264], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L260_C8", "vector": [14, 3, 0.7395, 0.0028, 3, 0.2, 0.2, 464, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._currFile", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currFile = file"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L265_C12", "label": "found =", "type": "assigned_variable", "loc": [265, 265], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L260_C8", "vector": [14, 3, 0.7423, 0.0028, 3, 0.2, 0.4, 841, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "found", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " found = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L266_C12", "label": "if", "type": "if", "loc": [266, 267], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L260_C8", "vector": [4, 3, 0.7465, 0.0056, 3, 0.2, 0.6, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'orig' in locals():\n del orig"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L268_C12", "label": "if", "type": "if", "loc": [268, 274], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L260_C8", "vector": [4, 3, 0.7591, 0.0196, 3, 0.2, 0.8, 0, 7, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._usePgrep:\n if os.popen('pgrep \"' + pattern + '\" ' + file ).read():\n found = True\n else:\n orig = open(file).read()\n if regex.search(orig):\n found = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L269_C16", "label": "if", "type": "if", "loc": [269, 270], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L268_C12", "vector": [4, 4, 0.7549, 0.0056, 4, 0.62, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if os.popen('pgrep \"' + pattern + '\" ' + file ).read():\n found = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L270_C20", "label": "found =", "type": "assigned_variable", "loc": [270, 270], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L269_C16", "vector": [14, 5, 0.7563, 0.0028, 5, 0.46, 0.0, 841, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "found", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " found = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L272_C16", "label": "orig = read()", "type": "assigned_variable", "loc": [272, 272], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L268_C12", "vector": [14, 4, 0.7619, 0.0028, 4, 0.62, 0.5, 310, 3, 0, 0, 0, 453, 10, 2], "semantic": {"name": "orig", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " orig = open(file).read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L273_C16", "label": "if", "type": "if", "loc": [273, 274], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L268_C12", "vector": [4, 4, 0.7661, 0.0056, 4, 0.62, 1.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if regex.search(orig):\n found = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L274_C20", "label": "found =", "type": "assigned_variable", "loc": [274, 274], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L273_C16", "vector": [14, 5, 0.7675, 0.0028, 5, 0.91, 0.0, 841, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "found", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " found = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L275_C12", "label": "if", "type": "if", "loc": [275, 279], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L260_C8", "vector": [4, 3, 0.7759, 0.014, 3, 0.2, 1.0, 0, 2, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if found:\n if 'orig' not in locals():\n orig = open(file).read()\n new = regex.sub(subber, orig)\n open(file, 'w').write(new)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L276_C16", "label": "if", "type": "if", "loc": [276, 277], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L275_C12", "vector": [4, 4, 0.7745, 0.0056, 4, 0.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'orig' not in locals():\n orig = open(file).read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L277_C20", "label": "orig = read()", "type": "assigned_variable", "loc": [277, 277], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L276_C16", "vector": [14, 5, 0.7759, 0.0028, 5, 0.61, 0.0, 310, 3, 0, 0, 0, 453, 10, 2], "semantic": {"name": "orig", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " orig = open(file).read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L278_C16", "label": "new = sub()", "type": "assigned_variable", "loc": [278, 278], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L275_C12", "vector": [14, 4, 0.7787, 0.0028, 4, 0.4, 0.5, 145, 3, 2, 0, 0, 819, 10, 1], "semantic": {"name": "new", "arg_names": [], "import_names": [], "rhs_call_name": "sub", "annotation": ""}, "snippet": " new = regex.sub(subber, orig)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L279_C16", "label": "write()", "type": "expression", "loc": [279, 279], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L275_C12", "vector": [8, 4, 0.7815, 0.0028, 4, 0.4, 1.0, 837, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " open(file, 'w').write(new)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L281_C4", "label": "_subDispatcher", "type": "function", "loc": [281, 295], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L211_C0", "vector": [2, 1, 0.8067, 0.042, 1, 0.81, 1.0, 767, 0, 2, 1, 0, 0, 0, 5], "semantic": {"name": "_subDispatcher", "arg_names": ["self", "match"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _subDispatcher(self, match):\n if self._recordResults:\n if self._currFile not in self._results:\n res = self._results[self._currFile] = {}\n res['count'] = 0\n res['matches'] = []\n else:\n res = self._results[self._currFile]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L282_C8", "label": "if", "type": "if", "loc": [282, 294], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L281_C4", "vector": [4, 2, 0.8067, 0.0364, 2, 0.51, 0.0, 0, 7, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._recordResults:\n if self._currFile not in self._results:\n res = self._results[self._currFile] = {}\n res['count'] = 0\n res['matches'] = []\n else:\n res = self._results[self._currFile]\n res['count'] += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L283_C12", "label": "if", "type": "if", "loc": [283, 288], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L282_C8", "vector": [4, 3, 0.7997, 0.0168, 3, 0.27, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._currFile not in self._results:\n res = self._results[self._currFile] = {}\n res['count'] = 0\n res['matches'] = []\n else:\n res = self._results[self._currFile]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L284_C16", "label": "res =", "type": "assigned_variable", "loc": [284, 284], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L283_C12", "vector": [14, 4, 0.7955, 0.0028, 4, 0.73, 0.0, 413, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "res", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " res = self._results[self._currFile] = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L285_C16", "label": "assign", "type": "assigned_variable", "loc": [285, 285], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L283_C12", "vector": [14, 4, 0.7983, 0.0028, 4, 0.73, 0.3333, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " res['count'] = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L286_C16", "label": "assign", "type": "assigned_variable", "loc": [286, 286], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L283_C12", "vector": [14, 4, 0.8011, 0.0028, 4, 0.73, 0.6667, 0, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " res['matches'] = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L288_C16", "label": "res =", "type": "assigned_variable", "loc": [288, 288], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L283_C12", "vector": [14, 4, 0.8067, 0.0028, 4, 0.73, 1.0, 413, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "res", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " res = self._results[self._currFile]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L290_C12", "label": "append()", "type": "expression", "loc": [290, 294], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L282_C8", "vector": [8, 3, 0.8179, 0.014, 3, 0.27, 1.0, 243, 3, 1, 0, 0, 0, 0, 4], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " res['matches'].append({'contents': match.group(),\n 'start': match.start(),\n 'end': match.end(),\n }\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L295_C8", "label": "return", "type": "return", "loc": [295, 295], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L281_C4", "vector": [13, 2, 0.8263, 0.0028, 2, 0.51, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._subber(match)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L298_C0", "label": "SourceFileStats", "type": "class", "loc": [298, 357], "level": 0, "parent": null, "vector": [3, 0, 0.9174, 0.1681, 0, 0.66, 1.0, 301, 0, 5, 0, 0, 0, 0, 11], "semantic": {"name": "SourceFileStats", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class SourceFileStats:\n\n \"\"\"\n \"\"\"\n \n _fileStats = None\n \n def __init__(self, files):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L300_C4", "label": "expression", "type": "expression", "loc": [300, 301], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L298_C0", "vector": [8, 1, 0.8417, 0.0056, 1, 0.35, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L303_C4", "label": "_fileStats =", "type": "assigned_variable", "loc": [303, 303], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L298_C0", "vector": [14, 1, 0.8487, 0.0028, 1, 0.35, 0.1667, 604, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "_fileStats", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _fileStats = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L305_C4", "label": "__init__", "type": "function", "loc": [305, 308], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L298_C0", "vector": [2, 1, 0.8585, 0.0112, 1, 0.35, 0.3333, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "files"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, files):\n self._fileStats = stats = {}\n for file in files:\n stats[file] = self.getFileStats(file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L306_C8", "label": "self._fileStats =", "type": "assigned_variable", "loc": [306, 306], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L305_C4", "vector": [14, 2, 0.8571, 0.0028, 2, 0.21, 0.0, 970, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._fileStats", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._fileStats = stats = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L307_C8", "label": "for file", "type": "for", "loc": [307, 308], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L305_C4", "vector": [6, 2, 0.8613, 0.0056, 2, 0.21, 1.0, 107, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "file", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for file in files:\n stats[file] = self.getFileStats(file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L308_C12", "label": " = getFileStats()", "type": "assigned_variable", "loc": [308, 308], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L307_C8", "vector": [14, 3, 0.8627, 0.0028, 3, 0.91, 0.0, 0, 3, 1, 0, 0, 467, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "getFileStats", "annotation": ""}, "snippet": " stats[file] = self.getFileStats(file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L310_C4", "label": "rawStats", "type": "function", "loc": [310, 311], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L298_C0", "vector": [2, 1, 0.8697, 0.0056, 1, 0.35, 0.5, 885, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "rawStats", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def rawStats(self):\n return self._fileStats"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L311_C8", "label": "return", "type": "return", "loc": [311, 311], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L310_C4", "vector": [13, 2, 0.8711, 0.0028, 2, 0.6, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._fileStats"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L313_C4", "label": "summary", "type": "function", "loc": [313, 329], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L298_C0", "vector": [2, 1, 0.8992, 0.0476, 1, 0.35, 0.6667, 977, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "summary", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def summary(self):\n codeLines = 0\n blankLines = 0\n commentLines = 0\n totalLines = 0\n for fileStats in self.rawStats().values():\n codeLines += fileStats['codeLines']\n blankLines += fileStats['blankLines']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L314_C8", "label": "codeLines =", "type": "assigned_variable", "loc": [314, 314], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L313_C4", "vector": [14, 2, 0.8796, 0.0028, 2, 0.17, 0.0, 45, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "codeLines", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " codeLines = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L315_C8", "label": "blankLines =", "type": "assigned_variable", "loc": [315, 315], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L313_C4", "vector": [14, 2, 0.8824, 0.0028, 2, 0.17, 0.1667, 72, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "blankLines", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " blankLines = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L316_C8", "label": "commentLines =", "type": "assigned_variable", "loc": [316, 316], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L313_C4", "vector": [14, 2, 0.8852, 0.0028, 2, 0.17, 0.3333, 226, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "commentLines", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " commentLines = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L317_C8", "label": "totalLines =", "type": "assigned_variable", "loc": [317, 317], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L313_C4", "vector": [14, 2, 0.888, 0.0028, 2, 0.17, 0.5, 126, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "totalLines", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " totalLines = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L318_C8", "label": "for fileStats", "type": "for", "loc": [318, 322], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L313_C4", "vector": [6, 2, 0.8964, 0.014, 2, 0.17, 0.6667, 712, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "fileStats", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for fileStats in self.rawStats().values():\n codeLines += fileStats['codeLines']\n blankLines += fileStats['blankLines']\n commentLines += fileStats['commentLines']\n totalLines += fileStats['totalLines']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L324_C8", "label": "stats =", "type": "assigned_variable", "loc": [324, 328], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L313_C4", "vector": [14, 2, 0.9132, 0.014, 2, 0.17, 0.8333, 318, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "stats", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " stats = {'codeLines': codeLines,\n 'blankLines': blankLines,\n 'commentLines': commentLines,\n 'totalLines': totalLines,\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L329_C8", "label": "return", "type": "return", "loc": [329, 329], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L313_C4", "vector": [13, 2, 0.9216, 0.0028, 2, 0.17, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return stats"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L331_C4", "label": "printStats", "type": "function", "loc": [331, 332], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L298_C0", "vector": [2, 1, 0.9286, 0.0056, 1, 0.35, 0.8333, 717, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "printStats", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def printStats(self):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "label": "getFileStats", "type": "function", "loc": [334, 357], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L298_C0", "vector": [2, 1, 0.9678, 0.0672, 1, 0.35, 1.0, 467, 0, 2, 1, 0, 0, 0, 8], "semantic": {"name": "getFileStats", "arg_names": ["self", "fileName"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getFileStats(self, fileName):\n codeLines = 0\n blankLines = 0\n commentLines = 0 \n commentLineRe = re.compile(r'\\s#.*$')\n blankLineRe = re.compile('\\s$')\n lines = open(fileName).read().splitlines()\n totalLines = len(lines)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L335_C8", "label": "codeLines =", "type": "assigned_variable", "loc": [335, 335], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "vector": [14, 2, 0.9384, 0.0028, 2, 0.24, 0.0, 45, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "codeLines", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " codeLines = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L336_C8", "label": "blankLines =", "type": "assigned_variable", "loc": [336, 336], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "vector": [14, 2, 0.9412, 0.0028, 2, 0.24, 0.1111, 72, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "blankLines", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " blankLines = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L337_C8", "label": "commentLines =", "type": "assigned_variable", "loc": [337, 337], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "vector": [14, 2, 0.944, 0.0028, 2, 0.24, 0.2222, 226, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "commentLines", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " commentLines = 0 "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L338_C8", "label": "commentLineRe = compile()", "type": "assigned_variable", "loc": [338, 338], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "vector": [14, 2, 0.9468, 0.0028, 2, 0.24, 0.3333, 429, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "commentLineRe", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " commentLineRe = re.compile(r'\\s#.*$')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L339_C8", "label": "blankLineRe = compile()", "type": "assigned_variable", "loc": [339, 339], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "vector": [14, 2, 0.9496, 0.0028, 2, 0.24, 0.4444, 773, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "blankLineRe", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " blankLineRe = re.compile('\\s$')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L340_C8", "label": "lines = splitlines()", "type": "assigned_variable", "loc": [340, 340], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "vector": [14, 2, 0.9524, 0.0028, 2, 0.24, 0.5556, 73, 3, 0, 0, 0, 296, 10, 3], "semantic": {"name": "lines", "arg_names": [], "import_names": [], "rhs_call_name": "splitlines", "annotation": ""}, "snippet": " lines = open(fileName).read().splitlines()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L341_C8", "label": "totalLines = len()", "type": "assigned_variable", "loc": [341, 341], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "vector": [14, 2, 0.9552, 0.0028, 2, 0.24, 0.6667, 126, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "totalLines", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " totalLines = len(lines)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L343_C8", "label": "for line", "type": "for", "loc": [343, 349], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "vector": [6, 2, 0.9692, 0.0196, 2, 0.24, 0.7778, 373, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in lines:\n if commentLineRe.match(line):\n commentLines += 1\n elif blankLineRe.match(line):\n blankLines += 1\n else:\n codeLines += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L344_C12", "label": "if", "type": "if", "loc": [344, 349], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L343_C8", "vector": [4, 3, 0.9706, 0.0168, 3, 0.24, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if commentLineRe.match(line):\n commentLines += 1\n elif blankLineRe.match(line):\n blankLines += 1\n else:\n codeLines += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L346_C12", "label": "if", "type": "if", "loc": [346, 349], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L344_C12", "vector": [4, 4, 0.9734, 0.0112, 4, 0.67, 0.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif blankLineRe.match(line):\n blankLines += 1\n else:\n codeLines += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L351_C8", "label": "stats =", "type": "assigned_variable", "loc": [351, 355], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "vector": [14, 2, 0.9888, 0.014, 2, 0.24, 0.8889, 318, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "stats", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " stats = {'codeLines': codeLines,\n 'blankLines': blankLines,\n 'commentLines': commentLines,\n 'totalLines': totalLines,\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L357_C8", "label": "return", "type": "return", "loc": [357, 357], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "vector": [13, 2, 1.0, 0.0028, 2, 0.24, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return stats"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L55_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L55_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L55_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L55_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L55_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L55_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L67_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L81_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:While_L84_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:While_L84_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L85_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:While_L84_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L87_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:While_L84_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L90_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L90_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L91_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L90_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L92_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L92_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L93_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L93_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L94_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L98_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L100_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L103_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L105_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L105_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L106_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L108_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L108_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L109_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L113_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L117_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L118_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L120_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L120_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L121_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L120_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L122_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L120_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L123_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L120_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L124_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L126_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L126_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L127_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L129_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L129_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L130_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L132_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L133_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L135_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L136_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L138_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L141_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L141_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L142_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L142_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L143_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L141_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L144_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L141_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L145_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L145_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L146_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L145_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L148_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L152_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L152_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L153_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L155_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L155_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L156_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L155_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L157_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L155_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L158_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L160_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L160_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L161_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L163_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L164_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L166_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L170_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L170_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:While_L171_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:While_L171_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L172_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L172_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L173_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L172_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L174_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L174_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L175_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L174_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L177_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L179_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L179_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L180_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L179_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:While_L181_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:While_L181_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L182_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L182_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L185_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L179_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L186_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L179_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L187_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L189_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L189_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L190_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L192_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L192_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L193_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L195_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L195_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L196_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L200_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L200_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L201_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L203_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L204_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L206_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L206_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L207_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L206_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L208_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L211_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L213_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L211_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L225_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L225_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L226_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L225_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L228_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L229_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L229_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L230_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L229_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L232_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L234_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L235_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L236_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L237_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L240_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L241_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L241_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L243_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L241_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L244_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L241_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L245_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L245_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L247_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L241_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L248_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L221_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L250_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L211_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L252_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L252_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L253_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L211_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L255_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L255_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L256_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L255_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L257_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L255_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L258_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L255_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L259_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L255_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L260_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L260_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L261_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L260_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L264_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L260_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L265_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L260_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L266_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L260_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L268_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L268_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L269_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L269_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L270_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L268_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L272_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L268_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L273_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L273_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L274_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L260_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L275_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L275_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L276_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L276_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L277_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L275_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L278_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L275_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L279_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L211_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L281_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L281_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L282_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L282_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L283_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L283_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L284_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L283_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L285_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L283_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L286_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L283_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L288_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L282_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L290_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L281_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L295_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L298_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Expr_L300_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L298_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L303_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L298_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L305_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L305_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L306_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L305_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L307_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L307_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L308_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L298_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L310_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L310_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L311_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L298_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L313_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L313_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L314_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L313_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L315_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L313_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L316_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L313_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L317_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L313_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L318_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L313_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L324_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L313_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L329_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L298_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L331_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:ClassDef_L298_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L335_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L336_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L337_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L338_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L339_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L340_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L341_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L343_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:For_L343_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L344_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L344_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:If_L346_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Assign_L351_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1497:FunctionDef_L334_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1497:Return_L357_C8"}]
#
ajibawa-2023/Python-Code-Large/train/row_1499
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
import gettext _ = gettext.gettext class I18n(object): def __init__(self, parser): pass ## junk I'm playing with to test the macro framework # def parseArgs(self, parser, startPos): # parser.getWhiteSpace() # args = parser.getExpression(useNameMapper=False, # pyTokensToBreakAt=[':']).strip() # return args # # def convertArgStrToDict(self, args, parser=None, startPos=None): # def getArgs(*pargs, **kws): # return pargs, kws # exec 'positionalArgs, kwArgs = getArgs(%(args)s)'%locals() # return kwArgs def __call__(self, src, # aka message, plural=None, n=None, # should be a string representing the name of the # '$var' rather than $var itself id=None, domain=None, source=None, target=None, comment=None, # args that are automatically supplied by the parser when the # macro is called: parser=None, macros=None, isShortForm=False, EOLCharsInShortForm=None, startPos=None, endPos=None, ): """This is just a stub at this time. plural = the plural form of the message n = a sized argument to distinguish between single and plural forms id = msgid in the translation catalog domain = translation domain source = source lang target = a specific target lang comment = a comment to the translation team See the following for some ideas http://www.zope.org/DevHome/Wikis/DevSite/Projects/ComponentArchitecture/ZPTInternationalizationSupport Other notes: - There is no need to replicate the i18n:name attribute from plone / PTL, as cheetah placeholders serve the same purpose """ #print macros['i18n'] src = _(src) if isShortForm and endPos<len(parser): return src+EOLCharsInShortForm else: return src
ajibawa-2023/Python-Code-Large/train/row_1500
10
67
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1500:Import_L1_C0", "label": "gettext import gettext", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0149, 0.0149, 0, 0.66, 0.0, 723, 0, 1, 0, 0, 723, 0, 0], "semantic": {"name": "gettext", "arg_names": [], "import_names": ["gettext"], "rhs_call_name": "", "annotation": ""}, "snippet": "import gettext"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1500:Assign_L2_C0", "label": "_ =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.0299, 0.0149, 0, 0.66, 0.5, 660, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "_ = gettext.gettext"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1500:ClassDef_L3_C0", "label": "I18n", "type": "class", "loc": [3, 66], "level": 0, "parent": null, "vector": [3, 0, 0.5149, 0.9552, 0, 0.66, 1.0, 780, 0, 2, 0, 0, 186, 0, 2], "semantic": {"name": "I18n", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class I18n(object):\n def __init__(self, parser):\n pass\n\n## junk I'm playing with to test the macro framework \n# def parseArgs(self, parser, startPos):\n# parser.getWhiteSpace()\n# args = parser.getExpression(useNameMapper=False,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1500:FunctionDef_L4_C4", "label": "__init__", "type": "function", "loc": [4, 5], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1500:ClassDef_L3_C0", "vector": [2, 1, 0.0672, 0.0299, 1, 0.52, 0.0, 555, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "parser"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, parser):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1500:FunctionDef_L20_C4", "label": "__call__", "type": "function", "loc": [20, 66], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1500:ClassDef_L3_C0", "vector": [2, 1, 0.6418, 0.7015, 1, 0.52, 1.0, 319, 0, 15, 1, 0, 0, 0, 2], "semantic": {"name": "__call__", "arg_names": ["self", "src", "plural", "n", "id", "domain", "source", "target", "comment", "parser", "macros", "isShortForm", "EOLCharsInShortForm", "startPos", "endPos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __call__(self,\n src, # aka message,\n plural=None,\n n=None, # should be a string representing the name of the\n # '$var' rather than $var itself \n id=None,\n domain=None,\n source=None,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1500:Expr_L40_C8", "label": "expression", "type": "expression", "loc": [40, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1500:FunctionDef_L20_C4", "vector": [8, 2, 0.7388, 0.2985, 2, 0.79, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"This is just a stub at this time.\n\n\t plural = the plural form of the message\n\t n = a sized argument to distinguish between single and plural forms \n\n \t id = msgid in the translation catalog\n\t domain = translation domain\n\t source = source lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1500:Assign_L62_C8", "label": "src = _()", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1500:FunctionDef_L20_C4", "vector": [14, 2, 0.9254, 0.0149, 2, 0.79, 0.5, 345, 3, 1, 0, 0, 660, 10, 1], "semantic": {"name": "src", "arg_names": [], "import_names": [], "rhs_call_name": "_", "annotation": ""}, "snippet": " src = _(src)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1500:If_L63_C8", "label": "if", "type": "if", "loc": [63, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1500:FunctionDef_L20_C4", "vector": [4, 2, 0.9627, 0.0597, 2, 0.79, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isShortForm and endPos<len(parser):\n return src+EOLCharsInShortForm\n else:\n return src"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1500:Return_L64_C12", "label": "return", "type": "return", "loc": [64, 64], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1500:If_L63_C8", "vector": [13, 3, 0.9552, 0.0149, 3, 0.74, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return src+EOLCharsInShortForm"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1500:Return_L66_C12", "label": "return", "type": "return", "loc": [66, 66], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1500:If_L63_C8", "vector": [13, 3, 0.9851, 0.0149, 3, 0.74, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return src"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1500:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1500:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1500:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1500:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1500:FunctionDef_L20_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1500:Expr_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1500:FunctionDef_L20_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1500:Assign_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1500:FunctionDef_L20_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1500:If_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1500:If_L63_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1500:Return_L64_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1500:If_L63_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1500:Return_L66_C12"}]
''' Compiler classes for Cheetah: ModuleCompiler aka 'Compiler' ClassCompiler MethodCompiler If you are trying to grok this code start with ModuleCompiler.__init__, ModuleCompiler.compile, and ModuleCompiler.__getattr__. ''' import sys import os import os.path from os.path import getmtime, exists import re import types import time import random import warnings import copy from Cheetah.Version import Version, VersionTuple from Cheetah.SettingsManager import SettingsManager from Cheetah.Utils.Indenter import indentize # an undocumented preprocessor from Cheetah import ErrorCatchers from Cheetah import NameMapper from Cheetah.Parser import Parser, ParseError, specialVarRE, \ STATIC_CACHE, REFRESH_CACHE, SET_LOCAL, SET_GLOBAL, SET_MODULE, \ unicodeDirectiveRE, encodingDirectiveRE, escapedNewlineRE from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time class Error(Exception): pass # Settings format: (key, default, docstring) _DEFAULT_COMPILER_SETTINGS = [ ('useNameMapper', True, 'Enable NameMapper for dotted notation and searchList support'), ('useSearchList', True, 'Enable the searchList, requires useNameMapper=True, if disabled, first portion of the $variable is a global, builtin, or local variable that doesn\'t need looking up in the searchList'), ('allowSearchListAsMethArg', True, ''), ('useAutocalling', True, 'Detect and call callable objects in searchList, requires useNameMapper=True'), ('useStackFrames', True, 'Used for NameMapper.valueFromFrameOrSearchList rather than NameMapper.valueFromSearchList'), ('useErrorCatcher', False, 'Turn on the #errorCatcher directive for catching NameMapper errors, etc'), ('alwaysFilterNone', True, 'Filter out None prior to calling the #filter'), ('useFilters', True, 'If False, pass output through str()'), ('includeRawExprInFilterArgs', True, ''), ('useLegacyImportMode', True, 'All #import statements are relocated to the top of the generated Python module'), ('prioritizeSearchListOverSelf', False, 'When iterating the searchList, look into the searchList passed into the initializer instead of Template members first'), ('autoAssignDummyTransactionToSelf', False, ''), ('useKWsDictArgForPassingTrans', True, ''), ('commentOffset', 1, ''), ('outputRowColComments', True, ''), ('includeBlockMarkers', False, 'Wrap #block\'s in a comment in the template\'s output'), ('blockMarkerStart', ('\n<!-- START BLOCK: ', ' -->\n'), ''), ('blockMarkerEnd', ('\n<!-- END BLOCK: ', ' -->\n'), ''), ('defDocStrMsg', 'Autogenerated by Cheetah: The Python-Powered Template Engine', ''), ('setup__str__method', False, ''), ('mainMethodName', 'respond', ''), ('mainMethodNameForSubclasses', 'writeBody', ''), ('indentationStep', ' ' * 4, ''), ('initialMethIndentLevel', 2, ''), ('monitorSrcFile', False, ''), ('outputMethodsBeforeAttributes', True, ''), ('addTimestampsToCompilerOutput', True, ''), ## Customizing the #extends directive ('autoImportForExtendsDirective', True, ''), ('handlerForExtendsDirective', None, ''), ('disabledDirectives', [], 'List of directive keys to disable (without starting "#")'), ('enabledDirectives', [], 'List of directive keys to enable (without starting "#")'), ('disabledDirectiveHooks', [], 'callable(parser, directiveKey)'), ('preparseDirectiveHooks', [], 'callable(parser, directiveKey)'), ('postparseDirectiveHooks', [], 'callable(parser, directiveKey)'), ('preparsePlaceholderHooks', [], 'callable(parser)'), ('postparsePlaceholderHooks', [], 'callable(parser)'), ('expressionFilterHooks', [], '''callable(parser, expr, exprType, rawExpr=None, startPos=None), exprType is the name of the directive, "psp" or "placeholder" The filters *must* return the expr or raise an expression, they can modify the expr if needed'''), ('templateMetaclass', None, 'Strictly optional, only will work with new-style basecalsses as well'), ('i18NFunctionName', 'self.i18n', ''), ('cheetahVarStartToken', '$', ''), ('commentStartToken', '##', ''), ('multiLineCommentStartToken', '#*', ''), ('multiLineCommentEndToken', '*#', ''), ('gobbleWhitespaceAroundMultiLineComments', True, ''), ('directiveStartToken', '#', ''), ('directiveEndToken', '#', ''), ('allowWhitespaceAfterDirectiveStartToken', False, ''), ('PSPStartToken', '<%', ''), ('PSPEndToken', '%>', ''), ('EOLSlurpToken', '#', ''), ('gettextTokens', ["_", "N_", "ngettext"], ''), ('allowExpressionsInExtendsDirective', False, ''), ('allowEmptySingleLineMethods', False, ''), ('allowNestedDefScopes', True, ''), ('allowPlaceholderFilterArgs', True, ''), ] DEFAULT_COMPILER_SETTINGS = dict([(v[0], v[1]) for v in _DEFAULT_COMPILER_SETTINGS]) class GenUtils(object): """An abstract baseclass for the Compiler classes that provides methods that perform generic utility functions or generate pieces of output code from information passed in by the Parser baseclass. These methods don't do any parsing themselves. """ def genTimeInterval(self, timeString): ##@@ TR: need to add some error handling here if timeString[-1] == 's': interval = float(timeString[:-1]) elif timeString[-1] == 'm': interval = float(timeString[:-1])*60 elif timeString[-1] == 'h': interval = float(timeString[:-1])*60*60 elif timeString[-1] == 'd': interval = float(timeString[:-1])*60*60*24 elif timeString[-1] == 'w': interval = float(timeString[:-1])*60*60*24*7 else: # default to minutes interval = float(timeString)*60 return interval def genCacheInfo(self, cacheTokenParts): """Decipher a placeholder cachetoken """ cacheInfo = {} if cacheTokenParts['REFRESH_CACHE']: cacheInfo['type'] = REFRESH_CACHE cacheInfo['interval'] = self.genTimeInterval(cacheTokenParts['interval']) elif cacheTokenParts['STATIC_CACHE']: cacheInfo['type'] = STATIC_CACHE return cacheInfo # is empty if no cache def genCacheInfoFromArgList(self, argList): cacheInfo = {'type':REFRESH_CACHE} for key, val in argList: if val[0] in '"\'': val = val[1:-1] if key == 'timer': key = 'interval' val = self.genTimeInterval(val) cacheInfo[key] = val return cacheInfo def genCheetahVar(self, nameChunks, plain=False): if nameChunks[0][0] in self.setting('gettextTokens'): self.addGetTextVar(nameChunks) if self.setting('useNameMapper') and not plain: return self.genNameMapperVar(nameChunks) else: return self.genPlainVar(nameChunks) def addGetTextVar(self, nameChunks): """Output something that gettext can recognize. This is a harmless side effect necessary to make gettext work when it is scanning compiled templates for strings marked for translation. @@TR: another marginally more efficient approach would be to put the output in a dummy method that is never called. """ # @@TR: this should be in the compiler not here self.addChunk("if False:") self.indent() self.addChunk(self.genPlainVar(nameChunks[:])) self.dedent() def genPlainVar(self, nameChunks): """Generate Python code for a Cheetah $var without using NameMapper (Unified Dotted Notation with the SearchList). """ nameChunks.reverse() chunk = nameChunks.pop() pythonCode = chunk[0] + chunk[2] while nameChunks: chunk = nameChunks.pop() pythonCode = (pythonCode + '.' + chunk[0] + chunk[2]) return pythonCode def genNameMapperVar(self, nameChunks): """Generate valid Python code for a Cheetah $var, using NameMapper (Unified Dotted Notation with the SearchList). nameChunks = list of var subcomponents represented as tuples [ (name,useAC,remainderOfExpr), ] where: name = the dotted name base useAC = where NameMapper should use autocalling on namemapperPart remainderOfExpr = any arglist, index, or slice If remainderOfExpr contains a call arglist (e.g. '(1234)') then useAC is False, otherwise it defaults to True. It is overridden by the global setting 'useAutocalling' if this setting is False. EXAMPLE ------------------------------------------------------------------------ if the raw Cheetah Var is $a.b.c[1].d().x.y.z nameChunks is the list [ ('a.b.c',True,'[1]'), # A ('d',False,'()'), # B ('x.y.z',True,''), # C ] When this method is fed the list above it returns VFN(VFN(VFFSL(SL, 'a.b.c',True)[1], 'd',False)(), 'x.y.z',True) which can be represented as VFN(B`, name=C[0], executeCallables=(useAC and C[1]))C[2] where: VFN = NameMapper.valueForName VFFSL = NameMapper.valueFromFrameOrSearchList VFSL = NameMapper.valueFromSearchList # optionally used instead of VFFSL SL = self.searchList() useAC = self.setting('useAutocalling') # True in this example A = ('a.b.c',True,'[1]') B = ('d',False,'()') C = ('x.y.z',True,'') C` = VFN( VFN( VFFSL(SL, 'a.b.c',True)[1], 'd',False)(), 'x.y.z',True) = VFN(B`, name='x.y.z', executeCallables=True) B` = VFN(A`, name=B[0], executeCallables=(useAC and B[1]))B[2] A` = VFFSL(SL, name=A[0], executeCallables=(useAC and A[1]))A[2] Note, if the compiler setting useStackFrames=False (default is true) then A` = VFSL([locals()]+SL+[globals(), __builtin__], name=A[0], executeCallables=(useAC and A[1]))A[2] This option allows Cheetah to be used with Psyco, which doesn't support stack frame introspection. """ defaultUseAC = self.setting('useAutocalling') useSearchList = self.setting('useSearchList') nameChunks.reverse() name, useAC, remainder = nameChunks.pop() if not useSearchList: firstDotIdx = name.find('.') if firstDotIdx != -1 and firstDotIdx < len(name): beforeFirstDot, afterDot = name[:firstDotIdx], name[firstDotIdx+1:] pythonCode = ('VFN(' + beforeFirstDot + ',"' + afterDot + '",' + repr(defaultUseAC and useAC) + ')' + remainder) else: pythonCode = name+remainder elif self.setting('useStackFrames'): pythonCode = ('VFFSL(SL,' '"'+ name + '",' + repr(defaultUseAC and useAC) + ')' + remainder) else: pythonCode = ('VFSL([locals()]+SL+[globals(), __builtin__],' '"'+ name + '",' + repr(defaultUseAC and useAC) + ')' + remainder) ## while nameChunks: name, useAC, remainder = nameChunks.pop() pythonCode = ('VFN(' + pythonCode + ',"' + name + '",' + repr(defaultUseAC and useAC) + ')' + remainder) return pythonCode ################################################## ## METHOD COMPILERS class MethodCompiler(GenUtils): def __init__(self, methodName, classCompiler, initialMethodComment=None, decorators=None): self._settingsManager = classCompiler self._classCompiler = classCompiler self._moduleCompiler = classCompiler._moduleCompiler self._methodName = methodName self._initialMethodComment = initialMethodComment self._setupState() self._decorators = decorators or [] def setting(self, key): return self._settingsManager.setting(key) def _setupState(self): self._indent = self.setting('indentationStep') self._indentLev = self.setting('initialMethIndentLevel') self._pendingStrConstChunks = [] self._methodSignature = None self._methodDef = None self._docStringLines = [] self._methodBodyChunks = [] self._cacheRegionsStack = [] self._callRegionsStack = [] self._captureRegionsStack = [] self._filterRegionsStack = [] self._isErrorCatcherOn = False self._hasReturnStatement = False self._isGenerator = False def cleanupState(self): """Called by the containing class compiler instance """ pass def methodName(self): return self._methodName def setMethodName(self, name): self._methodName = name ## methods for managing indentation def indentation(self): return self._indent * self._indentLev def indent(self): self._indentLev +=1 def dedent(self): if self._indentLev: self._indentLev -=1 else: raise Error('Attempt to dedent when the indentLev is 0') ## methods for final code wrapping def methodDef(self): if self._methodDef: return self._methodDef else: return self.wrapCode() __str__ = methodDef __unicode__ = methodDef def wrapCode(self): self.commitStrConst() methodDefChunks = ( self.methodSignature(), '\n', self.docString(), self.methodBody() ) methodDef = ''.join(methodDefChunks) self._methodDef = methodDef return methodDef def methodSignature(self): return self._indent + self._methodSignature + ':' def setMethodSignature(self, signature): self._methodSignature = signature def methodBody(self): return ''.join( self._methodBodyChunks ) def docString(self): if not self._docStringLines: return '' ind = self._indent*2 docStr = (ind + '"""\n' + ind + ('\n' + ind).join([ln.replace('"""', "'''") for ln in self._docStringLines]) + '\n' + ind + '"""\n') return docStr ## methods for adding code def addMethDocString(self, line): self._docStringLines.append(line.replace('%', '%%')) def addChunk(self, chunk): self.commitStrConst() chunk = "\n" + self.indentation() + chunk self._methodBodyChunks.append(chunk) def appendToPrevChunk(self, appendage): self._methodBodyChunks[-1] = self._methodBodyChunks[-1] + appendage def addWriteChunk(self, chunk): self.addChunk('write(' + chunk + ')') def addFilteredChunk(self, chunk, filterArgs=None, rawExpr=None, lineCol=None): if filterArgs is None: filterArgs = '' if self.setting('includeRawExprInFilterArgs') and rawExpr: filterArgs += ', rawExpr=%s'%repr(rawExpr) if self.setting('alwaysFilterNone'): if rawExpr and rawExpr.find('\n')==-1 and rawExpr.find('\r')==-1: self.addChunk("_v = %s # %r"%(chunk, rawExpr)) if lineCol: self.appendToPrevChunk(' on line %s, col %s'%lineCol) else: self.addChunk("_v = %s"%chunk) if self.setting('useFilters'): self.addChunk("if _v is not None: write(_filter(_v%s))"%filterArgs) else: self.addChunk("if _v is not None: write(str(_v))") else: if self.setting('useFilters'): self.addChunk("write(_filter(%s%s))"%(chunk, filterArgs)) else: self.addChunk("write(str(%s))"%chunk) def _appendToPrevStrConst(self, strConst): if self._pendingStrConstChunks: self._pendingStrConstChunks.append(strConst) else: self._pendingStrConstChunks = [strConst] def commitStrConst(self): """Add the code for outputting the pending strConst without chopping off any whitespace from it. """ if not self._pendingStrConstChunks: return strConst = ''.join(self._pendingStrConstChunks) self._pendingStrConstChunks = [] if not strConst: return reprstr = repr(strConst) i = 0 out = [] if reprstr.startswith('u'): i = 1 out = ['u'] body = escapedNewlineRE.sub('\\1\n', reprstr[i+1:-1]) if reprstr[i]=="'": out.append("'''") out.append(body) out.append("'''") else: out.append('"""') out.append(body) out.append('"""') self.addWriteChunk(''.join(out)) def handleWSBeforeDirective(self): """Truncate the pending strCont to the beginning of the current line. """ if self._pendingStrConstChunks: src = self._pendingStrConstChunks[-1] BOL = max(src.rfind('\n')+1, src.rfind('\r')+1, 0) if BOL < len(src): self._pendingStrConstChunks[-1] = src[:BOL] def isErrorCatcherOn(self): return self._isErrorCatcherOn def turnErrorCatcherOn(self): self._isErrorCatcherOn = True def turnErrorCatcherOff(self): self._isErrorCatcherOn = False # @@TR: consider merging the next two methods into one def addStrConst(self, strConst): self._appendToPrevStrConst(strConst) def addRawText(self, text): self.addStrConst(text) def addMethComment(self, comm): offSet = self.setting('commentOffset') self.addChunk('#' + ' '*offSet + comm) def addPlaceholder(self, expr, filterArgs, rawPlaceholder, cacheTokenParts, lineCol, silentMode=False): cacheInfo = self.genCacheInfo(cacheTokenParts) if cacheInfo: cacheInfo['ID'] = repr(rawPlaceholder)[1:-1] self.startCacheRegion(cacheInfo, lineCol, rawPlaceholder=rawPlaceholder) if self.isErrorCatcherOn(): methodName = self._classCompiler.addErrorCatcherCall( expr, rawCode=rawPlaceholder, lineCol=lineCol) expr = 'self.' + methodName + '(localsDict=locals())' if silentMode: self.addChunk('try:') self.indent() self.addFilteredChunk(expr, filterArgs, rawPlaceholder, lineCol=lineCol) self.dedent() self.addChunk('except NotFound: pass') else: self.addFilteredChunk(expr, filterArgs, rawPlaceholder, lineCol=lineCol) if self.setting('outputRowColComments'): self.appendToPrevChunk(' # from line %s, col %s' % lineCol + '.') if cacheInfo: self.endCacheRegion() def addSilent(self, expr): self.addChunk( expr ) def addEcho(self, expr, rawExpr=None): self.addFilteredChunk(expr, rawExpr=rawExpr) def addSet(self, expr, exprComponents, setStyle): if setStyle is SET_GLOBAL: (LVALUE, OP, RVALUE) = (exprComponents.LVALUE, exprComponents.OP, exprComponents.RVALUE) # we need to split the LVALUE to deal with globalSetVars splitPos1 = LVALUE.find('.') splitPos2 = LVALUE.find('[') if splitPos1 > 0 and splitPos2==-1: splitPos = splitPos1 elif splitPos1 > 0 and splitPos1 < max(splitPos2, 0): splitPos = splitPos1 else: splitPos = splitPos2 if splitPos >0: primary = LVALUE[:splitPos] secondary = LVALUE[splitPos:] else: primary = LVALUE secondary = '' LVALUE = 'self._CHEETAH__globalSetVars["' + primary + '"]' + secondary expr = LVALUE + ' ' + OP + ' ' + RVALUE.strip() if setStyle is SET_MODULE: self._moduleCompiler.addModuleGlobal(expr) else: self.addChunk(expr) def addInclude(self, sourceExpr, includeFrom, isRaw): self.addChunk('self._handleCheetahInclude(' + sourceExpr + ', trans=trans, ' + 'includeFrom="' + includeFrom + '", raw=' + repr(isRaw) + ')') def addWhile(self, expr, lineCol=None): self.addIndentingDirective(expr, lineCol=lineCol) def addFor(self, expr, lineCol=None): self.addIndentingDirective(expr, lineCol=lineCol) def addRepeat(self, expr, lineCol=None): #the _repeatCount stuff here allows nesting of #repeat directives self._repeatCount = getattr(self, "_repeatCount", -1) + 1 self.addFor('for __i%s in range(%s)' % (self._repeatCount, expr), lineCol=lineCol) def addIndentingDirective(self, expr, lineCol=None): if expr and not expr[-1] == ':': expr = expr + ':' self.addChunk( expr ) if lineCol: self.appendToPrevChunk(' # generated from line %s, col %s'%lineCol ) self.indent() def addReIndentingDirective(self, expr, dedent=True, lineCol=None): self.commitStrConst() if dedent: self.dedent() if not expr[-1] == ':': expr = expr + ':' self.addChunk( expr ) if lineCol: self.appendToPrevChunk(' # generated from line %s, col %s'%lineCol ) self.indent() def addIf(self, expr, lineCol=None): """For a full #if ... #end if directive """ self.addIndentingDirective(expr, lineCol=lineCol) def addOneLineIf(self, expr, lineCol=None): """For a full #if ... #end if directive """ self.addIndentingDirective(expr, lineCol=lineCol) def addTernaryExpr(self, conditionExpr, trueExpr, falseExpr, lineCol=None): """For a single-lie #if ... then .... else ... directive <condition> then <trueExpr> else <falseExpr> """ self.addIndentingDirective(conditionExpr, lineCol=lineCol) self.addFilteredChunk(trueExpr) self.dedent() self.addIndentingDirective('else') self.addFilteredChunk(falseExpr) self.dedent() def addElse(self, expr, dedent=True, lineCol=None): expr = re.sub(r'else[ \f\t]+if', 'elif', expr) self.addReIndentingDirective(expr, dedent=dedent, lineCol=lineCol) def addElif(self, expr, dedent=True, lineCol=None): self.addElse(expr, dedent=dedent, lineCol=lineCol) def addUnless(self, expr, lineCol=None): self.addIf('if not (' + expr + ')') def addClosure(self, functionName, argsList, parserComment): argStringChunks = [] for arg in argsList: chunk = arg[0] if not arg[1] == None: chunk += '=' + arg[1] argStringChunks.append(chunk) signature = "def " + functionName + "(" + ','.join(argStringChunks) + "):" self.addIndentingDirective(signature) self.addChunk('#'+parserComment) def addTry(self, expr, lineCol=None): self.addIndentingDirective(expr, lineCol=lineCol) def addExcept(self, expr, dedent=True, lineCol=None): self.addReIndentingDirective(expr, dedent=dedent, lineCol=lineCol) def addFinally(self, expr, dedent=True, lineCol=None): self.addReIndentingDirective(expr, dedent=dedent, lineCol=lineCol) def addReturn(self, expr): assert not self._isGenerator self.addChunk(expr) self._hasReturnStatement = True def addYield(self, expr): assert not self._hasReturnStatement self._isGenerator = True if expr.replace('yield', '').strip(): self.addChunk(expr) else: self.addChunk('if _dummyTrans:') self.indent() self.addChunk('yield trans.response().getvalue()') self.addChunk('trans = DummyTransaction()') self.addChunk('write = trans.response().write') self.dedent() self.addChunk('else:') self.indent() self.addChunk( 'raise TypeError("This method cannot be called with a trans arg")') self.dedent() def addPass(self, expr): self.addChunk(expr) def addDel(self, expr): self.addChunk(expr) def addAssert(self, expr): self.addChunk(expr) def addRaise(self, expr): self.addChunk(expr) def addBreak(self, expr): self.addChunk(expr) def addContinue(self, expr): self.addChunk(expr) def addPSP(self, PSP): self.commitStrConst() autoIndent = False if PSP[0] == '=': PSP = PSP[1:] if PSP: self.addWriteChunk('_filter(' + PSP + ')') return elif PSP.lower() == 'end': self.dedent() return elif PSP[-1] == '$': autoIndent = True PSP = PSP[:-1] elif PSP[-1] == ':': autoIndent = True for line in PSP.splitlines(): self.addChunk(line) if autoIndent: self.indent() def nextCacheID(self): return ('_'+str(random.randrange(100, 999)) + str(random.randrange(10000, 99999))) def startCacheRegion(self, cacheInfo, lineCol, rawPlaceholder=None): # @@TR: we should add some runtime logging to this ID = self.nextCacheID() interval = cacheInfo.get('interval', None) test = cacheInfo.get('test', None) customID = cacheInfo.get('id', None) if customID: ID = customID varyBy = cacheInfo.get('varyBy', repr(ID)) self._cacheRegionsStack.append(ID) # attrib of current methodCompiler # @@TR: add this to a special class var as well self.addChunk('') self.addChunk('## START CACHE REGION: ID='+ID+ '. line %s, col %s'%lineCol + ' in the source.') self.addChunk('_RECACHE_%(ID)s = False'%locals()) self.addChunk('_cacheRegion_%(ID)s = self.getCacheRegion(regionID='%locals() + repr(ID) + ', cacheInfo=%r'%cacheInfo + ')') self.addChunk('if _cacheRegion_%(ID)s.isNew():'%locals()) self.indent() self.addChunk('_RECACHE_%(ID)s = True'%locals()) self.dedent() self.addChunk('_cacheItem_%(ID)s = _cacheRegion_%(ID)s.getCacheItem('%locals() +varyBy+')') self.addChunk('if _cacheItem_%(ID)s.hasExpired():'%locals()) self.indent() self.addChunk('_RECACHE_%(ID)s = True'%locals()) self.dedent() if test: self.addChunk('if ' + test + ':') self.indent() self.addChunk('_RECACHE_%(ID)s = True'%locals()) self.dedent() self.addChunk('if (not _RECACHE_%(ID)s) and _cacheItem_%(ID)s.getRefreshTime():'%locals()) self.indent() #self.addChunk('print "DEBUG"+"-"*50') self.addChunk('try:') self.indent() self.addChunk('_output = _cacheItem_%(ID)s.renderOutput()'%locals()) self.dedent() self.addChunk('except KeyError:') self.indent() self.addChunk('_RECACHE_%(ID)s = True'%locals()) #self.addChunk('print "DEBUG"+"*"*50') self.dedent() self.addChunk('else:') self.indent() self.addWriteChunk('_output') self.addChunk('del _output') self.dedent() self.dedent() self.addChunk('if _RECACHE_%(ID)s or not _cacheItem_%(ID)s.getRefreshTime():'%locals()) self.indent() self.addChunk('_orig_trans%(ID)s = trans'%locals()) self.addChunk('trans = _cacheCollector_%(ID)s = DummyTransaction()'%locals()) self.addChunk('write = _cacheCollector_%(ID)s.response().write'%locals()) if interval: self.addChunk(("_cacheItem_%(ID)s.setExpiryTime(currentTime() +"%locals()) + str(interval) + ")") def endCacheRegion(self): ID = self._cacheRegionsStack.pop() self.addChunk('trans = _orig_trans%(ID)s'%locals()) self.addChunk('write = trans.response().write') self.addChunk('_cacheData = _cacheCollector_%(ID)s.response().getvalue()'%locals()) self.addChunk('_cacheItem_%(ID)s.setData(_cacheData)'%locals()) self.addWriteChunk('_cacheData') self.addChunk('del _cacheData') self.addChunk('del _cacheCollector_%(ID)s'%locals()) self.addChunk('del _orig_trans%(ID)s'%locals()) self.dedent() self.addChunk('## END CACHE REGION: '+ID) self.addChunk('') def nextCallRegionID(self): return self.nextCacheID() def startCallRegion(self, functionName, args, lineCol, regionTitle='CALL'): class CallDetails(object): pass callDetails = CallDetails() callDetails.ID = ID = self.nextCallRegionID() callDetails.functionName = functionName callDetails.args = args callDetails.lineCol = lineCol callDetails.usesKeywordArgs = False self._callRegionsStack.append((ID, callDetails)) # attrib of current methodCompiler self.addChunk('## START %(regionTitle)s REGION: '%locals() +ID +' of '+functionName +' at line %s, col %s'%lineCol + ' in the source.') self.addChunk('_orig_trans%(ID)s = trans'%locals()) self.addChunk('_wasBuffering%(ID)s = self._CHEETAH__isBuffering'%locals()) self.addChunk('self._CHEETAH__isBuffering = True') self.addChunk('trans = _callCollector%(ID)s = DummyTransaction()'%locals()) self.addChunk('write = _callCollector%(ID)s.response().write'%locals()) def setCallArg(self, argName, lineCol): ID, callDetails = self._callRegionsStack[-1] argName = str(argName) if callDetails.usesKeywordArgs: self._endCallArg() else: callDetails.usesKeywordArgs = True self.addChunk('_callKws%(ID)s = {}'%locals()) self.addChunk('_currentCallArgname%(ID)s = %(argName)r'%locals()) callDetails.currentArgname = argName def _endCallArg(self): ID, callDetails = self._callRegionsStack[-1] currCallArg = callDetails.currentArgname self.addChunk(('_callKws%(ID)s[%(currCallArg)r] =' ' _callCollector%(ID)s.response().getvalue()')%locals()) self.addChunk('del _callCollector%(ID)s'%locals()) self.addChunk('trans = _callCollector%(ID)s = DummyTransaction()'%locals()) self.addChunk('write = _callCollector%(ID)s.response().write'%locals()) def endCallRegion(self, regionTitle='CALL'): ID, callDetails = self._callRegionsStack[-1] functionName, initialKwArgs, lineCol = ( callDetails.functionName, callDetails.args, callDetails.lineCol) def reset(ID=ID): self.addChunk('trans = _orig_trans%(ID)s'%locals()) self.addChunk('write = trans.response().write') self.addChunk('self._CHEETAH__isBuffering = _wasBuffering%(ID)s '%locals()) self.addChunk('del _wasBuffering%(ID)s'%locals()) self.addChunk('del _orig_trans%(ID)s'%locals()) if not callDetails.usesKeywordArgs: reset() self.addChunk('_callArgVal%(ID)s = _callCollector%(ID)s.response().getvalue()'%locals()) self.addChunk('del _callCollector%(ID)s'%locals()) if initialKwArgs: initialKwArgs = ', '+initialKwArgs self.addFilteredChunk('%(functionName)s(_callArgVal%(ID)s%(initialKwArgs)s)'%locals()) self.addChunk('del _callArgVal%(ID)s'%locals()) else: if initialKwArgs: initialKwArgs = initialKwArgs+', ' self._endCallArg() reset() self.addFilteredChunk('%(functionName)s(%(initialKwArgs)s**_callKws%(ID)s)'%locals()) self.addChunk('del _callKws%(ID)s'%locals()) self.addChunk('## END %(regionTitle)s REGION: '%locals() +ID +' of '+functionName +' at line %s, col %s'%lineCol + ' in the source.') self.addChunk('') self._callRegionsStack.pop() # attrib of current methodCompiler def nextCaptureRegionID(self): return self.nextCacheID() def startCaptureRegion(self, assignTo, lineCol): class CaptureDetails: pass captureDetails = CaptureDetails() captureDetails.ID = ID = self.nextCaptureRegionID() captureDetails.assignTo = assignTo captureDetails.lineCol = lineCol self._captureRegionsStack.append((ID, captureDetails)) # attrib of current methodCompiler self.addChunk('## START CAPTURE REGION: '+ID +' '+assignTo +' at line %s, col %s'%lineCol + ' in the source.') self.addChunk('_orig_trans%(ID)s = trans'%locals()) self.addChunk('_wasBuffering%(ID)s = self._CHEETAH__isBuffering'%locals()) self.addChunk('self._CHEETAH__isBuffering = True') self.addChunk('trans = _captureCollector%(ID)s = DummyTransaction()'%locals()) self.addChunk('write = _captureCollector%(ID)s.response().write'%locals()) def endCaptureRegion(self): ID, captureDetails = self._captureRegionsStack.pop() assignTo, lineCol = (captureDetails.assignTo, captureDetails.lineCol) self.addChunk('trans = _orig_trans%(ID)s'%locals()) self.addChunk('write = trans.response().write') self.addChunk('self._CHEETAH__isBuffering = _wasBuffering%(ID)s '%locals()) self.addChunk('%(assignTo)s = _captureCollector%(ID)s.response().getvalue()'%locals()) self.addChunk('del _orig_trans%(ID)s'%locals()) self.addChunk('del _captureCollector%(ID)s'%locals()) self.addChunk('del _wasBuffering%(ID)s'%locals()) def setErrorCatcher(self, errorCatcherName): self.turnErrorCatcherOn() self.addChunk('if self._CHEETAH__errorCatchers.has_key("' + errorCatcherName + '"):') self.indent() self.addChunk('self._CHEETAH__errorCatcher = self._CHEETAH__errorCatchers["' + errorCatcherName + '"]') self.dedent() self.addChunk('else:') self.indent() self.addChunk('self._CHEETAH__errorCatcher = self._CHEETAH__errorCatchers["' + errorCatcherName + '"] = ErrorCatchers.' + errorCatcherName + '(self)' ) self.dedent() def nextFilterRegionID(self): return self.nextCacheID() def setTransform(self, transformer, isKlass): self.addChunk('trans = TransformerTransaction()') self.addChunk('trans._response = trans.response()') self.addChunk('trans._response._filter = %s' % transformer) self.addChunk('write = trans._response.write') def setFilter(self, theFilter, isKlass): class FilterDetails: pass filterDetails = FilterDetails() filterDetails.ID = ID = self.nextFilterRegionID() filterDetails.theFilter = theFilter filterDetails.isKlass = isKlass self._filterRegionsStack.append((ID, filterDetails)) # attrib of current methodCompiler self.addChunk('_orig_filter%(ID)s = _filter'%locals()) if isKlass: self.addChunk('_filter = self._CHEETAH__currentFilter = ' + theFilter.strip() + '(self).filter') else: if theFilter.lower() == 'none': self.addChunk('_filter = self._CHEETAH__initialFilter') else: # is string representing the name of a builtin filter self.addChunk('filterName = ' + repr(theFilter)) self.addChunk('if self._CHEETAH__filters.has_key("' + theFilter + '"):') self.indent() self.addChunk('_filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName]') self.dedent() self.addChunk('else:') self.indent() self.addChunk('_filter = self._CHEETAH__currentFilter' +' = \\\n\t\t\tself._CHEETAH__filters[filterName] = ' + 'getattr(self._CHEETAH__filtersLib, filterName)(self).filter') self.dedent() def closeFilterBlock(self): ID, filterDetails = self._filterRegionsStack.pop() #self.addChunk('_filter = self._CHEETAH__initialFilter') #self.addChunk('_filter = _orig_filter%(ID)s'%locals()) self.addChunk('_filter = self._CHEETAH__currentFilter = _orig_filter%(ID)s'%locals()) class AutoMethodCompiler(MethodCompiler): def _setupState(self): MethodCompiler._setupState(self) self._argStringList = [ ("self", None) ] self._streamingEnabled = True self._isClassMethod = None self._isStaticMethod = None def _useKWsDictArgForPassingTrans(self): alreadyHasTransArg = [argname for argname, defval in self._argStringList if argname=='trans'] return (self.methodName()!='respond' and not alreadyHasTransArg and self.setting('useKWsDictArgForPassingTrans')) def isClassMethod(self): if self._isClassMethod is None: self._isClassMethod = '@classmethod' in self._decorators return self._isClassMethod def isStaticMethod(self): if self._isStaticMethod is None: self._isStaticMethod = '@staticmethod' in self._decorators return self._isStaticMethod def cleanupState(self): MethodCompiler.cleanupState(self) self.commitStrConst() if self._cacheRegionsStack: self.endCacheRegion() if self._callRegionsStack: self.endCallRegion() if self._streamingEnabled: kwargsName = None positionalArgsListName = None for argname, defval in self._argStringList: if argname.strip().startswith('**'): kwargsName = argname.strip().replace('**', '') break elif argname.strip().startswith('*'): positionalArgsListName = argname.strip().replace('*', '') if not kwargsName and self._useKWsDictArgForPassingTrans(): kwargsName = 'KWS' self.addMethArg('**KWS', None) self._kwargsName = kwargsName if not self._useKWsDictArgForPassingTrans(): if not kwargsName and not positionalArgsListName: self.addMethArg('trans', 'None') else: self._streamingEnabled = False self._indentLev = self.setting('initialMethIndentLevel') mainBodyChunks = self._methodBodyChunks self._methodBodyChunks = [] self._addAutoSetupCode() self._methodBodyChunks.extend(mainBodyChunks) self._addAutoCleanupCode() def _addAutoSetupCode(self): if self._initialMethodComment: self.addChunk(self._initialMethodComment) if self._streamingEnabled and not self.isClassMethod() and not self.isStaticMethod(): if self._useKWsDictArgForPassingTrans() and self._kwargsName: self.addChunk('trans = %s.get("trans")'%self._kwargsName) self.addChunk('if (not trans and not self._CHEETAH__isBuffering' ' and not callable(self.transaction)):') self.indent() self.addChunk('trans = self.transaction' ' # is None unless self.awake() was called') self.dedent() self.addChunk('if not trans:') self.indent() self.addChunk('trans = DummyTransaction()') if self.setting('autoAssignDummyTransactionToSelf'): self.addChunk('self.transaction = trans') self.addChunk('_dummyTrans = True') self.dedent() self.addChunk('else: _dummyTrans = False') else: self.addChunk('trans = DummyTransaction()') self.addChunk('_dummyTrans = True') self.addChunk('write = trans.response().write') if self.setting('useNameMapper'): argNames = [arg[0] for arg in self._argStringList] allowSearchListAsMethArg = self.setting('allowSearchListAsMethArg') if allowSearchListAsMethArg and 'SL' in argNames: pass elif allowSearchListAsMethArg and 'searchList' in argNames: self.addChunk('SL = searchList') elif not self.isClassMethod() and not self.isStaticMethod(): self.addChunk('SL = self._CHEETAH__searchList') else: self.addChunk('SL = [KWS]') if self.setting('useFilters'): if self.isClassMethod() or self.isStaticMethod(): self.addChunk('_filter = lambda x, **kwargs: unicode(x)') else: self.addChunk('_filter = self._CHEETAH__currentFilter') self.addChunk('') self.addChunk("#" *40) self.addChunk('## START - generated method body') self.addChunk('') def _addAutoCleanupCode(self): self.addChunk('') self.addChunk("#" *40) self.addChunk('## END - generated method body') self.addChunk('') if not self._isGenerator: self.addStop() self.addChunk('') def addStop(self, expr=None): self.addChunk('return _dummyTrans and trans.response().getvalue() or ""') def addMethArg(self, name, defVal=None): self._argStringList.append( (name, defVal) ) def methodSignature(self): argStringChunks = [] for arg in self._argStringList: chunk = arg[0] if chunk == 'self' and self.isClassMethod(): chunk = 'cls' if chunk == 'self' and self.isStaticMethod(): # Skip the "self" method for @staticmethod decorators continue if not arg[1] == None: chunk += '=' + arg[1] argStringChunks.append(chunk) argString = (', ').join(argStringChunks) output = [] if self._decorators: output.append(''.join([self._indent + decorator + '\n' for decorator in self._decorators])) output.append(self._indent + "def " + self.methodName() + "(" + argString + "):\n\n") return ''.join(output) ################################################## ## CLASS COMPILERS _initMethod_initCheetah = """\ if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) """.replace('\n', '\n'+' '*8) class ClassCompiler(GenUtils): methodCompilerClass = AutoMethodCompiler methodCompilerClassForInit = MethodCompiler def __init__(self, className, mainMethodName='respond', moduleCompiler=None, fileName=None, settingsManager=None): self._settingsManager = settingsManager self._fileName = fileName self._className = className self._moduleCompiler = moduleCompiler self._mainMethodName = mainMethodName self._setupState() methodCompiler = self._spawnMethodCompiler( mainMethodName, initialMethodComment='## CHEETAH: main method generated for this template') self._setActiveMethodCompiler(methodCompiler) if fileName and self.setting('monitorSrcFile'): self._addSourceFileMonitoring(fileName) def setting(self, key): return self._settingsManager.setting(key) def __getattr__(self, name): """Provide access to the methods and attributes of the MethodCompiler at the top of the activeMethods stack: one-way namespace sharing WARNING: Use .setMethods to assign the attributes of the MethodCompiler from the methods of this class!!! or you will be assigning to attributes of this object instead.""" if name in self.__dict__: return self.__dict__[name] elif hasattr(self.__class__, name): return getattr(self.__class__, name) elif self._activeMethodsList and hasattr(self._activeMethodsList[-1], name): return getattr(self._activeMethodsList[-1], name) else: raise AttributeError(name) def _setupState(self): self._classDef = None self._decoratorsForNextMethod = [] self._activeMethodsList = [] # stack while parsing/generating self._finishedMethodsList = [] # store by order self._methodsIndex = {} # store by name self._baseClass = 'Template' self._classDocStringLines = [] # printed after methods in the gen class def: self._generatedAttribs = ['_CHEETAH__instanceInitialized = False'] self._generatedAttribs.append('_CHEETAH_version = __CHEETAH_version__') self._generatedAttribs.append( '_CHEETAH_versionTuple = __CHEETAH_versionTuple__') if self.setting('addTimestampsToCompilerOutput'): self._generatedAttribs.append('_CHEETAH_genTime = __CHEETAH_genTime__') self._generatedAttribs.append('_CHEETAH_genTimestamp = __CHEETAH_genTimestamp__') self._generatedAttribs.append('_CHEETAH_src = __CHEETAH_src__') self._generatedAttribs.append( '_CHEETAH_srcLastModified = __CHEETAH_srcLastModified__') if self.setting('templateMetaclass'): self._generatedAttribs.append('__metaclass__ = '+self.setting('templateMetaclass')) self._initMethChunks = [] self._blockMetaData = {} self._errorCatcherCount = 0 self._placeholderToErrorCatcherMap = {} def cleanupState(self): while self._activeMethodsList: methCompiler = self._popActiveMethodCompiler() self._swallowMethodCompiler(methCompiler) self._setupInitMethod() if self._mainMethodName == 'respond': if self.setting('setup__str__method'): self._generatedAttribs.append('def __str__(self): return self.respond()') self.addAttribute('_mainCheetahMethod_for_' + self._className + '= ' + repr(self._mainMethodName) ) def _setupInitMethod(self): __init__ = self._spawnMethodCompiler('__init__', klass=self.methodCompilerClassForInit) __init__.setMethodSignature("def __init__(self, *args, **KWs)") __init__.addChunk('super(%s, self).__init__(*args, **KWs)' % self._className) __init__.addChunk(_initMethod_initCheetah % {'className' : self._className}) for chunk in self._initMethChunks: __init__.addChunk(chunk) __init__.cleanupState() self._swallowMethodCompiler(__init__, pos=0) def _addSourceFileMonitoring(self, fileName): # @@TR: this stuff needs auditing for Cheetah 2.0 # the first bit is added to init self.addChunkToInit('self._filePath = ' + repr(fileName)) self.addChunkToInit('self._fileMtime = ' + str(getmtime(fileName)) ) # the rest is added to the main output method of the class ('mainMethod') self.addChunk('if exists(self._filePath) and ' + 'getmtime(self._filePath) > self._fileMtime:') self.indent() self.addChunk('self._compile(file=self._filePath, moduleName='+self._className + ')') self.addChunk( 'write(getattr(self, self._mainCheetahMethod_for_' + self._className + ')(trans=trans))') self.addStop() self.dedent() def setClassName(self, name): self._className = name def className(self): return self._className def setBaseClass(self, baseClassName): self._baseClass = baseClassName def setMainMethodName(self, methodName): if methodName == self._mainMethodName: return ## change the name in the methodCompiler and add new reference mainMethod = self._methodsIndex[self._mainMethodName] mainMethod.setMethodName(methodName) self._methodsIndex[methodName] = mainMethod ## make sure that fileUpdate code still works properly: chunkToChange = ('write(self.' + self._mainMethodName + '(trans=trans))') chunks = mainMethod._methodBodyChunks if chunkToChange in chunks: for i in range(len(chunks)): if chunks[i] == chunkToChange: chunks[i] = ('write(self.' + methodName + '(trans=trans))') ## get rid of the old reference and update self._mainMethodName del self._methodsIndex[self._mainMethodName] self._mainMethodName = methodName def setMainMethodArgs(self, argsList): mainMethodCompiler = self._methodsIndex[self._mainMethodName] for argName, defVal in argsList: mainMethodCompiler.addMethArg(argName, defVal) def _spawnMethodCompiler(self, methodName, klass=None, initialMethodComment=None): if klass is None: klass = self.methodCompilerClass decorators = self._decoratorsForNextMethod or [] self._decoratorsForNextMethod = [] methodCompiler = klass(methodName, classCompiler=self, decorators=decorators, initialMethodComment=initialMethodComment) self._methodsIndex[methodName] = methodCompiler return methodCompiler def _setActiveMethodCompiler(self, methodCompiler): self._activeMethodsList.append(methodCompiler) def _getActiveMethodCompiler(self): return self._activeMethodsList[-1] def _popActiveMethodCompiler(self): return self._activeMethodsList.pop() def _swallowMethodCompiler(self, methodCompiler, pos=None): methodCompiler.cleanupState() if pos==None: self._finishedMethodsList.append( methodCompiler ) else: self._finishedMethodsList.insert(pos, methodCompiler) return methodCompiler def startMethodDef(self, methodName, argsList, parserComment): methodCompiler = self._spawnMethodCompiler( methodName, initialMethodComment=parserComment) self._setActiveMethodCompiler(methodCompiler) for argName, defVal in argsList: methodCompiler.addMethArg(argName, defVal) def _finishedMethods(self): return self._finishedMethodsList def addDecorator(self, decoratorExpr): """Set the decorator to be used with the next method in the source. See _spawnMethodCompiler() and MethodCompiler for the details of how this is used. """ self._decoratorsForNextMethod.append(decoratorExpr) def addClassDocString(self, line): self._classDocStringLines.append( line.replace('%', '%%')) def addChunkToInit(self, chunk): self._initMethChunks.append(chunk) def addAttribute(self, attribExpr): ## first test to make sure that the user hasn't used any fancy Cheetah syntax # (placeholders, directives, etc.) inside the expression if attribExpr.find('VFN(') != -1 or attribExpr.find('VFFSL(') != -1: raise ParseError(self, 'Invalid #attr directive.' + ' It should only contain simple Python literals.') ## now add the attribute self._generatedAttribs.append(attribExpr) def addSuper(self, argsList, parserComment=None): className = self._className #self._baseClass methodName = self._getActiveMethodCompiler().methodName() argStringChunks = [] for arg in argsList: chunk = arg[0] if not arg[1] == None: chunk += '=' + arg[1] argStringChunks.append(chunk) argString = ','.join(argStringChunks) self.addFilteredChunk( 'super(%(className)s, self).%(methodName)s(%(argString)s)'%locals()) def addErrorCatcherCall(self, codeChunk, rawCode='', lineCol=''): if rawCode in self._placeholderToErrorCatcherMap: methodName = self._placeholderToErrorCatcherMap[rawCode] if not self.setting('outputRowColComments'): self._methodsIndex[methodName].addMethDocString( 'plus at line %s, col %s'%lineCol) return methodName self._errorCatcherCount += 1 methodName = '__errorCatcher' + str(self._errorCatcherCount) self._placeholderToErrorCatcherMap[rawCode] = methodName catcherMeth = self._spawnMethodCompiler( methodName, klass=MethodCompiler, initialMethodComment=('## CHEETAH: Generated from ' + rawCode + ' at line %s, col %s'%lineCol + '.') ) catcherMeth.setMethodSignature('def ' + methodName + '(self, localsDict={})') # is this use of localsDict right? catcherMeth.addChunk('try:') catcherMeth.indent() catcherMeth.addChunk("return eval('''" + codeChunk + "''', globals(), localsDict)") catcherMeth.dedent() catcherMeth.addChunk('except self._CHEETAH__errorCatcher.exceptions(), e:') catcherMeth.indent() catcherMeth.addChunk("return self._CHEETAH__errorCatcher.warn(exc_val=e, code= " + repr(codeChunk) + " , rawCode= " + repr(rawCode) + " , lineCol=" + str(lineCol) +")") catcherMeth.cleanupState() self._swallowMethodCompiler(catcherMeth) return methodName def closeDef(self): self.commitStrConst() methCompiler = self._popActiveMethodCompiler() self._swallowMethodCompiler(methCompiler) def closeBlock(self): self.commitStrConst() methCompiler = self._popActiveMethodCompiler() methodName = methCompiler.methodName() if self.setting('includeBlockMarkers'): endMarker = self.setting('blockMarkerEnd') methCompiler.addStrConst(endMarker[0] + methodName + endMarker[1]) self._swallowMethodCompiler(methCompiler) #metaData = self._blockMetaData[methodName] #rawDirective = metaData['raw'] #lineCol = metaData['lineCol'] ## insert the code to call the block, caching if #cache directive is on codeChunk = 'self.' + methodName + '(trans=trans)' self.addChunk(codeChunk) #self.appendToPrevChunk(' # generated from ' + repr(rawDirective) ) #if self.setting('outputRowColComments'): # self.appendToPrevChunk(' at line %s, col %s' % lineCol + '.') ## code wrapping methods def classDef(self): if self._classDef: return self._classDef else: return self.wrapClassDef() __str__ = classDef __unicode__ = classDef def wrapClassDef(self): ind = self.setting('indentationStep') classDefChunks = [self.classSignature(), self.classDocstring(), ] def addMethods(): classDefChunks.extend([ ind + '#'*50, ind + '## CHEETAH GENERATED METHODS', '\n', self.methodDefs(), ]) def addAttributes(): classDefChunks.extend([ ind + '#'*50, ind + '## CHEETAH GENERATED ATTRIBUTES', '\n', self.attributes(), ]) if self.setting('outputMethodsBeforeAttributes'): addMethods() addAttributes() else: addAttributes() addMethods() classDef = '\n'.join(classDefChunks) self._classDef = classDef return classDef def classSignature(self): return "class %s(%s):" % (self.className(), self._baseClass) def classDocstring(self): if not self._classDocStringLines: return '' ind = self.setting('indentationStep') docStr = ('%(ind)s"""\n%(ind)s' + '\n%(ind)s'.join(self._classDocStringLines) + '\n%(ind)s"""\n' ) % {'ind':ind} return docStr def methodDefs(self): methodDefs = [methGen.methodDef() for methGen in self._finishedMethods()] return '\n\n'.join(methodDefs) def attributes(self): attribs = [self.setting('indentationStep') + str(attrib) for attrib in self._generatedAttribs ] return '\n\n'.join(attribs) class AutoClassCompiler(ClassCompiler): pass ################################################## ## MODULE COMPILERS class ModuleCompiler(SettingsManager, GenUtils): parserClass = Parser classCompilerClass = AutoClassCompiler def __init__(self, source=None, file=None, moduleName='DynamicallyCompiledCheetahTemplate', mainClassName=None, # string mainMethodName=None, # string baseclassName=None, # string extraImportStatements=None, # list of strings settings=None # dict ): super(ModuleCompiler, self).__init__() if settings: self.updateSettings(settings) # disable useStackFrames if the C version of NameMapper isn't compiled # it's painfully slow in the Python version and bites Windows users all # the time: if not NameMapper.C_VERSION: if not sys.platform.startswith('java'): warnings.warn( "\nYou don't have the C version of NameMapper installed! " "I'm disabling Cheetah's useStackFrames option as it is " "painfully slow with the Python version of NameMapper. " "You should get a copy of Cheetah with the compiled C version of NameMapper." ) self.setSetting('useStackFrames', False) self._compiled = False self._moduleName = moduleName if not mainClassName: self._mainClassName = moduleName else: self._mainClassName = mainClassName self._mainMethodNameArg = mainMethodName if mainMethodName: self.setSetting('mainMethodName', mainMethodName) self._baseclassName = baseclassName self._filePath = None self._fileMtime = None if source and file: raise TypeError("Cannot compile from a source string AND file.") elif isinstance(file, basestring): # it's a filename. f = open(file) # Raises IOError. source = f.read() f.close() self._filePath = file self._fileMtime = os.path.getmtime(file) elif hasattr(file, 'read'): source = file.read() # Can't set filename or mtime--they're not accessible. elif file: raise TypeError("'file' argument must be a filename string or file-like object") if self._filePath: self._fileDirName, self._fileBaseName = os.path.split(self._filePath) self._fileBaseNameRoot, self._fileBaseNameExt = os.path.splitext(self._fileBaseName) if not isinstance(source, basestring): source = unicode(source) # by converting to string here we allow objects such as other Templates # to be passed in # Handle the #indent directive by converting it to other directives. # (Over the long term we'll make it a real directive.) if source == "": warnings.warn("You supplied an empty string for the source!", ) else: unicodeMatch = unicodeDirectiveRE.search(source) encodingMatch = encodingDirectiveRE.match(source) if unicodeMatch: if encodingMatch: raise ParseError( self, "#encoding and #unicode are mutually exclusive! " "Use one or the other.") source = unicodeDirectiveRE.sub('', source) if isinstance(source, str): encoding = unicodeMatch.group(1) or 'ascii' source = unicode(source, encoding) elif encodingMatch: encodings = encodingMatch.groups() if len(encodings): encoding = encodings[0] source = source.decode(encoding) else: source = unicode(source) if source.find('#indent') != -1: #@@TR: undocumented hack source = indentize(source) self._parser = self.parserClass(source, filename=self._filePath, compiler=self) self._setupCompilerState() def __getattr__(self, name): """Provide one-way access to the methods and attributes of the ClassCompiler, and thereby the MethodCompilers as well. WARNING: Use .setMethods to assign the attributes of the ClassCompiler from the methods of this class!!! or you will be assigning to attributes of this object instead. """ if name in self.__dict__: return self.__dict__[name] elif hasattr(self.__class__, name): return getattr(self.__class__, name) elif self._activeClassesList and hasattr(self._activeClassesList[-1], name): return getattr(self._activeClassesList[-1], name) else: raise AttributeError(name) def _initializeSettings(self): self.updateSettings(copy.deepcopy(DEFAULT_COMPILER_SETTINGS)) def _setupCompilerState(self): self._activeClassesList = [] self._finishedClassesList = [] # listed by ordered self._finishedClassIndex = {} # listed by name self._moduleDef = None self._moduleShBang = '#!/usr/bin/env python' self._moduleEncoding = 'ascii' self._moduleEncodingStr = '' self._moduleHeaderLines = [] self._moduleDocStringLines = [] self._specialVars = {} self._importStatements = [ "import sys", "import os", "import os.path", "import __builtin__", "from os.path import getmtime, exists", "import time", "import types", "from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion", "from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple", "from Cheetah.Template import Template", "from Cheetah.DummyTransaction import *", "from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList", "from Cheetah.CacheRegion import CacheRegion", "import Cheetah.Filters as Filters", "import Cheetah.ErrorCatchers as ErrorCatchers", ] self._importedVarNames = ['sys', 'os', 'os.path', 'time', 'types', 'Template', 'DummyTransaction', 'NotFound', 'Filters', 'ErrorCatchers', 'CacheRegion', ] self._moduleConstants = [ "VFFSL=valueFromFrameOrSearchList", "VFSL=valueFromSearchList", "VFN=valueForName", "currentTime=time.time", ] def compile(self): classCompiler = self._spawnClassCompiler(self._mainClassName) if self._baseclassName: classCompiler.setBaseClass(self._baseclassName) self._addActiveClassCompiler(classCompiler) self._parser.parse() self._swallowClassCompiler(self._popActiveClassCompiler()) self._compiled = True self._parser.cleanup() def _spawnClassCompiler(self, className, klass=None): if klass is None: klass = self.classCompilerClass classCompiler = klass(className, moduleCompiler=self, mainMethodName=self.setting('mainMethodName'), fileName=self._filePath, settingsManager=self, ) return classCompiler def _addActiveClassCompiler(self, classCompiler): self._activeClassesList.append(classCompiler) def _getActiveClassCompiler(self): return self._activeClassesList[-1] def _popActiveClassCompiler(self): return self._activeClassesList.pop() def _swallowClassCompiler(self, classCompiler): classCompiler.cleanupState() self._finishedClassesList.append( classCompiler ) self._finishedClassIndex[classCompiler.className()] = classCompiler return classCompiler def _finishedClasses(self): return self._finishedClassesList def importedVarNames(self): return self._importedVarNames def addImportedVarNames(self, varNames, raw_statement=None): settings = self.settings() if not varNames: return if not settings.get('useLegacyImportMode'): if raw_statement and getattr(self, '_methodBodyChunks'): self.addChunk(raw_statement) else: self._importedVarNames.extend(varNames) ## methods for adding stuff to the module and class definitions def setBaseClass(self, baseClassName): if self._mainMethodNameArg: self.setMainMethodName(self._mainMethodNameArg) else: self.setMainMethodName(self.setting('mainMethodNameForSubclasses')) if self.setting('handlerForExtendsDirective'): handler = self.setting('handlerForExtendsDirective') baseClassName = handler(compiler=self, baseClassName=baseClassName) self._getActiveClassCompiler().setBaseClass(baseClassName) elif (not self.setting('autoImportForExtendsDirective') or baseClassName=='object' or baseClassName in self.importedVarNames()): self._getActiveClassCompiler().setBaseClass(baseClassName) # no need to import else: ################################################## ## If the #extends directive contains a classname or modulename that isn't # in self.importedVarNames() already, we assume that we need to add # an implied 'from ModName import ClassName' where ModName == ClassName. # - This is the case in WebKit servlet modules. # - We also assume that the final . separates the classname from the # module name. This might break if people do something really fancy # with their dots and namespaces. baseclasses = baseClassName.split(',') for klass in baseclasses: chunks = klass.split('.') if len(chunks)==1: self._getActiveClassCompiler().setBaseClass(klass) if klass not in self.importedVarNames(): modName = klass # we assume the class name to be the module name # and that it's not a builtin: importStatement = "from %s import %s" % (modName, klass) self.addImportStatement(importStatement) self.addImportedVarNames((klass,)) else: needToAddImport = True modName = chunks[0] #print chunks, ':', self.importedVarNames() for chunk in chunks[1:-1]: if modName in self.importedVarNames(): needToAddImport = False finalBaseClassName = klass.replace(modName+'.', '') self._getActiveClassCompiler().setBaseClass(finalBaseClassName) break else: modName += '.'+chunk if needToAddImport: modName, finalClassName = '.'.join(chunks[:-1]), chunks[-1] #if finalClassName != chunks[:-1][-1]: if finalClassName != chunks[-2]: # we assume the class name to be the module name modName = '.'.join(chunks) self._getActiveClassCompiler().setBaseClass(finalClassName) importStatement = "from %s import %s" % (modName, finalClassName) self.addImportStatement(importStatement) self.addImportedVarNames( [finalClassName,] ) def setCompilerSetting(self, key, valueExpr): self.setSetting(key, eval(valueExpr) ) self._parser.configureParser() def setCompilerSettings(self, keywords, settingsStr): KWs = keywords merge = True if 'nomerge' in KWs: merge = False if 'reset' in KWs: # @@TR: this is actually caught by the parser at the moment. # subject to change in the future self._initializeSettings() self._parser.configureParser() return elif 'python' in KWs: settingsReader = self.updateSettingsFromPySrcStr # this comes from SettingsManager else: # this comes from SettingsManager settingsReader = self.updateSettingsFromConfigStr settingsReader(settingsStr) self._parser.configureParser() def setShBang(self, shBang): self._moduleShBang = shBang def setModuleEncoding(self, encoding): self._moduleEncoding = encoding def getModuleEncoding(self): return self._moduleEncoding def addModuleHeader(self, line): """Adds a header comment to the top of the generated module. """ self._moduleHeaderLines.append(line) def addModuleDocString(self, line): """Adds a line to the generated module docstring. """ self._moduleDocStringLines.append(line) def addModuleGlobal(self, line): """Adds a line of global module code. It is inserted after the import statements and Cheetah default module constants. """ self._moduleConstants.append(line) def addSpecialVar(self, basename, contents, includeUnderscores=True): """Adds module __specialConstant__ to the module globals. """ name = includeUnderscores and '__'+basename+'__' or basename self._specialVars[name] = contents.strip() def addImportStatement(self, impStatement): settings = self.settings() if not self._methodBodyChunks or settings.get('useLegacyImportMode'): # In the case where we are importing inline in the middle of a source block # we don't want to inadvertantly import the module at the top of the file either self._importStatements.append(impStatement) #@@TR 2005-01-01: there's almost certainly a cleaner way to do this! importVarNames = impStatement[impStatement.find('import') + len('import'):].split(',') importVarNames = [var.split()[-1] for var in importVarNames] # handles aliases importVarNames = [var for var in importVarNames if not var == '*'] self.addImportedVarNames(importVarNames, raw_statement=impStatement) #used by #extend for auto-imports def addAttribute(self, attribName, expr): self._getActiveClassCompiler().addAttribute(attribName + ' =' + expr) def addComment(self, comm): if re.match(r'#+$', comm): # skip bar comments return specialVarMatch = specialVarRE.match(comm) if specialVarMatch: # @@TR: this is a bit hackish and is being replaced with # #set module varName = ... return self.addSpecialVar(specialVarMatch.group(1), comm[specialVarMatch.end():]) elif comm.startswith('doc:'): addLine = self.addMethDocString comm = comm[len('doc:'):].strip() elif comm.startswith('doc-method:'): addLine = self.addMethDocString comm = comm[len('doc-method:'):].strip() elif comm.startswith('doc-module:'): addLine = self.addModuleDocString comm = comm[len('doc-module:'):].strip() elif comm.startswith('doc-class:'): addLine = self.addClassDocString comm = comm[len('doc-class:'):].strip() elif comm.startswith('header:'): addLine = self.addModuleHeader comm = comm[len('header:'):].strip() else: addLine = self.addMethComment for line in comm.splitlines(): addLine(line) ## methods for module code wrapping def getModuleCode(self): if not self._compiled: self.compile() if self._moduleDef: return self._moduleDef else: return self.wrapModuleDef() __str__ = getModuleCode def wrapModuleDef(self): self.addSpecialVar('CHEETAH_docstring', self.setting('defDocStrMsg')) self.addModuleGlobal('__CHEETAH_version__ = %r'%Version) self.addModuleGlobal('__CHEETAH_versionTuple__ = %r'%(VersionTuple,)) if self.setting('addTimestampsToCompilerOutput'): self.addModuleGlobal('__CHEETAH_genTime__ = %r'%time.time()) self.addModuleGlobal('__CHEETAH_genTimestamp__ = %r'%self.timestamp()) if self._filePath: timestamp = self.timestamp(self._fileMtime) self.addModuleGlobal('__CHEETAH_src__ = %r'%self._filePath) self.addModuleGlobal('__CHEETAH_srcLastModified__ = %r'%timestamp) else: self.addModuleGlobal('__CHEETAH_src__ = None') self.addModuleGlobal('__CHEETAH_srcLastModified__ = None') moduleDef = """%(header)s %(docstring)s ################################################## ## DEPENDENCIES %(imports)s ################################################## ## MODULE CONSTANTS %(constants)s %(specialVars)s if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %%s. Templates compiled before version %%s must be recompiled.'%%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES %(classes)s ## END CLASS DEFINITION if not hasattr(%(mainClassName)s, '_initCheetahAttributes'): templateAPIClass = getattr(%(mainClassName)s, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(%(mainClassName)s) %(footer)s """ % {'header': self.moduleHeader(), 'docstring': self.moduleDocstring(), 'specialVars': self.specialVars(), 'imports': self.importStatements(), 'constants': self.moduleConstants(), 'classes': self.classDefs(), 'footer': self.moduleFooter(), 'mainClassName': self._mainClassName, } self._moduleDef = moduleDef return moduleDef def timestamp(self, theTime=None): if not theTime: theTime = time.time() return time.asctime(time.localtime(theTime)) def moduleHeader(self): header = self._moduleShBang + '\n' header += self._moduleEncodingStr + '\n' if self._moduleHeaderLines: offSet = self.setting('commentOffset') header += ( '#' + ' '*offSet + ('\n#'+ ' '*offSet).join(self._moduleHeaderLines) + '\n') return header def moduleDocstring(self): if not self._moduleDocStringLines: return '' return ('"""' + '\n'.join(self._moduleDocStringLines) + '\n"""\n') def specialVars(self): chunks = [] theVars = self._specialVars keys = sorted(theVars.keys()) for key in keys: chunks.append(key + ' = ' + repr(theVars[key]) ) return '\n'.join(chunks) def importStatements(self): return '\n'.join(self._importStatements) def moduleConstants(self): return '\n'.join(self._moduleConstants) def classDefs(self): classDefs = [klass.classDef() for klass in self._finishedClasses()] return '\n\n'.join(classDefs) def moduleFooter(self): return """ # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=%(className)s()).run() """ % {'className':self._mainClassName} ################################################## ## Make Compiler an alias for ModuleCompiler Compiler = ModuleCompiler
ajibawa-2023/Python-Code-Large/train/row_1501
1,179
1,999
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0025, 0.0045, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\n Compiler classes for Cheetah:\n ModuleCompiler aka 'Compiler'\n ClassCompiler\n MethodCompiler\n\n If you are trying to grok this code start with ModuleCompiler.__init__,\n ModuleCompiler.compile, and ModuleCompiler.__getattr__."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Import_L11_C0", "label": "sys import sys", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.0055, 0.0005, 0, 0.66, 0.0312, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Import_L12_C0", "label": "os import os", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.006, 0.0005, 0, 0.66, 0.0625, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Import_L13_C0", "label": "os.path import os.path", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0065, 0.0005, 0, 0.66, 0.0938, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os.path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ImportFrom_L14_C0", "label": "from os.path import getmtime, exists", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.007, 0.0005, 0, 0.66, 0.125, 79, 0, 2, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["getmtime", "exists"], "rhs_call_name": "", "annotation": ""}, "snippet": "from os.path import getmtime, exists"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Import_L15_C0", "label": "re import re", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0075, 0.0005, 0, 0.66, 0.1562, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Import_L16_C0", "label": "types import types", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.008, 0.0005, 0, 0.66, 0.1875, 209, 0, 1, 0, 0, 209, 0, 0], "semantic": {"name": "types", "arg_names": [], "import_names": ["types"], "rhs_call_name": "", "annotation": ""}, "snippet": "import types"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Import_L17_C0", "label": "time import time", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.0085, 0.0005, 0, 0.66, 0.2188, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Import_L18_C0", "label": "random import random", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.009, 0.0005, 0, 0.66, 0.25, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rhs_call_name": "", "annotation": ""}, "snippet": "import random"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Import_L19_C0", "label": "warnings import warnings", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.0095, 0.0005, 0, 0.66, 0.2812, 358, 0, 1, 0, 0, 358, 0, 0], "semantic": {"name": "warnings", "arg_names": [], "import_names": ["warnings"], "rhs_call_name": "", "annotation": ""}, "snippet": "import warnings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Import_L20_C0", "label": "copy import copy", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.01, 0.0005, 0, 0.66, 0.3125, 739, 0, 1, 0, 0, 739, 0, 0], "semantic": {"name": "copy", "arg_names": [], "import_names": ["copy"], "rhs_call_name": "", "annotation": ""}, "snippet": "import copy"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ImportFrom_L22_C0", "label": "from Cheetah.Version import Version, VersionTuple", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.011, 0.0005, 0, 0.66, 0.3438, 551, 0, 2, 0, 0, 551, 0, 0], "semantic": {"name": "Cheetah.Version", "arg_names": [], "import_names": ["Version", "VersionTuple"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Version import Version, VersionTuple"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ImportFrom_L23_C0", "label": "from Cheetah.SettingsManager import SettingsManager", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.0115, 0.0005, 0, 0.66, 0.375, 741, 0, 1, 0, 0, 741, 0, 0], "semantic": {"name": "Cheetah.SettingsManager", "arg_names": [], "import_names": ["SettingsManager"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.SettingsManager import SettingsManager"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ImportFrom_L24_C0", "label": "from Cheetah.Utils.Indenter import indentize", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.012, 0.0005, 0, 0.66, 0.4062, 782, 0, 1, 0, 0, 782, 0, 0], "semantic": {"name": "Cheetah.Utils.Indenter", "arg_names": [], "import_names": ["indentize"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Utils.Indenter import indentize # an undocumented preprocessor"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ImportFrom_L25_C0", "label": "from Cheetah import ErrorCatchers", "type": "import", "loc": [25, 25], "level": 0, "parent": null, "vector": [1, 0, 0.0125, 0.0005, 0, 0.66, 0.4375, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "Cheetah", "arg_names": [], "import_names": ["ErrorCatchers"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah import ErrorCatchers"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ImportFrom_L26_C0", "label": "from Cheetah import NameMapper", "type": "import", "loc": [26, 26], "level": 0, "parent": null, "vector": [1, 0, 0.013, 0.0005, 0, 0.66, 0.4688, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "Cheetah", "arg_names": [], "import_names": ["NameMapper"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah import NameMapper"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ImportFrom_L27_C0", "label": "from Cheetah.Parser import Parser, ParseError, specialVarRE\u2026", "type": "import", "loc": [27, 29], "level": 0, "parent": null, "vector": [1, 0, 0.014, 0.0015, 0, 0.66, 0.5, 963, 0, 11, 0, 0, 963, 0, 0], "semantic": {"name": "Cheetah.Parser", "arg_names": [], "import_names": ["Parser", "ParseError", "specialVarRE", "STATIC_CACHE", "REFRESH_CACHE", "SET_LOCAL", "SET_GLOBAL", "SET_MODULE", "unicodeDirectiveRE", "encodingDirectiveRE", "escapedNewlineRE"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Parser import Parser, ParseError, specialVarRE, \\\n STATIC_CACHE, REFRESH_CACHE, SET_LOCAL, SET_GLOBAL, SET_MODULE, \\\n unicodeDirectiveRE, encodingDirectiveRE, escapedNewlineRE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ImportFrom_L31_C0", "label": "from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList\u2026", "type": "import", "loc": [31, 31], "level": 0, "parent": null, "vector": [1, 0, 0.0155, 0.0005, 0, 0.66, 0.5312, 308, 0, 4, 0, 0, 308, 0, 0], "semantic": {"name": "Cheetah.NameMapper", "arg_names": [], "import_names": ["NotFound", "valueForName", "valueFromSearchList", "valueFromFrameOrSearchList"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L32_C0", "label": "VFFSL =", "type": "assigned_variable", "loc": [32, 32], "level": 0, "parent": null, "vector": [14, 0, 0.016, 0.0005, 0, 0.66, 0.5625, 158, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "VFFSL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "VFFSL=valueFromFrameOrSearchList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L33_C0", "label": "VFSL =", "type": "assigned_variable", "loc": [33, 33], "level": 0, "parent": null, "vector": [14, 0, 0.0165, 0.0005, 0, 0.66, 0.5938, 477, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "VFSL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "VFSL=valueFromSearchList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L34_C0", "label": "VFN =", "type": "assigned_variable", "loc": [34, 34], "level": 0, "parent": null, "vector": [14, 0, 0.017, 0.0005, 0, 0.66, 0.625, 174, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "VFN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "VFN=valueForName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L35_C0", "label": "currentTime =", "type": "assigned_variable", "loc": [35, 35], "level": 0, "parent": null, "vector": [14, 0, 0.0175, 0.0005, 0, 0.66, 0.6562, 264, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "currentTime", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "currentTime=time.time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L37_C0", "label": "Error", "type": "class", "loc": [37, 37], "level": 0, "parent": null, "vector": [3, 0, 0.0185, 0.0005, 0, 0.66, 0.6875, 529, 0, 0, 0, 0, 645, 0, 0], "semantic": {"name": "Error", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Error(Exception): pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L40_C0", "label": "_DEFAULT_COMPILER_SETTINGS =", "type": "assigned_variable", "loc": [40, 102], "level": 0, "parent": null, "vector": [14, 0, 0.0355, 0.0315, 0, 0.66, 0.7188, 253, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "_DEFAULT_COMPILER_SETTINGS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "_DEFAULT_COMPILER_SETTINGS = [\n ('useNameMapper', True, 'Enable NameMapper for dotted notation and searchList support'),\n ('useSearchList', True, 'Enable the searchList, requires useNameMapper=True, if disabled, first portion of the $variable is a global, builtin, or local variable that doesn\\'t need looking up in the searchList'),\n ('allowSearchListAsMethArg', True, ''),\n ('useAutocalling', True, 'Detect and call callable objects in searchList, requires useNameMapper=True'),\n ('useStackFrames', True, 'Used for NameMapper.valueFromFrameOrSearchList rather than NameMapper.valueFromSearchList'),\n ('useErrorCatcher', False, 'Turn on the #errorCatcher directive for catching NameMapper errors, etc'),\n ('alwaysFilterNone', True, 'Filter out None prior to calling the #filter'),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L104_C0", "label": "DEFAULT_COMPILER_SETTINGS = dict()", "type": "assigned_variable", "loc": [104, 104], "level": 0, "parent": null, "vector": [14, 0, 0.052, 0.0005, 0, 0.66, 0.75, 523, 3, 1, 0, 0, 827, 10, 1], "semantic": {"name": "DEFAULT_COMPILER_SETTINGS", "arg_names": [], "import_names": [], "rhs_call_name": "dict", "annotation": ""}, "snippet": "DEFAULT_COMPILER_SETTINGS = dict([(v[0], v[1]) for v in _DEFAULT_COMPILER_SETTINGS])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "label": "GenUtils", "type": "class", "loc": [108, 280], "level": 0, "parent": null, "vector": [3, 0, 0.097, 0.0865, 0, 0.66, 0.7812, 137, 0, 7, 0, 0, 186, 0, 33], "semantic": {"name": "GenUtils", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class GenUtils(object):\n \"\"\"An abstract baseclass for the Compiler classes that provides methods that\n perform generic utility functions or generate pieces of output code from\n information passed in by the Parser baseclass. These methods don't do any\n parsing themselves.\n \"\"\"\n\n def genTimeInterval(self, timeString):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L109_C4", "label": "expression", "type": "expression", "loc": [109, 113], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "vector": [8, 1, 0.0555, 0.0025, 1, 0.46, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"An abstract baseclass for the Compiler classes that provides methods that\n perform generic utility functions or generate pieces of output code from\n information passed in by the Parser baseclass. These methods don't do any\n parsing themselves.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L115_C4", "label": "genTimeInterval", "type": "function", "loc": [115, 129], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "vector": [2, 1, 0.061, 0.0075, 1, 0.46, 0.1429, 144, 0, 2, 1, 0, 0, 0, 6], "semantic": {"name": "genTimeInterval", "arg_names": ["self", "timeString"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def genTimeInterval(self, timeString):\n ##@@ TR: need to add some error handling here\n if timeString[-1] == 's':\n interval = float(timeString[:-1])\n elif timeString[-1] == 'm':\n interval = float(timeString[:-1])*60\n elif timeString[-1] == 'h':\n interval = float(timeString[:-1])*60*60"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L117_C8", "label": "if", "type": "if", "loc": [117, 128], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L115_C4", "vector": [4, 2, 0.0613, 0.006, 2, 0.49, 0.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if timeString[-1] == 's':\n interval = float(timeString[:-1])\n elif timeString[-1] == 'm':\n interval = float(timeString[:-1])*60\n elif timeString[-1] == 'h':\n interval = float(timeString[:-1])*60*60\n elif timeString[-1] == 'd':\n interval = float(timeString[:-1])*60*60*24"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L118_C12", "label": "interval = float()", "type": "assigned_variable", "loc": [118, 118], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L117_C8", "vector": [14, 3, 0.059, 0.0005, 3, 0.03, 0.0, 628, 3, 1, 0, 0, 639, 10, 1], "semantic": {"name": "interval", "arg_names": [], "import_names": [], "rhs_call_name": "float", "annotation": ""}, "snippet": " interval = float(timeString[:-1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L119_C8", "label": "if", "type": "if", "loc": [119, 128], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L117_C8", "vector": [4, 3, 0.0618, 0.005, 3, 0.03, 1.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif timeString[-1] == 'm':\n interval = float(timeString[:-1])*60\n elif timeString[-1] == 'h':\n interval = float(timeString[:-1])*60*60\n elif timeString[-1] == 'd':\n interval = float(timeString[:-1])*60*60*24\n elif timeString[-1] == 'w':\n interval = float(timeString[:-1])*60*60*24*7"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L120_C12", "label": "interval =", "type": "assigned_variable", "loc": [120, 120], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L119_C8", "vector": [14, 4, 0.06, 0.0005, 4, 0.42, 0.0, 628, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "interval", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " interval = float(timeString[:-1])*60"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L121_C8", "label": "if", "type": "if", "loc": [121, 128], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L119_C8", "vector": [4, 4, 0.0623, 0.004, 4, 0.42, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif timeString[-1] == 'h':\n interval = float(timeString[:-1])*60*60\n elif timeString[-1] == 'd':\n interval = float(timeString[:-1])*60*60*24\n elif timeString[-1] == 'w':\n interval = float(timeString[:-1])*60*60*24*7\n else: # default to minutes\n interval = float(timeString)*60"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L122_C12", "label": "interval =", "type": "assigned_variable", "loc": [122, 122], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L121_C8", "vector": [14, 5, 0.061, 0.0005, 5, 0.64, 0.0, 628, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "interval", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " interval = float(timeString[:-1])*60*60"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L123_C8", "label": "if", "type": "if", "loc": [123, 128], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L121_C8", "vector": [4, 5, 0.0628, 0.003, 5, 0.64, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif timeString[-1] == 'd':\n interval = float(timeString[:-1])*60*60*24\n elif timeString[-1] == 'w':\n interval = float(timeString[:-1])*60*60*24*7\n else: # default to minutes\n interval = float(timeString)*60"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L124_C12", "label": "interval =", "type": "assigned_variable", "loc": [124, 124], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L123_C8", "vector": [14, 6, 0.062, 0.0005, 6, 0.91, 0.0, 628, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "interval", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " interval = float(timeString[:-1])*60*60*24"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L125_C8", "label": "if", "type": "if", "loc": [125, 128], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L123_C8", "vector": [4, 6, 0.0633, 0.002, 6, 0.91, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif timeString[-1] == 'w':\n interval = float(timeString[:-1])*60*60*24*7\n else: # default to minutes\n interval = float(timeString)*60"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L126_C12", "label": "interval =", "type": "assigned_variable", "loc": [126, 126], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L125_C8", "vector": [14, 7, 0.063, 0.0005, 7, 0.4, 0.0, 628, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "interval", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " interval = float(timeString[:-1])*60*60*24*7"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L128_C12", "label": "interval =", "type": "assigned_variable", "loc": [128, 128], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L125_C8", "vector": [14, 7, 0.064, 0.0005, 7, 0.4, 1.0, 628, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "interval", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " interval = float(timeString)*60"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L129_C8", "label": "return", "type": "return", "loc": [129, 129], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L115_C4", "vector": [13, 2, 0.0645, 0.0005, 2, 0.49, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return interval"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L131_C4", "label": "genCacheInfo", "type": "function", "loc": [131, 140], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "vector": [2, 1, 0.0678, 0.005, 1, 0.46, 0.2857, 580, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "genCacheInfo", "arg_names": ["self", "cacheTokenParts"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def genCacheInfo(self, cacheTokenParts):\n \"\"\"Decipher a placeholder cachetoken\n \"\"\"\n cacheInfo = {}\n if cacheTokenParts['REFRESH_CACHE']:\n cacheInfo['type'] = REFRESH_CACHE\n cacheInfo['interval'] = self.genTimeInterval(cacheTokenParts['interval'])\n elif cacheTokenParts['STATIC_CACHE']:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L132_C8", "label": "expression", "type": "expression", "loc": [132, 133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L131_C4", "vector": [8, 2, 0.0663, 0.001, 2, 0.93, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Decipher a placeholder cachetoken\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L134_C8", "label": "cacheInfo =", "type": "assigned_variable", "loc": [134, 134], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L131_C4", "vector": [14, 2, 0.067, 0.0005, 2, 0.93, 0.3333, 241, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "cacheInfo", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cacheInfo = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L135_C8", "label": "if", "type": "if", "loc": [135, 139], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L131_C4", "vector": [4, 2, 0.0685, 0.0025, 2, 0.93, 0.6667, 0, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if cacheTokenParts['REFRESH_CACHE']:\n cacheInfo['type'] = REFRESH_CACHE\n cacheInfo['interval'] = self.genTimeInterval(cacheTokenParts['interval'])\n elif cacheTokenParts['STATIC_CACHE']:\n cacheInfo['type'] = STATIC_CACHE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L136_C12", "label": "assign", "type": "assigned_variable", "loc": [136, 136], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L135_C8", "vector": [14, 3, 0.068, 0.0005, 3, 0.11, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cacheInfo['type'] = REFRESH_CACHE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L137_C12", "label": " = genTimeInterval()", "type": "assigned_variable", "loc": [137, 137], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L135_C8", "vector": [14, 3, 0.0685, 0.0005, 3, 0.11, 0.5, 0, 3, 1, 0, 0, 144, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "genTimeInterval", "annotation": ""}, "snippet": " cacheInfo['interval'] = self.genTimeInterval(cacheTokenParts['interval'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L138_C8", "label": "if", "type": "if", "loc": [138, 139], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L135_C8", "vector": [4, 3, 0.0693, 0.001, 3, 0.11, 1.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif cacheTokenParts['STATIC_CACHE']:\n cacheInfo['type'] = STATIC_CACHE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L139_C12", "label": "assign", "type": "assigned_variable", "loc": [139, 139], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L138_C8", "vector": [14, 4, 0.0695, 0.0005, 4, 0.47, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cacheInfo['type'] = STATIC_CACHE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L140_C8", "label": "return", "type": "return", "loc": [140, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L131_C4", "vector": [13, 2, 0.07, 0.0005, 2, 0.93, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return cacheInfo # is empty if no cache"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L142_C4", "label": "genCacheInfoFromArgList", "type": "function", "loc": [142, 153], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "vector": [2, 1, 0.0738, 0.006, 1, 0.46, 0.4286, 989, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "genCacheInfoFromArgList", "arg_names": ["self", "argList"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def genCacheInfoFromArgList(self, argList):\n cacheInfo = {'type':REFRESH_CACHE}\n for key, val in argList:\n if val[0] in '\"\\'':\n val = val[1:-1]\n\n if key == 'timer':\n key = 'interval'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L143_C8", "label": "cacheInfo =", "type": "assigned_variable", "loc": [143, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L142_C4", "vector": [14, 2, 0.0715, 0.0005, 2, 0.57, 0.0, 241, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "cacheInfo", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cacheInfo = {'type':REFRESH_CACHE}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L144_C8", "label": "for key, val", "type": "for", "loc": [144, 152], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L142_C4", "vector": [6, 2, 0.074, 0.0045, 2, 0.57, 0.5, 372, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "key, val", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for key, val in argList:\n if val[0] in '\"\\'':\n val = val[1:-1]\n\n if key == 'timer':\n key = 'interval'\n val = self.genTimeInterval(val)\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L145_C12", "label": "if", "type": "if", "loc": [145, 146], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L144_C8", "vector": [4, 3, 0.0728, 0.001, 3, 0.17, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if val[0] in '\"\\'':\n val = val[1:-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L146_C16", "label": "val =", "type": "assigned_variable", "loc": [146, 146], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L145_C12", "vector": [14, 4, 0.073, 0.0005, 4, 0.25, 0.0, 618, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "val", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " val = val[1:-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L148_C12", "label": "if", "type": "if", "loc": [148, 150], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L144_C8", "vector": [4, 3, 0.0745, 0.0015, 3, 0.17, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if key == 'timer':\n key = 'interval'\n val = self.genTimeInterval(val)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L149_C16", "label": "key =", "type": "assigned_variable", "loc": [149, 149], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L148_C12", "vector": [14, 4, 0.0745, 0.0005, 4, 0.67, 0.0, 230, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key = 'interval'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L150_C16", "label": "val = genTimeInterval()", "type": "assigned_variable", "loc": [150, 150], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L148_C12", "vector": [14, 4, 0.075, 0.0005, 4, 0.67, 1.0, 618, 3, 1, 0, 0, 144, 10, 1], "semantic": {"name": "val", "arg_names": [], "import_names": [], "rhs_call_name": "genTimeInterval", "annotation": ""}, "snippet": " val = self.genTimeInterval(val)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L152_C12", "label": "assign", "type": "assigned_variable", "loc": [152, 152], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L144_C8", "vector": [14, 3, 0.076, 0.0005, 3, 0.17, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cacheInfo[key] = val"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L153_C8", "label": "return", "type": "return", "loc": [153, 153], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L142_C4", "vector": [13, 2, 0.0765, 0.0005, 2, 0.57, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return cacheInfo"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L155_C4", "label": "genCheetahVar", "type": "function", "loc": [155, 161], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "vector": [2, 1, 0.079, 0.0035, 1, 0.46, 0.5714, 729, 0, 3, 1, 0, 0, 0, 5], "semantic": {"name": "genCheetahVar", "arg_names": ["self", "nameChunks", "plain"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def genCheetahVar(self, nameChunks, plain=False):\n if nameChunks[0][0] in self.setting('gettextTokens'):\n self.addGetTextVar(nameChunks) \n if self.setting('useNameMapper') and not plain:\n return self.genNameMapperVar(nameChunks)\n else:\n return self.genPlainVar(nameChunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L156_C8", "label": "if", "type": "if", "loc": [156, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L155_C4", "vector": [4, 2, 0.0783, 0.001, 2, 0.01, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if nameChunks[0][0] in self.setting('gettextTokens'):\n self.addGetTextVar(nameChunks) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L157_C12", "label": "addGetTextVar()", "type": "expression", "loc": [157, 157], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L156_C8", "vector": [8, 3, 0.0785, 0.0005, 3, 0.68, 0.0, 377, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addGetTextVar", "arg_names": [], "import_names": [], "rhs_call_name": "addGetTextVar", "annotation": ""}, "snippet": " self.addGetTextVar(nameChunks) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L158_C8", "label": "if", "type": "if", "loc": [158, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L155_C4", "vector": [4, 2, 0.0798, 0.002, 2, 0.01, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('useNameMapper') and not plain:\n return self.genNameMapperVar(nameChunks)\n else:\n return self.genPlainVar(nameChunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L159_C12", "label": "return", "type": "return", "loc": [159, 159], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L158_C8", "vector": [13, 3, 0.0795, 0.0005, 3, 0.45, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.genNameMapperVar(nameChunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L161_C12", "label": "return", "type": "return", "loc": [161, 161], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L158_C8", "vector": [13, 3, 0.0805, 0.0005, 3, 0.45, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.genPlainVar(nameChunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L163_C4", "label": "addGetTextVar", "type": "function", "loc": [163, 176], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "vector": [2, 1, 0.0848, 0.007, 1, 0.46, 0.7143, 377, 0, 2, 0, 0, 0, 0, 5], "semantic": {"name": "addGetTextVar", "arg_names": ["self", "nameChunks"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addGetTextVar(self, nameChunks):\n \"\"\"Output something that gettext can recognize.\n \n This is a harmless side effect necessary to make gettext work when it\n is scanning compiled templates for strings marked for translation.\n\n @@TR: another marginally more efficient approach would be to put the\n output in a dummy method that is never called."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L164_C8", "label": "expression", "type": "expression", "loc": [164, 171], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L163_C4", "vector": [8, 2, 0.0838, 0.004, 2, 0.97, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Output something that gettext can recognize.\n \n This is a harmless side effect necessary to make gettext work when it\n is scanning compiled templates for strings marked for translation.\n\n @@TR: another marginally more efficient approach would be to put the\n output in a dummy method that is never called.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L173_C8", "label": "addChunk()", "type": "expression", "loc": [173, 173], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L163_C4", "vector": [8, 2, 0.0865, 0.0005, 2, 0.97, 0.25, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(\"if False:\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L174_C8", "label": "indent()", "type": "expression", "loc": [174, 174], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L163_C4", "vector": [8, 2, 0.087, 0.0005, 2, 0.97, 0.5, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L175_C8", "label": "addChunk()", "type": "expression", "loc": [175, 175], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L163_C4", "vector": [8, 2, 0.0875, 0.0005, 2, 0.97, 0.75, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(self.genPlainVar(nameChunks[:]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L176_C8", "label": "dedent()", "type": "expression", "loc": [176, 176], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L163_C4", "vector": [8, 2, 0.088, 0.0005, 2, 0.97, 1.0, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L178_C4", "label": "genPlainVar", "type": "function", "loc": [178, 188], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "vector": [2, 1, 0.0915, 0.0055, 1, 0.46, 0.8571, 266, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "genPlainVar", "arg_names": ["self", "nameChunks"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def genPlainVar(self, nameChunks): \n \"\"\"Generate Python code for a Cheetah $var without using NameMapper\n (Unified Dotted Notation with the SearchList).\n \"\"\"\n nameChunks.reverse()\n chunk = nameChunks.pop()\n pythonCode = chunk[0] + chunk[2]\n while nameChunks:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L179_C8", "label": "expression", "type": "expression", "loc": [179, 181], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L178_C4", "vector": [8, 2, 0.09, 0.0015, 2, 0.48, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Generate Python code for a Cheetah $var without using NameMapper\n (Unified Dotted Notation with the SearchList).\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L182_C8", "label": "reverse()", "type": "expression", "loc": [182, 182], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L178_C4", "vector": [8, 2, 0.091, 0.0005, 2, 0.48, 0.2, 109, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "reverse", "arg_names": [], "import_names": [], "rhs_call_name": "reverse", "annotation": ""}, "snippet": " nameChunks.reverse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L183_C8", "label": "chunk = pop()", "type": "assigned_variable", "loc": [183, 183], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L178_C4", "vector": [14, 2, 0.0915, 0.0005, 2, 0.48, 0.4, 637, 3, 0, 0, 0, 969, 10, 1], "semantic": {"name": "chunk", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " chunk = nameChunks.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L184_C8", "label": "pythonCode =", "type": "assigned_variable", "loc": [184, 184], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L178_C4", "vector": [14, 2, 0.092, 0.0005, 2, 0.48, 0.6, 811, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pythonCode", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pythonCode = chunk[0] + chunk[2]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L185_C8", "label": "while", "type": "while", "loc": [185, 187], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L178_C4", "vector": [5, 2, 0.093, 0.0015, 2, 0.48, 0.8, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while nameChunks:\n chunk = nameChunks.pop()\n pythonCode = (pythonCode + '.' + chunk[0] + chunk[2])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L186_C12", "label": "chunk = pop()", "type": "assigned_variable", "loc": [186, 186], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L185_C8", "vector": [14, 3, 0.093, 0.0005, 3, 0.05, 0.0, 637, 3, 0, 0, 0, 969, 10, 1], "semantic": {"name": "chunk", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " chunk = nameChunks.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L187_C12", "label": "pythonCode =", "type": "assigned_variable", "loc": [187, 187], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L185_C8", "vector": [14, 3, 0.0935, 0.0005, 3, 0.05, 1.0, 811, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pythonCode", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pythonCode = (pythonCode + '.' + chunk[0] + chunk[2])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L188_C8", "label": "return", "type": "return", "loc": [188, 188], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L178_C4", "vector": [13, 2, 0.094, 0.0005, 2, 0.48, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return pythonCode"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "label": "genNameMapperVar", "type": "function", "loc": [190, 280], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "vector": [2, 1, 0.1176, 0.0455, 1, 0.46, 1.0, 18, 0, 2, 1, 0, 0, 0, 12], "semantic": {"name": "genNameMapperVar", "arg_names": ["self", "nameChunks"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def genNameMapperVar(self, nameChunks):\n \"\"\"Generate valid Python code for a Cheetah $var, using NameMapper\n (Unified Dotted Notation with the SearchList).\n\n nameChunks = list of var subcomponents represented as tuples\n [ (name,useAC,remainderOfExpr),\n ]\n where:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L191_C8", "label": "expression", "type": "expression", "loc": [191, 246], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "vector": [8, 2, 0.1093, 0.028, 2, 0.63, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Generate valid Python code for a Cheetah $var, using NameMapper\n (Unified Dotted Notation with the SearchList).\n\n nameChunks = list of var subcomponents represented as tuples\n [ (name,useAC,remainderOfExpr),\n ]\n where:\n name = the dotted name base"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L247_C8", "label": "defaultUseAC = setting()", "type": "assigned_variable", "loc": [247, 247], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "vector": [14, 2, 0.1236, 0.0005, 2, 0.63, 0.1429, 738, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "defaultUseAC", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " defaultUseAC = self.setting('useAutocalling')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L248_C8", "label": "useSearchList = setting()", "type": "assigned_variable", "loc": [248, 248], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "vector": [14, 2, 0.1241, 0.0005, 2, 0.63, 0.2857, 926, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "useSearchList", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " useSearchList = self.setting('useSearchList')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L250_C8", "label": "reverse()", "type": "expression", "loc": [250, 250], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "vector": [8, 2, 0.1251, 0.0005, 2, 0.63, 0.4286, 109, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "reverse", "arg_names": [], "import_names": [], "rhs_call_name": "reverse", "annotation": ""}, "snippet": " nameChunks.reverse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L251_C8", "label": "name, useAC, remainder = pop()", "type": "assigned_variable", "loc": [251, 251], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "vector": [14, 2, 0.1256, 0.0005, 2, 0.63, 0.5714, 712, 3, 0, 0, 0, 969, 10, 1], "semantic": {"name": "name, useAC, remainder", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " name, useAC, remainder = nameChunks.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L253_C8", "label": "if", "type": "if", "loc": [253, 272], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "vector": [4, 2, 0.1313, 0.01, 2, 0.63, 0.7143, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not useSearchList:\n firstDotIdx = name.find('.')\n if firstDotIdx != -1 and firstDotIdx < len(name):\n beforeFirstDot, afterDot = name[:firstDotIdx], name[firstDotIdx+1:]\n pythonCode = ('VFN(' + beforeFirstDot +\n ',\"' + afterDot +\n '\",' + repr(defaultUseAC and useAC) + ')'\n + remainder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L254_C12", "label": "firstDotIdx = find()", "type": "assigned_variable", "loc": [254, 254], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L253_C8", "vector": [14, 3, 0.1271, 0.0005, 3, 0.39, 0.0, 713, 3, 1, 0, 0, 340, 10, 1], "semantic": {"name": "firstDotIdx", "arg_names": [], "import_names": [], "rhs_call_name": "find", "annotation": ""}, "snippet": " firstDotIdx = name.find('.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L255_C12", "label": "if", "type": "if", "loc": [255, 262], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L253_C8", "vector": [4, 3, 0.1293, 0.004, 3, 0.39, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if firstDotIdx != -1 and firstDotIdx < len(name):\n beforeFirstDot, afterDot = name[:firstDotIdx], name[firstDotIdx+1:]\n pythonCode = ('VFN(' + beforeFirstDot +\n ',\"' + afterDot +\n '\",' + repr(defaultUseAC and useAC) + ')'\n + remainder)\n else:\n pythonCode = name+remainder"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L256_C16", "label": "beforeFirstDot, afterDot =", "type": "assigned_variable", "loc": [256, 256], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L255_C12", "vector": [14, 4, 0.1281, 0.0005, 4, 0.03, 0.0, 98, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "beforeFirstDot, afterDot", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " beforeFirstDot, afterDot = name[:firstDotIdx], name[firstDotIdx+1:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L257_C16", "label": "pythonCode =", "type": "assigned_variable", "loc": [257, 260], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L255_C12", "vector": [14, 4, 0.1293, 0.002, 4, 0.03, 0.5, 811, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "pythonCode", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pythonCode = ('VFN(' + beforeFirstDot +\n ',\"' + afterDot +\n '\",' + repr(defaultUseAC and useAC) + ')'\n + remainder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L262_C16", "label": "pythonCode =", "type": "assigned_variable", "loc": [262, 262], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L255_C12", "vector": [14, 4, 0.1311, 0.0005, 4, 0.03, 1.0, 811, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pythonCode", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pythonCode = name+remainder"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L263_C8", "label": "if", "type": "if", "loc": [263, 272], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L253_C8", "vector": [4, 3, 0.1338, 0.005, 3, 0.39, 1.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.setting('useStackFrames'):\n pythonCode = ('VFFSL(SL,'\n '\"'+ name + '\",'\n + repr(defaultUseAC and useAC) + ')'\n + remainder)\n else:\n pythonCode = ('VFSL([locals()]+SL+[globals(), __builtin__],'\n '\"'+ name + '\",'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L264_C12", "label": "pythonCode =", "type": "assigned_variable", "loc": [264, 267], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L263_C8", "vector": [14, 4, 0.1328, 0.002, 4, 0.01, 0.0, 811, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "pythonCode", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pythonCode = ('VFFSL(SL,'\n '\"'+ name + '\",'\n + repr(defaultUseAC and useAC) + ')'\n + remainder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L269_C12", "label": "pythonCode =", "type": "assigned_variable", "loc": [269, 272], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L263_C8", "vector": [14, 4, 0.1353, 0.002, 4, 0.01, 1.0, 811, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "pythonCode", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pythonCode = ('VFSL([locals()]+SL+[globals(), __builtin__],'\n '\"'+ name + '\",'\n + repr(defaultUseAC and useAC) + ')'\n + remainder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L274_C8", "label": "while", "type": "while", "loc": [274, 279], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "vector": [5, 2, 0.1383, 0.003, 2, 0.63, 0.8571, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while nameChunks:\n name, useAC, remainder = nameChunks.pop()\n pythonCode = ('VFN(' + pythonCode +\n ',\"' + name +\n '\",' + repr(defaultUseAC and useAC) + ')'\n + remainder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L275_C12", "label": "name, useAC, remainder = pop()", "type": "assigned_variable", "loc": [275, 275], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L274_C8", "vector": [14, 3, 0.1376, 0.0005, 3, 0.98, 0.0, 712, 3, 0, 0, 0, 969, 10, 1], "semantic": {"name": "name, useAC, remainder", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " name, useAC, remainder = nameChunks.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L276_C12", "label": "pythonCode =", "type": "assigned_variable", "loc": [276, 279], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L274_C8", "vector": [14, 3, 0.1388, 0.002, 3, 0.98, 1.0, 811, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "pythonCode", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pythonCode = ('VFN(' + pythonCode +\n ',\"' + name +\n '\",' + repr(defaultUseAC and useAC) + ')'\n + remainder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L280_C8", "label": "return", "type": "return", "loc": [280, 280], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "vector": [13, 2, 0.1401, 0.0005, 2, 0.63, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return pythonCode"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "label": "MethodCompiler", "type": "class", "loc": [285, 966], "level": 0, "parent": null, "vector": [3, 0, 0.3129, 0.3412, 0, 0.66, 0.8125, 839, 0, 75, 0, 0, 137, 0, 99], "semantic": {"name": "MethodCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class MethodCompiler(GenUtils):\n def __init__(self, methodName, classCompiler,\n initialMethodComment=None,\n decorators=None):\n self._settingsManager = classCompiler\n self._classCompiler = classCompiler\n self._moduleCompiler = classCompiler._moduleCompiler\n self._methodName = methodName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L286_C4", "label": "__init__", "type": "function", "loc": [286, 295], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1453, 0.005, 1, 0.82, 0.0, 555, 0, 5, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "methodName", "classCompiler", "initialMethodComment", "decorators"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, methodName, classCompiler,\n initialMethodComment=None,\n decorators=None):\n self._settingsManager = classCompiler\n self._classCompiler = classCompiler\n self._moduleCompiler = classCompiler._moduleCompiler\n self._methodName = methodName\n self._initialMethodComment = initialMethodComment"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L289_C8", "label": "self._settingsManager =", "type": "assigned_variable", "loc": [289, 289], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L286_C4", "vector": [14, 2, 0.1446, 0.0005, 2, 0.82, 0.0, 626, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._settingsManager", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._settingsManager = classCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L290_C8", "label": "self._classCompiler =", "type": "assigned_variable", "loc": [290, 290], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L286_C4", "vector": [14, 2, 0.1451, 0.0005, 2, 0.82, 0.1667, 754, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._classCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._classCompiler = classCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L291_C8", "label": "self._moduleCompiler =", "type": "assigned_variable", "loc": [291, 291], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L286_C4", "vector": [14, 2, 0.1456, 0.0005, 2, 0.82, 0.3333, 150, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._moduleCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._moduleCompiler = classCompiler._moduleCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L292_C8", "label": "self._methodName =", "type": "assigned_variable", "loc": [292, 292], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L286_C4", "vector": [14, 2, 0.1461, 0.0005, 2, 0.82, 0.5, 230, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._methodName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._methodName = methodName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L293_C8", "label": "self._initialMethodComment =", "type": "assigned_variable", "loc": [293, 293], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L286_C4", "vector": [14, 2, 0.1466, 0.0005, 2, 0.82, 0.6667, 279, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._initialMethodComment", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._initialMethodComment = initialMethodComment"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L294_C8", "label": "_setupState()", "type": "expression", "loc": [294, 294], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L286_C4", "vector": [8, 2, 0.1471, 0.0005, 2, 0.82, 0.8333, 611, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_setupState", "arg_names": [], "import_names": [], "rhs_call_name": "_setupState", "annotation": ""}, "snippet": " self._setupState()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L295_C8", "label": "self._decorators =", "type": "assigned_variable", "loc": [295, 295], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L286_C4", "vector": [14, 2, 0.1476, 0.0005, 2, 0.82, 1.0, 582, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._decorators", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._decorators = decorators or []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L297_C4", "label": "setting", "type": "function", "loc": [297, 298], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1488, 0.001, 1, 0.82, 0.0133, 368, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "setting", "arg_names": ["self", "key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setting(self, key):\n return self._settingsManager.setting(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L298_C8", "label": "return", "type": "return", "loc": [298, 298], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L297_C4", "vector": [13, 2, 0.1491, 0.0005, 2, 0.52, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._settingsManager.setting(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "label": "_setupState", "type": "function", "loc": [300, 317], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1543, 0.009, 1, 0.82, 0.0267, 611, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "_setupState", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _setupState(self):\n self._indent = self.setting('indentationStep')\n self._indentLev = self.setting('initialMethIndentLevel')\n self._pendingStrConstChunks = []\n self._methodSignature = None\n self._methodDef = None\n self._docStringLines = []\n self._methodBodyChunks = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L301_C8", "label": "self._indent = setting()", "type": "assigned_variable", "loc": [301, 301], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "vector": [14, 2, 0.1506, 0.0005, 2, 0.49, 0.0, 765, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "self._indent", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " self._indent = self.setting('indentationStep')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L302_C8", "label": "self._indentLev = setting()", "type": "assigned_variable", "loc": [302, 302], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "vector": [14, 2, 0.1511, 0.0005, 2, 0.49, 0.0769, 122, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "self._indentLev", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " self._indentLev = self.setting('initialMethIndentLevel')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L303_C8", "label": "self._pendingStrConstChunks =", "type": "assigned_variable", "loc": [303, 303], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "vector": [14, 2, 0.1516, 0.0005, 2, 0.49, 0.1538, 894, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._pendingStrConstChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._pendingStrConstChunks = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L304_C8", "label": "self._methodSignature =", "type": "assigned_variable", "loc": [304, 304], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "vector": [14, 2, 0.1521, 0.0005, 2, 0.49, 0.2308, 742, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._methodSignature", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._methodSignature = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L305_C8", "label": "self._methodDef =", "type": "assigned_variable", "loc": [305, 305], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "vector": [14, 2, 0.1526, 0.0005, 2, 0.49, 0.3077, 884, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._methodDef", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._methodDef = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L306_C8", "label": "self._docStringLines =", "type": "assigned_variable", "loc": [306, 306], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "vector": [14, 2, 0.1531, 0.0005, 2, 0.49, 0.3846, 667, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._docStringLines", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._docStringLines = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L307_C8", "label": "self._methodBodyChunks =", "type": "assigned_variable", "loc": [307, 307], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "vector": [14, 2, 0.1536, 0.0005, 2, 0.49, 0.4615, 605, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._methodBodyChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._methodBodyChunks = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L309_C8", "label": "self._cacheRegionsStack =", "type": "assigned_variable", "loc": [309, 309], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "vector": [14, 2, 0.1546, 0.0005, 2, 0.49, 0.5385, 263, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._cacheRegionsStack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._cacheRegionsStack = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L310_C8", "label": "self._callRegionsStack =", "type": "assigned_variable", "loc": [310, 310], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "vector": [14, 2, 0.1551, 0.0005, 2, 0.49, 0.6154, 950, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._callRegionsStack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._callRegionsStack = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L311_C8", "label": "self._captureRegionsStack =", "type": "assigned_variable", "loc": [311, 311], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "vector": [14, 2, 0.1556, 0.0005, 2, 0.49, 0.6923, 302, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._captureRegionsStack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._captureRegionsStack = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L312_C8", "label": "self._filterRegionsStack =", "type": "assigned_variable", "loc": [312, 312], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "vector": [14, 2, 0.1561, 0.0005, 2, 0.49, 0.7692, 97, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._filterRegionsStack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._filterRegionsStack = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L314_C8", "label": "self._isErrorCatcherOn =", "type": "assigned_variable", "loc": [314, 314], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "vector": [14, 2, 0.1571, 0.0005, 2, 0.49, 0.8462, 200, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._isErrorCatcherOn", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._isErrorCatcherOn = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L316_C8", "label": "self._hasReturnStatement =", "type": "assigned_variable", "loc": [316, 316], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "vector": [14, 2, 0.1581, 0.0005, 2, 0.49, 0.9231, 57, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._hasReturnStatement", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._hasReturnStatement = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L317_C8", "label": "self._isGenerator =", "type": "assigned_variable", "loc": [317, 317], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "vector": [14, 2, 0.1586, 0.0005, 2, 0.49, 1.0, 137, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._isGenerator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._isGenerator = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L320_C4", "label": "cleanupState", "type": "function", "loc": [320, 323], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1608, 0.002, 1, 0.82, 0.04, 776, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "cleanupState", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def cleanupState(self):\n \"\"\"Called by the containing class compiler instance\n \"\"\"\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L321_C8", "label": "expression", "type": "expression", "loc": [321, 322], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L320_C4", "vector": [8, 2, 0.1608, 0.001, 2, 0.43, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Called by the containing class compiler instance\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L325_C4", "label": "methodName", "type": "function", "loc": [325, 326], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1628, 0.001, 1, 0.82, 0.0533, 681, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "methodName", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def methodName(self):\n return self._methodName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L326_C8", "label": "return", "type": "return", "loc": [326, 326], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L325_C4", "vector": [13, 2, 0.1631, 0.0005, 2, 0.66, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._methodName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L328_C4", "label": "setMethodName", "type": "function", "loc": [328, 329], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1643, 0.001, 1, 0.82, 0.0667, 349, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "setMethodName", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setMethodName(self, name):\n self._methodName = name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L329_C8", "label": "self._methodName =", "type": "assigned_variable", "loc": [329, 329], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L328_C4", "vector": [14, 2, 0.1646, 0.0005, 2, 0.62, 0.0, 230, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._methodName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._methodName = name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L333_C4", "label": "indentation", "type": "function", "loc": [333, 334], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1668, 0.001, 1, 0.82, 0.08, 329, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "indentation", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def indentation(self):\n return self._indent * self._indentLev"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L334_C8", "label": "return", "type": "return", "loc": [334, 334], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L333_C4", "vector": [13, 2, 0.1671, 0.0005, 2, 0.4, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._indent * self._indentLev"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L336_C4", "label": "indent", "type": "function", "loc": [336, 337], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1683, 0.001, 1, 0.82, 0.0933, 231, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "indent", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def indent(self):\n self._indentLev +=1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L339_C4", "label": "dedent", "type": "function", "loc": [339, 343], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1706, 0.0025, 1, 0.82, 0.1067, 899, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def dedent(self):\n if self._indentLev:\n self._indentLev -=1\n else:\n raise Error('Attempt to dedent when the indentLev is 0')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L340_C8", "label": "if", "type": "if", "loc": [340, 343], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L339_C4", "vector": [4, 2, 0.1708, 0.002, 2, 0.5, 0.0, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._indentLev:\n self._indentLev -=1\n else:\n raise Error('Attempt to dedent when the indentLev is 0')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L347_C4", "label": "methodDef", "type": "function", "loc": [347, 351], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1746, 0.0025, 1, 0.82, 0.12, 649, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "methodDef", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def methodDef(self):\n if self._methodDef:\n return self._methodDef\n else:\n return self.wrapCode()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L348_C8", "label": "if", "type": "if", "loc": [348, 351], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L347_C4", "vector": [4, 2, 0.1748, 0.002, 2, 0.35, 0.0, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._methodDef:\n return self._methodDef\n else:\n return self.wrapCode()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L349_C12", "label": "return", "type": "return", "loc": [349, 349], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L348_C8", "vector": [13, 3, 0.1746, 0.0005, 3, 0.94, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._methodDef"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L351_C12", "label": "return", "type": "return", "loc": [351, 351], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L348_C8", "vector": [13, 3, 0.1756, 0.0005, 3, 0.94, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.wrapCode()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L353_C4", "label": "__str__ =", "type": "assigned_variable", "loc": [353, 353], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [14, 1, 0.1766, 0.0005, 1, 0.82, 0.1333, 527, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__str__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __str__ = methodDef"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L354_C4", "label": "__unicode__ =", "type": "assigned_variable", "loc": [354, 354], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [14, 1, 0.1771, 0.0005, 1, 0.82, 0.1467, 318, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__unicode__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __unicode__ = methodDef"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L356_C4", "label": "wrapCode", "type": "function", "loc": [356, 365], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1803, 0.005, 1, 0.82, 0.16, 516, 0, 1, 1, 0, 0, 0, 5], "semantic": {"name": "wrapCode", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def wrapCode(self):\n self.commitStrConst()\n methodDefChunks = (\n self.methodSignature(),\n '\\n',\n self.docString(),\n self.methodBody() )\n methodDef = ''.join(methodDefChunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L357_C8", "label": "commitStrConst()", "type": "expression", "loc": [357, 357], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L356_C4", "vector": [8, 2, 0.1786, 0.0005, 2, 0.68, 0.0, 212, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "commitStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "commitStrConst", "annotation": ""}, "snippet": " self.commitStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L358_C8", "label": "methodDefChunks =", "type": "assigned_variable", "loc": [358, 362], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L356_C4", "vector": [14, 2, 0.1801, 0.0025, 2, 0.68, 0.25, 322, 0, 0, 0, 0, 0, 8, 3], "semantic": {"name": "methodDefChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " methodDefChunks = (\n self.methodSignature(),\n '\\n',\n self.docString(),\n self.methodBody() )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L363_C8", "label": "methodDef = join()", "type": "assigned_variable", "loc": [363, 363], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L356_C4", "vector": [14, 2, 0.1816, 0.0005, 2, 0.68, 0.5, 649, 3, 1, 0, 0, 933, 10, 1], "semantic": {"name": "methodDef", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " methodDef = ''.join(methodDefChunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L364_C8", "label": "self._methodDef =", "type": "assigned_variable", "loc": [364, 364], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L356_C4", "vector": [14, 2, 0.1821, 0.0005, 2, 0.68, 0.75, 884, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._methodDef", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._methodDef = methodDef"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L365_C8", "label": "return", "type": "return", "loc": [365, 365], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L356_C4", "vector": [13, 2, 0.1826, 0.0005, 2, 0.68, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return methodDef"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L367_C4", "label": "methodSignature", "type": "function", "loc": [367, 368], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1838, 0.001, 1, 0.82, 0.1733, 886, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "methodSignature", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def methodSignature(self):\n return self._indent + self._methodSignature + ':'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L368_C8", "label": "return", "type": "return", "loc": [368, 368], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L367_C4", "vector": [13, 2, 0.1841, 0.0005, 2, 0.53, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._indent + self._methodSignature + ':'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L370_C4", "label": "setMethodSignature", "type": "function", "loc": [370, 371], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1853, 0.001, 1, 0.82, 0.1867, 668, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "setMethodSignature", "arg_names": ["self", "signature"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setMethodSignature(self, signature):\n self._methodSignature = signature"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L371_C8", "label": "self._methodSignature =", "type": "assigned_variable", "loc": [371, 371], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L370_C4", "vector": [14, 2, 0.1856, 0.0005, 2, 0.01, 0.0, 742, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._methodSignature", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._methodSignature = signature"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L373_C4", "label": "methodBody", "type": "function", "loc": [373, 374], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1868, 0.001, 1, 0.82, 0.2, 764, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "methodBody", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def methodBody(self):\n return ''.join( self._methodBodyChunks )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L374_C8", "label": "return", "type": "return", "loc": [374, 374], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L373_C4", "vector": [13, 2, 0.1871, 0.0005, 2, 0.97, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''.join( self._methodBodyChunks )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L376_C4", "label": "docString", "type": "function", "loc": [376, 384], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1901, 0.0045, 1, 0.82, 0.2133, 488, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "docString", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def docString(self):\n if not self._docStringLines:\n return ''\n \n ind = self._indent*2 \n docStr = (ind + '\"\"\"\\n' + ind +\n ('\\n' + ind).join([ln.replace('\"\"\"', \"'''\") for ln in self._docStringLines]) +\n '\\n' + ind + '\"\"\"\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L377_C8", "label": "if", "type": "if", "loc": [377, 378], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L376_C4", "vector": [4, 2, 0.1888, 0.001, 2, 0.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self._docStringLines:\n return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L378_C12", "label": "return", "type": "return", "loc": [378, 378], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L377_C8", "vector": [13, 3, 0.1891, 0.0005, 3, 0.85, 0.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L380_C8", "label": "ind =", "type": "assigned_variable", "loc": [380, 380], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L376_C4", "vector": [14, 2, 0.1901, 0.0005, 2, 0.5, 0.3333, 680, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "ind", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ind = self._indent*2 "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L381_C8", "label": "docStr =", "type": "assigned_variable", "loc": [381, 383], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L376_C4", "vector": [14, 2, 0.1911, 0.0015, 2, 0.5, 0.6667, 346, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "docStr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " docStr = (ind + '\"\"\"\\n' + ind +\n ('\\n' + ind).join([ln.replace('\"\"\"', \"'''\") for ln in self._docStringLines]) +\n '\\n' + ind + '\"\"\"\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L384_C8", "label": "return", "type": "return", "loc": [384, 384], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L376_C4", "vector": [13, 2, 0.1921, 0.0005, 2, 0.5, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return docStr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L387_C4", "label": "addMethDocString", "type": "function", "loc": [387, 388], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1938, 0.001, 1, 0.82, 0.2267, 664, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "addMethDocString", "arg_names": ["self", "line"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addMethDocString(self, line):\n self._docStringLines.append(line.replace('%', '%%'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L388_C8", "label": "append()", "type": "expression", "loc": [388, 388], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L387_C4", "vector": [8, 2, 0.1941, 0.0005, 2, 0.88, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._docStringLines.append(line.replace('%', '%%'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L390_C4", "label": "addChunk", "type": "function", "loc": [390, 393], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1958, 0.002, 1, 0.82, 0.24, 316, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "addChunk", "arg_names": ["self", "chunk"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addChunk(self, chunk):\n self.commitStrConst()\n chunk = \"\\n\" + self.indentation() + chunk\n self._methodBodyChunks.append(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L391_C8", "label": "commitStrConst()", "type": "expression", "loc": [391, 391], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L390_C4", "vector": [8, 2, 0.1956, 0.0005, 2, 0.74, 0.0, 212, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "commitStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "commitStrConst", "annotation": ""}, "snippet": " self.commitStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L392_C8", "label": "chunk =", "type": "assigned_variable", "loc": [392, 392], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L390_C4", "vector": [14, 2, 0.1961, 0.0005, 2, 0.74, 0.5, 637, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "chunk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " chunk = \"\\n\" + self.indentation() + chunk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L393_C8", "label": "append()", "type": "expression", "loc": [393, 393], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L390_C4", "vector": [8, 2, 0.1966, 0.0005, 2, 0.74, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._methodBodyChunks.append(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L395_C4", "label": "appendToPrevChunk", "type": "function", "loc": [395, 396], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1978, 0.001, 1, 0.82, 0.2533, 171, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "appendToPrevChunk", "arg_names": ["self", "appendage"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def appendToPrevChunk(self, appendage):\n self._methodBodyChunks[-1] = self._methodBodyChunks[-1] + appendage"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L396_C8", "label": "assign", "type": "assigned_variable", "loc": [396, 396], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L395_C4", "vector": [14, 2, 0.1981, 0.0005, 2, 0.78, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._methodBodyChunks[-1] = self._methodBodyChunks[-1] + appendage"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L398_C4", "label": "addWriteChunk", "type": "function", "loc": [398, 399], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.1993, 0.001, 1, 0.82, 0.2667, 251, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addWriteChunk", "arg_names": ["self", "chunk"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addWriteChunk(self, chunk):\n self.addChunk('write(' + chunk + ')')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L399_C8", "label": "addChunk()", "type": "expression", "loc": [399, 399], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L398_C4", "vector": [8, 2, 0.1996, 0.0005, 2, 0.03, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('write(' + chunk + ')')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L401_C4", "label": "addFilteredChunk", "type": "function", "loc": [401, 423], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2061, 0.0115, 1, 0.82, 0.28, 240, 0, 5, 0, 0, 0, 0, 14], "semantic": {"name": "addFilteredChunk", "arg_names": ["self", "chunk", "filterArgs", "rawExpr", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addFilteredChunk(self, chunk, filterArgs=None, rawExpr=None, lineCol=None):\n if filterArgs is None:\n filterArgs = ''\n if self.setting('includeRawExprInFilterArgs') and rawExpr:\n filterArgs += ', rawExpr=%s'%repr(rawExpr)\n\n if self.setting('alwaysFilterNone'):\n if rawExpr and rawExpr.find('\\n')==-1 and rawExpr.find('\\r')==-1:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L402_C8", "label": "if", "type": "if", "loc": [402, 403], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L401_C4", "vector": [4, 2, 0.2014, 0.001, 2, 0.07, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if filterArgs is None:\n filterArgs = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L403_C12", "label": "filterArgs =", "type": "assigned_variable", "loc": [403, 403], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L402_C8", "vector": [14, 3, 0.2016, 0.0005, 3, 0.95, 0.0, 278, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "filterArgs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " filterArgs = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L404_C8", "label": "if", "type": "if", "loc": [404, 405], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L401_C4", "vector": [4, 2, 0.2024, 0.001, 2, 0.07, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('includeRawExprInFilterArgs') and rawExpr:\n filterArgs += ', rawExpr=%s'%repr(rawExpr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L407_C8", "label": "if", "type": "if", "loc": [407, 423], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L401_C4", "vector": [4, 2, 0.2076, 0.0085, 2, 0.07, 1.0, 0, 3, 0, 0, 0, 0, 0, 12], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('alwaysFilterNone'):\n if rawExpr and rawExpr.find('\\n')==-1 and rawExpr.find('\\r')==-1:\n self.addChunk(\"_v = %s # %r\"%(chunk, rawExpr))\n if lineCol:\n self.appendToPrevChunk(' on line %s, col %s'%lineCol)\n else:\n self.addChunk(\"_v = %s\"%chunk)\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L408_C12", "label": "if", "type": "if", "loc": [408, 413], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L407_C8", "vector": [4, 3, 0.2054, 0.003, 3, 0.82, 0.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if rawExpr and rawExpr.find('\\n')==-1 and rawExpr.find('\\r')==-1:\n self.addChunk(\"_v = %s # %r\"%(chunk, rawExpr))\n if lineCol:\n self.appendToPrevChunk(' on line %s, col %s'%lineCol)\n else:\n self.addChunk(\"_v = %s\"%chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L409_C16", "label": "addChunk()", "type": "expression", "loc": [409, 409], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L408_C12", "vector": [8, 4, 0.2046, 0.0005, 4, 0.96, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(\"_v = %s # %r\"%(chunk, rawExpr))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L410_C16", "label": "if", "type": "if", "loc": [410, 411], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L408_C12", "vector": [4, 4, 0.2054, 0.001, 4, 0.96, 0.5, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if lineCol:\n self.appendToPrevChunk(' on line %s, col %s'%lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L411_C20", "label": "appendToPrevChunk()", "type": "expression", "loc": [411, 411], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L410_C16", "vector": [8, 5, 0.2056, 0.0005, 5, 0.66, 0.0, 171, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "appendToPrevChunk", "arg_names": [], "import_names": [], "rhs_call_name": "appendToPrevChunk", "annotation": ""}, "snippet": " self.appendToPrevChunk(' on line %s, col %s'%lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L413_C16", "label": "addChunk()", "type": "expression", "loc": [413, 413], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L408_C12", "vector": [8, 4, 0.2066, 0.0005, 4, 0.96, 1.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(\"_v = %s\"%chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L415_C12", "label": "if", "type": "if", "loc": [415, 418], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L407_C8", "vector": [4, 3, 0.2084, 0.002, 3, 0.82, 0.5, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('useFilters'):\n self.addChunk(\"if _v is not None: write(_filter(_v%s))\"%filterArgs)\n else:\n self.addChunk(\"if _v is not None: write(str(_v))\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L416_C16", "label": "addChunk()", "type": "expression", "loc": [416, 416], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L415_C12", "vector": [8, 4, 0.2081, 0.0005, 4, 0.96, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(\"if _v is not None: write(_filter(_v%s))\"%filterArgs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L418_C16", "label": "addChunk()", "type": "expression", "loc": [418, 418], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L415_C12", "vector": [8, 4, 0.2091, 0.0005, 4, 0.96, 1.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(\"if _v is not None: write(str(_v))\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L420_C12", "label": "if", "type": "if", "loc": [420, 423], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L407_C8", "vector": [4, 3, 0.2109, 0.002, 3, 0.82, 1.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('useFilters'):\n self.addChunk(\"write(_filter(%s%s))\"%(chunk, filterArgs))\n else:\n self.addChunk(\"write(str(%s))\"%chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L421_C16", "label": "addChunk()", "type": "expression", "loc": [421, 421], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L420_C12", "vector": [8, 4, 0.2106, 0.0005, 4, 0.92, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(\"write(_filter(%s%s))\"%(chunk, filterArgs))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L423_C16", "label": "addChunk()", "type": "expression", "loc": [423, 423], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L420_C12", "vector": [8, 4, 0.2116, 0.0005, 4, 0.92, 1.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(\"write(str(%s))\"%chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L425_C4", "label": "_appendToPrevStrConst", "type": "function", "loc": [425, 429], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2136, 0.0025, 1, 0.82, 0.2933, 424, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_appendToPrevStrConst", "arg_names": ["self", "strConst"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _appendToPrevStrConst(self, strConst):\n if self._pendingStrConstChunks:\n self._pendingStrConstChunks.append(strConst)\n else:\n self._pendingStrConstChunks = [strConst]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L426_C8", "label": "if", "type": "if", "loc": [426, 429], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L425_C4", "vector": [4, 2, 0.2139, 0.002, 2, 0.95, 0.0, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._pendingStrConstChunks:\n self._pendingStrConstChunks.append(strConst)\n else:\n self._pendingStrConstChunks = [strConst]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L427_C12", "label": "append()", "type": "expression", "loc": [427, 427], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L426_C8", "vector": [8, 3, 0.2136, 0.0005, 3, 0.43, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._pendingStrConstChunks.append(strConst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L429_C12", "label": "self._pendingStrConstChunks =", "type": "assigned_variable", "loc": [429, 429], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L426_C8", "vector": [14, 3, 0.2146, 0.0005, 3, 0.43, 1.0, 894, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._pendingStrConstChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._pendingStrConstChunks = [strConst]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "label": "commitStrConst", "type": "function", "loc": [431, 459], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2226, 0.0145, 1, 0.82, 0.3067, 212, 0, 1, 0, 0, 0, 0, 12], "semantic": {"name": "commitStrConst", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def commitStrConst(self):\n \"\"\"Add the code for outputting the pending strConst without chopping off\n any whitespace from it.\n \"\"\"\n if not self._pendingStrConstChunks:\n return\n\n strConst = ''.join(self._pendingStrConstChunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L432_C8", "label": "expression", "type": "expression", "loc": [432, 434], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "vector": [8, 2, 0.2166, 0.0015, 2, 0.78, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Add the code for outputting the pending strConst without chopping off\n any whitespace from it.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L435_C8", "label": "if", "type": "if", "loc": [435, 436], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "vector": [4, 2, 0.2179, 0.001, 2, 0.78, 0.0909, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self._pendingStrConstChunks:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L436_C12", "label": "return", "type": "return", "loc": [436, 436], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L435_C8", "vector": [13, 3, 0.2181, 0.0005, 3, 0.65, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L438_C8", "label": "strConst = join()", "type": "assigned_variable", "loc": [438, 438], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "vector": [14, 2, 0.2191, 0.0005, 2, 0.78, 0.1818, 616, 3, 1, 0, 0, 933, 10, 1], "semantic": {"name": "strConst", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " strConst = ''.join(self._pendingStrConstChunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L439_C8", "label": "self._pendingStrConstChunks =", "type": "assigned_variable", "loc": [439, 439], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "vector": [14, 2, 0.2196, 0.0005, 2, 0.78, 0.2727, 894, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._pendingStrConstChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._pendingStrConstChunks = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L440_C8", "label": "if", "type": "if", "loc": [440, 441], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "vector": [4, 2, 0.2204, 0.001, 2, 0.78, 0.3636, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not strConst:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L441_C12", "label": "return", "type": "return", "loc": [441, 441], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L440_C8", "vector": [13, 3, 0.2206, 0.0005, 3, 0.96, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L443_C8", "label": "reprstr = repr()", "type": "assigned_variable", "loc": [443, 443], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "vector": [14, 2, 0.2216, 0.0005, 2, 0.78, 0.4545, 528, 3, 1, 0, 0, 881, 10, 1], "semantic": {"name": "reprstr", "arg_names": [], "import_names": [], "rhs_call_name": "repr", "annotation": ""}, "snippet": " reprstr = repr(strConst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L444_C8", "label": "i =", "type": "assigned_variable", "loc": [444, 444], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "vector": [14, 2, 0.2221, 0.0005, 2, 0.78, 0.5455, 826, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " i = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L445_C8", "label": "out =", "type": "assigned_variable", "loc": [445, 445], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "vector": [14, 2, 0.2226, 0.0005, 2, 0.78, 0.6364, 434, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "out", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " out = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L446_C8", "label": "if", "type": "if", "loc": [446, 448], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "vector": [4, 2, 0.2236, 0.0015, 2, 0.78, 0.7273, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if reprstr.startswith('u'):\n i = 1\n out = ['u']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L447_C12", "label": "i =", "type": "assigned_variable", "loc": [447, 447], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L446_C8", "vector": [14, 3, 0.2236, 0.0005, 3, 0.56, 0.0, 826, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " i = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L448_C12", "label": "out =", "type": "assigned_variable", "loc": [448, 448], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L446_C8", "vector": [14, 3, 0.2241, 0.0005, 3, 0.56, 1.0, 434, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "out", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " out = ['u']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L449_C8", "label": "body = sub()", "type": "assigned_variable", "loc": [449, 449], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "vector": [14, 2, 0.2246, 0.0005, 2, 0.78, 0.8182, 477, 3, 2, 0, 0, 819, 10, 1], "semantic": {"name": "body", "arg_names": [], "import_names": [], "rhs_call_name": "sub", "annotation": ""}, "snippet": " body = escapedNewlineRE.sub('\\\\1\\n', reprstr[i+1:-1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L451_C8", "label": "if", "type": "if", "loc": [451, 458], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "vector": [4, 2, 0.2274, 0.004, 2, 0.78, 0.9091, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if reprstr[i]==\"'\":\n out.append(\"'''\")\n out.append(body)\n out.append(\"'''\")\n else:\n out.append('\"\"\"')\n out.append(body)\n out.append('\"\"\"')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L452_C12", "label": "append()", "type": "expression", "loc": [452, 452], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L451_C8", "vector": [8, 3, 0.2261, 0.0005, 3, 0.93, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " out.append(\"'''\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L453_C12", "label": "append()", "type": "expression", "loc": [453, 453], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L451_C8", "vector": [8, 3, 0.2266, 0.0005, 3, 0.93, 0.2, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " out.append(body)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L454_C12", "label": "append()", "type": "expression", "loc": [454, 454], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L451_C8", "vector": [8, 3, 0.2271, 0.0005, 3, 0.93, 0.4, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " out.append(\"'''\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L456_C12", "label": "append()", "type": "expression", "loc": [456, 456], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L451_C8", "vector": [8, 3, 0.2281, 0.0005, 3, 0.93, 0.6, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " out.append('\"\"\"')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L457_C12", "label": "append()", "type": "expression", "loc": [457, 457], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L451_C8", "vector": [8, 3, 0.2286, 0.0005, 3, 0.93, 0.8, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " out.append(body)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L458_C12", "label": "append()", "type": "expression", "loc": [458, 458], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L451_C8", "vector": [8, 3, 0.2291, 0.0005, 3, 0.93, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " out.append('\"\"\"')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L459_C8", "label": "addWriteChunk()", "type": "expression", "loc": [459, 459], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "vector": [8, 2, 0.2296, 0.0005, 2, 0.78, 1.0, 251, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addWriteChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addWriteChunk", "annotation": ""}, "snippet": " self.addWriteChunk(''.join(out))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L461_C4", "label": "handleWSBeforeDirective", "type": "function", "loc": [461, 468], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2324, 0.004, 1, 0.82, 0.32, 788, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "handleWSBeforeDirective", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def handleWSBeforeDirective(self):\n \"\"\"Truncate the pending strCont to the beginning of the current line.\n \"\"\"\n if self._pendingStrConstChunks:\n src = self._pendingStrConstChunks[-1]\n BOL = max(src.rfind('\\n')+1, src.rfind('\\r')+1, 0)\n if BOL < len(src):\n self._pendingStrConstChunks[-1] = src[:BOL]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L462_C8", "label": "expression", "type": "expression", "loc": [462, 463], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L461_C4", "vector": [8, 2, 0.2314, 0.001, 2, 0.25, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Truncate the pending strCont to the beginning of the current line.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L464_C8", "label": "if", "type": "if", "loc": [464, 468], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L461_C4", "vector": [4, 2, 0.2331, 0.0025, 2, 0.25, 1.0, 0, 7, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._pendingStrConstChunks:\n src = self._pendingStrConstChunks[-1]\n BOL = max(src.rfind('\\n')+1, src.rfind('\\r')+1, 0)\n if BOL < len(src):\n self._pendingStrConstChunks[-1] = src[:BOL]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L465_C12", "label": "src =", "type": "assigned_variable", "loc": [465, 465], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L464_C8", "vector": [14, 3, 0.2326, 0.0005, 3, 0.25, 0.0, 345, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "src", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " src = self._pendingStrConstChunks[-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L466_C12", "label": "BOL = max()", "type": "assigned_variable", "loc": [466, 466], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L464_C8", "vector": [14, 3, 0.2331, 0.0005, 3, 0.25, 0.5, 759, 3, 3, 0, 0, 442, 10, 3], "semantic": {"name": "BOL", "arg_names": [], "import_names": [], "rhs_call_name": "max", "annotation": ""}, "snippet": " BOL = max(src.rfind('\\n')+1, src.rfind('\\r')+1, 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L467_C12", "label": "if", "type": "if", "loc": [467, 468], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L464_C8", "vector": [4, 3, 0.2339, 0.001, 3, 0.25, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if BOL < len(src):\n self._pendingStrConstChunks[-1] = src[:BOL]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L468_C16", "label": "assign", "type": "assigned_variable", "loc": [468, 468], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L467_C12", "vector": [14, 4, 0.2341, 0.0005, 4, 0.71, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._pendingStrConstChunks[-1] = src[:BOL]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L472_C4", "label": "isErrorCatcherOn", "type": "function", "loc": [472, 473], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2364, 0.001, 1, 0.82, 0.3333, 848, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "isErrorCatcherOn", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def isErrorCatcherOn(self):\n return self._isErrorCatcherOn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L473_C8", "label": "return", "type": "return", "loc": [473, 473], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L472_C4", "vector": [13, 2, 0.2366, 0.0005, 2, 0.42, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._isErrorCatcherOn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L475_C4", "label": "turnErrorCatcherOn", "type": "function", "loc": [475, 476], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2379, 0.001, 1, 0.82, 0.3467, 556, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "turnErrorCatcherOn", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def turnErrorCatcherOn(self):\n self._isErrorCatcherOn = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L476_C8", "label": "self._isErrorCatcherOn =", "type": "assigned_variable", "loc": [476, 476], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L475_C4", "vector": [14, 2, 0.2381, 0.0005, 2, 0.23, 0.0, 200, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._isErrorCatcherOn", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._isErrorCatcherOn = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L478_C4", "label": "turnErrorCatcherOff", "type": "function", "loc": [478, 479], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2394, 0.001, 1, 0.82, 0.36, 880, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "turnErrorCatcherOff", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def turnErrorCatcherOff(self):\n self._isErrorCatcherOn = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L479_C8", "label": "self._isErrorCatcherOn =", "type": "assigned_variable", "loc": [479, 479], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L478_C4", "vector": [14, 2, 0.2396, 0.0005, 2, 0.22, 0.0, 200, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._isErrorCatcherOn", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._isErrorCatcherOn = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L482_C4", "label": "addStrConst", "type": "function", "loc": [482, 483], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2414, 0.001, 1, 0.82, 0.3733, 170, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addStrConst", "arg_names": ["self", "strConst"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addStrConst(self, strConst):\n self._appendToPrevStrConst(strConst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L483_C8", "label": "_appendToPrevStrConst()", "type": "expression", "loc": [483, 483], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L482_C4", "vector": [8, 2, 0.2416, 0.0005, 2, 0.85, 0.0, 424, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_appendToPrevStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "_appendToPrevStrConst", "annotation": ""}, "snippet": " self._appendToPrevStrConst(strConst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L485_C4", "label": "addRawText", "type": "function", "loc": [485, 486], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2429, 0.001, 1, 0.82, 0.3867, 65, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addRawText", "arg_names": ["self", "text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addRawText(self, text):\n self.addStrConst(text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L486_C8", "label": "addStrConst()", "type": "expression", "loc": [486, 486], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L485_C4", "vector": [8, 2, 0.2431, 0.0005, 2, 0.79, 0.0, 170, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "addStrConst", "annotation": ""}, "snippet": " self.addStrConst(text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L488_C4", "label": "addMethComment", "type": "function", "loc": [488, 490], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2446, 0.0015, 1, 0.82, 0.4, 713, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "addMethComment", "arg_names": ["self", "comm"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addMethComment(self, comm):\n offSet = self.setting('commentOffset')\n self.addChunk('#' + ' '*offSet + comm)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L489_C8", "label": "offSet = setting()", "type": "assigned_variable", "loc": [489, 489], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L488_C4", "vector": [14, 2, 0.2446, 0.0005, 2, 0.56, 0.0, 565, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "offSet", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " offSet = self.setting('commentOffset')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L490_C8", "label": "addChunk()", "type": "expression", "loc": [490, 490], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L488_C4", "vector": [8, 2, 0.2451, 0.0005, 2, 0.56, 1.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('#' + ' '*offSet + comm)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L492_C4", "label": "addPlaceholder", "type": "function", "loc": [492, 517], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2524, 0.013, 1, 0.82, 0.4133, 741, 0, 7, 0, 0, 0, 0, 14], "semantic": {"name": "addPlaceholder", "arg_names": ["self", "expr", "filterArgs", "rawPlaceholder", "cacheTokenParts", "lineCol", "silentMode"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addPlaceholder(self, expr, filterArgs, rawPlaceholder,\n cacheTokenParts, lineCol,\n silentMode=False):\n cacheInfo = self.genCacheInfo(cacheTokenParts)\n if cacheInfo:\n cacheInfo['ID'] = repr(rawPlaceholder)[1:-1]\n self.startCacheRegion(cacheInfo, lineCol, rawPlaceholder=rawPlaceholder)\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L495_C8", "label": "cacheInfo = genCacheInfo()", "type": "assigned_variable", "loc": [495, 495], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L492_C4", "vector": [14, 2, 0.2476, 0.0005, 2, 0.66, 0.0, 241, 3, 1, 0, 0, 580, 10, 1], "semantic": {"name": "cacheInfo", "arg_names": [], "import_names": [], "rhs_call_name": "genCacheInfo", "annotation": ""}, "snippet": " cacheInfo = self.genCacheInfo(cacheTokenParts)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L496_C8", "label": "if", "type": "if", "loc": [496, 498], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L492_C4", "vector": [4, 2, 0.2486, 0.0015, 2, 0.66, 0.2, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if cacheInfo:\n cacheInfo['ID'] = repr(rawPlaceholder)[1:-1]\n self.startCacheRegion(cacheInfo, lineCol, rawPlaceholder=rawPlaceholder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L497_C12", "label": "assign", "type": "assigned_variable", "loc": [497, 497], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L496_C8", "vector": [14, 3, 0.2486, 0.0005, 3, 0.22, 0.0, 0, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cacheInfo['ID'] = repr(rawPlaceholder)[1:-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L498_C12", "label": "startCacheRegion()", "type": "expression", "loc": [498, 498], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L496_C8", "vector": [8, 3, 0.2491, 0.0005, 3, 0.22, 1.0, 609, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "startCacheRegion", "arg_names": [], "import_names": [], "rhs_call_name": "startCacheRegion", "annotation": ""}, "snippet": " self.startCacheRegion(cacheInfo, lineCol, rawPlaceholder=rawPlaceholder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L500_C8", "label": "if", "type": "if", "loc": [500, 503], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L492_C4", "vector": [4, 2, 0.2509, 0.002, 2, 0.66, 0.4, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.isErrorCatcherOn():\n methodName = self._classCompiler.addErrorCatcherCall(\n expr, rawCode=rawPlaceholder, lineCol=lineCol)\n expr = 'self.' + methodName + '(localsDict=locals())' "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L501_C12", "label": "methodName = addErrorCatcherCall()", "type": "assigned_variable", "loc": [501, 502], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L500_C8", "vector": [14, 3, 0.2509, 0.001, 3, 0.29, 0.0, 681, 3, 3, 0, 0, 58, 10, 1], "semantic": {"name": "methodName", "arg_names": [], "import_names": [], "rhs_call_name": "addErrorCatcherCall", "annotation": ""}, "snippet": " methodName = self._classCompiler.addErrorCatcherCall(\n expr, rawCode=rawPlaceholder, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L503_C12", "label": "expr =", "type": "assigned_variable", "loc": [503, 503], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L500_C8", "vector": [14, 3, 0.2516, 0.0005, 3, 0.29, 1.0, 236, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expr = 'self.' + methodName + '(localsDict=locals())' "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L505_C8", "label": "if", "type": "if", "loc": [505, 512], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L492_C4", "vector": [4, 2, 0.2544, 0.004, 2, 0.66, 0.6, 0, 2, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if silentMode:\n self.addChunk('try:')\n self.indent() \n self.addFilteredChunk(expr, filterArgs, rawPlaceholder, lineCol=lineCol)\n self.dedent()\n self.addChunk('except NotFound: pass') \n else:\n self.addFilteredChunk(expr, filterArgs, rawPlaceholder, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L506_C12", "label": "addChunk()", "type": "expression", "loc": [506, 506], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L505_C8", "vector": [8, 3, 0.2531, 0.0005, 3, 0.69, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('try:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L507_C12", "label": "indent()", "type": "expression", "loc": [507, 507], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L505_C8", "vector": [8, 3, 0.2536, 0.0005, 3, 0.69, 0.2, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L508_C12", "label": "addFilteredChunk()", "type": "expression", "loc": [508, 508], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L505_C8", "vector": [8, 3, 0.2541, 0.0005, 3, 0.69, 0.4, 240, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "addFilteredChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addFilteredChunk", "annotation": ""}, "snippet": " self.addFilteredChunk(expr, filterArgs, rawPlaceholder, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L509_C12", "label": "dedent()", "type": "expression", "loc": [509, 509], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L505_C8", "vector": [8, 3, 0.2546, 0.0005, 3, 0.69, 0.6, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L510_C12", "label": "addChunk()", "type": "expression", "loc": [510, 510], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L505_C8", "vector": [8, 3, 0.2551, 0.0005, 3, 0.69, 0.8, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('except NotFound: pass') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L512_C12", "label": "addFilteredChunk()", "type": "expression", "loc": [512, 512], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L505_C8", "vector": [8, 3, 0.2561, 0.0005, 3, 0.69, 1.0, 240, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "addFilteredChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addFilteredChunk", "annotation": ""}, "snippet": " self.addFilteredChunk(expr, filterArgs, rawPlaceholder, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L514_C8", "label": "if", "type": "if", "loc": [514, 515], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L492_C4", "vector": [4, 2, 0.2574, 0.001, 2, 0.66, 0.8, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('outputRowColComments'):\n self.appendToPrevChunk(' # from line %s, col %s' % lineCol + '.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L515_C12", "label": "appendToPrevChunk()", "type": "expression", "loc": [515, 515], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L514_C8", "vector": [8, 3, 0.2576, 0.0005, 3, 0.42, 0.0, 171, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "appendToPrevChunk", "arg_names": [], "import_names": [], "rhs_call_name": "appendToPrevChunk", "annotation": ""}, "snippet": " self.appendToPrevChunk(' # from line %s, col %s' % lineCol + '.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L516_C8", "label": "if", "type": "if", "loc": [516, 517], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L492_C4", "vector": [4, 2, 0.2584, 0.001, 2, 0.66, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if cacheInfo:\n self.endCacheRegion()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L517_C12", "label": "endCacheRegion()", "type": "expression", "loc": [517, 517], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L516_C8", "vector": [8, 3, 0.2586, 0.0005, 3, 0.0, 0.0, 281, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "endCacheRegion", "arg_names": [], "import_names": [], "rhs_call_name": "endCacheRegion", "annotation": ""}, "snippet": " self.endCacheRegion()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L519_C4", "label": "addSilent", "type": "function", "loc": [519, 520], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2599, 0.001, 1, 0.82, 0.4267, 365, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addSilent", "arg_names": ["self", "expr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addSilent(self, expr):\n self.addChunk( expr )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L520_C8", "label": "addChunk()", "type": "expression", "loc": [520, 520], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L519_C4", "vector": [8, 2, 0.2601, 0.0005, 2, 0.54, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk( expr )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L522_C4", "label": "addEcho", "type": "function", "loc": [522, 523], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2614, 0.001, 1, 0.82, 0.44, 202, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addEcho", "arg_names": ["self", "expr", "rawExpr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addEcho(self, expr, rawExpr=None):\n self.addFilteredChunk(expr, rawExpr=rawExpr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L523_C8", "label": "addFilteredChunk()", "type": "expression", "loc": [523, 523], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L522_C4", "vector": [8, 2, 0.2616, 0.0005, 2, 0.02, 0.0, 240, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addFilteredChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addFilteredChunk", "annotation": ""}, "snippet": " self.addFilteredChunk(expr, rawExpr=rawExpr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L525_C4", "label": "addSet", "type": "function", "loc": [525, 552], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2694, 0.014, 1, 0.82, 0.4533, 402, 0, 4, 0, 0, 0, 0, 6], "semantic": {"name": "addSet", "arg_names": ["self", "expr", "exprComponents", "setStyle"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addSet(self, expr, exprComponents, setStyle):\n if setStyle is SET_GLOBAL:\n (LVALUE, OP, RVALUE) = (exprComponents.LVALUE,\n exprComponents.OP,\n exprComponents.RVALUE)\n # we need to split the LVALUE to deal with globalSetVars\n splitPos1 = LVALUE.find('.')\n splitPos2 = LVALUE.find('[')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L526_C8", "label": "if", "type": "if", "loc": [526, 547], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L525_C4", "vector": [4, 2, 0.2684, 0.011, 2, 0.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if setStyle is SET_GLOBAL:\n (LVALUE, OP, RVALUE) = (exprComponents.LVALUE,\n exprComponents.OP,\n exprComponents.RVALUE)\n # we need to split the LVALUE to deal with globalSetVars\n splitPos1 = LVALUE.find('.')\n splitPos2 = LVALUE.find('[')\n if splitPos1 > 0 and splitPos2==-1:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L527_C12", "label": "LVALUE, OP, RVALUE =", "type": "assigned_variable", "loc": [527, 529], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L526_C8", "vector": [14, 3, 0.2641, 0.0015, 3, 0.78, 0.0, 799, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "LVALUE, OP, RVALUE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " (LVALUE, OP, RVALUE) = (exprComponents.LVALUE,\n exprComponents.OP,\n exprComponents.RVALUE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L531_C12", "label": "splitPos1 = find()", "type": "assigned_variable", "loc": [531, 531], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L526_C8", "vector": [14, 3, 0.2656, 0.0005, 3, 0.78, 0.1667, 717, 3, 1, 0, 0, 340, 10, 1], "semantic": {"name": "splitPos1", "arg_names": [], "import_names": [], "rhs_call_name": "find", "annotation": ""}, "snippet": " splitPos1 = LVALUE.find('.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L532_C12", "label": "splitPos2 = find()", "type": "assigned_variable", "loc": [532, 532], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L526_C8", "vector": [14, 3, 0.2661, 0.0005, 3, 0.78, 0.3333, 239, 3, 1, 0, 0, 340, 10, 1], "semantic": {"name": "splitPos2", "arg_names": [], "import_names": [], "rhs_call_name": "find", "annotation": ""}, "snippet": " splitPos2 = LVALUE.find('[')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L533_C12", "label": "if", "type": "if", "loc": [533, 538], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L526_C8", "vector": [4, 3, 0.2679, 0.003, 3, 0.78, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if splitPos1 > 0 and splitPos2==-1:\n splitPos = splitPos1\n elif splitPos1 > 0 and splitPos1 < max(splitPos2, 0):\n splitPos = splitPos1\n else:\n splitPos = splitPos2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L534_C16", "label": "splitPos =", "type": "assigned_variable", "loc": [534, 534], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L533_C12", "vector": [14, 4, 0.2671, 0.0005, 4, 0.3, 0.0, 941, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "splitPos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " splitPos = splitPos1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L535_C12", "label": "if", "type": "if", "loc": [535, 538], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L533_C12", "vector": [4, 4, 0.2684, 0.002, 4, 0.3, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif splitPos1 > 0 and splitPos1 < max(splitPos2, 0):\n splitPos = splitPos1\n else:\n splitPos = splitPos2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L536_C16", "label": "splitPos =", "type": "assigned_variable", "loc": [536, 536], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L535_C12", "vector": [14, 5, 0.2681, 0.0005, 5, 0.46, 0.0, 941, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "splitPos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " splitPos = splitPos1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L538_C16", "label": "splitPos =", "type": "assigned_variable", "loc": [538, 538], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L535_C12", "vector": [14, 5, 0.2691, 0.0005, 5, 0.46, 1.0, 941, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "splitPos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " splitPos = splitPos2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L540_C12", "label": "if", "type": "if", "loc": [540, 545], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L526_C8", "vector": [4, 3, 0.2714, 0.003, 3, 0.78, 0.6667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if splitPos >0:\n primary = LVALUE[:splitPos]\n secondary = LVALUE[splitPos:]\n else:\n primary = LVALUE\n secondary = '' "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L541_C16", "label": "primary =", "type": "assigned_variable", "loc": [541, 541], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L540_C12", "vector": [14, 4, 0.2706, 0.0005, 4, 0.51, 0.0, 787, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "primary", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " primary = LVALUE[:splitPos]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L542_C16", "label": "secondary =", "type": "assigned_variable", "loc": [542, 542], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L540_C12", "vector": [14, 4, 0.2711, 0.0005, 4, 0.51, 0.3333, 292, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "secondary", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " secondary = LVALUE[splitPos:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L544_C16", "label": "primary =", "type": "assigned_variable", "loc": [544, 544], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L540_C12", "vector": [14, 4, 0.2721, 0.0005, 4, 0.51, 0.6667, 787, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "primary", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " primary = LVALUE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L545_C16", "label": "secondary =", "type": "assigned_variable", "loc": [545, 545], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L540_C12", "vector": [14, 4, 0.2726, 0.0005, 4, 0.51, 1.0, 292, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "secondary", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " secondary = '' "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L546_C12", "label": "LVALUE =", "type": "assigned_variable", "loc": [546, 546], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L526_C8", "vector": [14, 3, 0.2731, 0.0005, 3, 0.78, 0.8333, 183, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "LVALUE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " LVALUE = 'self._CHEETAH__globalSetVars[\"' + primary + '\"]' + secondary"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L547_C12", "label": "expr =", "type": "assigned_variable", "loc": [547, 547], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L526_C8", "vector": [14, 3, 0.2736, 0.0005, 3, 0.78, 1.0, 236, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expr = LVALUE + ' ' + OP + ' ' + RVALUE.strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L549_C8", "label": "if", "type": "if", "loc": [549, 552], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L525_C4", "vector": [4, 2, 0.2754, 0.002, 2, 0.1, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if setStyle is SET_MODULE:\n self._moduleCompiler.addModuleGlobal(expr)\n else:\n self.addChunk(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L550_C12", "label": "addModuleGlobal()", "type": "expression", "loc": [550, 550], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L549_C8", "vector": [8, 3, 0.2751, 0.0005, 3, 0.83, 0.0, 92, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addModuleGlobal", "arg_names": [], "import_names": [], "rhs_call_name": "addModuleGlobal", "annotation": ""}, "snippet": " self._moduleCompiler.addModuleGlobal(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L552_C12", "label": "addChunk()", "type": "expression", "loc": [552, 552], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L549_C8", "vector": [8, 3, 0.2761, 0.0005, 3, 0.83, 1.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L554_C4", "label": "addInclude", "type": "function", "loc": [554, 558], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2781, 0.0025, 1, 0.82, 0.4667, 816, 0, 4, 0, 0, 0, 0, 2], "semantic": {"name": "addInclude", "arg_names": ["self", "sourceExpr", "includeFrom", "isRaw"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addInclude(self, sourceExpr, includeFrom, isRaw):\n self.addChunk('self._handleCheetahInclude(' + sourceExpr +\n ', trans=trans, ' +\n 'includeFrom=\"' + includeFrom + '\", raw=' +\n repr(isRaw) + ')')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L555_C8", "label": "addChunk()", "type": "expression", "loc": [555, 558], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L554_C4", "vector": [8, 2, 0.2784, 0.002, 2, 0.81, 0.0, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('self._handleCheetahInclude(' + sourceExpr +\n ', trans=trans, ' +\n 'includeFrom=\"' + includeFrom + '\", raw=' +\n repr(isRaw) + ')')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L560_C4", "label": "addWhile", "type": "function", "loc": [560, 561], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2804, 0.001, 1, 0.82, 0.48, 384, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addWhile", "arg_names": ["self", "expr", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addWhile(self, expr, lineCol=None):\n self.addIndentingDirective(expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L561_C8", "label": "addIndentingDirective()", "type": "expression", "loc": [561, 561], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L560_C4", "vector": [8, 2, 0.2806, 0.0005, 2, 0.76, 0.0, 800, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addIndentingDirective", "arg_names": [], "import_names": [], "rhs_call_name": "addIndentingDirective", "annotation": ""}, "snippet": " self.addIndentingDirective(expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L563_C4", "label": "addFor", "type": "function", "loc": [563, 564], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2819, 0.001, 1, 0.82, 0.4933, 563, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addFor", "arg_names": ["self", "expr", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addFor(self, expr, lineCol=None):\n self.addIndentingDirective(expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L564_C8", "label": "addIndentingDirective()", "type": "expression", "loc": [564, 564], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L563_C4", "vector": [8, 2, 0.2821, 0.0005, 2, 0.56, 0.0, 800, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addIndentingDirective", "arg_names": [], "import_names": [], "rhs_call_name": "addIndentingDirective", "annotation": ""}, "snippet": " self.addIndentingDirective(expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L566_C4", "label": "addRepeat", "type": "function", "loc": [566, 569], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2839, 0.002, 1, 0.82, 0.5067, 692, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "addRepeat", "arg_names": ["self", "expr", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addRepeat(self, expr, lineCol=None):\n #the _repeatCount stuff here allows nesting of #repeat directives \n self._repeatCount = getattr(self, \"_repeatCount\", -1) + 1\n self.addFor('for __i%s in range(%s)' % (self._repeatCount, expr), lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L568_C8", "label": "self._repeatCount =", "type": "assigned_variable", "loc": [568, 568], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L566_C4", "vector": [14, 2, 0.2841, 0.0005, 2, 0.51, 0.0, 931, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "self._repeatCount", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._repeatCount = getattr(self, \"_repeatCount\", -1) + 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L569_C8", "label": "addFor()", "type": "expression", "loc": [569, 569], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L566_C4", "vector": [8, 2, 0.2846, 0.0005, 2, 0.51, 1.0, 563, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addFor", "arg_names": [], "import_names": [], "rhs_call_name": "addFor", "annotation": ""}, "snippet": " self.addFor('for __i%s in range(%s)' % (self._repeatCount, expr), lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L571_C4", "label": "addIndentingDirective", "type": "function", "loc": [571, 577], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2871, 0.0035, 1, 0.82, 0.52, 800, 0, 3, 0, 0, 0, 0, 3], "semantic": {"name": "addIndentingDirective", "arg_names": ["self", "expr", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addIndentingDirective(self, expr, lineCol=None):\n if expr and not expr[-1] == ':':\n expr = expr + ':'\n self.addChunk( expr )\n if lineCol:\n self.appendToPrevChunk(' # generated from line %s, col %s'%lineCol )\n self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L572_C8", "label": "if", "type": "if", "loc": [572, 573], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L571_C4", "vector": [4, 2, 0.2864, 0.001, 2, 0.17, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if expr and not expr[-1] == ':':\n expr = expr + ':'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L573_C12", "label": "expr =", "type": "assigned_variable", "loc": [573, 573], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L572_C8", "vector": [14, 3, 0.2866, 0.0005, 3, 0.73, 0.0, 236, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expr = expr + ':'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L574_C8", "label": "addChunk()", "type": "expression", "loc": [574, 574], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L571_C4", "vector": [8, 2, 0.2871, 0.0005, 2, 0.17, 0.3333, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk( expr )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L575_C8", "label": "if", "type": "if", "loc": [575, 576], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L571_C4", "vector": [4, 2, 0.2879, 0.001, 2, 0.17, 0.6667, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if lineCol:\n self.appendToPrevChunk(' # generated from line %s, col %s'%lineCol )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L576_C12", "label": "appendToPrevChunk()", "type": "expression", "loc": [576, 576], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L575_C8", "vector": [8, 3, 0.2881, 0.0005, 3, 0.53, 0.0, 171, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "appendToPrevChunk", "arg_names": [], "import_names": [], "rhs_call_name": "appendToPrevChunk", "annotation": ""}, "snippet": " self.appendToPrevChunk(' # generated from line %s, col %s'%lineCol )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L577_C8", "label": "indent()", "type": "expression", "loc": [577, 577], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L571_C4", "vector": [8, 2, 0.2886, 0.0005, 2, 0.17, 1.0, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L579_C4", "label": "addReIndentingDirective", "type": "function", "loc": [579, 589], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2921, 0.0055, 1, 0.82, 0.5333, 730, 0, 4, 0, 0, 0, 0, 5], "semantic": {"name": "addReIndentingDirective", "arg_names": ["self", "expr", "dedent", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addReIndentingDirective(self, expr, dedent=True, lineCol=None):\n self.commitStrConst()\n if dedent:\n self.dedent()\n if not expr[-1] == ':':\n expr = expr + ':'\n \n self.addChunk( expr )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L580_C8", "label": "commitStrConst()", "type": "expression", "loc": [580, 580], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L579_C4", "vector": [8, 2, 0.2901, 0.0005, 2, 0.38, 0.0, 212, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "commitStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "commitStrConst", "annotation": ""}, "snippet": " self.commitStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L581_C8", "label": "if", "type": "if", "loc": [581, 582], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L579_C4", "vector": [4, 2, 0.2909, 0.001, 2, 0.38, 0.2, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if dedent:\n self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L582_C12", "label": "dedent()", "type": "expression", "loc": [582, 582], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L581_C8", "vector": [8, 3, 0.2911, 0.0005, 3, 0.37, 0.0, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L583_C8", "label": "if", "type": "if", "loc": [583, 584], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L579_C4", "vector": [4, 2, 0.2919, 0.001, 2, 0.38, 0.4, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not expr[-1] == ':':\n expr = expr + ':'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L584_C12", "label": "expr =", "type": "assigned_variable", "loc": [584, 584], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L583_C8", "vector": [14, 3, 0.2921, 0.0005, 3, 0.8, 0.0, 236, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expr = expr + ':'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L586_C8", "label": "addChunk()", "type": "expression", "loc": [586, 586], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L579_C4", "vector": [8, 2, 0.2931, 0.0005, 2, 0.38, 0.6, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk( expr )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L587_C8", "label": "if", "type": "if", "loc": [587, 588], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L579_C4", "vector": [4, 2, 0.2939, 0.001, 2, 0.38, 0.8, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if lineCol:\n self.appendToPrevChunk(' # generated from line %s, col %s'%lineCol )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L588_C12", "label": "appendToPrevChunk()", "type": "expression", "loc": [588, 588], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L587_C8", "vector": [8, 3, 0.2941, 0.0005, 3, 0.33, 0.0, 171, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "appendToPrevChunk", "arg_names": [], "import_names": [], "rhs_call_name": "appendToPrevChunk", "annotation": ""}, "snippet": " self.appendToPrevChunk(' # generated from line %s, col %s'%lineCol )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L589_C8", "label": "indent()", "type": "expression", "loc": [589, 589], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L579_C4", "vector": [8, 2, 0.2946, 0.0005, 2, 0.38, 1.0, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L591_C4", "label": "addIf", "type": "function", "loc": [591, 594], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2964, 0.002, 1, 0.82, 0.5467, 359, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addIf", "arg_names": ["self", "expr", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addIf(self, expr, lineCol=None):\n \"\"\"For a full #if ... #end if directive\n \"\"\"\n self.addIndentingDirective(expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L592_C8", "label": "expression", "type": "expression", "loc": [592, 593], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L591_C4", "vector": [8, 2, 0.2964, 0.001, 2, 0.24, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"For a full #if ... #end if directive\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L594_C8", "label": "addIndentingDirective()", "type": "expression", "loc": [594, 594], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L591_C4", "vector": [8, 2, 0.2971, 0.0005, 2, 0.24, 1.0, 800, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addIndentingDirective", "arg_names": [], "import_names": [], "rhs_call_name": "addIndentingDirective", "annotation": ""}, "snippet": " self.addIndentingDirective(expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L596_C4", "label": "addOneLineIf", "type": "function", "loc": [596, 599], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.2989, 0.002, 1, 0.82, 0.56, 897, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addOneLineIf", "arg_names": ["self", "expr", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addOneLineIf(self, expr, lineCol=None):\n \"\"\"For a full #if ... #end if directive\n \"\"\"\n self.addIndentingDirective(expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L597_C8", "label": "expression", "type": "expression", "loc": [597, 598], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L596_C4", "vector": [8, 2, 0.2989, 0.001, 2, 0.38, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"For a full #if ... #end if directive\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L599_C8", "label": "addIndentingDirective()", "type": "expression", "loc": [599, 599], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L596_C4", "vector": [8, 2, 0.2996, 0.0005, 2, 0.38, 1.0, 800, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addIndentingDirective", "arg_names": [], "import_names": [], "rhs_call_name": "addIndentingDirective", "annotation": ""}, "snippet": " self.addIndentingDirective(expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L601_C4", "label": "addTernaryExpr", "type": "function", "loc": [601, 610], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3029, 0.005, 1, 0.82, 0.5733, 424, 0, 5, 0, 0, 0, 0, 6], "semantic": {"name": "addTernaryExpr", "arg_names": ["self", "conditionExpr", "trueExpr", "falseExpr", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addTernaryExpr(self, conditionExpr, trueExpr, falseExpr, lineCol=None):\n \"\"\"For a single-lie #if ... then .... else ... directive\n <condition> then <trueExpr> else <falseExpr>\n \"\"\"\n self.addIndentingDirective(conditionExpr, lineCol=lineCol) \n self.addFilteredChunk(trueExpr)\n self.dedent()\n self.addIndentingDirective('else') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L602_C8", "label": "expression", "type": "expression", "loc": [602, 604], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L601_C4", "vector": [8, 2, 0.3017, 0.0015, 2, 0.11, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"For a single-lie #if ... then .... else ... directive\n <condition> then <trueExpr> else <falseExpr>\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L605_C8", "label": "addIndentingDirective()", "type": "expression", "loc": [605, 605], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L601_C4", "vector": [8, 2, 0.3027, 0.0005, 2, 0.11, 0.1667, 800, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addIndentingDirective", "arg_names": [], "import_names": [], "rhs_call_name": "addIndentingDirective", "annotation": ""}, "snippet": " self.addIndentingDirective(conditionExpr, lineCol=lineCol) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L606_C8", "label": "addFilteredChunk()", "type": "expression", "loc": [606, 606], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L601_C4", "vector": [8, 2, 0.3032, 0.0005, 2, 0.11, 0.3333, 240, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addFilteredChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addFilteredChunk", "annotation": ""}, "snippet": " self.addFilteredChunk(trueExpr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L607_C8", "label": "dedent()", "type": "expression", "loc": [607, 607], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L601_C4", "vector": [8, 2, 0.3037, 0.0005, 2, 0.11, 0.5, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L608_C8", "label": "addIndentingDirective()", "type": "expression", "loc": [608, 608], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L601_C4", "vector": [8, 2, 0.3042, 0.0005, 2, 0.11, 0.6667, 800, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addIndentingDirective", "arg_names": [], "import_names": [], "rhs_call_name": "addIndentingDirective", "annotation": ""}, "snippet": " self.addIndentingDirective('else') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L609_C8", "label": "addFilteredChunk()", "type": "expression", "loc": [609, 609], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L601_C4", "vector": [8, 2, 0.3047, 0.0005, 2, 0.11, 0.8333, 240, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addFilteredChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addFilteredChunk", "annotation": ""}, "snippet": " self.addFilteredChunk(falseExpr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L610_C8", "label": "dedent()", "type": "expression", "loc": [610, 610], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L601_C4", "vector": [8, 2, 0.3052, 0.0005, 2, 0.11, 1.0, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L612_C4", "label": "addElse", "type": "function", "loc": [612, 614], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3067, 0.0015, 1, 0.82, 0.5867, 847, 0, 4, 0, 0, 0, 0, 2], "semantic": {"name": "addElse", "arg_names": ["self", "expr", "dedent", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addElse(self, expr, dedent=True, lineCol=None):\n expr = re.sub(r'else[ \\f\\t]+if', 'elif', expr)\n self.addReIndentingDirective(expr, dedent=dedent, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L613_C8", "label": "expr = sub()", "type": "assigned_variable", "loc": [613, 613], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L612_C4", "vector": [14, 2, 0.3067, 0.0005, 2, 0.9, 0.0, 236, 3, 3, 0, 0, 819, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "sub", "annotation": ""}, "snippet": " expr = re.sub(r'else[ \\f\\t]+if', 'elif', expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L614_C8", "label": "addReIndentingDirective()", "type": "expression", "loc": [614, 614], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L612_C4", "vector": [8, 2, 0.3072, 0.0005, 2, 0.9, 1.0, 730, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addReIndentingDirective", "arg_names": [], "import_names": [], "rhs_call_name": "addReIndentingDirective", "annotation": ""}, "snippet": " self.addReIndentingDirective(expr, dedent=dedent, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L616_C4", "label": "addElif", "type": "function", "loc": [616, 617], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3084, 0.001, 1, 0.82, 0.6, 851, 0, 4, 0, 0, 0, 0, 1], "semantic": {"name": "addElif", "arg_names": ["self", "expr", "dedent", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addElif(self, expr, dedent=True, lineCol=None):\n self.addElse(expr, dedent=dedent, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L617_C8", "label": "addElse()", "type": "expression", "loc": [617, 617], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L616_C4", "vector": [8, 2, 0.3087, 0.0005, 2, 0.46, 0.0, 847, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addElse", "arg_names": [], "import_names": [], "rhs_call_name": "addElse", "annotation": ""}, "snippet": " self.addElse(expr, dedent=dedent, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L619_C4", "label": "addUnless", "type": "function", "loc": [619, 620], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3099, 0.001, 1, 0.82, 0.6133, 558, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addUnless", "arg_names": ["self", "expr", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addUnless(self, expr, lineCol=None):\n self.addIf('if not (' + expr + ')')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L620_C8", "label": "addIf()", "type": "expression", "loc": [620, 620], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L619_C4", "vector": [8, 2, 0.3102, 0.0005, 2, 0.13, 0.0, 359, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addIf", "arg_names": [], "import_names": [], "rhs_call_name": "addIf", "annotation": ""}, "snippet": " self.addIf('if not (' + expr + ')')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L622_C4", "label": "addClosure", "type": "function", "loc": [622, 631], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3134, 0.005, 1, 0.82, 0.6267, 683, 0, 4, 0, 0, 0, 0, 4], "semantic": {"name": "addClosure", "arg_names": ["self", "functionName", "argsList", "parserComment"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addClosure(self, functionName, argsList, parserComment):\n argStringChunks = []\n for arg in argsList:\n chunk = arg[0]\n if not arg[1] == None:\n chunk += '=' + arg[1]\n argStringChunks.append(chunk)\n signature = \"def \" + functionName + \"(\" + ','.join(argStringChunks) + \"):\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L623_C8", "label": "argStringChunks =", "type": "assigned_variable", "loc": [623, 623], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L622_C4", "vector": [14, 2, 0.3117, 0.0005, 2, 0.9, 0.0, 902, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "argStringChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " argStringChunks = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L624_C8", "label": "for arg", "type": "for", "loc": [624, 628], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L622_C4", "vector": [6, 2, 0.3132, 0.0025, 2, 0.9, 0.25, 447, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "arg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for arg in argsList:\n chunk = arg[0]\n if not arg[1] == None:\n chunk += '=' + arg[1]\n argStringChunks.append(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L625_C12", "label": "chunk =", "type": "assigned_variable", "loc": [625, 625], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L624_C8", "vector": [14, 3, 0.3127, 0.0005, 3, 0.08, 0.0, 637, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "chunk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " chunk = arg[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L626_C12", "label": "if", "type": "if", "loc": [626, 627], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L624_C8", "vector": [4, 3, 0.3134, 0.001, 3, 0.08, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not arg[1] == None:\n chunk += '=' + arg[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L628_C12", "label": "append()", "type": "expression", "loc": [628, 628], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L624_C8", "vector": [8, 3, 0.3142, 0.0005, 3, 0.08, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " argStringChunks.append(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L629_C8", "label": "signature =", "type": "assigned_variable", "loc": [629, 629], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L622_C4", "vector": [14, 2, 0.3147, 0.0005, 2, 0.9, 0.5, 932, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "signature", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " signature = \"def \" + functionName + \"(\" + ','.join(argStringChunks) + \"):\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L630_C8", "label": "addIndentingDirective()", "type": "expression", "loc": [630, 630], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L622_C4", "vector": [8, 2, 0.3152, 0.0005, 2, 0.9, 0.75, 800, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addIndentingDirective", "arg_names": [], "import_names": [], "rhs_call_name": "addIndentingDirective", "annotation": ""}, "snippet": " self.addIndentingDirective(signature)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L631_C8", "label": "addChunk()", "type": "expression", "loc": [631, 631], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L622_C4", "vector": [8, 2, 0.3157, 0.0005, 2, 0.9, 1.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('#'+parserComment)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L633_C4", "label": "addTry", "type": "function", "loc": [633, 634], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3169, 0.001, 1, 0.82, 0.64, 878, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addTry", "arg_names": ["self", "expr", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addTry(self, expr, lineCol=None):\n self.addIndentingDirective(expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L634_C8", "label": "addIndentingDirective()", "type": "expression", "loc": [634, 634], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L633_C4", "vector": [8, 2, 0.3172, 0.0005, 2, 0.28, 0.0, 800, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addIndentingDirective", "arg_names": [], "import_names": [], "rhs_call_name": "addIndentingDirective", "annotation": ""}, "snippet": " self.addIndentingDirective(expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L636_C4", "label": "addExcept", "type": "function", "loc": [636, 637], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3184, 0.001, 1, 0.82, 0.6533, 383, 0, 4, 0, 0, 0, 0, 1], "semantic": {"name": "addExcept", "arg_names": ["self", "expr", "dedent", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addExcept(self, expr, dedent=True, lineCol=None):\n self.addReIndentingDirective(expr, dedent=dedent, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L637_C8", "label": "addReIndentingDirective()", "type": "expression", "loc": [637, 637], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L636_C4", "vector": [8, 2, 0.3187, 0.0005, 2, 0.54, 0.0, 730, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addReIndentingDirective", "arg_names": [], "import_names": [], "rhs_call_name": "addReIndentingDirective", "annotation": ""}, "snippet": " self.addReIndentingDirective(expr, dedent=dedent, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L639_C4", "label": "addFinally", "type": "function", "loc": [639, 640], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3199, 0.001, 1, 0.82, 0.6667, 462, 0, 4, 0, 0, 0, 0, 1], "semantic": {"name": "addFinally", "arg_names": ["self", "expr", "dedent", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addFinally(self, expr, dedent=True, lineCol=None):\n self.addReIndentingDirective(expr, dedent=dedent, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L640_C8", "label": "addReIndentingDirective()", "type": "expression", "loc": [640, 640], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L639_C4", "vector": [8, 2, 0.3202, 0.0005, 2, 0.02, 0.0, 730, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addReIndentingDirective", "arg_names": [], "import_names": [], "rhs_call_name": "addReIndentingDirective", "annotation": ""}, "snippet": " self.addReIndentingDirective(expr, dedent=dedent, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L642_C4", "label": "addReturn", "type": "function", "loc": [642, 645], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3219, 0.002, 1, 0.82, 0.68, 486, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addReturn", "arg_names": ["self", "expr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addReturn(self, expr):\n assert not self._isGenerator\n self.addChunk(expr)\n self._hasReturnStatement = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L644_C8", "label": "addChunk()", "type": "expression", "loc": [644, 644], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L642_C4", "vector": [8, 2, 0.3222, 0.0005, 2, 0.22, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L645_C8", "label": "self._hasReturnStatement =", "type": "assigned_variable", "loc": [645, 645], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L642_C4", "vector": [14, 2, 0.3227, 0.0005, 2, 0.22, 1.0, 57, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._hasReturnStatement", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._hasReturnStatement = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L647_C4", "label": "addYield", "type": "function", "loc": [647, 663], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3277, 0.0085, 1, 0.82, 0.6933, 779, 0, 2, 0, 0, 0, 0, 13], "semantic": {"name": "addYield", "arg_names": ["self", "expr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addYield(self, expr):\n assert not self._hasReturnStatement\n self._isGenerator = True\n if expr.replace('yield', '').strip():\n self.addChunk(expr)\n else:\n self.addChunk('if _dummyTrans:')\n self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L649_C8", "label": "self._isGenerator =", "type": "assigned_variable", "loc": [649, 649], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L647_C4", "vector": [14, 2, 0.3247, 0.0005, 2, 0.94, 0.0, 137, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._isGenerator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._isGenerator = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "label": "if", "type": "if", "loc": [650, 663], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L647_C4", "vector": [4, 2, 0.3284, 0.007, 2, 0.94, 1.0, 0, 3, 0, 0, 0, 0, 0, 13], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if expr.replace('yield', '').strip():\n self.addChunk(expr)\n else:\n self.addChunk('if _dummyTrans:')\n self.indent()\n self.addChunk('yield trans.response().getvalue()')\n self.addChunk('trans = DummyTransaction()')\n self.addChunk('write = trans.response().write')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L651_C12", "label": "addChunk()", "type": "expression", "loc": [651, 651], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "vector": [8, 3, 0.3257, 0.0005, 3, 0.14, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L653_C12", "label": "addChunk()", "type": "expression", "loc": [653, 653], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "vector": [8, 3, 0.3267, 0.0005, 3, 0.14, 0.1, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('if _dummyTrans:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L654_C12", "label": "indent()", "type": "expression", "loc": [654, 654], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "vector": [8, 3, 0.3272, 0.0005, 3, 0.14, 0.2, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L655_C12", "label": "addChunk()", "type": "expression", "loc": [655, 655], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "vector": [8, 3, 0.3277, 0.0005, 3, 0.14, 0.3, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('yield trans.response().getvalue()')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L656_C12", "label": "addChunk()", "type": "expression", "loc": [656, 656], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "vector": [8, 3, 0.3282, 0.0005, 3, 0.14, 0.4, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('trans = DummyTransaction()')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L657_C12", "label": "addChunk()", "type": "expression", "loc": [657, 657], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "vector": [8, 3, 0.3287, 0.0005, 3, 0.14, 0.5, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('write = trans.response().write')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L658_C12", "label": "dedent()", "type": "expression", "loc": [658, 658], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "vector": [8, 3, 0.3292, 0.0005, 3, 0.14, 0.6, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L659_C12", "label": "addChunk()", "type": "expression", "loc": [659, 659], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "vector": [8, 3, 0.3297, 0.0005, 3, 0.14, 0.7, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('else:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L660_C12", "label": "indent()", "type": "expression", "loc": [660, 660], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "vector": [8, 3, 0.3302, 0.0005, 3, 0.14, 0.8, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L661_C12", "label": "addChunk()", "type": "expression", "loc": [661, 662], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "vector": [8, 3, 0.3309, 0.001, 3, 0.14, 0.9, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(\n 'raise TypeError(\"This method cannot be called with a trans arg\")')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L663_C12", "label": "dedent()", "type": "expression", "loc": [663, 663], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "vector": [8, 3, 0.3317, 0.0005, 3, 0.14, 1.0, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L666_C4", "label": "addPass", "type": "function", "loc": [666, 667], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3334, 0.001, 1, 0.82, 0.7067, 34, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addPass", "arg_names": ["self", "expr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addPass(self, expr):\n self.addChunk(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L667_C8", "label": "addChunk()", "type": "expression", "loc": [667, 667], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L666_C4", "vector": [8, 2, 0.3337, 0.0005, 2, 0.68, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L669_C4", "label": "addDel", "type": "function", "loc": [669, 670], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3349, 0.001, 1, 0.82, 0.72, 889, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addDel", "arg_names": ["self", "expr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addDel(self, expr):\n self.addChunk(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L670_C8", "label": "addChunk()", "type": "expression", "loc": [670, 670], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L669_C4", "vector": [8, 2, 0.3352, 0.0005, 2, 0.1, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L672_C4", "label": "addAssert", "type": "function", "loc": [672, 673], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3364, 0.001, 1, 0.82, 0.7333, 71, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addAssert", "arg_names": ["self", "expr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addAssert(self, expr):\n self.addChunk(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L673_C8", "label": "addChunk()", "type": "expression", "loc": [673, 673], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L672_C4", "vector": [8, 2, 0.3367, 0.0005, 2, 0.08, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L675_C4", "label": "addRaise", "type": "function", "loc": [675, 676], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3379, 0.001, 1, 0.82, 0.7467, 218, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addRaise", "arg_names": ["self", "expr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addRaise(self, expr):\n self.addChunk(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L676_C8", "label": "addChunk()", "type": "expression", "loc": [676, 676], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L675_C4", "vector": [8, 2, 0.3382, 0.0005, 2, 0.04, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L678_C4", "label": "addBreak", "type": "function", "loc": [678, 679], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3394, 0.001, 1, 0.82, 0.76, 676, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addBreak", "arg_names": ["self", "expr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addBreak(self, expr):\n self.addChunk(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L679_C8", "label": "addChunk()", "type": "expression", "loc": [679, 679], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L678_C4", "vector": [8, 2, 0.3397, 0.0005, 2, 0.45, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L681_C4", "label": "addContinue", "type": "function", "loc": [681, 682], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3409, 0.001, 1, 0.82, 0.7733, 233, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addContinue", "arg_names": ["self", "expr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addContinue(self, expr):\n self.addChunk(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L682_C8", "label": "addChunk()", "type": "expression", "loc": [682, 682], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L681_C4", "vector": [8, 2, 0.3412, 0.0005, 2, 0.71, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L684_C4", "label": "addPSP", "type": "function", "loc": [684, 706], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3477, 0.0115, 1, 0.82, 0.7867, 946, 0, 2, 0, 0, 0, 0, 7], "semantic": {"name": "addPSP", "arg_names": ["self", "PSP"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addPSP(self, PSP):\n self.commitStrConst()\n autoIndent = False\n if PSP[0] == '=':\n PSP = PSP[1:]\n if PSP:\n self.addWriteChunk('_filter(' + PSP + ')')\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L685_C8", "label": "commitStrConst()", "type": "expression", "loc": [685, 685], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L684_C4", "vector": [8, 2, 0.3427, 0.0005, 2, 0.51, 0.0, 212, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "commitStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "commitStrConst", "annotation": ""}, "snippet": " self.commitStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L686_C8", "label": "autoIndent =", "type": "assigned_variable", "loc": [686, 686], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L684_C4", "vector": [14, 2, 0.3432, 0.0005, 2, 0.51, 0.25, 465, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "autoIndent", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " autoIndent = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L687_C8", "label": "if", "type": "if", "loc": [687, 700], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L684_C4", "vector": [4, 2, 0.3469, 0.007, 2, 0.51, 0.5, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if PSP[0] == '=':\n PSP = PSP[1:]\n if PSP:\n self.addWriteChunk('_filter(' + PSP + ')')\n return\n \n elif PSP.lower() == 'end':\n self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L688_C12", "label": "PSP =", "type": "assigned_variable", "loc": [688, 688], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L687_C8", "vector": [14, 3, 0.3442, 0.0005, 3, 0.92, 0.0, 107, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "PSP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " PSP = PSP[1:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L689_C12", "label": "if", "type": "if", "loc": [689, 690], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L687_C8", "vector": [4, 3, 0.3449, 0.001, 3, 0.92, 0.3333, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if PSP:\n self.addWriteChunk('_filter(' + PSP + ')')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L690_C16", "label": "addWriteChunk()", "type": "expression", "loc": [690, 690], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L689_C12", "vector": [8, 4, 0.3452, 0.0005, 4, 0.93, 0.0, 251, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWriteChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addWriteChunk", "annotation": ""}, "snippet": " self.addWriteChunk('_filter(' + PSP + ')')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L691_C12", "label": "return", "type": "return", "loc": [691, 691], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L687_C8", "vector": [13, 3, 0.3457, 0.0005, 3, 0.92, 0.6667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L693_C8", "label": "if", "type": "if", "loc": [693, 700], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L687_C8", "vector": [4, 3, 0.3484, 0.004, 3, 0.92, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif PSP.lower() == 'end':\n self.dedent()\n return\n elif PSP[-1] == '$':\n autoIndent = True\n PSP = PSP[:-1]\n elif PSP[-1] == ':':\n autoIndent = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L694_C12", "label": "dedent()", "type": "expression", "loc": [694, 694], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L693_C8", "vector": [8, 4, 0.3472, 0.0005, 4, 0.19, 0.0, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L695_C12", "label": "return", "type": "return", "loc": [695, 695], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L693_C8", "vector": [13, 4, 0.3477, 0.0005, 4, 0.19, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L696_C8", "label": "if", "type": "if", "loc": [696, 700], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L693_C8", "vector": [4, 4, 0.3492, 0.0025, 4, 0.19, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif PSP[-1] == '$':\n autoIndent = True\n PSP = PSP[:-1]\n elif PSP[-1] == ':':\n autoIndent = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L697_C12", "label": "autoIndent =", "type": "assigned_variable", "loc": [697, 697], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L696_C8", "vector": [14, 5, 0.3487, 0.0005, 5, 0.52, 0.0, 465, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "autoIndent", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " autoIndent = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L698_C12", "label": "PSP =", "type": "assigned_variable", "loc": [698, 698], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L696_C8", "vector": [14, 5, 0.3492, 0.0005, 5, 0.52, 0.5, 107, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "PSP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " PSP = PSP[:-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L699_C8", "label": "if", "type": "if", "loc": [699, 700], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L696_C8", "vector": [4, 5, 0.3499, 0.001, 5, 0.52, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif PSP[-1] == ':':\n autoIndent = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L700_C12", "label": "autoIndent =", "type": "assigned_variable", "loc": [700, 700], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L699_C8", "vector": [14, 6, 0.3502, 0.0005, 6, 0.23, 0.0, 465, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "autoIndent", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " autoIndent = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L702_C8", "label": "for line", "type": "for", "loc": [702, 703], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L684_C4", "vector": [6, 2, 0.3514, 0.001, 2, 0.51, 0.75, 373, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in PSP.splitlines():\n self.addChunk(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L703_C12", "label": "addChunk()", "type": "expression", "loc": [703, 703], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L702_C8", "vector": [8, 3, 0.3517, 0.0005, 3, 0.56, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L705_C8", "label": "if", "type": "if", "loc": [705, 706], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L684_C4", "vector": [4, 2, 0.3529, 0.001, 2, 0.51, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if autoIndent:\n self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L706_C12", "label": "indent()", "type": "expression", "loc": [706, 706], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L705_C8", "vector": [8, 3, 0.3532, 0.0005, 3, 0.0, 0.0, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L708_C4", "label": "nextCacheID", "type": "function", "loc": [708, 710], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3547, 0.0015, 1, 0.82, 0.8, 980, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "nextCacheID", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def nextCacheID(self):\n return ('_'+str(random.randrange(100, 999)) \n + str(random.randrange(10000, 99999)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L709_C8", "label": "return", "type": "return", "loc": [709, 710], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L708_C4", "vector": [13, 2, 0.3549, 0.001, 2, 0.93, 0.0, 0, 4, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ('_'+str(random.randrange(100, 999)) \n + str(random.randrange(10000, 99999)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "label": "startCacheRegion", "type": "function", "loc": [712, 782], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3737, 0.0355, 1, 0.82, 0.8133, 609, 0, 4, 0, 0, 0, 0, 64], "semantic": {"name": "startCacheRegion", "arg_names": ["self", "cacheInfo", "lineCol", "rawPlaceholder"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def startCacheRegion(self, cacheInfo, lineCol, rawPlaceholder=None):\n\n # @@TR: we should add some runtime logging to this\n \n ID = self.nextCacheID()\n interval = cacheInfo.get('interval', None)\n test = cacheInfo.get('test', None)\n customID = cacheInfo.get('id', None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L716_C8", "label": "ID = nextCacheID()", "type": "assigned_variable", "loc": [716, 716], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [14, 2, 0.3582, 0.0005, 2, 0.19, 0.0, 789, 3, 0, 0, 0, 980, 10, 1], "semantic": {"name": "ID", "arg_names": [], "import_names": [], "rhs_call_name": "nextCacheID", "annotation": ""}, "snippet": " ID = self.nextCacheID()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L717_C8", "label": "interval = get()", "type": "assigned_variable", "loc": [717, 717], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [14, 2, 0.3587, 0.0005, 2, 0.19, 0.0238, 628, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "interval", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " interval = cacheInfo.get('interval', None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L718_C8", "label": "test = get()", "type": "assigned_variable", "loc": [718, 718], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [14, 2, 0.3592, 0.0005, 2, 0.19, 0.0476, 224, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "test", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " test = cacheInfo.get('test', None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L719_C8", "label": "customID = get()", "type": "assigned_variable", "loc": [719, 719], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [14, 2, 0.3597, 0.0005, 2, 0.19, 0.0714, 658, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "customID", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " customID = cacheInfo.get('id', None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L720_C8", "label": "if", "type": "if", "loc": [720, 721], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [4, 2, 0.3604, 0.001, 2, 0.19, 0.0952, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if customID:\n ID = customID"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L721_C12", "label": "ID =", "type": "assigned_variable", "loc": [721, 721], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L720_C8", "vector": [14, 3, 0.3607, 0.0005, 3, 0.43, 0.0, 789, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "ID", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ID = customID"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L722_C8", "label": "varyBy = get()", "type": "assigned_variable", "loc": [722, 722], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [14, 2, 0.3612, 0.0005, 2, 0.19, 0.119, 144, 3, 2, 0, 0, 607, 10, 2], "semantic": {"name": "varyBy", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " varyBy = cacheInfo.get('varyBy', repr(ID))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L723_C8", "label": "append()", "type": "expression", "loc": [723, 723], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3617, 0.0005, 2, 0.19, 0.1429, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._cacheRegionsStack.append(ID) # attrib of current methodCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L726_C8", "label": "addChunk()", "type": "expression", "loc": [726, 726], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3632, 0.0005, 2, 0.19, 0.1667, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L728_C8", "label": "addChunk()", "type": "expression", "loc": [728, 729], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3644, 0.001, 2, 0.19, 0.1905, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('## START CACHE REGION: ID='+ID+\n '. line %s, col %s'%lineCol + ' in the source.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L731_C8", "label": "addChunk()", "type": "expression", "loc": [731, 731], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3657, 0.0005, 2, 0.19, 0.2143, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_RECACHE_%(ID)s = False'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L732_C8", "label": "addChunk()", "type": "expression", "loc": [732, 735], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3669, 0.002, 2, 0.19, 0.2381, 316, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_cacheRegion_%(ID)s = self.getCacheRegion(regionID='%locals()\n + repr(ID)\n + ', cacheInfo=%r'%cacheInfo\n + ')')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L736_C8", "label": "addChunk()", "type": "expression", "loc": [736, 736], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3682, 0.0005, 2, 0.19, 0.2619, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('if _cacheRegion_%(ID)s.isNew():'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L737_C8", "label": "indent()", "type": "expression", "loc": [737, 737], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3687, 0.0005, 2, 0.19, 0.2857, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L738_C8", "label": "addChunk()", "type": "expression", "loc": [738, 738], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3692, 0.0005, 2, 0.19, 0.3095, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_RECACHE_%(ID)s = True'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L739_C8", "label": "dedent()", "type": "expression", "loc": [739, 739], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3697, 0.0005, 2, 0.19, 0.3333, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L741_C8", "label": "addChunk()", "type": "expression", "loc": [741, 742], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3709, 0.001, 2, 0.19, 0.3571, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_cacheItem_%(ID)s = _cacheRegion_%(ID)s.getCacheItem('%locals()\n +varyBy+')')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L744_C8", "label": "addChunk()", "type": "expression", "loc": [744, 744], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3722, 0.0005, 2, 0.19, 0.381, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('if _cacheItem_%(ID)s.hasExpired():'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L745_C8", "label": "indent()", "type": "expression", "loc": [745, 745], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3727, 0.0005, 2, 0.19, 0.4048, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L746_C8", "label": "addChunk()", "type": "expression", "loc": [746, 746], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3732, 0.0005, 2, 0.19, 0.4286, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_RECACHE_%(ID)s = True'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L747_C8", "label": "dedent()", "type": "expression", "loc": [747, 747], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3737, 0.0005, 2, 0.19, 0.4524, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L749_C8", "label": "if", "type": "if", "loc": [749, 753], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [4, 2, 0.3757, 0.0025, 2, 0.19, 0.4762, 0, 2, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if test:\n self.addChunk('if ' + test + ':')\n self.indent()\n self.addChunk('_RECACHE_%(ID)s = True'%locals())\n self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L750_C12", "label": "addChunk()", "type": "expression", "loc": [750, 750], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L749_C8", "vector": [8, 3, 0.3752, 0.0005, 3, 0.73, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('if ' + test + ':')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L751_C12", "label": "indent()", "type": "expression", "loc": [751, 751], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L749_C8", "vector": [8, 3, 0.3757, 0.0005, 3, 0.73, 0.3333, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L752_C12", "label": "addChunk()", "type": "expression", "loc": [752, 752], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L749_C8", "vector": [8, 3, 0.3762, 0.0005, 3, 0.73, 0.6667, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_RECACHE_%(ID)s = True'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L753_C12", "label": "dedent()", "type": "expression", "loc": [753, 753], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L749_C8", "vector": [8, 3, 0.3767, 0.0005, 3, 0.73, 1.0, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L755_C8", "label": "addChunk()", "type": "expression", "loc": [755, 755], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3777, 0.0005, 2, 0.19, 0.5, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('if (not _RECACHE_%(ID)s) and _cacheItem_%(ID)s.getRefreshTime():'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L756_C8", "label": "indent()", "type": "expression", "loc": [756, 756], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3782, 0.0005, 2, 0.19, 0.5238, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L758_C8", "label": "addChunk()", "type": "expression", "loc": [758, 758], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3792, 0.0005, 2, 0.19, 0.5476, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('try:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L759_C8", "label": "indent()", "type": "expression", "loc": [759, 759], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3797, 0.0005, 2, 0.19, 0.5714, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L760_C8", "label": "addChunk()", "type": "expression", "loc": [760, 760], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3802, 0.0005, 2, 0.19, 0.5952, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_output = _cacheItem_%(ID)s.renderOutput()'%locals()) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L761_C8", "label": "dedent()", "type": "expression", "loc": [761, 761], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3807, 0.0005, 2, 0.19, 0.619, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L762_C8", "label": "addChunk()", "type": "expression", "loc": [762, 762], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3812, 0.0005, 2, 0.19, 0.6429, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('except KeyError:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L763_C8", "label": "indent()", "type": "expression", "loc": [763, 763], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3817, 0.0005, 2, 0.19, 0.6667, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L764_C8", "label": "addChunk()", "type": "expression", "loc": [764, 764], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3822, 0.0005, 2, 0.19, 0.6905, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_RECACHE_%(ID)s = True'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L766_C8", "label": "dedent()", "type": "expression", "loc": [766, 766], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3832, 0.0005, 2, 0.19, 0.7143, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L767_C8", "label": "addChunk()", "type": "expression", "loc": [767, 767], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3837, 0.0005, 2, 0.19, 0.7381, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('else:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L768_C8", "label": "indent()", "type": "expression", "loc": [768, 768], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3842, 0.0005, 2, 0.19, 0.7619, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L769_C8", "label": "addWriteChunk()", "type": "expression", "loc": [769, 769], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3847, 0.0005, 2, 0.19, 0.7857, 251, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWriteChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addWriteChunk", "annotation": ""}, "snippet": " self.addWriteChunk('_output')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L770_C8", "label": "addChunk()", "type": "expression", "loc": [770, 770], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3852, 0.0005, 2, 0.19, 0.8095, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('del _output')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L771_C8", "label": "dedent()", "type": "expression", "loc": [771, 771], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3857, 0.0005, 2, 0.19, 0.8333, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L773_C8", "label": "dedent()", "type": "expression", "loc": [773, 773], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3867, 0.0005, 2, 0.19, 0.8571, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L775_C8", "label": "addChunk()", "type": "expression", "loc": [775, 775], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3877, 0.0005, 2, 0.19, 0.881, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('if _RECACHE_%(ID)s or not _cacheItem_%(ID)s.getRefreshTime():'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L776_C8", "label": "indent()", "type": "expression", "loc": [776, 776], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3882, 0.0005, 2, 0.19, 0.9048, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L777_C8", "label": "addChunk()", "type": "expression", "loc": [777, 777], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3887, 0.0005, 2, 0.19, 0.9286, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_orig_trans%(ID)s = trans'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L778_C8", "label": "addChunk()", "type": "expression", "loc": [778, 778], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3892, 0.0005, 2, 0.19, 0.9524, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('trans = _cacheCollector_%(ID)s = DummyTransaction()'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L779_C8", "label": "addChunk()", "type": "expression", "loc": [779, 779], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [8, 2, 0.3897, 0.0005, 2, 0.19, 0.9762, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('write = _cacheCollector_%(ID)s.response().write'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L780_C8", "label": "if", "type": "if", "loc": [780, 782], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "vector": [4, 2, 0.3907, 0.0015, 2, 0.19, 1.0, 0, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if interval:\n self.addChunk((\"_cacheItem_%(ID)s.setExpiryTime(currentTime() +\"%locals())\n + str(interval) + \")\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L781_C12", "label": "addChunk()", "type": "expression", "loc": [781, 782], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L780_C8", "vector": [8, 3, 0.3909, 0.001, 3, 0.02, 0.0, 316, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk((\"_cacheItem_%(ID)s.setExpiryTime(currentTime() +\"%locals())\n + str(interval) + \")\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "label": "endCacheRegion", "type": "function", "loc": [784, 796], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3952, 0.0065, 1, 0.82, 0.8267, 281, 0, 1, 0, 0, 0, 0, 17], "semantic": {"name": "endCacheRegion", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def endCacheRegion(self):\n ID = self._cacheRegionsStack.pop()\n self.addChunk('trans = _orig_trans%(ID)s'%locals())\n self.addChunk('write = trans.response().write')\n self.addChunk('_cacheData = _cacheCollector_%(ID)s.response().getvalue()'%locals())\n self.addChunk('_cacheItem_%(ID)s.setData(_cacheData)'%locals())\n self.addWriteChunk('_cacheData')\n self.addChunk('del _cacheData') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L785_C8", "label": "ID = pop()", "type": "assigned_variable", "loc": [785, 785], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "vector": [14, 2, 0.3927, 0.0005, 2, 0.14, 0.0, 789, 3, 0, 0, 0, 969, 10, 1], "semantic": {"name": "ID", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " ID = self._cacheRegionsStack.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L786_C8", "label": "addChunk()", "type": "expression", "loc": [786, 786], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "vector": [8, 2, 0.3932, 0.0005, 2, 0.14, 0.0909, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('trans = _orig_trans%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L787_C8", "label": "addChunk()", "type": "expression", "loc": [787, 787], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "vector": [8, 2, 0.3937, 0.0005, 2, 0.14, 0.1818, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('write = trans.response().write')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L788_C8", "label": "addChunk()", "type": "expression", "loc": [788, 788], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "vector": [8, 2, 0.3942, 0.0005, 2, 0.14, 0.2727, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_cacheData = _cacheCollector_%(ID)s.response().getvalue()'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L789_C8", "label": "addChunk()", "type": "expression", "loc": [789, 789], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "vector": [8, 2, 0.3947, 0.0005, 2, 0.14, 0.3636, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_cacheItem_%(ID)s.setData(_cacheData)'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L790_C8", "label": "addWriteChunk()", "type": "expression", "loc": [790, 790], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "vector": [8, 2, 0.3952, 0.0005, 2, 0.14, 0.4545, 251, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWriteChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addWriteChunk", "annotation": ""}, "snippet": " self.addWriteChunk('_cacheData')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L791_C8", "label": "addChunk()", "type": "expression", "loc": [791, 791], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "vector": [8, 2, 0.3957, 0.0005, 2, 0.14, 0.5455, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('del _cacheData') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L792_C8", "label": "addChunk()", "type": "expression", "loc": [792, 792], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "vector": [8, 2, 0.3962, 0.0005, 2, 0.14, 0.6364, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('del _cacheCollector_%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L793_C8", "label": "addChunk()", "type": "expression", "loc": [793, 793], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "vector": [8, 2, 0.3967, 0.0005, 2, 0.14, 0.7273, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('del _orig_trans%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L794_C8", "label": "dedent()", "type": "expression", "loc": [794, 794], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "vector": [8, 2, 0.3972, 0.0005, 2, 0.14, 0.8182, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L795_C8", "label": "addChunk()", "type": "expression", "loc": [795, 795], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "vector": [8, 2, 0.3977, 0.0005, 2, 0.14, 0.9091, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('## END CACHE REGION: '+ID)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L796_C8", "label": "addChunk()", "type": "expression", "loc": [796, 796], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "vector": [8, 2, 0.3982, 0.0005, 2, 0.14, 1.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L798_C4", "label": "nextCallRegionID", "type": "function", "loc": [798, 799], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.3994, 0.001, 1, 0.82, 0.84, 817, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "nextCallRegionID", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def nextCallRegionID(self):\n return self.nextCacheID()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L799_C8", "label": "return", "type": "return", "loc": [799, 799], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L798_C4", "vector": [13, 2, 0.3997, 0.0005, 2, 0.12, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.nextCacheID()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "label": "startCallRegion", "type": "function", "loc": [801, 820], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.4055, 0.01, 1, 0.82, 0.8533, 586, 0, 5, 0, 0, 0, 0, 14], "semantic": {"name": "startCallRegion", "arg_names": ["self", "functionName", "args", "lineCol", "regionTitle"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def startCallRegion(self, functionName, args, lineCol, regionTitle='CALL'):\n class CallDetails(object):\n pass\n callDetails = CallDetails()\n callDetails.ID = ID = self.nextCallRegionID()\n callDetails.functionName = functionName\n callDetails.args = args\n callDetails.lineCol = lineCol"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L802_C8", "label": "CallDetails", "type": "class", "loc": [802, 803], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "vector": [3, 2, 0.4015, 0.001, 2, 0.17, 0.0, 163, 0, 0, 0, 0, 186, 0, 0], "semantic": {"name": "CallDetails", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class CallDetails(object):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L804_C8", "label": "callDetails = CallDetails()", "type": "assigned_variable", "loc": [804, 804], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "vector": [14, 2, 0.4022, 0.0005, 2, 0.17, 0.0769, 917, 3, 0, 0, 0, 163, 10, 1], "semantic": {"name": "callDetails", "arg_names": [], "import_names": [], "rhs_call_name": "CallDetails", "annotation": ""}, "snippet": " callDetails = CallDetails()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L805_C8", "label": "callDetails.ID = nextCallRegionID()", "type": "assigned_variable", "loc": [805, 805], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "vector": [14, 2, 0.4027, 0.0005, 2, 0.17, 0.1538, 542, 3, 0, 0, 0, 817, 10, 1], "semantic": {"name": "callDetails.ID", "arg_names": [], "import_names": [], "rhs_call_name": "nextCallRegionID", "annotation": ""}, "snippet": " callDetails.ID = ID = self.nextCallRegionID()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L806_C8", "label": "callDetails.functionName =", "type": "assigned_variable", "loc": [806, 806], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "vector": [14, 2, 0.4032, 0.0005, 2, 0.17, 0.2308, 128, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "callDetails.functionName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " callDetails.functionName = functionName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L807_C8", "label": "callDetails.args =", "type": "assigned_variable", "loc": [807, 807], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "vector": [14, 2, 0.4037, 0.0005, 2, 0.17, 0.3077, 928, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "callDetails.args", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " callDetails.args = args"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L808_C8", "label": "callDetails.lineCol =", "type": "assigned_variable", "loc": [808, 808], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "vector": [14, 2, 0.4042, 0.0005, 2, 0.17, 0.3846, 526, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "callDetails.lineCol", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " callDetails.lineCol = lineCol"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L809_C8", "label": "callDetails.usesKeywordArgs =", "type": "assigned_variable", "loc": [809, 809], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "vector": [14, 2, 0.4047, 0.0005, 2, 0.17, 0.4615, 599, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "callDetails.usesKeywordArgs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " callDetails.usesKeywordArgs = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L810_C8", "label": "append()", "type": "expression", "loc": [810, 810], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "vector": [8, 2, 0.4052, 0.0005, 2, 0.17, 0.5385, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._callRegionsStack.append((ID, callDetails)) # attrib of current methodCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L812_C8", "label": "addChunk()", "type": "expression", "loc": [812, 815], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "vector": [8, 2, 0.407, 0.002, 2, 0.17, 0.6154, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('## START %(regionTitle)s REGION: '%locals()\n +ID\n +' of '+functionName\n +' at line %s, col %s'%lineCol + ' in the source.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L816_C8", "label": "addChunk()", "type": "expression", "loc": [816, 816], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "vector": [8, 2, 0.4082, 0.0005, 2, 0.17, 0.6923, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_orig_trans%(ID)s = trans'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L817_C8", "label": "addChunk()", "type": "expression", "loc": [817, 817], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "vector": [8, 2, 0.4087, 0.0005, 2, 0.17, 0.7692, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_wasBuffering%(ID)s = self._CHEETAH__isBuffering'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L818_C8", "label": "addChunk()", "type": "expression", "loc": [818, 818], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "vector": [8, 2, 0.4092, 0.0005, 2, 0.17, 0.8462, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('self._CHEETAH__isBuffering = True')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L819_C8", "label": "addChunk()", "type": "expression", "loc": [819, 819], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "vector": [8, 2, 0.4097, 0.0005, 2, 0.17, 0.9231, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('trans = _callCollector%(ID)s = DummyTransaction()'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L820_C8", "label": "addChunk()", "type": "expression", "loc": [820, 820], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "vector": [8, 2, 0.4102, 0.0005, 2, 0.17, 1.0, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('write = _callCollector%(ID)s.response().write'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L822_C4", "label": "setCallArg", "type": "function", "loc": [822, 831], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.4135, 0.005, 1, 0.82, 0.8667, 867, 0, 3, 0, 0, 0, 0, 6], "semantic": {"name": "setCallArg", "arg_names": ["self", "argName", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setCallArg(self, argName, lineCol):\n ID, callDetails = self._callRegionsStack[-1]\n argName = str(argName)\n if callDetails.usesKeywordArgs:\n self._endCallArg()\n else:\n callDetails.usesKeywordArgs = True\n self.addChunk('_callKws%(ID)s = {}'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L823_C8", "label": "ID, callDetails =", "type": "assigned_variable", "loc": [823, 823], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L822_C4", "vector": [14, 2, 0.4117, 0.0005, 2, 0.06, 0.0, 218, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "ID, callDetails", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ID, callDetails = self._callRegionsStack[-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L824_C8", "label": "argName = str()", "type": "assigned_variable", "loc": [824, 824], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L822_C4", "vector": [14, 2, 0.4122, 0.0005, 2, 0.06, 0.3333, 599, 3, 1, 0, 0, 52, 10, 1], "semantic": {"name": "argName", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " argName = str(argName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L825_C8", "label": "if", "type": "if", "loc": [825, 830], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L822_C4", "vector": [4, 2, 0.414, 0.003, 2, 0.06, 0.6667, 0, 7, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if callDetails.usesKeywordArgs:\n self._endCallArg()\n else:\n callDetails.usesKeywordArgs = True\n self.addChunk('_callKws%(ID)s = {}'%locals())\n self.addChunk('_currentCallArgname%(ID)s = %(argName)r'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L826_C12", "label": "_endCallArg()", "type": "expression", "loc": [826, 826], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L825_C8", "vector": [8, 3, 0.4132, 0.0005, 3, 0.44, 0.0, 180, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_endCallArg", "arg_names": [], "import_names": [], "rhs_call_name": "_endCallArg", "annotation": ""}, "snippet": " self._endCallArg()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L828_C12", "label": "callDetails.usesKeywordArgs =", "type": "assigned_variable", "loc": [828, 828], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L825_C8", "vector": [14, 3, 0.4142, 0.0005, 3, 0.44, 0.3333, 599, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "callDetails.usesKeywordArgs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " callDetails.usesKeywordArgs = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L829_C12", "label": "addChunk()", "type": "expression", "loc": [829, 829], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L825_C8", "vector": [8, 3, 0.4147, 0.0005, 3, 0.44, 0.6667, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_callKws%(ID)s = {}'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L830_C12", "label": "addChunk()", "type": "expression", "loc": [830, 830], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L825_C8", "vector": [8, 3, 0.4152, 0.0005, 3, 0.44, 1.0, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_currentCallArgname%(ID)s = %(argName)r'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L831_C8", "label": "callDetails.currentArgname =", "type": "assigned_variable", "loc": [831, 831], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L822_C4", "vector": [14, 2, 0.4157, 0.0005, 2, 0.06, 1.0, 160, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "callDetails.currentArgname", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " callDetails.currentArgname = argName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L833_C4", "label": "_endCallArg", "type": "function", "loc": [833, 840], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.4185, 0.004, 1, 0.82, 0.88, 180, 0, 1, 0, 0, 0, 0, 8], "semantic": {"name": "_endCallArg", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _endCallArg(self):\n ID, callDetails = self._callRegionsStack[-1]\n currCallArg = callDetails.currentArgname\n self.addChunk(('_callKws%(ID)s[%(currCallArg)r] ='\n ' _callCollector%(ID)s.response().getvalue()')%locals())\n self.addChunk('del _callCollector%(ID)s'%locals())\n self.addChunk('trans = _callCollector%(ID)s = DummyTransaction()'%locals())\n self.addChunk('write = _callCollector%(ID)s.response().write'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L834_C8", "label": "ID, callDetails =", "type": "assigned_variable", "loc": [834, 834], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L833_C4", "vector": [14, 2, 0.4172, 0.0005, 2, 0.97, 0.0, 218, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "ID, callDetails", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ID, callDetails = self._callRegionsStack[-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L835_C8", "label": "currCallArg =", "type": "assigned_variable", "loc": [835, 835], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L833_C4", "vector": [14, 2, 0.4177, 0.0005, 2, 0.97, 0.2, 922, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "currCallArg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " currCallArg = callDetails.currentArgname"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L836_C8", "label": "addChunk()", "type": "expression", "loc": [836, 837], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L833_C4", "vector": [8, 2, 0.4185, 0.001, 2, 0.97, 0.4, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(('_callKws%(ID)s[%(currCallArg)r] ='\n ' _callCollector%(ID)s.response().getvalue()')%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L838_C8", "label": "addChunk()", "type": "expression", "loc": [838, 838], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L833_C4", "vector": [8, 2, 0.4192, 0.0005, 2, 0.97, 0.6, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('del _callCollector%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L839_C8", "label": "addChunk()", "type": "expression", "loc": [839, 839], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L833_C4", "vector": [8, 2, 0.4197, 0.0005, 2, 0.97, 0.8, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('trans = _callCollector%(ID)s = DummyTransaction()'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L840_C8", "label": "addChunk()", "type": "expression", "loc": [840, 840], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L833_C4", "vector": [8, 2, 0.4202, 0.0005, 2, 0.97, 1.0, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('write = _callCollector%(ID)s.response().write'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L842_C4", "label": "endCallRegion", "type": "function", "loc": [842, 874], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.4292, 0.0165, 1, 0.82, 0.8933, 789, 0, 2, 0, 0, 0, 0, 28], "semantic": {"name": "endCallRegion", "arg_names": ["self", "regionTitle"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def endCallRegion(self, regionTitle='CALL'):\n ID, callDetails = self._callRegionsStack[-1]\n functionName, initialKwArgs, lineCol = (\n callDetails.functionName, callDetails.args, callDetails.lineCol)\n\n def reset(ID=ID):\n self.addChunk('trans = _orig_trans%(ID)s'%locals())\n self.addChunk('write = trans.response().write')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L843_C8", "label": "ID, callDetails =", "type": "assigned_variable", "loc": [843, 843], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L842_C4", "vector": [14, 2, 0.4217, 0.0005, 2, 0.62, 0.0, 218, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "ID, callDetails", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ID, callDetails = self._callRegionsStack[-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L844_C8", "label": "functionName, initialKwArgs, lineCol =", "type": "assigned_variable", "loc": [844, 845], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L842_C4", "vector": [14, 2, 0.4225, 0.001, 2, 0.62, 0.1667, 157, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "functionName, initialKwArgs, lineCol", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " functionName, initialKwArgs, lineCol = (\n callDetails.functionName, callDetails.args, callDetails.lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L847_C8", "label": "reset", "type": "function", "loc": [847, 852], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L842_C4", "vector": [2, 2, 0.425, 0.003, 2, 0.62, 0.3333, 944, 0, 1, 0, 0, 0, 0, 9], "semantic": {"name": "reset", "arg_names": ["ID"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def reset(ID=ID):\n self.addChunk('trans = _orig_trans%(ID)s'%locals())\n self.addChunk('write = trans.response().write')\n self.addChunk('self._CHEETAH__isBuffering = _wasBuffering%(ID)s '%locals())\n self.addChunk('del _wasBuffering%(ID)s'%locals())\n self.addChunk('del _orig_trans%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L848_C12", "label": "addChunk()", "type": "expression", "loc": [848, 848], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L847_C8", "vector": [8, 3, 0.4242, 0.0005, 3, 0.43, 0.0, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('trans = _orig_trans%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L849_C12", "label": "addChunk()", "type": "expression", "loc": [849, 849], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L847_C8", "vector": [8, 3, 0.4247, 0.0005, 3, 0.43, 0.25, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('write = trans.response().write')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L850_C12", "label": "addChunk()", "type": "expression", "loc": [850, 850], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L847_C8", "vector": [8, 3, 0.4252, 0.0005, 3, 0.43, 0.5, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('self._CHEETAH__isBuffering = _wasBuffering%(ID)s '%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L851_C12", "label": "addChunk()", "type": "expression", "loc": [851, 851], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L847_C8", "vector": [8, 3, 0.4257, 0.0005, 3, 0.43, 0.75, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('del _wasBuffering%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L852_C12", "label": "addChunk()", "type": "expression", "loc": [852, 852], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L847_C8", "vector": [8, 3, 0.4262, 0.0005, 3, 0.43, 1.0, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('del _orig_trans%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "label": "if", "type": "if", "loc": [854, 868], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L842_C4", "vector": [4, 2, 0.4307, 0.0075, 2, 0.62, 0.5, 0, 0, 0, 0, 0, 0, 0, 15], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not callDetails.usesKeywordArgs:\n reset()\n self.addChunk('_callArgVal%(ID)s = _callCollector%(ID)s.response().getvalue()'%locals())\n self.addChunk('del _callCollector%(ID)s'%locals())\n if initialKwArgs:\n initialKwArgs = ', '+initialKwArgs \n self.addFilteredChunk('%(functionName)s(_callArgVal%(ID)s%(initialKwArgs)s)'%locals())\n self.addChunk('del _callArgVal%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L855_C12", "label": "reset()", "type": "expression", "loc": [855, 855], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "vector": [8, 3, 0.4277, 0.0005, 3, 0.59, 0.0, 944, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "reset", "arg_names": [], "import_names": [], "rhs_call_name": "reset", "annotation": ""}, "snippet": " reset()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L856_C12", "label": "addChunk()", "type": "expression", "loc": [856, 856], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "vector": [8, 3, 0.4282, 0.0005, 3, 0.59, 0.1, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_callArgVal%(ID)s = _callCollector%(ID)s.response().getvalue()'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L857_C12", "label": "addChunk()", "type": "expression", "loc": [857, 857], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "vector": [8, 3, 0.4287, 0.0005, 3, 0.59, 0.2, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('del _callCollector%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L858_C12", "label": "if", "type": "if", "loc": [858, 859], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "vector": [4, 3, 0.4295, 0.001, 3, 0.59, 0.3, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if initialKwArgs:\n initialKwArgs = ', '+initialKwArgs "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L859_C16", "label": "initialKwArgs =", "type": "assigned_variable", "loc": [859, 859], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L858_C12", "vector": [14, 4, 0.4297, 0.0005, 4, 0.57, 0.0, 312, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "initialKwArgs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " initialKwArgs = ', '+initialKwArgs "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L860_C12", "label": "addFilteredChunk()", "type": "expression", "loc": [860, 860], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "vector": [8, 3, 0.4302, 0.0005, 3, 0.59, 0.4, 240, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addFilteredChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addFilteredChunk", "annotation": ""}, "snippet": " self.addFilteredChunk('%(functionName)s(_callArgVal%(ID)s%(initialKwArgs)s)'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L861_C12", "label": "addChunk()", "type": "expression", "loc": [861, 861], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "vector": [8, 3, 0.4307, 0.0005, 3, 0.59, 0.5, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('del _callArgVal%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L863_C12", "label": "if", "type": "if", "loc": [863, 864], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "vector": [4, 3, 0.432, 0.001, 3, 0.59, 0.6, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if initialKwArgs:\n initialKwArgs = initialKwArgs+', '"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L864_C16", "label": "initialKwArgs =", "type": "assigned_variable", "loc": [864, 864], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L863_C12", "vector": [14, 4, 0.4322, 0.0005, 4, 0.88, 0.0, 312, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "initialKwArgs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " initialKwArgs = initialKwArgs+', '"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L865_C12", "label": "_endCallArg()", "type": "expression", "loc": [865, 865], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "vector": [8, 3, 0.4327, 0.0005, 3, 0.59, 0.7, 180, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_endCallArg", "arg_names": [], "import_names": [], "rhs_call_name": "_endCallArg", "annotation": ""}, "snippet": " self._endCallArg()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L866_C12", "label": "reset()", "type": "expression", "loc": [866, 866], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "vector": [8, 3, 0.4332, 0.0005, 3, 0.59, 0.8, 944, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "reset", "arg_names": [], "import_names": [], "rhs_call_name": "reset", "annotation": ""}, "snippet": " reset()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L867_C12", "label": "addFilteredChunk()", "type": "expression", "loc": [867, 867], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "vector": [8, 3, 0.4337, 0.0005, 3, 0.59, 0.9, 240, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addFilteredChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addFilteredChunk", "annotation": ""}, "snippet": " self.addFilteredChunk('%(functionName)s(%(initialKwArgs)s**_callKws%(ID)s)'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L868_C12", "label": "addChunk()", "type": "expression", "loc": [868, 868], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "vector": [8, 3, 0.4342, 0.0005, 3, 0.59, 1.0, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('del _callKws%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L869_C8", "label": "addChunk()", "type": "expression", "loc": [869, 872], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L842_C4", "vector": [8, 2, 0.4355, 0.002, 2, 0.62, 0.6667, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('## END %(regionTitle)s REGION: '%locals()\n +ID\n +' of '+functionName\n +' at line %s, col %s'%lineCol + ' in the source.') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L873_C8", "label": "addChunk()", "type": "expression", "loc": [873, 873], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L842_C4", "vector": [8, 2, 0.4367, 0.0005, 2, 0.62, 0.8333, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L874_C8", "label": "pop()", "type": "expression", "loc": [874, 874], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L842_C4", "vector": [8, 2, 0.4372, 0.0005, 2, 0.62, 1.0, 969, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "pop", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " self._callRegionsStack.pop() # attrib of current methodCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L876_C4", "label": "nextCaptureRegionID", "type": "function", "loc": [876, 877], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.4385, 0.001, 1, 0.82, 0.9067, 839, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "nextCaptureRegionID", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def nextCaptureRegionID(self):\n return self.nextCacheID()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L877_C8", "label": "return", "type": "return", "loc": [877, 877], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L876_C4", "vector": [13, 2, 0.4387, 0.0005, 2, 0.7, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.nextCacheID()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "label": "startCaptureRegion", "type": "function", "loc": [879, 894], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.4435, 0.008, 1, 0.82, 0.92, 646, 0, 3, 0, 0, 0, 0, 13], "semantic": {"name": "startCaptureRegion", "arg_names": ["self", "assignTo", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def startCaptureRegion(self, assignTo, lineCol):\n class CaptureDetails: pass\n captureDetails = CaptureDetails()\n captureDetails.ID = ID = self.nextCaptureRegionID()\n captureDetails.assignTo = assignTo\n captureDetails.lineCol = lineCol\n \n self._captureRegionsStack.append((ID, captureDetails)) # attrib of current methodCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L880_C8", "label": "CaptureDetails", "type": "class", "loc": [880, 880], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "vector": [3, 2, 0.4402, 0.0005, 2, 0.22, 0.0, 135, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "CaptureDetails", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class CaptureDetails: pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L881_C8", "label": "captureDetails = CaptureDetails()", "type": "assigned_variable", "loc": [881, 881], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "vector": [14, 2, 0.4407, 0.0005, 2, 0.22, 0.0909, 972, 3, 0, 0, 0, 135, 10, 1], "semantic": {"name": "captureDetails", "arg_names": [], "import_names": [], "rhs_call_name": "CaptureDetails", "annotation": ""}, "snippet": " captureDetails = CaptureDetails()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L882_C8", "label": "captureDetails.ID = nextCaptureRegionID()", "type": "assigned_variable", "loc": [882, 882], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "vector": [14, 2, 0.4412, 0.0005, 2, 0.22, 0.1818, 749, 3, 0, 0, 0, 839, 10, 1], "semantic": {"name": "captureDetails.ID", "arg_names": [], "import_names": [], "rhs_call_name": "nextCaptureRegionID", "annotation": ""}, "snippet": " captureDetails.ID = ID = self.nextCaptureRegionID()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L883_C8", "label": "captureDetails.assignTo =", "type": "assigned_variable", "loc": [883, 883], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "vector": [14, 2, 0.4417, 0.0005, 2, 0.22, 0.2727, 623, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "captureDetails.assignTo", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " captureDetails.assignTo = assignTo"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L884_C8", "label": "captureDetails.lineCol =", "type": "assigned_variable", "loc": [884, 884], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "vector": [14, 2, 0.4422, 0.0005, 2, 0.22, 0.3636, 342, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "captureDetails.lineCol", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " captureDetails.lineCol = lineCol"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L886_C8", "label": "append()", "type": "expression", "loc": [886, 886], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "vector": [8, 2, 0.4432, 0.0005, 2, 0.22, 0.4545, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._captureRegionsStack.append((ID, captureDetails)) # attrib of current methodCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L887_C8", "label": "addChunk()", "type": "expression", "loc": [887, 889], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "vector": [8, 2, 0.4442, 0.0015, 2, 0.22, 0.5455, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('## START CAPTURE REGION: '+ID\n +' '+assignTo\n +' at line %s, col %s'%lineCol + ' in the source.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L890_C8", "label": "addChunk()", "type": "expression", "loc": [890, 890], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "vector": [8, 2, 0.4452, 0.0005, 2, 0.22, 0.6364, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_orig_trans%(ID)s = trans'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L891_C8", "label": "addChunk()", "type": "expression", "loc": [891, 891], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "vector": [8, 2, 0.4457, 0.0005, 2, 0.22, 0.7273, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_wasBuffering%(ID)s = self._CHEETAH__isBuffering'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L892_C8", "label": "addChunk()", "type": "expression", "loc": [892, 892], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "vector": [8, 2, 0.4462, 0.0005, 2, 0.22, 0.8182, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('self._CHEETAH__isBuffering = True')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L893_C8", "label": "addChunk()", "type": "expression", "loc": [893, 893], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "vector": [8, 2, 0.4467, 0.0005, 2, 0.22, 0.9091, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('trans = _captureCollector%(ID)s = DummyTransaction()'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L894_C8", "label": "addChunk()", "type": "expression", "loc": [894, 894], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "vector": [8, 2, 0.4472, 0.0005, 2, 0.22, 1.0, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('write = _captureCollector%(ID)s.response().write'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "label": "endCaptureRegion", "type": "function", "loc": [896, 905], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.4505, 0.005, 1, 0.82, 0.9333, 608, 0, 1, 0, 0, 0, 0, 14], "semantic": {"name": "endCaptureRegion", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def endCaptureRegion(self):\n ID, captureDetails = self._captureRegionsStack.pop()\n assignTo, lineCol = (captureDetails.assignTo, captureDetails.lineCol)\n self.addChunk('trans = _orig_trans%(ID)s'%locals())\n self.addChunk('write = trans.response().write')\n self.addChunk('self._CHEETAH__isBuffering = _wasBuffering%(ID)s '%locals())\n self.addChunk('%(assignTo)s = _captureCollector%(ID)s.response().getvalue()'%locals())\n self.addChunk('del _orig_trans%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L897_C8", "label": "ID, captureDetails = pop()", "type": "assigned_variable", "loc": [897, 897], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "vector": [14, 2, 0.4487, 0.0005, 2, 0.93, 0.0, 862, 3, 0, 0, 0, 969, 10, 1], "semantic": {"name": "ID, captureDetails", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " ID, captureDetails = self._captureRegionsStack.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L898_C8", "label": "assignTo, lineCol =", "type": "assigned_variable", "loc": [898, 898], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "vector": [14, 2, 0.4492, 0.0005, 2, 0.93, 0.125, 224, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "assignTo, lineCol", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " assignTo, lineCol = (captureDetails.assignTo, captureDetails.lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L899_C8", "label": "addChunk()", "type": "expression", "loc": [899, 899], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "vector": [8, 2, 0.4497, 0.0005, 2, 0.93, 0.25, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('trans = _orig_trans%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L900_C8", "label": "addChunk()", "type": "expression", "loc": [900, 900], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "vector": [8, 2, 0.4502, 0.0005, 2, 0.93, 0.375, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('write = trans.response().write')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L901_C8", "label": "addChunk()", "type": "expression", "loc": [901, 901], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "vector": [8, 2, 0.4507, 0.0005, 2, 0.93, 0.5, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('self._CHEETAH__isBuffering = _wasBuffering%(ID)s '%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L902_C8", "label": "addChunk()", "type": "expression", "loc": [902, 902], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "vector": [8, 2, 0.4512, 0.0005, 2, 0.93, 0.625, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('%(assignTo)s = _captureCollector%(ID)s.response().getvalue()'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L903_C8", "label": "addChunk()", "type": "expression", "loc": [903, 903], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "vector": [8, 2, 0.4517, 0.0005, 2, 0.93, 0.75, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('del _orig_trans%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L904_C8", "label": "addChunk()", "type": "expression", "loc": [904, 904], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "vector": [8, 2, 0.4522, 0.0005, 2, 0.93, 0.875, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('del _captureCollector%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L905_C8", "label": "addChunk()", "type": "expression", "loc": [905, 905], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "vector": [8, 2, 0.4527, 0.0005, 2, 0.93, 1.0, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('del _wasBuffering%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "label": "setErrorCatcher", "type": "function", "loc": [907, 921], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.4572, 0.0075, 1, 0.82, 0.9467, 508, 0, 2, 0, 0, 0, 0, 9], "semantic": {"name": "setErrorCatcher", "arg_names": ["self", "errorCatcherName"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setErrorCatcher(self, errorCatcherName):\n self.turnErrorCatcherOn() \n\n self.addChunk('if self._CHEETAH__errorCatchers.has_key(\"' + errorCatcherName + '\"):')\n self.indent()\n self.addChunk('self._CHEETAH__errorCatcher = self._CHEETAH__errorCatchers[\"' +\n errorCatcherName + '\"]')\n self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L908_C8", "label": "turnErrorCatcherOn()", "type": "expression", "loc": [908, 908], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "vector": [8, 2, 0.4542, 0.0005, 2, 0.08, 0.0, 556, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "turnErrorCatcherOn", "arg_names": [], "import_names": [], "rhs_call_name": "turnErrorCatcherOn", "annotation": ""}, "snippet": " self.turnErrorCatcherOn() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L910_C8", "label": "addChunk()", "type": "expression", "loc": [910, 910], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "vector": [8, 2, 0.4552, 0.0005, 2, 0.08, 0.125, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('if self._CHEETAH__errorCatchers.has_key(\"' + errorCatcherName + '\"):')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L911_C8", "label": "indent()", "type": "expression", "loc": [911, 911], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "vector": [8, 2, 0.4557, 0.0005, 2, 0.08, 0.25, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L912_C8", "label": "addChunk()", "type": "expression", "loc": [912, 913], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "vector": [8, 2, 0.4565, 0.001, 2, 0.08, 0.375, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('self._CHEETAH__errorCatcher = self._CHEETAH__errorCatchers[\"' +\n errorCatcherName + '\"]')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L914_C8", "label": "dedent()", "type": "expression", "loc": [914, 914], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "vector": [8, 2, 0.4572, 0.0005, 2, 0.08, 0.5, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L915_C8", "label": "addChunk()", "type": "expression", "loc": [915, 915], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "vector": [8, 2, 0.4577, 0.0005, 2, 0.08, 0.625, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('else:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L916_C8", "label": "indent()", "type": "expression", "loc": [916, 916], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "vector": [8, 2, 0.4582, 0.0005, 2, 0.08, 0.75, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L917_C8", "label": "addChunk()", "type": "expression", "loc": [917, 920], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "vector": [8, 2, 0.4595, 0.002, 2, 0.08, 0.875, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('self._CHEETAH__errorCatcher = self._CHEETAH__errorCatchers[\"'\n + errorCatcherName + '\"] = ErrorCatchers.'\n + errorCatcherName + '(self)'\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L921_C8", "label": "dedent()", "type": "expression", "loc": [921, 921], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "vector": [8, 2, 0.4607, 0.0005, 2, 0.08, 1.0, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L923_C4", "label": "nextFilterRegionID", "type": "function", "loc": [923, 924], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.462, 0.001, 1, 0.82, 0.96, 498, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "nextFilterRegionID", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def nextFilterRegionID(self):\n return self.nextCacheID()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L924_C8", "label": "return", "type": "return", "loc": [924, 924], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L923_C4", "vector": [13, 2, 0.4622, 0.0005, 2, 0.64, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.nextCacheID()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L926_C4", "label": "setTransform", "type": "function", "loc": [926, 930], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.4642, 0.0025, 1, 0.82, 0.9733, 58, 0, 3, 0, 0, 0, 0, 4], "semantic": {"name": "setTransform", "arg_names": ["self", "transformer", "isKlass"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setTransform(self, transformer, isKlass):\n self.addChunk('trans = TransformerTransaction()')\n self.addChunk('trans._response = trans.response()')\n self.addChunk('trans._response._filter = %s' % transformer)\n self.addChunk('write = trans._response.write')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L927_C8", "label": "addChunk()", "type": "expression", "loc": [927, 927], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L926_C4", "vector": [8, 2, 0.4637, 0.0005, 2, 0.49, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('trans = TransformerTransaction()')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L928_C8", "label": "addChunk()", "type": "expression", "loc": [928, 928], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L926_C4", "vector": [8, 2, 0.4642, 0.0005, 2, 0.49, 0.3333, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('trans._response = trans.response()')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L929_C8", "label": "addChunk()", "type": "expression", "loc": [929, 929], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L926_C4", "vector": [8, 2, 0.4647, 0.0005, 2, 0.49, 0.6667, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('trans._response._filter = %s' % transformer)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L930_C8", "label": "addChunk()", "type": "expression", "loc": [930, 930], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L926_C4", "vector": [8, 2, 0.4652, 0.0005, 2, 0.49, 1.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('write = trans._response.write')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "label": "setFilter", "type": "function", "loc": [932, 960], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.4732, 0.0145, 1, 0.82, 0.9867, 941, 0, 3, 0, 0, 0, 0, 19], "semantic": {"name": "setFilter", "arg_names": ["self", "theFilter", "isKlass"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setFilter(self, theFilter, isKlass):\n class FilterDetails: \n pass\n filterDetails = FilterDetails()\n filterDetails.ID = ID = self.nextFilterRegionID()\n filterDetails.theFilter = theFilter\n filterDetails.isKlass = isKlass\n self._filterRegionsStack.append((ID, filterDetails)) # attrib of current methodCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L933_C8", "label": "FilterDetails", "type": "class", "loc": [933, 934], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "vector": [3, 2, 0.467, 0.001, 2, 0.39, 0.0, 932, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "FilterDetails", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class FilterDetails: \n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L935_C8", "label": "filterDetails = FilterDetails()", "type": "assigned_variable", "loc": [935, 935], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "vector": [14, 2, 0.4677, 0.0005, 2, 0.39, 0.1429, 534, 3, 0, 0, 0, 932, 10, 1], "semantic": {"name": "filterDetails", "arg_names": [], "import_names": [], "rhs_call_name": "FilterDetails", "annotation": ""}, "snippet": " filterDetails = FilterDetails()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L936_C8", "label": "filterDetails.ID = nextFilterRegionID()", "type": "assigned_variable", "loc": [936, 936], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "vector": [14, 2, 0.4682, 0.0005, 2, 0.39, 0.2857, 546, 3, 0, 0, 0, 498, 10, 1], "semantic": {"name": "filterDetails.ID", "arg_names": [], "import_names": [], "rhs_call_name": "nextFilterRegionID", "annotation": ""}, "snippet": " filterDetails.ID = ID = self.nextFilterRegionID()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L937_C8", "label": "filterDetails.theFilter =", "type": "assigned_variable", "loc": [937, 937], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "vector": [14, 2, 0.4687, 0.0005, 2, 0.39, 0.4286, 461, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "filterDetails.theFilter", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " filterDetails.theFilter = theFilter"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L938_C8", "label": "filterDetails.isKlass =", "type": "assigned_variable", "loc": [938, 938], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "vector": [14, 2, 0.4692, 0.0005, 2, 0.39, 0.5714, 621, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "filterDetails.isKlass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " filterDetails.isKlass = isKlass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L939_C8", "label": "append()", "type": "expression", "loc": [939, 939], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "vector": [8, 2, 0.4697, 0.0005, 2, 0.39, 0.7143, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._filterRegionsStack.append((ID, filterDetails)) # attrib of current methodCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L941_C8", "label": "addChunk()", "type": "expression", "loc": [941, 941], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "vector": [8, 2, 0.4707, 0.0005, 2, 0.39, 0.8571, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_orig_filter%(ID)s = _filter'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L942_C8", "label": "if", "type": "if", "loc": [942, 960], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "vector": [4, 2, 0.4757, 0.0095, 2, 0.39, 1.0, 0, 2, 0, 0, 0, 0, 0, 14], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isKlass:\n self.addChunk('_filter = self._CHEETAH__currentFilter = ' + theFilter.strip() +\n '(self).filter')\n else:\n if theFilter.lower() == 'none':\n self.addChunk('_filter = self._CHEETAH__initialFilter')\n else:\n # is string representing the name of a builtin filter"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L943_C12", "label": "addChunk()", "type": "expression", "loc": [943, 944], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L942_C8", "vector": [8, 3, 0.472, 0.001, 3, 0.01, 0.0, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_filter = self._CHEETAH__currentFilter = ' + theFilter.strip() +\n '(self).filter')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "label": "if", "type": "if", "loc": [946, 960], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L942_C8", "vector": [4, 3, 0.4767, 0.0075, 3, 0.01, 1.0, 0, 0, 0, 0, 0, 0, 0, 12], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if theFilter.lower() == 'none':\n self.addChunk('_filter = self._CHEETAH__initialFilter')\n else:\n # is string representing the name of a builtin filter\n self.addChunk('filterName = ' + repr(theFilter))\n self.addChunk('if self._CHEETAH__filters.has_key(\"' + theFilter + '\"):')\n self.indent()\n self.addChunk('_filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName]')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L947_C16", "label": "addChunk()", "type": "expression", "loc": [947, 947], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "vector": [8, 4, 0.4737, 0.0005, 4, 0.94, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_filter = self._CHEETAH__initialFilter')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L950_C16", "label": "addChunk()", "type": "expression", "loc": [950, 950], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "vector": [8, 4, 0.4752, 0.0005, 4, 0.94, 0.1111, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('filterName = ' + repr(theFilter))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L951_C16", "label": "addChunk()", "type": "expression", "loc": [951, 951], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "vector": [8, 4, 0.4757, 0.0005, 4, 0.94, 0.2222, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('if self._CHEETAH__filters.has_key(\"' + theFilter + '\"):')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L952_C16", "label": "indent()", "type": "expression", "loc": [952, 952], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "vector": [8, 4, 0.4762, 0.0005, 4, 0.94, 0.3333, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L953_C16", "label": "addChunk()", "type": "expression", "loc": [953, 953], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "vector": [8, 4, 0.4767, 0.0005, 4, 0.94, 0.4444, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName]')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L954_C16", "label": "dedent()", "type": "expression", "loc": [954, 954], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "vector": [8, 4, 0.4772, 0.0005, 4, 0.94, 0.5556, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L955_C16", "label": "addChunk()", "type": "expression", "loc": [955, 955], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "vector": [8, 4, 0.4777, 0.0005, 4, 0.94, 0.6667, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('else:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L956_C16", "label": "indent()", "type": "expression", "loc": [956, 956], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "vector": [8, 4, 0.4782, 0.0005, 4, 0.94, 0.7778, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L957_C16", "label": "addChunk()", "type": "expression", "loc": [957, 959], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "vector": [8, 4, 0.4792, 0.0015, 4, 0.94, 0.8889, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_filter = self._CHEETAH__currentFilter'\n +' = \\\\\\n\\t\\t\\tself._CHEETAH__filters[filterName] = '\n + 'getattr(self._CHEETAH__filtersLib, filterName)(self).filter')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L960_C16", "label": "dedent()", "type": "expression", "loc": [960, 960], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "vector": [8, 4, 0.4802, 0.0005, 4, 0.94, 1.0, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L962_C4", "label": "closeFilterBlock", "type": "function", "loc": [962, 966], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "vector": [2, 1, 0.4822, 0.0025, 1, 0.82, 1.0, 141, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "closeFilterBlock", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def closeFilterBlock(self):\n ID, filterDetails = self._filterRegionsStack.pop()\n #self.addChunk('_filter = self._CHEETAH__initialFilter')\n #self.addChunk('_filter = _orig_filter%(ID)s'%locals())\n self.addChunk('_filter = self._CHEETAH__currentFilter = _orig_filter%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L963_C8", "label": "ID, filterDetails = pop()", "type": "assigned_variable", "loc": [963, 963], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L962_C4", "vector": [14, 2, 0.4817, 0.0005, 2, 0.37, 0.0, 297, 3, 0, 0, 0, 969, 10, 1], "semantic": {"name": "ID, filterDetails", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " ID, filterDetails = self._filterRegionsStack.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L966_C8", "label": "addChunk()", "type": "expression", "loc": [966, 966], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L962_C4", "vector": [8, 2, 0.4832, 0.0005, 2, 0.37, 1.0, 316, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_filter = self._CHEETAH__currentFilter = _orig_filter%(ID)s'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "label": "AutoMethodCompiler", "type": "class", "loc": [968, 1113], "level": 0, "parent": null, "vector": [3, 0, 0.5205, 0.073, 0, 0.66, 0.8438, 782, 0, 10, 0, 0, 839, 0, 76], "semantic": {"name": "AutoMethodCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class AutoMethodCompiler(MethodCompiler):\n\n def _setupState(self):\n MethodCompiler._setupState(self)\n self._argStringList = [ (\"self\", None) ]\n self._streamingEnabled = True\n self._isClassMethod = None\n self._isStaticMethod = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L970_C4", "label": "_setupState", "type": "function", "loc": [970, 975], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "vector": [2, 1, 0.4865, 0.003, 1, 0.47, 0.0, 611, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_setupState", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _setupState(self):\n MethodCompiler._setupState(self)\n self._argStringList = [ (\"self\", None) ]\n self._streamingEnabled = True\n self._isClassMethod = None\n self._isStaticMethod = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L971_C8", "label": "_setupState()", "type": "expression", "loc": [971, 971], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L970_C4", "vector": [8, 2, 0.4857, 0.0005, 2, 0.45, 0.0, 611, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_setupState", "arg_names": [], "import_names": [], "rhs_call_name": "_setupState", "annotation": ""}, "snippet": " MethodCompiler._setupState(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L972_C8", "label": "self._argStringList =", "type": "assigned_variable", "loc": [972, 972], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L970_C4", "vector": [14, 2, 0.4862, 0.0005, 2, 0.45, 0.25, 450, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._argStringList", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._argStringList = [ (\"self\", None) ]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L973_C8", "label": "self._streamingEnabled =", "type": "assigned_variable", "loc": [973, 973], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L970_C4", "vector": [14, 2, 0.4867, 0.0005, 2, 0.45, 0.5, 626, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._streamingEnabled", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._streamingEnabled = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L974_C8", "label": "self._isClassMethod =", "type": "assigned_variable", "loc": [974, 974], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L970_C4", "vector": [14, 2, 0.4872, 0.0005, 2, 0.45, 0.75, 827, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._isClassMethod", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._isClassMethod = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L975_C8", "label": "self._isStaticMethod =", "type": "assigned_variable", "loc": [975, 975], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L970_C4", "vector": [14, 2, 0.4877, 0.0005, 2, 0.45, 1.0, 743, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._isStaticMethod", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._isStaticMethod = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L977_C4", "label": "_useKWsDictArgForPassingTrans", "type": "function", "loc": [977, 982], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "vector": [2, 1, 0.49, 0.003, 1, 0.47, 0.1111, 435, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "_useKWsDictArgForPassingTrans", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _useKWsDictArgForPassingTrans(self):\n alreadyHasTransArg = [argname for argname, defval in self._argStringList\n if argname=='trans']\n return (self.methodName()!='respond'\n and not alreadyHasTransArg\n and self.setting('useKWsDictArgForPassingTrans'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L978_C8", "label": "alreadyHasTransArg =", "type": "assigned_variable", "loc": [978, 979], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L977_C4", "vector": [14, 2, 0.4895, 0.001, 2, 0.37, 0.0, 841, 5, 0, 0, 0, 0, 0, 0], "semantic": {"name": "alreadyHasTransArg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " alreadyHasTransArg = [argname for argname, defval in self._argStringList\n if argname=='trans']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L980_C8", "label": "return", "type": "return", "loc": [980, 982], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L977_C4", "vector": [13, 2, 0.4907, 0.0015, 2, 0.37, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return (self.methodName()!='respond'\n and not alreadyHasTransArg\n and self.setting('useKWsDictArgForPassingTrans'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L984_C4", "label": "isClassMethod", "type": "function", "loc": [984, 987], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "vector": [2, 1, 0.493, 0.002, 1, 0.47, 0.2222, 663, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "isClassMethod", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def isClassMethod(self):\n if self._isClassMethod is None:\n self._isClassMethod = '@classmethod' in self._decorators\n return self._isClassMethod"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L985_C8", "label": "if", "type": "if", "loc": [985, 986], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L984_C4", "vector": [4, 2, 0.493, 0.001, 2, 0.08, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._isClassMethod is None:\n self._isClassMethod = '@classmethod' in self._decorators"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L986_C12", "label": "self._isClassMethod =", "type": "assigned_variable", "loc": [986, 986], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L985_C8", "vector": [14, 3, 0.4932, 0.0005, 3, 0.71, 0.0, 827, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._isClassMethod", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._isClassMethod = '@classmethod' in self._decorators"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L987_C8", "label": "return", "type": "return", "loc": [987, 987], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L984_C4", "vector": [13, 2, 0.4937, 0.0005, 2, 0.08, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._isClassMethod"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L989_C4", "label": "isStaticMethod", "type": "function", "loc": [989, 992], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "vector": [2, 1, 0.4955, 0.002, 1, 0.47, 0.3333, 719, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "isStaticMethod", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def isStaticMethod(self):\n if self._isStaticMethod is None:\n self._isStaticMethod = '@staticmethod' in self._decorators\n return self._isStaticMethod"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L990_C8", "label": "if", "type": "if", "loc": [990, 991], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L989_C4", "vector": [4, 2, 0.4955, 0.001, 2, 0.51, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._isStaticMethod is None:\n self._isStaticMethod = '@staticmethod' in self._decorators"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L991_C12", "label": "self._isStaticMethod =", "type": "assigned_variable", "loc": [991, 991], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L990_C8", "vector": [14, 3, 0.4957, 0.0005, 3, 0.66, 0.0, 743, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._isStaticMethod", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._isStaticMethod = '@staticmethod' in self._decorators"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L992_C8", "label": "return", "type": "return", "loc": [992, 992], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L989_C4", "vector": [13, 2, 0.4962, 0.0005, 2, 0.51, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._isStaticMethod"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "label": "cleanupState", "type": "function", "loc": [994, 1028], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "vector": [2, 1, 0.5058, 0.0175, 1, 0.47, 0.4444, 776, 0, 1, 0, 0, 0, 0, 20], "semantic": {"name": "cleanupState", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def cleanupState(self):\n MethodCompiler.cleanupState(self)\n self.commitStrConst()\n if self._cacheRegionsStack:\n self.endCacheRegion()\n if self._callRegionsStack:\n self.endCallRegion()\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L995_C8", "label": "cleanupState()", "type": "expression", "loc": [995, 995], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "vector": [8, 2, 0.4977, 0.0005, 2, 0.28, 0.0, 776, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "cleanupState", "arg_names": [], "import_names": [], "rhs_call_name": "cleanupState", "annotation": ""}, "snippet": " MethodCompiler.cleanupState(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L996_C8", "label": "commitStrConst()", "type": "expression", "loc": [996, 996], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "vector": [8, 2, 0.4982, 0.0005, 2, 0.28, 0.1, 212, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "commitStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "commitStrConst", "annotation": ""}, "snippet": " self.commitStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L997_C8", "label": "if", "type": "if", "loc": [997, 998], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "vector": [4, 2, 0.499, 0.001, 2, 0.28, 0.2, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._cacheRegionsStack:\n self.endCacheRegion()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L998_C12", "label": "endCacheRegion()", "type": "expression", "loc": [998, 998], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L997_C8", "vector": [8, 3, 0.4992, 0.0005, 3, 0.44, 0.0, 281, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "endCacheRegion", "arg_names": [], "import_names": [], "rhs_call_name": "endCacheRegion", "annotation": ""}, "snippet": " self.endCacheRegion()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L999_C8", "label": "if", "type": "if", "loc": [999, 1000], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "vector": [4, 2, 0.5, 0.001, 2, 0.28, 0.3, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._callRegionsStack:\n self.endCallRegion()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1000_C12", "label": "endCallRegion()", "type": "expression", "loc": [1000, 1000], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L999_C8", "vector": [8, 3, 0.5003, 0.0005, 3, 0.29, 0.0, 789, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "endCallRegion", "arg_names": [], "import_names": [], "rhs_call_name": "endCallRegion", "annotation": ""}, "snippet": " self.endCallRegion()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1002_C8", "label": "if", "type": "if", "loc": [1002, 1021], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "vector": [4, 2, 0.506, 0.01, 2, 0.28, 0.4, 0, 7, 0, 0, 0, 0, 0, 12], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._streamingEnabled:\n kwargsName = None\n positionalArgsListName = None\n for argname, defval in self._argStringList:\n if argname.strip().startswith('**'):\n kwargsName = argname.strip().replace('**', '')\n break\n elif argname.strip().startswith('*'):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1003_C12", "label": "kwargsName =", "type": "assigned_variable", "loc": [1003, 1003], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1002_C8", "vector": [14, 3, 0.5018, 0.0005, 3, 0.93, 0.0, 362, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "kwargsName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " kwargsName = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1004_C12", "label": "positionalArgsListName =", "type": "assigned_variable", "loc": [1004, 1004], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1002_C8", "vector": [14, 3, 0.5023, 0.0005, 3, 0.93, 0.2, 507, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "positionalArgsListName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " positionalArgsListName = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1005_C12", "label": "for argname, defval", "type": "for", "loc": [1005, 1010], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1002_C8", "vector": [6, 3, 0.504, 0.003, 3, 0.93, 0.4, 634, 7, 0, 0, 0, 0, 0, 8], "semantic": {"name": "argname, defval", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for argname, defval in self._argStringList:\n if argname.strip().startswith('**'):\n kwargsName = argname.strip().replace('**', '')\n break\n elif argname.strip().startswith('*'):\n positionalArgsListName = argname.strip().replace('*', '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1006_C16", "label": "if", "type": "if", "loc": [1006, 1010], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1005_C12", "vector": [4, 4, 0.5043, 0.0025, 4, 0.49, 0.0, 0, 3, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if argname.strip().startswith('**'):\n kwargsName = argname.strip().replace('**', '')\n break\n elif argname.strip().startswith('*'):\n positionalArgsListName = argname.strip().replace('*', '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1007_C20", "label": "kwargsName = replace()", "type": "assigned_variable", "loc": [1007, 1007], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1006_C16", "vector": [14, 5, 0.5038, 0.0005, 5, 0.76, 0.0, 362, 3, 2, 0, 0, 293, 10, 2], "semantic": {"name": "kwargsName", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " kwargsName = argname.strip().replace('**', '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1009_C16", "label": "if", "type": "if", "loc": [1009, 1010], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1006_C16", "vector": [4, 5, 0.505, 0.001, 5, 0.76, 1.0, 0, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif argname.strip().startswith('*'):\n positionalArgsListName = argname.strip().replace('*', '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1010_C20", "label": "positionalArgsListName = replace()", "type": "assigned_variable", "loc": [1010, 1010], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1009_C16", "vector": [14, 6, 0.5053, 0.0005, 6, 0.41, 0.0, 507, 3, 2, 0, 0, 293, 10, 2], "semantic": {"name": "positionalArgsListName", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " positionalArgsListName = argname.strip().replace('*', '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1012_C12", "label": "if", "type": "if", "loc": [1012, 1014], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1002_C8", "vector": [4, 3, 0.5068, 0.0015, 3, 0.93, 0.6, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not kwargsName and self._useKWsDictArgForPassingTrans():\n kwargsName = 'KWS'\n self.addMethArg('**KWS', None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1013_C16", "label": "kwargsName =", "type": "assigned_variable", "loc": [1013, 1013], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1012_C12", "vector": [14, 4, 0.5068, 0.0005, 4, 0.39, 0.0, 362, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "kwargsName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " kwargsName = 'KWS'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1014_C16", "label": "addMethArg()", "type": "expression", "loc": [1014, 1014], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1012_C12", "vector": [8, 4, 0.5073, 0.0005, 4, 0.39, 1.0, 714, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addMethArg", "arg_names": [], "import_names": [], "rhs_call_name": "addMethArg", "annotation": ""}, "snippet": " self.addMethArg('**KWS', None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1015_C12", "label": "self._kwargsName =", "type": "assigned_variable", "loc": [1015, 1015], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1002_C8", "vector": [14, 3, 0.5078, 0.0005, 3, 0.93, 0.8, 912, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._kwargsName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._kwargsName = kwargsName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1017_C12", "label": "if", "type": "if", "loc": [1017, 1021], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1002_C8", "vector": [4, 3, 0.5098, 0.0025, 3, 0.93, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self._useKWsDictArgForPassingTrans():\n if not kwargsName and not positionalArgsListName:\n self.addMethArg('trans', 'None') \n else:\n self._streamingEnabled = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1018_C16", "label": "if", "type": "if", "loc": [1018, 1021], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1017_C12", "vector": [4, 4, 0.51, 0.002, 4, 0.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not kwargsName and not positionalArgsListName:\n self.addMethArg('trans', 'None') \n else:\n self._streamingEnabled = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1019_C20", "label": "addMethArg()", "type": "expression", "loc": [1019, 1019], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1018_C16", "vector": [8, 5, 0.5098, 0.0005, 5, 0.56, 0.0, 714, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addMethArg", "arg_names": [], "import_names": [], "rhs_call_name": "addMethArg", "annotation": ""}, "snippet": " self.addMethArg('trans', 'None') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1021_C20", "label": "self._streamingEnabled =", "type": "assigned_variable", "loc": [1021, 1021], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1018_C16", "vector": [14, 5, 0.5108, 0.0005, 5, 0.56, 1.0, 626, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._streamingEnabled", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._streamingEnabled = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1023_C8", "label": "self._indentLev = setting()", "type": "assigned_variable", "loc": [1023, 1023], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "vector": [14, 2, 0.5118, 0.0005, 2, 0.28, 0.5, 122, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "self._indentLev", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " self._indentLev = self.setting('initialMethIndentLevel')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1024_C8", "label": "mainBodyChunks =", "type": "assigned_variable", "loc": [1024, 1024], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "vector": [14, 2, 0.5123, 0.0005, 2, 0.28, 0.6, 630, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "mainBodyChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " mainBodyChunks = self._methodBodyChunks"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1025_C8", "label": "self._methodBodyChunks =", "type": "assigned_variable", "loc": [1025, 1025], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "vector": [14, 2, 0.5128, 0.0005, 2, 0.28, 0.7, 605, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._methodBodyChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._methodBodyChunks = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1026_C8", "label": "_addAutoSetupCode()", "type": "expression", "loc": [1026, 1026], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "vector": [8, 2, 0.5133, 0.0005, 2, 0.28, 0.8, 939, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_addAutoSetupCode", "arg_names": [], "import_names": [], "rhs_call_name": "_addAutoSetupCode", "annotation": ""}, "snippet": " self._addAutoSetupCode()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1027_C8", "label": "extend()", "type": "expression", "loc": [1027, 1027], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "vector": [8, 2, 0.5138, 0.0005, 2, 0.28, 0.9, 660, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "extend", "arg_names": [], "import_names": [], "rhs_call_name": "extend", "annotation": ""}, "snippet": " self._methodBodyChunks.extend(mainBodyChunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1028_C8", "label": "_addAutoCleanupCode()", "type": "expression", "loc": [1028, 1028], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "vector": [8, 2, 0.5143, 0.0005, 2, 0.28, 1.0, 686, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_addAutoCleanupCode", "arg_names": [], "import_names": [], "rhs_call_name": "_addAutoCleanupCode", "annotation": ""}, "snippet": " self._addAutoCleanupCode()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "label": "_addAutoSetupCode", "type": "function", "loc": [1030, 1074], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "vector": [2, 1, 0.5263, 0.0225, 1, 0.47, 0.5556, 939, 0, 1, 0, 0, 0, 0, 36], "semantic": {"name": "_addAutoSetupCode", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _addAutoSetupCode(self):\n if self._initialMethodComment:\n self.addChunk(self._initialMethodComment)\n \n if self._streamingEnabled and not self.isClassMethod() and not self.isStaticMethod():\n if self._useKWsDictArgForPassingTrans() and self._kwargsName:\n self.addChunk('trans = %s.get(\"trans\")'%self._kwargsName) \n self.addChunk('if (not trans and not self._CHEETAH__isBuffering'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1031_C8", "label": "if", "type": "if", "loc": [1031, 1032], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "vector": [4, 2, 0.516, 0.001, 2, 0.31, 0.0, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._initialMethodComment:\n self.addChunk(self._initialMethodComment)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1032_C12", "label": "addChunk()", "type": "expression", "loc": [1032, 1032], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1031_C8", "vector": [8, 3, 0.5163, 0.0005, 3, 0.21, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(self._initialMethodComment)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "label": "if", "type": "if", "loc": [1034, 1053], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "vector": [4, 2, 0.522, 0.01, 2, 0.31, 0.125, 0, 0, 0, 0, 0, 0, 0, 18], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._streamingEnabled and not self.isClassMethod() and not self.isStaticMethod():\n if self._useKWsDictArgForPassingTrans() and self._kwargsName:\n self.addChunk('trans = %s.get(\"trans\")'%self._kwargsName) \n self.addChunk('if (not trans and not self._CHEETAH__isBuffering'\n ' and not callable(self.transaction)):')\n self.indent()\n self.addChunk('trans = self.transaction'\n ' # is None unless self.awake() was called')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1035_C12", "label": "if", "type": "if", "loc": [1035, 1036], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "vector": [4, 3, 0.518, 0.001, 3, 0.78, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._useKWsDictArgForPassingTrans() and self._kwargsName:\n self.addChunk('trans = %s.get(\"trans\")'%self._kwargsName) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1036_C16", "label": "addChunk()", "type": "expression", "loc": [1036, 1036], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1035_C12", "vector": [8, 4, 0.5183, 0.0005, 4, 0.31, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('trans = %s.get(\"trans\")'%self._kwargsName) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1037_C12", "label": "addChunk()", "type": "expression", "loc": [1037, 1038], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "vector": [8, 3, 0.519, 0.001, 3, 0.78, 0.0769, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('if (not trans and not self._CHEETAH__isBuffering'\n ' and not callable(self.transaction)):')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1039_C12", "label": "indent()", "type": "expression", "loc": [1039, 1039], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "vector": [8, 3, 0.5198, 0.0005, 3, 0.78, 0.1538, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1040_C12", "label": "addChunk()", "type": "expression", "loc": [1040, 1041], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "vector": [8, 3, 0.5205, 0.001, 3, 0.78, 0.2308, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('trans = self.transaction'\n ' # is None unless self.awake() was called')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1042_C12", "label": "dedent()", "type": "expression", "loc": [1042, 1042], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "vector": [8, 3, 0.5213, 0.0005, 3, 0.78, 0.3077, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1043_C12", "label": "addChunk()", "type": "expression", "loc": [1043, 1043], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "vector": [8, 3, 0.5218, 0.0005, 3, 0.78, 0.3846, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('if not trans:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1044_C12", "label": "indent()", "type": "expression", "loc": [1044, 1044], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "vector": [8, 3, 0.5223, 0.0005, 3, 0.78, 0.4615, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1045_C12", "label": "addChunk()", "type": "expression", "loc": [1045, 1045], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "vector": [8, 3, 0.5228, 0.0005, 3, 0.78, 0.5385, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('trans = DummyTransaction()')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1046_C12", "label": "if", "type": "if", "loc": [1046, 1047], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "vector": [4, 3, 0.5235, 0.001, 3, 0.78, 0.6154, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('autoAssignDummyTransactionToSelf'):\n self.addChunk('self.transaction = trans') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1047_C16", "label": "addChunk()", "type": "expression", "loc": [1047, 1047], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1046_C12", "vector": [8, 4, 0.5238, 0.0005, 4, 0.41, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('self.transaction = trans') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1048_C12", "label": "addChunk()", "type": "expression", "loc": [1048, 1048], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "vector": [8, 3, 0.5243, 0.0005, 3, 0.78, 0.6923, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_dummyTrans = True')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1049_C12", "label": "dedent()", "type": "expression", "loc": [1049, 1049], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "vector": [8, 3, 0.5248, 0.0005, 3, 0.78, 0.7692, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1050_C12", "label": "addChunk()", "type": "expression", "loc": [1050, 1050], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "vector": [8, 3, 0.5253, 0.0005, 3, 0.78, 0.8462, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('else: _dummyTrans = False')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1052_C12", "label": "addChunk()", "type": "expression", "loc": [1052, 1052], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "vector": [8, 3, 0.5263, 0.0005, 3, 0.78, 0.9231, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('trans = DummyTransaction()')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1053_C12", "label": "addChunk()", "type": "expression", "loc": [1053, 1053], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "vector": [8, 3, 0.5268, 0.0005, 3, 0.78, 1.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_dummyTrans = True')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1054_C8", "label": "addChunk()", "type": "expression", "loc": [1054, 1054], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "vector": [8, 2, 0.5273, 0.0005, 2, 0.31, 0.25, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('write = trans.response().write')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1055_C8", "label": "if", "type": "if", "loc": [1055, 1065], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "vector": [4, 2, 0.5303, 0.0055, 2, 0.31, 0.375, 0, 3, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('useNameMapper'):\n argNames = [arg[0] for arg in self._argStringList]\n allowSearchListAsMethArg = self.setting('allowSearchListAsMethArg') \n if allowSearchListAsMethArg and 'SL' in argNames:\n pass\n elif allowSearchListAsMethArg and 'searchList' in argNames:\n self.addChunk('SL = searchList')\n elif not self.isClassMethod() and not self.isStaticMethod():"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1056_C12", "label": "argNames =", "type": "assigned_variable", "loc": [1056, 1056], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1055_C8", "vector": [14, 3, 0.5283, 0.0005, 3, 0.08, 0.0, 700, 5, 0, 0, 0, 0, 0, 0], "semantic": {"name": "argNames", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " argNames = [arg[0] for arg in self._argStringList]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1057_C12", "label": "allowSearchListAsMethArg = setting()", "type": "assigned_variable", "loc": [1057, 1057], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1055_C8", "vector": [14, 3, 0.5288, 0.0005, 3, 0.08, 0.5, 397, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "allowSearchListAsMethArg", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " allowSearchListAsMethArg = self.setting('allowSearchListAsMethArg') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1058_C12", "label": "if", "type": "if", "loc": [1058, 1065], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1055_C8", "vector": [4, 3, 0.531, 0.004, 3, 0.08, 1.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if allowSearchListAsMethArg and 'SL' in argNames:\n pass\n elif allowSearchListAsMethArg and 'searchList' in argNames:\n self.addChunk('SL = searchList')\n elif not self.isClassMethod() and not self.isStaticMethod():\n self.addChunk('SL = self._CHEETAH__searchList') \n else:\n self.addChunk('SL = [KWS]')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1060_C12", "label": "if", "type": "if", "loc": [1060, 1065], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1058_C12", "vector": [4, 4, 0.5315, 0.003, 4, 0.25, 0.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif allowSearchListAsMethArg and 'searchList' in argNames:\n self.addChunk('SL = searchList')\n elif not self.isClassMethod() and not self.isStaticMethod():\n self.addChunk('SL = self._CHEETAH__searchList') \n else:\n self.addChunk('SL = [KWS]')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1061_C16", "label": "addChunk()", "type": "expression", "loc": [1061, 1061], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1060_C12", "vector": [8, 5, 0.5308, 0.0005, 5, 0.73, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('SL = searchList')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1062_C12", "label": "if", "type": "if", "loc": [1062, 1065], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1060_C12", "vector": [4, 5, 0.532, 0.002, 5, 0.73, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif not self.isClassMethod() and not self.isStaticMethod():\n self.addChunk('SL = self._CHEETAH__searchList') \n else:\n self.addChunk('SL = [KWS]')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1063_C16", "label": "addChunk()", "type": "expression", "loc": [1063, 1063], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1062_C12", "vector": [8, 6, 0.5318, 0.0005, 6, 0.9, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('SL = self._CHEETAH__searchList') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1065_C16", "label": "addChunk()", "type": "expression", "loc": [1065, 1065], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1062_C12", "vector": [8, 6, 0.5328, 0.0005, 6, 0.9, 1.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('SL = [KWS]')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1066_C8", "label": "if", "type": "if", "loc": [1066, 1070], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "vector": [4, 2, 0.5343, 0.0025, 2, 0.31, 0.5, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('useFilters'):\n if self.isClassMethod() or self.isStaticMethod():\n self.addChunk('_filter = lambda x, **kwargs: unicode(x)')\n else:\n self.addChunk('_filter = self._CHEETAH__currentFilter')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1067_C12", "label": "if", "type": "if", "loc": [1067, 1070], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1066_C8", "vector": [4, 3, 0.5345, 0.002, 3, 0.08, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.isClassMethod() or self.isStaticMethod():\n self.addChunk('_filter = lambda x, **kwargs: unicode(x)')\n else:\n self.addChunk('_filter = self._CHEETAH__currentFilter')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1068_C16", "label": "addChunk()", "type": "expression", "loc": [1068, 1068], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1067_C12", "vector": [8, 4, 0.5343, 0.0005, 4, 0.43, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_filter = lambda x, **kwargs: unicode(x)')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1070_C16", "label": "addChunk()", "type": "expression", "loc": [1070, 1070], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1067_C12", "vector": [8, 4, 0.5353, 0.0005, 4, 0.43, 1.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('_filter = self._CHEETAH__currentFilter')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1071_C8", "label": "addChunk()", "type": "expression", "loc": [1071, 1071], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "vector": [8, 2, 0.5358, 0.0005, 2, 0.31, 0.625, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1072_C8", "label": "addChunk()", "type": "expression", "loc": [1072, 1072], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "vector": [8, 2, 0.5363, 0.0005, 2, 0.31, 0.75, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(\"#\" *40)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1073_C8", "label": "addChunk()", "type": "expression", "loc": [1073, 1073], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "vector": [8, 2, 0.5368, 0.0005, 2, 0.31, 0.875, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('## START - generated method body')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1074_C8", "label": "addChunk()", "type": "expression", "loc": [1074, 1074], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "vector": [8, 2, 0.5373, 0.0005, 2, 0.31, 1.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1076_C4", "label": "_addAutoCleanupCode", "type": "function", "loc": [1076, 1084], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "vector": [2, 1, 0.5403, 0.0045, 1, 0.47, 0.6667, 686, 0, 1, 0, 0, 0, 0, 6], "semantic": {"name": "_addAutoCleanupCode", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _addAutoCleanupCode(self):\n self.addChunk('')\n self.addChunk(\"#\" *40)\n self.addChunk('## END - generated method body')\n self.addChunk('')\n\n if not self._isGenerator:\n self.addStop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1077_C8", "label": "addChunk()", "type": "expression", "loc": [1077, 1077], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1076_C4", "vector": [8, 2, 0.5388, 0.0005, 2, 0.65, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1078_C8", "label": "addChunk()", "type": "expression", "loc": [1078, 1078], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1076_C4", "vector": [8, 2, 0.5393, 0.0005, 2, 0.65, 0.2, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(\"#\" *40)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1079_C8", "label": "addChunk()", "type": "expression", "loc": [1079, 1079], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1076_C4", "vector": [8, 2, 0.5398, 0.0005, 2, 0.65, 0.4, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('## END - generated method body')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1080_C8", "label": "addChunk()", "type": "expression", "loc": [1080, 1080], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1076_C4", "vector": [8, 2, 0.5403, 0.0005, 2, 0.65, 0.6, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1082_C8", "label": "if", "type": "if", "loc": [1082, 1083], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1076_C4", "vector": [4, 2, 0.5415, 0.001, 2, 0.65, 0.8, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self._isGenerator:\n self.addStop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1083_C12", "label": "addStop()", "type": "expression", "loc": [1083, 1083], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1082_C8", "vector": [8, 3, 0.5418, 0.0005, 3, 0.7, 0.0, 699, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "addStop", "arg_names": [], "import_names": [], "rhs_call_name": "addStop", "annotation": ""}, "snippet": " self.addStop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1084_C8", "label": "addChunk()", "type": "expression", "loc": [1084, 1084], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1076_C4", "vector": [8, 2, 0.5423, 0.0005, 2, 0.65, 1.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1086_C4", "label": "addStop", "type": "function", "loc": [1086, 1087], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "vector": [2, 1, 0.5435, 0.001, 1, 0.47, 0.7778, 699, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addStop", "arg_names": ["self", "expr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addStop(self, expr=None):\n self.addChunk('return _dummyTrans and trans.response().getvalue() or \"\"')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1087_C8", "label": "addChunk()", "type": "expression", "loc": [1087, 1087], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1086_C4", "vector": [8, 2, 0.5438, 0.0005, 2, 0.36, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('return _dummyTrans and trans.response().getvalue() or \"\"')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1089_C4", "label": "addMethArg", "type": "function", "loc": [1089, 1090], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "vector": [2, 1, 0.545, 0.001, 1, 0.47, 0.8889, 714, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addMethArg", "arg_names": ["self", "name", "defVal"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addMethArg(self, name, defVal=None):\n self._argStringList.append( (name, defVal) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1090_C8", "label": "append()", "type": "expression", "loc": [1090, 1090], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1089_C4", "vector": [8, 2, 0.5453, 0.0005, 2, 0.94, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._argStringList.append( (name, defVal) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1092_C4", "label": "methodSignature", "type": "function", "loc": [1092, 1113], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "vector": [2, 1, 0.5515, 0.011, 1, 0.47, 1.0, 886, 0, 1, 1, 0, 0, 0, 9], "semantic": {"name": "methodSignature", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def methodSignature(self):\n argStringChunks = []\n for arg in self._argStringList:\n chunk = arg[0]\n if chunk == 'self' and self.isClassMethod():\n chunk = 'cls'\n if chunk == 'self' and self.isStaticMethod():\n # Skip the \"self\" method for @staticmethod decorators"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1093_C8", "label": "argStringChunks =", "type": "assigned_variable", "loc": [1093, 1093], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1092_C4", "vector": [14, 2, 0.5468, 0.0005, 2, 0.26, 0.0, 902, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "argStringChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " argStringChunks = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1094_C8", "label": "for arg", "type": "for", "loc": [1094, 1103], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1092_C4", "vector": [6, 2, 0.5495, 0.005, 2, 0.26, 0.1667, 447, 7, 0, 0, 0, 0, 0, 3], "semantic": {"name": "arg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for arg in self._argStringList:\n chunk = arg[0]\n if chunk == 'self' and self.isClassMethod():\n chunk = 'cls'\n if chunk == 'self' and self.isStaticMethod():\n # Skip the \"self\" method for @staticmethod decorators\n continue\n if not arg[1] == None:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1095_C12", "label": "chunk =", "type": "assigned_variable", "loc": [1095, 1095], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1094_C8", "vector": [14, 3, 0.5478, 0.0005, 3, 0.11, 0.0, 637, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "chunk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " chunk = arg[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1096_C12", "label": "if", "type": "if", "loc": [1096, 1097], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1094_C8", "vector": [4, 3, 0.5485, 0.001, 3, 0.11, 0.25, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if chunk == 'self' and self.isClassMethod():\n chunk = 'cls'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1097_C16", "label": "chunk =", "type": "assigned_variable", "loc": [1097, 1097], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1096_C12", "vector": [14, 4, 0.5488, 0.0005, 4, 0.89, 0.0, 637, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "chunk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " chunk = 'cls'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1098_C12", "label": "if", "type": "if", "loc": [1098, 1100], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1094_C8", "vector": [4, 3, 0.5498, 0.0015, 3, 0.11, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if chunk == 'self' and self.isStaticMethod():\n # Skip the \"self\" method for @staticmethod decorators\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1101_C12", "label": "if", "type": "if", "loc": [1101, 1102], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1094_C8", "vector": [4, 3, 0.551, 0.001, 3, 0.11, 0.75, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not arg[1] == None:\n chunk += '=' + arg[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1103_C12", "label": "append()", "type": "expression", "loc": [1103, 1103], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1094_C8", "vector": [8, 3, 0.5518, 0.0005, 3, 0.11, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " argStringChunks.append(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1104_C8", "label": "argString = join()", "type": "assigned_variable", "loc": [1104, 1104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1092_C4", "vector": [14, 2, 0.5523, 0.0005, 2, 0.26, 0.3333, 85, 3, 1, 0, 0, 933, 10, 1], "semantic": {"name": "argString", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " argString = (', ').join(argStringChunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1106_C8", "label": "output =", "type": "assigned_variable", "loc": [1106, 1106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1092_C4", "vector": [14, 2, 0.5533, 0.0005, 2, 0.26, 0.5, 886, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "output", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " output = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1107_C8", "label": "if", "type": "if", "loc": [1107, 1109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1092_C4", "vector": [4, 2, 0.5543, 0.0015, 2, 0.26, 0.6667, 0, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._decorators:\n output.append(''.join([self._indent + decorator + '\\n'\n for decorator in self._decorators]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1108_C12", "label": "append()", "type": "expression", "loc": [1108, 1109], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1107_C8", "vector": [8, 3, 0.5545, 0.001, 3, 0.77, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " output.append(''.join([self._indent + decorator + '\\n'\n for decorator in self._decorators]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1110_C8", "label": "append()", "type": "expression", "loc": [1110, 1112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1092_C4", "vector": [8, 2, 0.5558, 0.0015, 2, 0.26, 0.8333, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " output.append(self._indent + \"def \"\n + self.methodName() + \"(\" +\n argString + \"):\\n\\n\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1113_C8", "label": "return", "type": "return", "loc": [1113, 1113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1092_C4", "vector": [13, 2, 0.5568, 0.0005, 2, 0.26, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''.join(output)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1119_C0", "label": "_initMethod_initCheetah = replace()", "type": "assigned_variable", "loc": [1119, 1126], "level": 0, "parent": null, "vector": [14, 0, 0.5615, 0.004, 0, 0.66, 0.875, 383, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "_initMethod_initCheetah", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": "_initMethod_initCheetah = \"\"\"\\\nif not self._CHEETAH__instanceInitialized:\n cheetahKWArgs = {}\n allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()\n for k,v in KWs.items():\n if k in allowedKWs: cheetahKWArgs[k] = v\n self._initCheetahInstance(**cheetahKWArgs)\n\"\"\".replace('\\n', '\\n'+' '*8)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "label": "ClassCompiler", "type": "class", "loc": [1128, 1479], "level": 0, "parent": null, "vector": [3, 0, 0.6521, 0.1761, 0, 0.66, 0.9062, 725, 0, 35, 0, 0, 137, 0, 99], "semantic": {"name": "ClassCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ClassCompiler(GenUtils):\n methodCompilerClass = AutoMethodCompiler\n methodCompilerClassForInit = MethodCompiler\n \n def __init__(self, className, mainMethodName='respond',\n moduleCompiler=None,\n fileName=None,\n settingsManager=None):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1129_C4", "label": "methodCompilerClass =", "type": "assigned_variable", "loc": [1129, 1129], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [14, 1, 0.5648, 0.0005, 1, 0.46, 0.0, 305, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "methodCompilerClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " methodCompilerClass = AutoMethodCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1130_C4", "label": "methodCompilerClassForInit =", "type": "assigned_variable", "loc": [1130, 1130], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [14, 1, 0.5653, 0.0005, 1, 0.46, 0.0278, 684, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "methodCompilerClassForInit", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " methodCompilerClassForInit = MethodCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "label": "__init__", "type": "function", "loc": [1132, 1149], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.5705, 0.009, 1, 0.46, 0.0556, 555, 0, 6, 0, 0, 0, 0, 5], "semantic": {"name": "__init__", "arg_names": ["self", "className", "mainMethodName", "moduleCompiler", "fileName", "settingsManager"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, className, mainMethodName='respond',\n moduleCompiler=None,\n fileName=None,\n settingsManager=None):\n\n self._settingsManager = settingsManager\n self._fileName = fileName\n self._className = className"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1137_C8", "label": "self._settingsManager =", "type": "assigned_variable", "loc": [1137, 1137], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "vector": [14, 2, 0.5688, 0.0005, 2, 0.42, 0.0, 626, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._settingsManager", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._settingsManager = settingsManager"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1138_C8", "label": "self._fileName =", "type": "assigned_variable", "loc": [1138, 1138], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "vector": [14, 2, 0.5693, 0.0005, 2, 0.42, 0.125, 395, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._fileName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._fileName = fileName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1139_C8", "label": "self._className =", "type": "assigned_variable", "loc": [1139, 1139], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "vector": [14, 2, 0.5698, 0.0005, 2, 0.42, 0.25, 680, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._className", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._className = className"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1140_C8", "label": "self._moduleCompiler =", "type": "assigned_variable", "loc": [1140, 1140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "vector": [14, 2, 0.5703, 0.0005, 2, 0.42, 0.375, 150, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._moduleCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._moduleCompiler = moduleCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1141_C8", "label": "self._mainMethodName =", "type": "assigned_variable", "loc": [1141, 1141], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "vector": [14, 2, 0.5708, 0.0005, 2, 0.42, 0.5, 860, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._mainMethodName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._mainMethodName = mainMethodName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1142_C8", "label": "_setupState()", "type": "expression", "loc": [1142, 1142], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "vector": [8, 2, 0.5713, 0.0005, 2, 0.42, 0.625, 611, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_setupState", "arg_names": [], "import_names": [], "rhs_call_name": "_setupState", "annotation": ""}, "snippet": " self._setupState()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1143_C8", "label": "methodCompiler = _spawnMethodCompiler()", "type": "assigned_variable", "loc": [1143, 1145], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "vector": [14, 2, 0.5723, 0.0015, 2, 0.42, 0.75, 476, 3, 2, 0, 0, 888, 10, 1], "semantic": {"name": "methodCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "_spawnMethodCompiler", "annotation": ""}, "snippet": " methodCompiler = self._spawnMethodCompiler(\n mainMethodName,\n initialMethodComment='## CHEETAH: main method generated for this template')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1147_C8", "label": "_setActiveMethodCompiler()", "type": "expression", "loc": [1147, 1147], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "vector": [8, 2, 0.5738, 0.0005, 2, 0.42, 0.875, 854, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_setActiveMethodCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "_setActiveMethodCompiler", "annotation": ""}, "snippet": " self._setActiveMethodCompiler(methodCompiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1148_C8", "label": "if", "type": "if", "loc": [1148, 1149], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "vector": [4, 2, 0.5745, 0.001, 2, 0.42, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if fileName and self.setting('monitorSrcFile'):\n self._addSourceFileMonitoring(fileName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1149_C12", "label": "_addSourceFileMonitoring()", "type": "expression", "loc": [1149, 1149], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1148_C8", "vector": [8, 3, 0.5748, 0.0005, 3, 0.32, 0.0, 777, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_addSourceFileMonitoring", "arg_names": [], "import_names": [], "rhs_call_name": "_addSourceFileMonitoring", "annotation": ""}, "snippet": " self._addSourceFileMonitoring(fileName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1151_C4", "label": "setting", "type": "function", "loc": [1151, 1152], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.576, 0.001, 1, 0.46, 0.0833, 368, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "setting", "arg_names": ["self", "key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setting(self, key):\n return self._settingsManager.setting(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1152_C8", "label": "return", "type": "return", "loc": [1152, 1152], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1151_C4", "vector": [13, 2, 0.5763, 0.0005, 2, 0.12, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._settingsManager.setting(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1154_C4", "label": "__getattr__", "type": "function", "loc": [1154, 1170], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.5813, 0.0085, 1, 0.46, 0.1111, 210, 0, 2, 1, 0, 0, 0, 5], "semantic": {"name": "__getattr__", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __getattr__(self, name):\n \"\"\"Provide access to the methods and attributes of the MethodCompiler\n at the top of the activeMethods stack: one-way namespace sharing\n\n \n WARNING: Use .setMethods to assign the attributes of the MethodCompiler\n from the methods of this class!!! or you will be assigning to attributes\n of this object instead.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1155_C8", "label": "expression", "type": "expression", "loc": [1155, 1161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1154_C4", "vector": [8, 2, 0.5793, 0.0035, 2, 0.89, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Provide access to the methods and attributes of the MethodCompiler\n at the top of the activeMethods stack: one-way namespace sharing\n\n \n WARNING: Use .setMethods to assign the attributes of the MethodCompiler\n from the methods of this class!!! or you will be assigning to attributes\n of this object instead.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1163_C8", "label": "if", "type": "if", "loc": [1163, 1170], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1154_C4", "vector": [4, 2, 0.5835, 0.004, 2, 0.89, 1.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name in self.__dict__:\n return self.__dict__[name]\n elif hasattr(self.__class__, name):\n return getattr(self.__class__, name)\n elif self._activeMethodsList and hasattr(self._activeMethodsList[-1], name):\n return getattr(self._activeMethodsList[-1], name)\n else:\n raise AttributeError(name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1164_C12", "label": "return", "type": "return", "loc": [1164, 1164], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1163_C8", "vector": [13, 3, 0.5823, 0.0005, 3, 0.35, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.__dict__[name]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1165_C8", "label": "if", "type": "if", "loc": [1165, 1170], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1163_C8", "vector": [4, 3, 0.584, 0.003, 3, 0.35, 1.0, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif hasattr(self.__class__, name):\n return getattr(self.__class__, name)\n elif self._activeMethodsList and hasattr(self._activeMethodsList[-1], name):\n return getattr(self._activeMethodsList[-1], name)\n else:\n raise AttributeError(name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1166_C12", "label": "return", "type": "return", "loc": [1166, 1166], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1165_C8", "vector": [13, 4, 0.5833, 0.0005, 4, 0.51, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return getattr(self.__class__, name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1167_C8", "label": "if", "type": "if", "loc": [1167, 1170], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1165_C8", "vector": [4, 4, 0.5845, 0.002, 4, 0.51, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self._activeMethodsList and hasattr(self._activeMethodsList[-1], name):\n return getattr(self._activeMethodsList[-1], name)\n else:\n raise AttributeError(name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1168_C12", "label": "return", "type": "return", "loc": [1168, 1168], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1167_C8", "vector": [13, 5, 0.5843, 0.0005, 5, 0.34, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return getattr(self._activeMethodsList[-1], name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "label": "_setupState", "type": "function", "loc": [1172, 1199], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.593, 0.014, 1, 0.46, 0.1389, 611, 0, 1, 0, 0, 0, 0, 10], "semantic": {"name": "_setupState", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _setupState(self):\n self._classDef = None\n self._decoratorsForNextMethod = []\n self._activeMethodsList = [] # stack while parsing/generating\n self._finishedMethodsList = [] # store by order\n self._methodsIndex = {} # store by name\n self._baseClass = 'Template'\n self._classDocStringLines = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1173_C8", "label": "self._classDef =", "type": "assigned_variable", "loc": [1173, 1173], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [14, 2, 0.5868, 0.0005, 2, 0.93, 0.0, 345, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._classDef", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._classDef = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1174_C8", "label": "self._decoratorsForNextMethod =", "type": "assigned_variable", "loc": [1174, 1174], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [14, 2, 0.5873, 0.0005, 2, 0.93, 0.0588, 994, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._decoratorsForNextMethod", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._decoratorsForNextMethod = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1175_C8", "label": "self._activeMethodsList =", "type": "assigned_variable", "loc": [1175, 1175], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [14, 2, 0.5878, 0.0005, 2, 0.93, 0.1176, 841, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._activeMethodsList", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._activeMethodsList = [] # stack while parsing/generating"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1176_C8", "label": "self._finishedMethodsList =", "type": "assigned_variable", "loc": [1176, 1176], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [14, 2, 0.5883, 0.0005, 2, 0.93, 0.1765, 171, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._finishedMethodsList", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._finishedMethodsList = [] # store by order"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1177_C8", "label": "self._methodsIndex =", "type": "assigned_variable", "loc": [1177, 1177], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [14, 2, 0.5888, 0.0005, 2, 0.93, 0.2353, 586, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._methodsIndex", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._methodsIndex = {} # store by name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1178_C8", "label": "self._baseClass =", "type": "assigned_variable", "loc": [1178, 1178], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [14, 2, 0.5893, 0.0005, 2, 0.93, 0.2941, 680, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self._baseClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._baseClass = 'Template'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1179_C8", "label": "self._classDocStringLines =", "type": "assigned_variable", "loc": [1179, 1179], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [14, 2, 0.5898, 0.0005, 2, 0.93, 0.3529, 677, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._classDocStringLines", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._classDocStringLines = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1181_C8", "label": "self._generatedAttribs =", "type": "assigned_variable", "loc": [1181, 1181], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [14, 2, 0.5908, 0.0005, 2, 0.93, 0.4118, 242, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._generatedAttribs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._generatedAttribs = ['_CHEETAH__instanceInitialized = False']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1182_C8", "label": "append()", "type": "expression", "loc": [1182, 1182], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [8, 2, 0.5913, 0.0005, 2, 0.93, 0.4706, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._generatedAttribs.append('_CHEETAH_version = __CHEETAH_version__')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1183_C8", "label": "append()", "type": "expression", "loc": [1183, 1184], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [8, 2, 0.592, 0.001, 2, 0.93, 0.5294, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._generatedAttribs.append(\n '_CHEETAH_versionTuple = __CHEETAH_versionTuple__')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1186_C8", "label": "if", "type": "if", "loc": [1186, 1188], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [4, 2, 0.5938, 0.0015, 2, 0.93, 0.5882, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('addTimestampsToCompilerOutput'):\n self._generatedAttribs.append('_CHEETAH_genTime = __CHEETAH_genTime__')\n self._generatedAttribs.append('_CHEETAH_genTimestamp = __CHEETAH_genTimestamp__')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1187_C12", "label": "append()", "type": "expression", "loc": [1187, 1187], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1186_C8", "vector": [8, 3, 0.5938, 0.0005, 3, 0.48, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._generatedAttribs.append('_CHEETAH_genTime = __CHEETAH_genTime__')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1188_C12", "label": "append()", "type": "expression", "loc": [1188, 1188], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1186_C8", "vector": [8, 3, 0.5943, 0.0005, 3, 0.48, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._generatedAttribs.append('_CHEETAH_genTimestamp = __CHEETAH_genTimestamp__')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1190_C8", "label": "append()", "type": "expression", "loc": [1190, 1190], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [8, 2, 0.5953, 0.0005, 2, 0.93, 0.6471, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._generatedAttribs.append('_CHEETAH_src = __CHEETAH_src__')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1191_C8", "label": "append()", "type": "expression", "loc": [1191, 1192], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [8, 2, 0.596, 0.001, 2, 0.93, 0.7059, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._generatedAttribs.append(\n '_CHEETAH_srcLastModified = __CHEETAH_srcLastModified__')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1194_C8", "label": "if", "type": "if", "loc": [1194, 1195], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [4, 2, 0.5975, 0.001, 2, 0.93, 0.7647, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('templateMetaclass'):\n self._generatedAttribs.append('__metaclass__ = '+self.setting('templateMetaclass'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1195_C12", "label": "append()", "type": "expression", "loc": [1195, 1195], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1194_C8", "vector": [8, 3, 0.5978, 0.0005, 3, 0.24, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._generatedAttribs.append('__metaclass__ = '+self.setting('templateMetaclass'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1196_C8", "label": "self._initMethChunks =", "type": "assigned_variable", "loc": [1196, 1196], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [14, 2, 0.5983, 0.0005, 2, 0.93, 0.8235, 15, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._initMethChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._initMethChunks = [] "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1197_C8", "label": "self._blockMetaData =", "type": "assigned_variable", "loc": [1197, 1197], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [14, 2, 0.5988, 0.0005, 2, 0.93, 0.8824, 369, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._blockMetaData", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._blockMetaData = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1198_C8", "label": "self._errorCatcherCount =", "type": "assigned_variable", "loc": [1198, 1198], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [14, 2, 0.5993, 0.0005, 2, 0.93, 0.9412, 297, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self._errorCatcherCount", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._errorCatcherCount = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1199_C8", "label": "self._placeholderToErrorCatcherMap =", "type": "assigned_variable", "loc": [1199, 1199], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "vector": [14, 2, 0.5998, 0.0005, 2, 0.93, 1.0, 479, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._placeholderToErrorCatcherMap", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._placeholderToErrorCatcherMap = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1201_C4", "label": "cleanupState", "type": "function", "loc": [1201, 1210], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6031, 0.005, 1, 0.46, 0.1667, 776, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "cleanupState", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def cleanupState(self):\n while self._activeMethodsList:\n methCompiler = self._popActiveMethodCompiler()\n self._swallowMethodCompiler(methCompiler)\n self._setupInitMethod()\n if self._mainMethodName == 'respond':\n if self.setting('setup__str__method'):\n self._generatedAttribs.append('def __str__(self): return self.respond()')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L1202_C8", "label": "while", "type": "while", "loc": [1202, 1204], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1201_C4", "vector": [5, 2, 0.6018, 0.0015, 2, 0.4, 0.0, 0, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while self._activeMethodsList:\n methCompiler = self._popActiveMethodCompiler()\n self._swallowMethodCompiler(methCompiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1203_C12", "label": "methCompiler = _popActiveMethodCompiler()", "type": "assigned_variable", "loc": [1203, 1203], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L1202_C8", "vector": [14, 3, 0.6018, 0.0005, 3, 0.28, 0.0, 251, 3, 0, 0, 0, 680, 10, 1], "semantic": {"name": "methCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "_popActiveMethodCompiler", "annotation": ""}, "snippet": " methCompiler = self._popActiveMethodCompiler()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1204_C12", "label": "_swallowMethodCompiler()", "type": "expression", "loc": [1204, 1204], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L1202_C8", "vector": [8, 3, 0.6023, 0.0005, 3, 0.28, 1.0, 475, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_swallowMethodCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "_swallowMethodCompiler", "annotation": ""}, "snippet": " self._swallowMethodCompiler(methCompiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1205_C8", "label": "_setupInitMethod()", "type": "expression", "loc": [1205, 1205], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1201_C4", "vector": [8, 2, 0.6028, 0.0005, 2, 0.4, 0.3333, 806, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_setupInitMethod", "arg_names": [], "import_names": [], "rhs_call_name": "_setupInitMethod", "annotation": ""}, "snippet": " self._setupInitMethod()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1206_C8", "label": "if", "type": "if", "loc": [1206, 1208], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1201_C4", "vector": [4, 2, 0.6038, 0.0015, 2, 0.4, 0.6667, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._mainMethodName == 'respond':\n if self.setting('setup__str__method'):\n self._generatedAttribs.append('def __str__(self): return self.respond()')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1207_C12", "label": "if", "type": "if", "loc": [1207, 1208], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1206_C8", "vector": [4, 3, 0.6041, 0.001, 3, 0.67, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('setup__str__method'):\n self._generatedAttribs.append('def __str__(self): return self.respond()')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1208_C16", "label": "append()", "type": "expression", "loc": [1208, 1208], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1207_C12", "vector": [8, 4, 0.6043, 0.0005, 4, 0.21, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._generatedAttribs.append('def __str__(self): return self.respond()')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1209_C8", "label": "addAttribute()", "type": "expression", "loc": [1209, 1210], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1201_C4", "vector": [8, 2, 0.6051, 0.001, 2, 0.4, 1.0, 333, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addAttribute", "arg_names": [], "import_names": [], "rhs_call_name": "addAttribute", "annotation": ""}, "snippet": " self.addAttribute('_mainCheetahMethod_for_' + self._className +\n '= ' + repr(self._mainMethodName) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1212_C4", "label": "_setupInitMethod", "type": "function", "loc": [1212, 1221], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6086, 0.005, 1, 0.46, 0.1944, 806, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "_setupInitMethod", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _setupInitMethod(self):\n __init__ = self._spawnMethodCompiler('__init__',\n klass=self.methodCompilerClassForInit)\n __init__.setMethodSignature(\"def __init__(self, *args, **KWs)\")\n __init__.addChunk('super(%s, self).__init__(*args, **KWs)' % self._className)\n __init__.addChunk(_initMethod_initCheetah % {'className' : self._className})\n for chunk in self._initMethChunks:\n __init__.addChunk(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1213_C8", "label": "__init__ = _spawnMethodCompiler()", "type": "assigned_variable", "loc": [1213, 1214], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1212_C4", "vector": [14, 2, 0.6071, 0.001, 2, 0.37, 0.0, 555, 3, 2, 0, 0, 888, 10, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "_spawnMethodCompiler", "annotation": ""}, "snippet": " __init__ = self._spawnMethodCompiler('__init__',\n klass=self.methodCompilerClassForInit)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1215_C8", "label": "setMethodSignature()", "type": "expression", "loc": [1215, 1215], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1212_C4", "vector": [8, 2, 0.6078, 0.0005, 2, 0.37, 0.1667, 668, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setMethodSignature", "arg_names": [], "import_names": [], "rhs_call_name": "setMethodSignature", "annotation": ""}, "snippet": " __init__.setMethodSignature(\"def __init__(self, *args, **KWs)\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1216_C8", "label": "addChunk()", "type": "expression", "loc": [1216, 1216], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1212_C4", "vector": [8, 2, 0.6083, 0.0005, 2, 0.37, 0.3333, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " __init__.addChunk('super(%s, self).__init__(*args, **KWs)' % self._className)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1217_C8", "label": "addChunk()", "type": "expression", "loc": [1217, 1217], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1212_C4", "vector": [8, 2, 0.6088, 0.0005, 2, 0.37, 0.5, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " __init__.addChunk(_initMethod_initCheetah % {'className' : self._className})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1218_C8", "label": "for chunk", "type": "for", "loc": [1218, 1219], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1212_C4", "vector": [6, 2, 0.6096, 0.001, 2, 0.37, 0.6667, 637, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "chunk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for chunk in self._initMethChunks:\n __init__.addChunk(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1219_C12", "label": "addChunk()", "type": "expression", "loc": [1219, 1219], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1218_C8", "vector": [8, 3, 0.6098, 0.0005, 3, 0.65, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " __init__.addChunk(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1220_C8", "label": "cleanupState()", "type": "expression", "loc": [1220, 1220], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1212_C4", "vector": [8, 2, 0.6103, 0.0005, 2, 0.37, 0.8333, 776, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "cleanupState", "arg_names": [], "import_names": [], "rhs_call_name": "cleanupState", "annotation": ""}, "snippet": " __init__.cleanupState()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1221_C8", "label": "_swallowMethodCompiler()", "type": "expression", "loc": [1221, 1221], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1212_C4", "vector": [8, 2, 0.6108, 0.0005, 2, 0.37, 1.0, 475, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_swallowMethodCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "_swallowMethodCompiler", "annotation": ""}, "snippet": " self._swallowMethodCompiler(__init__, pos=0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "label": "_addSourceFileMonitoring", "type": "function", "loc": [1223, 1238], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6156, 0.008, 1, 0.46, 0.2222, 777, 0, 2, 0, 0, 0, 0, 11], "semantic": {"name": "_addSourceFileMonitoring", "arg_names": ["self", "fileName"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _addSourceFileMonitoring(self, fileName):\n # @@TR: this stuff needs auditing for Cheetah 2.0 \n # the first bit is added to init\n self.addChunkToInit('self._filePath = ' + repr(fileName))\n self.addChunkToInit('self._fileMtime = ' + str(getmtime(fileName)) )\n\n # the rest is added to the main output method of the class ('mainMethod')\n self.addChunk('if exists(self._filePath) and ' +"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1226_C8", "label": "addChunkToInit()", "type": "expression", "loc": [1226, 1226], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "vector": [8, 2, 0.6133, 0.0005, 2, 0.71, 0.0, 675, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addChunkToInit", "arg_names": [], "import_names": [], "rhs_call_name": "addChunkToInit", "annotation": ""}, "snippet": " self.addChunkToInit('self._filePath = ' + repr(fileName))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1227_C8", "label": "addChunkToInit()", "type": "expression", "loc": [1227, 1227], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "vector": [8, 2, 0.6138, 0.0005, 2, 0.71, 0.1429, 675, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "addChunkToInit", "arg_names": [], "import_names": [], "rhs_call_name": "addChunkToInit", "annotation": ""}, "snippet": " self.addChunkToInit('self._fileMtime = ' + str(getmtime(fileName)) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1230_C8", "label": "addChunk()", "type": "expression", "loc": [1230, 1231], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "vector": [8, 2, 0.6156, 0.001, 2, 0.71, 0.2857, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('if exists(self._filePath) and ' +\n 'getmtime(self._filePath) > self._fileMtime:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1232_C8", "label": "indent()", "type": "expression", "loc": [1232, 1232], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "vector": [8, 2, 0.6163, 0.0005, 2, 0.71, 0.4286, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " self.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1233_C8", "label": "addChunk()", "type": "expression", "loc": [1233, 1233], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "vector": [8, 2, 0.6168, 0.0005, 2, 0.71, 0.5714, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk('self._compile(file=self._filePath, moduleName='+self._className + ')')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1234_C8", "label": "addChunk()", "type": "expression", "loc": [1234, 1236], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "vector": [8, 2, 0.6178, 0.0015, 2, 0.71, 0.7143, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(\n 'write(getattr(self, self._mainCheetahMethod_for_' + self._className +\n ')(trans=trans))') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1237_C8", "label": "addStop()", "type": "expression", "loc": [1237, 1237], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "vector": [8, 2, 0.6188, 0.0005, 2, 0.71, 0.8571, 699, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "addStop", "arg_names": [], "import_names": [], "rhs_call_name": "addStop", "annotation": ""}, "snippet": " self.addStop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1238_C8", "label": "dedent()", "type": "expression", "loc": [1238, 1238], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "vector": [8, 2, 0.6193, 0.0005, 2, 0.71, 1.0, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1240_C4", "label": "setClassName", "type": "function", "loc": [1240, 1241], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6206, 0.001, 1, 0.46, 0.25, 442, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "setClassName", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setClassName(self, name):\n self._className = name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1241_C8", "label": "self._className =", "type": "assigned_variable", "loc": [1241, 1241], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1240_C4", "vector": [14, 2, 0.6208, 0.0005, 2, 0.44, 0.0, 680, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._className", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._className = name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1243_C4", "label": "className", "type": "function", "loc": [1243, 1244], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6221, 0.001, 1, 0.46, 0.2778, 131, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "className", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def className(self):\n return self._className"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1244_C8", "label": "return", "type": "return", "loc": [1244, 1244], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1243_C4", "vector": [13, 2, 0.6223, 0.0005, 2, 0.41, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._className"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1246_C4", "label": "setBaseClass", "type": "function", "loc": [1246, 1247], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6236, 0.001, 1, 0.46, 0.3056, 143, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "setBaseClass", "arg_names": ["self", "baseClassName"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setBaseClass(self, baseClassName):\n self._baseClass = baseClassName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1247_C8", "label": "self._baseClass =", "type": "assigned_variable", "loc": [1247, 1247], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1246_C4", "vector": [14, 2, 0.6238, 0.0005, 2, 0.88, 0.0, 680, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._baseClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._baseClass = baseClassName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "label": "setMainMethodName", "type": "function", "loc": [1249, 1266], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6291, 0.009, 1, 0.46, 0.3333, 62, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "setMainMethodName", "arg_names": ["self", "methodName"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setMainMethodName(self, methodName):\n if methodName == self._mainMethodName:\n return\n ## change the name in the methodCompiler and add new reference\n mainMethod = self._methodsIndex[self._mainMethodName]\n mainMethod.setMethodName(methodName)\n self._methodsIndex[methodName] = mainMethod\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1250_C8", "label": "if", "type": "if", "loc": [1250, 1251], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "vector": [4, 2, 0.6256, 0.001, 2, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if methodName == self._mainMethodName:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1251_C12", "label": "return", "type": "return", "loc": [1251, 1251], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1250_C8", "vector": [13, 3, 0.6258, 0.0005, 3, 0.89, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1253_C8", "label": "mainMethod =", "type": "assigned_variable", "loc": [1253, 1253], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "vector": [14, 2, 0.6268, 0.0005, 2, 0.66, 0.1429, 349, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "mainMethod", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " mainMethod = self._methodsIndex[self._mainMethodName]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1254_C8", "label": "setMethodName()", "type": "expression", "loc": [1254, 1254], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "vector": [8, 2, 0.6273, 0.0005, 2, 0.66, 0.2857, 349, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setMethodName", "arg_names": [], "import_names": [], "rhs_call_name": "setMethodName", "annotation": ""}, "snippet": " mainMethod.setMethodName(methodName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1255_C8", "label": "assign", "type": "assigned_variable", "loc": [1255, 1255], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "vector": [14, 2, 0.6278, 0.0005, 2, 0.66, 0.4286, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._methodsIndex[methodName] = mainMethod"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1258_C8", "label": "chunkToChange =", "type": "assigned_variable", "loc": [1258, 1258], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "vector": [14, 2, 0.6293, 0.0005, 2, 0.66, 0.5714, 721, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "chunkToChange", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " chunkToChange = ('write(self.' + self._mainMethodName + '(trans=trans))')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1259_C8", "label": "chunks =", "type": "assigned_variable", "loc": [1259, 1259], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "vector": [14, 2, 0.6298, 0.0005, 2, 0.66, 0.7143, 284, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "chunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " chunks = mainMethod._methodBodyChunks"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1260_C8", "label": "if", "type": "if", "loc": [1260, 1263], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "vector": [4, 2, 0.6311, 0.002, 2, 0.66, 0.8571, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if chunkToChange in chunks:\n for i in range(len(chunks)):\n if chunks[i] == chunkToChange:\n chunks[i] = ('write(self.' + methodName + '(trans=trans))')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1261_C12", "label": "for i", "type": "for", "loc": [1261, 1263], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1260_C8", "vector": [6, 3, 0.6313, 0.0015, 3, 0.69, 0.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(len(chunks)):\n if chunks[i] == chunkToChange:\n chunks[i] = ('write(self.' + methodName + '(trans=trans))')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1262_C16", "label": "if", "type": "if", "loc": [1262, 1263], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1261_C12", "vector": [4, 4, 0.6316, 0.001, 4, 0.16, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if chunks[i] == chunkToChange:\n chunks[i] = ('write(self.' + methodName + '(trans=trans))')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1263_C20", "label": "assign", "type": "assigned_variable", "loc": [1263, 1263], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1262_C16", "vector": [14, 5, 0.6318, 0.0005, 5, 0.55, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " chunks[i] = ('write(self.' + methodName + '(trans=trans))')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1266_C8", "label": "self._mainMethodName =", "type": "assigned_variable", "loc": [1266, 1266], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "vector": [14, 2, 0.6333, 0.0005, 2, 0.66, 1.0, 860, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._mainMethodName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._mainMethodName = methodName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1268_C4", "label": "setMainMethodArgs", "type": "function", "loc": [1268, 1271], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6351, 0.002, 1, 0.46, 0.3611, 889, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setMainMethodArgs", "arg_names": ["self", "argsList"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setMainMethodArgs(self, argsList):\n mainMethodCompiler = self._methodsIndex[self._mainMethodName]\n for argName, defVal in argsList:\n mainMethodCompiler.addMethArg(argName, defVal)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1269_C8", "label": "mainMethodCompiler =", "type": "assigned_variable", "loc": [1269, 1269], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1268_C4", "vector": [14, 2, 0.6348, 0.0005, 2, 0.23, 0.0, 787, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "mainMethodCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " mainMethodCompiler = self._methodsIndex[self._mainMethodName]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1270_C8", "label": "for argName, defVal", "type": "for", "loc": [1270, 1271], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1268_C4", "vector": [6, 2, 0.6356, 0.001, 2, 0.23, 1.0, 654, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "argName, defVal", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for argName, defVal in argsList:\n mainMethodCompiler.addMethArg(argName, defVal)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1271_C12", "label": "addMethArg()", "type": "expression", "loc": [1271, 1271], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1270_C8", "vector": [8, 3, 0.6358, 0.0005, 3, 0.23, 0.0, 714, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addMethArg", "arg_names": [], "import_names": [], "rhs_call_name": "addMethArg", "annotation": ""}, "snippet": " mainMethodCompiler.addMethArg(argName, defVal)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1274_C4", "label": "_spawnMethodCompiler", "type": "function", "loc": [1274, 1285], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6401, 0.006, 1, 0.46, 0.3889, 888, 0, 4, 1, 0, 0, 0, 1], "semantic": {"name": "_spawnMethodCompiler", "arg_names": ["self", "methodName", "klass", "initialMethodComment"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _spawnMethodCompiler(self, methodName, klass=None, \n initialMethodComment=None):\n if klass is None:\n klass = self.methodCompilerClass\n\n decorators = self._decoratorsForNextMethod or []\n self._decoratorsForNextMethod = []\n methodCompiler = klass(methodName, classCompiler=self,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1276_C8", "label": "if", "type": "if", "loc": [1276, 1277], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1274_C4", "vector": [4, 2, 0.6386, 0.001, 2, 0.16, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if klass is None:\n klass = self.methodCompilerClass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1277_C12", "label": "klass =", "type": "assigned_variable", "loc": [1277, 1277], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1276_C8", "vector": [14, 3, 0.6388, 0.0005, 3, 0.55, 0.0, 35, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "klass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " klass = self.methodCompilerClass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1279_C8", "label": "decorators =", "type": "assigned_variable", "loc": [1279, 1279], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1274_C4", "vector": [14, 2, 0.6398, 0.0005, 2, 0.16, 0.2, 852, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "decorators", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " decorators = self._decoratorsForNextMethod or []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1280_C8", "label": "self._decoratorsForNextMethod =", "type": "assigned_variable", "loc": [1280, 1280], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1274_C4", "vector": [14, 2, 0.6403, 0.0005, 2, 0.16, 0.4, 994, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._decoratorsForNextMethod", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._decoratorsForNextMethod = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1281_C8", "label": "methodCompiler = klass()", "type": "assigned_variable", "loc": [1281, 1283], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1274_C4", "vector": [14, 2, 0.6413, 0.0015, 2, 0.16, 0.6, 476, 3, 4, 0, 0, 35, 10, 1], "semantic": {"name": "methodCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "klass", "annotation": ""}, "snippet": " methodCompiler = klass(methodName, classCompiler=self,\n decorators=decorators,\n initialMethodComment=initialMethodComment)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1284_C8", "label": "assign", "type": "assigned_variable", "loc": [1284, 1284], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1274_C4", "vector": [14, 2, 0.6423, 0.0005, 2, 0.16, 0.8, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._methodsIndex[methodName] = methodCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1285_C8", "label": "return", "type": "return", "loc": [1285, 1285], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1274_C4", "vector": [13, 2, 0.6428, 0.0005, 2, 0.16, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return methodCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1287_C4", "label": "_setActiveMethodCompiler", "type": "function", "loc": [1287, 1288], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6441, 0.001, 1, 0.46, 0.4167, 854, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_setActiveMethodCompiler", "arg_names": ["self", "methodCompiler"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _setActiveMethodCompiler(self, methodCompiler):\n self._activeMethodsList.append(methodCompiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1288_C8", "label": "append()", "type": "expression", "loc": [1288, 1288], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1287_C4", "vector": [8, 2, 0.6443, 0.0005, 2, 0.52, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._activeMethodsList.append(methodCompiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1290_C4", "label": "_getActiveMethodCompiler", "type": "function", "loc": [1290, 1291], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6456, 0.001, 1, 0.46, 0.4444, 111, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "_getActiveMethodCompiler", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _getActiveMethodCompiler(self):\n return self._activeMethodsList[-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1291_C8", "label": "return", "type": "return", "loc": [1291, 1291], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1290_C4", "vector": [13, 2, 0.6458, 0.0005, 2, 0.62, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._activeMethodsList[-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1293_C4", "label": "_popActiveMethodCompiler", "type": "function", "loc": [1293, 1294], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6471, 0.001, 1, 0.46, 0.4722, 680, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "_popActiveMethodCompiler", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _popActiveMethodCompiler(self):\n return self._activeMethodsList.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1294_C8", "label": "return", "type": "return", "loc": [1294, 1294], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1293_C4", "vector": [13, 2, 0.6473, 0.0005, 2, 0.87, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._activeMethodsList.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1296_C4", "label": "_swallowMethodCompiler", "type": "function", "loc": [1296, 1302], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6498, 0.0035, 1, 0.46, 0.5, 475, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "_swallowMethodCompiler", "arg_names": ["self", "methodCompiler", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _swallowMethodCompiler(self, methodCompiler, pos=None):\n methodCompiler.cleanupState()\n if pos==None:\n self._finishedMethodsList.append( methodCompiler )\n else:\n self._finishedMethodsList.insert(pos, methodCompiler)\n return methodCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1297_C8", "label": "cleanupState()", "type": "expression", "loc": [1297, 1297], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1296_C4", "vector": [8, 2, 0.6488, 0.0005, 2, 0.45, 0.0, 776, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "cleanupState", "arg_names": [], "import_names": [], "rhs_call_name": "cleanupState", "annotation": ""}, "snippet": " methodCompiler.cleanupState()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1298_C8", "label": "if", "type": "if", "loc": [1298, 1301], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1296_C4", "vector": [4, 2, 0.6501, 0.002, 2, 0.45, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pos==None:\n self._finishedMethodsList.append( methodCompiler )\n else:\n self._finishedMethodsList.insert(pos, methodCompiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1299_C12", "label": "append()", "type": "expression", "loc": [1299, 1299], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1298_C8", "vector": [8, 3, 0.6498, 0.0005, 3, 0.41, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._finishedMethodsList.append( methodCompiler )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1301_C12", "label": "insert()", "type": "expression", "loc": [1301, 1301], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1298_C8", "vector": [8, 3, 0.6508, 0.0005, 3, 0.41, 1.0, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self._finishedMethodsList.insert(pos, methodCompiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1302_C8", "label": "return", "type": "return", "loc": [1302, 1302], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1296_C4", "vector": [13, 2, 0.6513, 0.0005, 2, 0.45, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return methodCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1304_C4", "label": "startMethodDef", "type": "function", "loc": [1304, 1309], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6536, 0.003, 1, 0.46, 0.5278, 456, 0, 4, 0, 0, 0, 0, 3], "semantic": {"name": "startMethodDef", "arg_names": ["self", "methodName", "argsList", "parserComment"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def startMethodDef(self, methodName, argsList, parserComment):\n methodCompiler = self._spawnMethodCompiler(\n methodName, initialMethodComment=parserComment)\n self._setActiveMethodCompiler(methodCompiler) \n for argName, defVal in argsList:\n methodCompiler.addMethArg(argName, defVal)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1305_C8", "label": "methodCompiler = _spawnMethodCompiler()", "type": "assigned_variable", "loc": [1305, 1306], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1304_C4", "vector": [14, 2, 0.6531, 0.001, 2, 0.12, 0.0, 476, 3, 2, 0, 0, 888, 10, 1], "semantic": {"name": "methodCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "_spawnMethodCompiler", "annotation": ""}, "snippet": " methodCompiler = self._spawnMethodCompiler(\n methodName, initialMethodComment=parserComment)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1307_C8", "label": "_setActiveMethodCompiler()", "type": "expression", "loc": [1307, 1307], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1304_C4", "vector": [8, 2, 0.6538, 0.0005, 2, 0.12, 0.5, 854, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_setActiveMethodCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "_setActiveMethodCompiler", "annotation": ""}, "snippet": " self._setActiveMethodCompiler(methodCompiler) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1308_C8", "label": "for argName, defVal", "type": "for", "loc": [1308, 1309], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1304_C4", "vector": [6, 2, 0.6546, 0.001, 2, 0.12, 1.0, 654, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "argName, defVal", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for argName, defVal in argsList:\n methodCompiler.addMethArg(argName, defVal)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1309_C12", "label": "addMethArg()", "type": "expression", "loc": [1309, 1309], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1308_C8", "vector": [8, 3, 0.6548, 0.0005, 3, 0.5, 0.0, 714, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addMethArg", "arg_names": [], "import_names": [], "rhs_call_name": "addMethArg", "annotation": ""}, "snippet": " methodCompiler.addMethArg(argName, defVal)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1311_C4", "label": "_finishedMethods", "type": "function", "loc": [1311, 1312], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6561, 0.001, 1, 0.46, 0.5556, 674, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "_finishedMethods", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _finishedMethods(self):\n return self._finishedMethodsList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1312_C8", "label": "return", "type": "return", "loc": [1312, 1312], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1311_C4", "vector": [13, 2, 0.6563, 0.0005, 2, 0.19, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._finishedMethodsList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1314_C4", "label": "addDecorator", "type": "function", "loc": [1314, 1320], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6588, 0.0035, 1, 0.46, 0.5833, 200, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addDecorator", "arg_names": ["self", "decoratorExpr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addDecorator(self, decoratorExpr):\n \"\"\"Set the decorator to be used with the next method in the source.\n\n See _spawnMethodCompiler() and MethodCompiler for the details of how\n this is used.\n \"\"\"\n self._decoratorsForNextMethod.append(decoratorExpr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1315_C8", "label": "expression", "type": "expression", "loc": [1315, 1319], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1314_C4", "vector": [8, 2, 0.6588, 0.0025, 2, 0.61, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Set the decorator to be used with the next method in the source.\n\n See _spawnMethodCompiler() and MethodCompiler for the details of how\n this is used.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1320_C8", "label": "append()", "type": "expression", "loc": [1320, 1320], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1314_C4", "vector": [8, 2, 0.6603, 0.0005, 2, 0.61, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._decoratorsForNextMethod.append(decoratorExpr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1322_C4", "label": "addClassDocString", "type": "function", "loc": [1322, 1323], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6616, 0.001, 1, 0.46, 0.6111, 396, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "addClassDocString", "arg_names": ["self", "line"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addClassDocString(self, line):\n self._classDocStringLines.append( line.replace('%', '%%')) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1323_C8", "label": "append()", "type": "expression", "loc": [1323, 1323], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1322_C4", "vector": [8, 2, 0.6618, 0.0005, 2, 0.47, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._classDocStringLines.append( line.replace('%', '%%')) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1325_C4", "label": "addChunkToInit", "type": "function", "loc": [1325, 1326], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6631, 0.001, 1, 0.46, 0.6389, 675, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addChunkToInit", "arg_names": ["self", "chunk"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addChunkToInit(self, chunk):\n self._initMethChunks.append(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1326_C8", "label": "append()", "type": "expression", "loc": [1326, 1326], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1325_C4", "vector": [8, 2, 0.6633, 0.0005, 2, 0.98, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._initMethChunks.append(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1328_C4", "label": "addAttribute", "type": "function", "loc": [1328, 1336], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6663, 0.0045, 1, 0.46, 0.6667, 333, 0, 2, 0, 0, 0, 0, 4], "semantic": {"name": "addAttribute", "arg_names": ["self", "attribExpr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addAttribute(self, attribExpr):\n ## first test to make sure that the user hasn't used any fancy Cheetah syntax\n # (placeholders, directives, etc.) inside the expression \n if attribExpr.find('VFN(') != -1 or attribExpr.find('VFFSL(') != -1:\n raise ParseError(self,\n 'Invalid #attr directive.' +\n ' It should only contain simple Python literals.')\n ## now add the attribute"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1331_C8", "label": "if", "type": "if", "loc": [1331, 1334], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1328_C4", "vector": [4, 2, 0.6666, 0.002, 2, 0.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if attribExpr.find('VFN(') != -1 or attribExpr.find('VFFSL(') != -1:\n raise ParseError(self,\n 'Invalid #attr directive.' +\n ' It should only contain simple Python literals.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1336_C8", "label": "append()", "type": "expression", "loc": [1336, 1336], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1328_C4", "vector": [8, 2, 0.6683, 0.0005, 2, 0.7, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._generatedAttribs.append(attribExpr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1338_C4", "label": "addSuper", "type": "function", "loc": [1338, 1351], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6726, 0.007, 1, 0.46, 0.6944, 890, 0, 3, 0, 0, 0, 0, 6], "semantic": {"name": "addSuper", "arg_names": ["self", "argsList", "parserComment"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addSuper(self, argsList, parserComment=None): \n className = self._className #self._baseClass\n methodName = self._getActiveMethodCompiler().methodName()\n\n argStringChunks = []\n for arg in argsList:\n chunk = arg[0]\n if not arg[1] == None:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1339_C8", "label": "className =", "type": "assigned_variable", "loc": [1339, 1339], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1338_C4", "vector": [14, 2, 0.6698, 0.0005, 2, 0.69, 0.0, 131, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "className", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " className = self._className #self._baseClass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1340_C8", "label": "methodName = methodName()", "type": "assigned_variable", "loc": [1340, 1340], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1338_C4", "vector": [14, 2, 0.6703, 0.0005, 2, 0.69, 0.2, 681, 3, 0, 0, 0, 681, 10, 2], "semantic": {"name": "methodName", "arg_names": [], "import_names": [], "rhs_call_name": "methodName", "annotation": ""}, "snippet": " methodName = self._getActiveMethodCompiler().methodName()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1342_C8", "label": "argStringChunks =", "type": "assigned_variable", "loc": [1342, 1342], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1338_C4", "vector": [14, 2, 0.6713, 0.0005, 2, 0.69, 0.4, 902, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "argStringChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " argStringChunks = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1343_C8", "label": "for arg", "type": "for", "loc": [1343, 1347], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1338_C4", "vector": [6, 2, 0.6728, 0.0025, 2, 0.69, 0.6, 447, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "arg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for arg in argsList:\n chunk = arg[0]\n if not arg[1] == None:\n chunk += '=' + arg[1]\n argStringChunks.append(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1344_C12", "label": "chunk =", "type": "assigned_variable", "loc": [1344, 1344], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1343_C8", "vector": [14, 3, 0.6723, 0.0005, 3, 0.95, 0.0, 637, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "chunk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " chunk = arg[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1345_C12", "label": "if", "type": "if", "loc": [1345, 1346], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1343_C8", "vector": [4, 3, 0.6731, 0.001, 3, 0.95, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not arg[1] == None:\n chunk += '=' + arg[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1347_C12", "label": "append()", "type": "expression", "loc": [1347, 1347], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1343_C8", "vector": [8, 3, 0.6738, 0.0005, 3, 0.95, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " argStringChunks.append(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1348_C8", "label": "argString = join()", "type": "assigned_variable", "loc": [1348, 1348], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1338_C4", "vector": [14, 2, 0.6743, 0.0005, 2, 0.69, 0.8, 85, 3, 1, 0, 0, 933, 10, 1], "semantic": {"name": "argString", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " argString = ','.join(argStringChunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1350_C8", "label": "addFilteredChunk()", "type": "expression", "loc": [1350, 1351], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1338_C4", "vector": [8, 2, 0.6756, 0.001, 2, 0.69, 1.0, 240, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addFilteredChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addFilteredChunk", "annotation": ""}, "snippet": " self.addFilteredChunk(\n 'super(%(className)s, self).%(methodName)s(%(argString)s)'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "label": "addErrorCatcherCall", "type": "function", "loc": [1353, 1388], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6856, 0.018, 1, 0.46, 0.7222, 58, 0, 4, 1, 0, 0, 0, 17], "semantic": {"name": "addErrorCatcherCall", "arg_names": ["self", "codeChunk", "rawCode", "lineCol"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addErrorCatcherCall(self, codeChunk, rawCode='', lineCol=''):\n if rawCode in self._placeholderToErrorCatcherMap:\n methodName = self._placeholderToErrorCatcherMap[rawCode]\n if not self.setting('outputRowColComments'):\n self._methodsIndex[methodName].addMethDocString(\n 'plus at line %s, col %s'%lineCol)\n return methodName\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1354_C8", "label": "if", "type": "if", "loc": [1354, 1359], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "vector": [4, 2, 0.6786, 0.003, 2, 0.26, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if rawCode in self._placeholderToErrorCatcherMap:\n methodName = self._placeholderToErrorCatcherMap[rawCode]\n if not self.setting('outputRowColComments'):\n self._methodsIndex[methodName].addMethDocString(\n 'plus at line %s, col %s'%lineCol)\n return methodName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1355_C12", "label": "methodName =", "type": "assigned_variable", "loc": [1355, 1355], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1354_C8", "vector": [14, 3, 0.6778, 0.0005, 3, 0.59, 0.0, 681, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "methodName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " methodName = self._placeholderToErrorCatcherMap[rawCode]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1356_C12", "label": "if", "type": "if", "loc": [1356, 1358], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1354_C8", "vector": [4, 3, 0.6788, 0.0015, 3, 0.59, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.setting('outputRowColComments'):\n self._methodsIndex[methodName].addMethDocString(\n 'plus at line %s, col %s'%lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1357_C16", "label": "addMethDocString()", "type": "expression", "loc": [1357, 1358], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1356_C12", "vector": [8, 4, 0.6791, 0.001, 4, 0.51, 0.0, 664, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addMethDocString", "arg_names": [], "import_names": [], "rhs_call_name": "addMethDocString", "annotation": ""}, "snippet": " self._methodsIndex[methodName].addMethDocString(\n 'plus at line %s, col %s'%lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1359_C12", "label": "return", "type": "return", "loc": [1359, 1359], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1354_C8", "vector": [13, 3, 0.6798, 0.0005, 3, 0.59, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return methodName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1362_C8", "label": "methodName =", "type": "assigned_variable", "loc": [1362, 1362], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "vector": [14, 2, 0.6813, 0.0005, 2, 0.26, 0.0714, 681, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "methodName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " methodName = '__errorCatcher' + str(self._errorCatcherCount)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1363_C8", "label": "assign", "type": "assigned_variable", "loc": [1363, 1363], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "vector": [14, 2, 0.6818, 0.0005, 2, 0.26, 0.1429, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._placeholderToErrorCatcherMap[rawCode] = methodName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1365_C8", "label": "catcherMeth = _spawnMethodCompiler()", "type": "assigned_variable", "loc": [1365, 1370], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "vector": [14, 2, 0.6841, 0.003, 2, 0.26, 0.2143, 349, 3, 3, 0, 0, 888, 10, 1], "semantic": {"name": "catcherMeth", "arg_names": [], "import_names": [], "rhs_call_name": "_spawnMethodCompiler", "annotation": ""}, "snippet": " catcherMeth = self._spawnMethodCompiler(\n methodName,\n klass=MethodCompiler,\n initialMethodComment=('## CHEETAH: Generated from ' + rawCode +\n ' at line %s, col %s'%lineCol + '.')\n ) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1371_C8", "label": "setMethodSignature()", "type": "expression", "loc": [1371, 1372], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "vector": [8, 2, 0.6861, 0.001, 2, 0.26, 0.2857, 668, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setMethodSignature", "arg_names": [], "import_names": [], "rhs_call_name": "setMethodSignature", "annotation": ""}, "snippet": " catcherMeth.setMethodSignature('def ' + methodName +\n '(self, localsDict={})')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1374_C8", "label": "addChunk()", "type": "expression", "loc": [1374, 1374], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "vector": [8, 2, 0.6873, 0.0005, 2, 0.26, 0.3571, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " catcherMeth.addChunk('try:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1375_C8", "label": "indent()", "type": "expression", "loc": [1375, 1375], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "vector": [8, 2, 0.6878, 0.0005, 2, 0.26, 0.4286, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " catcherMeth.indent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1376_C8", "label": "addChunk()", "type": "expression", "loc": [1376, 1377], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "vector": [8, 2, 0.6886, 0.001, 2, 0.26, 0.5, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " catcherMeth.addChunk(\"return eval('''\" + codeChunk +\n \"''', globals(), localsDict)\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1378_C8", "label": "dedent()", "type": "expression", "loc": [1378, 1378], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "vector": [8, 2, 0.6893, 0.0005, 2, 0.26, 0.5714, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " catcherMeth.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1379_C8", "label": "addChunk()", "type": "expression", "loc": [1379, 1379], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "vector": [8, 2, 0.6898, 0.0005, 2, 0.26, 0.6429, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " catcherMeth.addChunk('except self._CHEETAH__errorCatcher.exceptions(), e:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1380_C8", "label": "indent()", "type": "expression", "loc": [1380, 1380], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "vector": [8, 2, 0.6903, 0.0005, 2, 0.26, 0.7143, 231, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "indent", "arg_names": [], "import_names": [], "rhs_call_name": "indent", "annotation": ""}, "snippet": " catcherMeth.indent() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1381_C8", "label": "addChunk()", "type": "expression", "loc": [1381, 1383], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "vector": [8, 2, 0.6913, 0.0015, 2, 0.26, 0.7857, 316, 3, 1, 0, 0, 0, 0, 4], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " catcherMeth.addChunk(\"return self._CHEETAH__errorCatcher.warn(exc_val=e, code= \" +\n repr(codeChunk) + \" , rawCode= \" +\n repr(rawCode) + \" , lineCol=\" + str(lineCol) +\")\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1385_C8", "label": "cleanupState()", "type": "expression", "loc": [1385, 1385], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "vector": [8, 2, 0.6928, 0.0005, 2, 0.26, 0.8571, 776, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "cleanupState", "arg_names": [], "import_names": [], "rhs_call_name": "cleanupState", "annotation": ""}, "snippet": " catcherMeth.cleanupState()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1387_C8", "label": "_swallowMethodCompiler()", "type": "expression", "loc": [1387, 1387], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "vector": [8, 2, 0.6938, 0.0005, 2, 0.26, 0.9286, 475, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_swallowMethodCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "_swallowMethodCompiler", "annotation": ""}, "snippet": " self._swallowMethodCompiler(catcherMeth)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1388_C8", "label": "return", "type": "return", "loc": [1388, 1388], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "vector": [13, 2, 0.6943, 0.0005, 2, 0.26, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return methodName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1390_C4", "label": "closeDef", "type": "function", "loc": [1390, 1393], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.6961, 0.002, 1, 0.46, 0.75, 276, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "closeDef", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def closeDef(self):\n self.commitStrConst()\n methCompiler = self._popActiveMethodCompiler()\n self._swallowMethodCompiler(methCompiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1391_C8", "label": "commitStrConst()", "type": "expression", "loc": [1391, 1391], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1390_C4", "vector": [8, 2, 0.6958, 0.0005, 2, 0.41, 0.0, 212, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "commitStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "commitStrConst", "annotation": ""}, "snippet": " self.commitStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1392_C8", "label": "methCompiler = _popActiveMethodCompiler()", "type": "assigned_variable", "loc": [1392, 1392], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1390_C4", "vector": [14, 2, 0.6963, 0.0005, 2, 0.41, 0.5, 251, 3, 0, 0, 0, 680, 10, 1], "semantic": {"name": "methCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "_popActiveMethodCompiler", "annotation": ""}, "snippet": " methCompiler = self._popActiveMethodCompiler()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1393_C8", "label": "_swallowMethodCompiler()", "type": "expression", "loc": [1393, 1393], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1390_C4", "vector": [8, 2, 0.6968, 0.0005, 2, 0.41, 1.0, 475, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_swallowMethodCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "_swallowMethodCompiler", "annotation": ""}, "snippet": " self._swallowMethodCompiler(methCompiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1395_C4", "label": "closeBlock", "type": "function", "loc": [1395, 1410], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.7016, 0.008, 1, 0.46, 0.7778, 27, 0, 1, 0, 0, 0, 0, 8], "semantic": {"name": "closeBlock", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def closeBlock(self):\n self.commitStrConst()\n methCompiler = self._popActiveMethodCompiler()\n methodName = methCompiler.methodName()\n if self.setting('includeBlockMarkers'):\n endMarker = self.setting('blockMarkerEnd')\n methCompiler.addStrConst(endMarker[0] + methodName + endMarker[1])\n self._swallowMethodCompiler(methCompiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1396_C8", "label": "commitStrConst()", "type": "expression", "loc": [1396, 1396], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1395_C4", "vector": [8, 2, 0.6983, 0.0005, 2, 0.35, 0.0, 212, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "commitStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "commitStrConst", "annotation": ""}, "snippet": " self.commitStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1397_C8", "label": "methCompiler = _popActiveMethodCompiler()", "type": "assigned_variable", "loc": [1397, 1397], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1395_C4", "vector": [14, 2, 0.6988, 0.0005, 2, 0.35, 0.1667, 251, 3, 0, 0, 0, 680, 10, 1], "semantic": {"name": "methCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "_popActiveMethodCompiler", "annotation": ""}, "snippet": " methCompiler = self._popActiveMethodCompiler()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1398_C8", "label": "methodName = methodName()", "type": "assigned_variable", "loc": [1398, 1398], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1395_C4", "vector": [14, 2, 0.6993, 0.0005, 2, 0.35, 0.3333, 681, 3, 0, 0, 0, 681, 10, 1], "semantic": {"name": "methodName", "arg_names": [], "import_names": [], "rhs_call_name": "methodName", "annotation": ""}, "snippet": " methodName = methCompiler.methodName()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1399_C8", "label": "if", "type": "if", "loc": [1399, 1401], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1395_C4", "vector": [4, 2, 0.7004, 0.0015, 2, 0.35, 0.5, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('includeBlockMarkers'):\n endMarker = self.setting('blockMarkerEnd')\n methCompiler.addStrConst(endMarker[0] + methodName + endMarker[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1400_C12", "label": "endMarker = setting()", "type": "assigned_variable", "loc": [1400, 1400], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1399_C8", "vector": [14, 3, 0.7004, 0.0005, 3, 0.59, 0.0, 483, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "endMarker", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " endMarker = self.setting('blockMarkerEnd')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1401_C12", "label": "addStrConst()", "type": "expression", "loc": [1401, 1401], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1399_C8", "vector": [8, 3, 0.7009, 0.0005, 3, 0.59, 1.0, 170, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "addStrConst", "annotation": ""}, "snippet": " methCompiler.addStrConst(endMarker[0] + methodName + endMarker[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1402_C8", "label": "_swallowMethodCompiler()", "type": "expression", "loc": [1402, 1402], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1395_C4", "vector": [8, 2, 0.7014, 0.0005, 2, 0.35, 0.6667, 475, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_swallowMethodCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "_swallowMethodCompiler", "annotation": ""}, "snippet": " self._swallowMethodCompiler(methCompiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1409_C8", "label": "codeChunk =", "type": "assigned_variable", "loc": [1409, 1409], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1395_C4", "vector": [14, 2, 0.7049, 0.0005, 2, 0.35, 0.8333, 956, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "codeChunk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " codeChunk = 'self.' + methodName + '(trans=trans)'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1410_C8", "label": "addChunk()", "type": "expression", "loc": [1410, 1410], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1395_C4", "vector": [8, 2, 0.7054, 0.0005, 2, 0.35, 1.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(codeChunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1419_C4", "label": "classDef", "type": "function", "loc": [1419, 1423], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.7109, 0.0025, 1, 0.46, 0.8056, 288, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "classDef", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def classDef(self):\n if self._classDef:\n return self._classDef\n else:\n return self.wrapClassDef()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1420_C8", "label": "if", "type": "if", "loc": [1420, 1423], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1419_C4", "vector": [4, 2, 0.7111, 0.002, 2, 0.29, 0.0, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._classDef:\n return self._classDef\n else:\n return self.wrapClassDef()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1421_C12", "label": "return", "type": "return", "loc": [1421, 1421], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1420_C8", "vector": [13, 3, 0.7109, 0.0005, 3, 0.11, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._classDef"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1423_C12", "label": "return", "type": "return", "loc": [1423, 1423], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1420_C8", "vector": [13, 3, 0.7119, 0.0005, 3, 0.11, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.wrapClassDef()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1425_C4", "label": "__str__ =", "type": "assigned_variable", "loc": [1425, 1425], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [14, 1, 0.7129, 0.0005, 1, 0.46, 0.8333, 527, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__str__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __str__ = classDef"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1426_C4", "label": "__unicode__ =", "type": "assigned_variable", "loc": [1426, 1426], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [14, 1, 0.7134, 0.0005, 1, 0.46, 0.8611, 318, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__unicode__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __unicode__ = classDef"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "label": "wrapClassDef", "type": "function", "loc": [1428, 1456], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.7214, 0.0145, 1, 0.46, 0.8889, 860, 0, 1, 1, 0, 0, 0, 13], "semantic": {"name": "wrapClassDef", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def wrapClassDef(self):\n ind = self.setting('indentationStep')\n classDefChunks = [self.classSignature(),\n self.classDocstring(),\n ]\n def addMethods():\n classDefChunks.extend([\n ind + '#'*50,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1429_C8", "label": "ind = setting()", "type": "assigned_variable", "loc": [1429, 1429], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "vector": [14, 2, 0.7149, 0.0005, 2, 0.49, 0.0, 680, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "ind", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " ind = self.setting('indentationStep')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1430_C8", "label": "classDefChunks =", "type": "assigned_variable", "loc": [1430, 1432], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "vector": [14, 2, 0.7159, 0.0015, 2, 0.49, 0.1429, 768, 0, 0, 0, 0, 0, 5, 2], "semantic": {"name": "classDefChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " classDefChunks = [self.classSignature(),\n self.classDocstring(),\n ]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1433_C8", "label": "addMethods", "type": "function", "loc": [1433, 1439], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "vector": [2, 2, 0.7184, 0.0035, 2, 0.49, 0.2857, 147, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "addMethods", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addMethods():\n classDefChunks.extend([\n ind + '#'*50,\n ind + '## CHEETAH GENERATED METHODS',\n '\\n',\n self.methodDefs(),\n ])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1434_C12", "label": "extend()", "type": "expression", "loc": [1434, 1439], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1433_C8", "vector": [8, 3, 0.7186, 0.003, 3, 0.2, 0.0, 660, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "extend", "arg_names": [], "import_names": [], "rhs_call_name": "extend", "annotation": ""}, "snippet": " classDefChunks.extend([\n ind + '#'*50,\n ind + '## CHEETAH GENERATED METHODS',\n '\\n',\n self.methodDefs(),\n ])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1440_C8", "label": "addAttributes", "type": "function", "loc": [1440, 1446], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "vector": [2, 2, 0.7219, 0.0035, 2, 0.49, 0.4286, 89, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "addAttributes", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addAttributes():\n classDefChunks.extend([\n ind + '#'*50,\n ind + '## CHEETAH GENERATED ATTRIBUTES',\n '\\n',\n self.attributes(),\n ]) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1441_C12", "label": "extend()", "type": "expression", "loc": [1441, 1446], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1440_C8", "vector": [8, 3, 0.7221, 0.003, 3, 0.82, 0.0, 660, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "extend", "arg_names": [], "import_names": [], "rhs_call_name": "extend", "annotation": ""}, "snippet": " classDefChunks.extend([\n ind + '#'*50,\n ind + '## CHEETAH GENERATED ATTRIBUTES',\n '\\n',\n self.attributes(),\n ]) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1447_C8", "label": "if", "type": "if", "loc": [1447, 1452], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "vector": [4, 2, 0.7251, 0.003, 2, 0.49, 0.5714, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('outputMethodsBeforeAttributes'):\n addMethods()\n addAttributes()\n else:\n addAttributes()\n addMethods()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1448_C12", "label": "addMethods()", "type": "expression", "loc": [1448, 1448], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1447_C8", "vector": [8, 3, 0.7244, 0.0005, 3, 0.84, 0.0, 147, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "addMethods", "arg_names": [], "import_names": [], "rhs_call_name": "addMethods", "annotation": ""}, "snippet": " addMethods()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1449_C12", "label": "addAttributes()", "type": "expression", "loc": [1449, 1449], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1447_C8", "vector": [8, 3, 0.7249, 0.0005, 3, 0.84, 0.3333, 89, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "addAttributes", "arg_names": [], "import_names": [], "rhs_call_name": "addAttributes", "annotation": ""}, "snippet": " addAttributes()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1451_C12", "label": "addAttributes()", "type": "expression", "loc": [1451, 1451], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1447_C8", "vector": [8, 3, 0.7259, 0.0005, 3, 0.84, 0.6667, 89, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "addAttributes", "arg_names": [], "import_names": [], "rhs_call_name": "addAttributes", "annotation": ""}, "snippet": " addAttributes()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1452_C12", "label": "addMethods()", "type": "expression", "loc": [1452, 1452], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1447_C8", "vector": [8, 3, 0.7264, 0.0005, 3, 0.84, 1.0, 147, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "addMethods", "arg_names": [], "import_names": [], "rhs_call_name": "addMethods", "annotation": ""}, "snippet": " addMethods()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1454_C8", "label": "classDef = join()", "type": "assigned_variable", "loc": [1454, 1454], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "vector": [14, 2, 0.7274, 0.0005, 2, 0.49, 0.7143, 288, 3, 1, 0, 0, 933, 10, 1], "semantic": {"name": "classDef", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " classDef = '\\n'.join(classDefChunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1455_C8", "label": "self._classDef =", "type": "assigned_variable", "loc": [1455, 1455], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "vector": [14, 2, 0.7279, 0.0005, 2, 0.49, 0.8571, 345, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._classDef", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._classDef = classDef"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1456_C8", "label": "return", "type": "return", "loc": [1456, 1456], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "vector": [13, 2, 0.7284, 0.0005, 2, 0.49, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return classDef"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1459_C4", "label": "classSignature", "type": "function", "loc": [1459, 1460], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.7301, 0.001, 1, 0.46, 0.9167, 714, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "classSignature", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def classSignature(self):\n return \"class %s(%s):\" % (self.className(), self._baseClass)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1460_C8", "label": "return", "type": "return", "loc": [1460, 1460], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1459_C4", "vector": [13, 2, 0.7304, 0.0005, 2, 0.92, 0.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return \"class %s(%s):\" % (self.className(), self._baseClass)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1462_C4", "label": "classDocstring", "type": "function", "loc": [1462, 1470], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.7334, 0.0045, 1, 0.46, 0.9444, 791, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "classDocstring", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def classDocstring(self):\n if not self._classDocStringLines:\n return ''\n ind = self.setting('indentationStep')\n docStr = ('%(ind)s\"\"\"\\n%(ind)s' +\n '\\n%(ind)s'.join(self._classDocStringLines) +\n '\\n%(ind)s\"\"\"\\n'\n ) % {'ind':ind}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1463_C8", "label": "if", "type": "if", "loc": [1463, 1464], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1462_C4", "vector": [4, 2, 0.7321, 0.001, 2, 0.18, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self._classDocStringLines:\n return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1464_C12", "label": "return", "type": "return", "loc": [1464, 1464], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1463_C8", "vector": [13, 3, 0.7324, 0.0005, 3, 0.64, 0.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1465_C8", "label": "ind = setting()", "type": "assigned_variable", "loc": [1465, 1465], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1462_C4", "vector": [14, 2, 0.7329, 0.0005, 2, 0.18, 0.3333, 680, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "ind", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " ind = self.setting('indentationStep')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1466_C8", "label": "docStr =", "type": "assigned_variable", "loc": [1466, 1469], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1462_C4", "vector": [14, 2, 0.7341, 0.002, 2, 0.18, 0.6667, 346, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "docStr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " docStr = ('%(ind)s\"\"\"\\n%(ind)s' +\n '\\n%(ind)s'.join(self._classDocStringLines) +\n '\\n%(ind)s\"\"\"\\n'\n ) % {'ind':ind}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1470_C8", "label": "return", "type": "return", "loc": [1470, 1470], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1462_C4", "vector": [13, 2, 0.7354, 0.0005, 2, 0.18, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return docStr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1472_C4", "label": "methodDefs", "type": "function", "loc": [1472, 1474], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.7369, 0.0015, 1, 0.46, 0.9722, 284, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "methodDefs", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def methodDefs(self):\n methodDefs = [methGen.methodDef() for methGen in self._finishedMethods()]\n return '\\n\\n'.join(methodDefs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1473_C8", "label": "methodDefs =", "type": "assigned_variable", "loc": [1473, 1473], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1472_C4", "vector": [14, 2, 0.7369, 0.0005, 2, 0.64, 0.0, 284, 5, 0, 0, 0, 0, 0, 2], "semantic": {"name": "methodDefs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " methodDefs = [methGen.methodDef() for methGen in self._finishedMethods()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1474_C8", "label": "return", "type": "return", "loc": [1474, 1474], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1472_C4", "vector": [13, 2, 0.7374, 0.0005, 2, 0.64, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '\\n\\n'.join(methodDefs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1476_C4", "label": "attributes", "type": "function", "loc": [1476, 1479], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "vector": [2, 1, 0.7391, 0.002, 1, 0.46, 1.0, 344, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "attributes", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def attributes(self):\n attribs = [self.setting('indentationStep') + str(attrib)\n for attrib in self._generatedAttribs ]\n return '\\n\\n'.join(attribs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1477_C8", "label": "attribs =", "type": "assigned_variable", "loc": [1477, 1478], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1476_C4", "vector": [14, 2, 0.7391, 0.001, 2, 0.68, 0.0, 530, 5, 0, 0, 0, 0, 0, 2], "semantic": {"name": "attribs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " attribs = [self.setting('indentationStep') + str(attrib)\n for attrib in self._generatedAttribs ]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1479_C8", "label": "return", "type": "return", "loc": [1479, 1479], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1476_C4", "vector": [13, 2, 0.7399, 0.0005, 2, 0.68, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '\\n\\n'.join(attribs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1481_C0", "label": "AutoClassCompiler", "type": "class", "loc": [1481, 1482], "level": 0, "parent": null, "vector": [3, 0, 0.7411, 0.001, 0, 0.66, 0.9375, 69, 0, 0, 0, 0, 725, 0, 0], "semantic": {"name": "AutoClassCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class AutoClassCompiler(ClassCompiler):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "label": "ModuleCompiler", "type": "class", "loc": [1487, 1993], "level": 0, "parent": null, "vector": [3, 0, 0.8704, 0.2536, 0, 0.66, 0.9688, 756, 0, 36, 0, 0, 890, 0, 99], "semantic": {"name": "ModuleCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ModuleCompiler(SettingsManager, GenUtils):\n\n parserClass = Parser\n classCompilerClass = AutoClassCompiler\n \n def __init__(self, source=None, file=None,\n moduleName='DynamicallyCompiledCheetahTemplate', \n mainClassName=None, # string"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1489_C4", "label": "parserClass =", "type": "assigned_variable", "loc": [1489, 1489], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [14, 1, 0.7449, 0.0005, 1, 0.35, 0.0, 248, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "parserClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parserClass = Parser"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1490_C4", "label": "classCompilerClass =", "type": "assigned_variable", "loc": [1490, 1490], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [14, 1, 0.7454, 0.0005, 1, 0.35, 0.0263, 973, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "classCompilerClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " classCompilerClass = AutoClassCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "label": "__init__", "type": "function", "loc": [1492, 1581], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.7686, 0.045, 1, 0.35, 0.0526, 555, 0, 9, 0, 0, 0, 0, 36], "semantic": {"name": "__init__", "arg_names": ["self", "source", "file", "moduleName", "mainClassName", "mainMethodName", "baseclassName", "extraImportStatements", "settings"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, source=None, file=None,\n moduleName='DynamicallyCompiledCheetahTemplate', \n mainClassName=None, # string\n mainMethodName=None, # string\n baseclassName=None, # string\n extraImportStatements=None, # list of strings\n settings=None # dict\n ):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1500_C8", "label": "__init__()", "type": "expression", "loc": [1500, 1500], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [8, 2, 0.7504, 0.0005, 2, 0.6, 0.0, 555, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(ModuleCompiler, self).__init__()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1501_C8", "label": "if", "type": "if", "loc": [1501, 1502], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [4, 2, 0.7511, 0.001, 2, 0.6, 0.0588, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if settings:\n self.updateSettings(settings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1502_C12", "label": "updateSettings()", "type": "expression", "loc": [1502, 1502], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1501_C8", "vector": [8, 3, 0.7514, 0.0005, 3, 0.96, 0.0, 649, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "updateSettings", "arg_names": [], "import_names": [], "rhs_call_name": "updateSettings", "annotation": ""}, "snippet": " self.updateSettings(settings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1506_C8", "label": "if", "type": "if", "loc": [1506, 1514], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [4, 2, 0.7554, 0.0045, 2, 0.6, 0.1176, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not NameMapper.C_VERSION:\n if not sys.platform.startswith('java'):\n warnings.warn(\n \"\\nYou don't have the C version of NameMapper installed! \"\n \"I'm disabling Cheetah's useStackFrames option as it is \"\n \"painfully slow with the Python version of NameMapper. \"\n \"You should get a copy of Cheetah with the compiled C version of NameMapper.\"\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1507_C12", "label": "if", "type": "if", "loc": [1507, 1513], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1506_C8", "vector": [4, 3, 0.7554, 0.0035, 3, 0.56, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not sys.platform.startswith('java'):\n warnings.warn(\n \"\\nYou don't have the C version of NameMapper installed! \"\n \"I'm disabling Cheetah's useStackFrames option as it is \"\n \"painfully slow with the Python version of NameMapper. \"\n \"You should get a copy of Cheetah with the compiled C version of NameMapper.\"\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1508_C16", "label": "warn()", "type": "expression", "loc": [1508, 1513], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1507_C12", "vector": [8, 4, 0.7556, 0.003, 4, 0.11, 0.0, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " warnings.warn(\n \"\\nYou don't have the C version of NameMapper installed! \"\n \"I'm disabling Cheetah's useStackFrames option as it is \"\n \"painfully slow with the Python version of NameMapper. \"\n \"You should get a copy of Cheetah with the compiled C version of NameMapper.\"\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1514_C12", "label": "setSetting()", "type": "expression", "loc": [1514, 1514], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1506_C8", "vector": [8, 3, 0.7574, 0.0005, 3, 0.56, 1.0, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self.setSetting('useStackFrames', False) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1516_C8", "label": "self._compiled =", "type": "assigned_variable", "loc": [1516, 1516], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [14, 2, 0.7584, 0.0005, 2, 0.6, 0.1765, 957, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._compiled", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._compiled = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1517_C8", "label": "self._moduleName =", "type": "assigned_variable", "loc": [1517, 1517], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [14, 2, 0.7589, 0.0005, 2, 0.6, 0.2353, 355, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._moduleName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._moduleName = moduleName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1518_C8", "label": "if", "type": "if", "loc": [1518, 1521], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [4, 2, 0.7601, 0.002, 2, 0.6, 0.2941, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not mainClassName:\n self._mainClassName = moduleName\n else:\n self._mainClassName = mainClassName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1519_C12", "label": "self._mainClassName =", "type": "assigned_variable", "loc": [1519, 1519], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1518_C8", "vector": [14, 3, 0.7599, 0.0005, 3, 0.13, 0.0, 925, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._mainClassName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._mainClassName = moduleName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1521_C12", "label": "self._mainClassName =", "type": "assigned_variable", "loc": [1521, 1521], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1518_C8", "vector": [14, 3, 0.7609, 0.0005, 3, 0.13, 1.0, 925, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._mainClassName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._mainClassName = mainClassName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1522_C8", "label": "self._mainMethodNameArg =", "type": "assigned_variable", "loc": [1522, 1522], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [14, 2, 0.7614, 0.0005, 2, 0.6, 0.3529, 310, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._mainMethodNameArg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._mainMethodNameArg = mainMethodName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1523_C8", "label": "if", "type": "if", "loc": [1523, 1524], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [4, 2, 0.7621, 0.001, 2, 0.6, 0.4118, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if mainMethodName:\n self.setSetting('mainMethodName', mainMethodName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1524_C12", "label": "setSetting()", "type": "expression", "loc": [1524, 1524], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1523_C8", "vector": [8, 3, 0.7624, 0.0005, 3, 0.63, 0.0, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self.setSetting('mainMethodName', mainMethodName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1525_C8", "label": "self._baseclassName =", "type": "assigned_variable", "loc": [1525, 1525], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [14, 2, 0.7629, 0.0005, 2, 0.6, 0.4706, 609, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._baseclassName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._baseclassName = baseclassName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1527_C8", "label": "self._filePath =", "type": "assigned_variable", "loc": [1527, 1527], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [14, 2, 0.7639, 0.0005, 2, 0.6, 0.5294, 300, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._filePath", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._filePath = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1528_C8", "label": "self._fileMtime =", "type": "assigned_variable", "loc": [1528, 1528], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [14, 2, 0.7644, 0.0005, 2, 0.6, 0.5882, 634, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._fileMtime", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._fileMtime = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1530_C8", "label": "if", "type": "if", "loc": [1530, 1541], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [4, 2, 0.7681, 0.006, 2, 0.6, 0.6471, 0, 0, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if source and file:\n raise TypeError(\"Cannot compile from a source string AND file.\")\n elif isinstance(file, basestring): # it's a filename.\n f = open(file) # Raises IOError.\n source = f.read()\n f.close()\n self._filePath = file\n self._fileMtime = os.path.getmtime(file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1532_C8", "label": "if", "type": "if", "loc": [1532, 1541], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1530_C8", "vector": [4, 3, 0.7686, 0.005, 3, 0.98, 0.0, 0, 3, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isinstance(file, basestring): # it's a filename.\n f = open(file) # Raises IOError.\n source = f.read()\n f.close()\n self._filePath = file\n self._fileMtime = os.path.getmtime(file)\n elif hasattr(file, 'read'):\n source = file.read() # Can't set filename or mtime--they're not accessible."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1533_C12", "label": "f = open()", "type": "assigned_variable", "loc": [1533, 1533], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1532_C8", "vector": [14, 4, 0.7669, 0.0005, 4, 0.74, 0.0, 899, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " f = open(file) # Raises IOError."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1534_C12", "label": "source = read()", "type": "assigned_variable", "loc": [1534, 1534], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1532_C8", "vector": [14, 4, 0.7674, 0.0005, 4, 0.74, 0.2, 703, 3, 0, 0, 0, 453, 10, 1], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " source = f.read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1535_C12", "label": "close()", "type": "expression", "loc": [1535, 1535], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1532_C8", "vector": [8, 4, 0.7679, 0.0005, 4, 0.74, 0.4, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " f.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1536_C12", "label": "self._filePath =", "type": "assigned_variable", "loc": [1536, 1536], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1532_C8", "vector": [14, 4, 0.7684, 0.0005, 4, 0.74, 0.6, 300, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._filePath", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._filePath = file"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1537_C12", "label": "self._fileMtime = getmtime()", "type": "assigned_variable", "loc": [1537, 1537], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1532_C8", "vector": [14, 4, 0.7689, 0.0005, 4, 0.74, 0.8, 634, 3, 1, 0, 0, 561, 10, 1], "semantic": {"name": "self._fileMtime", "arg_names": [], "import_names": [], "rhs_call_name": "getmtime", "annotation": ""}, "snippet": " self._fileMtime = os.path.getmtime(file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1538_C8", "label": "if", "type": "if", "loc": [1538, 1541], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1532_C8", "vector": [4, 4, 0.7701, 0.002, 4, 0.74, 1.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif hasattr(file, 'read'):\n source = file.read() # Can't set filename or mtime--they're not accessible.\n elif file:\n raise TypeError(\"'file' argument must be a filename string or file-like object\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1539_C12", "label": "source = read()", "type": "assigned_variable", "loc": [1539, 1539], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1538_C8", "vector": [14, 5, 0.7699, 0.0005, 5, 0.53, 0.0, 703, 3, 0, 0, 0, 453, 10, 1], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " source = file.read() # Can't set filename or mtime--they're not accessible."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1540_C8", "label": "if", "type": "if", "loc": [1540, 1541], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1538_C8", "vector": [4, 5, 0.7706, 0.001, 5, 0.53, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif file:\n raise TypeError(\"'file' argument must be a filename string or file-like object\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1543_C8", "label": "if", "type": "if", "loc": [1543, 1545], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [4, 2, 0.7724, 0.0015, 2, 0.6, 0.7059, 0, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._filePath:\n self._fileDirName, self._fileBaseName = os.path.split(self._filePath)\n self._fileBaseNameRoot, self._fileBaseNameExt = os.path.splitext(self._fileBaseName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1544_C12", "label": " = split()", "type": "assigned_variable", "loc": [1544, 1544], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1543_C8", "vector": [14, 3, 0.7724, 0.0005, 3, 0.9, 0.0, 0, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " self._fileDirName, self._fileBaseName = os.path.split(self._filePath)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1545_C12", "label": " = splitext()", "type": "assigned_variable", "loc": [1545, 1545], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1543_C8", "vector": [14, 3, 0.7729, 0.0005, 3, 0.9, 1.0, 0, 3, 1, 0, 0, 622, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "splitext", "annotation": ""}, "snippet": " self._fileBaseNameRoot, self._fileBaseNameExt = os.path.splitext(self._fileBaseName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1547_C8", "label": "if", "type": "if", "loc": [1547, 1548], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [4, 2, 0.7741, 0.001, 2, 0.6, 0.7647, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not isinstance(source, basestring):\n source = unicode(source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1548_C12", "label": "source = unicode()", "type": "assigned_variable", "loc": [1548, 1548], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1547_C8", "vector": [14, 3, 0.7744, 0.0005, 3, 0.52, 0.0, 703, 3, 1, 0, 0, 733, 10, 1], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "unicode", "annotation": ""}, "snippet": " source = unicode(source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1554_C8", "label": "if", "type": "if", "loc": [1554, 1575], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [4, 2, 0.7826, 0.011, 2, 0.6, 0.8235, 0, 0, 0, 0, 0, 0, 0, 12], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if source == \"\":\n warnings.warn(\"You supplied an empty string for the source!\", )\n \n else:\n unicodeMatch = unicodeDirectiveRE.search(source)\n encodingMatch = encodingDirectiveRE.match(source)\n if unicodeMatch:\n if encodingMatch:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1555_C12", "label": "warn()", "type": "expression", "loc": [1555, 1555], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1554_C8", "vector": [8, 3, 0.7779, 0.0005, 3, 0.01, 0.0, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " warnings.warn(\"You supplied an empty string for the source!\", )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1558_C12", "label": "unicodeMatch = search()", "type": "assigned_variable", "loc": [1558, 1558], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1554_C8", "vector": [14, 3, 0.7794, 0.0005, 3, 0.01, 0.3333, 713, 3, 1, 0, 0, 163, 10, 1], "semantic": {"name": "unicodeMatch", "arg_names": [], "import_names": [], "rhs_call_name": "search", "annotation": ""}, "snippet": " unicodeMatch = unicodeDirectiveRE.search(source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1559_C12", "label": "encodingMatch = match()", "type": "assigned_variable", "loc": [1559, 1559], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1554_C8", "vector": [14, 3, 0.7799, 0.0005, 3, 0.01, 0.6667, 361, 3, 1, 0, 0, 36, 10, 1], "semantic": {"name": "encodingMatch", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " encodingMatch = encodingDirectiveRE.match(source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1560_C12", "label": "if", "type": "if", "loc": [1560, 1575], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1554_C8", "vector": [4, 3, 0.7841, 0.008, 3, 0.01, 1.0, 0, 2, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if unicodeMatch:\n if encodingMatch:\n raise ParseError(\n self, \"#encoding and #unicode are mutually exclusive! \"\n \"Use one or the other.\")\n source = unicodeDirectiveRE.sub('', source)\n if isinstance(source, str):\n encoding = unicodeMatch.group(1) or 'ascii'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1561_C16", "label": "if", "type": "if", "loc": [1561, 1564], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1560_C12", "vector": [4, 4, 0.7816, 0.002, 4, 0.01, 0.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if encodingMatch:\n raise ParseError(\n self, \"#encoding and #unicode are mutually exclusive! \"\n \"Use one or the other.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1565_C16", "label": "source = sub()", "type": "assigned_variable", "loc": [1565, 1565], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1560_C12", "vector": [14, 4, 0.7829, 0.0005, 4, 0.01, 0.3333, 703, 3, 2, 0, 0, 819, 10, 1], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "sub", "annotation": ""}, "snippet": " source = unicodeDirectiveRE.sub('', source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1566_C16", "label": "if", "type": "if", "loc": [1566, 1568], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1560_C12", "vector": [4, 4, 0.7839, 0.0015, 4, 0.01, 0.6667, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(source, str):\n encoding = unicodeMatch.group(1) or 'ascii'\n source = unicode(source, encoding)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1567_C20", "label": "encoding =", "type": "assigned_variable", "loc": [1567, 1567], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1566_C16", "vector": [14, 5, 0.7839, 0.0005, 5, 0.75, 0.0, 325, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "encoding", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " encoding = unicodeMatch.group(1) or 'ascii'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1568_C20", "label": "source = unicode()", "type": "assigned_variable", "loc": [1568, 1568], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1566_C16", "vector": [14, 5, 0.7844, 0.0005, 5, 0.75, 1.0, 703, 3, 2, 0, 0, 733, 10, 1], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "unicode", "annotation": ""}, "snippet": " source = unicode(source, encoding)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1569_C12", "label": "if", "type": "if", "loc": [1569, 1575], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1560_C12", "vector": [4, 4, 0.7864, 0.0035, 4, 0.01, 1.0, 0, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif encodingMatch:\n encodings = encodingMatch.groups()\n if len(encodings):\n encoding = encodings[0]\n source = source.decode(encoding)\n else:\n source = unicode(source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1570_C16", "label": "encodings = groups()", "type": "assigned_variable", "loc": [1570, 1570], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1569_C12", "vector": [14, 5, 0.7854, 0.0005, 5, 0.53, 0.0, 786, 3, 0, 0, 0, 161, 10, 1], "semantic": {"name": "encodings", "arg_names": [], "import_names": [], "rhs_call_name": "groups", "annotation": ""}, "snippet": " encodings = encodingMatch.groups()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1571_C16", "label": "if", "type": "if", "loc": [1571, 1573], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1569_C12", "vector": [4, 5, 0.7864, 0.0015, 5, 0.53, 0.5, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(encodings):\n encoding = encodings[0]\n source = source.decode(encoding)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1572_C20", "label": "encoding =", "type": "assigned_variable", "loc": [1572, 1572], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1571_C16", "vector": [14, 6, 0.7864, 0.0005, 6, 0.28, 0.0, 325, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "encoding", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " encoding = encodings[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1573_C20", "label": "source = decode()", "type": "assigned_variable", "loc": [1573, 1573], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1571_C16", "vector": [14, 6, 0.7869, 0.0005, 6, 0.28, 1.0, 703, 3, 1, 0, 0, 528, 10, 1], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "decode", "annotation": ""}, "snippet": " source = source.decode(encoding)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1575_C16", "label": "source = unicode()", "type": "assigned_variable", "loc": [1575, 1575], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1569_C12", "vector": [14, 5, 0.7879, 0.0005, 5, 0.53, 1.0, 703, 3, 1, 0, 0, 733, 10, 1], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "unicode", "annotation": ""}, "snippet": " source = unicode(source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1577_C8", "label": "if", "type": "if", "loc": [1577, 1578], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [4, 2, 0.7891, 0.001, 2, 0.6, 0.8824, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if source.find('#indent') != -1: #@@TR: undocumented hack\n source = indentize(source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1578_C12", "label": "source = indentize()", "type": "assigned_variable", "loc": [1578, 1578], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1577_C8", "vector": [14, 3, 0.7894, 0.0005, 3, 0.99, 0.0, 703, 3, 1, 0, 0, 251, 10, 1], "semantic": {"name": "source", "arg_names": [], "import_names": [], "rhs_call_name": "indentize", "annotation": ""}, "snippet": " source = indentize(source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1580_C8", "label": "self._parser = parserClass()", "type": "assigned_variable", "loc": [1580, 1580], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [14, 2, 0.7904, 0.0005, 2, 0.6, 0.9412, 431, 3, 3, 0, 0, 248, 10, 1], "semantic": {"name": "self._parser", "arg_names": [], "import_names": [], "rhs_call_name": "parserClass", "annotation": ""}, "snippet": " self._parser = self.parserClass(source, filename=self._filePath, compiler=self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1581_C8", "label": "_setupCompilerState()", "type": "expression", "loc": [1581, 1581], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "vector": [8, 2, 0.7909, 0.0005, 2, 0.6, 1.0, 262, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_setupCompilerState", "arg_names": [], "import_names": [], "rhs_call_name": "_setupCompilerState", "annotation": ""}, "snippet": " self._setupCompilerState()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1583_C4", "label": "__getattr__", "type": "function", "loc": [1583, 1598], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.7956, 0.008, 1, 0.35, 0.0789, 210, 0, 2, 1, 0, 0, 0, 5], "semantic": {"name": "__getattr__", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __getattr__(self, name):\n \"\"\"Provide one-way access to the methods and attributes of the\n ClassCompiler, and thereby the MethodCompilers as well.\n\n WARNING: Use .setMethods to assign the attributes of the ClassCompiler\n from the methods of this class!!! or you will be assigning to attributes\n of this object instead.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1584_C8", "label": "expression", "type": "expression", "loc": [1584, 1590], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1583_C4", "vector": [8, 2, 0.7939, 0.0035, 2, 0.93, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Provide one-way access to the methods and attributes of the\n ClassCompiler, and thereby the MethodCompilers as well.\n\n WARNING: Use .setMethods to assign the attributes of the ClassCompiler\n from the methods of this class!!! or you will be assigning to attributes\n of this object instead.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1591_C8", "label": "if", "type": "if", "loc": [1591, 1598], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1583_C4", "vector": [4, 2, 0.7976, 0.004, 2, 0.93, 1.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name in self.__dict__:\n return self.__dict__[name]\n elif hasattr(self.__class__, name):\n return getattr(self.__class__, name)\n elif self._activeClassesList and hasattr(self._activeClassesList[-1], name):\n return getattr(self._activeClassesList[-1], name)\n else:\n raise AttributeError(name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1592_C12", "label": "return", "type": "return", "loc": [1592, 1592], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1591_C8", "vector": [13, 3, 0.7964, 0.0005, 3, 0.21, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.__dict__[name]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1593_C8", "label": "if", "type": "if", "loc": [1593, 1598], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1591_C8", "vector": [4, 3, 0.7981, 0.003, 3, 0.21, 1.0, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif hasattr(self.__class__, name):\n return getattr(self.__class__, name)\n elif self._activeClassesList and hasattr(self._activeClassesList[-1], name):\n return getattr(self._activeClassesList[-1], name)\n else:\n raise AttributeError(name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1594_C12", "label": "return", "type": "return", "loc": [1594, 1594], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1593_C8", "vector": [13, 4, 0.7974, 0.0005, 4, 0.4, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return getattr(self.__class__, name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1595_C8", "label": "if", "type": "if", "loc": [1595, 1598], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1593_C8", "vector": [4, 4, 0.7986, 0.002, 4, 0.4, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self._activeClassesList and hasattr(self._activeClassesList[-1], name):\n return getattr(self._activeClassesList[-1], name)\n else:\n raise AttributeError(name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1596_C12", "label": "return", "type": "return", "loc": [1596, 1596], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1595_C8", "vector": [13, 5, 0.7984, 0.0005, 5, 0.39, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return getattr(self._activeClassesList[-1], name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1600_C4", "label": "_initializeSettings", "type": "function", "loc": [1600, 1601], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8007, 0.001, 1, 0.35, 0.1053, 393, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "_initializeSettings", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _initializeSettings(self):\n self.updateSettings(copy.deepcopy(DEFAULT_COMPILER_SETTINGS))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1601_C8", "label": "updateSettings()", "type": "expression", "loc": [1601, 1601], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1600_C4", "vector": [8, 2, 0.8009, 0.0005, 2, 0.52, 0.0, 649, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "updateSettings", "arg_names": [], "import_names": [], "rhs_call_name": "updateSettings", "annotation": ""}, "snippet": " self.updateSettings(copy.deepcopy(DEFAULT_COMPILER_SETTINGS))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "label": "_setupCompilerState", "type": "function", "loc": [1603, 1650], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8137, 0.024, 1, 0.35, 0.1316, 262, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "_setupCompilerState", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _setupCompilerState(self):\n self._activeClassesList = []\n self._finishedClassesList = [] # listed by ordered \n self._finishedClassIndex = {} # listed by name\n self._moduleDef = None\n self._moduleShBang = '#!/usr/bin/env python'\n self._moduleEncoding = 'ascii'\n self._moduleEncodingStr = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1604_C8", "label": "self._activeClassesList =", "type": "assigned_variable", "loc": [1604, 1604], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "vector": [14, 2, 0.8024, 0.0005, 2, 0.28, 0.0, 603, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._activeClassesList", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._activeClassesList = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1605_C8", "label": "self._finishedClassesList =", "type": "assigned_variable", "loc": [1605, 1605], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "vector": [14, 2, 0.8029, 0.0005, 2, 0.28, 0.0833, 589, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._finishedClassesList", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._finishedClassesList = [] # listed by ordered "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1606_C8", "label": "self._finishedClassIndex =", "type": "assigned_variable", "loc": [1606, 1606], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "vector": [14, 2, 0.8034, 0.0005, 2, 0.28, 0.1667, 319, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._finishedClassIndex", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._finishedClassIndex = {} # listed by name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1607_C8", "label": "self._moduleDef =", "type": "assigned_variable", "loc": [1607, 1607], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "vector": [14, 2, 0.8039, 0.0005, 2, 0.28, 0.25, 569, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._moduleDef", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._moduleDef = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1608_C8", "label": "self._moduleShBang =", "type": "assigned_variable", "loc": [1608, 1608], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "vector": [14, 2, 0.8044, 0.0005, 2, 0.28, 0.3333, 513, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self._moduleShBang", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._moduleShBang = '#!/usr/bin/env python'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1609_C8", "label": "self._moduleEncoding =", "type": "assigned_variable", "loc": [1609, 1609], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "vector": [14, 2, 0.8049, 0.0005, 2, 0.28, 0.4167, 396, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self._moduleEncoding", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._moduleEncoding = 'ascii'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1610_C8", "label": "self._moduleEncodingStr =", "type": "assigned_variable", "loc": [1610, 1610], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "vector": [14, 2, 0.8054, 0.0005, 2, 0.28, 0.5, 801, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self._moduleEncodingStr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._moduleEncodingStr = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1611_C8", "label": "self._moduleHeaderLines =", "type": "assigned_variable", "loc": [1611, 1611], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "vector": [14, 2, 0.8059, 0.0005, 2, 0.28, 0.5833, 291, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._moduleHeaderLines", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._moduleHeaderLines = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1612_C8", "label": "self._moduleDocStringLines =", "type": "assigned_variable", "loc": [1612, 1612], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "vector": [14, 2, 0.8064, 0.0005, 2, 0.28, 0.6667, 252, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._moduleDocStringLines", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._moduleDocStringLines = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1613_C8", "label": "self._specialVars =", "type": "assigned_variable", "loc": [1613, 1613], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "vector": [14, 2, 0.8069, 0.0005, 2, 0.28, 0.75, 510, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._specialVars", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._specialVars = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1614_C8", "label": "self._importStatements =", "type": "assigned_variable", "loc": [1614, 1630], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "vector": [14, 2, 0.8114, 0.0085, 2, 0.28, 0.8333, 760, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._importStatements", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._importStatements = [\n \"import sys\",\n \"import os\",\n \"import os.path\",\n \"import __builtin__\",\n \"from os.path import getmtime, exists\",\n \"import time\",\n \"import types\","}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1632_C8", "label": "self._importedVarNames =", "type": "assigned_variable", "loc": [1632, 1643], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "vector": [14, 2, 0.8192, 0.006, 2, 0.28, 0.9167, 900, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._importedVarNames", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._importedVarNames = ['sys',\n 'os',\n 'os.path',\n 'time',\n 'types',\n 'Template',\n 'DummyTransaction',\n 'NotFound',"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1645_C8", "label": "self._moduleConstants =", "type": "assigned_variable", "loc": [1645, 1650], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "vector": [14, 2, 0.8242, 0.003, 2, 0.28, 1.0, 909, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._moduleConstants", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._moduleConstants = [\n \"VFFSL=valueFromFrameOrSearchList\",\n \"VFSL=valueFromSearchList\",\n \"VFN=valueForName\",\n \"currentTime=time.time\",\n ]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1652_C4", "label": "compile", "type": "function", "loc": [1652, 1660], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8284, 0.0045, 1, 0.35, 0.1579, 821, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "compile", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def compile(self):\n classCompiler = self._spawnClassCompiler(self._mainClassName) \n if self._baseclassName:\n classCompiler.setBaseClass(self._baseclassName)\n self._addActiveClassCompiler(classCompiler)\n self._parser.parse()\n self._swallowClassCompiler(self._popActiveClassCompiler())\n self._compiled = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1653_C8", "label": "classCompiler = _spawnClassCompiler()", "type": "assigned_variable", "loc": [1653, 1653], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1652_C4", "vector": [14, 2, 0.8269, 0.0005, 2, 0.53, 0.0, 351, 3, 1, 0, 0, 989, 10, 1], "semantic": {"name": "classCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "_spawnClassCompiler", "annotation": ""}, "snippet": " classCompiler = self._spawnClassCompiler(self._mainClassName) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1654_C8", "label": "if", "type": "if", "loc": [1654, 1655], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1652_C4", "vector": [4, 2, 0.8277, 0.001, 2, 0.53, 0.1667, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._baseclassName:\n classCompiler.setBaseClass(self._baseclassName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1655_C12", "label": "setBaseClass()", "type": "expression", "loc": [1655, 1655], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1654_C8", "vector": [8, 3, 0.8279, 0.0005, 3, 0.72, 0.0, 143, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setBaseClass", "arg_names": [], "import_names": [], "rhs_call_name": "setBaseClass", "annotation": ""}, "snippet": " classCompiler.setBaseClass(self._baseclassName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1656_C8", "label": "_addActiveClassCompiler()", "type": "expression", "loc": [1656, 1656], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1652_C4", "vector": [8, 2, 0.8284, 0.0005, 2, 0.53, 0.3333, 842, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_addActiveClassCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "_addActiveClassCompiler", "annotation": ""}, "snippet": " self._addActiveClassCompiler(classCompiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1657_C8", "label": "parse()", "type": "expression", "loc": [1657, 1657], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1652_C4", "vector": [8, 2, 0.8289, 0.0005, 2, 0.53, 0.5, 678, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "parse", "arg_names": [], "import_names": [], "rhs_call_name": "parse", "annotation": ""}, "snippet": " self._parser.parse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1658_C8", "label": "_swallowClassCompiler()", "type": "expression", "loc": [1658, 1658], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1652_C4", "vector": [8, 2, 0.8294, 0.0005, 2, 0.53, 0.6667, 851, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "_swallowClassCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "_swallowClassCompiler", "annotation": ""}, "snippet": " self._swallowClassCompiler(self._popActiveClassCompiler())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1659_C8", "label": "self._compiled =", "type": "assigned_variable", "loc": [1659, 1659], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1652_C4", "vector": [14, 2, 0.8299, 0.0005, 2, 0.53, 0.8333, 957, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self._compiled", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._compiled = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1660_C8", "label": "cleanup()", "type": "expression", "loc": [1660, 1660], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1652_C4", "vector": [8, 2, 0.8304, 0.0005, 2, 0.53, 1.0, 656, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "cleanup", "arg_names": [], "import_names": [], "rhs_call_name": "cleanup", "annotation": ""}, "snippet": " self._parser.cleanup()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1662_C4", "label": "_spawnClassCompiler", "type": "function", "loc": [1662, 1671], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8337, 0.005, 1, 0.35, 0.1842, 989, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "_spawnClassCompiler", "arg_names": ["self", "className", "klass"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _spawnClassCompiler(self, className, klass=None):\n if klass is None:\n klass = self.classCompilerClass\n classCompiler = klass(className,\n moduleCompiler=self,\n mainMethodName=self.setting('mainMethodName'),\n fileName=self._filePath,\n settingsManager=self,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1663_C8", "label": "if", "type": "if", "loc": [1663, 1664], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1662_C4", "vector": [4, 2, 0.8322, 0.001, 2, 0.88, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if klass is None:\n klass = self.classCompilerClass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1664_C12", "label": "klass =", "type": "assigned_variable", "loc": [1664, 1664], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1663_C8", "vector": [14, 3, 0.8324, 0.0005, 3, 0.07, 0.0, 35, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "klass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " klass = self.classCompilerClass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1665_C8", "label": "classCompiler = klass()", "type": "assigned_variable", "loc": [1665, 1670], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1662_C4", "vector": [14, 2, 0.8342, 0.003, 2, 0.88, 0.5, 351, 3, 5, 0, 0, 35, 10, 2], "semantic": {"name": "classCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "klass", "annotation": ""}, "snippet": " classCompiler = klass(className,\n moduleCompiler=self,\n mainMethodName=self.setting('mainMethodName'),\n fileName=self._filePath,\n settingsManager=self,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1671_C8", "label": "return", "type": "return", "loc": [1671, 1671], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1662_C4", "vector": [13, 2, 0.8359, 0.0005, 2, 0.88, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return classCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1673_C4", "label": "_addActiveClassCompiler", "type": "function", "loc": [1673, 1674], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8372, 0.001, 1, 0.35, 0.2105, 842, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_addActiveClassCompiler", "arg_names": ["self", "classCompiler"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _addActiveClassCompiler(self, classCompiler):\n self._activeClassesList.append(classCompiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1674_C8", "label": "append()", "type": "expression", "loc": [1674, 1674], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1673_C4", "vector": [8, 2, 0.8374, 0.0005, 2, 0.08, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._activeClassesList.append(classCompiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1676_C4", "label": "_getActiveClassCompiler", "type": "function", "loc": [1676, 1677], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8387, 0.001, 1, 0.35, 0.2368, 918, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "_getActiveClassCompiler", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _getActiveClassCompiler(self):\n return self._activeClassesList[-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1677_C8", "label": "return", "type": "return", "loc": [1677, 1677], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1676_C4", "vector": [13, 2, 0.8389, 0.0005, 2, 0.13, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._activeClassesList[-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1679_C4", "label": "_popActiveClassCompiler", "type": "function", "loc": [1679, 1680], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8402, 0.001, 1, 0.35, 0.2632, 130, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "_popActiveClassCompiler", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _popActiveClassCompiler(self):\n return self._activeClassesList.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1680_C8", "label": "return", "type": "return", "loc": [1680, 1680], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1679_C4", "vector": [13, 2, 0.8404, 0.0005, 2, 0.43, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._activeClassesList.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1682_C4", "label": "_swallowClassCompiler", "type": "function", "loc": [1682, 1686], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8424, 0.0025, 1, 0.35, 0.2895, 851, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "_swallowClassCompiler", "arg_names": ["self", "classCompiler"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _swallowClassCompiler(self, classCompiler):\n classCompiler.cleanupState()\n self._finishedClassesList.append( classCompiler )\n self._finishedClassIndex[classCompiler.className()] = classCompiler\n return classCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1683_C8", "label": "cleanupState()", "type": "expression", "loc": [1683, 1683], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1682_C4", "vector": [8, 2, 0.8419, 0.0005, 2, 0.19, 0.0, 776, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "cleanupState", "arg_names": [], "import_names": [], "rhs_call_name": "cleanupState", "annotation": ""}, "snippet": " classCompiler.cleanupState()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1684_C8", "label": "append()", "type": "expression", "loc": [1684, 1684], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1682_C4", "vector": [8, 2, 0.8424, 0.0005, 2, 0.19, 0.3333, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._finishedClassesList.append( classCompiler )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1685_C8", "label": "assign", "type": "assigned_variable", "loc": [1685, 1685], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1682_C4", "vector": [14, 2, 0.8429, 0.0005, 2, 0.19, 0.6667, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._finishedClassIndex[classCompiler.className()] = classCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1686_C8", "label": "return", "type": "return", "loc": [1686, 1686], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1682_C4", "vector": [13, 2, 0.8434, 0.0005, 2, 0.19, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return classCompiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1688_C4", "label": "_finishedClasses", "type": "function", "loc": [1688, 1689], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8447, 0.001, 1, 0.35, 0.3158, 94, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "_finishedClasses", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _finishedClasses(self):\n return self._finishedClassesList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1689_C8", "label": "return", "type": "return", "loc": [1689, 1689], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1688_C4", "vector": [13, 2, 0.8449, 0.0005, 2, 0.83, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._finishedClassesList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1691_C4", "label": "importedVarNames", "type": "function", "loc": [1691, 1692], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8462, 0.001, 1, 0.35, 0.3421, 154, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "importedVarNames", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def importedVarNames(self):\n return self._importedVarNames"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1692_C8", "label": "return", "type": "return", "loc": [1692, 1692], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1691_C4", "vector": [13, 2, 0.8464, 0.0005, 2, 0.13, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._importedVarNames"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1694_C4", "label": "addImportedVarNames", "type": "function", "loc": [1694, 1702], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8494, 0.0045, 1, 0.35, 0.3684, 846, 0, 3, 0, 0, 0, 0, 5], "semantic": {"name": "addImportedVarNames", "arg_names": ["self", "varNames", "raw_statement"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addImportedVarNames(self, varNames, raw_statement=None):\n settings = self.settings()\n if not varNames:\n return \n if not settings.get('useLegacyImportMode'):\n if raw_statement and getattr(self, '_methodBodyChunks'):\n self.addChunk(raw_statement)\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1695_C8", "label": "settings = settings()", "type": "assigned_variable", "loc": [1695, 1695], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1694_C4", "vector": [14, 2, 0.8479, 0.0005, 2, 0.64, 0.0, 168, 3, 0, 0, 0, 168, 10, 1], "semantic": {"name": "settings", "arg_names": [], "import_names": [], "rhs_call_name": "settings", "annotation": ""}, "snippet": " settings = self.settings()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1696_C8", "label": "if", "type": "if", "loc": [1696, 1697], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1694_C4", "vector": [4, 2, 0.8487, 0.001, 2, 0.64, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not varNames:\n return "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1697_C12", "label": "return", "type": "return", "loc": [1697, 1697], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1696_C8", "vector": [13, 3, 0.8489, 0.0005, 3, 0.21, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1698_C8", "label": "if", "type": "if", "loc": [1698, 1702], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1694_C4", "vector": [4, 2, 0.8504, 0.0025, 2, 0.64, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not settings.get('useLegacyImportMode'):\n if raw_statement and getattr(self, '_methodBodyChunks'):\n self.addChunk(raw_statement)\n else:\n self._importedVarNames.extend(varNames)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1699_C12", "label": "if", "type": "if", "loc": [1699, 1700], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1698_C8", "vector": [4, 3, 0.8502, 0.001, 3, 0.22, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if raw_statement and getattr(self, '_methodBodyChunks'):\n self.addChunk(raw_statement)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1700_C16", "label": "addChunk()", "type": "expression", "loc": [1700, 1700], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1699_C12", "vector": [8, 4, 0.8504, 0.0005, 4, 0.62, 0.0, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addChunk", "arg_names": [], "import_names": [], "rhs_call_name": "addChunk", "annotation": ""}, "snippet": " self.addChunk(raw_statement)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1702_C12", "label": "extend()", "type": "expression", "loc": [1702, 1702], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1698_C8", "vector": [8, 3, 0.8514, 0.0005, 3, 0.22, 1.0, 660, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "extend", "arg_names": [], "import_names": [], "rhs_call_name": "extend", "annotation": ""}, "snippet": " self._importedVarNames.extend(varNames)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1706_C4", "label": "setBaseClass", "type": "function", "loc": [1706, 1762], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8674, 0.0285, 1, 0.35, 0.3947, 143, 0, 2, 0, 0, 0, 0, 30], "semantic": {"name": "setBaseClass", "arg_names": ["self", "baseClassName"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setBaseClass(self, baseClassName):\n if self._mainMethodNameArg:\n self.setMainMethodName(self._mainMethodNameArg)\n else:\n self.setMainMethodName(self.setting('mainMethodNameForSubclasses'))\n \n if self.setting('handlerForExtendsDirective'):\n handler = self.setting('handlerForExtendsDirective')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1707_C8", "label": "if", "type": "if", "loc": [1707, 1710], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1706_C4", "vector": [4, 2, 0.8547, 0.002, 2, 0.14, 0.0, 0, 7, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._mainMethodNameArg:\n self.setMainMethodName(self._mainMethodNameArg)\n else:\n self.setMainMethodName(self.setting('mainMethodNameForSubclasses'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1708_C12", "label": "setMainMethodName()", "type": "expression", "loc": [1708, 1708], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1707_C8", "vector": [8, 3, 0.8544, 0.0005, 3, 0.19, 0.0, 62, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setMainMethodName", "arg_names": [], "import_names": [], "rhs_call_name": "setMainMethodName", "annotation": ""}, "snippet": " self.setMainMethodName(self._mainMethodNameArg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1710_C12", "label": "setMainMethodName()", "type": "expression", "loc": [1710, 1710], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1707_C8", "vector": [8, 3, 0.8554, 0.0005, 3, 0.19, 1.0, 62, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setMainMethodName", "arg_names": [], "import_names": [], "rhs_call_name": "setMainMethodName", "annotation": ""}, "snippet": " self.setMainMethodName(self.setting('mainMethodNameForSubclasses'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1712_C8", "label": "if", "type": "if", "loc": [1712, 1762], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1706_C4", "vector": [4, 2, 0.8689, 0.0255, 2, 0.14, 1.0, 0, 3, 0, 0, 0, 0, 0, 27], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('handlerForExtendsDirective'):\n handler = self.setting('handlerForExtendsDirective')\n baseClassName = handler(compiler=self, baseClassName=baseClassName)\n self._getActiveClassCompiler().setBaseClass(baseClassName)\n elif (not self.setting('autoImportForExtendsDirective')\n or baseClassName=='object' or baseClassName in self.importedVarNames()):\n self._getActiveClassCompiler().setBaseClass(baseClassName)\n # no need to import"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1713_C12", "label": "handler = setting()", "type": "assigned_variable", "loc": [1713, 1713], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1712_C8", "vector": [14, 3, 0.8569, 0.0005, 3, 0.16, 0.0, 388, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "handler", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " handler = self.setting('handlerForExtendsDirective')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1714_C12", "label": "baseClassName = handler()", "type": "assigned_variable", "loc": [1714, 1714], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1712_C8", "vector": [14, 3, 0.8574, 0.0005, 3, 0.16, 0.3333, 155, 3, 2, 0, 0, 388, 10, 1], "semantic": {"name": "baseClassName", "arg_names": [], "import_names": [], "rhs_call_name": "handler", "annotation": ""}, "snippet": " baseClassName = handler(compiler=self, baseClassName=baseClassName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1715_C12", "label": "setBaseClass()", "type": "expression", "loc": [1715, 1715], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1712_C8", "vector": [8, 3, 0.8579, 0.0005, 3, 0.16, 0.6667, 143, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setBaseClass", "arg_names": [], "import_names": [], "rhs_call_name": "setBaseClass", "annotation": ""}, "snippet": " self._getActiveClassCompiler().setBaseClass(baseClassName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1716_C8", "label": "if", "type": "if", "loc": [1716, 1762], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1712_C8", "vector": [4, 3, 0.8699, 0.0235, 3, 0.16, 1.0, 0, 0, 0, 0, 0, 0, 0, 22], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif (not self.setting('autoImportForExtendsDirective')\n or baseClassName=='object' or baseClassName in self.importedVarNames()):\n self._getActiveClassCompiler().setBaseClass(baseClassName)\n # no need to import\n else:\n ##################################################\n ## If the #extends directive contains a classname or modulename that isn't\n # in self.importedVarNames() already, we assume that we need to add"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1718_C12", "label": "setBaseClass()", "type": "expression", "loc": [1718, 1718], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1716_C8", "vector": [8, 4, 0.8594, 0.0005, 4, 0.93, 0.0, 143, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setBaseClass", "arg_names": [], "import_names": [], "rhs_call_name": "setBaseClass", "annotation": ""}, "snippet": " self._getActiveClassCompiler().setBaseClass(baseClassName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1729_C12", "label": "baseclasses = split()", "type": "assigned_variable", "loc": [1729, 1729], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1716_C8", "vector": [14, 4, 0.8649, 0.0005, 4, 0.93, 0.5, 762, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "baseclasses", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " baseclasses = baseClassName.split(',')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1730_C12", "label": "for klass", "type": "for", "loc": [1730, 1762], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1716_C8", "vector": [6, 4, 0.8734, 0.0165, 4, 0.93, 1.0, 35, 2, 0, 0, 0, 0, 0, 17], "semantic": {"name": "klass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for klass in baseclasses:\n chunks = klass.split('.')\n if len(chunks)==1:\n self._getActiveClassCompiler().setBaseClass(klass)\n if klass not in self.importedVarNames():\n modName = klass\n # we assume the class name to be the module name\n # and that it's not a builtin:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1731_C16", "label": "chunks = split()", "type": "assigned_variable", "loc": [1731, 1731], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1730_C12", "vector": [14, 5, 0.8659, 0.0005, 5, 0.3, 0.0, 284, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "chunks", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " chunks = klass.split('.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1732_C16", "label": "if", "type": "if", "loc": [1732, 1762], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1730_C12", "vector": [4, 5, 0.8739, 0.0155, 5, 0.3, 1.0, 0, 0, 0, 0, 0, 0, 0, 16], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(chunks)==1:\n self._getActiveClassCompiler().setBaseClass(klass)\n if klass not in self.importedVarNames():\n modName = klass\n # we assume the class name to be the module name\n # and that it's not a builtin:\n importStatement = \"from %s import %s\" % (modName, klass)\n self.addImportStatement(importStatement)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1733_C20", "label": "setBaseClass()", "type": "expression", "loc": [1733, 1733], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1732_C16", "vector": [8, 6, 0.8669, 0.0005, 6, 0.26, 0.0, 143, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setBaseClass", "arg_names": [], "import_names": [], "rhs_call_name": "setBaseClass", "annotation": ""}, "snippet": " self._getActiveClassCompiler().setBaseClass(klass)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1734_C20", "label": "if", "type": "if", "loc": [1734, 1740], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1732_C16", "vector": [4, 6, 0.8689, 0.0035, 6, 0.26, 0.2, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if klass not in self.importedVarNames():\n modName = klass\n # we assume the class name to be the module name\n # and that it's not a builtin:\n importStatement = \"from %s import %s\" % (modName, klass)\n self.addImportStatement(importStatement)\n self.addImportedVarNames((klass,))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1735_C24", "label": "modName =", "type": "assigned_variable", "loc": [1735, 1735], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1734_C20", "vector": [14, 7, 0.8679, 0.0005, 7, 0.39, 0.0, 623, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "modName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " modName = klass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1738_C24", "label": "importStatement =", "type": "assigned_variable", "loc": [1738, 1738], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1734_C20", "vector": [14, 7, 0.8694, 0.0005, 7, 0.39, 0.3333, 806, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "importStatement", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " importStatement = \"from %s import %s\" % (modName, klass)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1739_C24", "label": "addImportStatement()", "type": "expression", "loc": [1739, 1739], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1734_C20", "vector": [8, 7, 0.8699, 0.0005, 7, 0.39, 0.6667, 519, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addImportStatement", "arg_names": [], "import_names": [], "rhs_call_name": "addImportStatement", "annotation": ""}, "snippet": " self.addImportStatement(importStatement)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1740_C24", "label": "addImportedVarNames()", "type": "expression", "loc": [1740, 1740], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1734_C20", "vector": [8, 7, 0.8704, 0.0005, 7, 0.39, 1.0, 846, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addImportedVarNames", "arg_names": [], "import_names": [], "rhs_call_name": "addImportedVarNames", "annotation": ""}, "snippet": " self.addImportedVarNames((klass,))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1742_C20", "label": "needToAddImport =", "type": "assigned_variable", "loc": [1742, 1742], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1732_C16", "vector": [14, 6, 0.8714, 0.0005, 6, 0.26, 0.4, 240, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "needToAddImport", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " needToAddImport = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1743_C20", "label": "modName =", "type": "assigned_variable", "loc": [1743, 1743], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1732_C16", "vector": [14, 6, 0.8719, 0.0005, 6, 0.26, 0.6, 623, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "modName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " modName = chunks[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1745_C20", "label": "for chunk", "type": "for", "loc": [1745, 1752], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1732_C16", "vector": [6, 6, 0.8747, 0.004, 6, 0.26, 0.8, 637, 6, 0, 0, 0, 0, 0, 4], "semantic": {"name": "chunk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for chunk in chunks[1:-1]:\n if modName in self.importedVarNames():\n needToAddImport = False\n finalBaseClassName = klass.replace(modName+'.', '')\n self._getActiveClassCompiler().setBaseClass(finalBaseClassName)\n break\n else:\n modName += '.'+chunk "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1746_C24", "label": "if", "type": "if", "loc": [1746, 1752], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1745_C20", "vector": [4, 7, 0.8749, 0.0035, 7, 0.07, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if modName in self.importedVarNames():\n needToAddImport = False\n finalBaseClassName = klass.replace(modName+'.', '')\n self._getActiveClassCompiler().setBaseClass(finalBaseClassName)\n break\n else:\n modName += '.'+chunk "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1747_C28", "label": "needToAddImport =", "type": "assigned_variable", "loc": [1747, 1747], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1746_C24", "vector": [14, 8, 0.8739, 0.0005, 8, 0.04, 0.0, 240, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "needToAddImport", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " needToAddImport = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1748_C28", "label": "finalBaseClassName = replace()", "type": "assigned_variable", "loc": [1748, 1748], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1746_C24", "vector": [14, 8, 0.8744, 0.0005, 8, 0.04, 0.5, 434, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "finalBaseClassName", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " finalBaseClassName = klass.replace(modName+'.', '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1749_C28", "label": "setBaseClass()", "type": "expression", "loc": [1749, 1749], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1746_C24", "vector": [8, 8, 0.8749, 0.0005, 8, 0.04, 1.0, 143, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setBaseClass", "arg_names": [], "import_names": [], "rhs_call_name": "setBaseClass", "annotation": ""}, "snippet": " self._getActiveClassCompiler().setBaseClass(finalBaseClassName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1753_C20", "label": "if", "type": "if", "loc": [1753, 1762], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1732_C16", "vector": [4, 6, 0.8792, 0.005, 6, 0.26, 1.0, 0, 2, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if needToAddImport:\n modName, finalClassName = '.'.join(chunks[:-1]), chunks[-1] \n #if finalClassName != chunks[:-1][-1]:\n if finalClassName != chunks[-2]:\n # we assume the class name to be the module name\n modName = '.'.join(chunks)\n self._getActiveClassCompiler().setBaseClass(finalClassName) \n importStatement = \"from %s import %s\" % (modName, finalClassName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1754_C24", "label": "modName, finalClassName =", "type": "assigned_variable", "loc": [1754, 1754], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1753_C20", "vector": [14, 7, 0.8774, 0.0005, 7, 0.17, 0.0, 292, 0, 0, 0, 0, 0, 8, 1], "semantic": {"name": "modName, finalClassName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " modName, finalClassName = '.'.join(chunks[:-1]), chunks[-1] "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1756_C24", "label": "if", "type": "if", "loc": [1756, 1758], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1753_C20", "vector": [4, 7, 0.8789, 0.0015, 7, 0.17, 0.2, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if finalClassName != chunks[-2]:\n # we assume the class name to be the module name\n modName = '.'.join(chunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1758_C28", "label": "modName = join()", "type": "assigned_variable", "loc": [1758, 1758], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1756_C24", "vector": [14, 8, 0.8794, 0.0005, 8, 0.78, 0.0, 623, 3, 1, 0, 0, 933, 10, 1], "semantic": {"name": "modName", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " modName = '.'.join(chunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1759_C24", "label": "setBaseClass()", "type": "expression", "loc": [1759, 1759], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1753_C20", "vector": [8, 7, 0.8799, 0.0005, 7, 0.17, 0.4, 143, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setBaseClass", "arg_names": [], "import_names": [], "rhs_call_name": "setBaseClass", "annotation": ""}, "snippet": " self._getActiveClassCompiler().setBaseClass(finalClassName) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1760_C24", "label": "importStatement =", "type": "assigned_variable", "loc": [1760, 1760], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1753_C20", "vector": [14, 7, 0.8804, 0.0005, 7, 0.17, 0.6, 806, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "importStatement", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " importStatement = \"from %s import %s\" % (modName, finalClassName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1761_C24", "label": "addImportStatement()", "type": "expression", "loc": [1761, 1761], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1753_C20", "vector": [8, 7, 0.8809, 0.0005, 7, 0.17, 0.8, 519, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addImportStatement", "arg_names": [], "import_names": [], "rhs_call_name": "addImportStatement", "annotation": ""}, "snippet": " self.addImportStatement(importStatement)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1762_C24", "label": "addImportedVarNames()", "type": "expression", "loc": [1762, 1762], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1753_C20", "vector": [8, 7, 0.8814, 0.0005, 7, 0.17, 1.0, 846, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addImportedVarNames", "arg_names": [], "import_names": [], "rhs_call_name": "addImportedVarNames", "annotation": ""}, "snippet": " self.addImportedVarNames( [finalClassName,] ) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1764_C4", "label": "setCompilerSetting", "type": "function", "loc": [1764, 1766], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8829, 0.0015, 1, 0.35, 0.4211, 680, 0, 3, 0, 0, 0, 0, 3], "semantic": {"name": "setCompilerSetting", "arg_names": ["self", "key", "valueExpr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setCompilerSetting(self, key, valueExpr):\n self.setSetting(key, eval(valueExpr) )\n self._parser.configureParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1765_C8", "label": "setSetting()", "type": "expression", "loc": [1765, 1765], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1764_C4", "vector": [8, 2, 0.8829, 0.0005, 2, 0.61, 0.0, 856, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self.setSetting(key, eval(valueExpr) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1766_C8", "label": "configureParser()", "type": "expression", "loc": [1766, 1766], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1764_C4", "vector": [8, 2, 0.8834, 0.0005, 2, 0.61, 1.0, 43, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "configureParser", "arg_names": [], "import_names": [], "rhs_call_name": "configureParser", "annotation": ""}, "snippet": " self._parser.configureParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1768_C4", "label": "setCompilerSettings", "type": "function", "loc": [1768, 1788], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8894, 0.0105, 1, 0.35, 0.4474, 684, 0, 3, 0, 0, 0, 0, 4], "semantic": {"name": "setCompilerSettings", "arg_names": ["self", "keywords", "settingsStr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setCompilerSettings(self, keywords, settingsStr):\n KWs = keywords\n merge = True\n if 'nomerge' in KWs:\n merge = False\n \n if 'reset' in KWs:\n # @@TR: this is actually caught by the parser at the moment. "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1769_C8", "label": "KWs =", "type": "assigned_variable", "loc": [1769, 1769], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1768_C4", "vector": [14, 2, 0.8849, 0.0005, 2, 0.69, 0.0, 886, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "KWs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " KWs = keywords"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1770_C8", "label": "merge =", "type": "assigned_variable", "loc": [1770, 1770], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1768_C4", "vector": [14, 2, 0.8854, 0.0005, 2, 0.69, 0.2, 491, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "merge", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " merge = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1771_C8", "label": "if", "type": "if", "loc": [1771, 1772], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1768_C4", "vector": [4, 2, 0.8862, 0.001, 2, 0.69, 0.4, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'nomerge' in KWs:\n merge = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1772_C12", "label": "merge =", "type": "assigned_variable", "loc": [1772, 1772], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1771_C8", "vector": [14, 3, 0.8864, 0.0005, 3, 0.82, 0.0, 491, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "merge", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " merge = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1774_C8", "label": "if", "type": "if", "loc": [1774, 1785], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1768_C4", "vector": [4, 2, 0.8902, 0.006, 2, 0.69, 0.6, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'reset' in KWs:\n # @@TR: this is actually caught by the parser at the moment. \n # subject to change in the future\n self._initializeSettings()\n self._parser.configureParser()\n return\n elif 'python' in KWs:\n settingsReader = self.updateSettingsFromPySrcStr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1777_C12", "label": "_initializeSettings()", "type": "expression", "loc": [1777, 1777], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1774_C8", "vector": [8, 3, 0.8889, 0.0005, 3, 0.75, 0.0, 393, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_initializeSettings", "arg_names": [], "import_names": [], "rhs_call_name": "_initializeSettings", "annotation": ""}, "snippet": " self._initializeSettings()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1778_C12", "label": "configureParser()", "type": "expression", "loc": [1778, 1778], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1774_C8", "vector": [8, 3, 0.8894, 0.0005, 3, 0.75, 0.3333, 43, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "configureParser", "arg_names": [], "import_names": [], "rhs_call_name": "configureParser", "annotation": ""}, "snippet": " self._parser.configureParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1779_C12", "label": "return", "type": "return", "loc": [1779, 1779], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1774_C8", "vector": [13, 3, 0.8899, 0.0005, 3, 0.75, 0.6667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1780_C8", "label": "if", "type": "if", "loc": [1780, 1785], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1774_C8", "vector": [4, 3, 0.8917, 0.003, 3, 0.75, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif 'python' in KWs:\n settingsReader = self.updateSettingsFromPySrcStr\n # this comes from SettingsManager\n else:\n # this comes from SettingsManager\n settingsReader = self.updateSettingsFromConfigStr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1781_C12", "label": "settingsReader =", "type": "assigned_variable", "loc": [1781, 1781], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1780_C8", "vector": [14, 4, 0.8909, 0.0005, 4, 0.34, 0.0, 455, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "settingsReader", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " settingsReader = self.updateSettingsFromPySrcStr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1785_C12", "label": "settingsReader =", "type": "assigned_variable", "loc": [1785, 1785], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1780_C8", "vector": [14, 4, 0.8929, 0.0005, 4, 0.34, 1.0, 455, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "settingsReader", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " settingsReader = self.updateSettingsFromConfigStr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1787_C8", "label": "settingsReader()", "type": "expression", "loc": [1787, 1787], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1768_C4", "vector": [8, 2, 0.8939, 0.0005, 2, 0.69, 0.8, 455, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "settingsReader", "arg_names": [], "import_names": [], "rhs_call_name": "settingsReader", "annotation": ""}, "snippet": " settingsReader(settingsStr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1788_C8", "label": "configureParser()", "type": "expression", "loc": [1788, 1788], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1768_C4", "vector": [8, 2, 0.8944, 0.0005, 2, 0.69, 1.0, 43, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "configureParser", "arg_names": [], "import_names": [], "rhs_call_name": "configureParser", "annotation": ""}, "snippet": " self._parser.configureParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1790_C4", "label": "setShBang", "type": "function", "loc": [1790, 1791], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8957, 0.001, 1, 0.35, 0.4737, 182, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "setShBang", "arg_names": ["self", "shBang"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setShBang(self, shBang):\n self._moduleShBang = shBang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1791_C8", "label": "self._moduleShBang =", "type": "assigned_variable", "loc": [1791, 1791], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1790_C4", "vector": [14, 2, 0.8959, 0.0005, 2, 0.84, 0.0, 513, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._moduleShBang", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._moduleShBang = shBang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1793_C4", "label": "setModuleEncoding", "type": "function", "loc": [1793, 1794], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8972, 0.001, 1, 0.35, 0.5, 14, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "setModuleEncoding", "arg_names": ["self", "encoding"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setModuleEncoding(self, encoding):\n self._moduleEncoding = encoding"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1794_C8", "label": "self._moduleEncoding =", "type": "assigned_variable", "loc": [1794, 1794], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1793_C4", "vector": [14, 2, 0.8974, 0.0005, 2, 0.22, 0.0, 396, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._moduleEncoding", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._moduleEncoding = encoding"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1796_C4", "label": "getModuleEncoding", "type": "function", "loc": [1796, 1797], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.8987, 0.001, 1, 0.35, 0.5263, 171, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "getModuleEncoding", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getModuleEncoding(self):\n return self._moduleEncoding"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1797_C8", "label": "return", "type": "return", "loc": [1797, 1797], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1796_C4", "vector": [13, 2, 0.8989, 0.0005, 2, 0.24, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._moduleEncoding"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1799_C4", "label": "addModuleHeader", "type": "function", "loc": [1799, 1802], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.9007, 0.002, 1, 0.35, 0.5526, 36, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addModuleHeader", "arg_names": ["self", "line"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addModuleHeader(self, line):\n \"\"\"Adds a header comment to the top of the generated module.\n \"\"\"\n self._moduleHeaderLines.append(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1800_C8", "label": "expression", "type": "expression", "loc": [1800, 1801], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1799_C4", "vector": [8, 2, 0.9007, 0.001, 2, 0.96, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Adds a header comment to the top of the generated module.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1802_C8", "label": "append()", "type": "expression", "loc": [1802, 1802], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1799_C4", "vector": [8, 2, 0.9015, 0.0005, 2, 0.96, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._moduleHeaderLines.append(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1804_C4", "label": "addModuleDocString", "type": "function", "loc": [1804, 1807], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.9032, 0.002, 1, 0.35, 0.5789, 227, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addModuleDocString", "arg_names": ["self", "line"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addModuleDocString(self, line): \n \"\"\"Adds a line to the generated module docstring.\n \"\"\"\n self._moduleDocStringLines.append(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1805_C8", "label": "expression", "type": "expression", "loc": [1805, 1806], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1804_C4", "vector": [8, 2, 0.9032, 0.001, 2, 0.23, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Adds a line to the generated module docstring.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1807_C8", "label": "append()", "type": "expression", "loc": [1807, 1807], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1804_C4", "vector": [8, 2, 0.904, 0.0005, 2, 0.23, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._moduleDocStringLines.append(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1809_C4", "label": "addModuleGlobal", "type": "function", "loc": [1809, 1813], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.906, 0.0025, 1, 0.35, 0.6053, 92, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addModuleGlobal", "arg_names": ["self", "line"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addModuleGlobal(self, line):\n \"\"\"Adds a line of global module code. It is inserted after the import\n statements and Cheetah default module constants.\n \"\"\"\n self._moduleConstants.append(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1810_C8", "label": "expression", "type": "expression", "loc": [1810, 1812], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1809_C4", "vector": [8, 2, 0.906, 0.0015, 2, 0.54, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Adds a line of global module code. It is inserted after the import\n statements and Cheetah default module constants.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1813_C8", "label": "append()", "type": "expression", "loc": [1813, 1813], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1809_C4", "vector": [8, 2, 0.907, 0.0005, 2, 0.54, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._moduleConstants.append(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1815_C4", "label": "addSpecialVar", "type": "function", "loc": [1815, 1819], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.909, 0.0025, 1, 0.35, 0.6316, 524, 0, 4, 0, 0, 0, 0, 1], "semantic": {"name": "addSpecialVar", "arg_names": ["self", "basename", "contents", "includeUnderscores"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addSpecialVar(self, basename, contents, includeUnderscores=True):\n \"\"\"Adds module __specialConstant__ to the module globals.\n \"\"\"\n name = includeUnderscores and '__'+basename+'__' or basename\n self._specialVars[name] = contents.strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1816_C8", "label": "expression", "type": "expression", "loc": [1816, 1817], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1815_C4", "vector": [8, 2, 0.9087, 0.001, 2, 0.94, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Adds module __specialConstant__ to the module globals.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1818_C8", "label": "name =", "type": "assigned_variable", "loc": [1818, 1818], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1815_C4", "vector": [14, 2, 0.9095, 0.0005, 2, 0.94, 0.5, 57, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " name = includeUnderscores and '__'+basename+'__' or basename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1819_C8", "label": " = strip()", "type": "assigned_variable", "loc": [1819, 1819], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1815_C4", "vector": [14, 2, 0.91, 0.0005, 2, 0.94, 1.0, 0, 3, 0, 0, 0, 973, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " self._specialVars[name] = contents.strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1821_C4", "label": "addImportStatement", "type": "function", "loc": [1821, 1832], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.9137, 0.006, 1, 0.35, 0.6579, 519, 0, 2, 0, 0, 0, 0, 8], "semantic": {"name": "addImportStatement", "arg_names": ["self", "impStatement"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addImportStatement(self, impStatement):\n settings = self.settings()\n if not self._methodBodyChunks or settings.get('useLegacyImportMode'):\n # In the case where we are importing inline in the middle of a source block\n # we don't want to inadvertantly import the module at the top of the file either\n self._importStatements.append(impStatement)\n\n #@@TR 2005-01-01: there's almost certainly a cleaner way to do this!"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1822_C8", "label": "settings = settings()", "type": "assigned_variable", "loc": [1822, 1822], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1821_C4", "vector": [14, 2, 0.9115, 0.0005, 2, 0.27, 0.0, 168, 3, 0, 0, 0, 168, 10, 1], "semantic": {"name": "settings", "arg_names": [], "import_names": [], "rhs_call_name": "settings", "annotation": ""}, "snippet": " settings = self.settings()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1823_C8", "label": "if", "type": "if", "loc": [1823, 1826], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1821_C4", "vector": [4, 2, 0.9127, 0.002, 2, 0.27, 0.2, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self._methodBodyChunks or settings.get('useLegacyImportMode'):\n # In the case where we are importing inline in the middle of a source block\n # we don't want to inadvertantly import the module at the top of the file either\n self._importStatements.append(impStatement)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1826_C12", "label": "append()", "type": "expression", "loc": [1826, 1826], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1823_C8", "vector": [8, 3, 0.9135, 0.0005, 3, 0.48, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._importStatements.append(impStatement)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1829_C8", "label": "importVarNames = split()", "type": "assigned_variable", "loc": [1829, 1829], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1821_C4", "vector": [14, 2, 0.915, 0.0005, 2, 0.27, 0.4, 480, 3, 1, 0, 0, 908, 10, 3], "semantic": {"name": "importVarNames", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " importVarNames = impStatement[impStatement.find('import') + len('import'):].split(',')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1830_C8", "label": "importVarNames =", "type": "assigned_variable", "loc": [1830, 1830], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1821_C4", "vector": [14, 2, 0.9155, 0.0005, 2, 0.27, 0.6, 480, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "importVarNames", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " importVarNames = [var.split()[-1] for var in importVarNames] # handles aliases"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1831_C8", "label": "importVarNames =", "type": "assigned_variable", "loc": [1831, 1831], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1821_C4", "vector": [14, 2, 0.916, 0.0005, 2, 0.27, 0.8, 480, 5, 0, 0, 0, 0, 0, 0], "semantic": {"name": "importVarNames", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " importVarNames = [var for var in importVarNames if not var == '*']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1832_C8", "label": "addImportedVarNames()", "type": "expression", "loc": [1832, 1832], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1821_C4", "vector": [8, 2, 0.9165, 0.0005, 2, 0.27, 1.0, 846, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addImportedVarNames", "arg_names": [], "import_names": [], "rhs_call_name": "addImportedVarNames", "annotation": ""}, "snippet": " self.addImportedVarNames(importVarNames, raw_statement=impStatement) #used by #extend for auto-imports"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1834_C4", "label": "addAttribute", "type": "function", "loc": [1834, 1835], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.9177, 0.001, 1, 0.35, 0.6842, 333, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "addAttribute", "arg_names": ["self", "attribName", "expr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addAttribute(self, attribName, expr):\n self._getActiveClassCompiler().addAttribute(attribName + ' =' + expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1835_C8", "label": "addAttribute()", "type": "expression", "loc": [1835, 1835], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1834_C4", "vector": [8, 2, 0.918, 0.0005, 2, 0.14, 0.0, 333, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addAttribute", "arg_names": [], "import_names": [], "rhs_call_name": "addAttribute", "annotation": ""}, "snippet": " self._getActiveClassCompiler().addAttribute(attribName + ' =' + expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1837_C4", "label": "addComment", "type": "function", "loc": [1837, 1866], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.9262, 0.015, 1, 0.35, 0.7105, 738, 0, 2, 1, 0, 0, 0, 22], "semantic": {"name": "addComment", "arg_names": ["self", "comm"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addComment(self, comm):\n if re.match(r'#+$', comm): # skip bar comments\n return\n \n specialVarMatch = specialVarRE.match(comm)\n if specialVarMatch:\n # @@TR: this is a bit hackish and is being replaced with\n # #set module varName = ..."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1838_C8", "label": "if", "type": "if", "loc": [1838, 1839], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1837_C4", "vector": [4, 2, 0.9197, 0.001, 2, 0.62, 0.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if re.match(r'#+$', comm): # skip bar comments\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1839_C12", "label": "return", "type": "return", "loc": [1839, 1839], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1838_C8", "vector": [13, 3, 0.92, 0.0005, 3, 0.26, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1841_C8", "label": "specialVarMatch = match()", "type": "assigned_variable", "loc": [1841, 1841], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1837_C4", "vector": [14, 2, 0.921, 0.0005, 2, 0.62, 0.3333, 403, 3, 1, 0, 0, 36, 10, 1], "semantic": {"name": "specialVarMatch", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " specialVarMatch = specialVarRE.match(comm)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1842_C8", "label": "if", "type": "if", "loc": [1842, 1863], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1837_C4", "vector": [4, 2, 0.9267, 0.011, 2, 0.62, 0.6667, 0, 2, 0, 0, 0, 0, 0, 18], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if specialVarMatch:\n # @@TR: this is a bit hackish and is being replaced with\n # #set module varName = ...\n return self.addSpecialVar(specialVarMatch.group(1),\n comm[specialVarMatch.end():])\n elif comm.startswith('doc:'):\n addLine = self.addMethDocString\n comm = comm[len('doc:'):].strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1845_C12", "label": "return", "type": "return", "loc": [1845, 1846], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1842_C8", "vector": [13, 3, 0.9232, 0.001, 3, 0.23, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.addSpecialVar(specialVarMatch.group(1),\n comm[specialVarMatch.end():])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1847_C8", "label": "if", "type": "if", "loc": [1847, 1863], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1842_C8", "vector": [4, 3, 0.928, 0.0085, 3, 0.23, 1.0, 0, 3, 0, 0, 0, 0, 0, 15], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif comm.startswith('doc:'):\n addLine = self.addMethDocString\n comm = comm[len('doc:'):].strip()\n elif comm.startswith('doc-method:'):\n addLine = self.addMethDocString\n comm = comm[len('doc-method:'):].strip()\n elif comm.startswith('doc-module:'):\n addLine = self.addModuleDocString"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1848_C12", "label": "addLine =", "type": "assigned_variable", "loc": [1848, 1848], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1847_C8", "vector": [14, 4, 0.9245, 0.0005, 4, 0.48, 0.0, 986, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "addLine", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " addLine = self.addMethDocString"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1849_C12", "label": "comm = strip()", "type": "assigned_variable", "loc": [1849, 1849], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1847_C8", "vector": [14, 4, 0.925, 0.0005, 4, 0.48, 0.5, 544, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "comm", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " comm = comm[len('doc:'):].strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1850_C8", "label": "if", "type": "if", "loc": [1850, 1863], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1847_C8", "vector": [4, 4, 0.9287, 0.007, 4, 0.48, 1.0, 0, 3, 0, 0, 0, 0, 0, 12], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif comm.startswith('doc-method:'):\n addLine = self.addMethDocString\n comm = comm[len('doc-method:'):].strip()\n elif comm.startswith('doc-module:'):\n addLine = self.addModuleDocString\n comm = comm[len('doc-module:'):].strip()\n elif comm.startswith('doc-class:'):\n addLine = self.addClassDocString"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1851_C12", "label": "addLine =", "type": "assigned_variable", "loc": [1851, 1851], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1850_C8", "vector": [14, 5, 0.926, 0.0005, 5, 0.9, 0.0, 986, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "addLine", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " addLine = self.addMethDocString"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1852_C12", "label": "comm = strip()", "type": "assigned_variable", "loc": [1852, 1852], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1850_C8", "vector": [14, 5, 0.9265, 0.0005, 5, 0.9, 0.5, 544, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "comm", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " comm = comm[len('doc-method:'):].strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1853_C8", "label": "if", "type": "if", "loc": [1853, 1863], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1850_C8", "vector": [4, 5, 0.9295, 0.0055, 5, 0.9, 1.0, 0, 3, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif comm.startswith('doc-module:'):\n addLine = self.addModuleDocString\n comm = comm[len('doc-module:'):].strip()\n elif comm.startswith('doc-class:'):\n addLine = self.addClassDocString\n comm = comm[len('doc-class:'):].strip()\n elif comm.startswith('header:'):\n addLine = self.addModuleHeader"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1854_C12", "label": "addLine =", "type": "assigned_variable", "loc": [1854, 1854], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1853_C8", "vector": [14, 6, 0.9275, 0.0005, 6, 0.72, 0.0, 986, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "addLine", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " addLine = self.addModuleDocString"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1855_C12", "label": "comm = strip()", "type": "assigned_variable", "loc": [1855, 1855], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1853_C8", "vector": [14, 6, 0.928, 0.0005, 6, 0.72, 0.5, 544, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "comm", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " comm = comm[len('doc-module:'):].strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1856_C8", "label": "if", "type": "if", "loc": [1856, 1863], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1853_C8", "vector": [4, 6, 0.9302, 0.004, 6, 0.72, 1.0, 0, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif comm.startswith('doc-class:'):\n addLine = self.addClassDocString\n comm = comm[len('doc-class:'):].strip()\n elif comm.startswith('header:'):\n addLine = self.addModuleHeader\n comm = comm[len('header:'):].strip()\n else:\n addLine = self.addMethComment"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1857_C12", "label": "addLine =", "type": "assigned_variable", "loc": [1857, 1857], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1856_C8", "vector": [14, 7, 0.929, 0.0005, 7, 0.58, 0.0, 986, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "addLine", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " addLine = self.addClassDocString"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1858_C12", "label": "comm = strip()", "type": "assigned_variable", "loc": [1858, 1858], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1856_C8", "vector": [14, 7, 0.9295, 0.0005, 7, 0.58, 0.5, 544, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "comm", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " comm = comm[len('doc-class:'):].strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1859_C8", "label": "if", "type": "if", "loc": [1859, 1863], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1856_C8", "vector": [4, 7, 0.931, 0.0025, 7, 0.58, 1.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif comm.startswith('header:'):\n addLine = self.addModuleHeader\n comm = comm[len('header:'):].strip()\n else:\n addLine = self.addMethComment"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1860_C12", "label": "addLine =", "type": "assigned_variable", "loc": [1860, 1860], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1859_C8", "vector": [14, 8, 0.9305, 0.0005, 8, 0.65, 0.0, 986, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "addLine", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " addLine = self.addModuleHeader"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1861_C12", "label": "comm = strip()", "type": "assigned_variable", "loc": [1861, 1861], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1859_C8", "vector": [14, 8, 0.931, 0.0005, 8, 0.65, 0.5, 544, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "comm", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " comm = comm[len('header:'):].strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1863_C12", "label": "addLine =", "type": "assigned_variable", "loc": [1863, 1863], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1859_C8", "vector": [14, 8, 0.932, 0.0005, 8, 0.65, 1.0, 986, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "addLine", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " addLine = self.addMethComment"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1865_C8", "label": "for line", "type": "for", "loc": [1865, 1866], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1837_C4", "vector": [6, 2, 0.9332, 0.001, 2, 0.62, 1.0, 373, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in comm.splitlines():\n addLine(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1866_C12", "label": "addLine()", "type": "expression", "loc": [1866, 1866], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1865_C8", "vector": [8, 3, 0.9335, 0.0005, 3, 0.33, 0.0, 986, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addLine", "arg_names": [], "import_names": [], "rhs_call_name": "addLine", "annotation": ""}, "snippet": " addLine(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1870_C4", "label": "getModuleCode", "type": "function", "loc": [1870, 1876], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.937, 0.0035, 1, 0.35, 0.7368, 625, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "getModuleCode", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getModuleCode(self):\n if not self._compiled:\n self.compile()\n if self._moduleDef:\n return self._moduleDef\n else:\n return self.wrapModuleDef()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1871_C8", "label": "if", "type": "if", "loc": [1871, 1872], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1870_C4", "vector": [4, 2, 0.9362, 0.001, 2, 0.77, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self._compiled:\n self.compile()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1872_C12", "label": "compile()", "type": "expression", "loc": [1872, 1872], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1871_C8", "vector": [8, 3, 0.9365, 0.0005, 3, 0.0, 0.0, 821, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "compile", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " self.compile()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1873_C8", "label": "if", "type": "if", "loc": [1873, 1876], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1870_C4", "vector": [4, 2, 0.9377, 0.002, 2, 0.77, 1.0, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._moduleDef:\n return self._moduleDef\n else:\n return self.wrapModuleDef()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1874_C12", "label": "return", "type": "return", "loc": [1874, 1874], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1873_C8", "vector": [13, 3, 0.9375, 0.0005, 3, 0.19, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._moduleDef"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1876_C12", "label": "return", "type": "return", "loc": [1876, 1876], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1873_C8", "vector": [13, 3, 0.9385, 0.0005, 3, 0.19, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.wrapModuleDef()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1878_C4", "label": "__str__ =", "type": "assigned_variable", "loc": [1878, 1878], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [14, 1, 0.9395, 0.0005, 1, 0.35, 0.7632, 527, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__str__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __str__ = getModuleCode"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "label": "wrapModuleDef", "type": "function", "loc": [1880, 1936], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.9545, 0.0285, 1, 0.35, 0.7895, 663, 0, 1, 1, 0, 0, 0, 21], "semantic": {"name": "wrapModuleDef", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def wrapModuleDef(self):\n self.addSpecialVar('CHEETAH_docstring', self.setting('defDocStrMsg'))\n self.addModuleGlobal('__CHEETAH_version__ = %r'%Version)\n self.addModuleGlobal('__CHEETAH_versionTuple__ = %r'%(VersionTuple,)) \n if self.setting('addTimestampsToCompilerOutput'):\n self.addModuleGlobal('__CHEETAH_genTime__ = %r'%time.time())\n self.addModuleGlobal('__CHEETAH_genTimestamp__ = %r'%self.timestamp())\n if self._filePath:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1881_C8", "label": "addSpecialVar()", "type": "expression", "loc": [1881, 1881], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "vector": [8, 2, 0.941, 0.0005, 2, 0.29, 0.0, 524, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "addSpecialVar", "arg_names": [], "import_names": [], "rhs_call_name": "addSpecialVar", "annotation": ""}, "snippet": " self.addSpecialVar('CHEETAH_docstring', self.setting('defDocStrMsg'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1882_C8", "label": "addModuleGlobal()", "type": "expression", "loc": [1882, 1882], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "vector": [8, 2, 0.9415, 0.0005, 2, 0.29, 0.1429, 92, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addModuleGlobal", "arg_names": [], "import_names": [], "rhs_call_name": "addModuleGlobal", "annotation": ""}, "snippet": " self.addModuleGlobal('__CHEETAH_version__ = %r'%Version)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1883_C8", "label": "addModuleGlobal()", "type": "expression", "loc": [1883, 1883], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "vector": [8, 2, 0.942, 0.0005, 2, 0.29, 0.2857, 92, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addModuleGlobal", "arg_names": [], "import_names": [], "rhs_call_name": "addModuleGlobal", "annotation": ""}, "snippet": " self.addModuleGlobal('__CHEETAH_versionTuple__ = %r'%(VersionTuple,)) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1884_C8", "label": "if", "type": "if", "loc": [1884, 1886], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "vector": [4, 2, 0.943, 0.0015, 2, 0.29, 0.4286, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('addTimestampsToCompilerOutput'):\n self.addModuleGlobal('__CHEETAH_genTime__ = %r'%time.time())\n self.addModuleGlobal('__CHEETAH_genTimestamp__ = %r'%self.timestamp())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1885_C12", "label": "addModuleGlobal()", "type": "expression", "loc": [1885, 1885], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1884_C8", "vector": [8, 3, 0.943, 0.0005, 3, 0.17, 0.0, 92, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addModuleGlobal", "arg_names": [], "import_names": [], "rhs_call_name": "addModuleGlobal", "annotation": ""}, "snippet": " self.addModuleGlobal('__CHEETAH_genTime__ = %r'%time.time())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1886_C12", "label": "addModuleGlobal()", "type": "expression", "loc": [1886, 1886], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1884_C8", "vector": [8, 3, 0.9435, 0.0005, 3, 0.17, 1.0, 92, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addModuleGlobal", "arg_names": [], "import_names": [], "rhs_call_name": "addModuleGlobal", "annotation": ""}, "snippet": " self.addModuleGlobal('__CHEETAH_genTimestamp__ = %r'%self.timestamp())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1887_C8", "label": "if", "type": "if", "loc": [1887, 1893], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "vector": [4, 2, 0.9455, 0.0035, 2, 0.29, 0.5714, 0, 7, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._filePath:\n timestamp = self.timestamp(self._fileMtime)\n self.addModuleGlobal('__CHEETAH_src__ = %r'%self._filePath)\n self.addModuleGlobal('__CHEETAH_srcLastModified__ = %r'%timestamp)\n else:\n self.addModuleGlobal('__CHEETAH_src__ = None')\n self.addModuleGlobal('__CHEETAH_srcLastModified__ = None') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1888_C12", "label": "timestamp = timestamp()", "type": "assigned_variable", "loc": [1888, 1888], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1887_C8", "vector": [14, 3, 0.9445, 0.0005, 3, 0.87, 0.0, 834, 3, 1, 0, 0, 834, 10, 1], "semantic": {"name": "timestamp", "arg_names": [], "import_names": [], "rhs_call_name": "timestamp", "annotation": ""}, "snippet": " timestamp = self.timestamp(self._fileMtime)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1889_C12", "label": "addModuleGlobal()", "type": "expression", "loc": [1889, 1889], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1887_C8", "vector": [8, 3, 0.945, 0.0005, 3, 0.87, 0.25, 92, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addModuleGlobal", "arg_names": [], "import_names": [], "rhs_call_name": "addModuleGlobal", "annotation": ""}, "snippet": " self.addModuleGlobal('__CHEETAH_src__ = %r'%self._filePath)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1890_C12", "label": "addModuleGlobal()", "type": "expression", "loc": [1890, 1890], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1887_C8", "vector": [8, 3, 0.9455, 0.0005, 3, 0.87, 0.5, 92, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addModuleGlobal", "arg_names": [], "import_names": [], "rhs_call_name": "addModuleGlobal", "annotation": ""}, "snippet": " self.addModuleGlobal('__CHEETAH_srcLastModified__ = %r'%timestamp)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1892_C12", "label": "addModuleGlobal()", "type": "expression", "loc": [1892, 1892], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1887_C8", "vector": [8, 3, 0.9465, 0.0005, 3, 0.87, 0.75, 92, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addModuleGlobal", "arg_names": [], "import_names": [], "rhs_call_name": "addModuleGlobal", "annotation": ""}, "snippet": " self.addModuleGlobal('__CHEETAH_src__ = None')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1893_C12", "label": "addModuleGlobal()", "type": "expression", "loc": [1893, 1893], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1887_C8", "vector": [8, 3, 0.947, 0.0005, 3, 0.87, 1.0, 92, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addModuleGlobal", "arg_names": [], "import_names": [], "rhs_call_name": "addModuleGlobal", "annotation": ""}, "snippet": " self.addModuleGlobal('__CHEETAH_srcLastModified__ = None') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1895_C8", "label": "moduleDef =", "type": "assigned_variable", "loc": [1895, 1933], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "vector": [14, 2, 0.9575, 0.0195, 2, 0.29, 0.7143, 634, 4, 0, 0, 0, 0, 0, 7], "semantic": {"name": "moduleDef", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " moduleDef = \"\"\"%(header)s\n%(docstring)s\n\n##################################################\n## DEPENDENCIES\n%(imports)s\n\n##################################################"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1935_C8", "label": "self._moduleDef =", "type": "assigned_variable", "loc": [1935, 1935], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "vector": [14, 2, 0.968, 0.0005, 2, 0.29, 0.8571, 569, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._moduleDef", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._moduleDef = moduleDef"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1936_C8", "label": "return", "type": "return", "loc": [1936, 1936], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "vector": [13, 2, 0.9685, 0.0005, 2, 0.29, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return moduleDef"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1938_C4", "label": "timestamp", "type": "function", "loc": [1938, 1941], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.9702, 0.002, 1, 0.35, 0.8158, 834, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "timestamp", "arg_names": ["self", "theTime"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def timestamp(self, theTime=None):\n if not theTime:\n theTime = time.time()\n return time.asctime(time.localtime(theTime))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1939_C8", "label": "if", "type": "if", "loc": [1939, 1940], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1938_C4", "vector": [4, 2, 0.9702, 0.001, 2, 0.18, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not theTime:\n theTime = time.time()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1940_C12", "label": "theTime = time()", "type": "assigned_variable", "loc": [1940, 1940], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1939_C8", "vector": [14, 3, 0.9705, 0.0005, 3, 0.96, 0.0, 894, 3, 0, 0, 0, 654, 10, 1], "semantic": {"name": "theTime", "arg_names": [], "import_names": [], "rhs_call_name": "time", "annotation": ""}, "snippet": " theTime = time.time()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1941_C8", "label": "return", "type": "return", "loc": [1941, 1941], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1938_C4", "vector": [13, 2, 0.971, 0.0005, 2, 0.18, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return time.asctime(time.localtime(theTime))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1943_C4", "label": "moduleHeader", "type": "function", "loc": [1943, 1953], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.9745, 0.0055, 1, 0.35, 0.8421, 243, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "moduleHeader", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def moduleHeader(self):\n header = self._moduleShBang + '\\n'\n header += self._moduleEncodingStr + '\\n'\n if self._moduleHeaderLines:\n offSet = self.setting('commentOffset')\n \n header += (\n '#' + ' '*offSet + "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1944_C8", "label": "header =", "type": "assigned_variable", "loc": [1944, 1944], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1943_C4", "vector": [14, 2, 0.9725, 0.0005, 2, 0.61, 0.0, 481, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "header", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " header = self._moduleShBang + '\\n'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1946_C8", "label": "if", "type": "if", "loc": [1946, 1951], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1943_C4", "vector": [4, 2, 0.9747, 0.003, 2, 0.61, 0.5, 0, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._moduleHeaderLines:\n offSet = self.setting('commentOffset')\n \n header += (\n '#' + ' '*offSet + \n ('\\n#'+ ' '*offSet).join(self._moduleHeaderLines) + '\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1947_C12", "label": "offSet = setting()", "type": "assigned_variable", "loc": [1947, 1947], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1946_C8", "vector": [14, 3, 0.974, 0.0005, 3, 0.6, 0.0, 565, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "offSet", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " offSet = self.setting('commentOffset')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1953_C8", "label": "return", "type": "return", "loc": [1953, 1953], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1943_C4", "vector": [13, 2, 0.977, 0.0005, 2, 0.61, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return header"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1955_C4", "label": "moduleDocstring", "type": "function", "loc": [1955, 1961], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.9795, 0.0035, 1, 0.35, 0.8684, 445, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "moduleDocstring", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def moduleDocstring(self):\n if not self._moduleDocStringLines:\n return ''\n \n return ('\"\"\"' +\n '\\n'.join(self._moduleDocStringLines) +\n '\\n\"\"\"\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1956_C8", "label": "if", "type": "if", "loc": [1956, 1957], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1955_C4", "vector": [4, 2, 0.9787, 0.001, 2, 0.14, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self._moduleDocStringLines:\n return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1957_C12", "label": "return", "type": "return", "loc": [1957, 1957], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1956_C8", "vector": [13, 3, 0.979, 0.0005, 3, 0.54, 0.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1959_C8", "label": "return", "type": "return", "loc": [1959, 1961], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1955_C4", "vector": [13, 2, 0.9805, 0.0015, 2, 0.14, 1.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ('\"\"\"' +\n '\\n'.join(self._moduleDocStringLines) +\n '\\n\"\"\"\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1963_C4", "label": "specialVars", "type": "function", "loc": [1963, 1969], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.9835, 0.0035, 1, 0.35, 0.8947, 871, 0, 1, 1, 0, 0, 0, 5], "semantic": {"name": "specialVars", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def specialVars(self):\n chunks = []\n theVars = self._specialVars\n keys = sorted(theVars.keys())\n for key in keys:\n chunks.append(key + ' = ' + repr(theVars[key]) )\n return '\\n'.join(chunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1964_C8", "label": "chunks =", "type": "assigned_variable", "loc": [1964, 1964], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1963_C4", "vector": [14, 2, 0.9825, 0.0005, 2, 0.46, 0.0, 284, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "chunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " chunks = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1965_C8", "label": "theVars =", "type": "assigned_variable", "loc": [1965, 1965], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1963_C4", "vector": [14, 2, 0.983, 0.0005, 2, 0.46, 0.25, 111, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "theVars", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " theVars = self._specialVars"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1966_C8", "label": "keys = sorted()", "type": "assigned_variable", "loc": [1966, 1966], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1963_C4", "vector": [14, 2, 0.9835, 0.0005, 2, 0.46, 0.5, 204, 3, 1, 0, 0, 134, 10, 2], "semantic": {"name": "keys", "arg_names": [], "import_names": [], "rhs_call_name": "sorted", "annotation": ""}, "snippet": " keys = sorted(theVars.keys())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1967_C8", "label": "for key", "type": "for", "loc": [1967, 1968], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1963_C4", "vector": [6, 2, 0.9842, 0.001, 2, 0.46, 0.75, 230, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for key in keys:\n chunks.append(key + ' = ' + repr(theVars[key]) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1968_C12", "label": "append()", "type": "expression", "loc": [1968, 1968], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1967_C8", "vector": [8, 3, 0.9845, 0.0005, 3, 0.65, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " chunks.append(key + ' = ' + repr(theVars[key]) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1969_C8", "label": "return", "type": "return", "loc": [1969, 1969], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1963_C4", "vector": [13, 2, 0.985, 0.0005, 2, 0.46, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '\\n'.join(chunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1971_C4", "label": "importStatements", "type": "function", "loc": [1971, 1972], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.9862, 0.001, 1, 0.35, 0.9211, 850, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "importStatements", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def importStatements(self):\n return '\\n'.join(self._importStatements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1972_C8", "label": "return", "type": "return", "loc": [1972, 1972], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1971_C4", "vector": [13, 2, 0.9865, 0.0005, 2, 0.56, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '\\n'.join(self._importStatements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1974_C4", "label": "moduleConstants", "type": "function", "loc": [1974, 1975], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.9877, 0.001, 1, 0.35, 0.9474, 29, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "moduleConstants", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def moduleConstants(self):\n return '\\n'.join(self._moduleConstants)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1975_C8", "label": "return", "type": "return", "loc": [1975, 1975], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1974_C4", "vector": [13, 2, 0.988, 0.0005, 2, 0.31, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '\\n'.join(self._moduleConstants)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1977_C4", "label": "classDefs", "type": "function", "loc": [1977, 1979], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.9895, 0.0015, 1, 0.35, 0.9737, 586, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "classDefs", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def classDefs(self):\n classDefs = [klass.classDef() for klass in self._finishedClasses()]\n return '\\n\\n'.join(classDefs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1978_C8", "label": "classDefs =", "type": "assigned_variable", "loc": [1978, 1978], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1977_C4", "vector": [14, 2, 0.9895, 0.0005, 2, 0.33, 0.0, 586, 5, 0, 0, 0, 0, 0, 2], "semantic": {"name": "classDefs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " classDefs = [klass.classDef() for klass in self._finishedClasses()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1979_C8", "label": "return", "type": "return", "loc": [1979, 1979], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1977_C4", "vector": [13, 2, 0.99, 0.0005, 2, 0.33, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '\\n\\n'.join(classDefs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1981_C4", "label": "moduleFooter", "type": "function", "loc": [1981, 1993], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "vector": [2, 1, 0.994, 0.0065, 1, 0.35, 1.0, 4, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "moduleFooter", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def moduleFooter(self):\n return \"\"\"\n# CHEETAH was developed by Tavis Rudd and Mike Orr\n# with code, advice and input from many other volunteers.\n# For more information visit http://www.CheetahTemplate.org/\n\n##################################################\n## if run from command line:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1982_C8", "label": "return", "type": "return", "loc": [1982, 1993], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1981_C4", "vector": [13, 2, 0.9942, 0.006, 2, 0.08, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return \"\"\"\n# CHEETAH was developed by Tavis Rudd and Mike Orr\n# with code, advice and input from many other volunteers.\n# For more information visit http://www.CheetahTemplate.org/\n\n##################################################\n## if run from command line:\nif __name__ == '__main__':"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1999_C0", "label": "Compiler =", "type": "assigned_variable", "loc": [1999, 1999], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.0005, 0, 0.66, 1.0, 478, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "Compiler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "Compiler = ModuleCompiler"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L109_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L115_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L115_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L117_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L117_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L118_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L117_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L119_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L119_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L120_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L119_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L121_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L121_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L122_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L121_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L123_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L123_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L124_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L123_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L125_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L125_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L126_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L125_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L128_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L115_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L129_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L131_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L131_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L132_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L131_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L134_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L131_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L135_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L135_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L136_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L135_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L137_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L135_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L138_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L138_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L139_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L131_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L142_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L142_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L143_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L142_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L144_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L144_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L145_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L145_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L146_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L144_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L148_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L148_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L149_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L148_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L150_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L144_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L152_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L142_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L153_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L155_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L155_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L156_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L156_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L157_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L155_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L158_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L158_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L159_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L158_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L161_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L163_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L164_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L173_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L174_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L175_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L176_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L178_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L182_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L183_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L184_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L185_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L185_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L186_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L185_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L187_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L188_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L108_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L191_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L247_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L248_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L250_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L251_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L253_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L253_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L254_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L253_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L255_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L255_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L256_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L255_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L257_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L255_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L262_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L253_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L263_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L263_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L264_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L263_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L269_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L274_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L274_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L275_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L274_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L276_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L280_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L286_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L286_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L289_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L286_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L290_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L286_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L291_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L286_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L292_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L286_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L293_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L286_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L294_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L286_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L295_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L297_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L297_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L298_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L301_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L302_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L303_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L304_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L305_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L306_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L307_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L309_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L310_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L311_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L312_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L314_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L316_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L300_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L317_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L320_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L320_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L321_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L325_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L325_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L326_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L328_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L328_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L329_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L333_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L333_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L334_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L336_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L339_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L339_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L340_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L347_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L347_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L348_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L348_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L349_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L348_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L351_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L353_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L354_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L356_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L356_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L357_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L356_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L358_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L356_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L363_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L356_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L364_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L356_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L365_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L367_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L367_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L368_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L370_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L370_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L371_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L373_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L373_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L374_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L376_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L376_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L377_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L377_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L378_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L376_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L380_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L376_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L381_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L376_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L384_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L387_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L387_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L388_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L390_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L390_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L391_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L390_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L392_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L390_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L393_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L395_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L395_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L396_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L398_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L398_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L399_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L401_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L401_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L402_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L402_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L403_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L401_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L404_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L401_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L407_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L407_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L408_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L408_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L409_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L408_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L410_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L410_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L411_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L408_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L413_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L407_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L415_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L415_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L416_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L415_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L418_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L407_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L420_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L420_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L421_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L420_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L423_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L425_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L425_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L426_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L426_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L427_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L426_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L429_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L432_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L435_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L435_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L436_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L438_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L439_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L440_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L440_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L441_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L443_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L444_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L445_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L446_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L446_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L447_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L446_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L448_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L449_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L451_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L451_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L452_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L451_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L453_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L451_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L454_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L451_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L456_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L451_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L457_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L451_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L458_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L431_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L459_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L461_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L461_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L462_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L461_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L464_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L464_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L465_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L464_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L466_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L464_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L467_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L467_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L468_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L472_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L472_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L473_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L475_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L475_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L476_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L478_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L478_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L479_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L482_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L482_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L483_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L485_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L485_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L486_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L488_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L488_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L489_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L488_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L490_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L492_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L495_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L496_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L496_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L497_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L496_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L498_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L500_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L500_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L501_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L500_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L503_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L505_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L505_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L506_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L505_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L507_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L505_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L508_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L505_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L509_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L505_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L510_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L505_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L512_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L514_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L514_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L515_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L516_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L516_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L517_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L519_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L519_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L520_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L522_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L522_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L523_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L525_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L525_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L526_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L526_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L527_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L526_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L531_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L526_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L532_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L526_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L533_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L533_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L534_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L533_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L535_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L535_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L536_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L535_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L538_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L526_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L540_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L540_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L541_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L540_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L542_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L540_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L544_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L540_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L545_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L526_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L546_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L526_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L547_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L525_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L549_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L549_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L550_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L549_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L552_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L554_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L554_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L555_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L560_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L560_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L561_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L563_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L563_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L564_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L566_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L566_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L568_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L566_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L569_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L571_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L571_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L572_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L572_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L573_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L571_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L574_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L571_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L575_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L575_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L576_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L571_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L577_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L579_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L580_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L581_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L581_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L582_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L583_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L583_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L584_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L586_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L587_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L587_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L588_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L589_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L591_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L591_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L592_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L591_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L594_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L596_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L596_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L597_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L596_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L599_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L601_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L601_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L602_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L601_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L605_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L601_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L606_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L601_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L607_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L601_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L608_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L601_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L609_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L601_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L610_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L612_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L612_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L613_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L612_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L614_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L616_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L616_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L617_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L619_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L619_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L620_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L622_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L622_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L623_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L622_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L624_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L624_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L625_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L624_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L626_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L624_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L628_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L622_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L629_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L622_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L630_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L622_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L631_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L633_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L633_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L634_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L636_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L636_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L637_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L639_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L639_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L640_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L642_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L642_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L644_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L642_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L645_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L647_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L647_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L649_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L647_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L651_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L653_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L654_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L655_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L656_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L657_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L658_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L659_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L660_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L661_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L650_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L663_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L666_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L666_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L667_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L669_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L669_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L670_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L672_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L672_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L673_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L675_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L675_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L676_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L678_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L678_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L679_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L681_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L681_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L682_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L684_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L684_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L685_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L684_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L686_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L684_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L687_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L687_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L688_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L687_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L689_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L689_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L690_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L687_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L691_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L687_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L693_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L693_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L694_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L693_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L695_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L693_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L696_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L696_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L697_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L696_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L698_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L696_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L699_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L699_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L700_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L684_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L702_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L702_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L703_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L684_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L705_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L705_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L706_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L708_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L708_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L709_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L716_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L717_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L718_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L719_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L720_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L720_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L721_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L722_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L723_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L726_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L728_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L731_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L732_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L736_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L737_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L738_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L739_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L741_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L744_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L745_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L746_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L747_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L749_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L749_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L750_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L749_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L751_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L749_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L752_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L749_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L753_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L755_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L756_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L758_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L759_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L760_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L761_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L762_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L763_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L764_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L766_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L767_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L768_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L769_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L770_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L771_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L773_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L775_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L776_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L777_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L778_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L779_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L712_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L780_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L780_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L781_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L785_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L786_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L787_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L788_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L789_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L790_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L791_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L792_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L793_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L794_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L795_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L784_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L796_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L798_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L798_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L799_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L802_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L804_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L805_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L806_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L807_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L808_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L809_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L810_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L812_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L816_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L817_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L818_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L819_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L801_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L820_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L822_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L822_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L823_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L822_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L824_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L822_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L825_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L825_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L826_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L825_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L828_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L825_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L829_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L825_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L830_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L822_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L831_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L833_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L833_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L834_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L833_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L835_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L833_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L836_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L833_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L838_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L833_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L839_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L833_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L840_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L842_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L842_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L843_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L842_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L844_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L842_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L847_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L847_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L848_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L847_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L849_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L847_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L850_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L847_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L851_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L847_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L852_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L842_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L855_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L856_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L857_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L858_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L858_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L859_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L860_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L861_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L863_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L863_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L864_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L865_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L866_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L867_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L854_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L868_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L842_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L869_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L842_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L873_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L842_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L874_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L876_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L876_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L877_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L880_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L881_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L882_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L883_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L884_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L886_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L887_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L890_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L891_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L892_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L893_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L879_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L894_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L897_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L898_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L899_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L900_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L901_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L902_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L903_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L904_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L896_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L905_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L908_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L910_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L911_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L912_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L914_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L915_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L916_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L917_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L907_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L921_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L923_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L923_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L924_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L926_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L926_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L927_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L926_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L928_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L926_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L929_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L926_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L930_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L933_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L935_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L936_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L937_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L938_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L939_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L941_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L932_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L942_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L942_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L943_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L942_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L947_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L950_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L951_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L952_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L953_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L954_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L955_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L956_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L957_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L946_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L960_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L285_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L962_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L962_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L963_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L962_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L966_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L970_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L970_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L971_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L970_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L972_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L970_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L973_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L970_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L974_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L970_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L975_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L977_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L977_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L978_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L977_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L980_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L984_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L984_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L985_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L985_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L986_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L984_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L987_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L989_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L989_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L990_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L990_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L991_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L989_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L992_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L995_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L996_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L997_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L997_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L998_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L999_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L999_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1000_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1002_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1002_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1003_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1002_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1004_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1002_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1005_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1005_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1006_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1006_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1007_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1006_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1009_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1009_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1010_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1002_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1012_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1012_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1013_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1012_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1014_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1002_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1015_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1002_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1017_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1017_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1018_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1018_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1019_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1018_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1021_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1023_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1024_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1025_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1026_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1027_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L994_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1028_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1031_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1031_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1032_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1035_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1035_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1036_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1037_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1039_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1040_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1042_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1043_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1044_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1045_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1046_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1046_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1047_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1048_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1049_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1050_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1052_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1053_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1054_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1055_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1055_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1056_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1055_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1057_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1055_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1058_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1058_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1060_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1060_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1061_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1060_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1062_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1062_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1063_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1062_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1065_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1066_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1066_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1067_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1067_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1068_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1067_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1070_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1071_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1072_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1073_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1030_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1074_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1076_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1076_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1077_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1076_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1078_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1076_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1079_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1076_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1080_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1076_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1082_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1082_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1083_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1076_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1084_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1086_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1086_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1087_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1089_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1089_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1090_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L968_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1092_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1092_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1093_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1092_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1094_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1094_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1095_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1094_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1096_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1096_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1097_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1094_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1098_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1094_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1101_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1094_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1103_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1092_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1092_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1092_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1107_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1108_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1092_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1110_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1092_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1113_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1129_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1130_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1137_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1138_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1139_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1142_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1143_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1148_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1148_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1149_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1151_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1151_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1152_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1154_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1154_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1155_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1154_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1163_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1163_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1164_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1163_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1165_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1166_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1165_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1167_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1167_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1168_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1173_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1174_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1175_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1176_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1177_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1178_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1181_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1182_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1183_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1186_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1186_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1187_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1186_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1188_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1190_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1191_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1194_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1194_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1195_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1196_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1197_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1198_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1199_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1201_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1201_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L1202_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L1202_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1203_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:While_L1202_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1204_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1201_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1205_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1201_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1206_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1206_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1207_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1207_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1208_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1201_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1209_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1212_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1212_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1213_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1212_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1215_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1212_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1216_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1212_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1217_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1212_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1218_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1218_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1219_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1212_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1220_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1212_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1221_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1226_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1227_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1230_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1232_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1233_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1234_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1237_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1238_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1240_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1240_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1241_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1243_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1243_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1244_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1246_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1246_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1247_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1250_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1250_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1251_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1253_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1254_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1255_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1258_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1259_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1260_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1260_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1261_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1261_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1262_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1262_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1263_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1249_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1266_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1268_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1268_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1269_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1268_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1270_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1270_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1271_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1274_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1274_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1276_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1276_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1277_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1274_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1279_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1274_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1280_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1274_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1281_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1274_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1284_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1274_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1285_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1287_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1287_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1288_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1290_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1290_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1291_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1293_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1293_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1294_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1296_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1296_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1297_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1296_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1298_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1298_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1299_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1298_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1301_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1296_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1302_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1304_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1304_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1305_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1304_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1307_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1304_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1308_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1308_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1309_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1311_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1312_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1314_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1314_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1315_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1314_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1320_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1322_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1322_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1323_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1325_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1325_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1326_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1328_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1328_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1331_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1328_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1336_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1338_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1338_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1339_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1338_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1340_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1338_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1342_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1338_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1343_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1343_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1344_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1343_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1345_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1343_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1347_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1338_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1348_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1338_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1350_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1354_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1354_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1355_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1354_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1356_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1356_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1357_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1354_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1359_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1362_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1363_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1365_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1371_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1374_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1375_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1376_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1378_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1379_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1380_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1381_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1385_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1387_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1388_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1390_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1390_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1391_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1390_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1392_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1390_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1393_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1395_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1395_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1396_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1395_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1397_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1395_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1398_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1395_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1399_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1399_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1400_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1399_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1401_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1395_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1402_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1395_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1409_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1395_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1410_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1419_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1419_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1420_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1420_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1421_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1420_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1423_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1425_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1426_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1429_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1430_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1433_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1433_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1434_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1440_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1440_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1441_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1447_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1447_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1448_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1447_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1449_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1447_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1451_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1447_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1452_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1454_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1455_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1456_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1459_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1459_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1460_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1462_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1462_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1463_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1463_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1464_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1462_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1465_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1462_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1466_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1462_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1470_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1472_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1472_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1473_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1472_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1474_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1476_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1476_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1477_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1476_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1479_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1489_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1490_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1500_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1501_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1501_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1502_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1506_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1506_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1507_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1507_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1508_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1506_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1514_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1516_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1517_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1518_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1518_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1519_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1518_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1521_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1522_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1523_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1523_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1524_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1525_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1527_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1528_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1530_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1530_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1532_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1532_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1533_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1532_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1534_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1532_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1535_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1532_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1536_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1532_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1537_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1532_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1538_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1538_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1539_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1538_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1540_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1543_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1543_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1544_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1543_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1545_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1547_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1547_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1548_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1554_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1554_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1555_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1554_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1558_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1554_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1559_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1554_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1560_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1560_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1561_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1560_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1565_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1560_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1566_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1566_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1567_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1566_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1568_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1560_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1569_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1569_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1570_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1569_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1571_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1571_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1572_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1571_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1573_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1569_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1575_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1577_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1577_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1578_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1580_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1492_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1581_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1583_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1583_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1584_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1583_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1591_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1591_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1592_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1591_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1593_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1593_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1594_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1593_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1595_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1595_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1596_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1600_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1600_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1601_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1604_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1605_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1606_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1607_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1608_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1609_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1610_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1611_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1612_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1613_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1614_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1632_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1603_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1645_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1652_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1652_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1653_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1652_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1654_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1654_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1655_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1652_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1656_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1652_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1657_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1652_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1658_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1652_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1659_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1652_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1660_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1662_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1662_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1663_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1663_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1664_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1662_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1665_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1662_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1671_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1673_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1673_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1674_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1676_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1676_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1677_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1679_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1679_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1680_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1682_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1682_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1683_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1682_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1684_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1682_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1685_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1682_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1686_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1688_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1688_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1689_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1691_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1691_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1692_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1694_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1694_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1695_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1694_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1696_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1696_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1697_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1694_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1698_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1698_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1699_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1699_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1700_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1698_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1702_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1706_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1706_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1707_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1707_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1708_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1707_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1710_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1706_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1712_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1712_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1713_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1712_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1714_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1712_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1715_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1712_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1716_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1716_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1718_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1716_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1729_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1716_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1730_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1730_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1731_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1730_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1732_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1732_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1733_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1732_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1734_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1734_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1735_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1734_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1738_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1734_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1739_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1734_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1740_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1732_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1742_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1732_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1743_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1732_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1745_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1745_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1746_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1746_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1747_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1746_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1748_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1746_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1749_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1732_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1753_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1753_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1754_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1753_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1756_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1756_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1758_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1753_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1759_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1753_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1760_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1753_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1761_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1753_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1762_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1764_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1764_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1765_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1764_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1766_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1768_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1768_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1769_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1768_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1770_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1768_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1771_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1771_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1772_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1768_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1774_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1774_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1777_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1774_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1778_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1774_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1779_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1774_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1780_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1780_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1781_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1780_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1785_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1768_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1787_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1768_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1788_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1790_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1790_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1791_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1793_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1793_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1794_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1796_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1796_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1797_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1799_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1799_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1800_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1799_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1802_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1804_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1804_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1805_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1804_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1807_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1809_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1809_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1810_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1809_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1813_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1815_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1815_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1816_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1815_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1818_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1815_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1819_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1821_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1821_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1822_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1821_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1823_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1823_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1826_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1821_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1829_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1821_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1830_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1821_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1831_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1821_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1832_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1834_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1834_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1835_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1837_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1837_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1838_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1838_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1839_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1837_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1841_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1837_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1842_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1842_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1845_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1842_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1847_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1847_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1848_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1847_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1849_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1847_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1850_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1850_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1851_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1850_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1852_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1850_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1853_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1853_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1854_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1853_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1855_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1853_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1856_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1856_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1857_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1856_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1858_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1856_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1859_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1859_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1860_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1859_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1861_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1859_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1863_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1837_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1865_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1865_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1866_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1870_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1870_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1871_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1871_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1872_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1870_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1873_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1873_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1874_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1873_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1876_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1878_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1881_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1882_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1883_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1884_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1884_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1885_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1884_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1886_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1887_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1887_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1888_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1887_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1889_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1887_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1890_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1887_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1892_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1887_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1893_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1895_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1935_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1880_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1936_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1938_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1938_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1939_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1939_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1940_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1938_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1941_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1943_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1943_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1944_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1943_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1946_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1946_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1947_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1943_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1953_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1955_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1955_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1956_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:If_L1956_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1957_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1955_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1959_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1963_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1963_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1964_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1963_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1965_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1963_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1966_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1963_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1967_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:For_L1967_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Expr_L1968_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1963_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1969_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1971_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1971_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1972_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1974_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1974_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1975_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1977_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1977_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Assign_L1978_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1977_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1979_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:ClassDef_L1487_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1981_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1501:FunctionDef_L1981_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1501:Return_L1982_C8"}]
"""SourceReader class for Cheetah's Parser and CodeGenerator """ import re import sys EOLre = re.compile(r'[ \f\t]*(?:\r\n|\r|\n)') EOLZre = re.compile(r'(?:\r\n|\r|\n|\Z)') ENCODINGsearch = re.compile("coding[=:]\s*([-\w.]+)").search class Error(Exception): pass class SourceReader(object): def __init__(self, src, filename=None, breakPoint=None, encoding=None): ## @@TR 2005-01-17: the following comes from a patch Terrel Shumway ## contributed to add unicode support to the reading of Cheetah source ## files with dynamically compiled templates. All the existing unit ## tests pass but, it needs more testing and some test cases of its ## own. My instinct is to move this up into the code that passes in the ## src string rather than leaving it here. As implemented here it ## forces all src strings to unicode, which IMO is not what we want. # if encoding is None: # # peek at the encoding in the first two lines # m = EOLZre.search(src) # pos = m.end() # if pos<len(src): # m = EOLZre.search(src,pos) # pos = m.end() # m = ENCODINGsearch(src,0,pos) # if m: # encoding = m.group(1) # else: # encoding = sys.getfilesystemencoding() # self._encoding = encoding # if type(src) is not unicode: # src = src.decode(encoding) ## end of Terrel's patch self._src = src self._filename = filename self._srcLen = len(src) if breakPoint == None: self._breakPoint = self._srcLen else: self.setBreakPoint(breakPoint) self._pos = 0 self._bookmarks = {} self._posTobookmarkMap = {} ## collect some meta-information self._EOLs = [] pos = 0 while pos < len(self): EOLmatch = EOLZre.search(src, pos) self._EOLs.append(EOLmatch.start()) pos = EOLmatch.end() self._BOLs = [] for pos in self._EOLs: BOLpos = self.findBOL(pos) self._BOLs.append(BOLpos) def src(self): return self._src def filename(self): return self._filename def __len__(self): return self._breakPoint def __getitem__(self, i): self.checkPos(i) return self._src[i] def __getslice__(self, i, j): i = max(i, 0); j = max(j, 0) return self._src[i:j] def splitlines(self): if not hasattr(self, '_srcLines'): self._srcLines = self._src.splitlines() return self._srcLines def lineNum(self, pos=None): if pos == None: pos = self._pos for i in range(len(self._BOLs)): if pos >= self._BOLs[i] and pos <= self._EOLs[i]: return i def getRowCol(self, pos=None): if pos == None: pos = self._pos lineNum = self.lineNum(pos) BOL, EOL = self._BOLs[lineNum], self._EOLs[lineNum] return lineNum+1, pos-BOL+1 def getRowColLine(self, pos=None): if pos == None: pos = self._pos row, col = self.getRowCol(pos) return row, col, self.splitlines()[row-1] def getLine(self, pos): if pos == None: pos = self._pos lineNum = self.lineNum(pos) return self.splitlines()[lineNum] def pos(self): return self._pos def setPos(self, pos): self.checkPos(pos) self._pos = pos def validPos(self, pos): return pos <= self._breakPoint and pos >=0 def checkPos(self, pos): if not pos <= self._breakPoint: raise Error("pos (" + str(pos) + ") is invalid: beyond the stream's end (" + str(self._breakPoint-1) + ")" ) elif not pos >=0: raise Error("pos (" + str(pos) + ") is invalid: less than 0" ) def breakPoint(self): return self._breakPoint def setBreakPoint(self, pos): if pos > self._srcLen: raise Error("New breakpoint (" + str(pos) + ") is invalid: beyond the end of stream's source string (" + str(self._srcLen) + ")" ) elif not pos >= 0: raise Error("New breakpoint (" + str(pos) + ") is invalid: less than 0" ) self._breakPoint = pos def setBookmark(self, name): self._bookmarks[name] = self._pos self._posTobookmarkMap[self._pos] = name def hasBookmark(self, name): return name in self._bookmarks def gotoBookmark(self, name): if not self.hasBookmark(name): raise Error("Invalid bookmark (" + name + ") is invalid: does not exist") pos = self._bookmarks[name] if not self.validPos(pos): raise Error("Invalid bookmark (" + name + ', '+ str(pos) + ") is invalid: pos is out of range" ) self._pos = pos def atEnd(self): return self._pos >= self._breakPoint def atStart(self): return self._pos == 0 def peek(self, offset=0): self.checkPos(self._pos+offset) pos = self._pos + offset return self._src[pos] def getc(self): pos = self._pos if self.validPos(pos+1): self._pos += 1 return self._src[pos] def ungetc(self, c=None): if not self.atStart(): raise Error('Already at beginning of stream') self._pos -= 1 if not c==None: self._src[self._pos] = c def advance(self, offset=1): self.checkPos(self._pos + offset) self._pos += offset def rev(self, offset=1): self.checkPos(self._pos - offset) self._pos -= offset def read(self, offset): self.checkPos(self._pos + offset) start = self._pos self._pos += offset return self._src[start:self._pos] def readTo(self, to, start=None): self.checkPos(to) if start == None: start = self._pos self._pos = to return self._src[start:to] def readToEOL(self, start=None, gobble=True): EOLmatch = EOLZre.search(self.src(), self.pos()) if gobble: pos = EOLmatch.end() else: pos = EOLmatch.start() return self.readTo(to=pos, start=start) def find(self, it, pos=None): if pos == None: pos = self._pos return self._src.find(it, pos ) def startswith(self, it, pos=None): if self.find(it, pos) == self.pos(): return True else: return False def rfind(self, it, pos): if pos == None: pos = self._pos return self._src.rfind(it, pos) def findBOL(self, pos=None): if pos == None: pos = self._pos src = self.src() return max(src.rfind('\n', 0, pos)+1, src.rfind('\r', 0, pos)+1, 0) def findEOL(self, pos=None, gobble=False): if pos == None: pos = self._pos match = EOLZre.search(self.src(), pos) if gobble: return match.end() else: return match.start() def isLineClearToPos(self, pos=None): if pos == None: pos = self.pos() self.checkPos(pos) src = self.src() BOL = self.findBOL() return BOL == pos or src[BOL:pos].isspace() def matches(self, strOrRE): if isinstance(strOrRE, (str, unicode)): return self.startswith(strOrRE, pos=self.pos()) else: # assume an re object return strOrRE.match(self.src(), self.pos()) def matchWhiteSpace(self, WSchars=' \f\t'): return (not self.atEnd()) and self.peek() in WSchars def getWhiteSpace(self, max=None, WSchars=' \f\t'): if not self.matchWhiteSpace(WSchars): return '' start = self.pos() breakPoint = self.breakPoint() if max is not None: breakPoint = min(breakPoint, self.pos()+max) while self.pos() < breakPoint: self.advance() if not self.matchWhiteSpace(WSchars): break return self.src()[start:self.pos()] def matchNonWhiteSpace(self, WSchars=' \f\t\n\r'): return self.atEnd() or not self.peek() in WSchars def getNonWhiteSpace(self, WSchars=' \f\t\n\r'): if not self.matchNonWhiteSpace(WSchars): return '' start = self.pos() while self.pos() < self.breakPoint(): self.advance() if not self.matchNonWhiteSpace(WSchars): break return self.src()[start:self.pos()]
ajibawa-2023/Python-Code-Large/train/row_1502
187
290
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0052, 0.0069, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"SourceReader class for Cheetah's Parser and CodeGenerator\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0103, 0.0034, 0, 0.66, 0.1429, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0138, 0.0034, 0, 0.66, 0.2857, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L6_C0", "label": "EOLre = compile()", "type": "assigned_variable", "loc": [6, 6], "level": 0, "parent": null, "vector": [14, 0, 0.0207, 0.0034, 0, 0.66, 0.4286, 682, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "EOLre", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "EOLre = re.compile(r'[ \\f\\t]*(?:\\r\\n|\\r|\\n)')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L7_C0", "label": "EOLZre = compile()", "type": "assigned_variable", "loc": [7, 7], "level": 0, "parent": null, "vector": [14, 0, 0.0241, 0.0034, 0, 0.66, 0.5714, 901, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "EOLZre", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "EOLZre = re.compile(r'(?:\\r\\n|\\r|\\n|\\Z)')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L8_C0", "label": "ENCODINGsearch =", "type": "assigned_variable", "loc": [8, 8], "level": 0, "parent": null, "vector": [14, 0, 0.0276, 0.0034, 0, 0.66, 0.7143, 399, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "ENCODINGsearch", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ENCODINGsearch = re.compile(\"coding[=:]\\s*([-\\w.]+)\").search"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L10_C0", "label": "Error", "type": "class", "loc": [10, 11], "level": 0, "parent": null, "vector": [3, 0, 0.0362, 0.0069, 0, 0.66, 0.8571, 529, 0, 0, 0, 0, 645, 0, 0], "semantic": {"name": "Error", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Error(Exception):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "label": "SourceReader", "type": "class", "loc": [13, 290], "level": 0, "parent": null, "vector": [3, 0, 0.5224, 0.9586, 0, 0.66, 1.0, 749, 0, 41, 0, 0, 186, 0, 96], "semantic": {"name": "SourceReader", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class SourceReader(object):\n def __init__(self, src, filename=None, breakPoint=None, encoding=None):\n\n ## @@TR 2005-01-17: the following comes from a patch Terrel Shumway\n ## contributed to add unicode support to the reading of Cheetah source\n ## files with dynamically compiled templates. All the existing unit\n ## tests pass but, it needs more testing and some test cases of its\n ## own. My instinct is to move this up into the code that passes in the"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "label": "__init__", "type": "function", "loc": [14, 63], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.1328, 0.1724, 1, 0.88, 0.0, 555, 0, 5, 0, 0, 0, 0, 9], "semantic": {"name": "__init__", "arg_names": ["self", "src", "filename", "breakPoint", "encoding"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, src, filename=None, breakPoint=None, encoding=None):\n\n ## @@TR 2005-01-17: the following comes from a patch Terrel Shumway\n ## contributed to add unicode support to the reading of Cheetah source\n ## files with dynamically compiled templates. All the existing unit\n ## tests pass but, it needs more testing and some test cases of its\n ## own. My instinct is to move this up into the code that passes in the\n ## src string rather than leaving it here. As implemented here it"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L40_C8", "label": "self._src =", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "vector": [14, 2, 0.1379, 0.0034, 2, 0.59, 0.0, 8, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._src", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._src = src"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L41_C8", "label": "self._filename =", "type": "assigned_variable", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "vector": [14, 2, 0.1414, 0.0034, 2, 0.59, 0.0909, 146, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._filename = filename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L43_C8", "label": "self._srcLen = len()", "type": "assigned_variable", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "vector": [14, 2, 0.1483, 0.0034, 2, 0.59, 0.1818, 987, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "self._srcLen", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " self._srcLen = len(src)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L44_C8", "label": "if", "type": "if", "loc": [44, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "vector": [4, 2, 0.1569, 0.0138, 2, 0.59, 0.2727, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if breakPoint == None:\n self._breakPoint = self._srcLen\n else:\n self.setBreakPoint(breakPoint)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L45_C12", "label": "self._breakPoint =", "type": "assigned_variable", "loc": [45, 45], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L44_C8", "vector": [14, 3, 0.1552, 0.0034, 3, 0.16, 0.0, 216, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._breakPoint", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._breakPoint = self._srcLen"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L47_C12", "label": "setBreakPoint()", "type": "expression", "loc": [47, 47], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L44_C8", "vector": [8, 3, 0.1621, 0.0034, 3, 0.16, 1.0, 285, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setBreakPoint", "arg_names": [], "import_names": [], "rhs_call_name": "setBreakPoint", "annotation": ""}, "snippet": " self.setBreakPoint(breakPoint)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L48_C8", "label": "self._pos =", "type": "assigned_variable", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "vector": [14, 2, 0.1655, 0.0034, 2, 0.59, 0.3636, 137, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self._pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._pos = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L49_C8", "label": "self._bookmarks =", "type": "assigned_variable", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "vector": [14, 2, 0.169, 0.0034, 2, 0.59, 0.4545, 710, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._bookmarks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._bookmarks = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L50_C8", "label": "self._posTobookmarkMap =", "type": "assigned_variable", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "vector": [14, 2, 0.1724, 0.0034, 2, 0.59, 0.5455, 517, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._posTobookmarkMap", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._posTobookmarkMap = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L53_C8", "label": "self._EOLs =", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "vector": [14, 2, 0.1828, 0.0034, 2, 0.59, 0.6364, 517, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._EOLs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._EOLs = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L54_C8", "label": "pos =", "type": "assigned_variable", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "vector": [14, 2, 0.1862, 0.0034, 2, 0.59, 0.7273, 627, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L55_C8", "label": "while", "type": "while", "loc": [55, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "vector": [5, 2, 0.1948, 0.0138, 2, 0.59, 0.8182, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while pos < len(self):\n EOLmatch = EOLZre.search(src, pos)\n self._EOLs.append(EOLmatch.start())\n pos = EOLmatch.end()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L56_C12", "label": "EOLmatch = search()", "type": "assigned_variable", "loc": [56, 56], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L55_C8", "vector": [14, 3, 0.1931, 0.0034, 3, 0.04, 0.0, 377, 3, 2, 0, 0, 163, 10, 1], "semantic": {"name": "EOLmatch", "arg_names": [], "import_names": [], "rhs_call_name": "search", "annotation": ""}, "snippet": " EOLmatch = EOLZre.search(src, pos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L57_C12", "label": "append()", "type": "expression", "loc": [57, 57], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L55_C8", "vector": [8, 3, 0.1966, 0.0034, 3, 0.04, 0.5, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._EOLs.append(EOLmatch.start())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L58_C12", "label": "pos = end()", "type": "assigned_variable", "loc": [58, 58], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L55_C8", "vector": [14, 3, 0.2, 0.0034, 3, 0.04, 1.0, 627, 3, 0, 0, 0, 128, 10, 1], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "end", "annotation": ""}, "snippet": " pos = EOLmatch.end()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L60_C8", "label": "self._BOLs =", "type": "assigned_variable", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "vector": [14, 2, 0.2069, 0.0034, 2, 0.59, 0.9091, 438, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._BOLs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._BOLs = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:For_L61_C8", "label": "for pos", "type": "for", "loc": [61, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "vector": [6, 2, 0.2138, 0.0103, 2, 0.59, 1.0, 627, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for pos in self._EOLs:\n BOLpos = self.findBOL(pos)\n self._BOLs.append(BOLpos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L62_C12", "label": "BOLpos = findBOL()", "type": "assigned_variable", "loc": [62, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:For_L61_C8", "vector": [14, 3, 0.2138, 0.0034, 3, 0.88, 0.0, 58, 3, 1, 0, 0, 817, 10, 1], "semantic": {"name": "BOLpos", "arg_names": [], "import_names": [], "rhs_call_name": "findBOL", "annotation": ""}, "snippet": " BOLpos = self.findBOL(pos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L63_C12", "label": "append()", "type": "expression", "loc": [63, 63], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:For_L61_C8", "vector": [8, 3, 0.2172, 0.0034, 3, 0.88, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._BOLs.append(BOLpos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L65_C4", "label": "src", "type": "function", "loc": [65, 66], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.2259, 0.0069, 1, 0.88, 0.025, 345, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "src", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def src(self):\n return self._src"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L66_C8", "label": "return", "type": "return", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L65_C4", "vector": [13, 2, 0.2276, 0.0034, 2, 0.64, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._src"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L68_C4", "label": "filename", "type": "function", "loc": [68, 69], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.2362, 0.0069, 1, 0.88, 0.05, 275, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "filename", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def filename(self):\n return self._filename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L69_C8", "label": "return", "type": "return", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L68_C4", "vector": [13, 2, 0.2379, 0.0034, 2, 0.22, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._filename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L71_C4", "label": "__len__", "type": "function", "loc": [71, 72], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.2466, 0.0069, 1, 0.88, 0.075, 76, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__len__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __len__(self):\n return self._breakPoint"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L72_C8", "label": "return", "type": "return", "loc": [72, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L71_C4", "vector": [13, 2, 0.2483, 0.0034, 2, 0.45, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._breakPoint"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L74_C4", "label": "__getitem__", "type": "function", "loc": [74, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.2586, 0.0103, 1, 0.88, 0.1, 698, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "__getitem__", "arg_names": ["self", "i"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __getitem__(self, i):\n self.checkPos(i)\n return self._src[i]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L75_C8", "label": "checkPos()", "type": "expression", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L74_C4", "vector": [8, 2, 0.2586, 0.0034, 2, 0.77, 0.0, 264, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkPos", "arg_names": [], "import_names": [], "rhs_call_name": "checkPos", "annotation": ""}, "snippet": " self.checkPos(i)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L76_C8", "label": "return", "type": "return", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L74_C4", "vector": [13, 2, 0.2621, 0.0034, 2, 0.77, 1.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._src[i]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L78_C4", "label": "__getslice__", "type": "function", "loc": [78, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.2724, 0.0103, 1, 0.88, 0.125, 269, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "__getslice__", "arg_names": ["self", "i", "j"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __getslice__(self, i, j):\n i = max(i, 0); j = max(j, 0)\n return self._src[i:j]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L79_C8", "label": "i = max()", "type": "assigned_variable", "loc": [79, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L78_C4", "vector": [14, 2, 0.2724, 0.0034, 2, 0.24, 0.0, 826, 3, 2, 0, 0, 442, 10, 1], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "max", "annotation": ""}, "snippet": " i = max(i, 0); j = max(j, 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L79_C23", "label": "j = max()", "type": "assigned_variable", "loc": [79, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L78_C4", "vector": [14, 2, 0.2724, 0.0034, 2, 0.24, 0.5, 100, 3, 2, 0, 0, 442, 10, 1], "semantic": {"name": "j", "arg_names": [], "import_names": [], "rhs_call_name": "max", "annotation": ""}, "snippet": " i = max(i, 0); j = max(j, 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L80_C8", "label": "return", "type": "return", "loc": [80, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L78_C4", "vector": [13, 2, 0.2759, 0.0034, 2, 0.24, 1.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._src[i:j]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L82_C4", "label": "splitlines", "type": "function", "loc": [82, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.2879, 0.0138, 1, 0.88, 0.15, 296, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "splitlines", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def splitlines(self):\n if not hasattr(self, '_srcLines'): \n self._srcLines = self._src.splitlines()\n return self._srcLines"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L83_C8", "label": "if", "type": "if", "loc": [83, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L82_C4", "vector": [4, 2, 0.2879, 0.0069, 2, 0.35, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not hasattr(self, '_srcLines'): \n self._srcLines = self._src.splitlines()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L84_C12", "label": "self._srcLines = splitlines()", "type": "assigned_variable", "loc": [84, 84], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L83_C8", "vector": [14, 3, 0.2897, 0.0034, 3, 0.94, 0.0, 897, 3, 0, 0, 0, 296, 10, 1], "semantic": {"name": "self._srcLines", "arg_names": [], "import_names": [], "rhs_call_name": "splitlines", "annotation": ""}, "snippet": " self._srcLines = self._src.splitlines()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L85_C8", "label": "return", "type": "return", "loc": [85, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L82_C4", "vector": [13, 2, 0.2931, 0.0034, 2, 0.35, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._srcLines"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L87_C4", "label": "lineNum", "type": "function", "loc": [87, 93], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.3103, 0.0241, 1, 0.88, 0.175, 391, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "lineNum", "arg_names": ["self", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def lineNum(self, pos=None):\n if pos == None:\n pos = self._pos\n \n for i in range(len(self._BOLs)):\n if pos >= self._BOLs[i] and pos <= self._EOLs[i]:\n return i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L88_C8", "label": "if", "type": "if", "loc": [88, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L87_C4", "vector": [4, 2, 0.3052, 0.0069, 2, 0.57, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pos == None:\n pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L89_C12", "label": "pos =", "type": "assigned_variable", "loc": [89, 89], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L88_C8", "vector": [14, 3, 0.3069, 0.0034, 3, 0.19, 0.0, 627, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:For_L91_C8", "label": "for i", "type": "for", "loc": [91, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L87_C4", "vector": [6, 2, 0.3172, 0.0103, 2, 0.57, 1.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(len(self._BOLs)):\n if pos >= self._BOLs[i] and pos <= self._EOLs[i]:\n return i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L92_C12", "label": "if", "type": "if", "loc": [92, 93], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:For_L91_C8", "vector": [4, 3, 0.319, 0.0069, 3, 0.23, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pos >= self._BOLs[i] and pos <= self._EOLs[i]:\n return i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L93_C16", "label": "return", "type": "return", "loc": [93, 93], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L92_C12", "vector": [13, 4, 0.3207, 0.0034, 4, 0.18, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L95_C4", "label": "getRowCol", "type": "function", "loc": [95, 100], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.3362, 0.0207, 1, 0.88, 0.2, 946, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "getRowCol", "arg_names": ["self", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getRowCol(self, pos=None):\n if pos == None:\n pos = self._pos\n lineNum = self.lineNum(pos)\n BOL, EOL = self._BOLs[lineNum], self._EOLs[lineNum]\n return lineNum+1, pos-BOL+1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L96_C8", "label": "if", "type": "if", "loc": [96, 97], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L95_C4", "vector": [4, 2, 0.3328, 0.0069, 2, 0.25, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pos == None:\n pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L97_C12", "label": "pos =", "type": "assigned_variable", "loc": [97, 97], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L96_C8", "vector": [14, 3, 0.3345, 0.0034, 3, 0.12, 0.0, 627, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L98_C8", "label": "lineNum = lineNum()", "type": "assigned_variable", "loc": [98, 98], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L95_C4", "vector": [14, 2, 0.3379, 0.0034, 2, 0.25, 0.3333, 391, 3, 1, 0, 0, 391, 10, 1], "semantic": {"name": "lineNum", "arg_names": [], "import_names": [], "rhs_call_name": "lineNum", "annotation": ""}, "snippet": " lineNum = self.lineNum(pos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L99_C8", "label": "BOL, EOL =", "type": "assigned_variable", "loc": [99, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L95_C4", "vector": [14, 2, 0.3414, 0.0034, 2, 0.25, 0.6667, 520, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "BOL, EOL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " BOL, EOL = self._BOLs[lineNum], self._EOLs[lineNum]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L100_C8", "label": "return", "type": "return", "loc": [100, 100], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L95_C4", "vector": [13, 2, 0.3448, 0.0034, 2, 0.25, 1.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return lineNum+1, pos-BOL+1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L102_C4", "label": "getRowColLine", "type": "function", "loc": [102, 106], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.3586, 0.0172, 1, 0.88, 0.225, 423, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "getRowColLine", "arg_names": ["self", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getRowColLine(self, pos=None):\n if pos == None:\n pos = self._pos\n row, col = self.getRowCol(pos) \n return row, col, self.splitlines()[row-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L103_C8", "label": "if", "type": "if", "loc": [103, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L102_C4", "vector": [4, 2, 0.3569, 0.0069, 2, 0.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pos == None:\n pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L104_C12", "label": "pos =", "type": "assigned_variable", "loc": [104, 104], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L103_C8", "vector": [14, 3, 0.3586, 0.0034, 3, 0.41, 0.0, 627, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L105_C8", "label": "row, col = getRowCol()", "type": "assigned_variable", "loc": [105, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L102_C4", "vector": [14, 2, 0.3621, 0.0034, 2, 0.6, 0.5, 777, 3, 1, 0, 0, 946, 10, 1], "semantic": {"name": "row, col", "arg_names": [], "import_names": [], "rhs_call_name": "getRowCol", "annotation": ""}, "snippet": " row, col = self.getRowCol(pos) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L106_C8", "label": "return", "type": "return", "loc": [106, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L102_C4", "vector": [13, 2, 0.3655, 0.0034, 2, 0.6, 1.0, 0, 0, 0, 0, 0, 0, 8, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return row, col, self.splitlines()[row-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L108_C4", "label": "getLine", "type": "function", "loc": [108, 112], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.3793, 0.0172, 1, 0.88, 0.25, 218, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "getLine", "arg_names": ["self", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getLine(self, pos):\n if pos == None:\n pos = self._pos\n lineNum = self.lineNum(pos)\n return self.splitlines()[lineNum]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L109_C8", "label": "if", "type": "if", "loc": [109, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L108_C4", "vector": [4, 2, 0.3776, 0.0069, 2, 0.73, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pos == None:\n pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L110_C12", "label": "pos =", "type": "assigned_variable", "loc": [110, 110], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L109_C8", "vector": [14, 3, 0.3793, 0.0034, 3, 0.95, 0.0, 627, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L111_C8", "label": "lineNum = lineNum()", "type": "assigned_variable", "loc": [111, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L108_C4", "vector": [14, 2, 0.3828, 0.0034, 2, 0.73, 0.5, 391, 3, 1, 0, 0, 391, 10, 1], "semantic": {"name": "lineNum", "arg_names": [], "import_names": [], "rhs_call_name": "lineNum", "annotation": ""}, "snippet": " lineNum = self.lineNum(pos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L112_C8", "label": "return", "type": "return", "loc": [112, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L108_C4", "vector": [13, 2, 0.3862, 0.0034, 2, 0.73, 1.0, 0, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.splitlines()[lineNum]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L114_C4", "label": "pos", "type": "function", "loc": [114, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.3948, 0.0069, 1, 0.88, 0.275, 627, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def pos(self):\n return self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L115_C8", "label": "return", "type": "return", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L114_C4", "vector": [13, 2, 0.3966, 0.0034, 2, 0.27, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L117_C4", "label": "setPos", "type": "function", "loc": [117, 119], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.4069, 0.0103, 1, 0.88, 0.3, 659, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setPos", "arg_names": ["self", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setPos(self, pos):\n self.checkPos(pos)\n self._pos = pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L118_C8", "label": "checkPos()", "type": "expression", "loc": [118, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L117_C4", "vector": [8, 2, 0.4069, 0.0034, 2, 0.53, 0.0, 264, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkPos", "arg_names": [], "import_names": [], "rhs_call_name": "checkPos", "annotation": ""}, "snippet": " self.checkPos(pos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L119_C8", "label": "self._pos =", "type": "assigned_variable", "loc": [119, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L117_C4", "vector": [14, 2, 0.4103, 0.0034, 2, 0.53, 1.0, 137, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._pos = pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L122_C4", "label": "validPos", "type": "function", "loc": [122, 123], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.4224, 0.0069, 1, 0.88, 0.325, 54, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "validPos", "arg_names": ["self", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def validPos(self, pos):\n return pos <= self._breakPoint and pos >=0 "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L123_C8", "label": "return", "type": "return", "loc": [123, 123], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L122_C4", "vector": [13, 2, 0.4241, 0.0034, 2, 0.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return pos <= self._breakPoint and pos >=0 "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L125_C4", "label": "checkPos", "type": "function", "loc": [125, 130], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.4397, 0.0207, 1, 0.88, 0.35, 264, 0, 2, 0, 0, 0, 0, 5], "semantic": {"name": "checkPos", "arg_names": ["self", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def checkPos(self, pos):\n if not pos <= self._breakPoint:\n raise Error(\"pos (\" + str(pos) + \") is invalid: beyond the stream's end (\" +\n str(self._breakPoint-1) + \")\" )\n elif not pos >=0:\n raise Error(\"pos (\" + str(pos) + \") is invalid: less than 0\" )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L126_C8", "label": "if", "type": "if", "loc": [126, 130], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L125_C4", "vector": [4, 2, 0.4414, 0.0172, 2, 0.13, 0.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not pos <= self._breakPoint:\n raise Error(\"pos (\" + str(pos) + \") is invalid: beyond the stream's end (\" +\n str(self._breakPoint-1) + \")\" )\n elif not pos >=0:\n raise Error(\"pos (\" + str(pos) + \") is invalid: less than 0\" )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L129_C8", "label": "if", "type": "if", "loc": [129, 130], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L126_C8", "vector": [4, 3, 0.4466, 0.0069, 3, 0.79, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif not pos >=0:\n raise Error(\"pos (\" + str(pos) + \") is invalid: less than 0\" )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L132_C4", "label": "breakPoint", "type": "function", "loc": [132, 133], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.4569, 0.0069, 1, 0.88, 0.375, 691, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "breakPoint", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def breakPoint(self):\n return self._breakPoint"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L133_C8", "label": "return", "type": "return", "loc": [133, 133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L132_C4", "vector": [13, 2, 0.4586, 0.0034, 2, 0.95, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._breakPoint"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L135_C4", "label": "setBreakPoint", "type": "function", "loc": [135, 143], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.4793, 0.031, 1, 0.88, 0.4, 285, 0, 2, 0, 0, 0, 0, 5], "semantic": {"name": "setBreakPoint", "arg_names": ["self", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setBreakPoint(self, pos):\n if pos > self._srcLen:\n raise Error(\"New breakpoint (\" + str(pos) +\n \") is invalid: beyond the end of stream's source string (\" +\n str(self._srcLen) + \")\" )\n elif not pos >= 0:\n raise Error(\"New breakpoint (\" + str(pos) + \") is invalid: less than 0\" ) \n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L136_C8", "label": "if", "type": "if", "loc": [136, 141], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L135_C4", "vector": [4, 2, 0.4776, 0.0207, 2, 0.06, 0.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pos > self._srcLen:\n raise Error(\"New breakpoint (\" + str(pos) +\n \") is invalid: beyond the end of stream's source string (\" +\n str(self._srcLen) + \")\" )\n elif not pos >= 0:\n raise Error(\"New breakpoint (\" + str(pos) + \") is invalid: less than 0\" ) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L140_C8", "label": "if", "type": "if", "loc": [140, 141], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L136_C8", "vector": [4, 3, 0.4845, 0.0069, 3, 0.75, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif not pos >= 0:\n raise Error(\"New breakpoint (\" + str(pos) + \") is invalid: less than 0\" ) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L143_C8", "label": "self._breakPoint =", "type": "assigned_variable", "loc": [143, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L135_C4", "vector": [14, 2, 0.4931, 0.0034, 2, 0.06, 1.0, 216, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._breakPoint", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._breakPoint = pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L145_C4", "label": "setBookmark", "type": "function", "loc": [145, 147], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.5034, 0.0103, 1, 0.88, 0.425, 897, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "setBookmark", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setBookmark(self, name):\n self._bookmarks[name] = self._pos\n self._posTobookmarkMap[self._pos] = name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L146_C8", "label": "assign", "type": "assigned_variable", "loc": [146, 146], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L145_C4", "vector": [14, 2, 0.5034, 0.0034, 2, 0.91, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._bookmarks[name] = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L147_C8", "label": "assign", "type": "assigned_variable", "loc": [147, 147], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L145_C4", "vector": [14, 2, 0.5069, 0.0034, 2, 0.91, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._posTobookmarkMap[self._pos] = name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L149_C4", "label": "hasBookmark", "type": "function", "loc": [149, 150], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.5155, 0.0069, 1, 0.88, 0.45, 962, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "hasBookmark", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def hasBookmark(self, name):\n return name in self._bookmarks"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L150_C8", "label": "return", "type": "return", "loc": [150, 150], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L149_C4", "vector": [13, 2, 0.5172, 0.0034, 2, 0.01, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return name in self._bookmarks"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L152_C4", "label": "gotoBookmark", "type": "function", "loc": [152, 159], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.5362, 0.0276, 1, 0.88, 0.475, 44, 0, 2, 0, 0, 0, 0, 5], "semantic": {"name": "gotoBookmark", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def gotoBookmark(self, name):\n if not self.hasBookmark(name):\n raise Error(\"Invalid bookmark (\" + name + \") is invalid: does not exist\")\n pos = self._bookmarks[name]\n if not self.validPos(pos):\n raise Error(\"Invalid bookmark (\" + name + ', '+\n str(pos) + \") is invalid: pos is out of range\" ) \n self._pos = pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L153_C8", "label": "if", "type": "if", "loc": [153, 154], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L152_C4", "vector": [4, 2, 0.5293, 0.0069, 2, 0.76, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.hasBookmark(name):\n raise Error(\"Invalid bookmark (\" + name + \") is invalid: does not exist\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L155_C8", "label": "pos =", "type": "assigned_variable", "loc": [155, 155], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L152_C4", "vector": [14, 2, 0.5345, 0.0034, 2, 0.76, 0.3333, 627, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = self._bookmarks[name]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L156_C8", "label": "if", "type": "if", "loc": [156, 158], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L152_C4", "vector": [4, 2, 0.5414, 0.0103, 2, 0.76, 0.6667, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.validPos(pos):\n raise Error(\"Invalid bookmark (\" + name + ', '+\n str(pos) + \") is invalid: pos is out of range\" ) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L159_C8", "label": "self._pos =", "type": "assigned_variable", "loc": [159, 159], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L152_C4", "vector": [14, 2, 0.5483, 0.0034, 2, 0.76, 1.0, 137, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._pos = pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L161_C4", "label": "atEnd", "type": "function", "loc": [161, 162], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.5569, 0.0069, 1, 0.88, 0.5, 789, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "atEnd", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def atEnd(self):\n return self._pos >= self._breakPoint"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L162_C8", "label": "return", "type": "return", "loc": [162, 162], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L161_C4", "vector": [13, 2, 0.5586, 0.0034, 2, 0.22, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._pos >= self._breakPoint"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L164_C4", "label": "atStart", "type": "function", "loc": [164, 165], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.5672, 0.0069, 1, 0.88, 0.525, 696, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "atStart", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def atStart(self):\n return self._pos == 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L165_C8", "label": "return", "type": "return", "loc": [165, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L164_C4", "vector": [13, 2, 0.569, 0.0034, 2, 0.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._pos == 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L167_C4", "label": "peek", "type": "function", "loc": [167, 170], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.581, 0.0138, 1, 0.88, 0.55, 129, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "peek", "arg_names": ["self", "offset"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def peek(self, offset=0):\n self.checkPos(self._pos+offset)\n pos = self._pos + offset\n return self._src[pos]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L168_C8", "label": "checkPos()", "type": "expression", "loc": [168, 168], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L167_C4", "vector": [8, 2, 0.5793, 0.0034, 2, 0.09, 0.0, 264, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkPos", "arg_names": [], "import_names": [], "rhs_call_name": "checkPos", "annotation": ""}, "snippet": " self.checkPos(self._pos+offset)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L169_C8", "label": "pos =", "type": "assigned_variable", "loc": [169, 169], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L167_C4", "vector": [14, 2, 0.5828, 0.0034, 2, 0.09, 0.5, 627, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = self._pos + offset"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L170_C8", "label": "return", "type": "return", "loc": [170, 170], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L167_C4", "vector": [13, 2, 0.5862, 0.0034, 2, 0.09, 1.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._src[pos]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L172_C4", "label": "getc", "type": "function", "loc": [172, 176], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.6, 0.0172, 1, 0.88, 0.575, 827, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "getc", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getc(self):\n pos = self._pos\n if self.validPos(pos+1):\n self._pos += 1\n return self._src[pos]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L173_C8", "label": "pos =", "type": "assigned_variable", "loc": [173, 173], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L172_C4", "vector": [14, 2, 0.5966, 0.0034, 2, 0.39, 0.0, 627, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L174_C8", "label": "if", "type": "if", "loc": [174, 175], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L172_C4", "vector": [4, 2, 0.6017, 0.0069, 2, 0.39, 0.5, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.validPos(pos+1):\n self._pos += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L176_C8", "label": "return", "type": "return", "loc": [176, 176], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L172_C4", "vector": [13, 2, 0.6069, 0.0034, 2, 0.39, 1.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._src[pos]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L178_C4", "label": "ungetc", "type": "function", "loc": [178, 184], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.6241, 0.0241, 1, 0.88, 0.6, 298, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "ungetc", "arg_names": ["self", "c"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def ungetc(self, c=None):\n if not self.atStart():\n raise Error('Already at beginning of stream')\n\n self._pos -= 1\n if not c==None:\n self._src[self._pos] = c"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L179_C8", "label": "if", "type": "if", "loc": [179, 180], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L178_C4", "vector": [4, 2, 0.619, 0.0069, 2, 0.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.atStart():\n raise Error('Already at beginning of stream')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L183_C8", "label": "if", "type": "if", "loc": [183, 184], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L178_C4", "vector": [4, 2, 0.6328, 0.0069, 2, 0.5, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not c==None:\n self._src[self._pos] = c"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L184_C12", "label": "assign", "type": "assigned_variable", "loc": [184, 184], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L183_C8", "vector": [14, 3, 0.6345, 0.0034, 3, 0.46, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._src[self._pos] = c"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L186_C4", "label": "advance", "type": "function", "loc": [186, 188], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.6448, 0.0103, 1, 0.88, 0.625, 341, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": ["self", "offset"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def advance(self, offset=1):\n self.checkPos(self._pos + offset)\n self._pos += offset"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L187_C8", "label": "checkPos()", "type": "expression", "loc": [187, 187], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L186_C4", "vector": [8, 2, 0.6448, 0.0034, 2, 0.27, 0.0, 264, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkPos", "arg_names": [], "import_names": [], "rhs_call_name": "checkPos", "annotation": ""}, "snippet": " self.checkPos(self._pos + offset)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L190_C4", "label": "rev", "type": "function", "loc": [190, 192], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.6586, 0.0103, 1, 0.88, 0.65, 337, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "rev", "arg_names": ["self", "offset"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def rev(self, offset=1):\n self.checkPos(self._pos - offset)\n self._pos -= offset"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L191_C8", "label": "checkPos()", "type": "expression", "loc": [191, 191], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L190_C4", "vector": [8, 2, 0.6586, 0.0034, 2, 0.35, 0.0, 264, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkPos", "arg_names": [], "import_names": [], "rhs_call_name": "checkPos", "annotation": ""}, "snippet": " self.checkPos(self._pos - offset)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L194_C4", "label": "read", "type": "function", "loc": [194, 198], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.6759, 0.0172, 1, 0.88, 0.675, 453, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "read", "arg_names": ["self", "offset"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def read(self, offset):\n self.checkPos(self._pos + offset)\n start = self._pos\n self._pos += offset\n return self._src[start:self._pos]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L195_C8", "label": "checkPos()", "type": "expression", "loc": [195, 195], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L194_C4", "vector": [8, 2, 0.6724, 0.0034, 2, 0.3, 0.0, 264, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkPos", "arg_names": [], "import_names": [], "rhs_call_name": "checkPos", "annotation": ""}, "snippet": " self.checkPos(self._pos + offset)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L196_C8", "label": "start =", "type": "assigned_variable", "loc": [196, 196], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L194_C4", "vector": [14, 2, 0.6759, 0.0034, 2, 0.3, 0.5, 511, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " start = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L198_C8", "label": "return", "type": "return", "loc": [198, 198], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L194_C4", "vector": [13, 2, 0.6828, 0.0034, 2, 0.3, 1.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._src[start:self._pos]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L200_C4", "label": "readTo", "type": "function", "loc": [200, 205], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.6983, 0.0207, 1, 0.88, 0.7, 293, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "readTo", "arg_names": ["self", "to", "start"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def readTo(self, to, start=None):\n self.checkPos(to)\n if start == None:\n start = self._pos\n self._pos = to\n return self._src[start:to]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L201_C8", "label": "checkPos()", "type": "expression", "loc": [201, 201], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L200_C4", "vector": [8, 2, 0.6931, 0.0034, 2, 0.31, 0.0, 264, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkPos", "arg_names": [], "import_names": [], "rhs_call_name": "checkPos", "annotation": ""}, "snippet": " self.checkPos(to)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L202_C8", "label": "if", "type": "if", "loc": [202, 203], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L200_C4", "vector": [4, 2, 0.6983, 0.0069, 2, 0.31, 0.3333, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if start == None:\n start = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L203_C12", "label": "start =", "type": "assigned_variable", "loc": [203, 203], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L202_C8", "vector": [14, 3, 0.7, 0.0034, 3, 0.69, 0.0, 511, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " start = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L204_C8", "label": "self._pos =", "type": "assigned_variable", "loc": [204, 204], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L200_C4", "vector": [14, 2, 0.7034, 0.0034, 2, 0.31, 0.6667, 137, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._pos = to"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L205_C8", "label": "return", "type": "return", "loc": [205, 205], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L200_C4", "vector": [13, 2, 0.7069, 0.0034, 2, 0.31, 1.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._src[start:to]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L208_C4", "label": "readToEOL", "type": "function", "loc": [208, 214], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.7276, 0.0241, 1, 0.88, 0.725, 553, 0, 3, 1, 0, 0, 0, 6], "semantic": {"name": "readToEOL", "arg_names": ["self", "start", "gobble"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def readToEOL(self, start=None, gobble=True):\n EOLmatch = EOLZre.search(self.src(), self.pos())\n if gobble:\n pos = EOLmatch.end()\n else:\n pos = EOLmatch.start()\n return self.readTo(to=pos, start=start)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L209_C8", "label": "EOLmatch = search()", "type": "assigned_variable", "loc": [209, 209], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L208_C4", "vector": [14, 2, 0.7207, 0.0034, 2, 0.02, 0.0, 377, 3, 2, 0, 0, 163, 10, 3], "semantic": {"name": "EOLmatch", "arg_names": [], "import_names": [], "rhs_call_name": "search", "annotation": ""}, "snippet": " EOLmatch = EOLZre.search(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L210_C8", "label": "if", "type": "if", "loc": [210, 213], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L208_C4", "vector": [4, 2, 0.7293, 0.0138, 2, 0.02, 0.5, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if gobble:\n pos = EOLmatch.end()\n else:\n pos = EOLmatch.start()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L211_C12", "label": "pos = end()", "type": "assigned_variable", "loc": [211, 211], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L210_C8", "vector": [14, 3, 0.7276, 0.0034, 3, 0.86, 0.0, 627, 3, 0, 0, 0, 128, 10, 1], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "end", "annotation": ""}, "snippet": " pos = EOLmatch.end()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L213_C12", "label": "pos = start()", "type": "assigned_variable", "loc": [213, 213], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L210_C8", "vector": [14, 3, 0.7345, 0.0034, 3, 0.86, 1.0, 627, 3, 0, 0, 0, 511, 10, 1], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "start", "annotation": ""}, "snippet": " pos = EOLmatch.start()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L214_C8", "label": "return", "type": "return", "loc": [214, 214], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L208_C4", "vector": [13, 2, 0.7379, 0.0034, 2, 0.02, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.readTo(to=pos, start=start)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L217_C4", "label": "find", "type": "function", "loc": [217, 220], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.7534, 0.0138, 1, 0.88, 0.75, 340, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "find", "arg_names": ["self", "it", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def find(self, it, pos=None):\n if pos == None:\n pos = self._pos\n return self._src.find(it, pos )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L218_C8", "label": "if", "type": "if", "loc": [218, 219], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L217_C4", "vector": [4, 2, 0.7534, 0.0069, 2, 0.73, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pos == None:\n pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L219_C12", "label": "pos =", "type": "assigned_variable", "loc": [219, 219], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L218_C8", "vector": [14, 3, 0.7552, 0.0034, 3, 0.17, 0.0, 627, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L220_C8", "label": "return", "type": "return", "loc": [220, 220], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L217_C4", "vector": [13, 2, 0.7586, 0.0034, 2, 0.73, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._src.find(it, pos )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L222_C4", "label": "startswith", "type": "function", "loc": [222, 226], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.7724, 0.0172, 1, 0.88, 0.775, 193, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "startswith", "arg_names": ["self", "it", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def startswith(self, it, pos=None):\n if self.find(it, pos) == self.pos():\n return True\n else:\n return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L223_C8", "label": "if", "type": "if", "loc": [223, 226], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L222_C4", "vector": [4, 2, 0.7741, 0.0138, 2, 0.16, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.find(it, pos) == self.pos():\n return True\n else:\n return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L224_C12", "label": "return", "type": "return", "loc": [224, 224], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L223_C8", "vector": [13, 3, 0.7724, 0.0034, 3, 0.81, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L226_C12", "label": "return", "type": "return", "loc": [226, 226], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L223_C8", "vector": [13, 3, 0.7793, 0.0034, 3, 0.81, 1.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L228_C4", "label": "rfind", "type": "function", "loc": [228, 231], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.7914, 0.0138, 1, 0.88, 0.8, 634, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "rfind", "arg_names": ["self", "it", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def rfind(self, it, pos):\n if pos == None:\n pos = self._pos\n return self._src.rfind(it, pos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L229_C8", "label": "if", "type": "if", "loc": [229, 230], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L228_C4", "vector": [4, 2, 0.7914, 0.0069, 2, 0.16, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pos == None:\n pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L230_C12", "label": "pos =", "type": "assigned_variable", "loc": [230, 230], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L229_C8", "vector": [14, 3, 0.7931, 0.0034, 3, 0.67, 0.0, 627, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L231_C8", "label": "return", "type": "return", "loc": [231, 231], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L228_C4", "vector": [13, 2, 0.7966, 0.0034, 2, 0.16, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._src.rfind(it, pos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L233_C4", "label": "findBOL", "type": "function", "loc": [233, 237], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.8103, 0.0172, 1, 0.88, 0.825, 817, 0, 2, 1, 0, 0, 0, 4], "semantic": {"name": "findBOL", "arg_names": ["self", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def findBOL(self, pos=None):\n if pos == None:\n pos = self._pos\n src = self.src()\n return max(src.rfind('\\n', 0, pos)+1, src.rfind('\\r', 0, pos)+1, 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L234_C8", "label": "if", "type": "if", "loc": [234, 235], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L233_C4", "vector": [4, 2, 0.8086, 0.0069, 2, 0.68, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pos == None:\n pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L235_C12", "label": "pos =", "type": "assigned_variable", "loc": [235, 235], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L234_C8", "vector": [14, 3, 0.8103, 0.0034, 3, 0.0, 0.0, 627, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L236_C8", "label": "src = src()", "type": "assigned_variable", "loc": [236, 236], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L233_C4", "vector": [14, 2, 0.8138, 0.0034, 2, 0.68, 0.5, 345, 3, 0, 0, 0, 345, 10, 1], "semantic": {"name": "src", "arg_names": [], "import_names": [], "rhs_call_name": "src", "annotation": ""}, "snippet": " src = self.src()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L237_C8", "label": "return", "type": "return", "loc": [237, 237], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L233_C4", "vector": [13, 2, 0.8172, 0.0034, 2, 0.68, 1.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return max(src.rfind('\\n', 0, pos)+1, src.rfind('\\r', 0, pos)+1, 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L239_C4", "label": "findEOL", "type": "function", "loc": [239, 247], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.8379, 0.031, 1, 0.88, 0.85, 286, 0, 3, 1, 0, 0, 0, 4], "semantic": {"name": "findEOL", "arg_names": ["self", "pos", "gobble"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def findEOL(self, pos=None, gobble=False):\n if pos == None:\n pos = self._pos\n\n match = EOLZre.search(self.src(), pos)\n if gobble:\n return match.end()\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L240_C8", "label": "if", "type": "if", "loc": [240, 241], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L239_C4", "vector": [4, 2, 0.8293, 0.0069, 2, 0.63, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pos == None:\n pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L241_C12", "label": "pos =", "type": "assigned_variable", "loc": [241, 241], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L240_C8", "vector": [14, 3, 0.831, 0.0034, 3, 0.17, 0.0, 627, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = self._pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L243_C8", "label": "match = search()", "type": "assigned_variable", "loc": [243, 243], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L239_C4", "vector": [14, 2, 0.8379, 0.0034, 2, 0.63, 0.5, 36, 3, 2, 0, 0, 163, 10, 2], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "search", "annotation": ""}, "snippet": " match = EOLZre.search(self.src(), pos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L244_C8", "label": "if", "type": "if", "loc": [244, 247], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L239_C4", "vector": [4, 2, 0.8466, 0.0138, 2, 0.63, 1.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if gobble:\n return match.end()\n else:\n return match.start()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L245_C12", "label": "return", "type": "return", "loc": [245, 245], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L244_C8", "vector": [13, 3, 0.8448, 0.0034, 3, 0.12, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return match.end()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L247_C12", "label": "return", "type": "return", "loc": [247, 247], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L244_C8", "vector": [13, 3, 0.8517, 0.0034, 3, 0.12, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return match.start()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L249_C4", "label": "isLineClearToPos", "type": "function", "loc": [249, 255], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.869, 0.0241, 1, 0.88, 0.875, 187, 0, 2, 1, 0, 0, 0, 5], "semantic": {"name": "isLineClearToPos", "arg_names": ["self", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def isLineClearToPos(self, pos=None):\n if pos == None:\n pos = self.pos()\n self.checkPos(pos) \n src = self.src()\n BOL = self.findBOL()\n return BOL == pos or src[BOL:pos].isspace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L250_C8", "label": "if", "type": "if", "loc": [250, 251], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L249_C4", "vector": [4, 2, 0.8638, 0.0069, 2, 0.58, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pos == None:\n pos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L251_C12", "label": "pos = pos()", "type": "assigned_variable", "loc": [251, 251], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L250_C8", "vector": [14, 3, 0.8655, 0.0034, 3, 0.93, 0.0, 627, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " pos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L252_C8", "label": "checkPos()", "type": "expression", "loc": [252, 252], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L249_C4", "vector": [8, 2, 0.869, 0.0034, 2, 0.58, 0.25, 264, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "checkPos", "arg_names": [], "import_names": [], "rhs_call_name": "checkPos", "annotation": ""}, "snippet": " self.checkPos(pos) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L253_C8", "label": "src = src()", "type": "assigned_variable", "loc": [253, 253], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L249_C4", "vector": [14, 2, 0.8724, 0.0034, 2, 0.58, 0.5, 345, 3, 0, 0, 0, 345, 10, 1], "semantic": {"name": "src", "arg_names": [], "import_names": [], "rhs_call_name": "src", "annotation": ""}, "snippet": " src = self.src()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L254_C8", "label": "BOL = findBOL()", "type": "assigned_variable", "loc": [254, 254], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L249_C4", "vector": [14, 2, 0.8759, 0.0034, 2, 0.58, 0.75, 759, 3, 0, 0, 0, 817, 10, 1], "semantic": {"name": "BOL", "arg_names": [], "import_names": [], "rhs_call_name": "findBOL", "annotation": ""}, "snippet": " BOL = self.findBOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L255_C8", "label": "return", "type": "return", "loc": [255, 255], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L249_C4", "vector": [13, 2, 0.8793, 0.0034, 2, 0.58, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return BOL == pos or src[BOL:pos].isspace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L257_C4", "label": "matches", "type": "function", "loc": [257, 261], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.8931, 0.0172, 1, 0.88, 0.9, 684, 0, 2, 1, 0, 0, 0, 6], "semantic": {"name": "matches", "arg_names": ["self", "strOrRE"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matches(self, strOrRE):\n if isinstance(strOrRE, (str, unicode)):\n return self.startswith(strOrRE, pos=self.pos())\n else: # assume an re object\n return strOrRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L258_C8", "label": "if", "type": "if", "loc": [258, 261], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L257_C4", "vector": [4, 2, 0.8948, 0.0138, 2, 0.42, 0.0, 0, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(strOrRE, (str, unicode)):\n return self.startswith(strOrRE, pos=self.pos())\n else: # assume an re object\n return strOrRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L259_C12", "label": "return", "type": "return", "loc": [259, 259], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L258_C8", "vector": [13, 3, 0.8931, 0.0034, 3, 0.23, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.startswith(strOrRE, pos=self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L261_C12", "label": "return", "type": "return", "loc": [261, 261], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L258_C8", "vector": [13, 3, 0.9, 0.0034, 3, 0.23, 1.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return strOrRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L263_C4", "label": "matchWhiteSpace", "type": "function", "loc": [263, 264], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.9086, 0.0069, 1, 0.88, 0.925, 312, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "matchWhiteSpace", "arg_names": ["self", "WSchars"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchWhiteSpace(self, WSchars=' \\f\\t'):\n return (not self.atEnd()) and self.peek() in WSchars"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L264_C8", "label": "return", "type": "return", "loc": [264, 264], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L263_C4", "vector": [13, 2, 0.9103, 0.0034, 2, 0.76, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return (not self.atEnd()) and self.peek() in WSchars"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L266_C4", "label": "getWhiteSpace", "type": "function", "loc": [266, 277], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.9362, 0.0414, 1, 0.88, 0.95, 84, 0, 3, 1, 0, 0, 0, 10], "semantic": {"name": "getWhiteSpace", "arg_names": ["self", "max", "WSchars"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getWhiteSpace(self, max=None, WSchars=' \\f\\t'):\n if not self.matchWhiteSpace(WSchars):\n return ''\n start = self.pos()\n breakPoint = self.breakPoint()\n if max is not None:\n breakPoint = min(breakPoint, self.pos()+max)\n while self.pos() < breakPoint:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L267_C8", "label": "if", "type": "if", "loc": [267, 268], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L266_C4", "vector": [4, 2, 0.9224, 0.0069, 2, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.matchWhiteSpace(WSchars):\n return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L268_C12", "label": "return", "type": "return", "loc": [268, 268], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L267_C8", "vector": [13, 3, 0.9241, 0.0034, 3, 0.47, 0.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L269_C8", "label": "start = pos()", "type": "assigned_variable", "loc": [269, 269], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L266_C4", "vector": [14, 2, 0.9276, 0.0034, 2, 0.66, 0.2, 511, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " start = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L270_C8", "label": "breakPoint = breakPoint()", "type": "assigned_variable", "loc": [270, 270], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L266_C4", "vector": [14, 2, 0.931, 0.0034, 2, 0.66, 0.4, 691, 3, 0, 0, 0, 691, 10, 1], "semantic": {"name": "breakPoint", "arg_names": [], "import_names": [], "rhs_call_name": "breakPoint", "annotation": ""}, "snippet": " breakPoint = self.breakPoint()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L271_C8", "label": "if", "type": "if", "loc": [271, 272], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L266_C4", "vector": [4, 2, 0.9362, 0.0069, 2, 0.66, 0.6, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if max is not None:\n breakPoint = min(breakPoint, self.pos()+max)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L272_C12", "label": "breakPoint = min()", "type": "assigned_variable", "loc": [272, 272], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L271_C8", "vector": [14, 3, 0.9379, 0.0034, 3, 0.9, 0.0, 691, 3, 2, 0, 0, 867, 10, 2], "semantic": {"name": "breakPoint", "arg_names": [], "import_names": [], "rhs_call_name": "min", "annotation": ""}, "snippet": " breakPoint = min(breakPoint, self.pos()+max)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L273_C8", "label": "while", "type": "while", "loc": [273, 276], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L266_C4", "vector": [5, 2, 0.9466, 0.0138, 2, 0.66, 0.8, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while self.pos() < breakPoint:\n self.advance()\n if not self.matchWhiteSpace(WSchars):\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L274_C12", "label": "advance()", "type": "expression", "loc": [274, 274], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L273_C8", "vector": [8, 3, 0.9448, 0.0034, 3, 0.38, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L275_C12", "label": "if", "type": "if", "loc": [275, 276], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L273_C8", "vector": [4, 3, 0.95, 0.0069, 3, 0.38, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.matchWhiteSpace(WSchars):\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L277_C8", "label": "return", "type": "return", "loc": [277, 277], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L266_C4", "vector": [13, 2, 0.9552, 0.0034, 2, 0.66, 1.0, 0, 6, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.src()[start:self.pos()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L279_C4", "label": "matchNonWhiteSpace", "type": "function", "loc": [279, 280], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.9638, 0.0069, 1, 0.88, 0.975, 576, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "matchNonWhiteSpace", "arg_names": ["self", "WSchars"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchNonWhiteSpace(self, WSchars=' \\f\\t\\n\\r'):\n return self.atEnd() or not self.peek() in WSchars"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L280_C8", "label": "return", "type": "return", "loc": [280, 280], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L279_C4", "vector": [13, 2, 0.9655, 0.0034, 2, 0.97, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.atEnd() or not self.peek() in WSchars"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L282_C4", "label": "getNonWhiteSpace", "type": "function", "loc": [282, 290], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "vector": [2, 1, 0.9862, 0.031, 1, 0.88, 1.0, 798, 0, 2, 1, 0, 0, 0, 8], "semantic": {"name": "getNonWhiteSpace", "arg_names": ["self", "WSchars"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getNonWhiteSpace(self, WSchars=' \\f\\t\\n\\r'):\n if not self.matchNonWhiteSpace(WSchars):\n return ''\n start = self.pos()\n while self.pos() < self.breakPoint():\n self.advance()\n if not self.matchNonWhiteSpace(WSchars):\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L283_C8", "label": "if", "type": "if", "loc": [283, 284], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L282_C4", "vector": [4, 2, 0.9776, 0.0069, 2, 0.11, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.matchNonWhiteSpace(WSchars):\n return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L284_C12", "label": "return", "type": "return", "loc": [284, 284], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L283_C8", "vector": [13, 3, 0.9793, 0.0034, 3, 0.52, 0.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L285_C8", "label": "start = pos()", "type": "assigned_variable", "loc": [285, 285], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L282_C4", "vector": [14, 2, 0.9828, 0.0034, 2, 0.11, 0.3333, 511, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " start = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L286_C8", "label": "while", "type": "while", "loc": [286, 289], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L282_C4", "vector": [5, 2, 0.9914, 0.0138, 2, 0.11, 0.6667, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while self.pos() < self.breakPoint():\n self.advance()\n if not self.matchNonWhiteSpace(WSchars):\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L287_C12", "label": "advance()", "type": "expression", "loc": [287, 287], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L286_C8", "vector": [8, 3, 0.9897, 0.0034, 3, 0.16, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L288_C12", "label": "if", "type": "if", "loc": [288, 289], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L286_C8", "vector": [4, 3, 0.9948, 0.0069, 3, 0.16, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.matchNonWhiteSpace(WSchars):\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L290_C8", "label": "return", "type": "return", "loc": [290, 290], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L282_C4", "vector": [13, 2, 1.0, 0.0034, 2, 0.11, 1.0, 0, 6, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.src()[start:self.pos()]"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L43_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L44_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L44_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L45_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L44_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L47_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L55_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L56_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L55_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L57_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L55_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L58_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:For_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:For_L61_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L62_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:For_L61_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L63_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L65_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L68_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L74_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L75_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L74_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L78_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L78_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L79_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L78_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L79_C23"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L78_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L82_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L82_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L83_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L83_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L84_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L82_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L85_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L87_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L87_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L88_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L88_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L89_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L87_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:For_L91_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:For_L91_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L92_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L92_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L93_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L95_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L96_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L97_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L95_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L98_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L95_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L95_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L100_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L102_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L102_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L103_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L103_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L104_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L102_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L105_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L102_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L108_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L108_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L109_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L109_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L110_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L108_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L108_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L112_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L114_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L114_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L117_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L118_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L119_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L122_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L122_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L123_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L125_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L125_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L126_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L126_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L129_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L132_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L132_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L133_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L135_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L136_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L136_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L143_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L145_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L145_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L146_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L145_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L149_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L149_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L150_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L152_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L152_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L153_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L152_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L155_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L152_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L156_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L152_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L159_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L161_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L161_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L162_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L164_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L164_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L167_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L167_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L168_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L167_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L169_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L167_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L170_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L172_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L173_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L174_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L176_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L178_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L183_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L183_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L184_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L186_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L186_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L187_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L190_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L191_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L194_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L194_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L195_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L194_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L196_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L194_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L198_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L200_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L200_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L201_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L200_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L202_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L202_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L203_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L200_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L204_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L200_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L205_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L208_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L208_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L209_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L208_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L210_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L210_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L211_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L210_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L213_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L208_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L214_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L217_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L217_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L218_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L218_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L219_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L217_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L220_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L222_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L222_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L223_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L223_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L224_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L223_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L226_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L228_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L228_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L229_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L229_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L230_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L228_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L231_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L233_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L234_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L234_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L235_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L236_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L233_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L237_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L239_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L240_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L240_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L241_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L243_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L244_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L244_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L245_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L244_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L247_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L249_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L249_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L250_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L250_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L251_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L249_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L252_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L249_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L253_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L249_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L254_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L249_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L255_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L257_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L257_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L258_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L258_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L259_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L258_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L261_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L263_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L263_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L264_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L266_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L266_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L267_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L267_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L268_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L266_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L269_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L266_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L270_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L266_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L271_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L271_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L272_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L266_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L273_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L273_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L274_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L273_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L275_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L266_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L277_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L279_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L279_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L280_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L282_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L282_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L283_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L283_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L284_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L282_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Assign_L285_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L282_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L286_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L286_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Expr_L287_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:While_L286_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:If_L288_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1502:FunctionDef_L282_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1502:Return_L290_C8"}]
""" Indentation maker. @@TR: this code is unsupported and largely undocumented ... This version is based directly on code by Robert Kuzelj <robert_kuzelj@yahoo.com> and uses his directive syntax. Some classes and attributes have been renamed. Indentation is output via $self._CHEETAH__indenter.indent() to prevent '_indenter' being looked up on the searchList and another one being found. The directive syntax will soon be changed somewhat. """ import re import sys def indentize(source): return IndentProcessor().process(source) class IndentProcessor(object): """Preprocess #indent tags.""" LINE_SEP = '\n' ARGS = "args" INDENT_DIR = re.compile(r'[ \t]*#indent[ \t]*(?P<args>.*)') DIRECTIVE = re.compile(r"[ \t]*#") WS = "ws" WHITESPACES = re.compile(r"(?P<ws>[ \t]*)") INC = "++" DEC = "--" SET = "=" CHAR = "char" ON = "on" OFF = "off" PUSH = "push" POP = "pop" def process(self, _txt): result = [] for line in _txt.splitlines(): match = self.INDENT_DIR.match(line) if match: #is indention directive args = match.group(self.ARGS).strip() if args == self.ON: line = "#silent $self._CHEETAH__indenter.on()" elif args == self.OFF: line = "#silent $self._CHEETAH__indenter.off()" elif args == self.INC: line = "#silent $self._CHEETAH__indenter.inc()" elif args == self.DEC: line = "#silent $self._CHEETAH__indenter.dec()" elif args.startswith(self.SET): level = int(args[1:]) line = "#silent $self._CHEETAH__indenter.setLevel(%(level)d)" % {"level":level} elif args.startswith('chars'): self.indentChars = eval(args.split('=')[1]) line = "#silent $self._CHEETAH__indenter.setChars(%(level)d)" % {"level":level} elif args.startswith(self.PUSH): line = "#silent $self._CHEETAH__indenter.push()" elif args.startswith(self.POP): line = "#silent $self._CHEETAH__indenter.pop()" else: match = self.DIRECTIVE.match(line) if not match: #is not another directive match = self.WHITESPACES.match(line) if match: size = len(match.group("ws").expandtabs(4)) line = ("${self._CHEETAH__indenter.indent(%(size)d)}" % {"size":size}) + line.lstrip() else: line = "${self._CHEETAH__indenter.indent(0)}" + line result.append(line) return self.LINE_SEP.join(result) class Indenter(object): """ A class that keeps track of the current indentation level. .indent() returns the appropriate amount of indentation. """ On = 1 Level = 0 Chars = ' ' LevelStack = [] def on(self): self.On = 1 def off(self): self.On = 0 def inc(self): self.Level += 1 def dec(self): """decrement can only be applied to values greater zero values below zero don't make any sense at all!""" if self.Level > 0: self.Level -= 1 def push(self): self.LevelStack.append(self.Level) def pop(self): """the levestack can not become -1. any attempt to do so sets the level to 0!""" if len(self.LevelStack) > 0: self.Level = self.LevelStack.pop() else: self.Level = 0 def setLevel(self, _level): """the leve can't be less than zero. any attempt to do so sets the level automatically to zero!""" if _level < 0: self.Level = 0 else: self.Level = _level def setChar(self, _chars): self.Chars = _chars def indent(self, _default=0): if self.On: return self.Chars * self.Level return " " * _default
ajibawa-2023/Python-Code-Large/train/row_1504
86
123
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0488, 0.0894, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nIndentation maker.\n@@TR: this code is unsupported and largely undocumented ...\n\nThis version is based directly on code by Robert Kuzelj\n<robert_kuzelj@yahoo.com> and uses his directive syntax. Some classes and\nattributes have been renamed. Indentation is output via\n$self._CHEETAH__indenter.indent() to prevent '_indenter' being looked up on the"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Import_L13_C0", "label": "re import re", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.1057, 0.0081, 0, 0.66, 0.2, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Import_L14_C0", "label": "sys import sys", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.1138, 0.0081, 0, 0.66, 0.4, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L16_C0", "label": "indentize", "type": "function", "loc": [16, 17], "level": 0, "parent": null, "vector": [2, 0, 0.1341, 0.0163, 0, 0.66, 0.6, 251, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "indentize", "arg_names": ["source"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def indentize(source):\n return IndentProcessor().process(source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Return_L17_C4", "label": "return", "type": "return", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L16_C0", "vector": [13, 1, 0.1382, 0.0081, 1, 0.05, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return IndentProcessor().process(source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "label": "IndentProcessor", "type": "class", "loc": [19, 78], "level": 0, "parent": null, "vector": [3, 0, 0.3943, 0.4878, 0, 0.66, 0.8, 127, 0, 1, 0, 0, 186, 0, 22], "semantic": {"name": "IndentProcessor", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class IndentProcessor(object):\n \"\"\"Preprocess #indent tags.\"\"\"\n LINE_SEP = '\\n'\n ARGS = \"args\"\n INDENT_DIR = re.compile(r'[ \\t]*#indent[ \\t]*(?P<args>.*)')\n DIRECTIVE = re.compile(r\"[ \\t]*#\")\n WS = \"ws\"\n WHITESPACES = re.compile(r\"(?P<ws>[ \\t]*)\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Expr_L20_C4", "label": "expression", "type": "expression", "loc": [20, 20], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "vector": [8, 1, 0.1626, 0.0081, 1, 0.25, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Preprocess #indent tags.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L21_C4", "label": "LINE_SEP =", "type": "assigned_variable", "loc": [21, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "vector": [14, 1, 0.1707, 0.0081, 1, 0.25, 0.0667, 744, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "LINE_SEP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " LINE_SEP = '\\n'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L22_C4", "label": "ARGS =", "type": "assigned_variable", "loc": [22, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "vector": [14, 1, 0.1789, 0.0081, 1, 0.25, 0.1333, 412, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ARGS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ARGS = \"args\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L23_C4", "label": "INDENT_DIR = compile()", "type": "assigned_variable", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "vector": [14, 1, 0.187, 0.0081, 1, 0.25, 0.2, 190, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "INDENT_DIR", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " INDENT_DIR = re.compile(r'[ \\t]*#indent[ \\t]*(?P<args>.*)')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L24_C4", "label": "DIRECTIVE = compile()", "type": "assigned_variable", "loc": [24, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "vector": [14, 1, 0.1951, 0.0081, 1, 0.25, 0.2667, 872, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "DIRECTIVE", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " DIRECTIVE = re.compile(r\"[ \\t]*#\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L25_C4", "label": "WS =", "type": "assigned_variable", "loc": [25, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "vector": [14, 1, 0.2033, 0.0081, 1, 0.25, 0.3333, 690, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "WS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " WS = \"ws\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L26_C4", "label": "WHITESPACES = compile()", "type": "assigned_variable", "loc": [26, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "vector": [14, 1, 0.2114, 0.0081, 1, 0.25, 0.4, 271, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "WHITESPACES", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " WHITESPACES = re.compile(r\"(?P<ws>[ \\t]*)\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L28_C4", "label": "INC =", "type": "assigned_variable", "loc": [28, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "vector": [14, 1, 0.2276, 0.0081, 1, 0.25, 0.4667, 299, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "INC", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " INC = \"++\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L29_C4", "label": "DEC =", "type": "assigned_variable", "loc": [29, 29], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "vector": [14, 1, 0.2358, 0.0081, 1, 0.25, 0.5333, 995, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "DEC", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " DEC = \"--\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L31_C4", "label": "SET =", "type": "assigned_variable", "loc": [31, 31], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "vector": [14, 1, 0.252, 0.0081, 1, 0.25, 0.6, 140, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "SET", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " SET = \"=\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L32_C4", "label": "CHAR =", "type": "assigned_variable", "loc": [32, 32], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "vector": [14, 1, 0.2602, 0.0081, 1, 0.25, 0.6667, 639, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "CHAR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " CHAR = \"char\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L34_C4", "label": "ON =", "type": "assigned_variable", "loc": [34, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "vector": [14, 1, 0.2764, 0.0081, 1, 0.25, 0.7333, 73, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ON", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ON = \"on\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L35_C4", "label": "OFF =", "type": "assigned_variable", "loc": [35, 35], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "vector": [14, 1, 0.2846, 0.0081, 1, 0.25, 0.8, 578, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "OFF", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " OFF = \"off\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L37_C4", "label": "PUSH =", "type": "assigned_variable", "loc": [37, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "vector": [14, 1, 0.3008, 0.0081, 1, 0.25, 0.8667, 659, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "PUSH", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " PUSH = \"push\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L38_C4", "label": "POP =", "type": "assigned_variable", "loc": [38, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "vector": [14, 1, 0.3089, 0.0081, 1, 0.25, 0.9333, 122, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "POP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " POP = \"pop\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L40_C4", "label": "process", "type": "function", "loc": [40, 78], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "vector": [2, 1, 0.4797, 0.3171, 1, 0.25, 1.0, 712, 0, 2, 1, 0, 0, 0, 19], "semantic": {"name": "process", "arg_names": ["self", "_txt"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def process(self, _txt):\n result = []\n\n for line in _txt.splitlines():\n match = self.INDENT_DIR.match(line)\n if match:\n #is indention directive\n args = match.group(self.ARGS).strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L41_C8", "label": "result =", "type": "assigned_variable", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L40_C4", "vector": [14, 2, 0.3333, 0.0081, 2, 0.85, 0.0, 51, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " result = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:For_L43_C8", "label": "for line", "type": "for", "loc": [43, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L40_C4", "vector": [6, 2, 0.4837, 0.2764, 2, 0.85, 0.5, 373, 3, 0, 0, 0, 0, 0, 18], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in _txt.splitlines():\n match = self.INDENT_DIR.match(line)\n if match:\n #is indention directive\n args = match.group(self.ARGS).strip()\n if args == self.ON:\n line = \"#silent $self._CHEETAH__indenter.on()\"\n elif args == self.OFF:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L44_C12", "label": "match = match()", "type": "assigned_variable", "loc": [44, 44], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:For_L43_C8", "vector": [14, 3, 0.3577, 0.0081, 3, 0.12, 0.0, 36, 3, 1, 0, 0, 36, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " match = self.INDENT_DIR.match(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L45_C12", "label": "if", "type": "if", "loc": [45, 75], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:For_L43_C8", "vector": [4, 3, 0.4878, 0.252, 3, 0.12, 0.5, 0, 2, 0, 0, 0, 0, 0, 15], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if match:\n #is indention directive\n args = match.group(self.ARGS).strip()\n if args == self.ON:\n line = \"#silent $self._CHEETAH__indenter.on()\"\n elif args == self.OFF:\n line = \"#silent $self._CHEETAH__indenter.off()\"\n elif args == self.INC:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L47_C16", "label": "args = strip()", "type": "assigned_variable", "loc": [47, 47], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L45_C12", "vector": [14, 4, 0.3821, 0.0081, 4, 0.3, 0.0, 805, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "args", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " args = match.group(self.ARGS).strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L48_C16", "label": "if", "type": "if", "loc": [48, 65], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L45_C12", "vector": [4, 4, 0.4593, 0.1463, 4, 0.3, 0.3333, 0, 0, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if args == self.ON:\n line = \"#silent $self._CHEETAH__indenter.on()\"\n elif args == self.OFF:\n line = \"#silent $self._CHEETAH__indenter.off()\"\n elif args == self.INC:\n line = \"#silent $self._CHEETAH__indenter.inc()\"\n elif args == self.DEC:\n line = \"#silent $self._CHEETAH__indenter.dec()\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L49_C20", "label": "line =", "type": "assigned_variable", "loc": [49, 49], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L48_C16", "vector": [14, 5, 0.3984, 0.0081, 5, 0.46, 0.0, 373, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " line = \"#silent $self._CHEETAH__indenter.on()\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L50_C16", "label": "if", "type": "if", "loc": [50, 65], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L48_C16", "vector": [4, 5, 0.4675, 0.1301, 5, 0.46, 1.0, 0, 0, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif args == self.OFF:\n line = \"#silent $self._CHEETAH__indenter.off()\"\n elif args == self.INC:\n line = \"#silent $self._CHEETAH__indenter.inc()\"\n elif args == self.DEC:\n line = \"#silent $self._CHEETAH__indenter.dec()\"\n elif args.startswith(self.SET):\n level = int(args[1:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L51_C20", "label": "line =", "type": "assigned_variable", "loc": [51, 51], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L50_C16", "vector": [14, 6, 0.4146, 0.0081, 6, 0.19, 0.0, 373, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " line = \"#silent $self._CHEETAH__indenter.off()\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L52_C16", "label": "if", "type": "if", "loc": [52, 65], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L50_C16", "vector": [4, 6, 0.4756, 0.1138, 6, 0.19, 1.0, 0, 0, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif args == self.INC:\n line = \"#silent $self._CHEETAH__indenter.inc()\"\n elif args == self.DEC:\n line = \"#silent $self._CHEETAH__indenter.dec()\"\n elif args.startswith(self.SET):\n level = int(args[1:])\n line = \"#silent $self._CHEETAH__indenter.setLevel(%(level)d)\" % {\"level\":level}\n elif args.startswith('chars'):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L53_C20", "label": "line =", "type": "assigned_variable", "loc": [53, 53], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L52_C16", "vector": [14, 7, 0.4309, 0.0081, 7, 0.59, 0.0, 373, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " line = \"#silent $self._CHEETAH__indenter.inc()\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L54_C16", "label": "if", "type": "if", "loc": [54, 65], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L52_C16", "vector": [4, 7, 0.4837, 0.0976, 7, 0.59, 1.0, 0, 0, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif args == self.DEC:\n line = \"#silent $self._CHEETAH__indenter.dec()\"\n elif args.startswith(self.SET):\n level = int(args[1:])\n line = \"#silent $self._CHEETAH__indenter.setLevel(%(level)d)\" % {\"level\":level}\n elif args.startswith('chars'):\n self.indentChars = eval(args.split('=')[1])\n line = \"#silent $self._CHEETAH__indenter.setChars(%(level)d)\" % {\"level\":level}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L55_C20", "label": "line =", "type": "assigned_variable", "loc": [55, 55], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L54_C16", "vector": [14, 8, 0.4472, 0.0081, 8, 0.08, 0.0, 373, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " line = \"#silent $self._CHEETAH__indenter.dec()\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L56_C16", "label": "if", "type": "if", "loc": [56, 65], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L54_C16", "vector": [4, 8, 0.4919, 0.0813, 8, 0.08, 1.0, 0, 3, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif args.startswith(self.SET):\n level = int(args[1:])\n line = \"#silent $self._CHEETAH__indenter.setLevel(%(level)d)\" % {\"level\":level}\n elif args.startswith('chars'):\n self.indentChars = eval(args.split('=')[1])\n line = \"#silent $self._CHEETAH__indenter.setChars(%(level)d)\" % {\"level\":level}\n elif args.startswith(self.PUSH):\n line = \"#silent $self._CHEETAH__indenter.push()\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L57_C20", "label": "level = int()", "type": "assigned_variable", "loc": [57, 57], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L56_C16", "vector": [14, 9, 0.4634, 0.0081, 9, 0.12, 0.0, 479, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "level", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " level = int(args[1:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L58_C20", "label": "line =", "type": "assigned_variable", "loc": [58, 58], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L56_C16", "vector": [14, 9, 0.4715, 0.0081, 9, 0.12, 0.5, 373, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " line = \"#silent $self._CHEETAH__indenter.setLevel(%(level)d)\" % {\"level\":level}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L59_C16", "label": "if", "type": "if", "loc": [59, 65], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L56_C16", "vector": [4, 9, 0.5041, 0.0569, 9, 0.12, 1.0, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif args.startswith('chars'):\n self.indentChars = eval(args.split('=')[1])\n line = \"#silent $self._CHEETAH__indenter.setChars(%(level)d)\" % {\"level\":level}\n elif args.startswith(self.PUSH):\n line = \"#silent $self._CHEETAH__indenter.push()\"\n elif args.startswith(self.POP):\n line = \"#silent $self._CHEETAH__indenter.pop()\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L60_C20", "label": "self.indentChars = eval()", "type": "assigned_variable", "loc": [60, 60], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L59_C16", "vector": [14, 10, 0.4878, 0.0081, 10, 0.03, 0.0, 370, 3, 1, 0, 0, 776, 10, 2], "semantic": {"name": "self.indentChars", "arg_names": [], "import_names": [], "rhs_call_name": "eval", "annotation": ""}, "snippet": " self.indentChars = eval(args.split('=')[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L61_C20", "label": "line =", "type": "assigned_variable", "loc": [61, 61], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L59_C16", "vector": [14, 10, 0.4959, 0.0081, 10, 0.03, 0.5, 373, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " line = \"#silent $self._CHEETAH__indenter.setChars(%(level)d)\" % {\"level\":level}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L62_C16", "label": "if", "type": "if", "loc": [62, 65], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L59_C16", "vector": [4, 10, 0.5163, 0.0325, 10, 0.03, 1.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif args.startswith(self.PUSH):\n line = \"#silent $self._CHEETAH__indenter.push()\"\n elif args.startswith(self.POP):\n line = \"#silent $self._CHEETAH__indenter.pop()\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L63_C20", "label": "line =", "type": "assigned_variable", "loc": [63, 63], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L62_C16", "vector": [14, 11, 0.5122, 0.0081, 11, 0.45, 0.0, 373, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " line = \"#silent $self._CHEETAH__indenter.push()\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L64_C16", "label": "if", "type": "if", "loc": [64, 65], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L62_C16", "vector": [4, 11, 0.5244, 0.0163, 11, 0.45, 1.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif args.startswith(self.POP):\n line = \"#silent $self._CHEETAH__indenter.pop()\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L65_C20", "label": "line =", "type": "assigned_variable", "loc": [65, 65], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L64_C16", "vector": [14, 12, 0.5285, 0.0081, 12, 0.93, 0.0, 373, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " line = \"#silent $self._CHEETAH__indenter.pop()\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L67_C16", "label": "match = match()", "type": "assigned_variable", "loc": [67, 67], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L45_C12", "vector": [14, 4, 0.5447, 0.0081, 4, 0.3, 0.6667, 36, 3, 1, 0, 0, 36, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " match = self.DIRECTIVE.match(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L68_C16", "label": "if", "type": "if", "loc": [68, 75], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L45_C12", "vector": [4, 4, 0.5813, 0.065, 4, 0.3, 1.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not match:\n #is not another directive\n match = self.WHITESPACES.match(line)\n if match:\n size = len(match.group(\"ws\").expandtabs(4))\n line = (\"${self._CHEETAH__indenter.indent(%(size)d)}\" % {\"size\":size}) + line.lstrip()\n else:\n line = \"${self._CHEETAH__indenter.indent(0)}\" + line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L70_C20", "label": "match = match()", "type": "assigned_variable", "loc": [70, 70], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L68_C16", "vector": [14, 5, 0.5691, 0.0081, 5, 0.17, 0.0, 36, 3, 1, 0, 0, 36, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " match = self.WHITESPACES.match(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L71_C20", "label": "if", "type": "if", "loc": [71, 75], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L68_C16", "vector": [4, 5, 0.5935, 0.0407, 5, 0.17, 1.0, 0, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if match:\n size = len(match.group(\"ws\").expandtabs(4))\n line = (\"${self._CHEETAH__indenter.indent(%(size)d)}\" % {\"size\":size}) + line.lstrip()\n else:\n line = \"${self._CHEETAH__indenter.indent(0)}\" + line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L72_C24", "label": "size = len()", "type": "assigned_variable", "loc": [72, 72], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L71_C20", "vector": [14, 6, 0.5854, 0.0081, 6, 0.6, 0.0, 714, 3, 1, 0, 0, 890, 10, 3], "semantic": {"name": "size", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " size = len(match.group(\"ws\").expandtabs(4))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L73_C24", "label": "line =", "type": "assigned_variable", "loc": [73, 73], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L71_C20", "vector": [14, 6, 0.5935, 0.0081, 6, 0.6, 0.5, 373, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " line = (\"${self._CHEETAH__indenter.indent(%(size)d)}\" % {\"size\":size}) + line.lstrip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L75_C24", "label": "line =", "type": "assigned_variable", "loc": [75, 75], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L71_C20", "vector": [14, 6, 0.6098, 0.0081, 6, 0.6, 1.0, 373, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " line = \"${self._CHEETAH__indenter.indent(0)}\" + line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Expr_L76_C12", "label": "append()", "type": "expression", "loc": [76, 76], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:For_L43_C8", "vector": [8, 3, 0.6179, 0.0081, 3, 0.12, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " result.append(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Return_L78_C8", "label": "return", "type": "return", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L40_C4", "vector": [13, 2, 0.6341, 0.0081, 2, 0.85, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.LINE_SEP.join(result)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "label": "Indenter", "type": "class", "loc": [80, 122], "level": 0, "parent": null, "vector": [3, 0, 0.8211, 0.3496, 0, 0.66, 1.0, 821, 0, 9, 0, 0, 186, 0, 3], "semantic": {"name": "Indenter", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Indenter(object):\n \"\"\"\n A class that keeps track of the current indentation level.\n .indent() returns the appropriate amount of indentation.\n \"\"\"\n On = 1\n Level = 0\n Chars = ' '"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Expr_L81_C4", "label": "expression", "type": "expression", "loc": [81, 84], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "vector": [8, 1, 0.6707, 0.0325, 1, 0.99, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n A class that keeps track of the current indentation level.\n .indent() returns the appropriate amount of indentation.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L85_C4", "label": "On =", "type": "assigned_variable", "loc": [85, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "vector": [14, 1, 0.6911, 0.0081, 1, 0.99, 0.0769, 174, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "On", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " On = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L86_C4", "label": "Level =", "type": "assigned_variable", "loc": [86, 86], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "vector": [14, 1, 0.6992, 0.0081, 1, 0.99, 0.1538, 476, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "Level", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " Level = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L87_C4", "label": "Chars =", "type": "assigned_variable", "loc": [87, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "vector": [14, 1, 0.7073, 0.0081, 1, 0.99, 0.2308, 774, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "Chars", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " Chars = ' '"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L88_C4", "label": "LevelStack =", "type": "assigned_variable", "loc": [88, 88], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "vector": [14, 1, 0.7154, 0.0081, 1, 0.99, 0.3077, 710, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "LevelStack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " LevelStack = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L90_C4", "label": "on", "type": "function", "loc": [90, 91], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "vector": [2, 1, 0.7358, 0.0163, 1, 0.99, 0.3846, 876, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "on", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def on(self):\n self.On = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L91_C8", "label": "self.On =", "type": "assigned_variable", "loc": [91, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L90_C4", "vector": [14, 2, 0.7398, 0.0081, 2, 0.97, 0.0, 50, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.On", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.On = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L92_C4", "label": "off", "type": "function", "loc": [92, 93], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "vector": [2, 1, 0.752, 0.0163, 1, 0.99, 0.4615, 607, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "off", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def off(self):\n self.On = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L93_C8", "label": "self.On =", "type": "assigned_variable", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L92_C4", "vector": [14, 2, 0.7561, 0.0081, 2, 0.75, 0.0, 50, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.On", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.On = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L94_C4", "label": "inc", "type": "function", "loc": [94, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "vector": [2, 1, 0.7683, 0.0163, 1, 0.99, 0.5385, 529, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "inc", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def inc(self):\n self.Level += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L96_C4", "label": "dec", "type": "function", "loc": [96, 100], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "vector": [2, 1, 0.7967, 0.0407, 1, 0.99, 0.6154, 145, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "dec", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def dec(self):\n \"\"\"decrement can only be applied to values greater zero\n values below zero don't make any sense at all!\"\"\"\n if self.Level > 0:\n self.Level -= 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Expr_L97_C8", "label": "expression", "type": "expression", "loc": [97, 98], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L96_C4", "vector": [8, 2, 0.7927, 0.0163, 2, 0.46, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"decrement can only be applied to values greater zero\n values below zero don't make any sense at all!\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L99_C8", "label": "if", "type": "if", "loc": [99, 100], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L96_C4", "vector": [4, 2, 0.8089, 0.0163, 2, 0.46, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.Level > 0:\n self.Level -= 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L101_C4", "label": "push", "type": "function", "loc": [101, 102], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "vector": [2, 1, 0.8252, 0.0163, 1, 0.99, 0.6923, 176, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "push", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def push(self):\n self.LevelStack.append(self.Level)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Expr_L102_C8", "label": "append()", "type": "expression", "loc": [102, 102], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L101_C4", "vector": [8, 2, 0.8293, 0.0081, 2, 0.32, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.LevelStack.append(self.Level)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L103_C4", "label": "pop", "type": "function", "loc": [103, 109], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "vector": [2, 1, 0.8618, 0.0569, 1, 0.99, 0.7692, 969, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "pop", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def pop(self):\n \"\"\"the levestack can not become -1. any attempt to do so\n sets the level to 0!\"\"\"\n if len(self.LevelStack) > 0:\n self.Level = self.LevelStack.pop()\n else:\n self.Level = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Expr_L104_C8", "label": "expression", "type": "expression", "loc": [104, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L103_C4", "vector": [8, 2, 0.8496, 0.0163, 2, 0.91, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"the levestack can not become -1. any attempt to do so\n sets the level to 0!\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L106_C8", "label": "if", "type": "if", "loc": [106, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L103_C4", "vector": [4, 2, 0.874, 0.0325, 2, 0.91, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(self.LevelStack) > 0:\n self.Level = self.LevelStack.pop()\n else:\n self.Level = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L107_C12", "label": "self.Level = pop()", "type": "assigned_variable", "loc": [107, 107], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L106_C8", "vector": [14, 3, 0.8699, 0.0081, 3, 0.95, 0.0, 150, 3, 0, 0, 0, 969, 10, 1], "semantic": {"name": "self.Level", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " self.Level = self.LevelStack.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L109_C12", "label": "self.Level =", "type": "assigned_variable", "loc": [109, 109], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L106_C8", "vector": [14, 3, 0.8862, 0.0081, 3, 0.95, 1.0, 150, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.Level", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.Level = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L110_C4", "label": "setLevel", "type": "function", "loc": [110, 116], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "vector": [2, 1, 0.9187, 0.0569, 1, 0.99, 0.8462, 810, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "setLevel", "arg_names": ["self", "_level"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setLevel(self, _level):\n \"\"\"the leve can't be less than zero. any attempt to do so\n sets the level automatically to zero!\"\"\"\n if _level < 0:\n self.Level = 0\n else:\n self.Level = _level"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Expr_L111_C8", "label": "expression", "type": "expression", "loc": [111, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L110_C4", "vector": [8, 2, 0.9065, 0.0163, 2, 0.81, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"the leve can't be less than zero. any attempt to do so\n sets the level automatically to zero!\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L113_C8", "label": "if", "type": "if", "loc": [113, 116], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L110_C4", "vector": [4, 2, 0.9309, 0.0325, 2, 0.81, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if _level < 0:\n self.Level = 0\n else:\n self.Level = _level"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L114_C12", "label": "self.Level =", "type": "assigned_variable", "loc": [114, 114], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L113_C8", "vector": [14, 3, 0.9268, 0.0081, 3, 0.8, 0.0, 150, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.Level", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.Level = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L116_C12", "label": "self.Level =", "type": "assigned_variable", "loc": [116, 116], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L113_C8", "vector": [14, 3, 0.9431, 0.0081, 3, 0.8, 1.0, 150, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.Level", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.Level = _level"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L117_C4", "label": "setChar", "type": "function", "loc": [117, 118], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "vector": [2, 1, 0.9553, 0.0163, 1, 0.99, 0.9231, 504, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "setChar", "arg_names": ["self", "_chars"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setChar(self, _chars):\n self.Chars = _chars"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L118_C8", "label": "self.Chars =", "type": "assigned_variable", "loc": [118, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L117_C4", "vector": [14, 2, 0.9593, 0.0081, 2, 0.47, 0.0, 957, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.Chars", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.Chars = _chars"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L119_C4", "label": "indent", "type": "function", "loc": [119, 122], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "vector": [2, 1, 0.9797, 0.0325, 1, 0.99, 1.0, 231, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "indent", "arg_names": ["self", "_default"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def indent(self, _default=0):\n if self.On:\n return self.Chars * self.Level\n return \" \" * _default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L120_C8", "label": "if", "type": "if", "loc": [120, 121], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L119_C4", "vector": [4, 2, 0.9797, 0.0163, 2, 0.12, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.On:\n return self.Chars * self.Level"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Return_L121_C12", "label": "return", "type": "return", "loc": [121, 121], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L120_C8", "vector": [13, 3, 0.9837, 0.0081, 3, 0.38, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.Chars * self.Level"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1504:Return_L122_C8", "label": "return", "type": "return", "loc": [122, 122], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L119_C4", "vector": [13, 2, 0.9919, 0.0081, 2, 0.12, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return \" \" * _default"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Return_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L40_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L40_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:For_L43_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:For_L43_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L44_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:For_L43_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L45_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L45_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L47_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L45_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L48_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L48_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L49_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L48_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L50_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L50_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L51_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L50_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L52_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L52_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L53_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L52_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L54_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L54_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L55_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L54_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L56_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L56_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L57_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L56_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L58_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L56_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L59_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L59_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L60_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L59_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L61_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L59_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L62_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L62_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L63_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L62_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L64_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L64_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L65_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L45_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L67_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L45_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L68_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L68_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L70_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L68_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L71_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L71_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L72_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L71_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L73_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L71_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L75_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:For_L43_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Expr_L76_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L40_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Return_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Expr_L81_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L85_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L86_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L87_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L88_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L90_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L91_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L92_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L92_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L93_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L94_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Expr_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L101_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L101_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Expr_L102_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L103_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Expr_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L106_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L107_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L106_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L109_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L110_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L110_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Expr_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L110_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L113_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L113_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L114_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L113_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L116_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L117_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Assign_L118_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L119_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L119_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L120_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:If_L120_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Return_L121_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1504:FunctionDef_L119_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1504:Return_L122_C8"}]
## statprof.py ## Copyright (C) 2004,2005 Andy Wingo <wingo at pobox dot com> ## Copyright (C) 2001 Rob Browning <rlb at defaultvalue dot org> ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Lesser General Public ## License as published by the Free Software Foundation; either ## version 2.1 of the License, or (at your option) any later version. ## ## This library is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public ## License along with this program; if not, contact: ## ## Free Software Foundation Voice: +1-617-542-5942 ## 59 Temple Place - Suite 330 Fax: +1-617-542-2652 ## Boston, MA 02111-1307, USA gnu@gnu.org """ statprof is intended to be a fairly simple statistical profiler for python. It was ported directly from a statistical profiler for guile, also named statprof, available from guile-lib [0]. [0] http://wingolog.org/software/guile-lib/statprof/ To start profiling, call statprof.start(): >>> start() Then run whatever it is that you want to profile, for example: >>> import test.pystone; test.pystone.pystones() Then stop the profiling and print out the results: >>> stop() >>> display() % cumulative self time seconds seconds name 26.72 1.40 0.37 pystone.py:79:Proc0 13.79 0.56 0.19 pystone.py:133:Proc1 13.79 0.19 0.19 pystone.py:208:Proc8 10.34 0.16 0.14 pystone.py:229:Func2 6.90 0.10 0.10 pystone.py:45:__init__ 4.31 0.16 0.06 pystone.py:53:copy ... All of the numerical data with the exception of the calls column is statistically approximate. In the following column descriptions, and in all of statprof, "time" refers to execution time (both user and system), not wall clock time. % time The percent of the time spent inside the procedure itself (not counting children). cumulative seconds The total number of seconds spent in the procedure, including children. self seconds The total number of seconds spent in the procedure itself (not counting children). name The name of the procedure. By default statprof keeps the data collected from previous runs. If you want to clear the collected data, call reset(): >>> reset() reset() can also be used to change the sampling frequency. For example, to tell statprof to sample 50 times a second: >>> reset(50) This means that statprof will sample the call stack after every 1/50 of a second of user + system time spent running on behalf of the python process. When your process is idle (for example, blocking in a read(), as is the case at the listener), the clock does not advance. For this reason statprof is not currently not suitable for profiling io-bound operations. The profiler uses the hash of the code object itself to identify the procedures, so it won't confuse different procedures with the same name. They will show up as two different rows in the output. Right now the profiler is quite simplistic. I cannot provide call-graphs or other higher level information. What you see in the table is pretty much all there is. Patches are welcome :-) Threading --------- Because signals only get delivered to the main thread in Python, statprof only profiles the main thread. However because the time reporting function uses per-process timers, the results can be significantly off if other threads' work patterns are not similar to the main thread's work patterns. Implementation notes -------------------- The profiler works by setting the unix profiling signal ITIMER_PROF to go off after the interval you define in the call to reset(). When the signal fires, a sampling routine is run which looks at the current procedure that's executing, and then crawls up the stack, and for each frame encountered, increments that frame's code object's sample count. Note that if a procedure is encountered multiple times on a given stack, it is only counted once. After the sampling is complete, the profiler resets profiling timer to fire again after the appropriate interval. Meanwhile, the profiler keeps track, via os.times(), how much CPU time (system and user -- which is also what ITIMER_PROF tracks), has elapsed while code has been executing within a start()/stop() block. The profiler also tries to avoid counting or timing its own code as much as possible. """ try: import itimer except ImportError: raise ImportError('''statprof requires the itimer python extension. To install it, enter the following commands from a terminal: wget http://www.cute.fi/~torppa/py-itimer/py-itimer.tar.gz tar zxvf py-itimer.tar.gz cd py-itimer sudo python setup.py install ''') import signal import os __all__ = ['start', 'stop', 'reset', 'display'] ########################################################################### ## Utils def clock(): times = os.times() return times[0] + times[1] ########################################################################### ## Collection data structures class ProfileState(object): def __init__(self, frequency=None): self.reset(frequency) def reset(self, frequency=None): # total so far self.accumulated_time = 0.0 # start_time when timer is active self.last_start_time = None # total count of sampler calls self.sample_count = 0 # a float if frequency: self.sample_interval = 1.0/frequency elif not hasattr(self, 'sample_interval'): # default to 100 Hz self.sample_interval = 1.0/100.0 else: # leave the frequency as it was pass self.remaining_prof_time = None # for user start/stop nesting self.profile_level = 0 # whether to catch apply-frame self.count_calls = False # gc time between start() and stop() self.gc_time_taken = 0 def accumulate_time(self, stop_time): self.accumulated_time += stop_time - self.last_start_time state = ProfileState() ## call_data := { code object: CallData } call_data = {} class CallData(object): def __init__(self, code): self.name = code.co_name self.filename = code.co_filename self.lineno = code.co_firstlineno self.call_count = 0 self.cum_sample_count = 0 self.self_sample_count = 0 call_data[code] = self def get_call_data(code): return call_data.get(code, None) or CallData(code) ########################################################################### ## SIGPROF handler def sample_stack_procs(frame): state.sample_count += 1 get_call_data(frame.f_code).self_sample_count += 1 code_seen = {} while frame: code_seen[frame.f_code] = True frame = frame.f_back for code in code_seen.iterkeys(): get_call_data(code).cum_sample_count += 1 def profile_signal_handler(signum, frame): if state.profile_level > 0: state.accumulate_time(clock()) sample_stack_procs(frame) itimer.setitimer(itimer.ITIMER_PROF, state.sample_interval, 0.0) state.last_start_time = clock() ########################################################################### ## Profiling API def is_active(): return state.profile_level > 0 def start(): state.profile_level += 1 if state.profile_level == 1: state.last_start_time = clock() rpt = state.remaining_prof_time state.remaining_prof_time = None signal.signal(signal.SIGPROF, profile_signal_handler) itimer.setitimer(itimer.ITIMER_PROF, rpt or state.sample_interval, 0.0) state.gc_time_taken = 0 # dunno def stop(): state.profile_level -= 1 if state.profile_level == 0: state.accumulate_time(clock()) state.last_start_time = None rpt = itimer.setitimer(itimer.ITIMER_PROF, 0.0, 0.0) signal.signal(signal.SIGPROF, signal.SIG_IGN) state.remaining_prof_time = rpt[0] state.gc_time_taken = 0 # dunno def reset(frequency=None): assert state.profile_level == 0, "Can't reset() while statprof is running" call_data.clear() state.reset(frequency) ########################################################################### ## Reporting API class CallStats(object): def __init__(self, call_data): self_samples = call_data.self_sample_count cum_samples = call_data.cum_sample_count nsamples = state.sample_count secs_per_sample = state.accumulated_time / nsamples basename = os.path.basename(call_data.filename) self.name = '%s:%d:%s' % (basename, call_data.lineno, call_data.name) self.pcnt_time_in_proc = self_samples / nsamples * 100 self.cum_secs_in_proc = cum_samples * secs_per_sample self.self_secs_in_proc = self_samples * secs_per_sample self.num_calls = None self.self_secs_per_call = None self.cum_secs_per_call = None def display(self): print('%6.2f %9.2f %9.2f %s' % (self.pcnt_time_in_proc, self.cum_secs_in_proc, self.self_secs_in_proc, self.name)) def display(): if state.sample_count == 0: print('No samples recorded.') return l = [CallStats(x) for x in call_data.itervalues()] l = [(x.self_secs_in_proc, x.cum_secs_in_proc, x) for x in l] l.sort(reverse=True) l = [x[2] for x in l] print('%5.5s %10.10s %7.7s %-8.8s' % ('% ', 'cumulative', 'self', '')) print('%5.5s %9.9s %8.8s %-8.8s' % ("time", "seconds", "seconds", "name")) for x in l: x.display() print('---') print('Sample count: %d' % state.sample_count) print('Total time: %f seconds' % state.accumulated_time)
ajibawa-2023/Python-Code-Large/train/row_1505
102
304
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L22_C0", "label": "expression", "type": "expression", "loc": [22, 120], "level": 0, "parent": null, "vector": [8, 0, 0.2336, 0.3257, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nstatprof is intended to be a fairly simple statistical profiler for\npython. It was ported directly from a statistical profiler for guile,\nalso named statprof, available from guile-lib [0].\n\n[0] http://wingolog.org/software/guile-lib/statprof/\n\nTo start profiling, call statprof.start():"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Try_L125_C0", "label": "try", "type": "try", "loc": [125, 135], "level": 0, "parent": null, "vector": [7, 0, 0.4276, 0.0362, 0, 0.66, 0.0556, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n import itimer\nexcept ImportError:\n raise ImportError('''statprof requires the itimer python extension.\nTo install it, enter the following commands from a terminal:\n\nwget http://www.cute.fi/~torppa/py-itimer/py-itimer.tar.gz\ntar zxvf py-itimer.tar.gz"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Import_L126_C4", "label": "itimer import itimer", "type": "import", "loc": [126, 126], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:Try_L125_C0", "vector": [1, 1, 0.4145, 0.0033, 1, 0.04, 0.0, 990, 0, 1, 0, 0, 990, 0, 0], "semantic": {"name": "itimer", "arg_names": [], "import_names": ["itimer"], "rhs_call_name": "", "annotation": ""}, "snippet": " import itimer"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Import_L137_C0", "label": "signal import signal", "type": "import", "loc": [137, 137], "level": 0, "parent": null, "vector": [1, 0, 0.4507, 0.0033, 0, 0.66, 0.1111, 621, 0, 1, 0, 0, 621, 0, 0], "semantic": {"name": "signal", "arg_names": [], "import_names": ["signal"], "rhs_call_name": "", "annotation": ""}, "snippet": "import signal"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Import_L138_C0", "label": "os import os", "type": "import", "loc": [138, 138], "level": 0, "parent": null, "vector": [1, 0, 0.4539, 0.0033, 0, 0.66, 0.1667, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L141_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [141, 141], "level": 0, "parent": null, "vector": [14, 0, 0.4638, 0.0033, 0, 0.66, 0.2222, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__all__ = ['start', 'stop', 'reset', 'display']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L147_C0", "label": "clock", "type": "function", "loc": [147, 149], "level": 0, "parent": null, "vector": [2, 0, 0.4868, 0.0099, 0, 0.66, 0.2778, 937, 0, 0, 1, 0, 0, 0, 1], "semantic": {"name": "clock", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def clock():\n times = os.times()\n return times[0] + times[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L148_C4", "label": "times = times()", "type": "assigned_variable", "loc": [148, 148], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L147_C0", "vector": [14, 1, 0.4868, 0.0033, 1, 0.03, 0.0, 342, 3, 0, 0, 0, 342, 10, 1], "semantic": {"name": "times", "arg_names": [], "import_names": [], "rhs_call_name": "times", "annotation": ""}, "snippet": " times = os.times()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Return_L149_C4", "label": "return", "type": "return", "loc": [149, 149], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L147_C0", "vector": [13, 1, 0.4901, 0.0033, 1, 0.03, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return times[0] + times[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:ClassDef_L155_C0", "label": "ProfileState", "type": "class", "loc": [155, 184], "level": 0, "parent": null, "vector": [3, 0, 0.5576, 0.0987, 0, 0.66, 0.3333, 555, 0, 3, 0, 0, 186, 0, 2], "semantic": {"name": "ProfileState", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ProfileState(object):\n def __init__(self, frequency=None):\n self.reset(frequency)\n\n def reset(self, frequency=None):\n # total so far\n self.accumulated_time = 0.0\n # start_time when timer is active"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L156_C4", "label": "__init__", "type": "function", "loc": [156, 157], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:ClassDef_L155_C0", "vector": [2, 1, 0.5148, 0.0066, 1, 0.32, 0.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "frequency"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, frequency=None):\n self.reset(frequency)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L157_C8", "label": "reset()", "type": "expression", "loc": [157, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L156_C4", "vector": [8, 2, 0.5164, 0.0033, 2, 0.69, 0.0, 944, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "reset", "arg_names": [], "import_names": [], "rhs_call_name": "reset", "annotation": ""}, "snippet": " self.reset(frequency)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "label": "reset", "type": "function", "loc": [159, 181], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:ClassDef_L155_C0", "vector": [2, 1, 0.5592, 0.0757, 1, 0.32, 0.5, 944, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "reset", "arg_names": ["self", "frequency"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def reset(self, frequency=None):\n # total so far\n self.accumulated_time = 0.0\n # start_time when timer is active\n self.last_start_time = None\n # total count of sampler calls\n self.sample_count = 0\n # a float"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L161_C8", "label": "self.accumulated_time =", "type": "assigned_variable", "loc": [161, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "vector": [14, 2, 0.5296, 0.0033, 2, 0.67, 0.0, 296, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "self.accumulated_time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.accumulated_time = 0.0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L163_C8", "label": "self.last_start_time =", "type": "assigned_variable", "loc": [163, 163], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "vector": [14, 2, 0.5362, 0.0033, 2, 0.67, 0.1429, 250, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.last_start_time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.last_start_time = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L165_C8", "label": "self.sample_count =", "type": "assigned_variable", "loc": [165, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "vector": [14, 2, 0.5428, 0.0033, 2, 0.67, 0.2857, 815, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.sample_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.sample_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L167_C8", "label": "if", "type": "if", "loc": [167, 174], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "vector": [4, 2, 0.5609, 0.0263, 2, 0.67, 0.4286, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if frequency:\n self.sample_interval = 1.0/frequency\n elif not hasattr(self, 'sample_interval'):\n # default to 100 Hz\n self.sample_interval = 1.0/100.0\n else:\n # leave the frequency as it was\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L168_C12", "label": "self.sample_interval =", "type": "assigned_variable", "loc": [168, 168], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L167_C8", "vector": [14, 3, 0.5526, 0.0033, 3, 0.08, 0.0, 833, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.sample_interval", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.sample_interval = 1.0/frequency"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L169_C8", "label": "if", "type": "if", "loc": [169, 174], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L167_C8", "vector": [4, 3, 0.5641, 0.0197, 3, 0.08, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif not hasattr(self, 'sample_interval'):\n # default to 100 Hz\n self.sample_interval = 1.0/100.0\n else:\n # leave the frequency as it was\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L171_C12", "label": "self.sample_interval =", "type": "assigned_variable", "loc": [171, 171], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L169_C8", "vector": [14, 4, 0.5625, 0.0033, 4, 0.4, 0.0, 833, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.sample_interval", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.sample_interval = 1.0/100.0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L175_C8", "label": "self.remaining_prof_time =", "type": "assigned_variable", "loc": [175, 175], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "vector": [14, 2, 0.5757, 0.0033, 2, 0.67, 0.5714, 640, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.remaining_prof_time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.remaining_prof_time = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L177_C8", "label": "self.profile_level =", "type": "assigned_variable", "loc": [177, 177], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "vector": [14, 2, 0.5822, 0.0033, 2, 0.67, 0.7143, 420, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.profile_level", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.profile_level = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L179_C8", "label": "self.count_calls =", "type": "assigned_variable", "loc": [179, 179], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "vector": [14, 2, 0.5888, 0.0033, 2, 0.67, 0.8571, 667, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.count_calls", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.count_calls = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L181_C8", "label": "self.gc_time_taken =", "type": "assigned_variable", "loc": [181, 181], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "vector": [14, 2, 0.5954, 0.0033, 2, 0.67, 1.0, 200, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.gc_time_taken", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.gc_time_taken = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L183_C4", "label": "accumulate_time", "type": "function", "loc": [183, 184], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:ClassDef_L155_C0", "vector": [2, 1, 0.6036, 0.0066, 1, 0.32, 1.0, 684, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "accumulate_time", "arg_names": ["self", "stop_time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def accumulate_time(self, stop_time):\n self.accumulated_time += stop_time - self.last_start_time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L186_C0", "label": "state = ProfileState()", "type": "assigned_variable", "loc": [186, 186], "level": 0, "parent": null, "vector": [14, 0, 0.6118, 0.0033, 0, 0.66, 0.3889, 688, 3, 0, 0, 0, 555, 10, 1], "semantic": {"name": "state", "arg_names": [], "import_names": [], "rhs_call_name": "ProfileState", "annotation": ""}, "snippet": "state = ProfileState()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L189_C0", "label": "call_data =", "type": "assigned_variable", "loc": [189, 189], "level": 0, "parent": null, "vector": [14, 0, 0.6217, 0.0033, 0, 0.66, 0.4444, 827, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "call_data", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "call_data = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:ClassDef_L190_C0", "label": "CallData", "type": "class", "loc": [190, 198], "level": 0, "parent": null, "vector": [3, 0, 0.6382, 0.0296, 0, 0.66, 0.5, 502, 0, 1, 0, 0, 186, 0, 0], "semantic": {"name": "CallData", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CallData(object):\n def __init__(self, code):\n self.name = code.co_name\n self.filename = code.co_filename\n self.lineno = code.co_firstlineno\n self.call_count = 0\n self.cum_sample_count = 0\n self.self_sample_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L191_C4", "label": "__init__", "type": "function", "loc": [191, 198], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:ClassDef_L190_C0", "vector": [2, 1, 0.6398, 0.0263, 1, 0.88, 0.0, 555, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "code"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, code):\n self.name = code.co_name\n self.filename = code.co_filename\n self.lineno = code.co_firstlineno\n self.call_count = 0\n self.cum_sample_count = 0\n self.self_sample_count = 0\n call_data[code] = self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L192_C8", "label": "self.name =", "type": "assigned_variable", "loc": [192, 192], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L191_C4", "vector": [14, 2, 0.6316, 0.0033, 2, 0.85, 0.0, 689, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.name = code.co_name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L193_C8", "label": "self.filename =", "type": "assigned_variable", "loc": [193, 193], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L191_C4", "vector": [14, 2, 0.6349, 0.0033, 2, 0.85, 0.1667, 942, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.filename = code.co_filename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L194_C8", "label": "self.lineno =", "type": "assigned_variable", "loc": [194, 194], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L191_C4", "vector": [14, 2, 0.6382, 0.0033, 2, 0.85, 0.3333, 66, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.lineno", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.lineno = code.co_firstlineno"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L195_C8", "label": "self.call_count =", "type": "assigned_variable", "loc": [195, 195], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L191_C4", "vector": [14, 2, 0.6414, 0.0033, 2, 0.85, 0.5, 627, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.call_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.call_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L196_C8", "label": "self.cum_sample_count =", "type": "assigned_variable", "loc": [196, 196], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L191_C4", "vector": [14, 2, 0.6447, 0.0033, 2, 0.85, 0.6667, 947, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.cum_sample_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.cum_sample_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L197_C8", "label": "self.self_sample_count =", "type": "assigned_variable", "loc": [197, 197], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L191_C4", "vector": [14, 2, 0.648, 0.0033, 2, 0.85, 0.8333, 109, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.self_sample_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.self_sample_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L198_C8", "label": "assign", "type": "assigned_variable", "loc": [198, 198], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L191_C4", "vector": [14, 2, 0.6513, 0.0033, 2, 0.85, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " call_data[code] = self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L200_C0", "label": "get_call_data", "type": "function", "loc": [200, 201], "level": 0, "parent": null, "vector": [2, 0, 0.6595, 0.0066, 0, 0.66, 0.5556, 406, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "get_call_data", "arg_names": ["code"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_call_data(code):\n return call_data.get(code, None) or CallData(code)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Return_L201_C4", "label": "return", "type": "return", "loc": [201, 201], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L200_C0", "vector": [13, 1, 0.6612, 0.0033, 1, 0.75, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return call_data.get(code, None) or CallData(code)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L207_C0", "label": "sample_stack_procs", "type": "function", "loc": [207, 216], "level": 0, "parent": null, "vector": [2, 0, 0.6957, 0.0329, 0, 0.66, 0.6111, 349, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "sample_stack_procs", "arg_names": ["frame"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def sample_stack_procs(frame):\n state.sample_count += 1\n get_call_data(frame.f_code).self_sample_count += 1\n\n code_seen = {}\n while frame:\n code_seen[frame.f_code] = True\n frame = frame.f_back"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L211_C4", "label": "code_seen =", "type": "assigned_variable", "loc": [211, 211], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L207_C0", "vector": [14, 1, 0.6941, 0.0033, 1, 0.25, 0.0, 952, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "code_seen", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " code_seen = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:While_L212_C4", "label": "while", "type": "while", "loc": [212, 214], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L207_C0", "vector": [5, 1, 0.7007, 0.0099, 1, 0.25, 0.5, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while frame:\n code_seen[frame.f_code] = True\n frame = frame.f_back"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L213_C8", "label": "assign", "type": "assigned_variable", "loc": [213, 213], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:While_L212_C4", "vector": [14, 2, 0.7007, 0.0033, 2, 0.26, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " code_seen[frame.f_code] = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L214_C8", "label": "frame =", "type": "assigned_variable", "loc": [214, 214], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:While_L212_C4", "vector": [14, 2, 0.7039, 0.0033, 2, 0.26, 1.0, 313, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "frame", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " frame = frame.f_back"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:For_L215_C4", "label": "for code", "type": "for", "loc": [215, 216], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L207_C0", "vector": [6, 1, 0.7089, 0.0066, 1, 0.25, 1.0, 44, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "code", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for code in code_seen.iterkeys():\n get_call_data(code).cum_sample_count += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L218_C0", "label": "profile_signal_handler", "type": "function", "loc": [218, 224], "level": 0, "parent": null, "vector": [2, 0, 0.727, 0.023, 0, 0.66, 0.6667, 165, 0, 2, 0, 0, 0, 0, 5], "semantic": {"name": "profile_signal_handler", "arg_names": ["signum", "frame"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def profile_signal_handler(signum, frame):\n if state.profile_level > 0:\n state.accumulate_time(clock())\n sample_stack_procs(frame)\n itimer.setitimer(itimer.ITIMER_PROF,\n state.sample_interval, 0.0)\n state.last_start_time = clock()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L219_C4", "label": "if", "type": "if", "loc": [219, 224], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L218_C0", "vector": [4, 1, 0.7286, 0.0197, 1, 0.33, 0.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if state.profile_level > 0:\n state.accumulate_time(clock())\n sample_stack_procs(frame)\n itimer.setitimer(itimer.ITIMER_PROF,\n state.sample_interval, 0.0)\n state.last_start_time = clock()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L220_C8", "label": "accumulate_time()", "type": "expression", "loc": [220, 220], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L219_C4", "vector": [8, 2, 0.7237, 0.0033, 2, 0.06, 0.0, 684, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "accumulate_time", "arg_names": [], "import_names": [], "rhs_call_name": "accumulate_time", "annotation": ""}, "snippet": " state.accumulate_time(clock())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L221_C8", "label": "sample_stack_procs()", "type": "expression", "loc": [221, 221], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L219_C4", "vector": [8, 2, 0.727, 0.0033, 2, 0.06, 0.3333, 349, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "sample_stack_procs", "arg_names": [], "import_names": [], "rhs_call_name": "sample_stack_procs", "annotation": ""}, "snippet": " sample_stack_procs(frame)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L222_C8", "label": "setitimer()", "type": "expression", "loc": [222, 223], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L219_C4", "vector": [8, 2, 0.7319, 0.0066, 2, 0.06, 0.6667, 95, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setitimer", "arg_names": [], "import_names": [], "rhs_call_name": "setitimer", "annotation": ""}, "snippet": " itimer.setitimer(itimer.ITIMER_PROF,\n state.sample_interval, 0.0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L224_C8", "label": "state.last_start_time = clock()", "type": "assigned_variable", "loc": [224, 224], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L219_C4", "vector": [14, 2, 0.7368, 0.0033, 2, 0.06, 1.0, 491, 3, 0, 0, 0, 937, 10, 1], "semantic": {"name": "state.last_start_time", "arg_names": [], "import_names": [], "rhs_call_name": "clock", "annotation": ""}, "snippet": " state.last_start_time = clock()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L230_C0", "label": "is_active", "type": "function", "loc": [230, 231], "level": 0, "parent": null, "vector": [2, 0, 0.7582, 0.0066, 0, 0.66, 0.7222, 645, 0, 0, 1, 0, 0, 0, 0], "semantic": {"name": "is_active", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def is_active():\n return state.profile_level > 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Return_L231_C4", "label": "return", "type": "return", "loc": [231, 231], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L230_C0", "vector": [13, 1, 0.7599, 0.0033, 1, 0.91, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return state.profile_level > 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L233_C0", "label": "start", "type": "function", "loc": [233, 242], "level": 0, "parent": null, "vector": [2, 0, 0.7812, 0.0329, 0, 0.66, 0.7778, 511, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def start():\n state.profile_level += 1\n if state.profile_level == 1:\n state.last_start_time = clock()\n rpt = state.remaining_prof_time\n state.remaining_prof_time = None\n signal.signal(signal.SIGPROF, profile_signal_handler)\n itimer.setitimer(itimer.ITIMER_PROF,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L235_C4", "label": "if", "type": "if", "loc": [235, 242], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L233_C0", "vector": [4, 1, 0.7845, 0.0263, 1, 0.41, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if state.profile_level == 1:\n state.last_start_time = clock()\n rpt = state.remaining_prof_time\n state.remaining_prof_time = None\n signal.signal(signal.SIGPROF, profile_signal_handler)\n itimer.setitimer(itimer.ITIMER_PROF,\n rpt or state.sample_interval, 0.0)\n state.gc_time_taken = 0 # dunno"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L236_C8", "label": "state.last_start_time = clock()", "type": "assigned_variable", "loc": [236, 236], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L235_C4", "vector": [14, 2, 0.7763, 0.0033, 2, 0.45, 0.0, 491, 3, 0, 0, 0, 937, 10, 1], "semantic": {"name": "state.last_start_time", "arg_names": [], "import_names": [], "rhs_call_name": "clock", "annotation": ""}, "snippet": " state.last_start_time = clock()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L237_C8", "label": "rpt =", "type": "assigned_variable", "loc": [237, 237], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L235_C4", "vector": [14, 2, 0.7796, 0.0033, 2, 0.45, 0.2, 116, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "rpt", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rpt = state.remaining_prof_time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L238_C8", "label": "state.remaining_prof_time =", "type": "assigned_variable", "loc": [238, 238], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L235_C4", "vector": [14, 2, 0.7829, 0.0033, 2, 0.45, 0.4, 348, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "state.remaining_prof_time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " state.remaining_prof_time = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L239_C8", "label": "signal()", "type": "expression", "loc": [239, 239], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L235_C4", "vector": [8, 2, 0.7862, 0.0033, 2, 0.45, 0.6, 621, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "signal", "arg_names": [], "import_names": [], "rhs_call_name": "signal", "annotation": ""}, "snippet": " signal.signal(signal.SIGPROF, profile_signal_handler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L240_C8", "label": "setitimer()", "type": "expression", "loc": [240, 241], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L235_C4", "vector": [8, 2, 0.7911, 0.0066, 2, 0.45, 0.8, 95, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setitimer", "arg_names": [], "import_names": [], "rhs_call_name": "setitimer", "annotation": ""}, "snippet": " itimer.setitimer(itimer.ITIMER_PROF,\n rpt or state.sample_interval, 0.0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L242_C8", "label": "state.gc_time_taken =", "type": "assigned_variable", "loc": [242, 242], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L235_C4", "vector": [14, 2, 0.7961, 0.0033, 2, 0.45, 1.0, 512, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "state.gc_time_taken", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " state.gc_time_taken = 0 # dunno"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L244_C0", "label": "stop", "type": "function", "loc": [244, 252], "level": 0, "parent": null, "vector": [2, 0, 0.8158, 0.0296, 0, 0.66, 0.8333, 343, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "stop", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def stop():\n state.profile_level -= 1\n if state.profile_level == 0:\n state.accumulate_time(clock())\n state.last_start_time = None\n rpt = itimer.setitimer(itimer.ITIMER_PROF, 0.0, 0.0)\n signal.signal(signal.SIGPROF, signal.SIG_IGN)\n state.remaining_prof_time = rpt[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L246_C4", "label": "if", "type": "if", "loc": [246, 252], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L244_C0", "vector": [4, 1, 0.8191, 0.023, 1, 0.73, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if state.profile_level == 0:\n state.accumulate_time(clock())\n state.last_start_time = None\n rpt = itimer.setitimer(itimer.ITIMER_PROF, 0.0, 0.0)\n signal.signal(signal.SIGPROF, signal.SIG_IGN)\n state.remaining_prof_time = rpt[0]\n state.gc_time_taken = 0 # dunno"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L247_C8", "label": "accumulate_time()", "type": "expression", "loc": [247, 247], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L246_C4", "vector": [8, 2, 0.8125, 0.0033, 2, 0.8, 0.0, 684, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "accumulate_time", "arg_names": [], "import_names": [], "rhs_call_name": "accumulate_time", "annotation": ""}, "snippet": " state.accumulate_time(clock())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L248_C8", "label": "state.last_start_time =", "type": "assigned_variable", "loc": [248, 248], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L246_C4", "vector": [14, 2, 0.8158, 0.0033, 2, 0.8, 0.2, 491, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "state.last_start_time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " state.last_start_time = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L249_C8", "label": "rpt = setitimer()", "type": "assigned_variable", "loc": [249, 249], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L246_C4", "vector": [14, 2, 0.8191, 0.0033, 2, 0.8, 0.4, 116, 3, 3, 0, 0, 95, 10, 1], "semantic": {"name": "rpt", "arg_names": [], "import_names": [], "rhs_call_name": "setitimer", "annotation": ""}, "snippet": " rpt = itimer.setitimer(itimer.ITIMER_PROF, 0.0, 0.0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L250_C8", "label": "signal()", "type": "expression", "loc": [250, 250], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L246_C4", "vector": [8, 2, 0.8224, 0.0033, 2, 0.8, 0.6, 621, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "signal", "arg_names": [], "import_names": [], "rhs_call_name": "signal", "annotation": ""}, "snippet": " signal.signal(signal.SIGPROF, signal.SIG_IGN)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L251_C8", "label": "state.remaining_prof_time =", "type": "assigned_variable", "loc": [251, 251], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L246_C4", "vector": [14, 2, 0.8257, 0.0033, 2, 0.8, 0.8, 348, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "state.remaining_prof_time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " state.remaining_prof_time = rpt[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L252_C8", "label": "state.gc_time_taken =", "type": "assigned_variable", "loc": [252, 252], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L246_C4", "vector": [14, 2, 0.8289, 0.0033, 2, 0.8, 1.0, 512, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "state.gc_time_taken", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " state.gc_time_taken = 0 # dunno"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L254_C0", "label": "reset", "type": "function", "loc": [254, 257], "level": 0, "parent": null, "vector": [2, 0, 0.8405, 0.0132, 0, 0.66, 0.8889, 944, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "reset", "arg_names": ["frequency"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def reset(frequency=None):\n assert state.profile_level == 0, \"Can't reset() while statprof is running\"\n call_data.clear()\n state.reset(frequency)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L256_C4", "label": "clear()", "type": "expression", "loc": [256, 256], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L254_C0", "vector": [8, 1, 0.8421, 0.0033, 1, 0.93, 0.0, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " call_data.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L257_C4", "label": "reset()", "type": "expression", "loc": [257, 257], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L254_C0", "vector": [8, 1, 0.8454, 0.0033, 1, 0.93, 1.0, 944, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "reset", "arg_names": [], "import_names": [], "rhs_call_name": "reset", "annotation": ""}, "snippet": " state.reset(frequency)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:ClassDef_L263_C0", "label": "CallStats", "type": "class", "loc": [263, 283], "level": 0, "parent": null, "vector": [3, 0, 0.898, 0.0691, 0, 0.66, 0.9444, 171, 0, 2, 0, 0, 186, 0, 2], "semantic": {"name": "CallStats", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CallStats(object):\n def __init__(self, call_data):\n self_samples = call_data.self_sample_count\n cum_samples = call_data.cum_sample_count\n nsamples = state.sample_count\n secs_per_sample = state.accumulated_time / nsamples\n basename = os.path.basename(call_data.filename)\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "label": "__init__", "type": "function", "loc": [264, 277], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:ClassDef_L263_C0", "vector": [2, 1, 0.8898, 0.0461, 1, 0.47, 0.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "call_data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, call_data):\n self_samples = call_data.self_sample_count\n cum_samples = call_data.cum_sample_count\n nsamples = state.sample_count\n secs_per_sample = state.accumulated_time / nsamples\n basename = os.path.basename(call_data.filename)\n\n self.name = '%s:%d:%s' % (basename, call_data.lineno, call_data.name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L265_C8", "label": "self_samples =", "type": "assigned_variable", "loc": [265, 265], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "vector": [14, 2, 0.8717, 0.0033, 2, 0.05, 0.0, 85, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self_samples", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self_samples = call_data.self_sample_count"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L266_C8", "label": "cum_samples =", "type": "assigned_variable", "loc": [266, 266], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "vector": [14, 2, 0.875, 0.0033, 2, 0.05, 0.0909, 881, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cum_samples", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cum_samples = call_data.cum_sample_count"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L267_C8", "label": "nsamples =", "type": "assigned_variable", "loc": [267, 267], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "vector": [14, 2, 0.8783, 0.0033, 2, 0.05, 0.1818, 281, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "nsamples", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " nsamples = state.sample_count"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L268_C8", "label": "secs_per_sample =", "type": "assigned_variable", "loc": [268, 268], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "vector": [14, 2, 0.8816, 0.0033, 2, 0.05, 0.2727, 773, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "secs_per_sample", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " secs_per_sample = state.accumulated_time / nsamples"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L269_C8", "label": "basename = basename()", "type": "assigned_variable", "loc": [269, 269], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "vector": [14, 2, 0.8849, 0.0033, 2, 0.05, 0.3636, 164, 3, 1, 0, 0, 164, 10, 1], "semantic": {"name": "basename", "arg_names": [], "import_names": [], "rhs_call_name": "basename", "annotation": ""}, "snippet": " basename = os.path.basename(call_data.filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L271_C8", "label": "self.name =", "type": "assigned_variable", "loc": [271, 271], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "vector": [14, 2, 0.8914, 0.0033, 2, 0.05, 0.4545, 689, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.name = '%s:%d:%s' % (basename, call_data.lineno, call_data.name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L272_C8", "label": "self.pcnt_time_in_proc =", "type": "assigned_variable", "loc": [272, 272], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "vector": [14, 2, 0.8947, 0.0033, 2, 0.05, 0.5455, 903, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.pcnt_time_in_proc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.pcnt_time_in_proc = self_samples / nsamples * 100"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L273_C8", "label": "self.cum_secs_in_proc =", "type": "assigned_variable", "loc": [273, 273], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "vector": [14, 2, 0.898, 0.0033, 2, 0.05, 0.6364, 69, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.cum_secs_in_proc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.cum_secs_in_proc = cum_samples * secs_per_sample"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L274_C8", "label": "self.self_secs_in_proc =", "type": "assigned_variable", "loc": [274, 274], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "vector": [14, 2, 0.9013, 0.0033, 2, 0.05, 0.7273, 635, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.self_secs_in_proc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.self_secs_in_proc = self_samples * secs_per_sample"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L275_C8", "label": "self.num_calls =", "type": "assigned_variable", "loc": [275, 275], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "vector": [14, 2, 0.9046, 0.0033, 2, 0.05, 0.8182, 964, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.num_calls", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.num_calls = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L276_C8", "label": "self.self_secs_per_call =", "type": "assigned_variable", "loc": [276, 276], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "vector": [14, 2, 0.9079, 0.0033, 2, 0.05, 0.9091, 411, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.self_secs_per_call", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.self_secs_per_call = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L277_C8", "label": "self.cum_secs_per_call =", "type": "assigned_variable", "loc": [277, 277], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "vector": [14, 2, 0.9112, 0.0033, 2, 0.05, 1.0, 294, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.cum_secs_per_call", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.cum_secs_per_call = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L279_C4", "label": "display", "type": "function", "loc": [279, 283], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:ClassDef_L263_C0", "vector": [2, 1, 0.9243, 0.0164, 1, 0.47, 1.0, 669, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "display", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def display(self):\n print('%6.2f %9.2f %9.2f %s' % (self.pcnt_time_in_proc,\n self.cum_secs_in_proc,\n self.self_secs_in_proc,\n self.name))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L280_C8", "label": "print()", "type": "expression", "loc": [280, 283], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L279_C4", "vector": [8, 2, 0.926, 0.0132, 2, 0.02, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('%6.2f %9.2f %9.2f %s' % (self.pcnt_time_in_proc,\n self.cum_secs_in_proc,\n self.self_secs_in_proc,\n self.name))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "label": "display", "type": "function", "loc": [286, 304], "level": 0, "parent": null, "vector": [2, 0, 0.9704, 0.0625, 0, 0.66, 1.0, 669, 0, 0, 0, 0, 0, 0, 10], "semantic": {"name": "display", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def display():\n if state.sample_count == 0:\n print('No samples recorded.')\n return\n\n l = [CallStats(x) for x in call_data.itervalues()]\n l = [(x.self_secs_in_proc, x.cum_secs_in_proc, x) for x in l]\n l.sort(reverse=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L287_C4", "label": "if", "type": "if", "loc": [287, 289], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "vector": [4, 1, 0.9474, 0.0099, 1, 0.33, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if state.sample_count == 0:\n print('No samples recorded.')\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L288_C8", "label": "print()", "type": "expression", "loc": [288, 288], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L287_C4", "vector": [8, 2, 0.9474, 0.0033, 2, 0.2, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('No samples recorded.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Return_L289_C8", "label": "return", "type": "return", "loc": [289, 289], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L287_C4", "vector": [13, 2, 0.9507, 0.0033, 2, 0.2, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L291_C4", "label": "l =", "type": "assigned_variable", "loc": [291, 291], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "vector": [14, 1, 0.9572, 0.0033, 1, 0.33, 0.1, 810, 5, 0, 0, 0, 0, 0, 2], "semantic": {"name": "l", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " l = [CallStats(x) for x in call_data.itervalues()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L292_C4", "label": "l =", "type": "assigned_variable", "loc": [292, 292], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "vector": [14, 1, 0.9605, 0.0033, 1, 0.33, 0.2, 810, 5, 0, 0, 0, 0, 0, 0], "semantic": {"name": "l", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " l = [(x.self_secs_in_proc, x.cum_secs_in_proc, x) for x in l]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L293_C4", "label": "sort()", "type": "expression", "loc": [293, 293], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "vector": [8, 1, 0.9638, 0.0033, 1, 0.33, 0.3, 489, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "sort", "arg_names": [], "import_names": [], "rhs_call_name": "sort", "annotation": ""}, "snippet": " l.sort(reverse=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L294_C4", "label": "l =", "type": "assigned_variable", "loc": [294, 294], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "vector": [14, 1, 0.9671, 0.0033, 1, 0.33, 0.4, 810, 5, 0, 0, 0, 0, 0, 0], "semantic": {"name": "l", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " l = [x[2] for x in l]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L296_C4", "label": "print()", "type": "expression", "loc": [296, 296], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "vector": [8, 1, 0.9737, 0.0033, 1, 0.33, 0.5, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('%5.5s %10.10s %7.7s %-8.8s' % ('% ', 'cumulative', 'self', ''))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L297_C4", "label": "print()", "type": "expression", "loc": [297, 297], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "vector": [8, 1, 0.977, 0.0033, 1, 0.33, 0.6, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('%5.5s %9.9s %8.8s %-8.8s' % (\"time\", \"seconds\", \"seconds\", \"name\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:For_L299_C4", "label": "for x", "type": "for", "loc": [299, 300], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "vector": [6, 1, 0.9852, 0.0066, 1, 0.33, 0.7, 190, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for x in l:\n x.display()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L300_C8", "label": "display()", "type": "expression", "loc": [300, 300], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:For_L299_C4", "vector": [8, 2, 0.9868, 0.0033, 2, 0.8, 0.0, 669, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "display", "arg_names": [], "import_names": [], "rhs_call_name": "display", "annotation": ""}, "snippet": " x.display()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L302_C4", "label": "print()", "type": "expression", "loc": [302, 302], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "vector": [8, 1, 0.9934, 0.0033, 1, 0.33, 0.8, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('---')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L303_C4", "label": "print()", "type": "expression", "loc": [303, 303], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "vector": [8, 1, 0.9967, 0.0033, 1, 0.33, 0.9, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Sample count: %d' % state.sample_count)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L304_C4", "label": "print()", "type": "expression", "loc": [304, 304], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "vector": [8, 1, 1.0, 0.0033, 1, 0.33, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Total time: %f seconds' % state.accumulated_time)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1505:Try_L125_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Import_L126_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L147_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L148_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L147_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Return_L149_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:ClassDef_L155_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L156_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L156_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L157_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:ClassDef_L155_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L161_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L163_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L167_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L167_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L168_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L167_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L169_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L169_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L171_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L175_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L177_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L181_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:ClassDef_L155_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L183_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:ClassDef_L190_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L191_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L191_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L192_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L191_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L193_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L191_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L194_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L191_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L195_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L191_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L196_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L191_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L197_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L191_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L198_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L200_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Return_L201_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L207_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L211_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L207_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:While_L212_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:While_L212_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L213_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:While_L212_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L214_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L207_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:For_L215_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L218_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L219_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L219_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L220_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L219_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L221_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L219_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L222_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L219_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L224_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L230_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Return_L231_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L233_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L235_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L235_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L236_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L235_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L237_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L235_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L238_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L235_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L239_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L235_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L240_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L235_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L242_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L244_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L246_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L246_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L247_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L246_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L248_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L246_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L249_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L246_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L250_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L246_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L251_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L246_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L252_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L254_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L256_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L254_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L257_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:ClassDef_L263_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L265_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L266_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L267_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L268_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L269_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L271_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L272_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L273_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L274_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L275_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L276_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L264_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L277_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:ClassDef_L263_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L279_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L279_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L280_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L287_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L287_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L288_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:If_L287_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Return_L289_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L291_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L292_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L293_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Assign_L294_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L296_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L297_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:For_L299_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:For_L299_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L300_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L302_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L303_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1505:FunctionDef_L286_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1505:Expr_L304_C4"}]
"""This is a copy of the htmlDecode function in Webware. @@TR: It implemented more efficiently. """ from Cheetah.Utils.htmlEncode import htmlCodesReversed def htmlDecode(s, codes=htmlCodesReversed): """ Returns the ASCII decoded version of the given HTML string. This does NOT remove normal HTML tags like <p>. It is the inverse of htmlEncode().""" for code in codes: s = s.replace(code[1], code[0]) return s
ajibawa-2023/Python-Code-Large/train/row_1506
7
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1506:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.2143, 0.3571, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"This is a copy of the htmlDecode function in Webware.\n\n@@TR: It implemented more efficiently.\n\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1506:ImportFrom_L7_C0", "label": "from Cheetah.Utils.htmlEncode import htmlCodesReversed", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.0714, 0, 0.66, 0.5, 756, 0, 1, 0, 0, 756, 0, 0], "semantic": {"name": "Cheetah.Utils.htmlEncode", "arg_names": [], "import_names": ["htmlCodesReversed"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Utils.htmlEncode import htmlCodesReversed"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1506:FunctionDef_L9_C0", "label": "htmlDecode", "type": "function", "loc": [9, 14], "level": 0, "parent": null, "vector": [2, 0, 0.8214, 0.4286, 0, 0.66, 1.0, 142, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "htmlDecode", "arg_names": ["s", "codes"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def htmlDecode(s, codes=htmlCodesReversed):\n \"\"\" Returns the ASCII decoded version of the given HTML string. This does\n NOT remove normal HTML tags like <p>. It is the inverse of htmlEncode().\"\"\"\n for code in codes:\n s = s.replace(code[1], code[0])\n return s"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1506:Expr_L10_C4", "label": "expression", "type": "expression", "loc": [10, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1506:FunctionDef_L9_C0", "vector": [8, 1, 0.75, 0.1429, 1, 0.71, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\" Returns the ASCII decoded version of the given HTML string. This does\n NOT remove normal HTML tags like <p>. It is the inverse of htmlEncode().\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1506:For_L12_C4", "label": "for code", "type": "for", "loc": [12, 13], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1506:FunctionDef_L9_C0", "vector": [6, 1, 0.8929, 0.1429, 1, 0.71, 0.5, 44, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "code", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for code in codes:\n s = s.replace(code[1], code[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1506:Assign_L13_C8", "label": "s = replace()", "type": "assigned_variable", "loc": [13, 13], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1506:For_L12_C4", "vector": [14, 2, 0.9286, 0.0714, 2, 0.91, 0.0, 553, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " s = s.replace(code[1], code[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1506:Return_L14_C4", "label": "return", "type": "return", "loc": [14, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1506:FunctionDef_L9_C0", "vector": [13, 1, 1.0, 0.0714, 1, 0.71, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return s"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1506:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1506:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1506:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1506:For_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1506:For_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1506:Assign_L13_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1506:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1506:Return_L14_C4"}]
#!/usr/bin/env python """ Miscellaneous functions/objects used by Cheetah but also useful standalone. """ import os # Used in mkdirsWithPyInitFile. import sys # Used in die. ################################################## ## MISCELLANEOUS FUNCTIONS def die(reason): sys.stderr.write(reason + '\n') sys.exit(1) def useOrRaise(thing, errmsg=''): """Raise 'thing' if it's a subclass of Exception. Otherwise return it. Called by: Cheetah.Servlet.cgiImport() """ if isinstance(thing, type) and issubclass(thing, Exception): raise thing(errmsg) return thing def checkKeywords(dic, legalKeywords, what='argument'): """Verify no illegal keyword arguments were passed to a function. in : dic, dictionary (**kw in the calling routine). legalKeywords, list of strings, the keywords that are allowed. what, string, suffix for error message (see function source). out: None. exc: TypeError if 'dic' contains a key not in 'legalKeywords'. called by: Cheetah.Template.__init__() """ # XXX legalKeywords could be a set when sets get added to Python. for k in dic.keys(): # Can be dic.iterkeys() if Python >= 2.2. if k not in legalKeywords: raise TypeError("'%s' is not a valid %s" % (k, what)) def removeFromList(list_, *elements): """Save as list_.remove(each element) but don't raise an error if element is missing. Modifies 'list_' in place! Returns None. """ for elm in elements: try: list_.remove(elm) except ValueError: pass def mkdirsWithPyInitFiles(path): """Same as os.makedirs (mkdir 'path' and all missing parent directories) but also puts a Python '__init__.py' file in every directory it creates. Does nothing (without creating an '__init__.py' file) if the directory already exists. """ dir, fil = os.path.split(path) if dir and not os.path.exists(dir): mkdirsWithPyInitFiles(dir) if not os.path.exists(path): os.mkdir(path) init = os.path.join(path, "__init__.py") f = open(init, 'w') # Open and close to produce empty file. f.close() # vim: shiftwidth=4 tabstop=4 expandtab
ajibawa-2023/Python-Code-Large/train/row_1507
29
67
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0448, 0.0448, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\n Miscellaneous functions/objects used by Cheetah but also useful standalone.\n\"\"\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Import_L5_C0", "label": "os import os", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0746, 0.0149, 0, 0.66, 0.1429, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os # Used in mkdirsWithPyInitFile."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Import_L6_C0", "label": "sys import sys", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0896, 0.0149, 0, 0.66, 0.2857, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys # Used in die."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L11_C0", "label": "die", "type": "function", "loc": [11, 13], "level": 0, "parent": null, "vector": [2, 0, 0.1791, 0.0448, 0, 0.66, 0.4286, 952, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "die", "arg_names": ["reason"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def die(reason):\n sys.stderr.write(reason + '\\n')\n sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L12_C4", "label": "write()", "type": "expression", "loc": [12, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L11_C0", "vector": [8, 1, 0.1791, 0.0149, 1, 0.14, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stderr.write(reason + '\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L13_C4", "label": "exit()", "type": "expression", "loc": [13, 13], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L11_C0", "vector": [8, 1, 0.194, 0.0149, 1, 0.14, 1.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L15_C0", "label": "useOrRaise", "type": "function", "loc": [15, 22], "level": 0, "parent": null, "vector": [2, 0, 0.2761, 0.1194, 0, 0.66, 0.5714, 792, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "useOrRaise", "arg_names": ["thing", "errmsg"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def useOrRaise(thing, errmsg=''):\n \"\"\"Raise 'thing' if it's a subclass of Exception. Otherwise return it.\n\n Called by: Cheetah.Servlet.cgiImport()\n \"\"\"\n if isinstance(thing, type) and issubclass(thing, Exception):\n raise thing(errmsg)\n return thing"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L16_C4", "label": "expression", "type": "expression", "loc": [16, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L15_C0", "vector": [8, 1, 0.2612, 0.0597, 1, 0.51, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Raise 'thing' if it's a subclass of Exception. Otherwise return it.\n\n Called by: Cheetah.Servlet.cgiImport()\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L20_C4", "label": "if", "type": "if", "loc": [20, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L15_C0", "vector": [4, 1, 0.306, 0.0299, 1, 0.51, 0.5, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(thing, type) and issubclass(thing, Exception):\n raise thing(errmsg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Return_L22_C4", "label": "return", "type": "return", "loc": [22, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L15_C0", "vector": [13, 1, 0.3284, 0.0149, 1, 0.51, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return thing"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L25_C0", "label": "checkKeywords", "type": "function", "loc": [25, 38], "level": 0, "parent": null, "vector": [2, 0, 0.4701, 0.209, 0, 0.66, 0.7143, 206, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "checkKeywords", "arg_names": ["dic", "legalKeywords", "what"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def checkKeywords(dic, legalKeywords, what='argument'):\n \"\"\"Verify no illegal keyword arguments were passed to a function.\n\n in : dic, dictionary (**kw in the calling routine).\n legalKeywords, list of strings, the keywords that are allowed.\n what, string, suffix for error message (see function source).\n out: None.\n exc: TypeError if 'dic' contains a key not in 'legalKeywords'."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L26_C4", "label": "expression", "type": "expression", "loc": [26, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L25_C0", "vector": [8, 1, 0.4478, 0.1343, 1, 0.9, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Verify no illegal keyword arguments were passed to a function.\n\n in : dic, dictionary (**kw in the calling routine).\n legalKeywords, list of strings, the keywords that are allowed.\n what, string, suffix for error message (see function source).\n out: None.\n exc: TypeError if 'dic' contains a key not in 'legalKeywords'.\n called by: Cheetah.Template.__init__()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:For_L36_C4", "label": "for k", "type": "for", "loc": [36, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L25_C0", "vector": [6, 1, 0.5522, 0.0448, 1, 0.9, 1.0, 954, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "k", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for k in dic.keys(): # Can be dic.iterkeys() if Python >= 2.2.\n if k not in legalKeywords: \n raise TypeError(\"'%s' is not a valid %s\" % (k, what))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L37_C8", "label": "if", "type": "if", "loc": [37, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:For_L36_C4", "vector": [4, 2, 0.5597, 0.0299, 2, 0.12, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if k not in legalKeywords: \n raise TypeError(\"'%s' is not a valid %s\" % (k, what))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L41_C0", "label": "removeFromList", "type": "function", "loc": [41, 49], "level": 0, "parent": null, "vector": [2, 0, 0.6716, 0.1343, 0, 0.66, 0.8571, 908, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "removeFromList", "arg_names": ["list_", "elements"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def removeFromList(list_, *elements):\n \"\"\"Save as list_.remove(each element) but don't raise an error if\n element is missing. Modifies 'list_' in place! Returns None.\n \"\"\"\n for elm in elements:\n try:\n list_.remove(elm)\n except ValueError:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L42_C4", "label": "expression", "type": "expression", "loc": [42, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L41_C0", "vector": [8, 1, 0.6418, 0.0448, 1, 0.11, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Save as list_.remove(each element) but don't raise an error if\n element is missing. Modifies 'list_' in place! Returns None.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:For_L45_C4", "label": "for elm", "type": "for", "loc": [45, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L41_C0", "vector": [6, 1, 0.7015, 0.0746, 1, 0.11, 1.0, 938, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "elm", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for elm in elements:\n try:\n list_.remove(elm)\n except ValueError:\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Try_L46_C8", "label": "try", "type": "try", "loc": [46, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:For_L45_C4", "vector": [7, 2, 0.709, 0.0597, 2, 0.56, 0.0, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n list_.remove(elm)\n except ValueError:\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L47_C12", "label": "remove()", "type": "expression", "loc": [47, 47], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:Try_L46_C8", "vector": [8, 3, 0.7015, 0.0149, 3, 0.68, 0.0, 185, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove", "arg_names": [], "import_names": [], "rhs_call_name": "remove", "annotation": ""}, "snippet": " list_.remove(elm)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L52_C0", "label": "mkdirsWithPyInitFiles", "type": "function", "loc": [52, 65], "level": 0, "parent": null, "vector": [2, 0, 0.8731, 0.209, 0, 0.66, 1.0, 198, 0, 1, 0, 0, 0, 0, 8], "semantic": {"name": "mkdirsWithPyInitFiles", "arg_names": ["path"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def mkdirsWithPyInitFiles(path):\n \"\"\"Same as os.makedirs (mkdir 'path' and all missing parent directories)\n but also puts a Python '__init__.py' file in every directory it\n creates. Does nothing (without creating an '__init__.py' file) if the\n directory already exists. \n \"\"\"\n dir, fil = os.path.split(path)\n if dir and not os.path.exists(dir):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L53_C4", "label": "expression", "type": "expression", "loc": [53, 57], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L52_C0", "vector": [8, 1, 0.8209, 0.0746, 1, 0.4, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Same as os.makedirs (mkdir 'path' and all missing parent directories)\n but also puts a Python '__init__.py' file in every directory it\n creates. Does nothing (without creating an '__init__.py' file) if the\n directory already exists. \n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Assign_L58_C4", "label": "dir, fil = split()", "type": "assigned_variable", "loc": [58, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L52_C0", "vector": [14, 1, 0.8657, 0.0149, 1, 0.4, 0.3333, 977, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "dir, fil", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " dir, fil = os.path.split(path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L59_C4", "label": "if", "type": "if", "loc": [59, 60], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L52_C0", "vector": [4, 1, 0.8881, 0.0299, 1, 0.4, 0.6667, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if dir and not os.path.exists(dir):\n mkdirsWithPyInitFiles(dir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L60_C8", "label": "mkdirsWithPyInitFiles()", "type": "expression", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L59_C4", "vector": [8, 2, 0.8955, 0.0149, 2, 0.9, 0.0, 198, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "mkdirsWithPyInitFiles", "arg_names": [], "import_names": [], "rhs_call_name": "mkdirsWithPyInitFiles", "annotation": ""}, "snippet": " mkdirsWithPyInitFiles(dir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L61_C4", "label": "if", "type": "if", "loc": [61, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L52_C0", "vector": [4, 1, 0.9403, 0.0746, 1, 0.4, 1.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not os.path.exists(path):\n os.mkdir(path)\n init = os.path.join(path, \"__init__.py\")\n f = open(init, 'w') # Open and close to produce empty file.\n f.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L62_C8", "label": "mkdir()", "type": "expression", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L61_C4", "vector": [8, 2, 0.9254, 0.0149, 2, 0.01, 0.0, 853, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "mkdir", "arg_names": [], "import_names": [], "rhs_call_name": "mkdir", "annotation": ""}, "snippet": " os.mkdir(path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Assign_L63_C8", "label": "init = join()", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L61_C4", "vector": [14, 2, 0.9403, 0.0149, 2, 0.01, 0.3333, 319, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "init", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " init = os.path.join(path, \"__init__.py\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Assign_L64_C8", "label": "f = open()", "type": "assigned_variable", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L61_C4", "vector": [14, 2, 0.9552, 0.0149, 2, 0.01, 0.6667, 899, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " f = open(init, 'w') # Open and close to produce empty file."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L65_C8", "label": "close()", "type": "expression", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L61_C4", "vector": [8, 2, 0.9701, 0.0149, 2, 0.01, 1.0, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " f.close()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:Return_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:For_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:For_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:For_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:For_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:Try_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:Try_L46_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L47_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:Assign_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:FunctionDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:Assign_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1507:If_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1507:Expr_L65_C8"}]
# $Id: WebInputMixin.py,v 1.10 2006/01/06 21:56:54 tavis_rudd Exp $ """Provides helpers for Template.webInput(), a method for importing web transaction variables in bulk. See the docstring of webInput for full details. Meta-Data ================================================================================ Author: Mike Orr <iron@mso.oz.net> License: This software is released for unlimited distribution under the terms of the MIT license. See the LICENSE file. Version: $Revision: 1.10 $ Start Date: 2002/03/17 Last Revision Date: $Date: 2006/01/06 21:56:54 $ """ __author__ = "Mike Orr <iron@mso.oz.net>" __revision__ = "$Revision: 1.10 $"[11:-2] from Cheetah.Utils.Misc import useOrRaise class NonNumericInputError(ValueError): pass ################################################## ## PRIVATE FUNCTIONS AND CLASSES class _Converter: """A container object for info about type converters. .name, string, name of this converter (for error messages). .func, function, factory function. .default, value to use or raise if the real value is missing. .error, value to use or raise if .func() raises an exception. """ def __init__(self, name, func, default, error): self.name = name self.func = func self.default = default self.error = error def _lookup(name, func, multi, converters): """Look up a Webware field/cookie/value/session value. Return '(realName, value)' where 'realName' is like 'name' but with any conversion suffix strips off. Applies numeric conversion and single vs multi values according to the comments in the source. """ # Step 1 -- split off the conversion suffix from 'name'; e.g. "height:int". # If there's no colon, the suffix is "". 'longName' is the name with the # suffix, 'shortName' is without. # XXX This implementation assumes "height:" means "height". colon = name.find(':') if colon != -1: longName = name shortName, ext = name[:colon], name[colon+1:] else: longName = shortName = name ext = '' # Step 2 -- look up the values by calling 'func'. if longName != shortName: values = func(longName, None) or func(shortName, None) else: values = func(shortName, None) # 'values' is a list of strings, a string or None. # Step 3 -- Coerce 'values' to a list of zero, one or more strings. if values is None: values = [] elif isinstance(values, str): values = [values] # Step 4 -- Find a _Converter object or raise TypeError. try: converter = converters[ext] except KeyError: fmt = "'%s' is not a valid converter name in '%s'" tup = (ext, longName) raise TypeError(fmt % tup) # Step 5 -- if there's a converter func, run it on each element. # If the converter raises an exception, use or raise 'converter.error'. if converter.func is not None: tmp = values[:] values = [] for elm in tmp: try: elm = converter.func(elm) except (TypeError, ValueError): tup = converter.name, elm errmsg = "%s '%s' contains invalid characters" % tup elm = useOrRaise(converter.error, errmsg) values.append(elm) # 'values' is now a list of strings, ints or floats. # Step 6 -- If we're supposed to return a multi value, return the list # as is. If we're supposed to return a single value and the list is # empty, return or raise 'converter.default'. Otherwise, return the # first element in the list and ignore any additional values. if multi: return shortName, values if len(values) == 0: return shortName, useOrRaise(converter.default) return shortName, values[0] # vim: sw=4 ts=4 expandtab
ajibawa-2023/Python-Code-Large/train/row_1508
46
102
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 13], "level": 0, "parent": null, "vector": [8, 0, 0.0735, 0.1176, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"Provides helpers for Template.webInput(), a method for importing web\ntransaction variables in bulk. See the docstring of webInput for full details.\n\nMeta-Data\n================================================================================\nAuthor: Mike Orr <iron@mso.oz.net>\nLicense: This software is released for unlimited distribution under the\n terms of the MIT license. See the LICENSE file."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L14_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [14, 14], "level": 0, "parent": null, "vector": [14, 0, 0.1373, 0.0098, 0, 0.66, 0.1667, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__author__ = \"Mike Orr <iron@mso.oz.net>\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L15_C0", "label": "__revision__ =", "type": "assigned_variable", "loc": [15, 15], "level": 0, "parent": null, "vector": [14, 0, 0.1471, 0.0098, 0, 0.66, 0.3333, 809, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__revision__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__revision__ = \"$Revision: 1.10 $\"[11:-2]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:ImportFrom_L17_C0", "label": "from Cheetah.Utils.Misc import useOrRaise", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.0098, 0, 0.66, 0.5, 190, 0, 1, 0, 0, 190, 0, 0], "semantic": {"name": "Cheetah.Utils.Misc", "arg_names": [], "import_names": ["useOrRaise"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Utils.Misc import useOrRaise"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:ClassDef_L19_C0", "label": "NonNumericInputError", "type": "class", "loc": [19, 19], "level": 0, "parent": null, "vector": [3, 0, 0.1863, 0.0098, 0, 0.66, 0.6667, 593, 0, 0, 0, 0, 690, 0, 0], "semantic": {"name": "NonNumericInputError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class NonNumericInputError(ValueError): pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:ClassDef_L24_C0", "label": "_Converter", "type": "class", "loc": [24, 35], "level": 0, "parent": null, "vector": [3, 0, 0.2892, 0.1176, 0, 0.66, 0.8333, 433, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "_Converter", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class _Converter:\n \"\"\"A container object for info about type converters.\n .name, string, name of this converter (for error messages).\n .func, function, factory function.\n .default, value to use or raise if the real value is missing.\n .error, value to use or raise if .func() raises an exception.\n \"\"\"\n def __init__(self, name, func, default, error):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Expr_L25_C4", "label": "expression", "type": "expression", "loc": [25, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:ClassDef_L24_C0", "vector": [8, 1, 0.2696, 0.0588, 1, 0.8, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"A container object for info about type converters.\n .name, string, name of this converter (for error messages).\n .func, function, factory function.\n .default, value to use or raise if the real value is missing.\n .error, value to use or raise if .func() raises an exception.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L31_C4", "label": "__init__", "type": "function", "loc": [31, 35], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:ClassDef_L24_C0", "vector": [2, 1, 0.3235, 0.049, 1, 0.8, 1.0, 555, 0, 5, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "name", "func", "default", "error"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, name, func, default, error):\n self.name = name\n self.func = func\n self.default = default\n self.error = error"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L32_C8", "label": "self.name =", "type": "assigned_variable", "loc": [32, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L31_C4", "vector": [14, 2, 0.3137, 0.0098, 2, 0.53, 0.0, 689, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.name = name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L33_C8", "label": "self.func =", "type": "assigned_variable", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L31_C4", "vector": [14, 2, 0.3235, 0.0098, 2, 0.53, 0.3333, 558, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.func", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.func = func"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L34_C8", "label": "self.default =", "type": "assigned_variable", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L31_C4", "vector": [14, 2, 0.3333, 0.0098, 2, 0.53, 0.6667, 762, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.default", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.default = default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L35_C8", "label": "self.error =", "type": "assigned_variable", "loc": [35, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L31_C4", "vector": [14, 2, 0.3431, 0.0098, 2, 0.53, 1.0, 784, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.error", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.error = error"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "label": "_lookup", "type": "function", "loc": [38, 100], "level": 0, "parent": null, "vector": [2, 0, 0.6765, 0.6176, 0, 0.66, 1.0, 660, 0, 4, 1, 0, 0, 0, 11], "semantic": {"name": "_lookup", "arg_names": ["name", "func", "multi", "converters"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def _lookup(name, func, multi, converters):\n \"\"\"Look up a Webware field/cookie/value/session value. Return\n '(realName, value)' where 'realName' is like 'name' but with any\n conversion suffix strips off. Applies numeric conversion and\n single vs multi values according to the comments in the source.\n \"\"\"\n # Step 1 -- split off the conversion suffix from 'name'; e.g. \"height:int\".\n # If there's no colon, the suffix is \"\". 'longName' is the name with the "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Expr_L39_C4", "label": "expression", "type": "expression", "loc": [39, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "vector": [8, 1, 0.402, 0.049, 1, 0.88, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Look up a Webware field/cookie/value/session value. Return\n '(realName, value)' where 'realName' is like 'name' but with any\n conversion suffix strips off. Applies numeric conversion and\n single vs multi values according to the comments in the source.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L48_C4", "label": "colon = find()", "type": "assigned_variable", "loc": [48, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "vector": [14, 1, 0.4706, 0.0098, 1, 0.88, 0.1111, 443, 3, 1, 0, 0, 340, 10, 1], "semantic": {"name": "colon", "arg_names": [], "import_names": [], "rhs_call_name": "find", "annotation": ""}, "snippet": " colon = name.find(':')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L49_C4", "label": "if", "type": "if", "loc": [49, 54], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "vector": [4, 1, 0.5049, 0.0588, 1, 0.88, 0.2222, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if colon != -1:\n longName = name\n shortName, ext = name[:colon], name[colon+1:]\n else:\n longName = shortName = name\n ext = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L50_C8", "label": "longName =", "type": "assigned_variable", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L49_C4", "vector": [14, 2, 0.4902, 0.0098, 2, 0.84, 0.0, 896, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "longName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " longName = name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L51_C8", "label": "shortName, ext =", "type": "assigned_variable", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L49_C4", "vector": [14, 2, 0.5, 0.0098, 2, 0.84, 0.3333, 409, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "shortName, ext", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " shortName, ext = name[:colon], name[colon+1:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L53_C8", "label": "longName =", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L49_C4", "vector": [14, 2, 0.5196, 0.0098, 2, 0.84, 0.6667, 896, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "longName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " longName = shortName = name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L54_C8", "label": "ext =", "type": "assigned_variable", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L49_C4", "vector": [14, 2, 0.5294, 0.0098, 2, 0.84, 1.0, 916, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ext", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ext = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L57_C4", "label": "if", "type": "if", "loc": [57, 60], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "vector": [4, 1, 0.5735, 0.0392, 1, 0.88, 0.3333, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if longName != shortName:\n values = func(longName, None) or func(shortName, None)\n else:\n values = func(shortName, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L58_C8", "label": "values =", "type": "assigned_variable", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L57_C4", "vector": [14, 2, 0.5686, 0.0098, 2, 0.94, 0.0, 721, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "values", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " values = func(longName, None) or func(shortName, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L60_C8", "label": "values = func()", "type": "assigned_variable", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L57_C4", "vector": [14, 2, 0.5882, 0.0098, 2, 0.94, 1.0, 721, 3, 2, 0, 0, 856, 10, 1], "semantic": {"name": "values", "arg_names": [], "import_names": [], "rhs_call_name": "func", "annotation": ""}, "snippet": " values = func(shortName, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L64_C4", "label": "if", "type": "if", "loc": [64, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "vector": [4, 1, 0.6422, 0.0392, 1, 0.88, 0.4444, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if values is None:\n values = []\n elif isinstance(values, str):\n values = [values]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L65_C8", "label": "values =", "type": "assigned_variable", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L64_C4", "vector": [14, 2, 0.6373, 0.0098, 2, 0.7, 0.0, 721, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "values", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " values = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L66_C4", "label": "if", "type": "if", "loc": [66, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L64_C4", "vector": [4, 2, 0.652, 0.0196, 2, 0.7, 1.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isinstance(values, str):\n values = [values]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L67_C8", "label": "values =", "type": "assigned_variable", "loc": [67, 67], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L66_C4", "vector": [14, 3, 0.6569, 0.0098, 3, 0.81, 0.0, 721, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "values", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " values = [values]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L70_C4", "label": "try", "type": "try", "loc": [70, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "vector": [7, 1, 0.7108, 0.0588, 1, 0.88, 0.5556, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n converter = converters[ext]\n except KeyError:\n fmt = \"'%s' is not a valid converter name in '%s'\"\n tup = (ext, longName)\n raise TypeError(fmt % tup) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L71_C8", "label": "converter =", "type": "assigned_variable", "loc": [71, 71], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L70_C4", "vector": [14, 2, 0.6961, 0.0098, 2, 0.13, 0.0, 162, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "converter", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " converter = converters[ext]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L73_C8", "label": "fmt =", "type": "assigned_variable", "loc": [73, 73], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L70_C4", "vector": [14, 2, 0.7157, 0.0098, 2, 0.13, 0.0, 913, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "fmt", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " fmt = \"'%s' is not a valid converter name in '%s'\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L74_C8", "label": "tup =", "type": "assigned_variable", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L70_C4", "vector": [14, 2, 0.7255, 0.0098, 2, 0.13, 1.0, 218, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "tup", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " tup = (ext, longName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L79_C4", "label": "if", "type": "if", "loc": [79, 89], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "vector": [4, 1, 0.8235, 0.1078, 1, 0.88, 0.6667, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if converter.func is not None:\n tmp = values[:]\n values = []\n for elm in tmp:\n try:\n elm = converter.func(elm)\n except (TypeError, ValueError):\n tup = converter.name, elm"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L80_C8", "label": "tmp =", "type": "assigned_variable", "loc": [80, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L79_C4", "vector": [14, 2, 0.7843, 0.0098, 2, 0.97, 0.0, 517, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "tmp", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " tmp = values[:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L81_C8", "label": "values =", "type": "assigned_variable", "loc": [81, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L79_C4", "vector": [14, 2, 0.7941, 0.0098, 2, 0.97, 0.5, 721, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "values", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " values = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:For_L82_C8", "label": "for elm", "type": "for", "loc": [82, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L79_C4", "vector": [6, 2, 0.8382, 0.0784, 2, 0.97, 1.0, 938, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "elm", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for elm in tmp:\n try:\n elm = converter.func(elm)\n except (TypeError, ValueError):\n tup = converter.name, elm\n errmsg = \"%s '%s' contains invalid characters\" % tup\n elm = useOrRaise(converter.error, errmsg)\n values.append(elm)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L83_C12", "label": "try", "type": "try", "loc": [83, 88], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:For_L82_C8", "vector": [7, 3, 0.8382, 0.0588, 3, 0.98, 0.0, 0, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n elm = converter.func(elm)\n except (TypeError, ValueError):\n tup = converter.name, elm\n errmsg = \"%s '%s' contains invalid characters\" % tup\n elm = useOrRaise(converter.error, errmsg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L84_C16", "label": "elm = func()", "type": "assigned_variable", "loc": [84, 84], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L83_C12", "vector": [14, 4, 0.8235, 0.0098, 4, 0.04, 0.0, 938, 3, 1, 0, 0, 856, 10, 1], "semantic": {"name": "elm", "arg_names": [], "import_names": [], "rhs_call_name": "func", "annotation": ""}, "snippet": " elm = converter.func(elm)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L86_C16", "label": "tup =", "type": "assigned_variable", "loc": [86, 86], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L83_C12", "vector": [14, 4, 0.8431, 0.0098, 4, 0.04, 0.0, 218, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "tup", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " tup = converter.name, elm"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L87_C16", "label": "errmsg =", "type": "assigned_variable", "loc": [87, 87], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L83_C12", "vector": [14, 4, 0.8529, 0.0098, 4, 0.04, 0.5, 400, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "errmsg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " errmsg = \"%s '%s' contains invalid characters\" % tup"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L88_C16", "label": "elm = useOrRaise()", "type": "assigned_variable", "loc": [88, 88], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L83_C12", "vector": [14, 4, 0.8627, 0.0098, 4, 0.04, 1.0, 938, 3, 2, 0, 0, 792, 10, 1], "semantic": {"name": "elm", "arg_names": [], "import_names": [], "rhs_call_name": "useOrRaise", "annotation": ""}, "snippet": " elm = useOrRaise(converter.error, errmsg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Expr_L89_C12", "label": "append()", "type": "expression", "loc": [89, 89], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:For_L82_C8", "vector": [8, 3, 0.8725, 0.0098, 3, 0.98, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " values.append(elm)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L96_C4", "label": "if", "type": "if", "loc": [96, 97], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "vector": [4, 1, 0.9461, 0.0196, 1, 0.88, 0.7778, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if multi:\n return shortName, values"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Return_L97_C8", "label": "return", "type": "return", "loc": [97, 97], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L96_C4", "vector": [13, 2, 0.951, 0.0098, 2, 0.25, 0.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return shortName, values"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L98_C4", "label": "if", "type": "if", "loc": [98, 99], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "vector": [4, 1, 0.9657, 0.0196, 1, 0.88, 0.8889, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(values) == 0:\n return shortName, useOrRaise(converter.default)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Return_L99_C8", "label": "return", "type": "return", "loc": [99, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L98_C4", "vector": [13, 2, 0.9706, 0.0098, 2, 0.99, 0.0, 0, 0, 0, 0, 0, 0, 8, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return shortName, useOrRaise(converter.default)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1508:Return_L100_C4", "label": "return", "type": "return", "loc": [100, 100], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "vector": [13, 1, 0.9804, 0.0098, 1, 0.88, 1.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return shortName, values[0]"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1508:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L35_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Expr_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L49_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L49_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L49_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L49_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L58_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L64_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L64_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L64_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L66_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L66_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L67_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L70_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L71_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L73_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L74_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L79_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L79_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L79_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L81_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L79_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:For_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:For_L82_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L83_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L83_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L84_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L83_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L86_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L83_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L87_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:Try_L83_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Assign_L88_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:For_L82_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Expr_L89_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Return_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L98_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:If_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Return_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1508:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1508:Return_L100_C4"}]
#
ajibawa-2023/Python-Code-Large/train/row_1509
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
"""This is a copy of the htmlEncode function in Webware. @@TR: It implemented more efficiently. """ htmlCodes = [ ['&', '&amp;'], ['<', '&lt;'], ['>', '&gt;'], ['"', '&quot;'], ] htmlCodesReversed = htmlCodes[:] htmlCodesReversed.reverse() def htmlEncode(s, codes=htmlCodes): """ Returns the HTML encoded version of the given string. This is useful to display a plain ASCII text string on a web page.""" for code in codes: s = s.replace(code[0], code[1]) return s
ajibawa-2023/Python-Code-Large/train/row_1510
9
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1510:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.2857, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"This is a copy of the htmlEncode function in Webware.\n\n\n@@TR: It implemented more efficiently.\n\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1510:Assign_L7_C0", "label": "htmlCodes =", "type": "assigned_variable", "loc": [7, 12], "level": 0, "parent": null, "vector": [14, 0, 0.4524, 0.2857, 0, 0.66, 0.25, 350, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "htmlCodes", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "htmlCodes = [\n ['&', '&amp;'],\n ['<', '&lt;'],\n ['>', '&gt;'],\n ['\"', '&quot;'],\n]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1510:Assign_L13_C0", "label": "htmlCodesReversed =", "type": "assigned_variable", "loc": [13, 13], "level": 0, "parent": null, "vector": [14, 0, 0.619, 0.0476, 0, 0.66, 0.5, 418, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "htmlCodesReversed", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "htmlCodesReversed = htmlCodes[:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1510:Expr_L14_C0", "label": "reverse()", "type": "expression", "loc": [14, 14], "level": 0, "parent": null, "vector": [8, 0, 0.6667, 0.0476, 0, 0.66, 0.75, 109, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "reverse", "arg_names": [], "import_names": [], "rhs_call_name": "reverse", "annotation": ""}, "snippet": "htmlCodesReversed.reverse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1510:FunctionDef_L16_C0", "label": "htmlEncode", "type": "function", "loc": [16, 21], "level": 0, "parent": null, "vector": [2, 0, 0.881, 0.2857, 0, 0.66, 1.0, 38, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "htmlEncode", "arg_names": ["s", "codes"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def htmlEncode(s, codes=htmlCodes):\n \"\"\" Returns the HTML encoded version of the given string. This is useful to\n display a plain ASCII text string on a web page.\"\"\"\n for code in codes:\n s = s.replace(code[0], code[1])\n return s"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1510:Expr_L17_C4", "label": "expression", "type": "expression", "loc": [17, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1510:FunctionDef_L16_C0", "vector": [8, 1, 0.8333, 0.0952, 1, 0.85, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\" Returns the HTML encoded version of the given string. This is useful to\n display a plain ASCII text string on a web page.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1510:For_L19_C4", "label": "for code", "type": "for", "loc": [19, 20], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1510:FunctionDef_L16_C0", "vector": [6, 1, 0.9286, 0.0952, 1, 0.85, 0.5, 44, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "code", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for code in codes:\n s = s.replace(code[0], code[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1510:Assign_L20_C8", "label": "s = replace()", "type": "assigned_variable", "loc": [20, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1510:For_L19_C4", "vector": [14, 2, 0.9524, 0.0476, 2, 0.73, 0.0, 553, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " s = s.replace(code[0], code[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1510:Return_L21_C4", "label": "return", "type": "return", "loc": [21, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1510:FunctionDef_L16_C0", "vector": [13, 1, 1.0, 0.0476, 1, 0.85, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return s"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1510:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1510:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1510:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1510:For_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1510:For_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1510:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1510:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1510:Return_L21_C4"}]
import sys import os.path import copy as copyModule from ConfigParser import ConfigParser import re from tokenize import Intnumber, Floatnumber, Number from types import * import types import new import time from StringIO import StringIO # not cStringIO because of unicode support import imp # used by SettingsManager.updateSettingsFromPySrcFile() numberRE = re.compile(Number) complexNumberRE = re.compile('[\(]*' +Number + r'[ \t]*\+[ \t]*' + Number + '[\)]*') convertableToStrTypes = (StringType, IntType, FloatType, LongType, ComplexType, NoneType, UnicodeType) ################################################## ## FUNCTIONS ## def mergeNestedDictionaries(dict1, dict2, copy=False, deepcopy=False): """Recursively merge the values of dict2 into dict1. This little function is very handy for selectively overriding settings in a settings dictionary that has a nested structure. """ if copy: dict1 = copyModule.copy(dict1) elif deepcopy: dict1 = copyModule.deepcopy(dict1) for key, val in dict2.iteritems(): if key in dict1 and isinstance(val, dict) and isinstance(dict1[key], dict): dict1[key] = mergeNestedDictionaries(dict1[key], val) else: dict1[key] = val return dict1 def stringIsNumber(S): """Return True if theString represents a Python number, False otherwise. This also works for complex numbers and numbers with +/- in front.""" S = S.strip() if S[0] in '-+' and len(S) > 1: S = S[1:].strip() match = complexNumberRE.match(S) if not match: match = numberRE.match(S) if not match or (match.end() != len(S)): return False else: return True def convStringToNum(theString): """Convert a string representation of a Python number to the Python version""" if not stringIsNumber(theString): raise Error(theString + ' cannot be converted to a Python number') return eval(theString, {}, {}) class Error(Exception): pass class NoDefault(object): pass class ConfigParserCaseSensitive(ConfigParser): """A case sensitive version of the standard Python ConfigParser.""" def optionxform(self, optionstr): """Don't change the case as is done in the default implemenation.""" return optionstr class _SettingsCollector(object): """An abstract base class that provides the methods SettingsManager uses to collect settings from config files and strings. This class only collects settings it doesn't modify the _settings dictionary of SettingsManager instances in any way. """ _ConfigParserClass = ConfigParserCaseSensitive def readSettingsFromModule(self, mod, ignoreUnderscored=True): """Returns all settings from a Python module. """ S = {} attrs = vars(mod) for k, v in attrs.iteritems(): if (ignoreUnderscored and k.startswith('_')): continue else: S[k] = v return S def readSettingsFromPySrcStr(self, theString): """Return a dictionary of the settings in a Python src string.""" globalsDict = {'True': (1==1), 'False': (0==1), } newSettings = {'self':self} exec((theString+os.linesep), globalsDict, newSettings) del newSettings['self'] module = new.module('temp_settings_module') module.__dict__.update(newSettings) return self.readSettingsFromModule(module) def readSettingsFromConfigFileObj(self, inFile, convert=True): """Return the settings from a config file that uses the syntax accepted by Python's standard ConfigParser module (like Windows .ini files). NOTE: this method maintains case unlike the ConfigParser module, unless this class was initialized with the 'caseSensitive' keyword set to False. All setting values are initially parsed as strings. However, If the 'convert' arg is True this method will do the following value conversions: * all Python numeric literals will be coverted from string to number * The string 'None' will be converted to the Python value None * The string 'True' will be converted to a Python truth value * The string 'False' will be converted to a Python false value * Any string starting with 'python:' will be treated as a Python literal or expression that needs to be eval'd. This approach is useful for declaring lists and dictionaries. If a config section titled 'Globals' is present the options defined under it will be treated as top-level settings. """ p = self._ConfigParserClass() p.readfp(inFile) sects = p.sections() newSettings = {} sects = p.sections() newSettings = {} for s in sects: newSettings[s] = {} for o in p.options(s): if o != '__name__': newSettings[s][o] = p.get(s, o) ## loop through new settings -> deal with global settings, numbers, ## booleans and None ++ also deal with 'importSettings' commands for sect, subDict in newSettings.items(): for key, val in subDict.items(): if convert: if val.lower().startswith('python:'): subDict[key] = eval(val[7:], {}, {}) if val.lower() == 'none': subDict[key] = None if val.lower() == 'true': subDict[key] = True if val.lower() == 'false': subDict[key] = False if stringIsNumber(val): subDict[key] = convStringToNum(val) ## now deal with any 'importSettings' commands if key.lower() == 'importsettings': if val.find(';') < 0: importedSettings = self.readSettingsFromPySrcFile(val) else: path = val.split(';')[0] rest = ''.join(val.split(';')[1:]).strip() parentDict = self.readSettingsFromPySrcFile(path) importedSettings = eval('parentDict["' + rest + '"]') subDict.update(mergeNestedDictionaries(subDict, importedSettings)) if sect.lower() == 'globals': newSettings.update(newSettings[sect]) del newSettings[sect] return newSettings class SettingsManager(_SettingsCollector): """A mixin class that provides facilities for managing application settings. SettingsManager is designed to work well with nested settings dictionaries of any depth. """ def __init__(self): super(SettingsManager, self).__init__() self._settings = {} self._initializeSettings() def _defaultSettings(self): return {} def _initializeSettings(self): """A hook that allows for complex setting initialization sequences that involve references to 'self' or other settings. For example: self._settings['myCalcVal'] = self._settings['someVal'] * 15 This method should be called by the class' __init__() method when needed. The dummy implementation should be reimplemented by subclasses. """ pass ## core post startup methods def setting(self, name, default=NoDefault): """Get a setting from self._settings, with or without a default value.""" if default is NoDefault: return self._settings[name] else: return self._settings.get(name, default) def hasSetting(self, key): """True/False""" return key in self._settings def setSetting(self, name, value): """Set a setting in self._settings.""" self._settings[name] = value def settings(self): """Return a reference to the settings dictionary""" return self._settings def copySettings(self): """Returns a shallow copy of the settings dictionary""" return copyModule.copy(self._settings) def deepcopySettings(self): """Returns a deep copy of the settings dictionary""" return copyModule.deepcopy(self._settings) def updateSettings(self, newSettings, merge=True): """Update the settings with a selective merge or a complete overwrite.""" if merge: mergeNestedDictionaries(self._settings, newSettings) else: self._settings.update(newSettings) ## source specific update methods def updateSettingsFromPySrcStr(self, theString, merge=True): """Update the settings from a code in a Python src string.""" newSettings = self.readSettingsFromPySrcStr(theString) self.updateSettings(newSettings, merge=newSettings.get('mergeSettings', merge) ) def updateSettingsFromConfigFileObj(self, inFile, convert=True, merge=True): """See the docstring for .updateSettingsFromConfigFile() The caller of this method is responsible for closing the inFile file object.""" newSettings = self.readSettingsFromConfigFileObj(inFile, convert=convert) self.updateSettings(newSettings, merge=newSettings.get('mergeSettings', merge)) def updateSettingsFromConfigStr(self, configStr, convert=True, merge=True): """See the docstring for .updateSettingsFromConfigFile() """ configStr = '[globals]\n' + configStr inFile = StringIO(configStr) newSettings = self.readSettingsFromConfigFileObj(inFile, convert=convert) self.updateSettings(newSettings, merge=newSettings.get('mergeSettings', merge))
ajibawa-2023/Python-Code-Large/train/row_1511
153
290
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0034, 0.0034, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Import_L2_C0", "label": "os.path import os.path", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0069, 0.0034, 0, 0.66, 0.0455, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os.path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Import_L3_C0", "label": "copy import copyModule", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0103, 0.0034, 0, 0.66, 0.0909, 739, 0, 1, 0, 0, 739, 0, 0], "semantic": {"name": "copy", "arg_names": [], "import_names": ["copyModule"], "rhs_call_name": "", "annotation": ""}, "snippet": "import copy as copyModule"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:ImportFrom_L4_C0", "label": "from ConfigParser import ConfigParser", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0138, 0.0034, 0, 0.66, 0.1364, 272, 0, 1, 0, 0, 272, 0, 0], "semantic": {"name": "ConfigParser", "arg_names": [], "import_names": ["ConfigParser"], "rhs_call_name": "", "annotation": ""}, "snippet": "from ConfigParser import ConfigParser "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Import_L5_C0", "label": "re import re", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0172, 0.0034, 0, 0.66, 0.1818, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:ImportFrom_L6_C0", "label": "from tokenize import Intnumber, Floatnumber, Number", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0207, 0.0034, 0, 0.66, 0.2273, 841, 0, 3, 0, 0, 841, 0, 0], "semantic": {"name": "tokenize", "arg_names": [], "import_names": ["Intnumber", "Floatnumber", "Number"], "rhs_call_name": "", "annotation": ""}, "snippet": "from tokenize import Intnumber, Floatnumber, Number"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:ImportFrom_L7_C0", "label": "from types import *", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0241, 0.0034, 0, 0.66, 0.2727, 209, 0, 1, 0, 0, 209, 0, 0], "semantic": {"name": "types", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from types import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Import_L8_C0", "label": "types import types", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0276, 0.0034, 0, 0.66, 0.3182, 209, 0, 1, 0, 0, 209, 0, 0], "semantic": {"name": "types", "arg_names": [], "import_names": ["types"], "rhs_call_name": "", "annotation": ""}, "snippet": "import types"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Import_L9_C0", "label": "new import new", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.031, 0.0034, 0, 0.66, 0.3636, 145, 0, 1, 0, 0, 145, 0, 0], "semantic": {"name": "new", "arg_names": [], "import_names": ["new"], "rhs_call_name": "", "annotation": ""}, "snippet": "import new"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Import_L10_C0", "label": "time import time", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0345, 0.0034, 0, 0.66, 0.4091, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:ImportFrom_L11_C0", "label": "from StringIO import StringIO", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.0379, 0.0034, 0, 0.66, 0.4545, 609, 0, 1, 0, 0, 609, 0, 0], "semantic": {"name": "StringIO", "arg_names": [], "import_names": ["StringIO"], "rhs_call_name": "", "annotation": ""}, "snippet": "from StringIO import StringIO # not cStringIO because of unicode support"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Import_L12_C0", "label": "imp import imp", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.0414, 0.0034, 0, 0.66, 0.5, 201, 0, 1, 0, 0, 201, 0, 0], "semantic": {"name": "imp", "arg_names": [], "import_names": ["imp"], "rhs_call_name": "", "annotation": ""}, "snippet": "import imp # used by SettingsManager.updateSettingsFromPySrcFile()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L15_C0", "label": "numberRE = compile()", "type": "assigned_variable", "loc": [15, 15], "level": 0, "parent": null, "vector": [14, 0, 0.0517, 0.0034, 0, 0.66, 0.5455, 407, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "numberRE", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "numberRE = re.compile(Number)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L16_C0", "label": "complexNumberRE = compile()", "type": "assigned_variable", "loc": [16, 16], "level": 0, "parent": null, "vector": [14, 0, 0.0552, 0.0034, 0, 0.66, 0.5909, 979, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "complexNumberRE", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "complexNumberRE = re.compile('[\\(]*' +Number + r'[ \\t]*\\+[ \\t]*' + Number + '[\\)]*')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L18_C0", "label": "convertableToStrTypes =", "type": "assigned_variable", "loc": [18, 20], "level": 0, "parent": null, "vector": [14, 0, 0.0655, 0.0103, 0, 0.66, 0.6364, 604, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "convertableToStrTypes", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "convertableToStrTypes = (StringType, IntType, FloatType,\n LongType, ComplexType, NoneType,\n UnicodeType)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L25_C0", "label": "mergeNestedDictionaries", "type": "function", "loc": [25, 42], "level": 0, "parent": null, "vector": [2, 0, 0.1155, 0.0621, 0, 0.66, 0.6818, 645, 0, 4, 1, 0, 0, 0, 6], "semantic": {"name": "mergeNestedDictionaries", "arg_names": ["dict1", "dict2", "copy", "deepcopy"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def mergeNestedDictionaries(dict1, dict2, copy=False, deepcopy=False):\n \"\"\"Recursively merge the values of dict2 into dict1.\n\n This little function is very handy for selectively overriding settings in a\n settings dictionary that has a nested structure.\n \"\"\"\n\n if copy:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L26_C4", "label": "expression", "type": "expression", "loc": [26, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L25_C0", "vector": [8, 1, 0.0966, 0.0172, 1, 0.52, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Recursively merge the values of dict2 into dict1.\n\n This little function is very handy for selectively overriding settings in a\n settings dictionary that has a nested structure.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L32_C4", "label": "if", "type": "if", "loc": [32, 35], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L25_C0", "vector": [4, 1, 0.1155, 0.0138, 1, 0.52, 0.3333, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if copy:\n dict1 = copyModule.copy(dict1)\n elif deepcopy:\n dict1 = copyModule.deepcopy(dict1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L33_C8", "label": "dict1 = copy()", "type": "assigned_variable", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L32_C4", "vector": [14, 2, 0.1138, 0.0034, 2, 0.64, 0.0, 566, 3, 1, 0, 0, 739, 10, 1], "semantic": {"name": "dict1", "arg_names": [], "import_names": [], "rhs_call_name": "copy", "annotation": ""}, "snippet": " dict1 = copyModule.copy(dict1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L34_C4", "label": "if", "type": "if", "loc": [34, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L32_C4", "vector": [4, 2, 0.119, 0.0069, 2, 0.64, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif deepcopy:\n dict1 = copyModule.deepcopy(dict1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L35_C8", "label": "dict1 = deepcopy()", "type": "assigned_variable", "loc": [35, 35], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L34_C4", "vector": [14, 3, 0.1207, 0.0034, 3, 0.76, 0.0, 566, 3, 1, 0, 0, 44, 10, 1], "semantic": {"name": "dict1", "arg_names": [], "import_names": [], "rhs_call_name": "deepcopy", "annotation": ""}, "snippet": " dict1 = copyModule.deepcopy(dict1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L37_C4", "label": "for key, val", "type": "for", "loc": [37, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L25_C0", "vector": [6, 1, 0.1345, 0.0172, 1, 0.52, 0.6667, 372, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "key, val", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for key, val in dict2.iteritems():\n if key in dict1 and isinstance(val, dict) and isinstance(dict1[key], dict):\n dict1[key] = mergeNestedDictionaries(dict1[key], val)\n else:\n dict1[key] = val"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L38_C8", "label": "if", "type": "if", "loc": [38, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L37_C4", "vector": [4, 2, 0.1362, 0.0138, 2, 0.64, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if key in dict1 and isinstance(val, dict) and isinstance(dict1[key], dict):\n dict1[key] = mergeNestedDictionaries(dict1[key], val)\n else:\n dict1[key] = val"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L39_C12", "label": " = mergeNestedDictionaries()", "type": "assigned_variable", "loc": [39, 39], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L38_C8", "vector": [14, 3, 0.1345, 0.0034, 3, 0.84, 0.0, 0, 3, 2, 0, 0, 645, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "mergeNestedDictionaries", "annotation": ""}, "snippet": " dict1[key] = mergeNestedDictionaries(dict1[key], val)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L41_C12", "label": "assign", "type": "assigned_variable", "loc": [41, 41], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L38_C8", "vector": [14, 3, 0.1414, 0.0034, 3, 0.84, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " dict1[key] = val"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L42_C4", "label": "return", "type": "return", "loc": [42, 42], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L25_C0", "vector": [13, 1, 0.1448, 0.0034, 1, 0.52, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return dict1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L44_C0", "label": "stringIsNumber", "type": "function", "loc": [44, 59], "level": 0, "parent": null, "vector": [2, 0, 0.1776, 0.0552, 0, 0.66, 0.7273, 569, 0, 1, 1, 0, 0, 0, 7], "semantic": {"name": "stringIsNumber", "arg_names": ["S"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def stringIsNumber(S):\n \"\"\"Return True if theString represents a Python number, False otherwise.\n This also works for complex numbers and numbers with +/- in front.\"\"\"\n\n S = S.strip()\n \n if S[0] in '-+' and len(S) > 1:\n S = S[1:].strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L45_C4", "label": "expression", "type": "expression", "loc": [45, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L44_C0", "vector": [8, 1, 0.1569, 0.0069, 1, 0.41, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Return True if theString represents a Python number, False otherwise.\n This also works for complex numbers and numbers with +/- in front.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L48_C4", "label": "S = strip()", "type": "assigned_variable", "loc": [48, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L44_C0", "vector": [14, 1, 0.1655, 0.0034, 1, 0.41, 0.2, 514, 3, 0, 0, 0, 973, 10, 1], "semantic": {"name": "S", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " S = S.strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L50_C4", "label": "if", "type": "if", "loc": [50, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L44_C0", "vector": [4, 1, 0.1741, 0.0069, 1, 0.41, 0.4, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if S[0] in '-+' and len(S) > 1:\n S = S[1:].strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L51_C8", "label": "S = strip()", "type": "assigned_variable", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L50_C4", "vector": [14, 2, 0.1759, 0.0034, 2, 0.8, 0.0, 514, 3, 0, 0, 0, 973, 10, 1], "semantic": {"name": "S", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " S = S[1:].strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L53_C4", "label": "match = match()", "type": "assigned_variable", "loc": [53, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L44_C0", "vector": [14, 1, 0.1828, 0.0034, 1, 0.41, 0.6, 36, 3, 1, 0, 0, 36, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " match = complexNumberRE.match(S)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L54_C4", "label": "if", "type": "if", "loc": [54, 55], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L44_C0", "vector": [4, 1, 0.1879, 0.0069, 1, 0.41, 0.8, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not match:\n match = numberRE.match(S)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L55_C8", "label": "match = match()", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L54_C4", "vector": [14, 2, 0.1897, 0.0034, 2, 0.29, 0.0, 36, 3, 1, 0, 0, 36, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " match = numberRE.match(S)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L56_C4", "label": "if", "type": "if", "loc": [56, 59], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L44_C0", "vector": [4, 1, 0.1983, 0.0138, 1, 0.41, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not match or (match.end() != len(S)):\n return False\n else:\n return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L57_C8", "label": "return", "type": "return", "loc": [57, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L56_C4", "vector": [13, 2, 0.1966, 0.0034, 2, 0.63, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L59_C8", "label": "return", "type": "return", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L56_C4", "vector": [13, 2, 0.2034, 0.0034, 2, 0.63, 1.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L61_C0", "label": "convStringToNum", "type": "function", "loc": [61, 66], "level": 0, "parent": null, "vector": [2, 0, 0.219, 0.0207, 0, 0.66, 0.7727, 582, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "convStringToNum", "arg_names": ["theString"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def convStringToNum(theString):\n \"\"\"Convert a string representation of a Python number to the Python version\"\"\"\n \n if not stringIsNumber(theString):\n raise Error(theString + ' cannot be converted to a Python number')\n return eval(theString, {}, {})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L62_C4", "label": "expression", "type": "expression", "loc": [62, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L61_C0", "vector": [8, 1, 0.2138, 0.0034, 1, 0.42, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Convert a string representation of a Python number to the Python version\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L64_C4", "label": "if", "type": "if", "loc": [64, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L61_C0", "vector": [4, 1, 0.2224, 0.0069, 1, 0.42, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not stringIsNumber(theString):\n raise Error(theString + ' cannot be converted to a Python number')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L66_C4", "label": "return", "type": "return", "loc": [66, 66], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L61_C0", "vector": [13, 1, 0.2276, 0.0034, 1, 0.42, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return eval(theString, {}, {})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L69_C0", "label": "Error", "type": "class", "loc": [69, 70], "level": 0, "parent": null, "vector": [3, 0, 0.2397, 0.0069, 0, 0.66, 0.8182, 529, 0, 0, 0, 0, 645, 0, 0], "semantic": {"name": "Error", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Error(Exception):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L72_C0", "label": "NoDefault", "type": "class", "loc": [72, 73], "level": 0, "parent": null, "vector": [3, 0, 0.25, 0.0069, 0, 0.66, 0.8636, 72, 0, 0, 0, 0, 186, 0, 0], "semantic": {"name": "NoDefault", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class NoDefault(object):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L75_C0", "label": "ConfigParserCaseSensitive", "type": "class", "loc": [75, 80], "level": 0, "parent": null, "vector": [3, 0, 0.2672, 0.0207, 0, 0.66, 0.9091, 828, 0, 1, 0, 0, 272, 0, 0], "semantic": {"name": "ConfigParserCaseSensitive", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ConfigParserCaseSensitive(ConfigParser):\n \"\"\"A case sensitive version of the standard Python ConfigParser.\"\"\"\n \n def optionxform(self, optionstr):\n \"\"\"Don't change the case as is done in the default implemenation.\"\"\"\n return optionstr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L76_C4", "label": "expression", "type": "expression", "loc": [76, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L75_C0", "vector": [8, 1, 0.2621, 0.0034, 1, 0.88, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"A case sensitive version of the standard Python ConfigParser.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L78_C4", "label": "optionxform", "type": "function", "loc": [78, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L75_C0", "vector": [2, 1, 0.2724, 0.0103, 1, 0.88, 1.0, 489, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "optionxform", "arg_names": ["self", "optionstr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def optionxform(self, optionstr):\n \"\"\"Don't change the case as is done in the default implemenation.\"\"\"\n return optionstr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L79_C8", "label": "expression", "type": "expression", "loc": [79, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L78_C4", "vector": [8, 2, 0.2724, 0.0034, 2, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Don't change the case as is done in the default implemenation.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L80_C8", "label": "return", "type": "return", "loc": [80, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L78_C4", "vector": [13, 2, 0.2759, 0.0034, 2, 0.66, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return optionstr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L82_C0", "label": "_SettingsCollector", "type": "class", "loc": [82, 193], "level": 0, "parent": null, "vector": [3, 0, 0.4741, 0.3862, 0, 0.66, 0.9545, 865, 0, 3, 0, 0, 186, 0, 36], "semantic": {"name": "_SettingsCollector", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class _SettingsCollector(object):\n \"\"\"An abstract base class that provides the methods SettingsManager uses to\n collect settings from config files and strings.\n\n This class only collects settings it doesn't modify the _settings dictionary\n of SettingsManager instances in any way.\n \"\"\"\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L83_C4", "label": "expression", "type": "expression", "loc": [83, 88], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L82_C0", "vector": [8, 1, 0.2948, 0.0207, 1, 0.48, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"An abstract base class that provides the methods SettingsManager uses to\n collect settings from config files and strings.\n\n This class only collects settings it doesn't modify the _settings dictionary\n of SettingsManager instances in any way.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L90_C4", "label": "_ConfigParserClass =", "type": "assigned_variable", "loc": [90, 90], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L82_C0", "vector": [14, 1, 0.3103, 0.0034, 1, 0.48, 0.25, 201, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_ConfigParserClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _ConfigParserClass = ConfigParserCaseSensitive "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L92_C4", "label": "readSettingsFromModule", "type": "function", "loc": [92, 102], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L82_C0", "vector": [2, 1, 0.3345, 0.0379, 1, 0.48, 0.5, 760, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "readSettingsFromModule", "arg_names": ["self", "mod", "ignoreUnderscored"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def readSettingsFromModule(self, mod, ignoreUnderscored=True):\n \"\"\"Returns all settings from a Python module.\n \"\"\"\n S = {}\n attrs = vars(mod)\n for k, v in attrs.iteritems():\n if (ignoreUnderscored and k.startswith('_')):\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L93_C8", "label": "expression", "type": "expression", "loc": [93, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L92_C4", "vector": [8, 2, 0.3224, 0.0069, 2, 0.5, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Returns all settings from a Python module.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L95_C8", "label": "S =", "type": "assigned_variable", "loc": [95, 95], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L92_C4", "vector": [14, 2, 0.3276, 0.0034, 2, 0.5, 0.25, 514, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "S", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " S = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L96_C8", "label": "attrs = vars()", "type": "assigned_variable", "loc": [96, 96], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L92_C4", "vector": [14, 2, 0.331, 0.0034, 2, 0.5, 0.5, 251, 3, 1, 0, 0, 302, 10, 1], "semantic": {"name": "attrs", "arg_names": [], "import_names": [], "rhs_call_name": "vars", "annotation": ""}, "snippet": " attrs = vars(mod)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L97_C8", "label": "for k, v", "type": "for", "loc": [97, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L92_C4", "vector": [6, 2, 0.3414, 0.0172, 2, 0.5, 0.75, 867, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "k, v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for k, v in attrs.iteritems():\n if (ignoreUnderscored and k.startswith('_')):\n continue\n else:\n S[k] = v"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L98_C12", "label": "if", "type": "if", "loc": [98, 101], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L97_C8", "vector": [4, 3, 0.3431, 0.0138, 3, 0.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (ignoreUnderscored and k.startswith('_')):\n continue\n else:\n S[k] = v"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L101_C16", "label": "assign", "type": "assigned_variable", "loc": [101, 101], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L98_C12", "vector": [14, 4, 0.3483, 0.0034, 4, 0.38, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " S[k] = v"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L102_C8", "label": "return", "type": "return", "loc": [102, 102], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L92_C4", "vector": [13, 2, 0.3517, 0.0034, 2, 0.5, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return S"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L104_C4", "label": "readSettingsFromPySrcStr", "type": "function", "loc": [104, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L82_C0", "vector": [2, 1, 0.3776, 0.0414, 1, 0.48, 0.75, 91, 0, 2, 1, 0, 0, 0, 4], "semantic": {"name": "readSettingsFromPySrcStr", "arg_names": ["self", "theString"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def readSettingsFromPySrcStr(self, theString):\n \"\"\"Return a dictionary of the settings in a Python src string.\"\"\"\n\n globalsDict = {'True': (1==1),\n 'False': (0==1),\n }\n newSettings = {'self':self}\n exec((theString+os.linesep), globalsDict, newSettings) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L105_C8", "label": "expression", "type": "expression", "loc": [105, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L104_C4", "vector": [8, 2, 0.3621, 0.0034, 2, 0.42, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Return a dictionary of the settings in a Python src string.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L107_C8", "label": "globalsDict =", "type": "assigned_variable", "loc": [107, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L104_C4", "vector": [14, 2, 0.3724, 0.0103, 2, 0.42, 0.1667, 509, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "globalsDict", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " globalsDict = {'True': (1==1),\n 'False': (0==1),\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L110_C8", "label": "newSettings =", "type": "assigned_variable", "loc": [110, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L104_C4", "vector": [14, 2, 0.3793, 0.0034, 2, 0.42, 0.3333, 177, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "newSettings", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " newSettings = {'self':self}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L111_C8", "label": "exec()", "type": "expression", "loc": [111, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L104_C4", "vector": [8, 2, 0.3828, 0.0034, 2, 0.42, 0.5, 272, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "exec", "arg_names": [], "import_names": [], "rhs_call_name": "exec", "annotation": ""}, "snippet": " exec((theString+os.linesep), globalsDict, newSettings) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L113_C8", "label": "module = module()", "type": "assigned_variable", "loc": [113, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L104_C4", "vector": [14, 2, 0.3897, 0.0034, 2, 0.42, 0.6667, 98, 3, 1, 0, 0, 98, 10, 1], "semantic": {"name": "module", "arg_names": [], "import_names": [], "rhs_call_name": "module", "annotation": ""}, "snippet": " module = new.module('temp_settings_module')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L114_C8", "label": "update()", "type": "expression", "loc": [114, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L104_C4", "vector": [8, 2, 0.3931, 0.0034, 2, 0.42, 0.8333, 637, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": " module.__dict__.update(newSettings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L115_C8", "label": "return", "type": "return", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L104_C4", "vector": [13, 2, 0.3966, 0.0034, 2, 0.42, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.readSettingsFromModule(module)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "label": "readSettingsFromConfigFileObj", "type": "function", "loc": [117, 193], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L82_C0", "vector": [2, 1, 0.5345, 0.2655, 1, 0.48, 1.0, 190, 0, 3, 1, 0, 0, 0, 29], "semantic": {"name": "readSettingsFromConfigFileObj", "arg_names": ["self", "inFile", "convert"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def readSettingsFromConfigFileObj(self, inFile, convert=True):\n \"\"\"Return the settings from a config file that uses the syntax accepted by\n Python's standard ConfigParser module (like Windows .ini files).\n\n NOTE:\n this method maintains case unlike the ConfigParser module, unless this\n class was initialized with the 'caseSensitive' keyword set to False.\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L118_C8", "label": "expression", "type": "expression", "loc": [118, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "vector": [8, 2, 0.45, 0.0897, 2, 0.54, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Return the settings from a config file that uses the syntax accepted by\n Python's standard ConfigParser module (like Windows .ini files).\n\n NOTE:\n this method maintains case unlike the ConfigParser module, unless this\n class was initialized with the 'caseSensitive' keyword set to False.\n\n All setting values are initially parsed as strings. However, If the"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L145_C8", "label": "p = _ConfigParserClass()", "type": "assigned_variable", "loc": [145, 145], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "vector": [14, 2, 0.5, 0.0034, 2, 0.54, 0.1111, 491, 3, 0, 0, 0, 201, 10, 1], "semantic": {"name": "p", "arg_names": [], "import_names": [], "rhs_call_name": "_ConfigParserClass", "annotation": ""}, "snippet": " p = self._ConfigParserClass()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L146_C8", "label": "readfp()", "type": "expression", "loc": [146, 146], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "vector": [8, 2, 0.5034, 0.0034, 2, 0.54, 0.2222, 297, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "readfp", "arg_names": [], "import_names": [], "rhs_call_name": "readfp", "annotation": ""}, "snippet": " p.readfp(inFile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L147_C8", "label": "sects = sections()", "type": "assigned_variable", "loc": [147, 147], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "vector": [14, 2, 0.5069, 0.0034, 2, 0.54, 0.3333, 277, 3, 0, 0, 0, 190, 10, 1], "semantic": {"name": "sects", "arg_names": [], "import_names": [], "rhs_call_name": "sections", "annotation": ""}, "snippet": " sects = p.sections()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L148_C8", "label": "newSettings =", "type": "assigned_variable", "loc": [148, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "vector": [14, 2, 0.5103, 0.0034, 2, 0.54, 0.4444, 177, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "newSettings", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " newSettings = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L150_C8", "label": "sects = sections()", "type": "assigned_variable", "loc": [150, 150], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "vector": [14, 2, 0.5172, 0.0034, 2, 0.54, 0.5556, 277, 3, 0, 0, 0, 190, 10, 1], "semantic": {"name": "sects", "arg_names": [], "import_names": [], "rhs_call_name": "sections", "annotation": ""}, "snippet": " sects = p.sections()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L151_C8", "label": "newSettings =", "type": "assigned_variable", "loc": [151, 151], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "vector": [14, 2, 0.5207, 0.0034, 2, 0.54, 0.6667, 177, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "newSettings", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " newSettings = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L153_C8", "label": "for s", "type": "for", "loc": [153, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "vector": [6, 2, 0.5345, 0.0172, 2, 0.54, 0.7778, 553, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for s in sects:\n newSettings[s] = {}\n for o in p.options(s):\n if o != '__name__':\n newSettings[s][o] = p.get(s, o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L154_C12", "label": "assign", "type": "assigned_variable", "loc": [154, 154], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L153_C8", "vector": [14, 3, 0.531, 0.0034, 3, 0.62, 0.0, 0, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " newSettings[s] = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L155_C12", "label": "for o", "type": "for", "loc": [155, 157], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L153_C8", "vector": [6, 3, 0.5379, 0.0103, 3, 0.62, 1.0, 926, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "o", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for o in p.options(s):\n if o != '__name__':\n newSettings[s][o] = p.get(s, o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L156_C16", "label": "if", "type": "if", "loc": [156, 157], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L155_C12", "vector": [4, 4, 0.5397, 0.0069, 4, 0.47, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if o != '__name__':\n newSettings[s][o] = p.get(s, o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L157_C20", "label": " = get()", "type": "assigned_variable", "loc": [157, 157], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L156_C16", "vector": [14, 5, 0.5414, 0.0034, 5, 0.17, 0.0, 0, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " newSettings[s][o] = p.get(s, o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L162_C8", "label": "for sect, subDict", "type": "for", "loc": [162, 191], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "vector": [6, 2, 0.6086, 0.1034, 2, 0.54, 0.8889, 231, 3, 0, 0, 0, 0, 0, 23], "semantic": {"name": "sect, subDict", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for sect, subDict in newSettings.items():\n for key, val in subDict.items():\n if convert:\n if val.lower().startswith('python:'):\n subDict[key] = eval(val[7:], {}, {})\n if val.lower() == 'none':\n subDict[key] = None\n if val.lower() == 'true':"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L163_C12", "label": "for key, val", "type": "for", "loc": [163, 187], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L162_C8", "vector": [6, 3, 0.6034, 0.0862, 3, 0.49, 0.0, 372, 3, 0, 0, 0, 0, 0, 20], "semantic": {"name": "key, val", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for key, val in subDict.items():\n if convert:\n if val.lower().startswith('python:'):\n subDict[key] = eval(val[7:], {}, {})\n if val.lower() == 'none':\n subDict[key] = None\n if val.lower() == 'true':\n subDict[key] = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L164_C16", "label": "if", "type": "if", "loc": [164, 174], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L163_C12", "vector": [4, 4, 0.5828, 0.0379, 4, 0.03, 0.0, 0, 2, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if convert:\n if val.lower().startswith('python:'):\n subDict[key] = eval(val[7:], {}, {})\n if val.lower() == 'none':\n subDict[key] = None\n if val.lower() == 'true':\n subDict[key] = True\n if val.lower() == 'false':"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L165_C20", "label": "if", "type": "if", "loc": [165, 166], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L164_C16", "vector": [4, 5, 0.5707, 0.0069, 5, 0.56, 0.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if val.lower().startswith('python:'):\n subDict[key] = eval(val[7:], {}, {})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L166_C24", "label": " = eval()", "type": "assigned_variable", "loc": [166, 166], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L165_C20", "vector": [14, 6, 0.5724, 0.0034, 6, 0.14, 0.0, 0, 3, 3, 0, 0, 776, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "eval", "annotation": ""}, "snippet": " subDict[key] = eval(val[7:], {}, {})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L167_C20", "label": "if", "type": "if", "loc": [167, 168], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L164_C16", "vector": [4, 5, 0.5776, 0.0069, 5, 0.56, 0.25, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if val.lower() == 'none':\n subDict[key] = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L168_C24", "label": "assign", "type": "assigned_variable", "loc": [168, 168], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L167_C20", "vector": [14, 6, 0.5793, 0.0034, 6, 0.32, 0.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " subDict[key] = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L169_C20", "label": "if", "type": "if", "loc": [169, 170], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L164_C16", "vector": [4, 5, 0.5845, 0.0069, 5, 0.56, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if val.lower() == 'true':\n subDict[key] = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L170_C24", "label": "assign", "type": "assigned_variable", "loc": [170, 170], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L169_C20", "vector": [14, 6, 0.5862, 0.0034, 6, 0.34, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " subDict[key] = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L171_C20", "label": "if", "type": "if", "loc": [171, 172], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L164_C16", "vector": [4, 5, 0.5914, 0.0069, 5, 0.56, 0.75, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if val.lower() == 'false':\n subDict[key] = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L172_C24", "label": "assign", "type": "assigned_variable", "loc": [172, 172], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L171_C20", "vector": [14, 6, 0.5931, 0.0034, 6, 0.02, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " subDict[key] = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L173_C20", "label": "if", "type": "if", "loc": [173, 174], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L164_C16", "vector": [4, 5, 0.5983, 0.0069, 5, 0.56, 1.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if stringIsNumber(val):\n subDict[key] = convStringToNum(val)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L174_C24", "label": " = convStringToNum()", "type": "assigned_variable", "loc": [174, 174], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L173_C20", "vector": [14, 6, 0.6, 0.0034, 6, 0.51, 0.0, 0, 3, 1, 0, 0, 582, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "convStringToNum", "annotation": ""}, "snippet": " subDict[key] = convStringToNum(val)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L177_C16", "label": "if", "type": "if", "loc": [177, 187], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L163_C12", "vector": [4, 4, 0.6276, 0.0379, 4, 0.03, 1.0, 0, 0, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if key.lower() == 'importsettings':\n if val.find(';') < 0:\n importedSettings = self.readSettingsFromPySrcFile(val)\n else:\n path = val.split(';')[0]\n rest = ''.join(val.split(';')[1:]).strip()\n parentDict = self.readSettingsFromPySrcFile(path)\n importedSettings = eval('parentDict[\"' + rest + '\"]')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L178_C20", "label": "if", "type": "if", "loc": [178, 184], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L177_C16", "vector": [4, 5, 0.6241, 0.0241, 5, 0.21, 0.0, 0, 0, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if val.find(';') < 0:\n importedSettings = self.readSettingsFromPySrcFile(val)\n else:\n path = val.split(';')[0]\n rest = ''.join(val.split(';')[1:]).strip()\n parentDict = self.readSettingsFromPySrcFile(path)\n importedSettings = eval('parentDict[\"' + rest + '\"]')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L179_C24", "label": "importedSettings = readSettingsFromPySrcFile()", "type": "assigned_variable", "loc": [179, 179], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L178_C20", "vector": [14, 6, 0.6172, 0.0034, 6, 0.6, 0.0, 949, 3, 1, 0, 0, 414, 10, 1], "semantic": {"name": "importedSettings", "arg_names": [], "import_names": [], "rhs_call_name": "readSettingsFromPySrcFile", "annotation": ""}, "snippet": " importedSettings = self.readSettingsFromPySrcFile(val)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L181_C24", "label": "path =", "type": "assigned_variable", "loc": [181, 181], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L178_C20", "vector": [14, 6, 0.6241, 0.0034, 6, 0.6, 0.25, 358, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = val.split(';')[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L182_C24", "label": "rest = strip()", "type": "assigned_variable", "loc": [182, 182], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L178_C20", "vector": [14, 6, 0.6276, 0.0034, 6, 0.6, 0.5, 788, 3, 0, 0, 0, 973, 10, 3], "semantic": {"name": "rest", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " rest = ''.join(val.split(';')[1:]).strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L183_C24", "label": "parentDict = readSettingsFromPySrcFile()", "type": "assigned_variable", "loc": [183, 183], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L178_C20", "vector": [14, 6, 0.631, 0.0034, 6, 0.6, 0.75, 904, 3, 1, 0, 0, 414, 10, 1], "semantic": {"name": "parentDict", "arg_names": [], "import_names": [], "rhs_call_name": "readSettingsFromPySrcFile", "annotation": ""}, "snippet": " parentDict = self.readSettingsFromPySrcFile(path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L184_C24", "label": "importedSettings = eval()", "type": "assigned_variable", "loc": [184, 184], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L178_C20", "vector": [14, 6, 0.6345, 0.0034, 6, 0.6, 1.0, 949, 3, 1, 0, 0, 776, 10, 1], "semantic": {"name": "importedSettings", "arg_names": [], "import_names": [], "rhs_call_name": "eval", "annotation": ""}, "snippet": " importedSettings = eval('parentDict[\"' + rest + '\"]')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L186_C20", "label": "update()", "type": "expression", "loc": [186, 187], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L177_C16", "vector": [8, 5, 0.6431, 0.0069, 5, 0.21, 1.0, 637, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": " subDict.update(mergeNestedDictionaries(subDict,\n importedSettings))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L189_C12", "label": "if", "type": "if", "loc": [189, 191], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L162_C8", "vector": [4, 3, 0.6552, 0.0103, 3, 0.49, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if sect.lower() == 'globals':\n newSettings.update(newSettings[sect])\n del newSettings[sect]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L190_C16", "label": "update()", "type": "expression", "loc": [190, 190], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L189_C12", "vector": [8, 4, 0.6552, 0.0034, 4, 0.73, 0.0, 637, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": " newSettings.update(newSettings[sect])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L193_C8", "label": "return", "type": "return", "loc": [193, 193], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "vector": [13, 2, 0.6655, 0.0034, 2, 0.54, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return newSettings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "label": "SettingsManager", "type": "class", "loc": [196, 289], "level": 0, "parent": null, "vector": [3, 0, 0.8362, 0.3241, 0, 0.66, 1.0, 890, 0, 13, 0, 0, 865, 0, 18], "semantic": {"name": "SettingsManager", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class SettingsManager(_SettingsCollector):\n \"\"\"A mixin class that provides facilities for managing application settings.\n \n SettingsManager is designed to work well with nested settings dictionaries\n of any depth.\n \"\"\"\n\n def __init__(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L197_C4", "label": "expression", "type": "expression", "loc": [197, 201], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "vector": [8, 1, 0.6862, 0.0172, 1, 0.64, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"A mixin class that provides facilities for managing application settings.\n \n SettingsManager is designed to work well with nested settings dictionaries\n of any depth.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L203_C4", "label": "__init__", "type": "function", "loc": [203, 206], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "vector": [2, 1, 0.7052, 0.0138, 1, 0.64, 0.0769, 555, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "__init__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self):\n super(SettingsManager, self).__init__()\n self._settings = {}\n self._initializeSettings()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L204_C8", "label": "__init__()", "type": "expression", "loc": [204, 204], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L203_C4", "vector": [8, 2, 0.7034, 0.0034, 2, 0.34, 0.0, 555, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(SettingsManager, self).__init__()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L205_C8", "label": "self._settings =", "type": "assigned_variable", "loc": [205, 205], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L203_C4", "vector": [14, 2, 0.7069, 0.0034, 2, 0.34, 0.5, 417, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._settings", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._settings = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L206_C8", "label": "_initializeSettings()", "type": "expression", "loc": [206, 206], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L203_C4", "vector": [8, 2, 0.7103, 0.0034, 2, 0.34, 1.0, 393, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_initializeSettings", "arg_names": [], "import_names": [], "rhs_call_name": "_initializeSettings", "annotation": ""}, "snippet": " self._initializeSettings()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L208_C4", "label": "_defaultSettings", "type": "function", "loc": [208, 209], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "vector": [2, 1, 0.719, 0.0069, 1, 0.64, 0.1538, 961, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "_defaultSettings", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _defaultSettings(self):\n return {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L209_C8", "label": "return", "type": "return", "loc": [209, 209], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L208_C4", "vector": [13, 2, 0.7207, 0.0034, 2, 0.39, 0.0, 0, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L211_C4", "label": "_initializeSettings", "type": "function", "loc": [211, 219], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "vector": [2, 1, 0.7414, 0.031, 1, 0.64, 0.2308, 393, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "_initializeSettings", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _initializeSettings(self):\n \"\"\"A hook that allows for complex setting initialization sequences that\n involve references to 'self' or other settings. For example:\n self._settings['myCalcVal'] = self._settings['someVal'] * 15 \n This method should be called by the class' __init__() method when needed. \n The dummy implementation should be reimplemented by subclasses.\n \"\"\"\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L212_C8", "label": "expression", "type": "expression", "loc": [212, 217], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L211_C4", "vector": [8, 2, 0.7397, 0.0207, 2, 0.93, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"A hook that allows for complex setting initialization sequences that\n involve references to 'self' or other settings. For example:\n self._settings['myCalcVal'] = self._settings['someVal'] * 15 \n This method should be called by the class' __init__() method when needed. \n The dummy implementation should be reimplemented by subclasses.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L223_C4", "label": "setting", "type": "function", "loc": [223, 229], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "vector": [2, 1, 0.7793, 0.0241, 1, 0.64, 0.3077, 368, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "setting", "arg_names": ["self", "name", "default"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setting(self, name, default=NoDefault):\n \"\"\"Get a setting from self._settings, with or without a default value.\"\"\"\n \n if default is NoDefault:\n return self._settings[name]\n else:\n return self._settings.get(name, default)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L224_C8", "label": "expression", "type": "expression", "loc": [224, 224], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L223_C4", "vector": [8, 2, 0.7724, 0.0034, 2, 0.24, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Get a setting from self._settings, with or without a default value.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L226_C8", "label": "if", "type": "if", "loc": [226, 229], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L223_C4", "vector": [4, 2, 0.7845, 0.0138, 2, 0.24, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if default is NoDefault:\n return self._settings[name]\n else:\n return self._settings.get(name, default)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L227_C12", "label": "return", "type": "return", "loc": [227, 227], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L226_C8", "vector": [13, 3, 0.7828, 0.0034, 3, 0.89, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._settings[name]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L229_C12", "label": "return", "type": "return", "loc": [229, 229], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L226_C8", "vector": [13, 3, 0.7897, 0.0034, 3, 0.89, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._settings.get(name, default)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L232_C4", "label": "hasSetting", "type": "function", "loc": [232, 234], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "vector": [2, 1, 0.8034, 0.0103, 1, 0.64, 0.3846, 657, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "hasSetting", "arg_names": ["self", "key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def hasSetting(self, key):\n \"\"\"True/False\"\"\"\n return key in self._settings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L233_C8", "label": "expression", "type": "expression", "loc": [233, 233], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L232_C4", "vector": [8, 2, 0.8034, 0.0034, 2, 0.36, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"True/False\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L234_C8", "label": "return", "type": "return", "loc": [234, 234], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L232_C4", "vector": [13, 2, 0.8069, 0.0034, 2, 0.36, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return key in self._settings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L236_C4", "label": "setSetting", "type": "function", "loc": [236, 238], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "vector": [2, 1, 0.8172, 0.0103, 1, 0.64, 0.4615, 856, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "setSetting", "arg_names": ["self", "name", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setSetting(self, name, value):\n \"\"\"Set a setting in self._settings.\"\"\"\n self._settings[name] = value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L237_C8", "label": "expression", "type": "expression", "loc": [237, 237], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L236_C4", "vector": [8, 2, 0.8172, 0.0034, 2, 0.22, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Set a setting in self._settings.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L238_C8", "label": "assign", "type": "assigned_variable", "loc": [238, 238], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L236_C4", "vector": [14, 2, 0.8207, 0.0034, 2, 0.22, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._settings[name] = value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L240_C4", "label": "settings", "type": "function", "loc": [240, 242], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "vector": [2, 1, 0.831, 0.0103, 1, 0.64, 0.5385, 168, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "settings", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def settings(self):\n \"\"\"Return a reference to the settings dictionary\"\"\"\n return self._settings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L241_C8", "label": "expression", "type": "expression", "loc": [241, 241], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L240_C4", "vector": [8, 2, 0.831, 0.0034, 2, 0.49, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Return a reference to the settings dictionary\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L242_C8", "label": "return", "type": "return", "loc": [242, 242], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L240_C4", "vector": [13, 2, 0.8345, 0.0034, 2, 0.49, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._settings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L244_C4", "label": "copySettings", "type": "function", "loc": [244, 246], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "vector": [2, 1, 0.8448, 0.0103, 1, 0.64, 0.6154, 146, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "copySettings", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def copySettings(self):\n \"\"\"Returns a shallow copy of the settings dictionary\"\"\"\n return copyModule.copy(self._settings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L245_C8", "label": "expression", "type": "expression", "loc": [245, 245], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L244_C4", "vector": [8, 2, 0.8448, 0.0034, 2, 0.26, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Returns a shallow copy of the settings dictionary\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L246_C8", "label": "return", "type": "return", "loc": [246, 246], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L244_C4", "vector": [13, 2, 0.8483, 0.0034, 2, 0.26, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return copyModule.copy(self._settings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L248_C4", "label": "deepcopySettings", "type": "function", "loc": [248, 250], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "vector": [2, 1, 0.8586, 0.0103, 1, 0.64, 0.6923, 737, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "deepcopySettings", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def deepcopySettings(self):\n \"\"\"Returns a deep copy of the settings dictionary\"\"\"\n return copyModule.deepcopy(self._settings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L249_C8", "label": "expression", "type": "expression", "loc": [249, 249], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L248_C4", "vector": [8, 2, 0.8586, 0.0034, 2, 0.84, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Returns a deep copy of the settings dictionary\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L250_C8", "label": "return", "type": "return", "loc": [250, 250], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L248_C4", "vector": [13, 2, 0.8621, 0.0034, 2, 0.84, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return copyModule.deepcopy(self._settings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L252_C4", "label": "updateSettings", "type": "function", "loc": [252, 258], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "vector": [2, 1, 0.8793, 0.0241, 1, 0.64, 0.7692, 649, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "updateSettings", "arg_names": ["self", "newSettings", "merge"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def updateSettings(self, newSettings, merge=True):\n \"\"\"Update the settings with a selective merge or a complete overwrite.\"\"\"\n \n if merge:\n mergeNestedDictionaries(self._settings, newSettings)\n else:\n self._settings.update(newSettings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L253_C8", "label": "expression", "type": "expression", "loc": [253, 253], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L252_C4", "vector": [8, 2, 0.8724, 0.0034, 2, 0.35, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Update the settings with a selective merge or a complete overwrite.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L255_C8", "label": "if", "type": "if", "loc": [255, 258], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L252_C4", "vector": [4, 2, 0.8845, 0.0138, 2, 0.35, 1.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if merge:\n mergeNestedDictionaries(self._settings, newSettings)\n else:\n self._settings.update(newSettings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L256_C12", "label": "mergeNestedDictionaries()", "type": "expression", "loc": [256, 256], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L255_C8", "vector": [8, 3, 0.8828, 0.0034, 3, 0.22, 0.0, 645, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "mergeNestedDictionaries", "arg_names": [], "import_names": [], "rhs_call_name": "mergeNestedDictionaries", "annotation": ""}, "snippet": " mergeNestedDictionaries(self._settings, newSettings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L258_C12", "label": "update()", "type": "expression", "loc": [258, 258], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L255_C8", "vector": [8, 3, 0.8897, 0.0034, 3, 0.22, 1.0, 637, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": " self._settings.update(newSettings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L263_C4", "label": "updateSettingsFromPySrcStr", "type": "function", "loc": [263, 268], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "vector": [2, 1, 0.9155, 0.0207, 1, 0.64, 0.8462, 919, 0, 3, 0, 0, 0, 0, 3], "semantic": {"name": "updateSettingsFromPySrcStr", "arg_names": ["self", "theString", "merge"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def updateSettingsFromPySrcStr(self, theString, merge=True):\n \"\"\"Update the settings from a code in a Python src string.\"\"\"\n \n newSettings = self.readSettingsFromPySrcStr(theString)\n self.updateSettings(newSettings,\n merge=newSettings.get('mergeSettings', merge) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L264_C8", "label": "expression", "type": "expression", "loc": [264, 264], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L263_C4", "vector": [8, 2, 0.9103, 0.0034, 2, 0.07, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Update the settings from a code in a Python src string.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L266_C8", "label": "newSettings = readSettingsFromPySrcStr()", "type": "assigned_variable", "loc": [266, 266], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L263_C4", "vector": [14, 2, 0.9172, 0.0034, 2, 0.07, 0.5, 177, 3, 1, 0, 0, 91, 10, 1], "semantic": {"name": "newSettings", "arg_names": [], "import_names": [], "rhs_call_name": "readSettingsFromPySrcStr", "annotation": ""}, "snippet": " newSettings = self.readSettingsFromPySrcStr(theString)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L267_C8", "label": "updateSettings()", "type": "expression", "loc": [267, 268], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L263_C4", "vector": [8, 2, 0.9224, 0.0069, 2, 0.07, 1.0, 649, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "updateSettings", "arg_names": [], "import_names": [], "rhs_call_name": "updateSettings", "annotation": ""}, "snippet": " self.updateSettings(newSettings,\n merge=newSettings.get('mergeSettings', merge) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L271_C4", "label": "updateSettingsFromConfigFileObj", "type": "function", "loc": [271, 279], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "vector": [2, 1, 0.9483, 0.031, 1, 0.64, 0.9231, 561, 0, 4, 0, 0, 0, 0, 3], "semantic": {"name": "updateSettingsFromConfigFileObj", "arg_names": ["self", "inFile", "convert", "merge"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def updateSettingsFromConfigFileObj(self, inFile, convert=True, merge=True):\n \"\"\"See the docstring for .updateSettingsFromConfigFile()\n\n The caller of this method is responsible for closing the inFile file\n object.\"\"\"\n\n newSettings = self.readSettingsFromConfigFileObj(inFile, convert=convert)\n self.updateSettings(newSettings,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L272_C8", "label": "expression", "type": "expression", "loc": [272, 275], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L271_C4", "vector": [8, 2, 0.9431, 0.0138, 2, 0.31, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"See the docstring for .updateSettingsFromConfigFile()\n\n The caller of this method is responsible for closing the inFile file\n object.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L277_C8", "label": "newSettings = readSettingsFromConfigFileObj()", "type": "assigned_variable", "loc": [277, 277], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L271_C4", "vector": [14, 2, 0.9552, 0.0034, 2, 0.31, 0.5, 177, 3, 2, 0, 0, 190, 10, 1], "semantic": {"name": "newSettings", "arg_names": [], "import_names": [], "rhs_call_name": "readSettingsFromConfigFileObj", "annotation": ""}, "snippet": " newSettings = self.readSettingsFromConfigFileObj(inFile, convert=convert)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L278_C8", "label": "updateSettings()", "type": "expression", "loc": [278, 279], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L271_C4", "vector": [8, 2, 0.9603, 0.0069, 2, 0.31, 1.0, 649, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "updateSettings", "arg_names": [], "import_names": [], "rhs_call_name": "updateSettings", "annotation": ""}, "snippet": " self.updateSettings(newSettings,\n merge=newSettings.get('mergeSettings', merge))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L281_C4", "label": "updateSettingsFromConfigStr", "type": "function", "loc": [281, 289], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "vector": [2, 1, 0.9828, 0.031, 1, 0.64, 1.0, 84, 0, 4, 0, 0, 0, 0, 4], "semantic": {"name": "updateSettingsFromConfigStr", "arg_names": ["self", "configStr", "convert", "merge"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def updateSettingsFromConfigStr(self, configStr, convert=True, merge=True):\n \"\"\"See the docstring for .updateSettingsFromConfigFile()\n \"\"\"\n\n configStr = '[globals]\\n' + configStr\n inFile = StringIO(configStr)\n newSettings = self.readSettingsFromConfigFileObj(inFile, convert=convert)\n self.updateSettings(newSettings,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L282_C8", "label": "expression", "type": "expression", "loc": [282, 283], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L281_C4", "vector": [8, 2, 0.9741, 0.0069, 2, 0.1, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"See the docstring for .updateSettingsFromConfigFile()\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L285_C8", "label": "configStr =", "type": "assigned_variable", "loc": [285, 285], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L281_C4", "vector": [14, 2, 0.9828, 0.0034, 2, 0.1, 0.25, 804, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "configStr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " configStr = '[globals]\\n' + configStr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L286_C8", "label": "inFile = StringIO()", "type": "assigned_variable", "loc": [286, 286], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L281_C4", "vector": [14, 2, 0.9862, 0.0034, 2, 0.1, 0.5, 847, 3, 1, 0, 0, 609, 10, 1], "semantic": {"name": "inFile", "arg_names": [], "import_names": [], "rhs_call_name": "StringIO", "annotation": ""}, "snippet": " inFile = StringIO(configStr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L287_C8", "label": "newSettings = readSettingsFromConfigFileObj()", "type": "assigned_variable", "loc": [287, 287], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L281_C4", "vector": [14, 2, 0.9897, 0.0034, 2, 0.1, 0.75, 177, 3, 2, 0, 0, 190, 10, 1], "semantic": {"name": "newSettings", "arg_names": [], "import_names": [], "rhs_call_name": "readSettingsFromConfigFileObj", "annotation": ""}, "snippet": " newSettings = self.readSettingsFromConfigFileObj(inFile, convert=convert)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L288_C8", "label": "updateSettings()", "type": "expression", "loc": [288, 289], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L281_C4", "vector": [8, 2, 0.9948, 0.0069, 2, 0.1, 1.0, 649, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "updateSettings", "arg_names": [], "import_names": [], "rhs_call_name": "updateSettings", "annotation": ""}, "snippet": " self.updateSettings(newSettings,\n merge=newSettings.get('mergeSettings', merge))"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L34_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L35_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L38_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L39_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L38_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L41_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L57_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L61_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L61_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L64_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L61_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L66_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L75_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L75_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L78_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L78_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L79_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L78_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L90_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L92_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L92_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L93_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L92_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L95_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L92_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L92_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L97_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L98_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L98_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L101_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L92_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L102_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L104_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L104_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L105_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L104_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L104_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L110_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L104_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L104_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L113_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L104_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L104_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L118_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L145_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L146_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L148_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L150_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L151_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L153_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L153_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L154_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L153_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L155_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L155_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L156_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L156_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L157_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L162_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L162_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L163_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L163_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L164_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L164_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L165_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L165_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L166_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L164_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L167_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L167_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L168_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L164_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L169_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L169_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L170_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L164_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L171_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L171_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L172_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L164_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L173_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L173_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L174_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L163_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L177_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L177_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L178_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L178_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L179_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L178_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L181_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L178_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L182_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L178_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L183_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L178_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L184_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L177_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L186_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:For_L162_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L189_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L189_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L190_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L193_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L197_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L203_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L204_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L205_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L206_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L208_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L208_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L209_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L211_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L211_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L212_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L223_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L224_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L226_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L226_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L227_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L226_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L229_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L232_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L232_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L233_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L232_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L234_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L236_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L236_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L237_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L236_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L238_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L240_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L240_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L241_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L240_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L242_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L244_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L245_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L246_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L248_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L248_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L249_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L248_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Return_L250_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L252_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L252_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L253_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L252_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L255_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L255_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L256_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:If_L255_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L258_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L263_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L263_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L264_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L263_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L266_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L263_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L267_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L271_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L271_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L272_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L271_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L277_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L271_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L278_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:ClassDef_L196_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L281_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L281_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L282_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L281_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L285_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L281_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L286_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L281_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Assign_L287_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1511:FunctionDef_L281_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1511:Expr_L288_C8"}]
Version = '2.4.1' VersionTuple = (2, 4, 1, 'final', 0) MinCompatibleVersion = '2.0rc6' MinCompatibleVersionTuple = (2, 0, 0, 'candidate', 6) #### def convertVersionStringToTuple(s): versionNum = [0, 0, 0] releaseType = 'final' releaseTypeSubNum = 0 if s.find('a')!=-1: num, releaseTypeSubNum = s.split('a') releaseType = 'alpha' elif s.find('b')!=-1: num, releaseTypeSubNum = s.split('b') releaseType = 'beta' elif s.find('rc')!=-1: num, releaseTypeSubNum = s.split('rc') releaseType = 'candidate' else: num = s num = num.split('.') for i in range(len(num)): versionNum[i] = int(num[i]) if len(versionNum)<3: versionNum += [0] releaseTypeSubNum = int(releaseTypeSubNum) return tuple(versionNum+[releaseType, releaseTypeSubNum]) if __name__ == '__main__': c = convertVersionStringToTuple print(c('2.0a1')) print(c('2.0b1')) print(c('2.0rc1')) print(c('2.0')) print(c('2.0.2')) assert c('0.9.19b1') < c('0.9.19') assert c('0.9b1') < c('0.9.19') assert c('2.0a2') > c('2.0a1') assert c('2.0b1') > c('2.0a2') assert c('2.0b2') > c('2.0b1') assert c('2.0b2') == c('2.0b2') assert c('2.0rc1') > c('2.0b1') assert c('2.0rc2') > c('2.0rc1') assert c('2.0rc2') > c('2.0b1') assert c('2.0') > c('2.0a1') assert c('2.0') > c('2.0b1') assert c('2.0') > c('2.0rc1') assert c('2.0.1') > c('2.0') assert c('2.0rc1') > c('2.0b1')
ajibawa-2023/Python-Code-Large/train/row_1512
31
58
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L1_C0", "label": "Version =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0172, 0.0172, 0, 0.66, 0.0, 444, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "Version", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "Version = '2.4.1'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L2_C0", "label": "VersionTuple =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.0345, 0.0172, 0, 0.66, 0.2, 292, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "VersionTuple", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "VersionTuple = (2, 4, 1, 'final', 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L4_C0", "label": "MinCompatibleVersion =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.069, 0.0172, 0, 0.66, 0.4, 954, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MinCompatibleVersion", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MinCompatibleVersion = '2.0rc6'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L5_C0", "label": "MinCompatibleVersionTuple =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.0862, 0.0172, 0, 0.66, 0.6, 565, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "MinCompatibleVersionTuple", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MinCompatibleVersionTuple = (2, 0, 0, 'candidate', 6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "label": "convertVersionStringToTuple", "type": "function", "loc": [8, 30], "level": 0, "parent": null, "vector": [2, 0, 0.3276, 0.3966, 0, 0.66, 0.8, 182, 0, 1, 1, 0, 0, 0, 13], "semantic": {"name": "convertVersionStringToTuple", "arg_names": ["s"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def convertVersionStringToTuple(s):\n versionNum = [0, 0, 0]\n releaseType = 'final'\n releaseTypeSubNum = 0\n if s.find('a')!=-1:\n num, releaseTypeSubNum = s.split('a')\n releaseType = 'alpha'\n elif s.find('b')!=-1:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L9_C4", "label": "versionNum =", "type": "assigned_variable", "loc": [9, 9], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "vector": [14, 1, 0.1552, 0.0172, 1, 0.85, 0.0, 662, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "versionNum", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " versionNum = [0, 0, 0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L10_C4", "label": "releaseType =", "type": "assigned_variable", "loc": [10, 10], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "vector": [14, 1, 0.1724, 0.0172, 1, 0.85, 0.125, 495, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "releaseType", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " releaseType = 'final'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L11_C4", "label": "releaseTypeSubNum =", "type": "assigned_variable", "loc": [11, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "vector": [14, 1, 0.1897, 0.0172, 1, 0.85, 0.25, 574, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "releaseTypeSubNum", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " releaseTypeSubNum = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L12_C4", "label": "if", "type": "if", "loc": [12, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "vector": [4, 1, 0.2931, 0.1897, 1, 0.85, 0.375, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if s.find('a')!=-1:\n num, releaseTypeSubNum = s.split('a')\n releaseType = 'alpha'\n elif s.find('b')!=-1:\n num, releaseTypeSubNum = s.split('b')\n releaseType = 'beta'\n elif s.find('rc')!=-1:\n num, releaseTypeSubNum = s.split('rc')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L13_C8", "label": "num, releaseTypeSubNum = split()", "type": "assigned_variable", "loc": [13, 13], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L12_C4", "vector": [14, 2, 0.2241, 0.0172, 2, 0.04, 0.0, 828, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "num, releaseTypeSubNum", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " num, releaseTypeSubNum = s.split('a')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L14_C8", "label": "releaseType =", "type": "assigned_variable", "loc": [14, 14], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L12_C4", "vector": [14, 2, 0.2414, 0.0172, 2, 0.04, 0.5, 495, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "releaseType", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " releaseType = 'alpha'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L15_C4", "label": "if", "type": "if", "loc": [15, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L12_C4", "vector": [4, 2, 0.319, 0.1379, 2, 0.04, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif s.find('b')!=-1:\n num, releaseTypeSubNum = s.split('b')\n releaseType = 'beta'\n elif s.find('rc')!=-1:\n num, releaseTypeSubNum = s.split('rc')\n releaseType = 'candidate'\n else:\n num = s"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L16_C8", "label": "num, releaseTypeSubNum = split()", "type": "assigned_variable", "loc": [16, 16], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L15_C4", "vector": [14, 3, 0.2759, 0.0172, 3, 0.51, 0.0, 828, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "num, releaseTypeSubNum", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " num, releaseTypeSubNum = s.split('b')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L17_C8", "label": "releaseType =", "type": "assigned_variable", "loc": [17, 17], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L15_C4", "vector": [14, 3, 0.2931, 0.0172, 3, 0.51, 0.5, 495, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "releaseType", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " releaseType = 'beta'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L18_C4", "label": "if", "type": "if", "loc": [18, 22], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L15_C4", "vector": [4, 3, 0.3448, 0.0862, 3, 0.51, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif s.find('rc')!=-1:\n num, releaseTypeSubNum = s.split('rc')\n releaseType = 'candidate'\n else:\n num = s"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L19_C8", "label": "num, releaseTypeSubNum = split()", "type": "assigned_variable", "loc": [19, 19], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L18_C4", "vector": [14, 4, 0.3276, 0.0172, 4, 0.73, 0.0, 828, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "num, releaseTypeSubNum", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " num, releaseTypeSubNum = s.split('rc')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L20_C8", "label": "releaseType =", "type": "assigned_variable", "loc": [20, 20], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L18_C4", "vector": [14, 4, 0.3448, 0.0172, 4, 0.73, 0.5, 495, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "releaseType", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " releaseType = 'candidate'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L22_C8", "label": "num =", "type": "assigned_variable", "loc": [22, 22], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L18_C4", "vector": [14, 4, 0.3793, 0.0172, 4, 0.73, 1.0, 328, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "num", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " num = s"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L23_C4", "label": "num = split()", "type": "assigned_variable", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "vector": [14, 1, 0.3966, 0.0172, 1, 0.85, 0.5, 328, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "num", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " num = num.split('.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:For_L24_C4", "label": "for i", "type": "for", "loc": [24, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "vector": [6, 1, 0.4224, 0.0345, 1, 0.85, 0.625, 826, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(len(num)):\n versionNum[i] = int(num[i]) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L25_C8", "label": " = int()", "type": "assigned_variable", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:For_L24_C4", "vector": [14, 2, 0.431, 0.0172, 2, 0.93, 0.0, 0, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " versionNum[i] = int(num[i]) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L26_C4", "label": "if", "type": "if", "loc": [26, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "vector": [4, 1, 0.4569, 0.0345, 1, 0.85, 0.75, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(versionNum)<3:\n versionNum += [0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L28_C4", "label": "releaseTypeSubNum = int()", "type": "assigned_variable", "loc": [28, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "vector": [14, 1, 0.4828, 0.0172, 1, 0.85, 0.875, 574, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "releaseTypeSubNum", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " releaseTypeSubNum = int(releaseTypeSubNum)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Return_L30_C4", "label": "return", "type": "return", "loc": [30, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "vector": [13, 1, 0.5172, 0.0172, 1, 0.85, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return tuple(versionNum+[releaseType, releaseTypeSubNum])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L33_C0", "label": "if", "type": "if", "loc": [33, 58], "level": 0, "parent": null, "vector": [4, 0, 0.7845, 0.4483, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 38], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n c = convertVersionStringToTuple\n print(c('2.0a1'))\n print(c('2.0b1'))\n print(c('2.0rc1'))\n print(c('2.0'))\n print(c('2.0.2'))\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L34_C4", "label": "c =", "type": "assigned_variable", "loc": [34, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L33_C0", "vector": [14, 1, 0.5862, 0.0172, 1, 0.48, 0.0, 411, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " c = convertVersionStringToTuple"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Expr_L35_C4", "label": "print()", "type": "expression", "loc": [35, 35], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L33_C0", "vector": [8, 1, 0.6034, 0.0172, 1, 0.48, 0.2, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(c('2.0a1'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Expr_L36_C4", "label": "print()", "type": "expression", "loc": [36, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L33_C0", "vector": [8, 1, 0.6207, 0.0172, 1, 0.48, 0.4, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(c('2.0b1'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Expr_L37_C4", "label": "print()", "type": "expression", "loc": [37, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L33_C0", "vector": [8, 1, 0.6379, 0.0172, 1, 0.48, 0.6, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(c('2.0rc1'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Expr_L38_C4", "label": "print()", "type": "expression", "loc": [38, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L33_C0", "vector": [8, 1, 0.6552, 0.0172, 1, 0.48, 0.8, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(c('2.0'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1512:Expr_L39_C4", "label": "print()", "type": "expression", "loc": [39, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L33_C0", "vector": [8, 1, 0.6724, 0.0172, 1, 0.48, 1.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(c('2.0.2'))"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L13_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:For_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:For_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L25_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Return_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Expr_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Expr_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Expr_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1512:If_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1512:Expr_L39_C4"}]
''' Cheetah is an open source template engine and code generation tool. It can be used standalone or combined with other tools and frameworks. Web development is its principle use, but Cheetah is very flexible and is also being used to generate C++ game code, Java, sql, form emails and even Python code. Homepage http://www.cheetahtemplate.org/ Documentation http://cheetahtemplate.org/learn.html Mailing list cheetahtemplate-discuss@lists.sourceforge.net Subscribe at http://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss ''' from Version import *
ajibawa-2023/Python-Code-Large/train/row_1513
2
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1513:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 18], "level": 0, "parent": null, "vector": [8, 0, 0.475, 0.9, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nCheetah is an open source template engine and code generation tool.\n\nIt can be used standalone or combined with other tools and frameworks. Web\ndevelopment is its principle use, but Cheetah is very flexible and is also being\nused to generate C++ game code, Java, sql, form emails and even Python code.\n\nHomepage"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1513:ImportFrom_L20_C0", "label": "from Version import *", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 1.0, 0.05, 0, 0.66, 1.0, 444, 0, 1, 0, 0, 444, 0, 0], "semantic": {"name": "Version", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Version import *"}]
[]
import os.path import string l = ['_'] * 256 for c in string.digits + string.letters: l[ord(c)] = c _pathNameTransChars = string.join(l, '') del l, c def convertTmplPathToModuleName(tmplPath, _pathNameTransChars=_pathNameTransChars, splitdrive=os.path.splitdrive, translate=string.translate, ): return translate(splitdrive(tmplPath)[1], _pathNameTransChars)
ajibawa-2023/Python-Code-Large/train/row_1514
8
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1514:Import_L1_C0", "label": "os.path import os.path", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0667, 0, 0.66, 0.0, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os.path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1514:Import_L2_C0", "label": "string import string", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1333, 0.0667, 0, 0.66, 0.2, 890, 0, 1, 0, 0, 890, 0, 0], "semantic": {"name": "string", "arg_names": [], "import_names": ["string"], "rhs_call_name": "", "annotation": ""}, "snippet": "import string"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1514:Assign_L4_C0", "label": "l =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.2667, 0.0667, 0, 0.66, 0.4, 810, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "l", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "l = ['_'] * 256"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1514:For_L5_C0", "label": "for c", "type": "for", "loc": [5, 6], "level": 0, "parent": null, "vector": [6, 0, 0.3667, 0.1333, 0, 0.66, 0.6, 411, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for c in string.digits + string.letters:\n l[ord(c)] = c"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1514:Assign_L6_C4", "label": "assign", "type": "assigned_variable", "loc": [6, 6], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1514:For_L5_C0", "vector": [14, 1, 0.4, 0.0667, 1, 0.86, 0.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " l[ord(c)] = c"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1514:Assign_L7_C0", "label": "_pathNameTransChars = join()", "type": "assigned_variable", "loc": [7, 7], "level": 0, "parent": null, "vector": [14, 0, 0.4667, 0.0667, 0, 0.66, 0.8, 849, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "_pathNameTransChars", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": "_pathNameTransChars = string.join(l, '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1514:FunctionDef_L10_C0", "label": "convertTmplPathToModuleName", "type": "function", "loc": [10, 15], "level": 0, "parent": null, "vector": [2, 0, 0.8333, 0.4, 0, 0.66, 1.2, 802, 0, 4, 1, 0, 0, 0, 2], "semantic": {"name": "convertTmplPathToModuleName", "arg_names": ["tmplPath", "_pathNameTransChars", "splitdrive", "translate"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def convertTmplPathToModuleName(tmplPath,\n _pathNameTransChars=_pathNameTransChars,\n splitdrive=os.path.splitdrive,\n translate=string.translate,\n ):\n return translate(splitdrive(tmplPath)[1], _pathNameTransChars)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1514:Return_L15_C4", "label": "return", "type": "return", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1514:FunctionDef_L10_C0", "vector": [13, 1, 1.0, 0.0667, 1, 0.77, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return translate(splitdrive(tmplPath)[1], _pathNameTransChars)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1514:For_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1514:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1514:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1514:Return_L15_C4"}]
#!/usr/bin/env python import os import pprint try: from functools import reduce except ImportError: # Assume we have reduce pass from Cheetah import Parser from Cheetah import Compiler from Cheetah import Template class Analyzer(Parser.Parser): def __init__(self, *args, **kwargs): self.calls = {} super(Analyzer, self).__init__(*args, **kwargs) def eatDirective(self): directive = self.matchDirective() try: self.calls[directive] += 1 except KeyError: self.calls[directive] = 1 super(Analyzer, self).eatDirective() class AnalysisCompiler(Compiler.ModuleCompiler): parserClass = Analyzer def analyze(source): klass = Template.Template.compile(source, compilerClass=AnalysisCompiler) return klass._CHEETAH_compilerInstance._parser.calls def main_file(f): fd = open(f, 'r') try: print u'>>> Analyzing %s' % f calls = analyze(fd.read()) return calls finally: fd.close() def _find_templates(directory, suffix): for root, dirs, files in os.walk(directory): for f in files: if not f.endswith(suffix): continue yield root + os.path.sep + f def _analyze_templates(iterable): for template in iterable: yield main_file(template) def main_dir(opts): results = _analyze_templates(_find_templates(opts.dir, opts.suffix)) totals = {} for series in results: if not series: continue for k, v in series.iteritems(): try: totals[k] += v except KeyError: totals[k] = v return totals def main(): from optparse import OptionParser op = OptionParser() op.add_option('-f', '--file', dest='file', default=None, help='Specify a single file to analyze') op.add_option('-d', '--dir', dest='dir', default=None, help='Specify a directory of templates to analyze') op.add_option('--suffix', default='tmpl', dest='suffix', help='Specify a custom template file suffix for the -d option (default: "tmpl")') opts, args = op.parse_args() if not opts.file and not opts.dir: op.print_help() return results = None if opts.file: results = main_file(opts.file) if opts.dir: results = main_dir(opts) pprint.pprint(results) if __name__ == '__main__': main()
ajibawa-2023/Python-Code-Large/train/row_1516
63
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0306, 0.0102, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Import_L4_C0", "label": "pprint import pprint", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0408, 0.0102, 0, 0.66, 0.0714, 276, 0, 1, 0, 0, 276, 0, 0], "semantic": {"name": "pprint", "arg_names": [], "import_names": ["pprint"], "rhs_call_name": "", "annotation": ""}, "snippet": "import pprint"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L6_C0", "label": "try", "type": "try", "loc": [6, 10], "level": 0, "parent": null, "vector": [7, 0, 0.0816, 0.051, 0, 0.66, 0.1429, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n from functools import reduce\nexcept ImportError:\n # Assume we have reduce\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:ImportFrom_L7_C4", "label": "from functools import reduce", "type": "import", "loc": [7, 7], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L6_C0", "vector": [1, 1, 0.0714, 0.0102, 1, 0.66, 0.0, 711, 0, 1, 0, 0, 711, 0, 0], "semantic": {"name": "functools", "arg_names": [], "import_names": ["reduce"], "rhs_call_name": "", "annotation": ""}, "snippet": " from functools import reduce"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:ImportFrom_L12_C0", "label": "from Cheetah import Parser", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.1224, 0.0102, 0, 0.66, 0.2143, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "Cheetah", "arg_names": [], "import_names": ["Parser"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah import Parser"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:ImportFrom_L13_C0", "label": "from Cheetah import Compiler", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.1327, 0.0102, 0, 0.66, 0.2857, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "Cheetah", "arg_names": [], "import_names": ["Compiler"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah import Compiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:ImportFrom_L14_C0", "label": "from Cheetah import Template", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.0102, 0, 0.66, 0.3571, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "Cheetah", "arg_names": [], "import_names": ["Template"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah import Template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:ClassDef_L16_C0", "label": "Analyzer", "type": "class", "loc": [16, 27], "level": 0, "parent": null, "vector": [3, 0, 0.2194, 0.1224, 0, 0.66, 0.4286, 35, 0, 2, 0, 0, 431, 0, 5], "semantic": {"name": "Analyzer", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Analyzer(Parser.Parser):\n def __init__(self, *args, **kwargs):\n self.calls = {}\n super(Analyzer, self).__init__(*args, **kwargs)\n\n def eatDirective(self):\n directive = self.matchDirective()\n try:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L17_C4", "label": "__init__", "type": "function", "loc": [17, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:ClassDef_L16_C0", "vector": [2, 1, 0.1837, 0.0306, 1, 0.98, 0.0, 555, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, *args, **kwargs):\n self.calls = {}\n super(Analyzer, self).__init__(*args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L18_C8", "label": "self.calls =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L17_C4", "vector": [14, 2, 0.1837, 0.0102, 2, 0.08, 0.0, 391, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self.calls", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.calls = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L19_C8", "label": "__init__()", "type": "expression", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L17_C4", "vector": [8, 2, 0.1939, 0.0102, 2, 0.08, 1.0, 555, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(Analyzer, self).__init__(*args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L21_C4", "label": "eatDirective", "type": "function", "loc": [21, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:ClassDef_L16_C0", "vector": [2, 1, 0.2449, 0.0714, 1, 0.98, 1.0, 873, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "eatDirective", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatDirective(self):\n directive = self.matchDirective()\n try:\n self.calls[directive] += 1\n except KeyError:\n self.calls[directive] = 1\n super(Analyzer, self).eatDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L22_C8", "label": "directive = matchDirective()", "type": "assigned_variable", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L21_C4", "vector": [14, 2, 0.2245, 0.0102, 2, 0.28, 0.0, 677, 3, 0, 0, 0, 893, 10, 1], "semantic": {"name": "directive", "arg_names": [], "import_names": [], "rhs_call_name": "matchDirective", "annotation": ""}, "snippet": " directive = self.matchDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L23_C8", "label": "try", "type": "try", "loc": [23, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L21_C4", "vector": [7, 2, 0.25, 0.0408, 2, 0.28, 0.5, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n self.calls[directive] += 1\n except KeyError:\n self.calls[directive] = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L26_C12", "label": "assign", "type": "assigned_variable", "loc": [26, 26], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L23_C8", "vector": [14, 3, 0.2653, 0.0102, 3, 0.41, 0.0, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.calls[directive] = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L27_C8", "label": "eatDirective()", "type": "expression", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L21_C4", "vector": [8, 2, 0.2755, 0.0102, 2, 0.28, 1.0, 873, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "eatDirective", "arg_names": [], "import_names": [], "rhs_call_name": "eatDirective", "annotation": ""}, "snippet": " super(Analyzer, self).eatDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:ClassDef_L29_C0", "label": "AnalysisCompiler", "type": "class", "loc": [29, 30], "level": 0, "parent": null, "vector": [3, 0, 0.301, 0.0204, 0, 0.66, 0.5, 39, 0, 0, 0, 0, 987, 0, 0], "semantic": {"name": "AnalysisCompiler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class AnalysisCompiler(Compiler.ModuleCompiler):\n parserClass = Analyzer"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L30_C4", "label": "parserClass =", "type": "assigned_variable", "loc": [30, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:ClassDef_L29_C0", "vector": [14, 1, 0.3061, 0.0102, 1, 0.78, 0.0, 248, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "parserClass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parserClass = Analyzer"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L33_C0", "label": "analyze", "type": "function", "loc": [33, 35], "level": 0, "parent": null, "vector": [2, 0, 0.3469, 0.0306, 0, 0.66, 0.5714, 199, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "analyze", "arg_names": ["source"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def analyze(source):\n klass = Template.Template.compile(source, compilerClass=AnalysisCompiler)\n return klass._CHEETAH_compilerInstance._parser.calls"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L34_C4", "label": "klass = compile()", "type": "assigned_variable", "loc": [34, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L33_C0", "vector": [14, 1, 0.3469, 0.0102, 1, 0.15, 0.0, 35, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "klass", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " klass = Template.Template.compile(source, compilerClass=AnalysisCompiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Return_L35_C4", "label": "return", "type": "return", "loc": [35, 35], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L33_C0", "vector": [13, 1, 0.3571, 0.0102, 1, 0.15, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return klass._CHEETAH_compilerInstance._parser.calls"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L37_C0", "label": "main_file", "type": "function", "loc": [37, 44], "level": 0, "parent": null, "vector": [2, 0, 0.4133, 0.0816, 0, 0.66, 0.6429, 708, 0, 1, 1, 0, 0, 0, 5], "semantic": {"name": "main_file", "arg_names": ["f"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main_file(f):\n fd = open(f, 'r')\n try:\n print(u'>>> Analyzing %s' % f)\n calls = analyze(fd.read())\n return calls\n finally:\n fd.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L38_C4", "label": "fd = open()", "type": "assigned_variable", "loc": [38, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L37_C0", "vector": [14, 1, 0.3878, 0.0102, 1, 0.33, 0.0, 863, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "fd", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " fd = open(f, 'r')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L39_C4", "label": "try", "type": "try", "loc": [39, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L37_C0", "vector": [7, 1, 0.4235, 0.0612, 1, 0.33, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n print(u'>>> Analyzing %s' % f)\n calls = analyze(fd.read())\n return calls\n finally:\n fd.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L40_C8", "label": "print()", "type": "expression", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L39_C4", "vector": [8, 2, 0.4082, 0.0102, 2, 0.41, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(u'>>> Analyzing %s' % f)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L41_C8", "label": "calls = analyze()", "type": "assigned_variable", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L39_C4", "vector": [14, 2, 0.4184, 0.0102, 2, 0.41, 0.3333, 858, 3, 1, 0, 0, 199, 10, 2], "semantic": {"name": "calls", "arg_names": [], "import_names": [], "rhs_call_name": "analyze", "annotation": ""}, "snippet": " calls = analyze(fd.read())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Return_L42_C8", "label": "return", "type": "return", "loc": [42, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L39_C4", "vector": [13, 2, 0.4286, 0.0102, 2, 0.41, 0.6667, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return calls"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L44_C8", "label": "close()", "type": "expression", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L39_C4", "vector": [8, 2, 0.449, 0.0102, 2, 0.41, 1.0, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " fd.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L47_C0", "label": "_find_templates", "type": "function", "loc": [47, 52], "level": 0, "parent": null, "vector": [2, 0, 0.5051, 0.0612, 0, 0.66, 0.7143, 971, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "_find_templates", "arg_names": ["directory", "suffix"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def _find_templates(directory, suffix):\n for root, dirs, files in os.walk(directory):\n for f in files:\n if not f.endswith(suffix):\n continue\n yield root + os.path.sep + f"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L48_C4", "label": "for root, dirs, files", "type": "for", "loc": [48, 52], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L47_C0", "vector": [6, 1, 0.5102, 0.051, 1, 0.49, 0.0, 129, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "root, dirs, files", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for root, dirs, files in os.walk(directory):\n for f in files:\n if not f.endswith(suffix):\n continue\n yield root + os.path.sep + f"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L49_C8", "label": "for f", "type": "for", "loc": [49, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L48_C4", "vector": [6, 2, 0.5153, 0.0408, 2, 0.02, 0.0, 899, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for f in files:\n if not f.endswith(suffix):\n continue\n yield root + os.path.sep + f"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L50_C12", "label": "if", "type": "if", "loc": [50, 51], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L49_C8", "vector": [4, 3, 0.5153, 0.0204, 3, 0.46, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not f.endswith(suffix):\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L52_C12", "label": "expression", "type": "expression", "loc": [52, 52], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L49_C8", "vector": [8, 3, 0.5306, 0.0102, 3, 0.46, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield root + os.path.sep + f"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L54_C0", "label": "_analyze_templates", "type": "function", "loc": [54, 56], "level": 0, "parent": null, "vector": [2, 0, 0.5612, 0.0306, 0, 0.66, 0.7857, 178, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_analyze_templates", "arg_names": ["iterable"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def _analyze_templates(iterable):\n for template in iterable:\n yield main_file(template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L55_C4", "label": "for template", "type": "for", "loc": [55, 56], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L54_C0", "vector": [6, 1, 0.5663, 0.0204, 1, 0.87, 0.0, 549, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "template", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for template in iterable:\n yield main_file(template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L56_C8", "label": "expression", "type": "expression", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L55_C4", "vector": [8, 2, 0.5714, 0.0102, 2, 0.36, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield main_file(template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L58_C0", "label": "main_dir", "type": "function", "loc": [58, 69], "level": 0, "parent": null, "vector": [2, 0, 0.648, 0.1224, 0, 0.66, 0.8571, 274, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "main_dir", "arg_names": ["opts"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main_dir(opts):\n results = _analyze_templates(_find_templates(opts.dir, opts.suffix))\n totals = {}\n for series in results:\n if not series:\n continue\n for k, v in series.iteritems():\n try:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L59_C4", "label": "results = _analyze_templates()", "type": "assigned_variable", "loc": [59, 59], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L58_C0", "vector": [14, 1, 0.602, 0.0102, 1, 0.02, 0.0, 143, 3, 1, 0, 0, 178, 10, 2], "semantic": {"name": "results", "arg_names": [], "import_names": [], "rhs_call_name": "_analyze_templates", "annotation": ""}, "snippet": " results = _analyze_templates(_find_templates(opts.dir, opts.suffix))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L60_C4", "label": "totals =", "type": "assigned_variable", "loc": [60, 60], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L58_C0", "vector": [14, 1, 0.6122, 0.0102, 1, 0.02, 0.3333, 819, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "totals", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " totals = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L61_C4", "label": "for series", "type": "for", "loc": [61, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L58_C0", "vector": [6, 1, 0.6582, 0.0816, 1, 0.02, 0.6667, 959, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "series", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for series in results:\n if not series:\n continue\n for k, v in series.iteritems():\n try:\n totals[k] += v\n except KeyError:\n totals[k] = v"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L62_C8", "label": "if", "type": "if", "loc": [62, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L61_C4", "vector": [4, 2, 0.6378, 0.0204, 2, 0.78, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not series:\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L64_C8", "label": "for k, v", "type": "for", "loc": [64, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L61_C4", "vector": [6, 2, 0.6735, 0.051, 2, 0.78, 1.0, 867, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "k, v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for k, v in series.iteritems():\n try:\n totals[k] += v\n except KeyError:\n totals[k] = v"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L65_C12", "label": "try", "type": "try", "loc": [65, 68], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L64_C8", "vector": [7, 3, 0.6786, 0.0408, 3, 0.97, 0.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n totals[k] += v\n except KeyError:\n totals[k] = v"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L68_C16", "label": "assign", "type": "assigned_variable", "loc": [68, 68], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L65_C12", "vector": [14, 4, 0.6939, 0.0102, 4, 0.06, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " totals[k] = v"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Return_L69_C4", "label": "return", "type": "return", "loc": [69, 69], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L58_C0", "vector": [13, 1, 0.7041, 0.0102, 1, 0.02, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return totals"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "label": "main", "type": "function", "loc": [72, 93], "level": 0, "parent": null, "vector": [2, 0, 0.8418, 0.2245, 0, 0.66, 0.9286, 624, 0, 0, 0, 0, 0, 0, 9], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n from optparse import OptionParser\n op = OptionParser()\n op.add_option('-f', '--file', dest='file', default=None,\n help='Specify a single file to analyze')\n op.add_option('-d', '--dir', dest='dir', default=None, \n help='Specify a directory of templates to analyze')\n op.add_option('--suffix', default='tmpl', dest='suffix', "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:ImportFrom_L73_C4", "label": "from optparse import OptionParser", "type": "import", "loc": [73, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "vector": [1, 1, 0.7449, 0.0102, 1, 0.46, 0.0, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "optparse", "arg_names": [], "import_names": ["OptionParser"], "rhs_call_name": "", "annotation": ""}, "snippet": " from optparse import OptionParser"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L74_C4", "label": "op = OptionParser()", "type": "assigned_variable", "loc": [74, 74], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "vector": [14, 1, 0.7551, 0.0102, 1, 0.46, 0.1, 316, 3, 0, 0, 0, 894, 10, 1], "semantic": {"name": "op", "arg_names": [], "import_names": [], "rhs_call_name": "OptionParser", "annotation": ""}, "snippet": " op = OptionParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L75_C4", "label": "add_option()", "type": "expression", "loc": [75, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "vector": [8, 1, 0.7704, 0.0204, 1, 0.46, 0.2, 176, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": " op.add_option('-f', '--file', dest='file', default=None,\n help='Specify a single file to analyze')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L77_C4", "label": "add_option()", "type": "expression", "loc": [77, 78], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "vector": [8, 1, 0.7908, 0.0204, 1, 0.46, 0.3, 176, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": " op.add_option('-d', '--dir', dest='dir', default=None, \n help='Specify a directory of templates to analyze')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L79_C4", "label": "add_option()", "type": "expression", "loc": [79, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "vector": [8, 1, 0.8112, 0.0204, 1, 0.46, 0.4, 176, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": " op.add_option('--suffix', default='tmpl', dest='suffix', \n help='Specify a custom template file suffix for the -d option (default: \"tmpl\")')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L81_C4", "label": "opts, args = parse_args()", "type": "assigned_variable", "loc": [81, 81], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "vector": [14, 1, 0.8265, 0.0102, 1, 0.46, 0.5, 616, 3, 0, 0, 0, 187, 10, 1], "semantic": {"name": "opts, args", "arg_names": [], "import_names": [], "rhs_call_name": "parse_args", "annotation": ""}, "snippet": " opts, args = op.parse_args()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L83_C4", "label": "if", "type": "if", "loc": [83, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "vector": [4, 1, 0.8571, 0.0306, 1, 0.46, 0.6, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not opts.file and not opts.dir:\n op.print_help()\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L84_C8", "label": "print_help()", "type": "expression", "loc": [84, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L83_C4", "vector": [8, 2, 0.8571, 0.0102, 2, 0.43, 0.0, 931, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "print_help", "arg_names": [], "import_names": [], "rhs_call_name": "print_help", "annotation": ""}, "snippet": " op.print_help()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Return_L85_C8", "label": "return", "type": "return", "loc": [85, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L83_C4", "vector": [13, 2, 0.8673, 0.0102, 2, 0.43, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L87_C4", "label": "results =", "type": "assigned_variable", "loc": [87, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "vector": [14, 1, 0.8878, 0.0102, 1, 0.46, 0.7, 143, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "results", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " results = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L88_C4", "label": "if", "type": "if", "loc": [88, 89], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "vector": [4, 1, 0.9031, 0.0204, 1, 0.46, 0.8, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if opts.file:\n results = main_file(opts.file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L89_C8", "label": "results = main_file()", "type": "assigned_variable", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L88_C4", "vector": [14, 2, 0.9082, 0.0102, 2, 0.84, 0.0, 143, 3, 1, 0, 0, 708, 10, 1], "semantic": {"name": "results", "arg_names": [], "import_names": [], "rhs_call_name": "main_file", "annotation": ""}, "snippet": " results = main_file(opts.file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L90_C4", "label": "if", "type": "if", "loc": [90, 91], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "vector": [4, 1, 0.9235, 0.0204, 1, 0.46, 0.9, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if opts.dir:\n results = main_dir(opts)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L91_C8", "label": "results = main_dir()", "type": "assigned_variable", "loc": [91, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L90_C4", "vector": [14, 2, 0.9286, 0.0102, 2, 0.45, 0.0, 143, 3, 1, 0, 0, 274, 10, 1], "semantic": {"name": "results", "arg_names": [], "import_names": [], "rhs_call_name": "main_dir", "annotation": ""}, "snippet": " results = main_dir(opts)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L93_C4", "label": "pprint()", "type": "expression", "loc": [93, 93], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "vector": [8, 1, 0.949, 0.0102, 1, 0.46, 1.0, 276, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "pprint", "arg_names": [], "import_names": [], "rhs_call_name": "pprint", "annotation": ""}, "snippet": " pprint.pprint(results)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L96_C0", "label": "if", "type": "if", "loc": [96, 97], "level": 0, "parent": null, "vector": [4, 0, 0.9847, 0.0204, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L97_C4", "label": "main()", "type": "expression", "loc": [97, 97], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L96_C0", "vector": [8, 1, 0.9898, 0.0102, 1, 0.53, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:ImportFrom_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L23_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L26_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Return_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Return_L42_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L44_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L49_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L50_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L49_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L52_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L55_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L56_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:For_L64_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L65_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:Try_L65_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L68_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Return_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:ImportFrom_L73_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L77_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L79_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L81_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L83_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L84_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L83_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Return_L85_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L87_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L88_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L88_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L89_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L90_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Assign_L91_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:FunctionDef_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1516:If_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1516:Expr_L97_C4"}]
# $Id: ImportHooks.py,v 1.27 2007/11/16 18:28:47 tavis_rudd Exp $ """Provides some import hooks to allow Cheetah's .tmpl files to be imported directly like Python .py modules. To use these: import Cheetah.ImportHooks Cheetah.ImportHooks.install() Meta-Data ================================================================================ Author: Tavis Rudd <tavis@damnsimple.com> License: This software is released for unlimited distribution under the terms of the MIT license. See the LICENSE file. Version: $Revision: 1.27 $ Start Date: 2001/03/30 Last Revision Date: $Date: 2007/11/16 18:28:47 $ """ __author__ = "Tavis Rudd <tavis@damnsimple.com>" __revision__ = "$Revision: 1.27 $"[11:-2] import sys import os.path import types import __builtin__ import new import imp from threading import RLock import string import traceback from Cheetah import ImportManager from Cheetah.ImportManager import DirOwner from Cheetah.Compiler import Compiler from Cheetah.convertTmplPathToModuleName import convertTmplPathToModuleName _installed = False ################################################## ## HELPER FUNCS _cacheDir = [] def setCacheDir(cacheDir): global _cacheDir _cacheDir.append(cacheDir) ################################################## ## CLASSES class CheetahDirOwner(DirOwner): _lock = RLock() _acquireLock = _lock.acquire _releaseLock = _lock.release templateFileExtensions = ('.tmpl',) def getmod(self, name): self._acquireLock() try: mod = DirOwner.getmod(self, name) if mod: return mod for ext in self.templateFileExtensions: tmplPath = os.path.join(self.path, name + ext) if os.path.exists(tmplPath): try: return self._compile(name, tmplPath) except: # @@TR: log the error exc_txt = traceback.format_exc() exc_txt =' '+(' \n'.join(exc_txt.splitlines())) raise ImportError( 'Error while compiling Cheetah module' ' %(name)s, original traceback follows:\n%(exc_txt)s'%locals()) ## return None finally: self._releaseLock() def _compile(self, name, tmplPath): ## @@ consider adding an ImportError raiser here code = str(Compiler(file=tmplPath, moduleName=name, mainClassName=name)) if _cacheDir: __file__ = os.path.join(_cacheDir[0], convertTmplPathToModuleName(tmplPath)) + '.py' try: open(__file__, 'w').write(code) except OSError: ## @@ TR: need to add some error code here traceback.print_exc(file=sys.stderr) __file__ = tmplPath else: __file__ = tmplPath co = compile(code+'\n', __file__, 'exec') mod = imp.new_module(name) mod.__file__ = co.co_filename if _cacheDir: mod.__orig_file__ = tmplPath # @@TR: this is used in the WebKit # filemonitoring code mod.__co__ = co return mod ################################################## ## FUNCTIONS def install(templateFileExtensions=('.tmpl',)): """Install the Cheetah Import Hooks""" global _installed if not _installed: CheetahDirOwner.templateFileExtensions = templateFileExtensions import __builtin__ if isinstance(__builtin__.__import__, types.BuiltinFunctionType): global __oldimport__ __oldimport__ = __builtin__.__import__ ImportManager._globalOwnerTypes.insert(0, CheetahDirOwner) #ImportManager._globalOwnerTypes.append(CheetahDirOwner) global _manager _manager=ImportManager.ImportManager() _manager.setThreaded() _manager.install() def uninstall(): """Uninstall the Cheetah Import Hooks""" global _installed if not _installed: import __builtin__ if isinstance(__builtin__.__import__, types.MethodType): __builtin__.__import__ = __oldimport__ global _manager del _manager if __name__ == '__main__': install()
ajibawa-2023/Python-Code-Large/train/row_1517
75
138
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0761, 0.1159, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"Provides some import hooks to allow Cheetah's .tmpl files to be imported\ndirectly like Python .py modules.\n\nTo use these:\n import Cheetah.ImportHooks\n Cheetah.ImportHooks.install()\n\nMeta-Data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L19_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [19, 19], "level": 0, "parent": null, "vector": [14, 0, 0.1377, 0.0072, 0, 0.66, 0.0455, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__author__ = \"Tavis Rudd <tavis@damnsimple.com>\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L20_C0", "label": "__revision__ =", "type": "assigned_variable", "loc": [20, 20], "level": 0, "parent": null, "vector": [14, 0, 0.1449, 0.0072, 0, 0.66, 0.0909, 809, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__revision__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__revision__ = \"$Revision: 1.27 $\"[11:-2]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Import_L22_C0", "label": "sys import sys", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.1594, 0.0072, 0, 0.66, 0.1364, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Import_L23_C0", "label": "os.path import os.path", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.0072, 0, 0.66, 0.1818, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os.path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Import_L24_C0", "label": "types import types", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.1739, 0.0072, 0, 0.66, 0.2273, 209, 0, 1, 0, 0, 209, 0, 0], "semantic": {"name": "types", "arg_names": [], "import_names": ["types"], "rhs_call_name": "", "annotation": ""}, "snippet": "import types"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Import_L25_C0", "label": "__builtin__ import __builtin__", "type": "import", "loc": [25, 25], "level": 0, "parent": null, "vector": [1, 0, 0.1812, 0.0072, 0, 0.66, 0.2727, 364, 0, 1, 0, 0, 364, 0, 0], "semantic": {"name": "__builtin__", "arg_names": [], "import_names": ["__builtin__"], "rhs_call_name": "", "annotation": ""}, "snippet": "import __builtin__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Import_L26_C0", "label": "new import new", "type": "import", "loc": [26, 26], "level": 0, "parent": null, "vector": [1, 0, 0.1884, 0.0072, 0, 0.66, 0.3182, 145, 0, 1, 0, 0, 145, 0, 0], "semantic": {"name": "new", "arg_names": [], "import_names": ["new"], "rhs_call_name": "", "annotation": ""}, "snippet": "import new"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Import_L27_C0", "label": "imp import imp", "type": "import", "loc": [27, 27], "level": 0, "parent": null, "vector": [1, 0, 0.1957, 0.0072, 0, 0.66, 0.3636, 201, 0, 1, 0, 0, 201, 0, 0], "semantic": {"name": "imp", "arg_names": [], "import_names": ["imp"], "rhs_call_name": "", "annotation": ""}, "snippet": "import imp"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:ImportFrom_L28_C0", "label": "from threading import RLock", "type": "import", "loc": [28, 28], "level": 0, "parent": null, "vector": [1, 0, 0.2029, 0.0072, 0, 0.66, 0.4091, 83, 0, 1, 0, 0, 83, 0, 0], "semantic": {"name": "threading", "arg_names": [], "import_names": ["RLock"], "rhs_call_name": "", "annotation": ""}, "snippet": "from threading import RLock"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Import_L29_C0", "label": "string import string", "type": "import", "loc": [29, 29], "level": 0, "parent": null, "vector": [1, 0, 0.2101, 0.0072, 0, 0.66, 0.4545, 890, 0, 1, 0, 0, 890, 0, 0], "semantic": {"name": "string", "arg_names": [], "import_names": ["string"], "rhs_call_name": "", "annotation": ""}, "snippet": "import string"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Import_L30_C0", "label": "traceback import traceback", "type": "import", "loc": [30, 30], "level": 0, "parent": null, "vector": [1, 0, 0.2174, 0.0072, 0, 0.66, 0.5, 423, 0, 1, 0, 0, 423, 0, 0], "semantic": {"name": "traceback", "arg_names": [], "import_names": ["traceback"], "rhs_call_name": "", "annotation": ""}, "snippet": "import traceback"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:ImportFrom_L31_C0", "label": "from Cheetah import ImportManager", "type": "import", "loc": [31, 31], "level": 0, "parent": null, "vector": [1, 0, 0.2246, 0.0072, 0, 0.66, 0.5455, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "Cheetah", "arg_names": [], "import_names": ["ImportManager"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah import ImportManager"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:ImportFrom_L32_C0", "label": "from Cheetah.ImportManager import DirOwner", "type": "import", "loc": [32, 32], "level": 0, "parent": null, "vector": [1, 0, 0.2319, 0.0072, 0, 0.66, 0.5909, 961, 0, 1, 0, 0, 961, 0, 0], "semantic": {"name": "Cheetah.ImportManager", "arg_names": [], "import_names": ["DirOwner"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.ImportManager import DirOwner"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:ImportFrom_L33_C0", "label": "from Cheetah.Compiler import Compiler", "type": "import", "loc": [33, 33], "level": 0, "parent": null, "vector": [1, 0, 0.2391, 0.0072, 0, 0.66, 0.6364, 811, 0, 1, 0, 0, 811, 0, 0], "semantic": {"name": "Cheetah.Compiler", "arg_names": [], "import_names": ["Compiler"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Compiler import Compiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:ImportFrom_L34_C0", "label": "from Cheetah.convertTmplPathToModuleName import convertTmplPathToModuleName", "type": "import", "loc": [34, 34], "level": 0, "parent": null, "vector": [1, 0, 0.2464, 0.0072, 0, 0.66, 0.6818, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "Cheetah.convertTmplPathToModuleName", "arg_names": [], "import_names": ["convertTmplPathToModuleName"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.convertTmplPathToModuleName import convertTmplPathToModuleName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L36_C0", "label": "_installed =", "type": "assigned_variable", "loc": [36, 36], "level": 0, "parent": null, "vector": [14, 0, 0.2609, 0.0072, 0, 0.66, 0.7273, 680, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "_installed", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "_installed = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L41_C0", "label": "_cacheDir =", "type": "assigned_variable", "loc": [41, 41], "level": 0, "parent": null, "vector": [14, 0, 0.2971, 0.0072, 0, 0.66, 0.7727, 561, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "_cacheDir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "_cacheDir = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L42_C0", "label": "setCacheDir", "type": "function", "loc": [42, 44], "level": 0, "parent": null, "vector": [2, 0, 0.3116, 0.0217, 0, 0.66, 0.8182, 453, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setCacheDir", "arg_names": ["cacheDir"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def setCacheDir(cacheDir):\n global _cacheDir\n _cacheDir.append(cacheDir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L44_C4", "label": "append()", "type": "expression", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L42_C0", "vector": [8, 1, 0.3188, 0.0072, 1, 0.53, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " _cacheDir.append(cacheDir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:ClassDef_L49_C0", "label": "CheetahDirOwner", "type": "class", "loc": [49, 104], "level": 0, "parent": null, "vector": [3, 0, 0.5543, 0.4058, 0, 0.66, 0.8636, 480, 0, 2, 0, 0, 28, 0, 21], "semantic": {"name": "CheetahDirOwner", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CheetahDirOwner(DirOwner):\n _lock = RLock()\n _acquireLock = _lock.acquire\n _releaseLock = _lock.release\n\n templateFileExtensions = ('.tmpl',)\n\n def getmod(self, name):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L50_C4", "label": "_lock = RLock()", "type": "assigned_variable", "loc": [50, 50], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:ClassDef_L49_C0", "vector": [14, 1, 0.3623, 0.0072, 1, 0.56, 0.0, 537, 3, 0, 0, 0, 207, 10, 1], "semantic": {"name": "_lock", "arg_names": [], "import_names": [], "rhs_call_name": "RLock", "annotation": ""}, "snippet": " _lock = RLock()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L51_C4", "label": "_acquireLock =", "type": "assigned_variable", "loc": [51, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:ClassDef_L49_C0", "vector": [14, 1, 0.3696, 0.0072, 1, 0.56, 0.2, 120, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_acquireLock", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _acquireLock = _lock.acquire"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L52_C4", "label": "_releaseLock =", "type": "assigned_variable", "loc": [52, 52], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:ClassDef_L49_C0", "vector": [14, 1, 0.3768, 0.0072, 1, 0.56, 0.4, 277, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_releaseLock", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _releaseLock = _lock.release"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L54_C4", "label": "templateFileExtensions =", "type": "assigned_variable", "loc": [54, 54], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:ClassDef_L49_C0", "vector": [14, 1, 0.3913, 0.0072, 1, 0.56, 0.6, 178, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "templateFileExtensions", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " templateFileExtensions = ('.tmpl',)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L56_C4", "label": "getmod", "type": "function", "loc": [56, 79], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:ClassDef_L49_C0", "vector": [2, 1, 0.4891, 0.1739, 1, 0.56, 0.8, 142, 0, 2, 1, 0, 0, 0, 11], "semantic": {"name": "getmod", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getmod(self, name):\n self._acquireLock()\n try: \n mod = DirOwner.getmod(self, name)\n if mod:\n return mod\n\n for ext in self.templateFileExtensions:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L57_C8", "label": "_acquireLock()", "type": "expression", "loc": [57, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L56_C4", "vector": [8, 2, 0.413, 0.0072, 2, 0.68, 0.0, 120, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_acquireLock", "arg_names": [], "import_names": [], "rhs_call_name": "_acquireLock", "annotation": ""}, "snippet": " self._acquireLock()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L58_C8", "label": "try", "type": "try", "loc": [58, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L56_C4", "vector": [7, 2, 0.4964, 0.1594, 2, 0.68, 1.0, 0, 0, 0, 0, 0, 0, 0, 10], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try: \n mod = DirOwner.getmod(self, name)\n if mod:\n return mod\n\n for ext in self.templateFileExtensions:\n tmplPath = os.path.join(self.path, name + ext)\n if os.path.exists(tmplPath):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L59_C12", "label": "mod = getmod()", "type": "assigned_variable", "loc": [59, 59], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L58_C8", "vector": [14, 3, 0.4275, 0.0072, 3, 0.65, 0.0, 25, 3, 2, 0, 0, 142, 10, 1], "semantic": {"name": "mod", "arg_names": [], "import_names": [], "rhs_call_name": "getmod", "annotation": ""}, "snippet": " mod = DirOwner.getmod(self, name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L60_C12", "label": "if", "type": "if", "loc": [60, 61], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L58_C8", "vector": [4, 3, 0.4384, 0.0145, 3, 0.65, 0.25, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if mod:\n return mod"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Return_L61_C16", "label": "return", "type": "return", "loc": [61, 61], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L60_C12", "vector": [13, 4, 0.442, 0.0072, 4, 0.26, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return mod"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:For_L63_C12", "label": "for ext", "type": "for", "loc": [63, 74], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L58_C8", "vector": [6, 3, 0.4964, 0.087, 3, 0.65, 0.5, 916, 7, 0, 0, 0, 0, 0, 8], "semantic": {"name": "ext", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for ext in self.templateFileExtensions:\n tmplPath = os.path.join(self.path, name + ext)\n if os.path.exists(tmplPath):\n try:\n return self._compile(name, tmplPath)\n except:\n # @@TR: log the error\n exc_txt = traceback.format_exc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L64_C16", "label": "tmplPath = join()", "type": "assigned_variable", "loc": [64, 64], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:For_L63_C12", "vector": [14, 4, 0.4638, 0.0072, 4, 0.08, 0.0, 367, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "tmplPath", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " tmplPath = os.path.join(self.path, name + ext)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L65_C16", "label": "if", "type": "if", "loc": [65, 74], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:For_L63_C12", "vector": [4, 4, 0.5036, 0.0725, 4, 0.08, 1.0, 0, 3, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if os.path.exists(tmplPath):\n try:\n return self._compile(name, tmplPath)\n except:\n # @@TR: log the error\n exc_txt = traceback.format_exc()\n exc_txt =' '+(' \\n'.join(exc_txt.splitlines()))\n raise ImportError("}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L66_C20", "label": "try", "type": "try", "loc": [66, 74], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L65_C16", "vector": [7, 5, 0.5072, 0.0652, 5, 0.15, 0.0, 0, 0, 1, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n return self._compile(name, tmplPath)\n except:\n # @@TR: log the error\n exc_txt = traceback.format_exc()\n exc_txt =' '+(' \\n'.join(exc_txt.splitlines()))\n raise ImportError(\n 'Error while compiling Cheetah module'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Return_L67_C24", "label": "return", "type": "return", "loc": [67, 67], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L66_C20", "vector": [13, 6, 0.4855, 0.0072, 6, 0.92, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._compile(name, tmplPath)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L70_C24", "label": "exc_txt = format_exc()", "type": "assigned_variable", "loc": [70, 70], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L66_C20", "vector": [14, 6, 0.5072, 0.0072, 6, 0.92, 0.0, 79, 3, 0, 0, 0, 92, 10, 1], "semantic": {"name": "exc_txt", "arg_names": [], "import_names": [], "rhs_call_name": "format_exc", "annotation": ""}, "snippet": " exc_txt = traceback.format_exc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L71_C24", "label": "exc_txt =", "type": "assigned_variable", "loc": [71, 71], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L66_C20", "vector": [14, 6, 0.5145, 0.0072, 6, 0.92, 1.0, 79, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "exc_txt", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " exc_txt =' '+(' \\n'.join(exc_txt.splitlines()))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Return_L76_C12", "label": "return", "type": "return", "loc": [76, 76], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L58_C8", "vector": [13, 3, 0.5507, 0.0072, 3, 0.65, 0.75, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L79_C12", "label": "_releaseLock()", "type": "expression", "loc": [79, 79], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L58_C8", "vector": [8, 3, 0.5725, 0.0072, 3, 0.65, 1.0, 277, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_releaseLock", "arg_names": [], "import_names": [], "rhs_call_name": "_releaseLock", "annotation": ""}, "snippet": " self._releaseLock() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "label": "_compile", "type": "function", "loc": [81, 104], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:ClassDef_L49_C0", "vector": [2, 1, 0.6703, 0.1739, 1, 0.56, 1.0, 779, 0, 3, 1, 0, 0, 0, 9], "semantic": {"name": "_compile", "arg_names": ["self", "name", "tmplPath"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _compile(self, name, tmplPath):\n ## @@ consider adding an ImportError raiser here\n code = str(Compiler(file=tmplPath, moduleName=name,\n mainClassName=name))\n if _cacheDir:\n __file__ = os.path.join(_cacheDir[0],\n convertTmplPathToModuleName(tmplPath)) + '.py'\n try:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L83_C8", "label": "code = str()", "type": "assigned_variable", "loc": [83, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "vector": [14, 2, 0.6051, 0.0145, 2, 0.39, 0.0, 44, 3, 1, 0, 0, 52, 10, 2], "semantic": {"name": "code", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " code = str(Compiler(file=tmplPath, moduleName=name,\n mainClassName=name))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L85_C8", "label": "if", "type": "if", "loc": [85, 95], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "vector": [4, 2, 0.6522, 0.0797, 2, 0.39, 0.1429, 0, 2, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if _cacheDir:\n __file__ = os.path.join(_cacheDir[0],\n convertTmplPathToModuleName(tmplPath)) + '.py'\n try:\n open(__file__, 'w').write(code)\n except OSError:\n ## @@ TR: need to add some error code here\n traceback.print_exc(file=sys.stderr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L86_C12", "label": "__file__ =", "type": "assigned_variable", "loc": [86, 87], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L85_C8", "vector": [14, 3, 0.6268, 0.0145, 3, 0.81, 0.0, 557, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "__file__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __file__ = os.path.join(_cacheDir[0],\n convertTmplPathToModuleName(tmplPath)) + '.py'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L88_C12", "label": "try", "type": "try", "loc": [88, 93], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L85_C8", "vector": [7, 3, 0.6558, 0.0435, 3, 0.81, 0.5, 0, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n open(__file__, 'w').write(code)\n except OSError:\n ## @@ TR: need to add some error code here\n traceback.print_exc(file=sys.stderr)\n __file__ = tmplPath"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L89_C16", "label": "write()", "type": "expression", "loc": [89, 89], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L88_C12", "vector": [8, 4, 0.6449, 0.0072, 4, 0.15, 0.0, 837, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " open(__file__, 'w').write(code)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L92_C16", "label": "print_exc()", "type": "expression", "loc": [92, 92], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L88_C12", "vector": [8, 4, 0.6667, 0.0072, 4, 0.15, 0.0, 234, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print_exc", "arg_names": [], "import_names": [], "rhs_call_name": "print_exc", "annotation": ""}, "snippet": " traceback.print_exc(file=sys.stderr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L93_C16", "label": "__file__ =", "type": "assigned_variable", "loc": [93, 93], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L88_C12", "vector": [14, 4, 0.6739, 0.0072, 4, 0.15, 1.0, 557, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__file__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __file__ = tmplPath"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L95_C12", "label": "__file__ =", "type": "assigned_variable", "loc": [95, 95], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L85_C8", "vector": [14, 3, 0.6884, 0.0072, 3, 0.81, 1.0, 557, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__file__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __file__ = tmplPath"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L96_C8", "label": "co = compile()", "type": "assigned_variable", "loc": [96, 96], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "vector": [14, 2, 0.6957, 0.0072, 2, 0.39, 0.2857, 730, 3, 3, 0, 0, 821, 10, 1], "semantic": {"name": "co", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " co = compile(code+'\\n', __file__, 'exec')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L98_C8", "label": "mod = new_module()", "type": "assigned_variable", "loc": [98, 98], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "vector": [14, 2, 0.7101, 0.0072, 2, 0.39, 0.4286, 25, 3, 1, 0, 0, 649, 10, 1], "semantic": {"name": "mod", "arg_names": [], "import_names": [], "rhs_call_name": "new_module", "annotation": ""}, "snippet": " mod = imp.new_module(name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L99_C8", "label": "mod.__file__ =", "type": "assigned_variable", "loc": [99, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "vector": [14, 2, 0.7174, 0.0072, 2, 0.39, 0.5714, 122, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "mod.__file__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " mod.__file__ = co.co_filename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L100_C8", "label": "if", "type": "if", "loc": [100, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "vector": [4, 2, 0.7283, 0.0145, 2, 0.39, 0.7143, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if _cacheDir:\n mod.__orig_file__ = tmplPath # @@TR: this is used in the WebKit"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L101_C12", "label": "mod.__orig_file__ =", "type": "assigned_variable", "loc": [101, 101], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L100_C8", "vector": [14, 3, 0.7319, 0.0072, 3, 0.13, 0.0, 917, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "mod.__orig_file__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " mod.__orig_file__ = tmplPath # @@TR: this is used in the WebKit"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L103_C8", "label": "mod.__co__ =", "type": "assigned_variable", "loc": [103, 103], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "vector": [14, 2, 0.7464, 0.0072, 2, 0.39, 0.8571, 439, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "mod.__co__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " mod.__co__ = co"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Return_L104_C8", "label": "return", "type": "return", "loc": [104, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "vector": [13, 2, 0.7536, 0.0072, 2, 0.39, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return mod"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L110_C0", "label": "install", "type": "function", "loc": [110, 125], "level": 0, "parent": null, "vector": [2, 0, 0.8514, 0.1159, 0, 0.66, 0.9091, 984, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "install", "arg_names": ["templateFileExtensions"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def install(templateFileExtensions=('.tmpl',)):\n \"\"\"Install the Cheetah Import Hooks\"\"\"\n\n global _installed\n if not _installed:\n CheetahDirOwner.templateFileExtensions = templateFileExtensions\n import __builtin__\n if isinstance(__builtin__.__import__, types.BuiltinFunctionType):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L111_C4", "label": "expression", "type": "expression", "loc": [111, 111], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L110_C0", "vector": [8, 1, 0.8043, 0.0072, 1, 0.57, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Install the Cheetah Import Hooks\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L114_C4", "label": "if", "type": "if", "loc": [114, 125], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L110_C0", "vector": [4, 1, 0.8659, 0.087, 1, 0.57, 1.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not _installed:\n CheetahDirOwner.templateFileExtensions = templateFileExtensions\n import __builtin__\n if isinstance(__builtin__.__import__, types.BuiltinFunctionType):\n global __oldimport__\n __oldimport__ = __builtin__.__import__\n ImportManager._globalOwnerTypes.insert(0, CheetahDirOwner)\n #ImportManager._globalOwnerTypes.append(CheetahDirOwner) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L115_C8", "label": "CheetahDirOwner.templateFileExtensions =", "type": "assigned_variable", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L114_C4", "vector": [14, 2, 0.8333, 0.0072, 2, 0.64, 0.0, 451, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "CheetahDirOwner.templateFileExtensions", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " CheetahDirOwner.templateFileExtensions = templateFileExtensions"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Import_L116_C8", "label": "__builtin__ import __builtin__", "type": "import", "loc": [116, 116], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L114_C4", "vector": [1, 2, 0.8406, 0.0072, 2, 0.64, 0.5, 364, 0, 1, 0, 0, 364, 0, 0], "semantic": {"name": "__builtin__", "arg_names": [], "import_names": ["__builtin__"], "rhs_call_name": "", "annotation": ""}, "snippet": " import __builtin__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L117_C8", "label": "if", "type": "if", "loc": [117, 125], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L114_C4", "vector": [4, 2, 0.8768, 0.0652, 2, 0.64, 1.0, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(__builtin__.__import__, types.BuiltinFunctionType):\n global __oldimport__\n __oldimport__ = __builtin__.__import__\n ImportManager._globalOwnerTypes.insert(0, CheetahDirOwner)\n #ImportManager._globalOwnerTypes.append(CheetahDirOwner) \n global _manager\n _manager=ImportManager.ImportManager()\n _manager.setThreaded()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L119_C12", "label": "__oldimport__ =", "type": "assigned_variable", "loc": [119, 119], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L117_C8", "vector": [14, 3, 0.8623, 0.0072, 3, 0.46, 0.0, 560, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__oldimport__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __oldimport__ = __builtin__.__import__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L120_C12", "label": "insert()", "type": "expression", "loc": [120, 120], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L117_C8", "vector": [8, 3, 0.8696, 0.0072, 3, 0.46, 0.25, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " ImportManager._globalOwnerTypes.insert(0, CheetahDirOwner)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L123_C12", "label": "_manager = ImportManager()", "type": "assigned_variable", "loc": [123, 123], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L117_C8", "vector": [14, 3, 0.8913, 0.0072, 3, 0.46, 0.5, 195, 3, 0, 0, 0, 873, 10, 1], "semantic": {"name": "_manager", "arg_names": [], "import_names": [], "rhs_call_name": "ImportManager", "annotation": ""}, "snippet": " _manager=ImportManager.ImportManager()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L124_C12", "label": "setThreaded()", "type": "expression", "loc": [124, 124], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L117_C8", "vector": [8, 3, 0.8986, 0.0072, 3, 0.46, 0.75, 7, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "setThreaded", "arg_names": [], "import_names": [], "rhs_call_name": "setThreaded", "annotation": ""}, "snippet": " _manager.setThreaded()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L125_C12", "label": "install()", "type": "expression", "loc": [125, 125], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L117_C8", "vector": [8, 3, 0.9058, 0.0072, 3, 0.46, 1.0, 984, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "install", "arg_names": [], "import_names": [], "rhs_call_name": "install", "annotation": ""}, "snippet": " _manager.install()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L127_C0", "label": "uninstall", "type": "function", "loc": [127, 135], "level": 0, "parent": null, "vector": [2, 0, 0.9493, 0.0652, 0, 0.66, 0.9545, 367, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "uninstall", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def uninstall():\n \"\"\"Uninstall the Cheetah Import Hooks\"\"\" \n global _installed\n if not _installed:\n import __builtin__\n if isinstance(__builtin__.__import__, types.MethodType):\n __builtin__.__import__ = __oldimport__\n global _manager"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L128_C4", "label": "expression", "type": "expression", "loc": [128, 128], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L127_C0", "vector": [8, 1, 0.9275, 0.0072, 1, 0.8, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Uninstall the Cheetah Import Hooks\"\"\" "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L130_C4", "label": "if", "type": "if", "loc": [130, 135], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L127_C0", "vector": [4, 1, 0.9601, 0.0435, 1, 0.8, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not _installed:\n import __builtin__\n if isinstance(__builtin__.__import__, types.MethodType):\n __builtin__.__import__ = __oldimport__\n global _manager\n del _manager"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Import_L131_C8", "label": "__builtin__ import __builtin__", "type": "import", "loc": [131, 131], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L130_C4", "vector": [1, 2, 0.9493, 0.0072, 2, 0.56, 0.0, 364, 0, 1, 0, 0, 364, 0, 0], "semantic": {"name": "__builtin__", "arg_names": [], "import_names": ["__builtin__"], "rhs_call_name": "", "annotation": ""}, "snippet": " import __builtin__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L132_C8", "label": "if", "type": "if", "loc": [132, 135], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L130_C4", "vector": [4, 2, 0.9674, 0.029, 2, 0.56, 1.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(__builtin__.__import__, types.MethodType):\n __builtin__.__import__ = __oldimport__\n global _manager\n del _manager"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L133_C12", "label": "__builtin__.__import__ =", "type": "assigned_variable", "loc": [133, 133], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L132_C8", "vector": [14, 3, 0.9638, 0.0072, 3, 0.27, 0.0, 244, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__builtin__.__import__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __builtin__.__import__ = __oldimport__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L137_C0", "label": "if", "type": "if", "loc": [137, 138], "level": 0, "parent": null, "vector": [4, 0, 0.9964, 0.0145, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n install()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L138_C4", "label": "install()", "type": "expression", "loc": [138, 138], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L137_C0", "vector": [8, 1, 1.0, 0.0072, 1, 0.86, 0.0, 984, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "install", "arg_names": [], "import_names": [], "rhs_call_name": "install", "annotation": ""}, "snippet": " install()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:ClassDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:ClassDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:ClassDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:ClassDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:ClassDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L57_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L58_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L58_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L59_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L58_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L60_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L60_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Return_L61_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L58_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:For_L63_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:For_L63_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L64_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:For_L63_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L65_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L65_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L66_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L66_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Return_L67_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L66_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L70_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L66_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L71_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L58_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Return_L76_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L58_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L79_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:ClassDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L83_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L85_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L85_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L86_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L85_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L88_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L88_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L89_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L88_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L92_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:Try_L88_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L93_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L85_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L95_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L98_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L100_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L100_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L101_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L103_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L81_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Return_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L110_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L111_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L110_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L114_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L114_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L114_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Import_L116_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L114_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L117_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L117_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L119_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L117_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L120_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L117_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L123_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L117_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L124_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L117_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L125_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L127_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L128_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:FunctionDef_L127_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L130_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L130_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Import_L131_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L130_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L132_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L132_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Assign_L133_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1517:If_L137_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1517:Expr_L138_C4"}]
# $Id: _SkeletonPage.py,v 1.13 2002/10/01 17:52:02 tavis_rudd Exp $ """A baseclass for the SkeletonPage template Meta-Data ========== Author: Tavis Rudd <tavis@damnsimple.com>, Version: $Revision: 1.13 $ Start Date: 2001/04/05 Last Revision Date: $Date: 2002/10/01 17:52:02 $ """ __author__ = "Tavis Rudd <tavis@damnsimple.com>" __revision__ = "$Revision: 1.13 $"[11:-2] ################################################## ## DEPENDENCIES ## import time, types, os, sys # intra-package imports ... from Cheetah.Template import Template ################################################## ## GLOBALS AND CONSTANTS ## True = (1==1) False = (0==1) ################################################## ## CLASSES ## class _SkeletonPage(Template): """A baseclass for the SkeletonPage template""" docType = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ' + \ '"http://www.w3.org/TR/html4/loose.dtd">' # docType = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ' + \ #'"http://www.w3.org/TR/xhtml1l/DTD/transitional.dtd">' title = '' siteDomainName = 'www.example.com' siteCredits = 'Designed & Implemented by Tavis Rudd' siteCopyrightName = "Tavis Rudd" htmlTag = '<html>' def __init__(self, *args, **KWs): Template.__init__(self, *args, **KWs) self._metaTags = {'HTTP-EQUIV':{'keywords': 'Cheetah', 'Content-Type': 'text/html; charset=iso-8859-1', }, 'NAME':{'generator':'Cheetah: The Python-Powered Template Engine'} } # metaTags = {'HTTP_EQUIV':{'test':1234}, 'NAME':{'test':1234,'test2':1234} } self._stylesheets = {} # stylesheets = {'.cssClassName':'stylesheetCode'} self._stylesheetsOrder = [] # stylesheetsOrder = ['.cssClassName',] self._stylesheetLibs = {} # stylesheetLibs = {'libName':'libSrcPath'} self._javascriptLibs = {} self._javascriptTags = {} # self._javascriptLibs = {'libName':'libSrcPath'} self._bodyTagAttribs = {} def metaTags(self): """Return a formatted vesion of the self._metaTags dictionary, using the formatMetaTags function from Cheetah.Macros.HTML""" return self.formatMetaTags(self._metaTags) def stylesheetTags(self): """Return a formatted version of the self._stylesheetLibs and self._stylesheets dictionaries. The keys in self._stylesheets must be listed in the order that they should appear in the list self._stylesheetsOrder, to ensure that the style rules are defined in the correct order.""" stylesheetTagsTxt = '' for title, src in self._stylesheetLibs.items(): stylesheetTagsTxt += '<link rel="stylesheet" type="text/css" href="' + str(src) + '" />\n' if not self._stylesheetsOrder: return stylesheetTagsTxt stylesheetTagsTxt += '<style type="text/css"><!--\n' for identifier in self._stylesheetsOrder: if identifier not in self._stylesheets: warning = '# the identifier ' + identifier + \ 'was in stylesheetsOrder, but not in stylesheets' print(warning) stylesheetTagsTxt += warning continue attribsDict = self._stylesheets[identifier] cssCode = '' attribCode = '' for k, v in attribsDict.items(): attribCode += str(k) + ': ' + str(v) + '; ' attribCode = attribCode[:-2] # get rid of the last semicolon cssCode = '\n' + identifier + ' {' + attribCode + '}' stylesheetTagsTxt += cssCode stylesheetTagsTxt += '\n//--></style>\n' return stylesheetTagsTxt def javascriptTags(self): """Return a formatted version of the javascriptTags and javascriptLibs dictionaries. Each value in javascriptTags should be a either a code string to include, or a list containing the JavaScript version number and the code string. The keys can be anything. The same applies for javascriptLibs, but the string should be the SRC filename rather than a code string.""" javascriptTagsTxt = [] for key, details in self._javascriptTags.iteritems(): if not isinstance(details, (list, tuple)): details = ['', details] javascriptTagsTxt += ['<script language="JavaScript', str(details[0]), '" type="text/javascript"><!--\n', str(details[0]), '\n//--></script>\n'] for key, details in self._javascriptLibs.iteritems(): if not isinstance(details, (list, tuple)): details = ['', details] javascriptTagsTxt += ['<script language="JavaScript', str(details[0]), '" type="text/javascript" src="', str(details[1]), '" />\n'] return ''.join(javascriptTagsTxt) def bodyTag(self): """Create a body tag from the entries in the dict bodyTagAttribs.""" return self.formHTMLTag('body', self._bodyTagAttribs) def imgTag(self, src, alt='', width=None, height=None, border=0): """Dynamically generate an image tag. Cheetah will try to convert the src argument to a WebKit serverSidePath relative to the servlet's location. If width and height aren't specified they are calculated using PIL or ImageMagick if available.""" src = self.normalizePath(src) if not width or not height: try: # see if the dimensions can be calc'd with PIL import Image im = Image.open(src) calcWidth, calcHeight = im.size del im if not width: width = calcWidth if not height: height = calcHeight except: try: # try imageMagick instead calcWidth, calcHeight = os.popen( 'identify -format "%w,%h" ' + src).read().split(',') if not width: width = calcWidth if not height: height = calcHeight except: pass if width and height: return ''.join(['<img src="', src, '" width="', str(width), '" height="', str(height), '" alt="', alt, '" border="', str(border), '" />']) elif width: return ''.join(['<img src="', src, '" width="', str(width), '" alt="', alt, '" border="', str(border), '" />']) elif height: return ''.join(['<img src="', src, '" height="', str(height), '" alt="', alt, '" border="', str(border), '" />']) else: return ''.join(['<img src="', src, '" alt="', alt, '" border="', str(border), '" />']) def currentYr(self): """Return a string representing the current yr.""" return time.strftime("%Y", time.localtime(time.time())) def currentDate(self, formatString="%b %d, %Y"): """Return a string representing the current localtime.""" return time.strftime(formatString, time.localtime(time.time())) def spacer(self, width=1,height=1): return '<img src="spacer.gif" width="%s" height="%s" alt="" />'% (str(width), str(height)) def formHTMLTag(self, tagName, attributes={}): """returns a string containing an HTML <tag> """ tagTxt = ['<', tagName.lower()] for name, val in attributes.items(): tagTxt += [' ', name.lower(), '="', str(val), '"'] tagTxt.append('>') return ''.join(tagTxt) def formatMetaTags(self, metaTags): """format a dict of metaTag definitions into an HTML version""" metaTagsTxt = [] if 'HTTP-EQUIV' in metaTags: for http_equiv, contents in metaTags['HTTP-EQUIV'].items(): metaTagsTxt += ['<meta http-equiv="', str(http_equiv), '" content="', str(contents), '" />\n'] if 'NAME' in metaTags: for name, contents in metaTags['NAME'].items(): metaTagsTxt += ['<meta name="', str(name), '" content="', str(contents), '" />\n'] return ''.join(metaTagsTxt)
ajibawa-2023/Python-Code-Large/train/row_1519
102
213
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0282, 0.0423, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"A baseclass for the SkeletonPage template\n\nMeta-Data\n==========\nAuthor: Tavis Rudd <tavis@damnsimple.com>,\nVersion: $Revision: 1.13 $\nStart Date: 2001/04/05\nLast Revision Date: $Date: 2002/10/01 17:52:02 $"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L11_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.0516, 0.0047, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__author__ = \"Tavis Rudd <tavis@damnsimple.com>\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L12_C0", "label": "__revision__ =", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.0563, 0.0047, 0, 0.66, 0.4, 809, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__revision__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__revision__ = \"$Revision: 1.13 $\"[11:-2]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Import_L17_C0", "label": "time import time, types, os\u2026", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.0798, 0.0047, 0, 0.66, 0.6, 654, 0, 4, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time", "types", "os", "sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time, types, os, sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:ImportFrom_L20_C0", "label": "from Cheetah.Template import Template", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.0939, 0.0047, 0, 0.66, 0.8, 171, 0, 1, 0, 0, 171, 0, 0], "semantic": {"name": "Cheetah.Template", "arg_names": [], "import_names": ["Template"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Template import Template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "label": "_SkeletonPage", "type": "class", "loc": [30, 212], "level": 0, "parent": null, "vector": [3, 0, 0.5681, 0.8592, 0, 0.66, 1.0, 123, 0, 11, 0, 0, 137, 0, 56], "semantic": {"name": "_SkeletonPage", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class _SkeletonPage(Template):\n \"\"\"A baseclass for the SkeletonPage template\"\"\"\n\n docType = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" ' + \\\n '\"http://www.w3.org/TR/html4/loose.dtd\">'\n \n # docType = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" ' + \\\n #'\"http://www.w3.org/TR/xhtml1l/DTD/transitional.dtd\">'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L31_C4", "label": "expression", "type": "expression", "loc": [31, 31], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [8, 1, 0.1455, 0.0047, 1, 0.76, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"A baseclass for the SkeletonPage template\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L33_C4", "label": "docType =", "type": "assigned_variable", "loc": [33, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [14, 1, 0.1573, 0.0094, 1, 0.76, 0.0588, 509, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "docType", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " docType = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" ' + \\\n '\"http://www.w3.org/TR/html4/loose.dtd\">'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L39_C4", "label": "title =", "type": "assigned_variable", "loc": [39, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [14, 1, 0.1831, 0.0047, 1, 0.76, 0.1176, 48, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "title", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " title = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L40_C4", "label": "siteDomainName =", "type": "assigned_variable", "loc": [40, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [14, 1, 0.1878, 0.0047, 1, 0.76, 0.1765, 457, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "siteDomainName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " siteDomainName = 'www.example.com'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L41_C4", "label": "siteCredits =", "type": "assigned_variable", "loc": [41, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [14, 1, 0.1925, 0.0047, 1, 0.76, 0.2353, 626, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "siteCredits", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " siteCredits = 'Designed & Implemented by Tavis Rudd'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L42_C4", "label": "siteCopyrightName =", "type": "assigned_variable", "loc": [42, 42], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [14, 1, 0.1972, 0.0047, 1, 0.76, 0.2941, 218, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "siteCopyrightName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " siteCopyrightName = \"Tavis Rudd\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L43_C4", "label": "htmlTag =", "type": "assigned_variable", "loc": [43, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [14, 1, 0.2019, 0.0047, 1, 0.76, 0.3529, 666, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "htmlTag", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " htmlTag = '<html>'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "label": "__init__", "type": "function", "loc": [45, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [2, 1, 0.2512, 0.0845, 1, 0.76, 0.4118, 555, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "args", "KWs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, *args, **KWs):\n Template.__init__(self, *args, **KWs)\n self._metaTags = {'HTTP-EQUIV':{'keywords': 'Cheetah',\n 'Content-Type': 'text/html; charset=iso-8859-1',\n }, \n 'NAME':{'generator':'Cheetah: The Python-Powered Template Engine'}\n }\n # metaTags = {'HTTP_EQUIV':{'test':1234}, 'NAME':{'test':1234,'test2':1234} }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L46_C8", "label": "__init__()", "type": "expression", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "vector": [8, 2, 0.216, 0.0047, 2, 0.58, 0.0, 555, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " Template.__init__(self, *args, **KWs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L47_C8", "label": "self._metaTags =", "type": "assigned_variable", "loc": [47, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "vector": [14, 2, 0.23, 0.0235, 2, 0.58, 0.1429, 171, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._metaTags", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._metaTags = {'HTTP-EQUIV':{'keywords': 'Cheetah',\n 'Content-Type': 'text/html; charset=iso-8859-1',\n }, \n 'NAME':{'generator':'Cheetah: The Python-Powered Template Engine'}\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L53_C8", "label": "self._stylesheets =", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "vector": [14, 2, 0.2488, 0.0047, 2, 0.58, 0.2857, 569, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._stylesheets", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._stylesheets = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L55_C8", "label": "self._stylesheetsOrder =", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "vector": [14, 2, 0.2582, 0.0047, 2, 0.58, 0.4286, 654, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._stylesheetsOrder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._stylesheetsOrder = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L57_C8", "label": "self._stylesheetLibs =", "type": "assigned_variable", "loc": [57, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "vector": [14, 2, 0.2676, 0.0047, 2, 0.58, 0.5714, 591, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._stylesheetLibs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._stylesheetLibs = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L59_C8", "label": "self._javascriptLibs =", "type": "assigned_variable", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "vector": [14, 2, 0.277, 0.0047, 2, 0.58, 0.7143, 846, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._javascriptLibs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._javascriptLibs = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L60_C8", "label": "self._javascriptTags =", "type": "assigned_variable", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "vector": [14, 2, 0.2817, 0.0047, 2, 0.58, 0.8571, 871, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._javascriptTags", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._javascriptTags = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L62_C8", "label": "self._bodyTagAttribs =", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "vector": [14, 2, 0.2911, 0.0047, 2, 0.58, 1.0, 972, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._bodyTagAttribs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._bodyTagAttribs = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L64_C4", "label": "metaTags", "type": "function", "loc": [64, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [2, 1, 0.3099, 0.0235, 1, 0.76, 0.4706, 335, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "metaTags", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def metaTags(self):\n \"\"\"Return a formatted vesion of the self._metaTags dictionary, using the\n formatMetaTags function from Cheetah.Macros.HTML\"\"\"\n \n return self.formatMetaTags(self._metaTags)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L65_C8", "label": "expression", "type": "expression", "loc": [65, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L64_C4", "vector": [8, 2, 0.3075, 0.0094, 2, 0.52, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Return a formatted vesion of the self._metaTags dictionary, using the\n formatMetaTags function from Cheetah.Macros.HTML\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L68_C8", "label": "return", "type": "return", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L64_C4", "vector": [13, 2, 0.3192, 0.0047, 2, 0.52, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.formatMetaTags(self._metaTags)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L70_C4", "label": "stylesheetTags", "type": "function", "loc": [70, 105], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [2, 1, 0.4108, 0.169, 1, 0.76, 0.5294, 724, 0, 1, 1, 0, 0, 0, 6], "semantic": {"name": "stylesheetTags", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def stylesheetTags(self):\n \"\"\"Return a formatted version of the self._stylesheetLibs and\n self._stylesheets dictionaries. The keys in self._stylesheets must\n be listed in the order that they should appear in the list\n self._stylesheetsOrder, to ensure that the style rules are defined in\n the correct order.\"\"\"\n \n stylesheetTagsTxt = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L71_C8", "label": "expression", "type": "expression", "loc": [71, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L70_C4", "vector": [8, 2, 0.3427, 0.0235, 2, 0.58, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Return a formatted version of the self._stylesheetLibs and\n self._stylesheets dictionaries. The keys in self._stylesheets must\n be listed in the order that they should appear in the list\n self._stylesheetsOrder, to ensure that the style rules are defined in\n the correct order.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L77_C8", "label": "stylesheetTagsTxt =", "type": "assigned_variable", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L70_C4", "vector": [14, 2, 0.3615, 0.0047, 2, 0.58, 0.2, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "stylesheetTagsTxt", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " stylesheetTagsTxt = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L78_C8", "label": "for title, src", "type": "for", "loc": [78, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L70_C4", "vector": [6, 2, 0.3685, 0.0094, 2, 0.58, 0.4, 975, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "title, src", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for title, src in self._stylesheetLibs.items():\n stylesheetTagsTxt += '<link rel=\"stylesheet\" type=\"text/css\" href=\"' + str(src) + '\" />\\n'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L81_C8", "label": "if", "type": "if", "loc": [81, 82], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L70_C4", "vector": [4, 2, 0.3826, 0.0094, 2, 0.58, 0.6, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self._stylesheetsOrder:\n return stylesheetTagsTxt"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L82_C12", "label": "return", "type": "return", "loc": [82, 82], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L81_C8", "vector": [13, 3, 0.385, 0.0047, 3, 0.08, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return stylesheetTagsTxt"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L85_C8", "label": "for identifier", "type": "for", "loc": [85, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L70_C4", "vector": [6, 2, 0.4366, 0.0798, 2, 0.58, 0.8, 200, 7, 0, 0, 0, 0, 0, 4], "semantic": {"name": "identifier", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for identifier in self._stylesheetsOrder:\n if identifier not in self._stylesheets:\n warning = '# the identifier ' + identifier + \\\n 'was in stylesheetsOrder, but not in stylesheets'\n print(warning)\n stylesheetTagsTxt += warning\n continue\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L86_C12", "label": "if", "type": "if", "loc": [86, 91], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L85_C8", "vector": [4, 3, 0.4155, 0.0282, 3, 0.31, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if identifier not in self._stylesheets:\n warning = '# the identifier ' + identifier + \\\n 'was in stylesheetsOrder, but not in stylesheets'\n print(warning)\n stylesheetTagsTxt += warning\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L87_C16", "label": "warning =", "type": "assigned_variable", "loc": [87, 88], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L86_C12", "vector": [14, 4, 0.4108, 0.0094, 4, 0.74, 0.0, 320, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "warning", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " warning = '# the identifier ' + identifier + \\\n 'was in stylesheetsOrder, but not in stylesheets'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L89_C16", "label": "print()", "type": "expression", "loc": [89, 89], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L86_C12", "vector": [8, 4, 0.4178, 0.0047, 4, 0.74, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(warning)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L93_C12", "label": "attribsDict =", "type": "assigned_variable", "loc": [93, 93], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L85_C8", "vector": [14, 3, 0.4366, 0.0047, 3, 0.31, 0.1667, 539, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "attribsDict", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " attribsDict = self._stylesheets[identifier]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L94_C12", "label": "cssCode =", "type": "assigned_variable", "loc": [94, 94], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L85_C8", "vector": [14, 3, 0.4413, 0.0047, 3, 0.31, 0.3333, 281, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "cssCode", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cssCode = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L95_C12", "label": "attribCode =", "type": "assigned_variable", "loc": [95, 95], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L85_C8", "vector": [14, 3, 0.446, 0.0047, 3, 0.31, 0.5, 581, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "attribCode", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " attribCode = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L96_C12", "label": "for k, v", "type": "for", "loc": [96, 97], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L85_C8", "vector": [6, 3, 0.4531, 0.0094, 3, 0.31, 0.6667, 867, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "k, v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for k, v in attribsDict.items():\n attribCode += str(k) + ': ' + str(v) + '; '"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L98_C12", "label": "attribCode =", "type": "assigned_variable", "loc": [98, 98], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L85_C8", "vector": [14, 3, 0.4601, 0.0047, 3, 0.31, 0.8333, 581, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "attribCode", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " attribCode = attribCode[:-2] # get rid of the last semicolon"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L100_C12", "label": "cssCode =", "type": "assigned_variable", "loc": [100, 100], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L85_C8", "vector": [14, 3, 0.4695, 0.0047, 3, 0.31, 1.0, 281, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cssCode", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cssCode = '\\n' + identifier + ' {' + attribCode + '}'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L105_C8", "label": "return", "type": "return", "loc": [105, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L70_C4", "vector": [13, 2, 0.493, 0.0047, 2, 0.58, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return stylesheetTagsTxt"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L107_C4", "label": "javascriptTags", "type": "function", "loc": [107, 132], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [2, 1, 0.561, 0.1221, 1, 0.76, 0.5882, 263, 0, 1, 1, 0, 0, 0, 9], "semantic": {"name": "javascriptTags", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def javascriptTags(self):\n \"\"\"Return a formatted version of the javascriptTags and\n javascriptLibs dictionaries. Each value in javascriptTags\n should be a either a code string to include, or a list containing the\n JavaScript version number and the code string. The keys can be anything.\n The same applies for javascriptLibs, but the string should be the\n SRC filename rather than a code string.\"\"\"\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L108_C8", "label": "expression", "type": "expression", "loc": [108, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L107_C4", "vector": [8, 2, 0.5188, 0.0282, 2, 0.98, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Return a formatted version of the javascriptTags and\n javascriptLibs dictionaries. Each value in javascriptTags\n should be a either a code string to include, or a list containing the\n JavaScript version number and the code string. The keys can be anything.\n The same applies for javascriptLibs, but the string should be the\n SRC filename rather than a code string.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L115_C8", "label": "javascriptTagsTxt =", "type": "assigned_variable", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L107_C4", "vector": [14, 2, 0.5399, 0.0047, 2, 0.98, 0.25, 366, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "javascriptTagsTxt", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " javascriptTagsTxt = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L116_C8", "label": "for key, details", "type": "for", "loc": [116, 122], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L107_C4", "vector": [6, 2, 0.5587, 0.0329, 2, 0.98, 0.5, 563, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "key, details", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for key, details in self._javascriptTags.iteritems():\n if not isinstance(details, (list, tuple)):\n details = ['', details]\n \n javascriptTagsTxt += ['<script language=\"JavaScript', str(details[0]),\n '\" type=\"text/javascript\"><!--\\n',\n str(details[0]), '\\n//--></script>\\n']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L117_C12", "label": "if", "type": "if", "loc": [117, 118], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L116_C8", "vector": [4, 3, 0.5516, 0.0094, 3, 0.09, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not isinstance(details, (list, tuple)):\n details = ['', details]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L118_C16", "label": "details =", "type": "assigned_variable", "loc": [118, 118], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L117_C12", "vector": [14, 4, 0.554, 0.0047, 4, 0.46, 0.0, 254, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "details", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " details = ['', details]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L125_C8", "label": "for key, details", "type": "for", "loc": [125, 131], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L107_C4", "vector": [6, 2, 0.6009, 0.0329, 2, 0.98, 0.75, 563, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "key, details", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for key, details in self._javascriptLibs.iteritems():\n if not isinstance(details, (list, tuple)):\n details = ['', details]\n\n javascriptTagsTxt += ['<script language=\"JavaScript', str(details[0]),\n '\" type=\"text/javascript\" src=\"',\n str(details[1]), '\" />\\n']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L126_C12", "label": "if", "type": "if", "loc": [126, 127], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L125_C8", "vector": [4, 3, 0.5939, 0.0094, 3, 0.73, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not isinstance(details, (list, tuple)):\n details = ['', details]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L127_C16", "label": "details =", "type": "assigned_variable", "loc": [127, 127], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L126_C12", "vector": [14, 4, 0.5962, 0.0047, 4, 0.1, 0.0, 254, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "details", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " details = ['', details]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L132_C8", "label": "return", "type": "return", "loc": [132, 132], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L107_C4", "vector": [13, 2, 0.6197, 0.0047, 2, 0.98, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''.join(javascriptTagsTxt)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L134_C4", "label": "bodyTag", "type": "function", "loc": [134, 136], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [2, 1, 0.6338, 0.0141, 1, 0.76, 0.6471, 120, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "bodyTag", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def bodyTag(self):\n \"\"\"Create a body tag from the entries in the dict bodyTagAttribs.\"\"\"\n return self.formHTMLTag('body', self._bodyTagAttribs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L135_C8", "label": "expression", "type": "expression", "loc": [135, 135], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L134_C4", "vector": [8, 2, 0.6338, 0.0047, 2, 0.64, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Create a body tag from the entries in the dict bodyTagAttribs.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L136_C8", "label": "return", "type": "return", "loc": [136, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L134_C4", "vector": [13, 2, 0.6385, 0.0047, 2, 0.64, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.formHTMLTag('body', self._bodyTagAttribs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L139_C4", "label": "imgTag", "type": "function", "loc": [139, 178], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [2, 1, 0.7441, 0.1878, 1, 0.76, 0.7059, 108, 0, 6, 1, 0, 0, 0, 17], "semantic": {"name": "imgTag", "arg_names": ["self", "src", "alt", "width", "height", "border"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def imgTag(self, src, alt='', width=None, height=None, border=0):\n \n \"\"\"Dynamically generate an image tag. Cheetah will try to convert the\n src argument to a WebKit serverSidePath relative to the servlet's\n location. If width and height aren't specified they are calculated using\n PIL or ImageMagick if available.\"\"\"\n \n src = self.normalizePath(src)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L141_C8", "label": "expression", "type": "expression", "loc": [141, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L139_C4", "vector": [8, 2, 0.669, 0.0188, 2, 0.0, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Dynamically generate an image tag. Cheetah will try to convert the\n src argument to a WebKit serverSidePath relative to the servlet's\n location. If width and height aren't specified they are calculated using\n PIL or ImageMagick if available.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L146_C8", "label": "src = normalizePath()", "type": "assigned_variable", "loc": [146, 146], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L139_C4", "vector": [14, 2, 0.6854, 0.0047, 2, 0.0, 0.3333, 345, 3, 1, 0, 0, 662, 10, 1], "semantic": {"name": "src", "arg_names": [], "import_names": [], "rhs_call_name": "normalizePath", "annotation": ""}, "snippet": " src = self.normalizePath(src)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L149_C8", "label": "if", "type": "if", "loc": [149, 166], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L139_C4", "vector": [4, 2, 0.7394, 0.0845, 2, 0.0, 0.6667, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not width or not height:\n try: # see if the dimensions can be calc'd with PIL\n import Image\n im = Image.open(src)\n calcWidth, calcHeight = im.size\n del im\n if not width: width = calcWidth\n if not height: height = calcHeight"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L150_C12", "label": "try", "type": "try", "loc": [150, 166], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L149_C8", "vector": [7, 3, 0.7418, 0.0798, 3, 0.07, 0.0, 0, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try: # see if the dimensions can be calc'd with PIL\n import Image\n im = Image.open(src)\n calcWidth, calcHeight = im.size\n del im\n if not width: width = calcWidth\n if not height: height = calcHeight\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Import_L151_C16", "label": "Image import Image", "type": "import", "loc": [151, 151], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L150_C12", "vector": [1, 4, 0.7089, 0.0047, 4, 0.63, 0.0, 721, 0, 1, 0, 0, 721, 0, 0], "semantic": {"name": "Image", "arg_names": [], "import_names": ["Image"], "rhs_call_name": "", "annotation": ""}, "snippet": " import Image"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L152_C16", "label": "im = open()", "type": "assigned_variable", "loc": [152, 152], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L150_C12", "vector": [14, 4, 0.7136, 0.0047, 4, 0.63, 0.25, 940, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "im", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " im = Image.open(src)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L153_C16", "label": "calcWidth, calcHeight =", "type": "assigned_variable", "loc": [153, 153], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L150_C12", "vector": [14, 4, 0.7183, 0.0047, 4, 0.63, 0.5, 846, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "calcWidth, calcHeight", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " calcWidth, calcHeight = im.size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L155_C16", "label": "if", "type": "if", "loc": [155, 155], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L150_C12", "vector": [4, 4, 0.7277, 0.0047, 4, 0.63, 0.75, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not width: width = calcWidth"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L155_C30", "label": "width =", "type": "assigned_variable", "loc": [155, 155], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L155_C16", "vector": [14, 5, 0.7277, 0.0047, 5, 0.09, 0.0, 989, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "width", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not width: width = calcWidth"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L156_C16", "label": "if", "type": "if", "loc": [156, 156], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L150_C12", "vector": [4, 4, 0.7324, 0.0047, 4, 0.63, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not height: height = calcHeight"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L156_C31", "label": "height =", "type": "assigned_variable", "loc": [156, 156], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L156_C16", "vector": [14, 5, 0.7324, 0.0047, 5, 0.72, 0.0, 751, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "height", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not height: height = calcHeight"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L159_C16", "label": "try", "type": "try", "loc": [159, 166], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L150_C12", "vector": [7, 4, 0.7629, 0.0376, 4, 0.63, 0.0, 0, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try: # try imageMagick instead\n calcWidth, calcHeight = os.popen(\n 'identify -format \"%w,%h\" ' + src).read().split(',')\n if not width: width = calcWidth\n if not height: height = calcHeight\n \n except:\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L160_C20", "label": "calcWidth, calcHeight = split()", "type": "assigned_variable", "loc": [160, 161], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L159_C16", "vector": [14, 5, 0.7535, 0.0094, 5, 0.26, 0.0, 846, 3, 1, 0, 0, 908, 10, 3], "semantic": {"name": "calcWidth, calcHeight", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " calcWidth, calcHeight = os.popen(\n 'identify -format \"%w,%h\" ' + src).read().split(',')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L162_C20", "label": "if", "type": "if", "loc": [162, 162], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L159_C16", "vector": [4, 5, 0.7606, 0.0047, 5, 0.26, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not width: width = calcWidth"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L162_C34", "label": "width =", "type": "assigned_variable", "loc": [162, 162], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L162_C20", "vector": [14, 6, 0.7606, 0.0047, 6, 0.82, 0.0, 989, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "width", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not width: width = calcWidth"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L163_C20", "label": "if", "type": "if", "loc": [163, 163], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L159_C16", "vector": [4, 5, 0.7653, 0.0047, 5, 0.26, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not height: height = calcHeight"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L163_C35", "label": "height =", "type": "assigned_variable", "loc": [163, 163], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L163_C20", "vector": [14, 6, 0.7653, 0.0047, 6, 0.19, 0.0, 751, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "height", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not height: height = calcHeight"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L168_C8", "label": "if", "type": "if", "loc": [168, 178], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L139_C4", "vector": [4, 2, 0.8122, 0.0516, 2, 0.0, 1.0, 0, 0, 0, 0, 0, 0, 0, 12], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if width and height:\n return ''.join(['<img src=\"', src, '\" width=\"', str(width), '\" height=\"', str(height),\n '\" alt=\"', alt, '\" border=\"', str(border), '\" />'])\n elif width:\n return ''.join(['<img src=\"', src, '\" width=\"', str(width),\n '\" alt=\"', alt, '\" border=\"', str(border), '\" />'])\n elif height:\n return ''.join(['<img src=\"', src, '\" height=\"', str(height),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L169_C12", "label": "return", "type": "return", "loc": [169, 170], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L168_C8", "vector": [13, 3, 0.7958, 0.0094, 3, 0.56, 0.0, 0, 3, 0, 0, 0, 0, 10, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''.join(['<img src=\"', src, '\" width=\"', str(width), '\" height=\"', str(height),\n '\" alt=\"', alt, '\" border=\"', str(border), '\" />'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L171_C8", "label": "if", "type": "if", "loc": [171, 178], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L168_C8", "vector": [4, 3, 0.8192, 0.0376, 3, 0.56, 1.0, 0, 2, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif width:\n return ''.join(['<img src=\"', src, '\" width=\"', str(width),\n '\" alt=\"', alt, '\" border=\"', str(border), '\" />'])\n elif height:\n return ''.join(['<img src=\"', src, '\" height=\"', str(height),\n '\" alt=\"', alt, '\" border=\"', str(border), '\" />'])\n else:\n return ''.join(['<img src=\"', src, '\" alt=\"', alt, '\" border=\"', str(border), '\" />'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L172_C12", "label": "return", "type": "return", "loc": [172, 173], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L171_C8", "vector": [13, 4, 0.8099, 0.0094, 4, 0.67, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''.join(['<img src=\"', src, '\" width=\"', str(width),\n '\" alt=\"', alt, '\" border=\"', str(border), '\" />'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L174_C8", "label": "if", "type": "if", "loc": [174, 178], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L171_C8", "vector": [4, 4, 0.8263, 0.0235, 4, 0.67, 1.0, 0, 2, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif height:\n return ''.join(['<img src=\"', src, '\" height=\"', str(height),\n '\" alt=\"', alt, '\" border=\"', str(border), '\" />'])\n else:\n return ''.join(['<img src=\"', src, '\" alt=\"', alt, '\" border=\"', str(border), '\" />'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L175_C12", "label": "return", "type": "return", "loc": [175, 176], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L174_C8", "vector": [13, 5, 0.8239, 0.0094, 5, 0.25, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''.join(['<img src=\"', src, '\" height=\"', str(height),\n '\" alt=\"', alt, '\" border=\"', str(border), '\" />'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L178_C12", "label": "return", "type": "return", "loc": [178, 178], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L174_C8", "vector": [13, 5, 0.8357, 0.0047, 5, 0.25, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''.join(['<img src=\"', src, '\" alt=\"', alt, '\" border=\"', str(border), '\" />'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L181_C4", "label": "currentYr", "type": "function", "loc": [181, 183], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [2, 1, 0.8545, 0.0141, 1, 0.76, 0.7647, 569, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "currentYr", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def currentYr(self):\n \"\"\"Return a string representing the current yr.\"\"\"\n return time.strftime(\"%Y\", time.localtime(time.time()))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L182_C8", "label": "expression", "type": "expression", "loc": [182, 182], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L181_C4", "vector": [8, 2, 0.8545, 0.0047, 2, 0.57, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Return a string representing the current yr.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L183_C8", "label": "return", "type": "return", "loc": [183, 183], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L181_C4", "vector": [13, 2, 0.8592, 0.0047, 2, 0.57, 1.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return time.strftime(\"%Y\", time.localtime(time.time()))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L185_C4", "label": "currentDate", "type": "function", "loc": [185, 187], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [2, 1, 0.8732, 0.0141, 1, 0.76, 0.8235, 455, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "currentDate", "arg_names": ["self", "formatString"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def currentDate(self, formatString=\"%b %d, %Y\"):\n \"\"\"Return a string representing the current localtime.\"\"\"\n return time.strftime(formatString, time.localtime(time.time()))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L186_C8", "label": "expression", "type": "expression", "loc": [186, 186], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L185_C4", "vector": [8, 2, 0.8732, 0.0047, 2, 0.41, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Return a string representing the current localtime.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L187_C8", "label": "return", "type": "return", "loc": [187, 187], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L185_C4", "vector": [13, 2, 0.8779, 0.0047, 2, 0.41, 1.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return time.strftime(formatString, time.localtime(time.time()))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L189_C4", "label": "spacer", "type": "function", "loc": [189, 190], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [2, 1, 0.8897, 0.0094, 1, 0.76, 0.8824, 473, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "spacer", "arg_names": ["self", "width", "height"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def spacer(self, width=1,height=1):\n return '<img src=\"spacer.gif\" width=\"%s\" height=\"%s\" alt=\"\" />'% (str(width), str(height))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L190_C8", "label": "return", "type": "return", "loc": [190, 190], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L189_C4", "vector": [13, 2, 0.892, 0.0047, 2, 0.14, 0.0, 0, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '<img src=\"spacer.gif\" width=\"%s\" height=\"%s\" alt=\"\" />'% (str(width), str(height))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L192_C4", "label": "formHTMLTag", "type": "function", "loc": [192, 198], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [2, 1, 0.9155, 0.0329, 1, 0.76, 0.9412, 975, 0, 3, 1, 0, 0, 0, 6], "semantic": {"name": "formHTMLTag", "arg_names": ["self", "tagName", "attributes"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def formHTMLTag(self, tagName, attributes={}):\n \"\"\"returns a string containing an HTML <tag> \"\"\"\n tagTxt = ['<', tagName.lower()]\n for name, val in attributes.items():\n tagTxt += [' ', name.lower(), '=\"', str(val), '\"']\n tagTxt.append('>')\n return ''.join(tagTxt)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L193_C8", "label": "expression", "type": "expression", "loc": [193, 193], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L192_C4", "vector": [8, 2, 0.9061, 0.0047, 2, 0.74, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"returns a string containing an HTML <tag> \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L194_C8", "label": "tagTxt =", "type": "assigned_variable", "loc": [194, 194], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L192_C4", "vector": [14, 2, 0.9108, 0.0047, 2, 0.74, 0.25, 718, 0, 0, 0, 0, 0, 5, 1], "semantic": {"name": "tagTxt", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " tagTxt = ['<', tagName.lower()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L195_C8", "label": "for name, val", "type": "for", "loc": [195, 196], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L192_C4", "vector": [6, 2, 0.9178, 0.0094, 2, 0.74, 0.5, 762, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "name, val", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for name, val in attributes.items():\n tagTxt += [' ', name.lower(), '=\"', str(val), '\"']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L197_C8", "label": "append()", "type": "expression", "loc": [197, 197], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L192_C4", "vector": [8, 2, 0.9249, 0.0047, 2, 0.74, 0.75, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " tagTxt.append('>')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L198_C8", "label": "return", "type": "return", "loc": [198, 198], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L192_C4", "vector": [13, 2, 0.9296, 0.0047, 2, 0.74, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''.join(tagTxt)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L200_C4", "label": "formatMetaTags", "type": "function", "loc": [200, 212], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "vector": [2, 1, 0.9671, 0.061, 1, 0.76, 1.0, 881, 0, 2, 1, 0, 0, 0, 7], "semantic": {"name": "formatMetaTags", "arg_names": ["self", "metaTags"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def formatMetaTags(self, metaTags):\n \"\"\"format a dict of metaTag definitions into an HTML version\"\"\"\n metaTagsTxt = []\n if 'HTTP-EQUIV' in metaTags:\n for http_equiv, contents in metaTags['HTTP-EQUIV'].items():\n metaTagsTxt += ['<meta http-equiv=\"', str(http_equiv), '\" content=\"',\n str(contents), '\" />\\n']\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L201_C8", "label": "expression", "type": "expression", "loc": [201, 201], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L200_C4", "vector": [8, 2, 0.9437, 0.0047, 2, 0.42, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"format a dict of metaTag definitions into an HTML version\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L202_C8", "label": "metaTagsTxt =", "type": "assigned_variable", "loc": [202, 202], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L200_C4", "vector": [14, 2, 0.9484, 0.0047, 2, 0.42, 0.25, 435, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "metaTagsTxt", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " metaTagsTxt = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L203_C8", "label": "if", "type": "if", "loc": [203, 206], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L200_C4", "vector": [4, 2, 0.9601, 0.0188, 2, 0.42, 0.5, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'HTTP-EQUIV' in metaTags:\n for http_equiv, contents in metaTags['HTTP-EQUIV'].items():\n metaTagsTxt += ['<meta http-equiv=\"', str(http_equiv), '\" content=\"',\n str(contents), '\" />\\n']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L204_C12", "label": "for http_equiv, contents", "type": "for", "loc": [204, 206], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L203_C8", "vector": [6, 3, 0.9624, 0.0141, 3, 0.17, 0.0, 649, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "http_equiv, contents", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for http_equiv, contents in metaTags['HTTP-EQUIV'].items():\n metaTagsTxt += ['<meta http-equiv=\"', str(http_equiv), '\" content=\"',\n str(contents), '\" />\\n']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L208_C8", "label": "if", "type": "if", "loc": [208, 211], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L200_C4", "vector": [4, 2, 0.9836, 0.0188, 2, 0.42, 0.75, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'NAME' in metaTags:\n for name, contents in metaTags['NAME'].items():\n metaTagsTxt += ['<meta name=\"', str(name), '\" content=\"', str(contents),\n '\" />\\n']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L209_C12", "label": "for name, contents", "type": "for", "loc": [209, 211], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L208_C8", "vector": [6, 3, 0.9859, 0.0141, 3, 0.7, 0.0, 648, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "name, contents", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for name, contents in metaTags['NAME'].items():\n metaTagsTxt += ['<meta name=\"', str(name), '\" content=\"', str(contents),\n '\" />\\n']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L212_C8", "label": "return", "type": "return", "loc": [212, 212], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L200_C4", "vector": [13, 2, 0.9953, 0.0047, 2, 0.42, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''.join(metaTagsTxt)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L57_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L64_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L64_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L64_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L70_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L71_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L81_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L81_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L82_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L85_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L85_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L86_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L86_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L87_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L86_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L89_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L85_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L93_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L85_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L94_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L85_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L95_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L85_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L96_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L85_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L98_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L85_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L100_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L105_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L107_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L116_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L116_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L117_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L117_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L118_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L125_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L125_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L126_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L126_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L127_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L132_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L134_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L134_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L135_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L134_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L136_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L139_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L146_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L149_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L149_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L150_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L150_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Import_L151_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L150_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L152_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L150_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L153_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L150_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L155_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L155_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L155_C30"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L150_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L156_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L156_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L156_C31"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L150_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L159_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L159_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L160_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L159_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L162_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L162_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L162_C34"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:Try_L159_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L163_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L163_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L163_C35"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L168_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L168_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L169_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L168_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L171_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L171_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L172_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L171_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L174_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L174_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L175_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L174_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L178_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L181_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L181_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L182_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L181_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L183_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L185_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L185_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L186_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L185_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L187_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L189_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L189_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L190_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L192_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L192_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L193_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L192_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L194_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L192_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L195_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L192_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L197_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L192_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L198_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L200_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L200_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Expr_L201_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L200_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Assign_L202_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L200_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L203_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L203_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L204_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L200_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L208_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:If_L208_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:For_L209_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1519:FunctionDef_L200_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1519:Return_L212_C8"}]
""" Parser classes for Cheetah's Compiler Classes: ParseError( Exception ) _LowLevelParser( Cheetah.SourceReader.SourceReader ), basically a lexer _HighLevelParser( _LowLevelParser ) Parser === _HighLevelParser (an alias) """ import os import sys import re from re import DOTALL, MULTILINE from types import StringType, ListType, TupleType, ClassType, TypeType import time from tokenize import pseudoprog import inspect import new import traceback from Cheetah.SourceReader import SourceReader from Cheetah import Filters from Cheetah import ErrorCatchers from Cheetah.Unspecified import Unspecified from Cheetah.Macros.I18n import I18n # re tools _regexCache = {} def cachedRegex(pattern): if pattern not in _regexCache: _regexCache[pattern] = re.compile(pattern) return _regexCache[pattern] def escapeRegexChars(txt, escapeRE=re.compile(r'([\$\^\*\+\.\?\{\}\[\]\(\)\|\\])')): """Return a txt with all special regular expressions chars escaped.""" return escapeRE.sub(r'\\\1', txt) def group(*choices): return '(' + '|'.join(choices) + ')' def nongroup(*choices): return '(?:' + '|'.join(choices) + ')' def namedGroup(name, *choices): return '(P:<' + name +'>' + '|'.join(choices) + ')' def any(*choices): return group(*choices) + '*' def maybe(*choices): return group(*choices) + '?' ################################################## ## CONSTANTS & GLOBALS ## NO_CACHE = 0 STATIC_CACHE = 1 REFRESH_CACHE = 2 SET_LOCAL = 0 SET_GLOBAL = 1 SET_MODULE = 2 ################################################## ## Tokens for the parser ## #generic identchars = "abcdefghijklmnopqrstuvwxyz" \ "ABCDEFGHIJKLMNOPQRSTUVWXYZ_" namechars = identchars + "0123456789" #operators powerOp = '**' unaryArithOps = ('+', '-', '~') binaryArithOps = ('+', '-', '/', '//', '%') shiftOps = ('>>', '<<') bitwiseOps = ('&', '|', '^') assignOp = '=' augAssignOps = ('+=', '-=', '/=', '*=', '**=', '^=', '%=', '>>=', '<<=', '&=', '|=', ) assignmentOps = (assignOp,) + augAssignOps compOps = ('<', '>', '==', '!=', '<=', '>=', '<>', 'is', 'in',) booleanOps = ('and', 'or', 'not') operators = (powerOp,) + unaryArithOps + binaryArithOps \ + shiftOps + bitwiseOps + assignmentOps \ + compOps + booleanOps delimeters = ('(', ')', '{', '}', '[', ']', ',', '.', ':', ';', '=', '`') + augAssignOps keywords = ('and', 'del', 'for', 'is', 'raise', 'assert', 'elif', 'from', 'lambda', 'return', 'break', 'else', 'global', 'not', 'try', 'class', 'except', 'if', 'or', 'while', 'continue', 'exec', 'import', 'pass', 'def', 'finally', 'in', 'print', ) single3 = "'''" double3 = '"""' tripleQuotedStringStarts = ("'''", '"""', "r'''", 'r"""', "R'''", 'R"""', "u'''", 'u"""', "U'''", 'U"""', "ur'''", 'ur"""', "Ur'''", 'Ur"""', "uR'''", 'uR"""', "UR'''", 'UR"""') tripleQuotedStringPairs = {"'''": single3, '"""': double3, "r'''": single3, 'r"""': double3, "u'''": single3, 'u"""': double3, "ur'''": single3, 'ur"""': double3, "R'''": single3, 'R"""': double3, "U'''": single3, 'U"""': double3, "uR'''": single3, 'uR"""': double3, "Ur'''": single3, 'Ur"""': double3, "UR'''": single3, 'UR"""': double3, } closurePairs= {')':'(',']':'[','}':'{'} closurePairsRev= {'(':')','[':']','{':'}'} ################################################## ## Regex chunks for the parser ## tripleQuotedStringREs = {} def makeTripleQuoteRe(start, end): start = escapeRegexChars(start) end = escapeRegexChars(end) return re.compile(r'(?:' + start + r').*?' + r'(?:' + end + r')', re.DOTALL) for start, end in tripleQuotedStringPairs.items(): tripleQuotedStringREs[start] = makeTripleQuoteRe(start, end) WS = r'[ \f\t]*' EOL = r'\r\n|\n|\r' EOLZ = EOL + r'|\Z' escCharLookBehind = nongroup(r'(?<=\A)', r'(?<!\\)') nameCharLookAhead = r'(?=[A-Za-z_])' identRE=re.compile(r'[a-zA-Z_][a-zA-Z_0-9]*') EOLre=re.compile(r'(?:\r\n|\r|\n)') specialVarRE=re.compile(r'([a-zA-z_]+)@') # for matching specialVar comments # e.g. ##author@ Tavis Rudd unicodeDirectiveRE = re.compile( r'(?:^|\r\n|\r|\n)\s*#\s{0,5}unicode[:\s]*([-\w.]*)\s*(?:\r\n|\r|\n)', re.MULTILINE) encodingDirectiveRE = re.compile( r'(?:^|\r\n|\r|\n)\s*#\s{0,5}encoding[:\s]*([-\w.]*)\s*(?:\r\n|\r|\n)', re.MULTILINE) escapedNewlineRE = re.compile(r'(?<!\\)((\\\\)*)\\(n|012)') directiveNamesAndParsers = { # importing and inheritance 'import': None, 'from': None, 'extends': 'eatExtends', 'implements': 'eatImplements', 'super': 'eatSuper', # output, filtering, and caching 'slurp': 'eatSlurp', 'raw': 'eatRaw', 'include': 'eatInclude', 'cache': 'eatCache', 'filter': 'eatFilter', 'echo': None, 'silent': None, 'transform': 'eatTransform', 'call': 'eatCall', 'arg': 'eatCallArg', 'capture': 'eatCapture', # declaration, assignment, and deletion 'attr': 'eatAttr', 'def': 'eatDef', 'block': 'eatBlock', '@': 'eatDecorator', 'defmacro': 'eatDefMacro', 'closure': 'eatClosure', 'set': 'eatSet', 'del': None, # flow control 'if': 'eatIf', 'while': None, 'for': None, 'else': None, 'elif': None, 'pass': None, 'break': None, 'continue': None, 'stop': None, 'return': None, 'yield': None, # little wrappers 'repeat': None, 'unless': None, # error handling 'assert': None, 'raise': None, 'try': None, 'except': None, 'finally': None, 'errorCatcher': 'eatErrorCatcher', # intructions to the parser and compiler 'breakpoint': 'eatBreakPoint', 'compiler': 'eatCompiler', 'compiler-settings': 'eatCompilerSettings', # misc 'shBang': 'eatShbang', 'encoding': 'eatEncoding', 'end': 'eatEndDirective', } endDirectiveNamesAndHandlers = { 'def': 'handleEndDef', # has short-form 'block': None, # has short-form 'closure': None, # has short-form 'cache': None, # has short-form 'call': None, # has short-form 'capture': None, # has short-form 'filter': None, 'errorCatcher': None, 'while': None, # has short-form 'for': None, # has short-form 'if': None, # has short-form 'try': None, # has short-form 'repeat': None, # has short-form 'unless': None, # has short-form } ################################################## ## CLASSES ## # @@TR: SyntaxError doesn't call exception.__str__ for some reason! #class ParseError(SyntaxError): class ParseError(ValueError): def __init__(self, stream, msg='Invalid Syntax', extMsg='', lineno=None, col=None): self.stream = stream if stream.pos() >= len(stream): stream.setPos(len(stream) -1) self.msg = msg self.extMsg = extMsg self.lineno = lineno self.col = col def __str__(self): return self.report() def report(self): stream = self.stream if stream.filename(): f = " in file %s" % stream.filename() else: f = '' report = '' if self.lineno: lineno = self.lineno row, col, line = (lineno, (self.col or 0), self.stream.splitlines()[lineno-1]) else: row, col, line = self.stream.getRowColLine() ## get the surrounding lines lines = stream.splitlines() prevLines = [] # (rowNum, content) for i in range(1, 4): if row-1-i <=0: break prevLines.append( (row-i, lines[row-1-i]) ) nextLines = [] # (rowNum, content) for i in range(1, 4): if not row-1+i < len(lines): break nextLines.append( (row+i, lines[row-1+i]) ) nextLines.reverse() ## print the main message report += "\n\n%s\n" %self.msg report += "Line %i, column %i%s\n\n" % (row, col, f) report += 'Line|Cheetah Code\n' report += '----|-------------------------------------------------------------\n' while prevLines: lineInfo = prevLines.pop() report += "%(row)-4d|%(line)s\n"% {'row':lineInfo[0], 'line':lineInfo[1]} report += "%(row)-4d|%(line)s\n"% {'row':row, 'line':line} report += ' '*5 +' '*(col-1) + "^\n" while nextLines: lineInfo = nextLines.pop() report += "%(row)-4d|%(line)s\n"% {'row':lineInfo[0], 'line':lineInfo[1]} ## add the extra msg if self.extMsg: report += self.extMsg + '\n' return report class ForbiddenSyntax(ParseError): pass class ForbiddenExpression(ForbiddenSyntax): pass class ForbiddenDirective(ForbiddenSyntax): pass class CheetahVariable(object): def __init__(self, nameChunks, useNameMapper=True, cacheToken=None, rawSource=None): self.nameChunks = nameChunks self.useNameMapper = useNameMapper self.cacheToken = cacheToken self.rawSource = rawSource class Placeholder(CheetahVariable): pass class ArgList(object): """Used by _LowLevelParser.getArgList()""" def __init__(self): self.arguments = [] self.defaults = [] self.count = 0 def add_argument(self, name): self.arguments.append(name) self.defaults.append(None) def next(self): self.count += 1 def add_default(self, token): count = self.count if self.defaults[count] is None: self.defaults[count] = '' self.defaults[count] += token def merge(self): defaults = (isinstance(d, basestring) and d.strip() or None for d in self.defaults) return list(map(None, (a.strip() for a in self.arguments), defaults)) def __str__(self): return str(self.merge()) class _LowLevelParser(SourceReader): """This class implements the methods to match or extract ('get*') the basic elements of Cheetah's grammar. It does NOT handle any code generation or state management. """ _settingsManager = None def setSettingsManager(self, settingsManager): self._settingsManager = settingsManager def setting(self, key, default=Unspecified): if default is Unspecified: return self._settingsManager.setting(key) else: return self._settingsManager.setting(key, default=default) def setSetting(self, key, val): self._settingsManager.setSetting(key, val) def settings(self): return self._settingsManager.settings() def updateSettings(self, settings): self._settingsManager.updateSettings(settings) def _initializeSettings(self): self._settingsManager._initializeSettings() def configureParser(self): """Is called by the Compiler instance after the parser has had a settingsManager assigned with self.setSettingsManager() """ self._makeCheetahVarREs() self._makeCommentREs() self._makeDirectiveREs() self._makePspREs() self._possibleNonStrConstantChars = ( self.setting('commentStartToken')[0] + self.setting('multiLineCommentStartToken')[0] + self.setting('cheetahVarStartToken')[0] + self.setting('directiveStartToken')[0] + self.setting('PSPStartToken')[0]) self._nonStrConstMatchers = [ self.matchCommentStartToken, self.matchMultiLineCommentStartToken, self.matchVariablePlaceholderStart, self.matchExpressionPlaceholderStart, self.matchDirective, self.matchPSPStartToken, self.matchEOLSlurpToken, ] ## regex setup ## def _makeCheetahVarREs(self): """Setup the regexs for Cheetah $var parsing.""" num = r'[0-9\.]+' interval = (r'(?P<interval>' + num + r's|' + num + r'm|' + num + r'h|' + num + r'd|' + num + r'w|' + num + ')' ) cacheToken = (r'(?:' + r'(?P<REFRESH_CACHE>\*' + interval + '\*)'+ '|' + r'(?P<STATIC_CACHE>\*)' + '|' + r'(?P<NO_CACHE>)' + ')') self.cacheTokenRE = cachedRegex(cacheToken) silentPlaceholderToken = (r'(?:' + r'(?P<SILENT>' +escapeRegexChars('!')+')'+ '|' + r'(?P<NOT_SILENT>)' + ')') self.silentPlaceholderTokenRE = cachedRegex(silentPlaceholderToken) self.cheetahVarStartRE = cachedRegex( escCharLookBehind + r'(?P<startToken>'+escapeRegexChars(self.setting('cheetahVarStartToken'))+')'+ r'(?P<silenceToken>'+silentPlaceholderToken+')'+ r'(?P<cacheToken>'+cacheToken+')'+ r'(?P<enclosure>|(?:(?:\{|\(|\[)[ \t\f]*))' + # allow WS after enclosure r'(?=[A-Za-z_])') validCharsLookAhead = r'(?=[A-Za-z_\*!\{\(\[])' self.cheetahVarStartToken = self.setting('cheetahVarStartToken') self.cheetahVarStartTokenRE = cachedRegex( escCharLookBehind + escapeRegexChars(self.setting('cheetahVarStartToken')) +validCharsLookAhead ) self.cheetahVarInExpressionStartTokenRE = cachedRegex( escapeRegexChars(self.setting('cheetahVarStartToken')) +r'(?=[A-Za-z_])' ) self.expressionPlaceholderStartRE = cachedRegex( escCharLookBehind + r'(?P<startToken>' + escapeRegexChars(self.setting('cheetahVarStartToken')) + ')' + r'(?P<cacheToken>' + cacheToken + ')' + #r'\[[ \t\f]*' r'(?:\{|\(|\[)[ \t\f]*' + r'(?=[^\)\}\]])' ) if self.setting('EOLSlurpToken'): self.EOLSlurpRE = cachedRegex( escapeRegexChars(self.setting('EOLSlurpToken')) + r'[ \t\f]*' + r'(?:'+EOL+')' ) else: self.EOLSlurpRE = None def _makeCommentREs(self): """Construct the regex bits that are used in comment parsing.""" startTokenEsc = escapeRegexChars(self.setting('commentStartToken')) self.commentStartTokenRE = cachedRegex(escCharLookBehind + startTokenEsc) del startTokenEsc startTokenEsc = escapeRegexChars( self.setting('multiLineCommentStartToken')) endTokenEsc = escapeRegexChars( self.setting('multiLineCommentEndToken')) self.multiLineCommentTokenStartRE = cachedRegex(escCharLookBehind + startTokenEsc) self.multiLineCommentEndTokenRE = cachedRegex(escCharLookBehind + endTokenEsc) def _makeDirectiveREs(self): """Construct the regexs that are used in directive parsing.""" startToken = self.setting('directiveStartToken') endToken = self.setting('directiveEndToken') startTokenEsc = escapeRegexChars(startToken) endTokenEsc = escapeRegexChars(endToken) validSecondCharsLookAhead = r'(?=[A-Za-z_@])' reParts = [escCharLookBehind, startTokenEsc] if self.setting('allowWhitespaceAfterDirectiveStartToken'): reParts.append('[ \t]*') reParts.append(validSecondCharsLookAhead) self.directiveStartTokenRE = cachedRegex(''.join(reParts)) self.directiveEndTokenRE = cachedRegex(escCharLookBehind + endTokenEsc) def _makePspREs(self): """Setup the regexs for PSP parsing.""" startToken = self.setting('PSPStartToken') startTokenEsc = escapeRegexChars(startToken) self.PSPStartTokenRE = cachedRegex(escCharLookBehind + startTokenEsc) endToken = self.setting('PSPEndToken') endTokenEsc = escapeRegexChars(endToken) self.PSPEndTokenRE = cachedRegex(escCharLookBehind + endTokenEsc) def _unescapeCheetahVars(self, theString): """Unescape any escaped Cheetah \$vars in the string. """ token = self.setting('cheetahVarStartToken') return theString.replace('\\' + token, token) def _unescapeDirectives(self, theString): """Unescape any escaped Cheetah directives in the string. """ token = self.setting('directiveStartToken') return theString.replace('\\' + token, token) def isLineClearToStartToken(self, pos=None): return self.isLineClearToPos(pos) def matchTopLevelToken(self): """Returns the first match found from the following methods: self.matchCommentStartToken self.matchMultiLineCommentStartToken self.matchVariablePlaceholderStart self.matchExpressionPlaceholderStart self.matchDirective self.matchPSPStartToken self.matchEOLSlurpToken Returns None if no match. """ match = None if self.peek() in self._possibleNonStrConstantChars: for matcher in self._nonStrConstMatchers: match = matcher() if match: break return match def matchPyToken(self): match = pseudoprog.match(self.src(), self.pos()) if match and match.group() in tripleQuotedStringStarts: TQSmatch = tripleQuotedStringREs[match.group()].match(self.src(), self.pos()) if TQSmatch: return TQSmatch return match def getPyToken(self): match = self.matchPyToken() if match is None: raise ParseError(self) elif match.group() in tripleQuotedStringStarts: raise ParseError(self, msg='Malformed triple-quoted string') return self.readTo(match.end()) def matchEOLSlurpToken(self): if self.EOLSlurpRE: return self.EOLSlurpRE.match(self.src(), self.pos()) def getEOLSlurpToken(self): match = self.matchEOLSlurpToken() if not match: raise ParseError(self, msg='Invalid EOL slurp token') return self.readTo(match.end()) def matchCommentStartToken(self): return self.commentStartTokenRE.match(self.src(), self.pos()) def getCommentStartToken(self): match = self.matchCommentStartToken() if not match: raise ParseError(self, msg='Invalid single-line comment start token') return self.readTo(match.end()) def matchMultiLineCommentStartToken(self): return self.multiLineCommentTokenStartRE.match(self.src(), self.pos()) def getMultiLineCommentStartToken(self): match = self.matchMultiLineCommentStartToken() if not match: raise ParseError(self, msg='Invalid multi-line comment start token') return self.readTo(match.end()) def matchMultiLineCommentEndToken(self): return self.multiLineCommentEndTokenRE.match(self.src(), self.pos()) def getMultiLineCommentEndToken(self): match = self.matchMultiLineCommentEndToken() if not match: raise ParseError(self, msg='Invalid multi-line comment end token') return self.readTo(match.end()) def getCommaSeparatedSymbols(self): """ Loosely based on getDottedName to pull out comma separated named chunks """ srcLen = len(self) pieces = [] nameChunks = [] if not self.peek() in identchars: raise ParseError(self) while self.pos() < srcLen: c = self.peek() if c in namechars: nameChunk = self.getIdentifier() nameChunks.append(nameChunk) elif c == '.': if self.pos()+1 <srcLen and self.peek(1) in identchars: nameChunks.append(self.getc()) else: break elif c == ',': self.getc() pieces.append(''.join(nameChunks)) nameChunks = [] elif c in (' ', '\t'): self.getc() else: break if nameChunks: pieces.append(''.join(nameChunks)) return pieces def getDottedName(self): srcLen = len(self) nameChunks = [] if not self.peek() in identchars: raise ParseError(self) while self.pos() < srcLen: c = self.peek() if c in namechars: nameChunk = self.getIdentifier() nameChunks.append(nameChunk) elif c == '.': if self.pos()+1 <srcLen and self.peek(1) in identchars: nameChunks.append(self.getc()) else: break else: break return ''.join(nameChunks) def matchIdentifier(self): return identRE.match(self.src(), self.pos()) def getIdentifier(self): match = self.matchIdentifier() if not match: raise ParseError(self, msg='Invalid identifier') return self.readTo(match.end()) def matchOperator(self): match = self.matchPyToken() if match and match.group() not in operators: match = None return match def getOperator(self): match = self.matchOperator() if not match: raise ParseError(self, msg='Expected operator') return self.readTo( match.end() ) def matchAssignmentOperator(self): match = self.matchPyToken() if match and match.group() not in assignmentOps: match = None return match def getAssignmentOperator(self): match = self.matchAssignmentOperator() if not match: raise ParseError(self, msg='Expected assignment operator') return self.readTo( match.end() ) def matchDirective(self): """Returns False or the name of the directive matched. """ startPos = self.pos() if not self.matchDirectiveStartToken(): return False self.getDirectiveStartToken() directiveName = self.matchDirectiveName() self.setPos(startPos) return directiveName def matchDirectiveName(self, directiveNameChars=identchars+'0123456789-@'): startPos = self.pos() possibleMatches = self._directiveNamesAndParsers.keys() name = '' match = None while not self.atEnd(): c = self.getc() if not c in directiveNameChars: break name += c if name == '@': if not self.atEnd() and self.peek() in identchars: match = '@' break possibleMatches = [dn for dn in possibleMatches if dn.startswith(name)] if not possibleMatches: break elif (name in possibleMatches and (self.atEnd() or self.peek() not in directiveNameChars)): match = name break self.setPos(startPos) return match def matchDirectiveStartToken(self): return self.directiveStartTokenRE.match(self.src(), self.pos()) def getDirectiveStartToken(self): match = self.matchDirectiveStartToken() if not match: raise ParseError(self, msg='Invalid directive start token') return self.readTo(match.end()) def matchDirectiveEndToken(self): return self.directiveEndTokenRE.match(self.src(), self.pos()) def getDirectiveEndToken(self): match = self.matchDirectiveEndToken() if not match: raise ParseError(self, msg='Invalid directive end token') return self.readTo(match.end()) def matchColonForSingleLineShortFormDirective(self): if not self.atEnd() and self.peek()==':': restOfLine = self[self.pos()+1:self.findEOL()] restOfLine = restOfLine.strip() if not restOfLine: return False elif self.commentStartTokenRE.match(restOfLine): return False else: # non-whitespace, non-commment chars found return True return False def matchPSPStartToken(self): return self.PSPStartTokenRE.match(self.src(), self.pos()) def matchPSPEndToken(self): return self.PSPEndTokenRE.match(self.src(), self.pos()) def getPSPStartToken(self): match = self.matchPSPStartToken() if not match: raise ParseError(self, msg='Invalid psp start token') return self.readTo(match.end()) def getPSPEndToken(self): match = self.matchPSPEndToken() if not match: raise ParseError(self, msg='Invalid psp end token') return self.readTo(match.end()) def matchCheetahVarStart(self): """includes the enclosure and cache token""" return self.cheetahVarStartRE.match(self.src(), self.pos()) def matchCheetahVarStartToken(self): """includes the enclosure and cache token""" return self.cheetahVarStartTokenRE.match(self.src(), self.pos()) def matchCheetahVarInExpressionStartToken(self): """no enclosures or cache tokens allowed""" return self.cheetahVarInExpressionStartTokenRE.match(self.src(), self.pos()) def matchVariablePlaceholderStart(self): """includes the enclosure and cache token""" return self.cheetahVarStartRE.match(self.src(), self.pos()) def matchExpressionPlaceholderStart(self): """includes the enclosure and cache token""" return self.expressionPlaceholderStartRE.match(self.src(), self.pos()) def getCheetahVarStartToken(self): """just the start token, not the enclosure or cache token""" match = self.matchCheetahVarStartToken() if not match: raise ParseError(self, msg='Expected Cheetah $var start token') return self.readTo( match.end() ) def getCacheToken(self): try: token = self.cacheTokenRE.match(self.src(), self.pos()) self.setPos( token.end() ) return token.group() except: raise ParseError(self, msg='Expected cache token') def getSilentPlaceholderToken(self): try: token = self.silentPlaceholderTokenRE.match(self.src(), self.pos()) self.setPos( token.end() ) return token.group() except: raise ParseError(self, msg='Expected silent placeholder token') def getTargetVarsList(self): varnames = [] while not self.atEnd(): if self.peek() in ' \t\f': self.getWhiteSpace() elif self.peek() in '\r\n': break elif self.startswith(','): self.advance() elif self.startswith('in ') or self.startswith('in\t'): break #elif self.matchCheetahVarStart(): elif self.matchCheetahVarInExpressionStartToken(): self.getCheetahVarStartToken() self.getSilentPlaceholderToken() self.getCacheToken() varnames.append( self.getDottedName() ) elif self.matchIdentifier(): varnames.append( self.getDottedName() ) else: break return varnames def getCheetahVar(self, plain=False, skipStartToken=False): """This is called when parsing inside expressions. Cache tokens are only valid in placeholders so this method discards any cache tokens found. """ if not skipStartToken: self.getCheetahVarStartToken() self.getSilentPlaceholderToken() self.getCacheToken() return self.getCheetahVarBody(plain=plain) def getCheetahVarBody(self, plain=False): # @@TR: this should be in the compiler return self._compiler.genCheetahVar(self.getCheetahVarNameChunks(), plain=plain) def getCheetahVarNameChunks(self): """ nameChunks = list of Cheetah $var subcomponents represented as tuples [ (namemapperPart,autoCall,restOfName), ] where: namemapperPart = the dottedName base autocall = where NameMapper should use autocalling on namemapperPart restOfName = any arglist, index, or slice If restOfName contains a call arglist (e.g. '(1234)') then autocall is False, otherwise it defaults to True. EXAMPLE ------------------------------------------------------------------------ if the raw CheetahVar is $a.b.c[1].d().x.y.z nameChunks is the list [ ('a.b.c',True,'[1]'), ('d',False,'()'), ('x.y.z',True,''), ] """ chunks = [] while self.pos() < len(self): rest = '' autoCall = True if not self.peek() in identchars + '.': break elif self.peek() == '.': if self.pos()+1 < len(self) and self.peek(1) in identchars: self.advance() # discard the period as it isn't needed with NameMapper else: break dottedName = self.getDottedName() if not self.atEnd() and self.peek() in '([': if self.peek() == '(': rest = self.getCallArgString() else: rest = self.getExpression(enclosed=True) period = max(dottedName.rfind('.'), 0) if period: chunks.append( (dottedName[:period], autoCall, '') ) dottedName = dottedName[period+1:] if rest and rest[0]=='(': autoCall = False chunks.append( (dottedName, autoCall, rest) ) return chunks def getCallArgString(self, enclosures=[], # list of tuples (char, pos), where char is ({ or [ useNameMapper=Unspecified): """ Get a method/function call argument string. This method understands *arg, and **kw """ # @@TR: this settings mangling should be removed if useNameMapper is not Unspecified: useNameMapper_orig = self.setting('useNameMapper') self.setSetting('useNameMapper', useNameMapper) if enclosures: pass else: if not self.peek() == '(': raise ParseError(self, msg="Expected '('") startPos = self.pos() self.getc() enclosures = [('(', startPos), ] argStringBits = ['('] addBit = argStringBits.append while True: if self.atEnd(): open = enclosures[-1][0] close = closurePairsRev[open] self.setPos(enclosures[-1][1]) raise ParseError( self, msg="EOF was reached before a matching '" + close + "' was found for the '" + open + "'") c = self.peek() if c in ")}]": # get the ending enclosure and break if not enclosures: raise ParseError(self) c = self.getc() open = closurePairs[c] if enclosures[-1][0] == open: enclosures.pop() addBit(')') break else: raise ParseError(self) elif c in " \t\f\r\n": addBit(self.getc()) elif self.matchCheetahVarInExpressionStartToken(): startPos = self.pos() codeFor1stToken = self.getCheetahVar() WS = self.getWhiteSpace() if not self.atEnd() and self.peek() == '=': nextToken = self.getPyToken() if nextToken == '=': endPos = self.pos() self.setPos(startPos) codeFor1stToken = self.getCheetahVar(plain=True) self.setPos(endPos) ## finally addBit( codeFor1stToken + WS + nextToken ) else: addBit( codeFor1stToken + WS) elif self.matchCheetahVarStart(): # it has syntax that is only valid at the top level self._raiseErrorAboutInvalidCheetahVarSyntaxInExpr() else: beforeTokenPos = self.pos() token = self.getPyToken() if token in ('{', '(', '['): self.rev() token = self.getExpression(enclosed=True) token = self.transformToken(token, beforeTokenPos) addBit(token) if useNameMapper is not Unspecified: self.setSetting('useNameMapper', useNameMapper_orig) # @@TR: see comment above return ''.join(argStringBits) def getDefArgList(self, exitPos=None, useNameMapper=False): """ Get an argument list. Can be used for method/function definition argument lists or for #directive argument lists. Returns a list of tuples in the form (argName, defVal=None) with one tuple for each arg name. These defVals are always strings, so (argName, defVal=None) is safe even with a case like (arg1, arg2=None, arg3=1234*2), which would be returned as [('arg1', None), ('arg2', 'None'), ('arg3', '1234*2'), ] This method understands *arg, and **kw """ if self.peek() == '(': self.advance() else: exitPos = self.findEOL() # it's a directive so break at the EOL argList = ArgList() onDefVal = False # @@TR: this settings mangling should be removed useNameMapper_orig = self.setting('useNameMapper') self.setSetting('useNameMapper', useNameMapper) while True: if self.atEnd(): raise ParseError( self, msg="EOF was reached before a matching ')'"+ " was found for the '('") if self.pos() == exitPos: break c = self.peek() if c == ")" or self.matchDirectiveEndToken(): break elif c == ":": break elif c in " \t\f\r\n": if onDefVal: argList.add_default(c) self.advance() elif c == '=': onDefVal = True self.advance() elif c == ",": argList.next() onDefVal = False self.advance() elif self.startswith(self.cheetahVarStartToken) and not onDefVal: self.advance(len(self.cheetahVarStartToken)) elif self.matchIdentifier() and not onDefVal: argList.add_argument( self.getIdentifier() ) elif onDefVal: if self.matchCheetahVarInExpressionStartToken(): token = self.getCheetahVar() elif self.matchCheetahVarStart(): # it has syntax that is only valid at the top level self._raiseErrorAboutInvalidCheetahVarSyntaxInExpr() else: beforeTokenPos = self.pos() token = self.getPyToken() if token in ('{', '(', '['): self.rev() token = self.getExpression(enclosed=True) token = self.transformToken(token, beforeTokenPos) argList.add_default(token) elif c == '*' and not onDefVal: varName = self.getc() if self.peek() == '*': varName += self.getc() if not self.matchIdentifier(): raise ParseError(self) varName += self.getIdentifier() argList.add_argument(varName) else: raise ParseError(self) self.setSetting('useNameMapper', useNameMapper_orig) # @@TR: see comment above return argList.merge() def getExpressionParts(self, enclosed=False, enclosures=None, # list of tuples (char, pos), where char is ({ or [ pyTokensToBreakAt=None, # only works if not enclosed useNameMapper=Unspecified, ): """ Get a Cheetah expression that includes $CheetahVars and break at directive end tokens, the end of an enclosure, or at a specified pyToken. """ if useNameMapper is not Unspecified: useNameMapper_orig = self.setting('useNameMapper') self.setSetting('useNameMapper', useNameMapper) if enclosures is None: enclosures = [] srcLen = len(self) exprBits = [] while True: if self.atEnd(): if enclosures: open = enclosures[-1][0] close = closurePairsRev[open] self.setPos(enclosures[-1][1]) raise ParseError( self, msg="EOF was reached before a matching '" + close + "' was found for the '" + open + "'") else: break c = self.peek() if c in "{([": exprBits.append(c) enclosures.append( (c, self.pos()) ) self.advance() elif enclosed and not enclosures: break elif c in "])}": if not enclosures: raise ParseError(self) open = closurePairs[c] if enclosures[-1][0] == open: enclosures.pop() exprBits.append(c) else: open = enclosures[-1][0] close = closurePairsRev[open] row, col = self.getRowCol() self.setPos(enclosures[-1][1]) raise ParseError( self, msg= "A '" + c + "' was found at line " + str(row) + ", col " + str(col) + " before a matching '" + close + "' was found\nfor the '" + open + "'") self.advance() elif c in " \f\t": exprBits.append(self.getWhiteSpace()) elif self.matchDirectiveEndToken() and not enclosures: break elif c == "\\" and self.pos()+1 < srcLen: eolMatch = EOLre.match(self.src(), self.pos()+1) if not eolMatch: self.advance() raise ParseError(self, msg='Line ending expected') self.setPos( eolMatch.end() ) elif c in '\r\n': if enclosures: self.advance() else: break elif self.matchCheetahVarInExpressionStartToken(): expr = self.getCheetahVar() exprBits.append(expr) elif self.matchCheetahVarStart(): # it has syntax that is only valid at the top level self._raiseErrorAboutInvalidCheetahVarSyntaxInExpr() else: beforeTokenPos = self.pos() token = self.getPyToken() if (not enclosures and pyTokensToBreakAt and token in pyTokensToBreakAt): self.setPos(beforeTokenPos) break token = self.transformToken(token, beforeTokenPos) exprBits.append(token) if identRE.match(token): if token == 'for': expr = self.getExpression(useNameMapper=False, pyTokensToBreakAt=['in']) exprBits.append(expr) else: exprBits.append(self.getWhiteSpace()) if not self.atEnd() and self.peek() == '(': exprBits.append(self.getCallArgString()) ## if useNameMapper is not Unspecified: self.setSetting('useNameMapper', useNameMapper_orig) # @@TR: see comment above return exprBits def getExpression(self, enclosed=False, enclosures=None, # list of tuples (char, pos), where # char is ({ or [ pyTokensToBreakAt=None, useNameMapper=Unspecified, ): """Returns the output of self.getExpressionParts() as a concatenated string rather than as a list. """ return ''.join(self.getExpressionParts( enclosed=enclosed, enclosures=enclosures, pyTokensToBreakAt=pyTokensToBreakAt, useNameMapper=useNameMapper)) def transformToken(self, token, beforeTokenPos): """Takes a token from the expression being parsed and performs and special transformations required by Cheetah. At the moment only Cheetah's c'$placeholder strings' are transformed. """ if token=='c' and not self.atEnd() and self.peek() in '\'"': nextToken = self.getPyToken() token = nextToken.upper() theStr = eval(token) endPos = self.pos() if not theStr: return if token.startswith(single3) or token.startswith(double3): startPosIdx = 3 else: startPosIdx = 1 self.setPos(beforeTokenPos+startPosIdx+1) outputExprs = [] strConst = '' while self.pos() < (endPos-startPosIdx): if self.matchCheetahVarStart() or self.matchExpressionPlaceholderStart(): if strConst: outputExprs.append(repr(strConst)) strConst = '' placeholderExpr = self.getPlaceholder() outputExprs.append('str('+placeholderExpr+')') else: strConst += self.getc() self.setPos(endPos) if strConst: outputExprs.append(repr(strConst)) token = "''.join(["+','.join(outputExprs)+"])" return token def _raiseErrorAboutInvalidCheetahVarSyntaxInExpr(self): match = self.matchCheetahVarStart() groupdict = match.groupdict() if groupdict.get('cacheToken'): raise ParseError( self, msg='Cache tokens are not valid inside expressions. ' 'Use them in top-level $placeholders only.') elif groupdict.get('enclosure'): raise ParseError( self, msg='Long-form placeholders - ${}, $(), $[], etc. are not valid inside expressions. ' 'Use them in top-level $placeholders only.') else: raise ParseError( self, msg='This form of $placeholder syntax is not valid here.') def getPlaceholder(self, allowCacheTokens=False, plain=False, returnEverything=False): # filtered for callback in self.setting('preparsePlaceholderHooks'): callback(parser=self) startPos = self.pos() lineCol = self.getRowCol(startPos) startToken = self.getCheetahVarStartToken() silentPlaceholderToken = self.getSilentPlaceholderToken() if silentPlaceholderToken: isSilentPlaceholder = True else: isSilentPlaceholder = False if allowCacheTokens: cacheToken = self.getCacheToken() cacheTokenParts = self.cacheTokenRE.match(cacheToken).groupdict() else: cacheTokenParts = {} if self.peek() in '({[': pos = self.pos() enclosureOpenChar = self.getc() enclosures = [ (enclosureOpenChar, pos) ] self.getWhiteSpace() else: enclosures = [] filterArgs = None if self.matchIdentifier(): nameChunks = self.getCheetahVarNameChunks() expr = self._compiler.genCheetahVar(nameChunks[:], plain=plain) restOfExpr = None if enclosures: WS = self.getWhiteSpace() expr += WS if self.setting('allowPlaceholderFilterArgs') and self.peek()==',': filterArgs = self.getCallArgString(enclosures=enclosures)[1:-1] else: if self.peek()==closurePairsRev[enclosureOpenChar]: self.getc() else: restOfExpr = self.getExpression(enclosed=True, enclosures=enclosures) if restOfExpr[-1] == closurePairsRev[enclosureOpenChar]: restOfExpr = restOfExpr[:-1] expr += restOfExpr rawPlaceholder = self[startPos: self.pos()] else: expr = self.getExpression(enclosed=True, enclosures=enclosures) if expr[-1] == closurePairsRev[enclosureOpenChar]: expr = expr[:-1] rawPlaceholder=self[startPos: self.pos()] expr = self._applyExpressionFilters(expr, 'placeholder', rawExpr=rawPlaceholder, startPos=startPos) for callback in self.setting('postparsePlaceholderHooks'): callback(parser=self) if returnEverything: return (expr, rawPlaceholder, lineCol, cacheTokenParts, filterArgs, isSilentPlaceholder) else: return expr class _HighLevelParser(_LowLevelParser): """This class is a StateMachine for parsing Cheetah source and sending state dependent code generation commands to Cheetah.Compiler.Compiler. """ def __init__(self, src, filename=None, breakPoint=None, compiler=None): super(_HighLevelParser, self).__init__(src, filename=filename, breakPoint=breakPoint) self.setSettingsManager(compiler) self._compiler = compiler self.setupState() self.configureParser() def setupState(self): self._macros = {} self._macroDetails = {} self._openDirectivesStack = [] def cleanup(self): """Cleanup to remove any possible reference cycles """ self._macros.clear() for macroname, macroDetails in self._macroDetails.items(): macroDetails.template.shutdown() del macroDetails.template self._macroDetails.clear() def configureParser(self): super(_HighLevelParser, self).configureParser() self._initDirectives() def _initDirectives(self): def normalizeParserVal(val): if isinstance(val, (str, unicode)): handler = getattr(self, val) elif type(val) in (ClassType, TypeType): handler = val(self) elif hasattr(val, '__call__'): handler = val elif val is None: handler = val else: raise Exception('Invalid parser/handler value %r for %s'%(val, name)) return handler normalizeHandlerVal = normalizeParserVal _directiveNamesAndParsers = directiveNamesAndParsers.copy() customNamesAndParsers = self.setting('directiveNamesAndParsers', {}) _directiveNamesAndParsers.update(customNamesAndParsers) _endDirectiveNamesAndHandlers = endDirectiveNamesAndHandlers.copy() customNamesAndHandlers = self.setting('endDirectiveNamesAndHandlers', {}) _endDirectiveNamesAndHandlers.update(customNamesAndHandlers) self._directiveNamesAndParsers = {} for name, val in _directiveNamesAndParsers.items(): if val in (False, 0): continue self._directiveNamesAndParsers[name] = normalizeParserVal(val) self._endDirectiveNamesAndHandlers = {} for name, val in _endDirectiveNamesAndHandlers.items(): if val in (False, 0): continue self._endDirectiveNamesAndHandlers[name] = normalizeHandlerVal(val) self._closeableDirectives = ['def', 'block', 'closure', 'defmacro', 'call', 'capture', 'cache', 'filter', 'if', 'unless', 'for', 'while', 'repeat', 'try', ] for directiveName in self.setting('closeableDirectives', []): self._closeableDirectives.append(directiveName) macroDirectives = self.setting('macroDirectives', {}) macroDirectives['i18n'] = I18n for macroName, callback in macroDirectives.items(): if type(callback) in (ClassType, TypeType): callback = callback(parser=self) assert callback self._macros[macroName] = callback self._directiveNamesAndParsers[macroName] = self.eatMacroCall def _applyExpressionFilters(self, expr, exprType, rawExpr=None, startPos=None): """Pipes cheetah expressions through a set of optional filter hooks. The filters are functions which may modify the expressions or raise a ForbiddenExpression exception if the expression is not allowed. They are defined in the compiler setting 'expressionFilterHooks'. Some intended use cases: - to implement 'restricted execution' safeguards in cases where you can't trust the author of the template. - to enforce style guidelines filter call signature: (parser, expr, exprType, rawExpr=None, startPos=None) - parser is the Cheetah parser - expr is the expression to filter. In some cases the parser will have already modified it from the original source code form. For example, placeholders will have been translated into namemapper calls. If you need to work with the original source, see rawExpr. - exprType is the name of the directive, 'psp', or 'placeholder'. All lowercase. @@TR: These will eventually be replaced with a set of constants. - rawExpr is the original source string that Cheetah parsed. This might be None in some cases. - startPos is the character position in the source string/file where the parser started parsing the current expression. @@TR: I realize this use of the term 'expression' is a bit wonky as many of the 'expressions' are actually statements, but I haven't thought of a better name yet. Suggestions? """ for callback in self.setting('expressionFilterHooks'): expr = callback(parser=self, expr=expr, exprType=exprType, rawExpr=rawExpr, startPos=startPos) return expr def _filterDisabledDirectives(self, directiveName): directiveName = directiveName.lower() if (directiveName in self.setting('disabledDirectives') or (self.setting('enabledDirectives') and directiveName not in self.setting('enabledDirectives'))): for callback in self.setting('disabledDirectiveHooks'): callback(parser=self, directiveName=directiveName) raise ForbiddenDirective(self, msg='This %r directive is disabled'%directiveName) ## main parse loop def parse(self, breakPoint=None, assertEmptyStack=True): if breakPoint: origBP = self.breakPoint() self.setBreakPoint(breakPoint) assertEmptyStack = False while not self.atEnd(): if self.matchCommentStartToken(): self.eatComment() elif self.matchMultiLineCommentStartToken(): self.eatMultiLineComment() elif self.matchVariablePlaceholderStart(): self.eatPlaceholder() elif self.matchExpressionPlaceholderStart(): self.eatPlaceholder() elif self.matchDirective(): self.eatDirective() elif self.matchPSPStartToken(): self.eatPSP() elif self.matchEOLSlurpToken(): self.eatEOLSlurpToken() else: self.eatPlainText() if assertEmptyStack: self.assertEmptyOpenDirectivesStack() if breakPoint: self.setBreakPoint(origBP) ## non-directive eat methods def eatPlainText(self): startPos = self.pos() match = None while not self.atEnd(): match = self.matchTopLevelToken() if match: break else: self.advance() strConst = self.readTo(self.pos(), start=startPos) strConst = self._unescapeCheetahVars(strConst) strConst = self._unescapeDirectives(strConst) self._compiler.addStrConst(strConst) return match def eatComment(self): isLineClearToStartToken = self.isLineClearToStartToken() if isLineClearToStartToken: self._compiler.handleWSBeforeDirective() self.getCommentStartToken() comm = self.readToEOL(gobble=isLineClearToStartToken) self._compiler.addComment(comm) def eatMultiLineComment(self): isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLine = self.findEOL() self.getMultiLineCommentStartToken() endPos = startPos = self.pos() level = 1 while True: endPos = self.pos() if self.atEnd(): break if self.matchMultiLineCommentStartToken(): self.getMultiLineCommentStartToken() level += 1 elif self.matchMultiLineCommentEndToken(): self.getMultiLineCommentEndToken() level -= 1 if not level: break self.advance() comm = self.readTo(endPos, start=startPos) if not self.atEnd(): self.getMultiLineCommentEndToken() if (not self.atEnd()) and self.setting('gobbleWhitespaceAroundMultiLineComments'): restOfLine = self[self.pos():self.findEOL()] if not restOfLine.strip(): # WS only to EOL self.readToEOL(gobble=isLineClearToStartToken) if isLineClearToStartToken and (self.atEnd() or self.pos() > endOfFirstLine): self._compiler.handleWSBeforeDirective() self._compiler.addComment(comm) def eatPlaceholder(self): (expr, rawPlaceholder, lineCol, cacheTokenParts, filterArgs, isSilentPlaceholder) = self.getPlaceholder( allowCacheTokens=True, returnEverything=True) self._compiler.addPlaceholder( expr, filterArgs=filterArgs, rawPlaceholder=rawPlaceholder, cacheTokenParts=cacheTokenParts, lineCol=lineCol, silentMode=isSilentPlaceholder) return def eatPSP(self): # filtered self._filterDisabledDirectives(directiveName='psp') self.getPSPStartToken() endToken = self.setting('PSPEndToken') startPos = self.pos() while not self.atEnd(): if self.peek() == endToken[0]: if self.matchPSPEndToken(): break self.advance() pspString = self.readTo(self.pos(), start=startPos).strip() pspString = self._applyExpressionFilters(pspString, 'psp', startPos=startPos) self._compiler.addPSP(pspString) self.getPSPEndToken() ## generic directive eat methods _simpleIndentingDirectives = ''' else elif for while repeat unless try except finally'''.split() _simpleExprDirectives = ''' pass continue stop return yield break del assert raise silent echo import from'''.split() _directiveHandlerNames = {'import': 'addImportStatement', 'from': 'addImportStatement', } def eatDirective(self): directiveName = self.matchDirective() self._filterDisabledDirectives(directiveName) for callback in self.setting('preparseDirectiveHooks'): callback(parser=self, directiveName=directiveName) # subclasses can override the default behaviours here by providing an # eater method in self._directiveNamesAndParsers[directiveName] directiveParser = self._directiveNamesAndParsers.get(directiveName) if directiveParser: directiveParser() elif directiveName in self._simpleIndentingDirectives: handlerName = self._directiveHandlerNames.get(directiveName) if not handlerName: handlerName = 'add'+directiveName.capitalize() handler = getattr(self._compiler, handlerName) self.eatSimpleIndentingDirective(directiveName, callback=handler) elif directiveName in self._simpleExprDirectives: handlerName = self._directiveHandlerNames.get(directiveName) if not handlerName: handlerName = 'add'+directiveName.capitalize() handler = getattr(self._compiler, handlerName) if directiveName in ('silent', 'echo'): includeDirectiveNameInExpr = False else: includeDirectiveNameInExpr = True expr = self.eatSimpleExprDirective( directiveName, includeDirectiveNameInExpr=includeDirectiveNameInExpr) handler(expr) ## for callback in self.setting('postparseDirectiveHooks'): callback(parser=self, directiveName=directiveName) def _eatRestOfDirectiveTag(self, isLineClearToStartToken, endOfFirstLinePos): foundComment = False if self.matchCommentStartToken(): pos = self.pos() self.advance() if not self.matchDirective(): self.setPos(pos) foundComment = True self.eatComment() # this won't gobble the EOL else: self.setPos(pos) if not foundComment and self.matchDirectiveEndToken(): self.getDirectiveEndToken() elif isLineClearToStartToken and (not self.atEnd()) and self.peek() in '\r\n': # still gobble the EOL if a comment was found. self.readToEOL(gobble=True) if isLineClearToStartToken and (self.atEnd() or self.pos() > endOfFirstLinePos): self._compiler.handleWSBeforeDirective() def _eatToThisEndDirective(self, directiveName): finalPos = endRawPos = startPos = self.pos() directiveChar = self.setting('directiveStartToken')[0] isLineClearToStartToken = False while not self.atEnd(): if self.peek() == directiveChar: if self.matchDirective() == 'end': endRawPos = self.pos() self.getDirectiveStartToken() self.advance(len('end')) self.getWhiteSpace() if self.startswith(directiveName): if self.isLineClearToStartToken(endRawPos): isLineClearToStartToken = True endRawPos = self.findBOL(endRawPos) self.advance(len(directiveName)) # to end of directiveName self.getWhiteSpace() finalPos = self.pos() break self.advance() finalPos = endRawPos = self.pos() textEaten = self.readTo(endRawPos, start=startPos) self.setPos(finalPos) endOfFirstLinePos = self.findEOL() if self.matchDirectiveEndToken(): self.getDirectiveEndToken() elif isLineClearToStartToken and (not self.atEnd()) and self.peek() in '\r\n': self.readToEOL(gobble=True) if isLineClearToStartToken and self.pos() > endOfFirstLinePos: self._compiler.handleWSBeforeDirective() return textEaten def eatSimpleExprDirective(self, directiveName, includeDirectiveNameInExpr=True): # filtered isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLine = self.findEOL() self.getDirectiveStartToken() if not includeDirectiveNameInExpr: self.advance(len(directiveName)) startPos = self.pos() expr = self.getExpression().strip() directiveName = expr.split()[0] expr = self._applyExpressionFilters(expr, directiveName, startPos=startPos) if directiveName in self._closeableDirectives: self.pushToOpenDirectivesStack(directiveName) self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine) return expr def eatSimpleIndentingDirective(self, directiveName, callback, includeDirectiveNameInExpr=False): # filtered isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLinePos = self.findEOL() lineCol = self.getRowCol() self.getDirectiveStartToken() if directiveName not in 'else elif for while try except finally'.split(): self.advance(len(directiveName)) startPos = self.pos() self.getWhiteSpace() expr = self.getExpression(pyTokensToBreakAt=[':']) expr = self._applyExpressionFilters(expr, directiveName, startPos=startPos) if self.matchColonForSingleLineShortFormDirective(): self.advance() # skip over : if directiveName in 'else elif except finally'.split(): callback(expr, dedent=False, lineCol=lineCol) else: callback(expr, lineCol=lineCol) self.getWhiteSpace(max=1) self.parse(breakPoint=self.findEOL(gobble=True)) self._compiler.commitStrConst() self._compiler.dedent() else: if self.peek()==':': self.advance() self.getWhiteSpace() self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) if directiveName in self._closeableDirectives: self.pushToOpenDirectivesStack(directiveName) callback(expr, lineCol=lineCol) def eatEndDirective(self): isLineClearToStartToken = self.isLineClearToStartToken() self.getDirectiveStartToken() self.advance(3) # to end of 'end' self.getWhiteSpace() pos = self.pos() directiveName = False for key in self._endDirectiveNamesAndHandlers.keys(): if self.find(key, pos) == pos: directiveName = key break if not directiveName: raise ParseError(self, msg='Invalid end directive') endOfFirstLinePos = self.findEOL() self.getExpression() # eat in any extra comment-like crap self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) if directiveName in self._closeableDirectives: self.popFromOpenDirectivesStack(directiveName) # subclasses can override the default behaviours here by providing an # end-directive handler in self._endDirectiveNamesAndHandlers[directiveName] if self._endDirectiveNamesAndHandlers.get(directiveName): handler = self._endDirectiveNamesAndHandlers[directiveName] handler() elif directiveName in 'block capture cache call filter errorCatcher'.split(): if key == 'block': self._compiler.closeBlock() elif key == 'capture': self._compiler.endCaptureRegion() elif key == 'cache': self._compiler.endCacheRegion() elif key == 'call': self._compiler.endCallRegion() elif key == 'filter': self._compiler.closeFilterBlock() elif key == 'errorCatcher': self._compiler.turnErrorCatcherOff() elif directiveName in 'while for if try repeat unless'.split(): self._compiler.commitStrConst() self._compiler.dedent() elif directiveName=='closure': self._compiler.commitStrConst() self._compiler.dedent() # @@TR: temporary hack of useSearchList self.setSetting('useSearchList', self._useSearchList_orig) ## specific directive eat methods def eatBreakPoint(self): """Tells the parser to stop parsing at this point and completely ignore everything else. This is a debugging tool. """ self.setBreakPoint(self.pos()) def eatShbang(self): # filtered self.getDirectiveStartToken() self.advance(len('shBang')) self.getWhiteSpace() startPos = self.pos() shBang = self.readToEOL() shBang = self._applyExpressionFilters(shBang, 'shbang', startPos=startPos) self._compiler.setShBang(shBang.strip()) def eatEncoding(self): # filtered self.getDirectiveStartToken() self.advance(len('encoding')) self.getWhiteSpace() startPos = self.pos() encoding = self.readToEOL() encoding = self._applyExpressionFilters(encoding, 'encoding', startPos=startPos) self._compiler.setModuleEncoding(encoding.strip()) def eatCompiler(self): # filtered isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLine = self.findEOL() startPos = self.pos() self.getDirectiveStartToken() self.advance(len('compiler')) # to end of 'compiler' self.getWhiteSpace() startPos = self.pos() settingName = self.getIdentifier() if settingName.lower() == 'reset': self.getExpression() # gobble whitespace & junk self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine) self._initializeSettings() self.configureParser() return self.getWhiteSpace() if self.peek() == '=': self.advance() else: raise ParseError(self) valueExpr = self.getExpression() endPos = self.pos() # @@TR: it's unlikely that anyone apply filters would have left this # directive enabled: # @@TR: fix up filtering, regardless self._applyExpressionFilters('%s=%r'%(settingName, valueExpr), 'compiler', startPos=startPos) self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine) try: self._compiler.setCompilerSetting(settingName, valueExpr) except: sys.stderr.write('An error occurred while processing the following #compiler directive.\n') sys.stderr.write('----------------------------------------------------------------------\n') sys.stderr.write('%s\n' % self[startPos:endPos]) sys.stderr.write('----------------------------------------------------------------------\n') sys.stderr.write('Please check the syntax of these settings.\n\n') raise def eatCompilerSettings(self): # filtered isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLine = self.findEOL() self.getDirectiveStartToken() self.advance(len('compiler-settings')) # to end of 'settings' keywords = self.getTargetVarsList() self.getExpression() # gobble any garbage self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine) if 'reset' in keywords: self._compiler._initializeSettings() self.configureParser() # @@TR: this implies a single-line #compiler-settings directive, and # thus we should parse forward for an end directive. # Subject to change in the future return startPos = self.pos() settingsStr = self._eatToThisEndDirective('compiler-settings') settingsStr = self._applyExpressionFilters(settingsStr, 'compilerSettings', startPos=startPos) try: self._compiler.setCompilerSettings(keywords=keywords, settingsStr=settingsStr) except: sys.stderr.write('An error occurred while processing the following compiler settings.\n') sys.stderr.write('----------------------------------------------------------------------\n') sys.stderr.write('%s\n' % settingsStr.strip()) sys.stderr.write('----------------------------------------------------------------------\n') sys.stderr.write('Please check the syntax of these settings.\n\n') raise def eatAttr(self): # filtered isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLinePos = self.findEOL() startPos = self.pos() self.getDirectiveStartToken() self.advance(len('attr')) self.getWhiteSpace() startPos = self.pos() if self.matchCheetahVarStart(): self.getCheetahVarStartToken() attribName = self.getIdentifier() self.getWhiteSpace() self.getAssignmentOperator() expr = self.getExpression() expr = self._applyExpressionFilters(expr, 'attr', startPos=startPos) self._compiler.addAttribute(attribName, expr) self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) def eatDecorator(self): isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLinePos = self.findEOL() startPos = self.pos() self.getDirectiveStartToken() #self.advance() # eat @ startPos = self.pos() decoratorExpr = self.getExpression() decoratorExpr = self._applyExpressionFilters(decoratorExpr, 'decorator', startPos=startPos) self._compiler.addDecorator(decoratorExpr) self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) self.getWhiteSpace() directiveName = self.matchDirective() if not directiveName or directiveName not in ('def', 'block', 'closure', '@'): raise ParseError( self, msg='Expected #def, #block, #closure or another @decorator') self.eatDirective() def eatDef(self): # filtered self._eatDefOrBlock('def') def eatBlock(self): # filtered startPos = self.pos() methodName, rawSignature = self._eatDefOrBlock('block') self._compiler._blockMetaData[methodName] = { 'raw': rawSignature, 'lineCol': self.getRowCol(startPos), } def eatClosure(self): # filtered self._eatDefOrBlock('closure') def _eatDefOrBlock(self, directiveName): # filtered assert directiveName in ('def', 'block', 'closure') isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLinePos = self.findEOL() startPos = self.pos() self.getDirectiveStartToken() self.advance(len(directiveName)) self.getWhiteSpace() if self.matchCheetahVarStart(): self.getCheetahVarStartToken() methodName = self.getIdentifier() self.getWhiteSpace() if self.peek() == '(': argsList = self.getDefArgList() self.advance() # past the closing ')' if argsList and argsList[0][0] == 'self': del argsList[0] else: argsList=[] def includeBlockMarkers(): if self.setting('includeBlockMarkers'): startMarker = self.setting('blockMarkerStart') self._compiler.addStrConst(startMarker[0] + methodName + startMarker[1]) # @@TR: fix up filtering self._applyExpressionFilters(self[startPos:self.pos()], 'def', startPos=startPos) if self.matchColonForSingleLineShortFormDirective(): isNestedDef = (self.setting('allowNestedDefScopes') and [name for name in self._openDirectivesStack if name=='def']) self.getc() rawSignature = self[startPos:endOfFirstLinePos] self._eatSingleLineDef(directiveName=directiveName, methodName=methodName, argsList=argsList, startPos=startPos, endPos=endOfFirstLinePos) if directiveName == 'def' and not isNestedDef: #@@TR: must come before _eatRestOfDirectiveTag ... for some reason self._compiler.closeDef() elif directiveName == 'block': includeBlockMarkers() self._compiler.closeBlock() elif directiveName == 'closure' or isNestedDef: self._compiler.dedent() self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) else: if self.peek()==':': self.getc() self.pushToOpenDirectivesStack(directiveName) rawSignature = self[startPos:self.pos()] self._eatMultiLineDef(directiveName=directiveName, methodName=methodName, argsList=argsList, startPos=startPos, isLineClearToStartToken=isLineClearToStartToken) if directiveName == 'block': includeBlockMarkers() return methodName, rawSignature def _eatMultiLineDef(self, directiveName, methodName, argsList, startPos, isLineClearToStartToken=False): # filtered in calling method self.getExpression() # slurp up any garbage left at the end signature = self[startPos:self.pos()] endOfFirstLinePos = self.findEOL() self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) signature = ' '.join([line.strip() for line in signature.splitlines()]) parserComment = ('## CHEETAH: generated from ' + signature + ' at line %s, col %s' % self.getRowCol(startPos) + '.') isNestedDef = (self.setting('allowNestedDefScopes') and len([name for name in self._openDirectivesStack if name=='def'])>1) if directiveName=='block' or (directiveName=='def' and not isNestedDef): self._compiler.startMethodDef(methodName, argsList, parserComment) else: #closure self._useSearchList_orig = self.setting('useSearchList') self.setSetting('useSearchList', False) self._compiler.addClosure(methodName, argsList, parserComment) return methodName def _eatSingleLineDef(self, directiveName, methodName, argsList, startPos, endPos): # filtered in calling method fullSignature = self[startPos:endPos] parserComment = ('## Generated from ' + fullSignature + ' at line %s, col %s' % self.getRowCol(startPos) + '.') isNestedDef = (self.setting('allowNestedDefScopes') and [name for name in self._openDirectivesStack if name=='def']) if directiveName=='block' or (directiveName=='def' and not isNestedDef): self._compiler.startMethodDef(methodName, argsList, parserComment) else: #closure # @@TR: temporary hack of useSearchList useSearchList_orig = self.setting('useSearchList') self.setSetting('useSearchList', False) self._compiler.addClosure(methodName, argsList, parserComment) self.getWhiteSpace(max=1) self.parse(breakPoint=endPos) if directiveName=='closure' or isNestedDef: # @@TR: temporary hack of useSearchList self.setSetting('useSearchList', useSearchList_orig) def eatExtends(self): # filtered isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLine = self.findEOL() self.getDirectiveStartToken() self.advance(len('extends')) self.getWhiteSpace() startPos = self.pos() if self.setting('allowExpressionsInExtendsDirective'): baseName = self.getExpression() else: baseName = self.getCommaSeparatedSymbols() baseName = ', '.join(baseName) baseName = self._applyExpressionFilters(baseName, 'extends', startPos=startPos) self._compiler.setBaseClass(baseName) # in compiler self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine) def eatImplements(self): # filtered isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLine = self.findEOL() self.getDirectiveStartToken() self.advance(len('implements')) self.getWhiteSpace() startPos = self.pos() methodName = self.getIdentifier() if not self.atEnd() and self.peek() == '(': argsList = self.getDefArgList() self.advance() # past the closing ')' if argsList and argsList[0][0] == 'self': del argsList[0] else: argsList=[] # @@TR: need to split up filtering of the methodname and the args #methodName = self._applyExpressionFilters(methodName, 'implements', startPos=startPos) self._applyExpressionFilters(self[startPos:self.pos()], 'implements', startPos=startPos) self._compiler.setMainMethodName(methodName) self._compiler.setMainMethodArgs(argsList) self.getExpression() # throw away and unwanted crap that got added in self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine) def eatSuper(self): # filtered isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLine = self.findEOL() self.getDirectiveStartToken() self.advance(len('super')) self.getWhiteSpace() startPos = self.pos() if not self.atEnd() and self.peek() == '(': argsList = self.getDefArgList() self.advance() # past the closing ')' if argsList and argsList[0][0] == 'self': del argsList[0] else: argsList=[] self._applyExpressionFilters(self[startPos:self.pos()], 'super', startPos=startPos) #parserComment = ('## CHEETAH: generated from ' + signature + # ' at line %s, col %s' % self.getRowCol(startPos) # + '.') self.getExpression() # throw away and unwanted crap that got added in self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine) self._compiler.addSuper(argsList) def eatSet(self): # filtered isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLine = self.findEOL() self.getDirectiveStartToken() self.advance(3) self.getWhiteSpace() style = SET_LOCAL if self.startswith('local'): self.getIdentifier() self.getWhiteSpace() elif self.startswith('global'): self.getIdentifier() self.getWhiteSpace() style = SET_GLOBAL elif self.startswith('module'): self.getIdentifier() self.getWhiteSpace() style = SET_MODULE startsWithDollar = self.matchCheetahVarStart() startPos = self.pos() LVALUE = self.getExpression(pyTokensToBreakAt=assignmentOps, useNameMapper=False).strip() OP = self.getAssignmentOperator() RVALUE = self.getExpression() expr = LVALUE + ' ' + OP + ' ' + RVALUE.strip() expr = self._applyExpressionFilters(expr, 'set', startPos=startPos) self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine) class Components: pass # used for 'set global' exprComponents = Components() exprComponents.LVALUE = LVALUE exprComponents.OP = OP exprComponents.RVALUE = RVALUE self._compiler.addSet(expr, exprComponents, style) def eatSlurp(self): if self.isLineClearToStartToken(): self._compiler.handleWSBeforeDirective() self._compiler.commitStrConst() self.readToEOL(gobble=True) def eatEOLSlurpToken(self): if self.isLineClearToStartToken(): self._compiler.handleWSBeforeDirective() self._compiler.commitStrConst() self.readToEOL(gobble=True) def eatRaw(self): isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLinePos = self.findEOL() self.getDirectiveStartToken() self.advance(len('raw')) self.getWhiteSpace() if self.matchColonForSingleLineShortFormDirective(): self.advance() # skip over : self.getWhiteSpace(max=1) rawBlock = self.readToEOL(gobble=False) else: if self.peek()==':': self.advance() self.getWhiteSpace() self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) rawBlock = self._eatToThisEndDirective('raw') self._compiler.addRawText(rawBlock) def eatInclude(self): # filtered isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLinePos = self.findEOL() self.getDirectiveStartToken() self.advance(len('include')) self.getWhiteSpace() includeFrom = 'file' isRaw = False if self.startswith('raw'): self.advance(3) isRaw=True self.getWhiteSpace() if self.startswith('source'): self.advance(len('source')) includeFrom = 'str' self.getWhiteSpace() if not self.peek() == '=': raise ParseError(self) self.advance() startPos = self.pos() sourceExpr = self.getExpression() sourceExpr = self._applyExpressionFilters(sourceExpr, 'include', startPos=startPos) self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) self._compiler.addInclude(sourceExpr, includeFrom, isRaw) def eatDefMacro(self): # @@TR: not filtered yet isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLinePos = self.findEOL() self.getDirectiveStartToken() self.advance(len('defmacro')) self.getWhiteSpace() if self.matchCheetahVarStart(): self.getCheetahVarStartToken() macroName = self.getIdentifier() self.getWhiteSpace() if self.peek() == '(': argsList = self.getDefArgList(useNameMapper=False) self.advance() # past the closing ')' if argsList and argsList[0][0] == 'self': del argsList[0] else: argsList=[] assert macroName not in self._directiveNamesAndParsers argsList.insert(0, ('src', None)) argsList.append(('parser', 'None')) argsList.append(('macros', 'None')) argsList.append(('compilerSettings', 'None')) argsList.append(('isShortForm', 'None')) argsList.append(('EOLCharsInShortForm', 'None')) argsList.append(('startPos', 'None')) argsList.append(('endPos', 'None')) if self.matchColonForSingleLineShortFormDirective(): self.advance() # skip over : self.getWhiteSpace(max=1) macroSrc = self.readToEOL(gobble=False) self.readToEOL(gobble=True) else: if self.peek()==':': self.advance() self.getWhiteSpace() self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) macroSrc = self._eatToThisEndDirective('defmacro') #print argsList normalizedMacroSrc = ''.join( ['%def callMacro('+','.join([defv and '%s=%s'%(n, defv) or n for n, defv in argsList]) +')\n', macroSrc, '%end def']) from Cheetah.Template import Template templateAPIClass = self.setting('templateAPIClassForDefMacro', default=Template) compilerSettings = self.setting('compilerSettingsForDefMacro', default={}) searchListForMacros = self.setting('searchListForDefMacro', default=[]) searchListForMacros = list(searchListForMacros) # copy to avoid mutation bugs searchListForMacros.append({'macros': self._macros, 'parser': self, 'compilerSettings': self.settings(), }) templateAPIClass._updateSettingsWithPreprocessTokens( compilerSettings, placeholderToken='@', directiveToken='%') macroTemplateClass = templateAPIClass.compile(source=normalizedMacroSrc, compilerSettings=compilerSettings) #print normalizedMacroSrc #t = macroTemplateClass() #print t.callMacro('src') #print t.generatedClassCode() class MacroDetails: pass macroDetails = MacroDetails() macroDetails.macroSrc = macroSrc macroDetails.argsList = argsList macroDetails.template = macroTemplateClass(searchList=searchListForMacros) self._macroDetails[macroName] = macroDetails self._macros[macroName] = macroDetails.template.callMacro self._directiveNamesAndParsers[macroName] = self.eatMacroCall def eatMacroCall(self): isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLinePos = self.findEOL() startPos = self.pos() self.getDirectiveStartToken() macroName = self.getIdentifier() macro = self._macros[macroName] if hasattr(macro, 'parse'): return macro.parse(parser=self, startPos=startPos) if hasattr(macro, 'parseArgs'): args = macro.parseArgs(parser=self, startPos=startPos) else: self.getWhiteSpace() args = self.getExpression(useNameMapper=False, pyTokensToBreakAt=[':']).strip() if self.matchColonForSingleLineShortFormDirective(): isShortForm = True self.advance() # skip over : self.getWhiteSpace(max=1) srcBlock = self.readToEOL(gobble=False) EOLCharsInShortForm = self.readToEOL(gobble=True) #self.readToEOL(gobble=False) else: isShortForm = False if self.peek()==':': self.advance() self.getWhiteSpace() self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) srcBlock = self._eatToThisEndDirective(macroName) if hasattr(macro, 'convertArgStrToDict'): kwArgs = macro.convertArgStrToDict(args, parser=self, startPos=startPos) else: def getArgs(*pargs, **kws): return pargs, kws exec('positionalArgs, kwArgs = getArgs(%(args)s)'%locals()) assert 'src' not in kwArgs kwArgs['src'] = srcBlock if isinstance(macro, new.instancemethod): co = macro.im_func.func_code elif (hasattr(macro, '__call__') and hasattr(macro.__call__, 'im_func')): co = macro.__call__.im_func.func_code else: co = macro.func_code availableKwArgs = inspect.getargs(co)[0] if 'parser' in availableKwArgs: kwArgs['parser'] = self if 'macros' in availableKwArgs: kwArgs['macros'] = self._macros if 'compilerSettings' in availableKwArgs: kwArgs['compilerSettings'] = self.settings() if 'isShortForm' in availableKwArgs: kwArgs['isShortForm'] = isShortForm if isShortForm and 'EOLCharsInShortForm' in availableKwArgs: kwArgs['EOLCharsInShortForm'] = EOLCharsInShortForm if 'startPos' in availableKwArgs: kwArgs['startPos'] = startPos if 'endPos' in availableKwArgs: kwArgs['endPos'] = self.pos() srcFromMacroOutput = macro(**kwArgs) origParseSrc = self._src origBreakPoint = self.breakPoint() origPos = self.pos() # add a comment to the output about the macro src that is being parsed # or add a comment prefix to all the comments added by the compiler self._src = srcFromMacroOutput self.setPos(0) self.setBreakPoint(len(srcFromMacroOutput)) self.parse(assertEmptyStack=False) self._src = origParseSrc self.setBreakPoint(origBreakPoint) self.setPos(origPos) #self._compiler.addRawText('end') def eatCache(self): isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLinePos = self.findEOL() lineCol = self.getRowCol() self.getDirectiveStartToken() self.advance(len('cache')) startPos = self.pos() argList = self.getDefArgList(useNameMapper=True) argList = self._applyExpressionFilters(argList, 'cache', startPos=startPos) def startCache(): cacheInfo = self._compiler.genCacheInfoFromArgList(argList) self._compiler.startCacheRegion(cacheInfo, lineCol) if self.matchColonForSingleLineShortFormDirective(): self.advance() # skip over : self.getWhiteSpace(max=1) startCache() self.parse(breakPoint=self.findEOL(gobble=True)) self._compiler.endCacheRegion() else: if self.peek()==':': self.advance() self.getWhiteSpace() self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) self.pushToOpenDirectivesStack('cache') startCache() def eatCall(self): # @@TR: need to enable single line version of this isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLinePos = self.findEOL() lineCol = self.getRowCol() self.getDirectiveStartToken() self.advance(len('call')) startPos = self.pos() useAutocallingOrig = self.setting('useAutocalling') self.setSetting('useAutocalling', False) self.getWhiteSpace() if self.matchCheetahVarStart(): functionName = self.getCheetahVar() else: functionName = self.getCheetahVar(plain=True, skipStartToken=True) self.setSetting('useAutocalling', useAutocallingOrig) # @@TR: fix up filtering self._applyExpressionFilters(self[startPos:self.pos()], 'call', startPos=startPos) self.getWhiteSpace() args = self.getExpression(pyTokensToBreakAt=[':']).strip() if self.matchColonForSingleLineShortFormDirective(): self.advance() # skip over : self._compiler.startCallRegion(functionName, args, lineCol) self.getWhiteSpace(max=1) self.parse(breakPoint=self.findEOL(gobble=False)) self._compiler.endCallRegion() else: if self.peek()==':': self.advance() self.getWhiteSpace() self.pushToOpenDirectivesStack("call") self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) self._compiler.startCallRegion(functionName, args, lineCol) def eatCallArg(self): isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLinePos = self.findEOL() lineCol = self.getRowCol() self.getDirectiveStartToken() self.advance(len('arg')) startPos = self.pos() self.getWhiteSpace() argName = self.getIdentifier() self.getWhiteSpace() argName = self._applyExpressionFilters(argName, 'arg', startPos=startPos) self._compiler.setCallArg(argName, lineCol) if self.peek() == ':': self.getc() else: self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) def eatFilter(self): isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLinePos = self.findEOL() self.getDirectiveStartToken() self.advance(len('filter')) self.getWhiteSpace() startPos = self.pos() if self.matchCheetahVarStart(): isKlass = True theFilter = self.getExpression(pyTokensToBreakAt=[':']) else: isKlass = False theFilter = self.getIdentifier() self.getWhiteSpace() theFilter = self._applyExpressionFilters(theFilter, 'filter', startPos=startPos) if self.matchColonForSingleLineShortFormDirective(): self.advance() # skip over : self.getWhiteSpace(max=1) self._compiler.setFilter(theFilter, isKlass) self.parse(breakPoint=self.findEOL(gobble=False)) self._compiler.closeFilterBlock() else: if self.peek()==':': self.advance() self.getWhiteSpace() self.pushToOpenDirectivesStack("filter") self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) self._compiler.setFilter(theFilter, isKlass) def eatTransform(self): isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLinePos = self.findEOL() self.getDirectiveStartToken() self.advance(len('transform')) self.getWhiteSpace() startPos = self.pos() if self.matchCheetahVarStart(): isKlass = True transformer = self.getExpression(pyTokensToBreakAt=[':']) else: isKlass = False transformer = self.getIdentifier() self.getWhiteSpace() transformer = self._applyExpressionFilters(transformer, 'transform', startPos=startPos) if self.peek()==':': self.advance() self.getWhiteSpace() self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) self._compiler.setTransform(transformer, isKlass) def eatErrorCatcher(self): isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLinePos = self.findEOL() self.getDirectiveStartToken() self.advance(len('errorCatcher')) self.getWhiteSpace() startPos = self.pos() errorCatcherName = self.getIdentifier() errorCatcherName = self._applyExpressionFilters( errorCatcherName, 'errorcatcher', startPos=startPos) self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) self._compiler.setErrorCatcher(errorCatcherName) def eatCapture(self): # @@TR: this could be refactored to use the code in eatSimpleIndentingDirective # filtered isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLinePos = self.findEOL() lineCol = self.getRowCol() self.getDirectiveStartToken() self.advance(len('capture')) startPos = self.pos() self.getWhiteSpace() expr = self.getExpression(pyTokensToBreakAt=[':']) expr = self._applyExpressionFilters(expr, 'capture', startPos=startPos) if self.matchColonForSingleLineShortFormDirective(): self.advance() # skip over : self._compiler.startCaptureRegion(assignTo=expr, lineCol=lineCol) self.getWhiteSpace(max=1) self.parse(breakPoint=self.findEOL(gobble=False)) self._compiler.endCaptureRegion() else: if self.peek()==':': self.advance() self.getWhiteSpace() self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) self.pushToOpenDirectivesStack("capture") self._compiler.startCaptureRegion(assignTo=expr, lineCol=lineCol) def eatIf(self): # filtered isLineClearToStartToken = self.isLineClearToStartToken() endOfFirstLine = self.findEOL() lineCol = self.getRowCol() self.getDirectiveStartToken() startPos = self.pos() expressionParts = self.getExpressionParts(pyTokensToBreakAt=[':']) expr = ''.join(expressionParts).strip() expr = self._applyExpressionFilters(expr, 'if', startPos=startPos) isTernaryExpr = ('then' in expressionParts and 'else' in expressionParts) if isTernaryExpr: conditionExpr = [] trueExpr = [] falseExpr = [] currentExpr = conditionExpr for part in expressionParts: if part.strip()=='then': currentExpr = trueExpr elif part.strip()=='else': currentExpr = falseExpr else: currentExpr.append(part) conditionExpr = ''.join(conditionExpr) trueExpr = ''.join(trueExpr) falseExpr = ''.join(falseExpr) self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine) self._compiler.addTernaryExpr(conditionExpr, trueExpr, falseExpr, lineCol=lineCol) elif self.matchColonForSingleLineShortFormDirective(): self.advance() # skip over : self._compiler.addIf(expr, lineCol=lineCol) self.getWhiteSpace(max=1) self.parse(breakPoint=self.findEOL(gobble=True)) self._compiler.commitStrConst() self._compiler.dedent() else: if self.peek()==':': self.advance() self.getWhiteSpace() self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine) self.pushToOpenDirectivesStack('if') self._compiler.addIf(expr, lineCol=lineCol) ## end directive handlers def handleEndDef(self): isNestedDef = (self.setting('allowNestedDefScopes') and [name for name in self._openDirectivesStack if name=='def']) if not isNestedDef: self._compiler.closeDef() else: # @@TR: temporary hack of useSearchList self.setSetting('useSearchList', self._useSearchList_orig) self._compiler.commitStrConst() self._compiler.dedent() ### def pushToOpenDirectivesStack(self, directiveName): assert directiveName in self._closeableDirectives self._openDirectivesStack.append(directiveName) def popFromOpenDirectivesStack(self, directiveName): if not self._openDirectivesStack: raise ParseError(self, msg="#end found, but nothing to end") if self._openDirectivesStack[-1] == directiveName: del self._openDirectivesStack[-1] else: raise ParseError(self, msg="#end %s found, expected #end %s" %( directiveName, self._openDirectivesStack[-1])) def assertEmptyOpenDirectivesStack(self): if self._openDirectivesStack: errorMsg = ( "Some #directives are missing their corresponding #end ___ tag: %s" %( ', '.join(self._openDirectivesStack))) raise ParseError(self, msg=errorMsg) ################################################## ## Make an alias to export Parser = _HighLevelParser
ajibawa-2023/Python-Code-Large/train/row_1520
1,645
2,661
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0019, 0.0034, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nParser classes for Cheetah's Compiler\n\nClasses:\n ParseError( Exception )\n _LowLevelParser( Cheetah.SourceReader.SourceReader ), basically a lexer\n _HighLevelParser( _LowLevelParser )\n Parser === _HighLevelParser (an alias)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Import_L11_C0", "label": "os import os", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.0041, 0.0004, 0, 0.66, 0.0132, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Import_L12_C0", "label": "sys import sys", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.0045, 0.0004, 0, 0.66, 0.0263, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Import_L13_C0", "label": "re import re", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0049, 0.0004, 0, 0.66, 0.0395, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ImportFrom_L14_C0", "label": "from re import DOTALL, MULTILINE", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0053, 0.0004, 0, 0.66, 0.0526, 540, 0, 2, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["DOTALL", "MULTILINE"], "rhs_call_name": "", "annotation": ""}, "snippet": "from re import DOTALL, MULTILINE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ImportFrom_L15_C0", "label": "from types import StringType, ListType, TupleType\u2026", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0056, 0.0004, 0, 0.66, 0.0658, 209, 0, 5, 0, 0, 209, 0, 0], "semantic": {"name": "types", "arg_names": [], "import_names": ["StringType", "ListType", "TupleType", "ClassType", "TypeType"], "rhs_call_name": "", "annotation": ""}, "snippet": "from types import StringType, ListType, TupleType, ClassType, TypeType"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Import_L16_C0", "label": "time import time", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.006, 0.0004, 0, 0.66, 0.0789, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ImportFrom_L17_C0", "label": "from tokenize import pseudoprog", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.0064, 0.0004, 0, 0.66, 0.0921, 841, 0, 1, 0, 0, 841, 0, 0], "semantic": {"name": "tokenize", "arg_names": [], "import_names": ["pseudoprog"], "rhs_call_name": "", "annotation": ""}, "snippet": "from tokenize import pseudoprog"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Import_L18_C0", "label": "inspect import inspect", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0068, 0.0004, 0, 0.66, 0.1053, 878, 0, 1, 0, 0, 878, 0, 0], "semantic": {"name": "inspect", "arg_names": [], "import_names": ["inspect"], "rhs_call_name": "", "annotation": ""}, "snippet": "import inspect"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Import_L19_C0", "label": "new import new", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.0071, 0.0004, 0, 0.66, 0.1184, 145, 0, 1, 0, 0, 145, 0, 0], "semantic": {"name": "new", "arg_names": [], "import_names": ["new"], "rhs_call_name": "", "annotation": ""}, "snippet": "import new"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Import_L20_C0", "label": "traceback import traceback", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.0075, 0.0004, 0, 0.66, 0.1316, 423, 0, 1, 0, 0, 423, 0, 0], "semantic": {"name": "traceback", "arg_names": [], "import_names": ["traceback"], "rhs_call_name": "", "annotation": ""}, "snippet": "import traceback"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ImportFrom_L22_C0", "label": "from Cheetah.SourceReader import SourceReader", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.0083, 0.0004, 0, 0.66, 0.1447, 895, 0, 1, 0, 0, 895, 0, 0], "semantic": {"name": "Cheetah.SourceReader", "arg_names": [], "import_names": ["SourceReader"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.SourceReader import SourceReader"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ImportFrom_L23_C0", "label": "from Cheetah import Filters", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.0086, 0.0004, 0, 0.66, 0.1579, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "Cheetah", "arg_names": [], "import_names": ["Filters"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah import Filters"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ImportFrom_L24_C0", "label": "from Cheetah import ErrorCatchers", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.009, 0.0004, 0, 0.66, 0.1711, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "Cheetah", "arg_names": [], "import_names": ["ErrorCatchers"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah import ErrorCatchers"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ImportFrom_L25_C0", "label": "from Cheetah.Unspecified import Unspecified", "type": "import", "loc": [25, 25], "level": 0, "parent": null, "vector": [1, 0, 0.0094, 0.0004, 0, 0.66, 0.1842, 187, 0, 1, 0, 0, 187, 0, 0], "semantic": {"name": "Cheetah.Unspecified", "arg_names": [], "import_names": ["Unspecified"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Unspecified import Unspecified"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ImportFrom_L26_C0", "label": "from Cheetah.Macros.I18n import I18n", "type": "import", "loc": [26, 26], "level": 0, "parent": null, "vector": [1, 0, 0.0098, 0.0004, 0, 0.66, 0.1974, 78, 0, 1, 0, 0, 78, 0, 0], "semantic": {"name": "Cheetah.Macros.I18n", "arg_names": [], "import_names": ["I18n"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Macros.I18n import I18n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L29_C0", "label": "_regexCache =", "type": "assigned_variable", "loc": [29, 29], "level": 0, "parent": null, "vector": [14, 0, 0.0109, 0.0004, 0, 0.66, 0.2105, 379, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "_regexCache", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "_regexCache = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L30_C0", "label": "cachedRegex", "type": "function", "loc": [30, 33], "level": 0, "parent": null, "vector": [2, 0, 0.0118, 0.0015, 0, 0.66, 0.2237, 808, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "cachedRegex", "arg_names": ["pattern"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def cachedRegex(pattern):\n if pattern not in _regexCache:\n _regexCache[pattern] = re.compile(pattern)\n return _regexCache[pattern]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L31_C4", "label": "if", "type": "if", "loc": [31, 32], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L30_C0", "vector": [4, 1, 0.0118, 0.0008, 1, 0.95, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pattern not in _regexCache:\n _regexCache[pattern] = re.compile(pattern)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L32_C8", "label": " = compile()", "type": "assigned_variable", "loc": [32, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L31_C4", "vector": [14, 2, 0.012, 0.0004, 2, 0.47, 0.0, 0, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " _regexCache[pattern] = re.compile(pattern)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L33_C4", "label": "return", "type": "return", "loc": [33, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L30_C0", "vector": [13, 1, 0.0124, 0.0004, 1, 0.95, 1.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return _regexCache[pattern]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L35_C0", "label": "escapeRegexChars", "type": "function", "loc": [35, 40], "level": 0, "parent": null, "vector": [2, 0, 0.0141, 0.0023, 0, 0.66, 0.2368, 502, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "escapeRegexChars", "arg_names": ["txt", "escapeRE"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def escapeRegexChars(txt,\n escapeRE=re.compile(r'([\\$\\^\\*\\+\\.\\?\\{\\}\\[\\]\\(\\)\\|\\\\])')):\n \n \"\"\"Return a txt with all special regular expressions chars escaped.\"\"\"\n \n return escapeRE.sub(r'\\\\\\1', txt)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L38_C4", "label": "expression", "type": "expression", "loc": [38, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L35_C0", "vector": [8, 1, 0.0143, 0.0004, 1, 0.65, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Return a txt with all special regular expressions chars escaped.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L40_C4", "label": "return", "type": "return", "loc": [40, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L35_C0", "vector": [13, 1, 0.015, 0.0004, 1, 0.65, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return escapeRE.sub(r'\\\\\\1', txt)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L42_C0", "label": "group", "type": "function", "loc": [42, 42], "level": 0, "parent": null, "vector": [2, 0, 0.0158, 0.0004, 0, 0.66, 0.25, 43, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "group", "arg_names": ["choices"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def group(*choices): return '(' + '|'.join(choices) + ')'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L42_C21", "label": "return", "type": "return", "loc": [42, 42], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L42_C0", "vector": [13, 1, 0.0158, 0.0004, 1, 0.97, 0.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def group(*choices): return '(' + '|'.join(choices) + ')'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L43_C0", "label": "nongroup", "type": "function", "loc": [43, 43], "level": 0, "parent": null, "vector": [2, 0, 0.0162, 0.0004, 0, 0.66, 0.2632, 500, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "nongroup", "arg_names": ["choices"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def nongroup(*choices): return '(?:' + '|'.join(choices) + ')'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L43_C24", "label": "return", "type": "return", "loc": [43, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L43_C0", "vector": [13, 1, 0.0162, 0.0004, 1, 0.1, 0.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def nongroup(*choices): return '(?:' + '|'.join(choices) + ')'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L44_C0", "label": "namedGroup", "type": "function", "loc": [44, 44], "level": 0, "parent": null, "vector": [2, 0, 0.0165, 0.0004, 0, 0.66, 0.2763, 954, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "namedGroup", "arg_names": ["name", "choices"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def namedGroup(name, *choices): return '(P:<' + name +'>' + '|'.join(choices) + ')'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L44_C32", "label": "return", "type": "return", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L44_C0", "vector": [13, 1, 0.0165, 0.0004, 1, 0.25, 0.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def namedGroup(name, *choices): return '(P:<' + name +'>' + '|'.join(choices) + ')'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L45_C0", "label": "any", "type": "function", "loc": [45, 45], "level": 0, "parent": null, "vector": [2, 0, 0.0169, 0.0004, 0, 0.66, 0.2895, 277, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "any", "arg_names": ["choices"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def any(*choices): return group(*choices) + '*'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L45_C19", "label": "return", "type": "return", "loc": [45, 45], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L45_C0", "vector": [13, 1, 0.0169, 0.0004, 1, 0.45, 0.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def any(*choices): return group(*choices) + '*'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L46_C0", "label": "maybe", "type": "function", "loc": [46, 46], "level": 0, "parent": null, "vector": [2, 0, 0.0173, 0.0004, 0, 0.66, 0.3026, 763, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "maybe", "arg_names": ["choices"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def maybe(*choices): return group(*choices) + '?'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L46_C21", "label": "return", "type": "return", "loc": [46, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L46_C0", "vector": [13, 1, 0.0173, 0.0004, 1, 0.82, 0.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def maybe(*choices): return group(*choices) + '?'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L51_C0", "label": "NO_CACHE =", "type": "assigned_variable", "loc": [51, 51], "level": 0, "parent": null, "vector": [14, 0, 0.0192, 0.0004, 0, 0.66, 0.3158, 848, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "NO_CACHE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "NO_CACHE = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L52_C0", "label": "STATIC_CACHE =", "type": "assigned_variable", "loc": [52, 52], "level": 0, "parent": null, "vector": [14, 0, 0.0195, 0.0004, 0, 0.66, 0.3289, 827, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "STATIC_CACHE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "STATIC_CACHE = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L53_C0", "label": "REFRESH_CACHE =", "type": "assigned_variable", "loc": [53, 53], "level": 0, "parent": null, "vector": [14, 0, 0.0199, 0.0004, 0, 0.66, 0.3421, 736, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "REFRESH_CACHE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "REFRESH_CACHE = 2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L55_C0", "label": "SET_LOCAL =", "type": "assigned_variable", "loc": [55, 55], "level": 0, "parent": null, "vector": [14, 0, 0.0207, 0.0004, 0, 0.66, 0.3553, 469, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "SET_LOCAL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "SET_LOCAL = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L56_C0", "label": "SET_GLOBAL =", "type": "assigned_variable", "loc": [56, 56], "level": 0, "parent": null, "vector": [14, 0, 0.021, 0.0004, 0, 0.66, 0.3684, 422, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "SET_GLOBAL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "SET_GLOBAL = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L57_C0", "label": "SET_MODULE =", "type": "assigned_variable", "loc": [57, 57], "level": 0, "parent": null, "vector": [14, 0, 0.0214, 0.0004, 0, 0.66, 0.3816, 896, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "SET_MODULE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "SET_MODULE = 2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L63_C0", "label": "identchars =", "type": "assigned_variable", "loc": [63, 64], "level": 0, "parent": null, "vector": [14, 0, 0.0239, 0.0008, 0, 0.66, 0.3947, 322, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "identchars", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "identchars = \"abcdefghijklmnopqrstuvwxyz\" \\\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZ_\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L65_C0", "label": "namechars =", "type": "assigned_variable", "loc": [65, 65], "level": 0, "parent": null, "vector": [14, 0, 0.0244, 0.0004, 0, 0.66, 0.4079, 103, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "namechars", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "namechars = identchars + \"0123456789\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L68_C0", "label": "powerOp =", "type": "assigned_variable", "loc": [68, 68], "level": 0, "parent": null, "vector": [14, 0, 0.0256, 0.0004, 0, 0.66, 0.4211, 436, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "powerOp", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "powerOp = '**'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L69_C0", "label": "unaryArithOps =", "type": "assigned_variable", "loc": [69, 69], "level": 0, "parent": null, "vector": [14, 0, 0.0259, 0.0004, 0, 0.66, 0.4342, 292, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "unaryArithOps", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "unaryArithOps = ('+', '-', '~')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L70_C0", "label": "binaryArithOps =", "type": "assigned_variable", "loc": [70, 70], "level": 0, "parent": null, "vector": [14, 0, 0.0263, 0.0004, 0, 0.66, 0.4474, 801, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "binaryArithOps", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "binaryArithOps = ('+', '-', '/', '//', '%')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L71_C0", "label": "shiftOps =", "type": "assigned_variable", "loc": [71, 71], "level": 0, "parent": null, "vector": [14, 0, 0.0267, 0.0004, 0, 0.66, 0.4605, 368, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "shiftOps", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "shiftOps = ('>>', '<<')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L72_C0", "label": "bitwiseOps =", "type": "assigned_variable", "loc": [72, 72], "level": 0, "parent": null, "vector": [14, 0, 0.0271, 0.0004, 0, 0.66, 0.4737, 381, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "bitwiseOps", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "bitwiseOps = ('&', '|', '^')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L73_C0", "label": "assignOp =", "type": "assigned_variable", "loc": [73, 73], "level": 0, "parent": null, "vector": [14, 0, 0.0274, 0.0004, 0, 0.66, 0.4868, 519, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "assignOp", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "assignOp = '='"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L74_C0", "label": "augAssignOps =", "type": "assigned_variable", "loc": [74, 75], "level": 0, "parent": null, "vector": [14, 0, 0.028, 0.0008, 0, 0.66, 0.5, 133, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "augAssignOps", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "augAssignOps = ('+=', '-=', '/=', '*=', '**=', '^=', '%=',\n '>>=', '<<=', '&=', '|=', )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L76_C0", "label": "assignmentOps =", "type": "assigned_variable", "loc": [76, 76], "level": 0, "parent": null, "vector": [14, 0, 0.0286, 0.0004, 0, 0.66, 0.5132, 868, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "assignmentOps", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "assignmentOps = (assignOp,) + augAssignOps"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L78_C0", "label": "compOps =", "type": "assigned_variable", "loc": [78, 78], "level": 0, "parent": null, "vector": [14, 0, 0.0293, 0.0004, 0, 0.66, 0.5263, 286, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "compOps", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "compOps = ('<', '>', '==', '!=', '<=', '>=', '<>', 'is', 'in',)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L79_C0", "label": "booleanOps =", "type": "assigned_variable", "loc": [79, 79], "level": 0, "parent": null, "vector": [14, 0, 0.0297, 0.0004, 0, 0.66, 0.5395, 897, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "booleanOps", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "booleanOps = ('and', 'or', 'not')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L80_C0", "label": "operators =", "type": "assigned_variable", "loc": [80, 82], "level": 0, "parent": null, "vector": [14, 0, 0.0304, 0.0011, 0, 0.66, 0.5526, 195, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "operators", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "operators = (powerOp,) + unaryArithOps + binaryArithOps \\\n + shiftOps + bitwiseOps + assignmentOps \\\n + compOps + booleanOps"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L84_C0", "label": "delimeters =", "type": "assigned_variable", "loc": [84, 85], "level": 0, "parent": null, "vector": [14, 0, 0.0318, 0.0008, 0, 0.66, 0.5658, 288, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "delimeters", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "delimeters = ('(', ')', '{', '}', '[', ']',\n ',', '.', ':', ';', '=', '`') + augAssignOps"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L88_C0", "label": "keywords =", "type": "assigned_variable", "loc": [88, 94], "level": 0, "parent": null, "vector": [14, 0, 0.0342, 0.0026, 0, 0.66, 0.5789, 211, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "keywords", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "keywords = ('and', 'del', 'for', 'is', 'raise',\n 'assert', 'elif', 'from', 'lambda', 'return',\n 'break', 'else', 'global', 'not', 'try', \n 'class', 'except', 'if', 'or', 'while',\n 'continue', 'exec', 'import', 'pass',\n 'def', 'finally', 'in', 'print',\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L96_C0", "label": "single3 =", "type": "assigned_variable", "loc": [96, 96], "level": 0, "parent": null, "vector": [14, 0, 0.0361, 0.0004, 0, 0.66, 0.5921, 102, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "single3", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "single3 = \"'''\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L97_C0", "label": "double3 =", "type": "assigned_variable", "loc": [97, 97], "level": 0, "parent": null, "vector": [14, 0, 0.0365, 0.0004, 0, 0.66, 0.6053, 132, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "double3", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "double3 = '\"\"\"'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L99_C0", "label": "tripleQuotedStringStarts =", "type": "assigned_variable", "loc": [99, 103], "level": 0, "parent": null, "vector": [14, 0, 0.038, 0.0019, 0, 0.66, 0.6184, 749, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "tripleQuotedStringStarts", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "tripleQuotedStringStarts = (\"'''\", '\"\"\"', \n \"r'''\", 'r\"\"\"', \"R'''\", 'R\"\"\"',\n \"u'''\", 'u\"\"\"', \"U'''\", 'U\"\"\"',\n \"ur'''\", 'ur\"\"\"', \"Ur'''\", 'Ur\"\"\"',\n \"uR'''\", 'uR\"\"\"', \"UR'''\", 'UR\"\"\"')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L105_C0", "label": "tripleQuotedStringPairs =", "type": "assigned_variable", "loc": [105, 114], "level": 0, "parent": null, "vector": [14, 0, 0.0411, 0.0038, 0, 0.66, 0.6316, 549, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "tripleQuotedStringPairs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "tripleQuotedStringPairs = {\"'''\": single3, '\"\"\"': double3,\n \"r'''\": single3, 'r\"\"\"': double3,\n \"u'''\": single3, 'u\"\"\"': double3,\n \"ur'''\": single3, 'ur\"\"\"': double3,\n \"R'''\": single3, 'R\"\"\"': double3,\n \"U'''\": single3, 'U\"\"\"': double3,\n \"uR'''\": single3, 'uR\"\"\"': double3,\n \"Ur'''\": single3, 'Ur\"\"\"': double3,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L116_C0", "label": "closurePairs =", "type": "assigned_variable", "loc": [116, 116], "level": 0, "parent": null, "vector": [14, 0, 0.0436, 0.0004, 0, 0.66, 0.6447, 200, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "closurePairs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "closurePairs= {')':'(',']':'[','}':'{'}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L117_C0", "label": "closurePairsRev =", "type": "assigned_variable", "loc": [117, 117], "level": 0, "parent": null, "vector": [14, 0, 0.044, 0.0004, 0, 0.66, 0.6579, 164, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "closurePairsRev", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "closurePairsRev= {'(':')','[':']','{':'}'}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L122_C0", "label": "tripleQuotedStringREs =", "type": "assigned_variable", "loc": [122, 122], "level": 0, "parent": null, "vector": [14, 0, 0.0458, 0.0004, 0, 0.66, 0.6711, 264, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "tripleQuotedStringREs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "tripleQuotedStringREs = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L123_C0", "label": "makeTripleQuoteRe", "type": "function", "loc": [123, 126], "level": 0, "parent": null, "vector": [2, 0, 0.0468, 0.0015, 0, 0.66, 0.6842, 860, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "makeTripleQuoteRe", "arg_names": ["start", "end"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def makeTripleQuoteRe(start, end):\n start = escapeRegexChars(start)\n end = escapeRegexChars(end)\n return re.compile(r'(?:' + start + r').*?' + r'(?:' + end + r')', re.DOTALL)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L124_C4", "label": "start = escapeRegexChars()", "type": "assigned_variable", "loc": [124, 124], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L123_C0", "vector": [14, 1, 0.0466, 0.0004, 1, 0.6, 0.0, 511, 3, 1, 0, 0, 502, 10, 1], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "escapeRegexChars", "annotation": ""}, "snippet": " start = escapeRegexChars(start)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L125_C4", "label": "end = escapeRegexChars()", "type": "assigned_variable", "loc": [125, 125], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L123_C0", "vector": [14, 1, 0.047, 0.0004, 1, 0.6, 0.5, 128, 3, 1, 0, 0, 502, 10, 1], "semantic": {"name": "end", "arg_names": [], "import_names": [], "rhs_call_name": "escapeRegexChars", "annotation": ""}, "snippet": " end = escapeRegexChars(end)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L126_C4", "label": "return", "type": "return", "loc": [126, 126], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L123_C0", "vector": [13, 1, 0.0474, 0.0004, 1, 0.6, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return re.compile(r'(?:' + start + r').*?' + r'(?:' + end + r')', re.DOTALL)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L128_C0", "label": "for start, end", "type": "for", "loc": [128, 129], "level": 0, "parent": null, "vector": [6, 0, 0.0483, 0.0008, 0, 0.66, 0.6974, 670, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "start, end", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for start, end in tripleQuotedStringPairs.items():\n tripleQuotedStringREs[start] = makeTripleQuoteRe(start, end)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L129_C4", "label": " = makeTripleQuoteRe()", "type": "assigned_variable", "loc": [129, 129], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L128_C0", "vector": [14, 1, 0.0485, 0.0004, 1, 0.43, 0.0, 0, 3, 2, 0, 0, 860, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "makeTripleQuoteRe", "annotation": ""}, "snippet": " tripleQuotedStringREs[start] = makeTripleQuoteRe(start, end)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L131_C0", "label": "WS =", "type": "assigned_variable", "loc": [131, 131], "level": 0, "parent": null, "vector": [14, 0, 0.0492, 0.0004, 0, 0.66, 0.7105, 690, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "WS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "WS = r'[ \\f\\t]*' "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L132_C0", "label": "EOL =", "type": "assigned_variable", "loc": [132, 132], "level": 0, "parent": null, "vector": [14, 0, 0.0496, 0.0004, 0, 0.66, 0.7237, 719, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "EOL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "EOL = r'\\r\\n|\\n|\\r'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L133_C0", "label": "EOLZ =", "type": "assigned_variable", "loc": [133, 133], "level": 0, "parent": null, "vector": [14, 0, 0.05, 0.0004, 0, 0.66, 0.7368, 605, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "EOLZ", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "EOLZ = EOL + r'|\\Z'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L134_C0", "label": "escCharLookBehind = nongroup()", "type": "assigned_variable", "loc": [134, 134], "level": 0, "parent": null, "vector": [14, 0, 0.0504, 0.0004, 0, 0.66, 0.75, 566, 3, 2, 0, 0, 500, 10, 1], "semantic": {"name": "escCharLookBehind", "arg_names": [], "import_names": [], "rhs_call_name": "nongroup", "annotation": ""}, "snippet": "escCharLookBehind = nongroup(r'(?<=\\A)', r'(?<!\\\\)')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L135_C0", "label": "nameCharLookAhead =", "type": "assigned_variable", "loc": [135, 135], "level": 0, "parent": null, "vector": [14, 0, 0.0507, 0.0004, 0, 0.66, 0.7632, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "nameCharLookAhead", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "nameCharLookAhead = r'(?=[A-Za-z_])'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L136_C0", "label": "identRE = compile()", "type": "assigned_variable", "loc": [136, 136], "level": 0, "parent": null, "vector": [14, 0, 0.0511, 0.0004, 0, 0.66, 0.7763, 138, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "identRE", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "identRE=re.compile(r'[a-zA-Z_][a-zA-Z_0-9]*')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L137_C0", "label": "EOLre = compile()", "type": "assigned_variable", "loc": [137, 137], "level": 0, "parent": null, "vector": [14, 0, 0.0515, 0.0004, 0, 0.66, 0.7895, 682, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "EOLre", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "EOLre=re.compile(r'(?:\\r\\n|\\r|\\n)')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L139_C0", "label": "specialVarRE = compile()", "type": "assigned_variable", "loc": [139, 139], "level": 0, "parent": null, "vector": [14, 0, 0.0522, 0.0004, 0, 0.66, 0.8026, 480, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "specialVarRE", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "specialVarRE=re.compile(r'([a-zA-z_]+)@') # for matching specialVar comments"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L142_C0", "label": "unicodeDirectiveRE = compile()", "type": "assigned_variable", "loc": [142, 143], "level": 0, "parent": null, "vector": [14, 0, 0.0536, 0.0008, 0, 0.66, 0.8158, 563, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "unicodeDirectiveRE", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "unicodeDirectiveRE = re.compile(\n r'(?:^|\\r\\n|\\r|\\n)\\s*#\\s{0,5}unicode[:\\s]*([-\\w.]*)\\s*(?:\\r\\n|\\r|\\n)', re.MULTILINE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L144_C0", "label": "encodingDirectiveRE = compile()", "type": "assigned_variable", "loc": [144, 145], "level": 0, "parent": null, "vector": [14, 0, 0.0543, 0.0008, 0, 0.66, 0.8289, 699, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "encodingDirectiveRE", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "encodingDirectiveRE = re.compile(\n r'(?:^|\\r\\n|\\r|\\n)\\s*#\\s{0,5}encoding[:\\s]*([-\\w.]*)\\s*(?:\\r\\n|\\r|\\n)', re.MULTILINE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L147_C0", "label": "escapedNewlineRE = compile()", "type": "assigned_variable", "loc": [147, 147], "level": 0, "parent": null, "vector": [14, 0, 0.0552, 0.0004, 0, 0.66, 0.8421, 196, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "escapedNewlineRE", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "escapedNewlineRE = re.compile(r'(?<!\\\\)((\\\\\\\\)*)\\\\(n|012)')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L149_C0", "label": "directiveNamesAndParsers =", "type": "assigned_variable", "loc": [149, 219], "level": 0, "parent": null, "vector": [14, 0, 0.0691, 0.0267, 0, 0.66, 0.8553, 217, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "directiveNamesAndParsers", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "directiveNamesAndParsers = {\n # importing and inheritance\n 'import': None,\n 'from': None,\n 'extends': 'eatExtends',\n 'implements': 'eatImplements',\n 'super': 'eatSuper',\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L221_C0", "label": "endDirectiveNamesAndHandlers =", "type": "assigned_variable", "loc": [221, 236], "level": 0, "parent": null, "vector": [14, 0, 0.0859, 0.006, 0, 0.66, 0.8684, 849, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "endDirectiveNamesAndHandlers", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "endDirectiveNamesAndHandlers = {\n 'def': 'handleEndDef', # has short-form\n 'block': None, # has short-form\n 'closure': None, # has short-form\n 'cache': None, # has short-form\n 'call': None, # has short-form\n 'capture': None, # has short-form\n 'filter': None,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L243_C0", "label": "ParseError", "type": "class", "loc": [243, 303], "level": 0, "parent": null, "vector": [3, 0, 0.1026, 0.0229, 0, 0.66, 0.8816, 260, 0, 3, 0, 0, 690, 0, 18], "semantic": {"name": "ParseError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ParseError(ValueError):\n def __init__(self, stream, msg='Invalid Syntax', extMsg='', lineno=None, col=None):\n self.stream = stream\n if stream.pos() >= len(stream):\n stream.setPos(len(stream) -1)\n self.msg = msg\n self.extMsg = extMsg\n self.lineno = lineno"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L244_C4", "label": "__init__", "type": "function", "loc": [244, 251], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L243_C0", "vector": [2, 1, 0.093, 0.003, 1, 0.69, 0.0, 555, 0, 6, 0, 0, 0, 0, 4], "semantic": {"name": "__init__", "arg_names": ["self", "stream", "msg", "extMsg", "lineno", "col"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, stream, msg='Invalid Syntax', extMsg='', lineno=None, col=None):\n self.stream = stream\n if stream.pos() >= len(stream):\n stream.setPos(len(stream) -1)\n self.msg = msg\n self.extMsg = extMsg\n self.lineno = lineno\n self.col = col"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L245_C8", "label": "self.stream =", "type": "assigned_variable", "loc": [245, 245], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L244_C4", "vector": [14, 2, 0.0921, 0.0004, 2, 0.63, 0.0, 207, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.stream", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.stream = stream"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L246_C8", "label": "if", "type": "if", "loc": [246, 247], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L244_C4", "vector": [4, 2, 0.0926, 0.0008, 2, 0.63, 0.2, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if stream.pos() >= len(stream):\n stream.setPos(len(stream) -1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L247_C12", "label": "setPos()", "type": "expression", "loc": [247, 247], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L246_C8", "vector": [8, 3, 0.0928, 0.0004, 3, 0.81, 0.0, 659, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " stream.setPos(len(stream) -1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L248_C8", "label": "self.msg =", "type": "assigned_variable", "loc": [248, 248], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L244_C4", "vector": [14, 2, 0.0932, 0.0004, 2, 0.63, 0.4, 528, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.msg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.msg = msg"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L249_C8", "label": "self.extMsg =", "type": "assigned_variable", "loc": [249, 249], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L244_C4", "vector": [14, 2, 0.0936, 0.0004, 2, 0.63, 0.6, 481, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.extMsg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.extMsg = extMsg"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L250_C8", "label": "self.lineno =", "type": "assigned_variable", "loc": [250, 250], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L244_C4", "vector": [14, 2, 0.0939, 0.0004, 2, 0.63, 0.8, 66, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.lineno", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.lineno = lineno"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L251_C8", "label": "self.col =", "type": "assigned_variable", "loc": [251, 251], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L244_C4", "vector": [14, 2, 0.0943, 0.0004, 2, 0.63, 1.0, 11, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.col", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.col = col"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L253_C4", "label": "__str__", "type": "function", "loc": [253, 254], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L243_C0", "vector": [2, 1, 0.0953, 0.0008, 1, 0.69, 0.5, 527, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "__str__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __str__(self):\n return self.report()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L254_C8", "label": "return", "type": "return", "loc": [254, 254], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L253_C4", "vector": [13, 2, 0.0955, 0.0004, 2, 0.21, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.report()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "label": "report", "type": "function", "loc": [256, 303], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L243_C0", "vector": [2, 1, 0.105, 0.018, 1, 0.69, 1.0, 57, 0, 1, 1, 0, 0, 0, 13], "semantic": {"name": "report", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def report(self):\n stream = self.stream\n if stream.filename():\n f = \" in file %s\" % stream.filename()\n else:\n f = ''\n report = ''\n if self.lineno:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L257_C8", "label": "stream =", "type": "assigned_variable", "loc": [257, 257], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "vector": [14, 2, 0.0966, 0.0004, 2, 0.76, 0.0, 517, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "stream", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " stream = self.stream"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L258_C8", "label": "if", "type": "if", "loc": [258, 261], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "vector": [4, 2, 0.0975, 0.0015, 2, 0.76, 0.0769, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if stream.filename():\n f = \" in file %s\" % stream.filename()\n else:\n f = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L259_C12", "label": "f =", "type": "assigned_variable", "loc": [259, 259], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L258_C8", "vector": [14, 3, 0.0973, 0.0004, 3, 0.98, 0.0, 899, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " f = \" in file %s\" % stream.filename()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L261_C12", "label": "f =", "type": "assigned_variable", "loc": [261, 261], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L258_C8", "vector": [14, 3, 0.0981, 0.0004, 3, 0.98, 1.0, 899, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " f = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L262_C8", "label": "report =", "type": "assigned_variable", "loc": [262, 262], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "vector": [14, 2, 0.0985, 0.0004, 2, 0.76, 0.1538, 57, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "report", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " report = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L263_C8", "label": "if", "type": "if", "loc": [263, 268], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "vector": [4, 2, 0.0998, 0.0023, 2, 0.76, 0.2308, 0, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.lineno:\n lineno = self.lineno\n row, col, line = (lineno, (self.col or 0),\n self.stream.splitlines()[lineno-1])\n else:\n row, col, line = self.stream.getRowColLine()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L264_C12", "label": "lineno =", "type": "assigned_variable", "loc": [264, 264], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L263_C8", "vector": [14, 3, 0.0992, 0.0004, 3, 0.24, 0.0, 48, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "lineno", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " lineno = self.lineno"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L265_C12", "label": "row, col, line =", "type": "assigned_variable", "loc": [265, 266], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L263_C8", "vector": [14, 3, 0.0998, 0.0008, 3, 0.24, 0.5, 181, 0, 0, 0, 0, 0, 8, 1], "semantic": {"name": "row, col, line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " row, col, line = (lineno, (self.col or 0),\n self.stream.splitlines()[lineno-1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L268_C12", "label": "row, col, line = getRowColLine()", "type": "assigned_variable", "loc": [268, 268], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L263_C8", "vector": [14, 3, 0.1007, 0.0004, 3, 0.24, 1.0, 181, 3, 0, 0, 0, 423, 10, 1], "semantic": {"name": "row, col, line", "arg_names": [], "import_names": [], "rhs_call_name": "getRowColLine", "annotation": ""}, "snippet": " row, col, line = self.stream.getRowColLine()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L271_C8", "label": "lines = splitlines()", "type": "assigned_variable", "loc": [271, 271], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "vector": [14, 2, 0.1018, 0.0004, 2, 0.76, 0.3077, 73, 3, 0, 0, 0, 296, 10, 1], "semantic": {"name": "lines", "arg_names": [], "import_names": [], "rhs_call_name": "splitlines", "annotation": ""}, "snippet": " lines = stream.splitlines()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L272_C8", "label": "prevLines =", "type": "assigned_variable", "loc": [272, 272], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "vector": [14, 2, 0.1022, 0.0004, 2, 0.76, 0.3846, 193, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "prevLines", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " prevLines = [] # (rowNum, content)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L273_C8", "label": "for i", "type": "for", "loc": [273, 276], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "vector": [6, 2, 0.1032, 0.0015, 2, 0.76, 0.4615, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(1, 4):\n if row-1-i <=0:\n break\n prevLines.append( (row-i, lines[row-1-i]) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L274_C12", "label": "if", "type": "if", "loc": [274, 275], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L273_C8", "vector": [4, 3, 0.1032, 0.0008, 3, 0.01, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if row-1-i <=0:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L276_C12", "label": "append()", "type": "expression", "loc": [276, 276], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L273_C8", "vector": [8, 3, 0.1037, 0.0004, 3, 0.01, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " prevLines.append( (row-i, lines[row-1-i]) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L278_C8", "label": "nextLines =", "type": "assigned_variable", "loc": [278, 278], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "vector": [14, 2, 0.1045, 0.0004, 2, 0.76, 0.5385, 951, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "nextLines", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " nextLines = [] # (rowNum, content)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L279_C8", "label": "for i", "type": "for", "loc": [279, 282], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "vector": [6, 2, 0.1054, 0.0015, 2, 0.76, 0.6154, 826, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(1, 4):\n if not row-1+i < len(lines):\n break\n nextLines.append( (row+i, lines[row-1+i]) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L280_C12", "label": "if", "type": "if", "loc": [280, 281], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L279_C8", "vector": [4, 3, 0.1054, 0.0008, 3, 0.13, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not row-1+i < len(lines):\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L282_C12", "label": "append()", "type": "expression", "loc": [282, 282], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L279_C8", "vector": [8, 3, 0.106, 0.0004, 3, 0.13, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " nextLines.append( (row+i, lines[row-1+i]) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L283_C8", "label": "reverse()", "type": "expression", "loc": [283, 283], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "vector": [8, 2, 0.1064, 0.0004, 2, 0.76, 0.6923, 109, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "reverse", "arg_names": [], "import_names": [], "rhs_call_name": "reverse", "annotation": ""}, "snippet": " nextLines.reverse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L290_C8", "label": "while", "type": "while", "loc": [290, 292], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "vector": [5, 2, 0.1094, 0.0011, 2, 0.76, 0.7692, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while prevLines:\n lineInfo = prevLines.pop()\n report += \"%(row)-4d|%(line)s\\n\"% {'row':lineInfo[0], 'line':lineInfo[1]}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L291_C12", "label": "lineInfo = pop()", "type": "assigned_variable", "loc": [291, 291], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L290_C8", "vector": [14, 3, 0.1094, 0.0004, 3, 0.15, 0.0, 663, 3, 0, 0, 0, 969, 10, 1], "semantic": {"name": "lineInfo", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " lineInfo = prevLines.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L296_C8", "label": "while", "type": "while", "loc": [296, 298], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "vector": [5, 2, 0.1116, 0.0011, 2, 0.76, 0.8462, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while nextLines:\n lineInfo = nextLines.pop()\n report += \"%(row)-4d|%(line)s\\n\"% {'row':lineInfo[0], 'line':lineInfo[1]}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L297_C12", "label": "lineInfo = pop()", "type": "assigned_variable", "loc": [297, 297], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L296_C8", "vector": [14, 3, 0.1116, 0.0004, 3, 0.15, 0.0, 663, 3, 0, 0, 0, 969, 10, 1], "semantic": {"name": "lineInfo", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " lineInfo = nextLines.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L300_C8", "label": "if", "type": "if", "loc": [300, 301], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "vector": [4, 2, 0.1129, 0.0008, 2, 0.76, 0.9231, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.extMsg:\n report += self.extMsg + '\\n'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L303_C8", "label": "return", "type": "return", "loc": [303, 303], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "vector": [13, 2, 0.1139, 0.0004, 2, 0.76, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return report"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L305_C0", "label": "ForbiddenSyntax", "type": "class", "loc": [305, 306], "level": 0, "parent": null, "vector": [3, 0, 0.1148, 0.0008, 0, 0.66, 0.8947, 146, 0, 0, 0, 0, 260, 0, 0], "semantic": {"name": "ForbiddenSyntax", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ForbiddenSyntax(ParseError):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L307_C0", "label": "ForbiddenExpression", "type": "class", "loc": [307, 308], "level": 0, "parent": null, "vector": [3, 0, 0.1156, 0.0008, 0, 0.66, 0.9079, 676, 0, 0, 0, 0, 146, 0, 0], "semantic": {"name": "ForbiddenExpression", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ForbiddenExpression(ForbiddenSyntax):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L309_C0", "label": "ForbiddenDirective", "type": "class", "loc": [309, 310], "level": 0, "parent": null, "vector": [3, 0, 0.1163, 0.0008, 0, 0.66, 0.9211, 473, 0, 0, 0, 0, 146, 0, 0], "semantic": {"name": "ForbiddenDirective", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ForbiddenDirective(ForbiddenSyntax):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L312_C0", "label": "CheetahVariable", "type": "class", "loc": [312, 318], "level": 0, "parent": null, "vector": [3, 0, 0.1184, 0.0026, 0, 0.66, 0.9342, 545, 0, 1, 0, 0, 186, 0, 0], "semantic": {"name": "CheetahVariable", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CheetahVariable(object):\n def __init__(self, nameChunks, useNameMapper=True, cacheToken=None,\n rawSource=None):\n self.nameChunks = nameChunks\n self.useNameMapper = useNameMapper\n self.cacheToken = cacheToken\n self.rawSource = rawSource"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L313_C4", "label": "__init__", "type": "function", "loc": [313, 318], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L312_C0", "vector": [2, 1, 0.1186, 0.0023, 1, 0.23, 0.0, 555, 0, 5, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "nameChunks", "useNameMapper", "cacheToken", "rawSource"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, nameChunks, useNameMapper=True, cacheToken=None,\n rawSource=None):\n self.nameChunks = nameChunks\n self.useNameMapper = useNameMapper\n self.cacheToken = cacheToken\n self.rawSource = rawSource"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L315_C8", "label": "self.nameChunks =", "type": "assigned_variable", "loc": [315, 315], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L313_C4", "vector": [14, 2, 0.1184, 0.0004, 2, 0.59, 0.0, 88, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.nameChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.nameChunks = nameChunks"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L316_C8", "label": "self.useNameMapper =", "type": "assigned_variable", "loc": [316, 316], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L313_C4", "vector": [14, 2, 0.1188, 0.0004, 2, 0.59, 0.3333, 867, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.useNameMapper", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.useNameMapper = useNameMapper"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L317_C8", "label": "self.cacheToken =", "type": "assigned_variable", "loc": [317, 317], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L313_C4", "vector": [14, 2, 0.1191, 0.0004, 2, 0.59, 0.6667, 495, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.cacheToken", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.cacheToken = cacheToken"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L318_C8", "label": "self.rawSource =", "type": "assigned_variable", "loc": [318, 318], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L313_C4", "vector": [14, 2, 0.1195, 0.0004, 2, 0.59, 1.0, 465, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.rawSource", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.rawSource = rawSource"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L320_C0", "label": "Placeholder", "type": "class", "loc": [320, 321], "level": 0, "parent": null, "vector": [3, 0, 0.1204, 0.0008, 0, 0.66, 0.9474, 335, 0, 0, 0, 0, 545, 0, 0], "semantic": {"name": "Placeholder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Placeholder(CheetahVariable):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L323_C0", "label": "ArgList", "type": "class", "loc": [323, 349], "level": 0, "parent": null, "vector": [3, 0, 0.1263, 0.0101, 0, 0.66, 0.9605, 179, 0, 6, 0, 0, 186, 0, 9], "semantic": {"name": "ArgList", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ArgList(object):\n \"\"\"Used by _LowLevelParser.getArgList()\"\"\"\n\n def __init__(self):\n self.arguments = []\n self.defaults = []\n self.count = 0\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L324_C4", "label": "expression", "type": "expression", "loc": [324, 324], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L323_C0", "vector": [8, 1, 0.1218, 0.0004, 1, 0.76, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Used by _LowLevelParser.getArgList()\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L326_C4", "label": "__init__", "type": "function", "loc": [326, 329], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L323_C0", "vector": [2, 1, 0.1231, 0.0015, 1, 0.76, 0.1667, 555, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self):\n self.arguments = []\n self.defaults = []\n self.count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L327_C8", "label": "self.arguments =", "type": "assigned_variable", "loc": [327, 327], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L326_C4", "vector": [14, 2, 0.1229, 0.0004, 2, 0.48, 0.0, 585, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.arguments", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.arguments = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L328_C8", "label": "self.defaults =", "type": "assigned_variable", "loc": [328, 328], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L326_C4", "vector": [14, 2, 0.1233, 0.0004, 2, 0.48, 0.5, 555, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.defaults", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.defaults = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L329_C8", "label": "self.count =", "type": "assigned_variable", "loc": [329, 329], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L326_C4", "vector": [14, 2, 0.1236, 0.0004, 2, 0.48, 1.0, 340, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L331_C4", "label": "add_argument", "type": "function", "loc": [331, 333], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L323_C0", "vector": [2, 1, 0.1248, 0.0011, 1, 0.76, 0.3333, 178, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "add_argument", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def add_argument(self, name):\n self.arguments.append(name)\n self.defaults.append(None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L332_C8", "label": "append()", "type": "expression", "loc": [332, 332], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L331_C4", "vector": [8, 2, 0.1248, 0.0004, 2, 0.91, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.arguments.append(name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L333_C8", "label": "append()", "type": "expression", "loc": [333, 333], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L331_C4", "vector": [8, 2, 0.1251, 0.0004, 2, 0.91, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.defaults.append(None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L335_C4", "label": "next", "type": "function", "loc": [335, 336], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L323_C0", "vector": [2, 1, 0.1261, 0.0008, 1, 0.76, 0.5, 11, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "next", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def next(self):\n self.count += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L338_C4", "label": "add_default", "type": "function", "loc": [338, 342], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L323_C0", "vector": [2, 1, 0.1278, 0.0019, 1, 0.76, 0.6667, 48, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "add_default", "arg_names": ["self", "token"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def add_default(self, token):\n count = self.count\n if self.defaults[count] is None:\n self.defaults[count] = ''\n self.defaults[count] += token"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L339_C8", "label": "count =", "type": "assigned_variable", "loc": [339, 339], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L338_C4", "vector": [14, 2, 0.1274, 0.0004, 2, 0.45, 0.0, 778, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " count = self.count"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L340_C8", "label": "if", "type": "if", "loc": [340, 341], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L338_C4", "vector": [4, 2, 0.128, 0.0008, 2, 0.45, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.defaults[count] is None:\n self.defaults[count] = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L341_C12", "label": "assign", "type": "assigned_variable", "loc": [341, 341], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L340_C8", "vector": [14, 3, 0.1281, 0.0004, 3, 0.88, 0.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.defaults[count] = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L344_C4", "label": "merge", "type": "function", "loc": [344, 346], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L323_C0", "vector": [2, 1, 0.1297, 0.0011, 1, 0.76, 0.8333, 491, 0, 1, 1, 0, 0, 0, 5], "semantic": {"name": "merge", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def merge(self):\n defaults = (isinstance(d, basestring) and d.strip() or None for d in self.defaults)\n return list(map(None, (a.strip() for a in self.arguments), defaults))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L345_C8", "label": "defaults =", "type": "assigned_variable", "loc": [345, 345], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L344_C4", "vector": [14, 2, 0.1297, 0.0004, 2, 0.82, 0.0, 233, 5, 0, 0, 0, 0, 0, 2], "semantic": {"name": "defaults", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " defaults = (isinstance(d, basestring) and d.strip() or None for d in self.defaults)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L346_C8", "label": "return", "type": "return", "loc": [346, 346], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L344_C4", "vector": [13, 2, 0.13, 0.0004, 2, 0.82, 1.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return list(map(None, (a.strip() for a in self.arguments), defaults))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L348_C4", "label": "__str__", "type": "function", "loc": [348, 349], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L323_C0", "vector": [2, 1, 0.131, 0.0008, 1, 0.76, 1.0, 527, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "__str__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __str__(self):\n return str(self.merge())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L349_C8", "label": "return", "type": "return", "loc": [349, 349], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L348_C4", "vector": [13, 2, 0.1312, 0.0004, 2, 0.7, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return str(self.merge())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "label": "_LowLevelParser", "type": "class", "loc": [351, 1331], "level": 0, "parent": null, "vector": [3, 0, 0.316, 0.3687, 0, 0.66, 0.9737, 638, 0, 63, 0, 0, 749, 0, 99], "semantic": {"name": "_LowLevelParser", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class _LowLevelParser(SourceReader):\n \"\"\"This class implements the methods to match or extract ('get*') the basic\n elements of Cheetah's grammar. It does NOT handle any code generation or\n state management.\n \"\"\"\n\n _settingsManager = None\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L352_C4", "label": "expression", "type": "expression", "loc": [352, 355], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [8, 1, 0.1328, 0.0015, 1, 0.31, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"This class implements the methods to match or extract ('get*') the basic\n elements of Cheetah's grammar. It does NOT handle any code generation or\n state management.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L357_C4", "label": "_settingsManager =", "type": "assigned_variable", "loc": [357, 357], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [14, 1, 0.1342, 0.0004, 1, 0.31, 0.0156, 215, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "_settingsManager", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _settingsManager = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L359_C4", "label": "setSettingsManager", "type": "function", "loc": [359, 360], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.1351, 0.0008, 1, 0.31, 0.0312, 85, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "setSettingsManager", "arg_names": ["self", "settingsManager"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setSettingsManager(self, settingsManager):\n self._settingsManager = settingsManager"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L360_C8", "label": "self._settingsManager =", "type": "assigned_variable", "loc": [360, 360], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L359_C4", "vector": [14, 2, 0.1353, 0.0004, 2, 0.05, 0.0, 626, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._settingsManager", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._settingsManager = settingsManager"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L362_C4", "label": "setting", "type": "function", "loc": [362, 366], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.1368, 0.0019, 1, 0.31, 0.0469, 368, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "setting", "arg_names": ["self", "key", "default"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setting(self, key, default=Unspecified):\n if default is Unspecified:\n return self._settingsManager.setting(key)\n else:\n return self._settingsManager.setting(key, default=default)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L363_C8", "label": "if", "type": "if", "loc": [363, 366], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L362_C4", "vector": [4, 2, 0.137, 0.0015, 2, 0.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if default is Unspecified:\n return self._settingsManager.setting(key)\n else:\n return self._settingsManager.setting(key, default=default)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L364_C12", "label": "return", "type": "return", "loc": [364, 364], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L363_C8", "vector": [13, 3, 0.1368, 0.0004, 3, 0.48, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._settingsManager.setting(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L366_C12", "label": "return", "type": "return", "loc": [366, 366], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L363_C8", "vector": [13, 3, 0.1375, 0.0004, 3, 0.48, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._settingsManager.setting(key, default=default)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L368_C4", "label": "setSetting", "type": "function", "loc": [368, 369], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.1385, 0.0008, 1, 0.31, 0.0625, 856, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": ["self", "key", "val"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setSetting(self, key, val):\n self._settingsManager.setSetting(key, val)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L369_C8", "label": "setSetting()", "type": "expression", "loc": [369, 369], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L368_C4", "vector": [8, 2, 0.1387, 0.0004, 2, 0.64, 0.0, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self._settingsManager.setSetting(key, val)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L371_C4", "label": "settings", "type": "function", "loc": [371, 372], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.1396, 0.0008, 1, 0.31, 0.0781, 168, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "settings", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def settings(self):\n return self._settingsManager.settings()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L372_C8", "label": "return", "type": "return", "loc": [372, 372], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L371_C4", "vector": [13, 2, 0.1398, 0.0004, 2, 0.75, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._settingsManager.settings()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L374_C4", "label": "updateSettings", "type": "function", "loc": [374, 375], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.1407, 0.0008, 1, 0.31, 0.0938, 649, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "updateSettings", "arg_names": ["self", "settings"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def updateSettings(self, settings):\n self._settingsManager.updateSettings(settings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L375_C8", "label": "updateSettings()", "type": "expression", "loc": [375, 375], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L374_C4", "vector": [8, 2, 0.1409, 0.0004, 2, 0.57, 0.0, 649, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "updateSettings", "arg_names": [], "import_names": [], "rhs_call_name": "updateSettings", "annotation": ""}, "snippet": " self._settingsManager.updateSettings(settings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L377_C4", "label": "_initializeSettings", "type": "function", "loc": [377, 378], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.1419, 0.0008, 1, 0.31, 0.1094, 393, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_initializeSettings", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _initializeSettings(self): \n self._settingsManager._initializeSettings()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L378_C8", "label": "_initializeSettings()", "type": "expression", "loc": [378, 378], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L377_C4", "vector": [8, 2, 0.1421, 0.0004, 2, 0.38, 0.0, 393, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_initializeSettings", "arg_names": [], "import_names": [], "rhs_call_name": "_initializeSettings", "annotation": ""}, "snippet": " self._settingsManager._initializeSettings()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L380_C4", "label": "configureParser", "type": "function", "loc": [380, 402], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.1469, 0.0086, 1, 0.31, 0.125, 43, 0, 1, 0, 0, 0, 0, 9], "semantic": {"name": "configureParser", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def configureParser(self):\n \"\"\"Is called by the Compiler instance after the parser has had a\n settingsManager assigned with self.setSettingsManager() \n \"\"\"\n self._makeCheetahVarREs()\n self._makeCommentREs()\n self._makeDirectiveREs()\n self._makePspREs()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L381_C8", "label": "expression", "type": "expression", "loc": [381, 383], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L380_C4", "vector": [8, 2, 0.1436, 0.0011, 2, 0.31, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Is called by the Compiler instance after the parser has had a\n settingsManager assigned with self.setSettingsManager() \n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L384_C8", "label": "_makeCheetahVarREs()", "type": "expression", "loc": [384, 384], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L380_C4", "vector": [8, 2, 0.1443, 0.0004, 2, 0.31, 0.1667, 15, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_makeCheetahVarREs", "arg_names": [], "import_names": [], "rhs_call_name": "_makeCheetahVarREs", "annotation": ""}, "snippet": " self._makeCheetahVarREs()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L385_C8", "label": "_makeCommentREs()", "type": "expression", "loc": [385, 385], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L380_C4", "vector": [8, 2, 0.1447, 0.0004, 2, 0.31, 0.3333, 279, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_makeCommentREs", "arg_names": [], "import_names": [], "rhs_call_name": "_makeCommentREs", "annotation": ""}, "snippet": " self._makeCommentREs()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L386_C8", "label": "_makeDirectiveREs()", "type": "expression", "loc": [386, 386], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L380_C4", "vector": [8, 2, 0.1451, 0.0004, 2, 0.31, 0.5, 679, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_makeDirectiveREs", "arg_names": [], "import_names": [], "rhs_call_name": "_makeDirectiveREs", "annotation": ""}, "snippet": " self._makeDirectiveREs()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L387_C8", "label": "_makePspREs()", "type": "expression", "loc": [387, 387], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L380_C4", "vector": [8, 2, 0.1454, 0.0004, 2, 0.31, 0.6667, 149, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_makePspREs", "arg_names": [], "import_names": [], "rhs_call_name": "_makePspREs", "annotation": ""}, "snippet": " self._makePspREs()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L388_C8", "label": "self._possibleNonStrConstantChars =", "type": "assigned_variable", "loc": [388, 393], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L380_C4", "vector": [14, 2, 0.1467, 0.0023, 2, 0.31, 0.8333, 789, 4, 0, 0, 0, 0, 0, 5], "semantic": {"name": "self._possibleNonStrConstantChars", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._possibleNonStrConstantChars = (\n self.setting('commentStartToken')[0] +\n self.setting('multiLineCommentStartToken')[0] + \n self.setting('cheetahVarStartToken')[0] +\n self.setting('directiveStartToken')[0] +\n self.setting('PSPStartToken')[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L394_C8", "label": "self._nonStrConstMatchers =", "type": "assigned_variable", "loc": [394, 402], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L380_C4", "vector": [14, 2, 0.1496, 0.0034, 2, 0.31, 1.0, 709, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._nonStrConstMatchers", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._nonStrConstMatchers = [\n self.matchCommentStartToken,\n self.matchMultiLineCommentStartToken,\n self.matchVariablePlaceholderStart,\n self.matchExpressionPlaceholderStart,\n self.matchDirective,\n self.matchPSPStartToken,\n self.matchEOLSlurpToken,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "label": "_makeCheetahVarREs", "type": "function", "loc": [406, 472], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.165, 0.0252, 1, 0.31, 0.1406, 15, 0, 1, 0, 0, 0, 0, 20], "semantic": {"name": "_makeCheetahVarREs", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _makeCheetahVarREs(self):\n \n \"\"\"Setup the regexs for Cheetah $var parsing.\"\"\"\n\n num = r'[0-9\\.]+'\n interval = (r'(?P<interval>' + \n num + r's|' +\n num + r'm|' +"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L408_C8", "label": "expression", "type": "expression", "loc": [408, 408], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "vector": [8, 2, 0.1533, 0.0004, 2, 0.47, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Setup the regexs for Cheetah $var parsing.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L410_C8", "label": "num =", "type": "assigned_variable", "loc": [410, 410], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "vector": [14, 2, 0.1541, 0.0004, 2, 0.47, 0.0769, 328, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "num", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " num = r'[0-9\\.]+'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L411_C8", "label": "interval =", "type": "assigned_variable", "loc": [411, 418], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "vector": [14, 2, 0.1558, 0.003, 2, 0.47, 0.1538, 628, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "interval", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " interval = (r'(?P<interval>' + \n num + r's|' +\n num + r'm|' +\n num + r'h|' +\n num + r'd|' +\n num + r'w|' +\n num + ')' \n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L420_C8", "label": "cacheToken =", "type": "assigned_variable", "loc": [420, 426], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "vector": [14, 2, 0.159, 0.0026, 2, 0.47, 0.2308, 937, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cacheToken", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cacheToken = (r'(?:' +\n r'(?P<REFRESH_CACHE>\\*' + interval + '\\*)'+\n '|' +\n r'(?P<STATIC_CACHE>\\*)' +\n '|' + \n r'(?P<NO_CACHE>)' +\n ')')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L427_C8", "label": "self.cacheTokenRE = cachedRegex()", "type": "assigned_variable", "loc": [427, 427], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "vector": [14, 2, 0.1605, 0.0004, 2, 0.47, 0.3077, 266, 3, 1, 0, 0, 808, 10, 1], "semantic": {"name": "self.cacheTokenRE", "arg_names": [], "import_names": [], "rhs_call_name": "cachedRegex", "annotation": ""}, "snippet": " self.cacheTokenRE = cachedRegex(cacheToken)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L429_C8", "label": "silentPlaceholderToken =", "type": "assigned_variable", "loc": [429, 433], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "vector": [14, 2, 0.162, 0.0019, 2, 0.47, 0.3846, 281, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "silentPlaceholderToken", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " silentPlaceholderToken = (r'(?:' +\n r'(?P<SILENT>' +escapeRegexChars('!')+')'+\n '|' +\n r'(?P<NOT_SILENT>)' +\n ')')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L434_C8", "label": "self.silentPlaceholderTokenRE = cachedRegex()", "type": "assigned_variable", "loc": [434, 434], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "vector": [14, 2, 0.1631, 0.0004, 2, 0.47, 0.4615, 128, 3, 1, 0, 0, 808, 10, 1], "semantic": {"name": "self.silentPlaceholderTokenRE", "arg_names": [], "import_names": [], "rhs_call_name": "cachedRegex", "annotation": ""}, "snippet": " self.silentPlaceholderTokenRE = cachedRegex(silentPlaceholderToken)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L436_C8", "label": "self.cheetahVarStartRE = cachedRegex()", "type": "assigned_variable", "loc": [436, 442], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "vector": [14, 2, 0.165, 0.0026, 2, 0.47, 0.5385, 364, 3, 1, 0, 0, 808, 10, 3], "semantic": {"name": "self.cheetahVarStartRE", "arg_names": [], "import_names": [], "rhs_call_name": "cachedRegex", "annotation": ""}, "snippet": " self.cheetahVarStartRE = cachedRegex(\n escCharLookBehind +\n r'(?P<startToken>'+escapeRegexChars(self.setting('cheetahVarStartToken'))+')'+\n r'(?P<silenceToken>'+silentPlaceholderToken+')'+\n r'(?P<cacheToken>'+cacheToken+')'+\n r'(?P<enclosure>|(?:(?:\\{|\\(|\\[)[ \\t\\f]*))' + # allow WS after enclosure\n r'(?=[A-Za-z_])')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L443_C8", "label": "validCharsLookAhead =", "type": "assigned_variable", "loc": [443, 443], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "vector": [14, 2, 0.1665, 0.0004, 2, 0.47, 0.6154, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "validCharsLookAhead", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " validCharsLookAhead = r'(?=[A-Za-z_\\*!\\{\\(\\[])'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L444_C8", "label": "self.cheetahVarStartToken = setting()", "type": "assigned_variable", "loc": [444, 444], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "vector": [14, 2, 0.1669, 0.0004, 2, 0.47, 0.6923, 471, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "self.cheetahVarStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " self.cheetahVarStartToken = self.setting('cheetahVarStartToken')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L445_C8", "label": "self.cheetahVarStartTokenRE = cachedRegex()", "type": "assigned_variable", "loc": [445, 449], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "vector": [14, 2, 0.168, 0.0019, 2, 0.47, 0.7692, 141, 3, 1, 0, 0, 808, 10, 3], "semantic": {"name": "self.cheetahVarStartTokenRE", "arg_names": [], "import_names": [], "rhs_call_name": "cachedRegex", "annotation": ""}, "snippet": " self.cheetahVarStartTokenRE = cachedRegex(\n escCharLookBehind +\n escapeRegexChars(self.setting('cheetahVarStartToken'))\n +validCharsLookAhead\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L451_C8", "label": "self.cheetahVarInExpressionStartTokenRE = cachedRegex()", "type": "assigned_variable", "loc": [451, 454], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "vector": [14, 2, 0.17, 0.0015, 2, 0.47, 0.8462, 770, 3, 1, 0, 0, 808, 10, 3], "semantic": {"name": "self.cheetahVarInExpressionStartTokenRE", "arg_names": [], "import_names": [], "rhs_call_name": "cachedRegex", "annotation": ""}, "snippet": " self.cheetahVarInExpressionStartTokenRE = cachedRegex(\n escapeRegexChars(self.setting('cheetahVarStartToken'))\n +r'(?=[A-Za-z_])'\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L456_C8", "label": "self.expressionPlaceholderStartRE = cachedRegex()", "type": "assigned_variable", "loc": [456, 463], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "vector": [14, 2, 0.1727, 0.003, 2, 0.47, 0.9231, 227, 3, 1, 0, 0, 808, 10, 3], "semantic": {"name": "self.expressionPlaceholderStartRE", "arg_names": [], "import_names": [], "rhs_call_name": "cachedRegex", "annotation": ""}, "snippet": " self.expressionPlaceholderStartRE = cachedRegex(\n escCharLookBehind +\n r'(?P<startToken>' + escapeRegexChars(self.setting('cheetahVarStartToken')) + ')' +\n r'(?P<cacheToken>' + cacheToken + ')' +\n #r'\\[[ \\t\\f]*'\n r'(?:\\{|\\(|\\[)[ \\t\\f]*'\n + r'(?=[^\\)\\}\\]])'\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L465_C8", "label": "if", "type": "if", "loc": [465, 472], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "vector": [4, 2, 0.1761, 0.003, 2, 0.47, 1.0, 0, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('EOLSlurpToken'):\n self.EOLSlurpRE = cachedRegex(\n escapeRegexChars(self.setting('EOLSlurpToken'))\n + r'[ \\t\\f]*'\n + r'(?:'+EOL+')'\n )\n else:\n self.EOLSlurpRE = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L466_C12", "label": "self.EOLSlurpRE = cachedRegex()", "type": "assigned_variable", "loc": [466, 470], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L465_C8", "vector": [14, 3, 0.1759, 0.0019, 3, 0.48, 0.0, 605, 3, 1, 0, 0, 808, 10, 3], "semantic": {"name": "self.EOLSlurpRE", "arg_names": [], "import_names": [], "rhs_call_name": "cachedRegex", "annotation": ""}, "snippet": " self.EOLSlurpRE = cachedRegex(\n escapeRegexChars(self.setting('EOLSlurpToken'))\n + r'[ \\t\\f]*'\n + r'(?:'+EOL+')'\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L472_C12", "label": "self.EOLSlurpRE =", "type": "assigned_variable", "loc": [472, 472], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L465_C8", "vector": [14, 3, 0.1774, 0.0004, 3, 0.48, 1.0, 605, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.EOLSlurpRE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.EOLSlurpRE = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L475_C4", "label": "_makeCommentREs", "type": "function", "loc": [475, 488], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.1809, 0.0053, 1, 0.31, 0.1562, 279, 0, 1, 0, 0, 0, 0, 9], "semantic": {"name": "_makeCommentREs", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _makeCommentREs(self):\n \"\"\"Construct the regex bits that are used in comment parsing.\"\"\"\n startTokenEsc = escapeRegexChars(self.setting('commentStartToken'))\n self.commentStartTokenRE = cachedRegex(escCharLookBehind + startTokenEsc)\n del startTokenEsc\n \n startTokenEsc = escapeRegexChars(\n self.setting('multiLineCommentStartToken'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L476_C8", "label": "expression", "type": "expression", "loc": [476, 476], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L475_C4", "vector": [8, 2, 0.1789, 0.0004, 2, 0.17, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Construct the regex bits that are used in comment parsing.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L477_C8", "label": "startTokenEsc = escapeRegexChars()", "type": "assigned_variable", "loc": [477, 477], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L475_C4", "vector": [14, 2, 0.1793, 0.0004, 2, 0.17, 0.1667, 364, 3, 1, 0, 0, 502, 10, 2], "semantic": {"name": "startTokenEsc", "arg_names": [], "import_names": [], "rhs_call_name": "escapeRegexChars", "annotation": ""}, "snippet": " startTokenEsc = escapeRegexChars(self.setting('commentStartToken'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L478_C8", "label": "self.commentStartTokenRE = cachedRegex()", "type": "assigned_variable", "loc": [478, 478], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L475_C4", "vector": [14, 2, 0.1796, 0.0004, 2, 0.17, 0.3333, 201, 3, 1, 0, 0, 808, 10, 1], "semantic": {"name": "self.commentStartTokenRE", "arg_names": [], "import_names": [], "rhs_call_name": "cachedRegex", "annotation": ""}, "snippet": " self.commentStartTokenRE = cachedRegex(escCharLookBehind + startTokenEsc)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L481_C8", "label": "startTokenEsc = escapeRegexChars()", "type": "assigned_variable", "loc": [481, 482], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L475_C4", "vector": [14, 2, 0.1809, 0.0008, 2, 0.17, 0.5, 364, 3, 1, 0, 0, 502, 10, 2], "semantic": {"name": "startTokenEsc", "arg_names": [], "import_names": [], "rhs_call_name": "escapeRegexChars", "annotation": ""}, "snippet": " startTokenEsc = escapeRegexChars(\n self.setting('multiLineCommentStartToken'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L483_C8", "label": "endTokenEsc = escapeRegexChars()", "type": "assigned_variable", "loc": [483, 484], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L475_C4", "vector": [14, 2, 0.1817, 0.0008, 2, 0.17, 0.6667, 551, 3, 1, 0, 0, 502, 10, 2], "semantic": {"name": "endTokenEsc", "arg_names": [], "import_names": [], "rhs_call_name": "escapeRegexChars", "annotation": ""}, "snippet": " endTokenEsc = escapeRegexChars(\n self.setting('multiLineCommentEndToken'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L485_C8", "label": "self.multiLineCommentTokenStartRE = cachedRegex()", "type": "assigned_variable", "loc": [485, 486], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L475_C4", "vector": [14, 2, 0.1825, 0.0008, 2, 0.17, 0.8333, 790, 3, 1, 0, 0, 808, 10, 1], "semantic": {"name": "self.multiLineCommentTokenStartRE", "arg_names": [], "import_names": [], "rhs_call_name": "cachedRegex", "annotation": ""}, "snippet": " self.multiLineCommentTokenStartRE = cachedRegex(escCharLookBehind +\n startTokenEsc)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L487_C8", "label": "self.multiLineCommentEndTokenRE = cachedRegex()", "type": "assigned_variable", "loc": [487, 488], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L475_C4", "vector": [14, 2, 0.1832, 0.0008, 2, 0.17, 1.0, 13, 3, 1, 0, 0, 808, 10, 1], "semantic": {"name": "self.multiLineCommentEndTokenRE", "arg_names": [], "import_names": [], "rhs_call_name": "cachedRegex", "annotation": ""}, "snippet": " self.multiLineCommentEndTokenRE = cachedRegex(escCharLookBehind +\n endTokenEsc)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "label": "_makeDirectiveREs", "type": "function", "loc": [490, 502], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.1864, 0.0049, 1, 0.31, 0.1719, 679, 0, 1, 0, 0, 0, 0, 10], "semantic": {"name": "_makeDirectiveREs", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _makeDirectiveREs(self):\n \"\"\"Construct the regexs that are used in directive parsing.\"\"\"\n startToken = self.setting('directiveStartToken')\n endToken = self.setting('directiveEndToken')\n startTokenEsc = escapeRegexChars(startToken)\n endTokenEsc = escapeRegexChars(endToken)\n validSecondCharsLookAhead = r'(?=[A-Za-z_@])'\n reParts = [escCharLookBehind, startTokenEsc]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L491_C8", "label": "expression", "type": "expression", "loc": [491, 491], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "vector": [8, 2, 0.1845, 0.0004, 2, 0.07, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Construct the regexs that are used in directive parsing.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L492_C8", "label": "startToken = setting()", "type": "assigned_variable", "loc": [492, 492], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "vector": [14, 2, 0.1849, 0.0004, 2, 0.07, 0.1, 135, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "startToken", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " startToken = self.setting('directiveStartToken')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L493_C8", "label": "endToken = setting()", "type": "assigned_variable", "loc": [493, 493], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "vector": [14, 2, 0.1853, 0.0004, 2, 0.07, 0.2, 93, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "endToken", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " endToken = self.setting('directiveEndToken')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L494_C8", "label": "startTokenEsc = escapeRegexChars()", "type": "assigned_variable", "loc": [494, 494], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "vector": [14, 2, 0.1856, 0.0004, 2, 0.07, 0.3, 364, 3, 1, 0, 0, 502, 10, 1], "semantic": {"name": "startTokenEsc", "arg_names": [], "import_names": [], "rhs_call_name": "escapeRegexChars", "annotation": ""}, "snippet": " startTokenEsc = escapeRegexChars(startToken)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L495_C8", "label": "endTokenEsc = escapeRegexChars()", "type": "assigned_variable", "loc": [495, 495], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "vector": [14, 2, 0.186, 0.0004, 2, 0.07, 0.4, 551, 3, 1, 0, 0, 502, 10, 1], "semantic": {"name": "endTokenEsc", "arg_names": [], "import_names": [], "rhs_call_name": "escapeRegexChars", "annotation": ""}, "snippet": " endTokenEsc = escapeRegexChars(endToken)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L496_C8", "label": "validSecondCharsLookAhead =", "type": "assigned_variable", "loc": [496, 496], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "vector": [14, 2, 0.1864, 0.0004, 2, 0.07, 0.5, 926, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "validSecondCharsLookAhead", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " validSecondCharsLookAhead = r'(?=[A-Za-z_@])'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L497_C8", "label": "reParts =", "type": "assigned_variable", "loc": [497, 497], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "vector": [14, 2, 0.1868, 0.0004, 2, 0.07, 0.6, 785, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "reParts", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " reParts = [escCharLookBehind, startTokenEsc]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L498_C8", "label": "if", "type": "if", "loc": [498, 499], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "vector": [4, 2, 0.1873, 0.0008, 2, 0.07, 0.7, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('allowWhitespaceAfterDirectiveStartToken'):\n reParts.append('[ \\t]*')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L499_C12", "label": "append()", "type": "expression", "loc": [499, 499], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L498_C8", "vector": [8, 3, 0.1875, 0.0004, 3, 0.23, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " reParts.append('[ \\t]*')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L500_C8", "label": "append()", "type": "expression", "loc": [500, 500], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "vector": [8, 2, 0.1879, 0.0004, 2, 0.07, 0.8, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " reParts.append(validSecondCharsLookAhead)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L501_C8", "label": "self.directiveStartTokenRE = cachedRegex()", "type": "assigned_variable", "loc": [501, 501], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "vector": [14, 2, 0.1883, 0.0004, 2, 0.07, 0.9, 504, 3, 1, 0, 0, 808, 10, 2], "semantic": {"name": "self.directiveStartTokenRE", "arg_names": [], "import_names": [], "rhs_call_name": "cachedRegex", "annotation": ""}, "snippet": " self.directiveStartTokenRE = cachedRegex(''.join(reParts))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L502_C8", "label": "self.directiveEndTokenRE = cachedRegex()", "type": "assigned_variable", "loc": [502, 502], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "vector": [14, 2, 0.1887, 0.0004, 2, 0.07, 1.0, 490, 3, 1, 0, 0, 808, 10, 1], "semantic": {"name": "self.directiveEndTokenRE", "arg_names": [], "import_names": [], "rhs_call_name": "cachedRegex", "annotation": ""}, "snippet": " self.directiveEndTokenRE = cachedRegex(escCharLookBehind + endTokenEsc)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L504_C4", "label": "_makePspREs", "type": "function", "loc": [504, 511], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.1907, 0.003, 1, 0.31, 0.1875, 149, 0, 1, 0, 0, 0, 0, 6], "semantic": {"name": "_makePspREs", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _makePspREs(self):\n \"\"\"Setup the regexs for PSP parsing.\"\"\"\n startToken = self.setting('PSPStartToken')\n startTokenEsc = escapeRegexChars(startToken)\n self.PSPStartTokenRE = cachedRegex(escCharLookBehind + startTokenEsc)\n endToken = self.setting('PSPEndToken')\n endTokenEsc = escapeRegexChars(endToken)\n self.PSPEndTokenRE = cachedRegex(escCharLookBehind + endTokenEsc)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L505_C8", "label": "expression", "type": "expression", "loc": [505, 505], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L504_C4", "vector": [8, 2, 0.1898, 0.0004, 2, 0.21, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Setup the regexs for PSP parsing.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L506_C8", "label": "startToken = setting()", "type": "assigned_variable", "loc": [506, 506], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L504_C4", "vector": [14, 2, 0.1902, 0.0004, 2, 0.21, 0.1667, 135, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "startToken", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " startToken = self.setting('PSPStartToken')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L507_C8", "label": "startTokenEsc = escapeRegexChars()", "type": "assigned_variable", "loc": [507, 507], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L504_C4", "vector": [14, 2, 0.1905, 0.0004, 2, 0.21, 0.3333, 364, 3, 1, 0, 0, 502, 10, 1], "semantic": {"name": "startTokenEsc", "arg_names": [], "import_names": [], "rhs_call_name": "escapeRegexChars", "annotation": ""}, "snippet": " startTokenEsc = escapeRegexChars(startToken)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L508_C8", "label": "self.PSPStartTokenRE = cachedRegex()", "type": "assigned_variable", "loc": [508, 508], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L504_C4", "vector": [14, 2, 0.1909, 0.0004, 2, 0.21, 0.5, 263, 3, 1, 0, 0, 808, 10, 1], "semantic": {"name": "self.PSPStartTokenRE", "arg_names": [], "import_names": [], "rhs_call_name": "cachedRegex", "annotation": ""}, "snippet": " self.PSPStartTokenRE = cachedRegex(escCharLookBehind + startTokenEsc)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L509_C8", "label": "endToken = setting()", "type": "assigned_variable", "loc": [509, 509], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L504_C4", "vector": [14, 2, 0.1913, 0.0004, 2, 0.21, 0.6667, 93, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "endToken", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " endToken = self.setting('PSPEndToken')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L510_C8", "label": "endTokenEsc = escapeRegexChars()", "type": "assigned_variable", "loc": [510, 510], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L504_C4", "vector": [14, 2, 0.1917, 0.0004, 2, 0.21, 0.8333, 551, 3, 1, 0, 0, 502, 10, 1], "semantic": {"name": "endTokenEsc", "arg_names": [], "import_names": [], "rhs_call_name": "escapeRegexChars", "annotation": ""}, "snippet": " endTokenEsc = escapeRegexChars(endToken)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L511_C8", "label": "self.PSPEndTokenRE = cachedRegex()", "type": "assigned_variable", "loc": [511, 511], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L504_C4", "vector": [14, 2, 0.192, 0.0004, 2, 0.21, 1.0, 808, 3, 1, 0, 0, 808, 10, 1], "semantic": {"name": "self.PSPEndTokenRE", "arg_names": [], "import_names": [], "rhs_call_name": "cachedRegex", "annotation": ""}, "snippet": " self.PSPEndTokenRE = cachedRegex(escCharLookBehind + endTokenEsc)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L513_C4", "label": "_unescapeCheetahVars", "type": "function", "loc": [513, 518], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.1937, 0.0023, 1, 0.31, 0.2031, 350, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "_unescapeCheetahVars", "arg_names": ["self", "theString"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _unescapeCheetahVars(self, theString):\n \"\"\"Unescape any escaped Cheetah \\$vars in the string.\n \"\"\"\n \n token = self.setting('cheetahVarStartToken')\n return theString.replace('\\\\' + token, token)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L514_C8", "label": "expression", "type": "expression", "loc": [514, 515], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L513_C4", "vector": [8, 2, 0.1933, 0.0008, 2, 0.65, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Unescape any escaped Cheetah \\$vars in the string.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L517_C8", "label": "token = setting()", "type": "assigned_variable", "loc": [517, 517], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L513_C4", "vector": [14, 2, 0.1943, 0.0004, 2, 0.65, 0.5, 129, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " token = self.setting('cheetahVarStartToken')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L518_C8", "label": "return", "type": "return", "loc": [518, 518], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L513_C4", "vector": [13, 2, 0.1947, 0.0004, 2, 0.65, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return theString.replace('\\\\' + token, token)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L520_C4", "label": "_unescapeDirectives", "type": "function", "loc": [520, 525], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.1964, 0.0023, 1, 0.31, 0.2188, 559, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "_unescapeDirectives", "arg_names": ["self", "theString"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _unescapeDirectives(self, theString):\n \"\"\"Unescape any escaped Cheetah directives in the string.\n \"\"\"\n \n token = self.setting('directiveStartToken')\n return theString.replace('\\\\' + token, token)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L521_C8", "label": "expression", "type": "expression", "loc": [521, 522], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L520_C4", "vector": [8, 2, 0.196, 0.0008, 2, 0.99, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Unescape any escaped Cheetah directives in the string.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L524_C8", "label": "token = setting()", "type": "assigned_variable", "loc": [524, 524], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L520_C4", "vector": [14, 2, 0.1969, 0.0004, 2, 0.99, 0.5, 129, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " token = self.setting('directiveStartToken')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L525_C8", "label": "return", "type": "return", "loc": [525, 525], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L520_C4", "vector": [13, 2, 0.1973, 0.0004, 2, 0.99, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return theString.replace('\\\\' + token, token)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L527_C4", "label": "isLineClearToStartToken", "type": "function", "loc": [527, 528], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.1982, 0.0008, 1, 0.31, 0.2344, 110, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": ["self", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def isLineClearToStartToken(self, pos=None):\n return self.isLineClearToPos(pos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L528_C8", "label": "return", "type": "return", "loc": [528, 528], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L527_C4", "vector": [13, 2, 0.1984, 0.0004, 2, 0.7, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.isLineClearToPos(pos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L530_C4", "label": "matchTopLevelToken", "type": "function", "loc": [530, 548], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2026, 0.0071, 1, 0.31, 0.25, 803, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "matchTopLevelToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchTopLevelToken(self):\n \"\"\"Returns the first match found from the following methods:\n self.matchCommentStartToken\n self.matchMultiLineCommentStartToken\n self.matchVariablePlaceholderStart\n self.matchExpressionPlaceholderStart\n self.matchDirective\n self.matchPSPStartToken"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L531_C8", "label": "expression", "type": "expression", "loc": [531, 541], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L530_C4", "vector": [8, 2, 0.2014, 0.0041, 2, 0.6, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Returns the first match found from the following methods:\n self.matchCommentStartToken\n self.matchMultiLineCommentStartToken\n self.matchVariablePlaceholderStart\n self.matchExpressionPlaceholderStart\n self.matchDirective\n self.matchPSPStartToken\n self.matchEOLSlurpToken"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L542_C8", "label": "match =", "type": "assigned_variable", "loc": [542, 542], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L530_C4", "vector": [14, 2, 0.2037, 0.0004, 2, 0.6, 0.3333, 36, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " match = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L543_C8", "label": "if", "type": "if", "loc": [543, 547], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L530_C4", "vector": [4, 2, 0.2048, 0.0019, 2, 0.6, 0.6667, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek() in self._possibleNonStrConstantChars:\n for matcher in self._nonStrConstMatchers:\n match = matcher()\n if match:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L544_C12", "label": "for matcher", "type": "for", "loc": [544, 547], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L543_C8", "vector": [6, 3, 0.205, 0.0015, 3, 0.54, 0.0, 604, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "matcher", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for matcher in self._nonStrConstMatchers:\n match = matcher()\n if match:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L545_C16", "label": "match = matcher()", "type": "assigned_variable", "loc": [545, 545], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L544_C12", "vector": [14, 4, 0.2048, 0.0004, 4, 0.39, 0.0, 36, 3, 0, 0, 0, 604, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matcher", "annotation": ""}, "snippet": " match = matcher()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L546_C16", "label": "if", "type": "if", "loc": [546, 547], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L544_C12", "vector": [4, 4, 0.2054, 0.0008, 4, 0.39, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if match:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L548_C8", "label": "return", "type": "return", "loc": [548, 548], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L530_C4", "vector": [13, 2, 0.2059, 0.0004, 2, 0.6, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return match"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L550_C4", "label": "matchPyToken", "type": "function", "loc": [550, 557], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.208, 0.003, 1, 0.31, 0.2656, 925, 0, 1, 1, 0, 0, 0, 8], "semantic": {"name": "matchPyToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchPyToken(self):\n match = pseudoprog.match(self.src(), self.pos())\n \n if match and match.group() in tripleQuotedStringStarts:\n TQSmatch = tripleQuotedStringREs[match.group()].match(self.src(), self.pos())\n if TQSmatch:\n return TQSmatch\n return match"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L551_C8", "label": "match = match()", "type": "assigned_variable", "loc": [551, 551], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L550_C4", "vector": [14, 2, 0.2071, 0.0004, 2, 0.08, 0.0, 36, 3, 2, 0, 0, 36, 10, 3], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " match = pseudoprog.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L553_C8", "label": "if", "type": "if", "loc": [553, 556], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L550_C4", "vector": [4, 2, 0.2084, 0.0015, 2, 0.08, 0.5, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if match and match.group() in tripleQuotedStringStarts:\n TQSmatch = tripleQuotedStringREs[match.group()].match(self.src(), self.pos())\n if TQSmatch:\n return TQSmatch"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L554_C12", "label": "TQSmatch = match()", "type": "assigned_variable", "loc": [554, 554], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L553_C8", "vector": [14, 3, 0.2082, 0.0004, 3, 0.13, 0.0, 341, 3, 2, 0, 0, 36, 10, 4], "semantic": {"name": "TQSmatch", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " TQSmatch = tripleQuotedStringREs[match.group()].match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L555_C12", "label": "if", "type": "if", "loc": [555, 556], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L553_C8", "vector": [4, 3, 0.2088, 0.0008, 3, 0.13, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if TQSmatch:\n return TQSmatch"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L556_C16", "label": "return", "type": "return", "loc": [556, 556], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L555_C12", "vector": [13, 4, 0.2089, 0.0004, 4, 0.03, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return TQSmatch"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L557_C8", "label": "return", "type": "return", "loc": [557, 557], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L550_C4", "vector": [13, 2, 0.2093, 0.0004, 2, 0.08, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return match"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L559_C4", "label": "getPyToken", "type": "function", "loc": [559, 565], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2112, 0.0026, 1, 0.31, 0.2812, 764, 0, 1, 1, 0, 0, 0, 6], "semantic": {"name": "getPyToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getPyToken(self):\n match = self.matchPyToken()\n if match is None:\n raise ParseError(self)\n elif match.group() in tripleQuotedStringStarts:\n raise ParseError(self, msg='Malformed triple-quoted string')\n return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L560_C8", "label": "match = matchPyToken()", "type": "assigned_variable", "loc": [560, 560], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L559_C4", "vector": [14, 2, 0.2104, 0.0004, 2, 0.01, 0.0, 36, 3, 0, 0, 0, 925, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchPyToken", "annotation": ""}, "snippet": " match = self.matchPyToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L561_C8", "label": "if", "type": "if", "loc": [561, 564], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L559_C4", "vector": [4, 2, 0.2114, 0.0015, 2, 0.01, 0.5, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if match is None:\n raise ParseError(self)\n elif match.group() in tripleQuotedStringStarts:\n raise ParseError(self, msg='Malformed triple-quoted string')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L563_C8", "label": "if", "type": "if", "loc": [563, 564], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L561_C8", "vector": [4, 3, 0.2118, 0.0008, 3, 0.24, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif match.group() in tripleQuotedStringStarts:\n raise ParseError(self, msg='Malformed triple-quoted string')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L565_C8", "label": "return", "type": "return", "loc": [565, 565], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L559_C4", "vector": [13, 2, 0.2123, 0.0004, 2, 0.01, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L567_C4", "label": "matchEOLSlurpToken", "type": "function", "loc": [567, 569], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2135, 0.0011, 1, 0.31, 0.2969, 484, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "matchEOLSlurpToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchEOLSlurpToken(self):\n if self.EOLSlurpRE:\n return self.EOLSlurpRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L568_C8", "label": "if", "type": "if", "loc": [568, 569], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L567_C4", "vector": [4, 2, 0.2136, 0.0008, 2, 0.58, 0.0, 0, 7, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.EOLSlurpRE:\n return self.EOLSlurpRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L569_C12", "label": "return", "type": "return", "loc": [569, 569], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L568_C8", "vector": [13, 3, 0.2138, 0.0004, 3, 0.56, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.EOLSlurpRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L571_C4", "label": "getEOLSlurpToken", "type": "function", "loc": [571, 575], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2153, 0.0019, 1, 0.31, 0.3125, 436, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "getEOLSlurpToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getEOLSlurpToken(self):\n match = self.matchEOLSlurpToken()\n if not match:\n raise ParseError(self, msg='Invalid EOL slurp token')\n return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L572_C8", "label": "match = matchEOLSlurpToken()", "type": "assigned_variable", "loc": [572, 572], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L571_C4", "vector": [14, 2, 0.215, 0.0004, 2, 0.05, 0.0, 36, 3, 0, 0, 0, 484, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchEOLSlurpToken", "annotation": ""}, "snippet": " match = self.matchEOLSlurpToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L573_C8", "label": "if", "type": "if", "loc": [573, 574], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L571_C4", "vector": [4, 2, 0.2155, 0.0008, 2, 0.05, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not match:\n raise ParseError(self, msg='Invalid EOL slurp token')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L575_C8", "label": "return", "type": "return", "loc": [575, 575], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L571_C4", "vector": [13, 2, 0.2161, 0.0004, 2, 0.05, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L577_C4", "label": "matchCommentStartToken", "type": "function", "loc": [577, 578], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.217, 0.0008, 1, 0.31, 0.3281, 461, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "matchCommentStartToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchCommentStartToken(self):\n return self.commentStartTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L578_C8", "label": "return", "type": "return", "loc": [578, 578], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L577_C4", "vector": [13, 2, 0.2172, 0.0004, 2, 0.89, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.commentStartTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L580_C4", "label": "getCommentStartToken", "type": "function", "loc": [580, 584], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2187, 0.0019, 1, 0.31, 0.3438, 315, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "getCommentStartToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getCommentStartToken(self):\n match = self.matchCommentStartToken()\n if not match:\n raise ParseError(self, msg='Invalid single-line comment start token')\n return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L581_C8", "label": "match = matchCommentStartToken()", "type": "assigned_variable", "loc": [581, 581], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L580_C4", "vector": [14, 2, 0.2183, 0.0004, 2, 0.5, 0.0, 36, 3, 0, 0, 0, 461, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchCommentStartToken", "annotation": ""}, "snippet": " match = self.matchCommentStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L582_C8", "label": "if", "type": "if", "loc": [582, 583], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L580_C4", "vector": [4, 2, 0.2189, 0.0008, 2, 0.5, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not match:\n raise ParseError(self, msg='Invalid single-line comment start token')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L584_C8", "label": "return", "type": "return", "loc": [584, 584], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L580_C4", "vector": [13, 2, 0.2195, 0.0004, 2, 0.5, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L586_C4", "label": "matchMultiLineCommentStartToken", "type": "function", "loc": [586, 587], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2204, 0.0008, 1, 0.31, 0.3594, 508, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "matchMultiLineCommentStartToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchMultiLineCommentStartToken(self):\n return self.multiLineCommentTokenStartRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L587_C8", "label": "return", "type": "return", "loc": [587, 587], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L586_C4", "vector": [13, 2, 0.2206, 0.0004, 2, 0.75, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.multiLineCommentTokenStartRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L589_C4", "label": "getMultiLineCommentStartToken", "type": "function", "loc": [589, 593], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2221, 0.0019, 1, 0.31, 0.375, 210, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "getMultiLineCommentStartToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getMultiLineCommentStartToken(self):\n match = self.matchMultiLineCommentStartToken()\n if not match:\n raise ParseError(self, msg='Invalid multi-line comment start token')\n return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L590_C8", "label": "match = matchMultiLineCommentStartToken()", "type": "assigned_variable", "loc": [590, 590], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L589_C4", "vector": [14, 2, 0.2217, 0.0004, 2, 0.55, 0.0, 36, 3, 0, 0, 0, 508, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchMultiLineCommentStartToken", "annotation": ""}, "snippet": " match = self.matchMultiLineCommentStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L591_C8", "label": "if", "type": "if", "loc": [591, 592], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L589_C4", "vector": [4, 2, 0.2223, 0.0008, 2, 0.55, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not match:\n raise ParseError(self, msg='Invalid multi-line comment start token')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L593_C8", "label": "return", "type": "return", "loc": [593, 593], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L589_C4", "vector": [13, 2, 0.2228, 0.0004, 2, 0.55, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L595_C4", "label": "matchMultiLineCommentEndToken", "type": "function", "loc": [595, 596], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2238, 0.0008, 1, 0.31, 0.3906, 631, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "matchMultiLineCommentEndToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchMultiLineCommentEndToken(self):\n return self.multiLineCommentEndTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L596_C8", "label": "return", "type": "return", "loc": [596, 596], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L595_C4", "vector": [13, 2, 0.224, 0.0004, 2, 0.0, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.multiLineCommentEndTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L598_C4", "label": "getMultiLineCommentEndToken", "type": "function", "loc": [598, 602], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2255, 0.0019, 1, 0.31, 0.4062, 291, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "getMultiLineCommentEndToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getMultiLineCommentEndToken(self):\n match = self.matchMultiLineCommentEndToken()\n if not match:\n raise ParseError(self, msg='Invalid multi-line comment end token')\n return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L599_C8", "label": "match = matchMultiLineCommentEndToken()", "type": "assigned_variable", "loc": [599, 599], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L598_C4", "vector": [14, 2, 0.2251, 0.0004, 2, 0.29, 0.0, 36, 3, 0, 0, 0, 631, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchMultiLineCommentEndToken", "annotation": ""}, "snippet": " match = self.matchMultiLineCommentEndToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L600_C8", "label": "if", "type": "if", "loc": [600, 601], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L598_C4", "vector": [4, 2, 0.2257, 0.0008, 2, 0.29, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not match:\n raise ParseError(self, msg='Invalid multi-line comment end token')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L602_C8", "label": "return", "type": "return", "loc": [602, 602], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L598_C4", "vector": [13, 2, 0.2262, 0.0004, 2, 0.29, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "label": "getCommaSeparatedSymbols", "type": "function", "loc": [604, 638], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2334, 0.0132, 1, 0.31, 0.4219, 564, 0, 1, 1, 0, 0, 0, 17], "semantic": {"name": "getCommaSeparatedSymbols", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getCommaSeparatedSymbols(self):\n \"\"\"\n Loosely based on getDottedName to pull out comma separated\n named chunks\n \"\"\"\n srcLen = len(self)\n pieces = []\n nameChunks = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L605_C8", "label": "expression", "type": "expression", "loc": [605, 608], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "vector": [8, 2, 0.2279, 0.0015, 2, 0.85, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Loosely based on getDottedName to pull out comma separated\n named chunks\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L609_C8", "label": "srcLen = len()", "type": "assigned_variable", "loc": [609, 609], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "vector": [14, 2, 0.2289, 0.0004, 2, 0.85, 0.1429, 468, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "srcLen", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " srcLen = len(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L610_C8", "label": "pieces =", "type": "assigned_variable", "loc": [610, 610], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "vector": [14, 2, 0.2292, 0.0004, 2, 0.85, 0.2857, 181, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "pieces", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pieces = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L611_C8", "label": "nameChunks =", "type": "assigned_variable", "loc": [611, 611], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "vector": [14, 2, 0.2296, 0.0004, 2, 0.85, 0.4286, 214, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "nameChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " nameChunks = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L613_C8", "label": "if", "type": "if", "loc": [613, 614], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "vector": [4, 2, 0.2306, 0.0008, 2, 0.85, 0.5714, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.peek() in identchars:\n raise ParseError(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L616_C8", "label": "while", "type": "while", "loc": [616, 633], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "vector": [5, 2, 0.2347, 0.0068, 2, 0.85, 0.7143, 0, 0, 0, 0, 0, 0, 0, 12], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while self.pos() < srcLen:\n c = self.peek()\n if c in namechars:\n nameChunk = self.getIdentifier()\n nameChunks.append(nameChunk)\n elif c == '.':\n if self.pos()+1 <srcLen and self.peek(1) in identchars:\n nameChunks.append(self.getc())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L617_C12", "label": "c = peek()", "type": "assigned_variable", "loc": [617, 617], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L616_C8", "vector": [14, 3, 0.2319, 0.0004, 3, 0.38, 0.0, 411, 3, 0, 0, 0, 129, 10, 1], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "peek", "annotation": ""}, "snippet": " c = self.peek()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L618_C12", "label": "if", "type": "if", "loc": [618, 633], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L616_C8", "vector": [4, 3, 0.2351, 0.006, 3, 0.38, 1.0, 0, 0, 0, 0, 0, 0, 0, 10], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if c in namechars:\n nameChunk = self.getIdentifier()\n nameChunks.append(nameChunk)\n elif c == '.':\n if self.pos()+1 <srcLen and self.peek(1) in identchars:\n nameChunks.append(self.getc())\n else:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L619_C16", "label": "nameChunk = getIdentifier()", "type": "assigned_variable", "loc": [619, 619], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L618_C12", "vector": [14, 4, 0.2326, 0.0004, 4, 0.58, 0.0, 43, 3, 0, 0, 0, 419, 10, 1], "semantic": {"name": "nameChunk", "arg_names": [], "import_names": [], "rhs_call_name": "getIdentifier", "annotation": ""}, "snippet": " nameChunk = self.getIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L620_C16", "label": "append()", "type": "expression", "loc": [620, 620], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L618_C12", "vector": [8, 4, 0.233, 0.0004, 4, 0.58, 0.5, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " nameChunks.append(nameChunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L621_C12", "label": "if", "type": "if", "loc": [621, 633], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L618_C12", "vector": [4, 4, 0.2356, 0.0049, 4, 0.58, 1.0, 0, 0, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif c == '.':\n if self.pos()+1 <srcLen and self.peek(1) in identchars:\n nameChunks.append(self.getc())\n else:\n break\n elif c == ',':\n self.getc()\n pieces.append(''.join(nameChunks))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L622_C16", "label": "if", "type": "if", "loc": [622, 625], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L621_C12", "vector": [4, 5, 0.2343, 0.0015, 5, 0.45, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.pos()+1 <srcLen and self.peek(1) in identchars:\n nameChunks.append(self.getc())\n else:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L623_C20", "label": "append()", "type": "expression", "loc": [623, 623], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L622_C16", "vector": [8, 6, 0.2341, 0.0004, 6, 0.44, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " nameChunks.append(self.getc())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L626_C12", "label": "if", "type": "if", "loc": [626, 633], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L621_C12", "vector": [4, 5, 0.2366, 0.003, 5, 0.45, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif c == ',':\n self.getc()\n pieces.append(''.join(nameChunks))\n nameChunks = []\n elif c in (' ', '\\t'):\n self.getc()\n else:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L627_C16", "label": "getc()", "type": "expression", "loc": [627, 627], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L626_C12", "vector": [8, 6, 0.2356, 0.0004, 6, 0.75, 0.0, 827, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getc", "arg_names": [], "import_names": [], "rhs_call_name": "getc", "annotation": ""}, "snippet": " self.getc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L628_C16", "label": "append()", "type": "expression", "loc": [628, 628], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L626_C12", "vector": [8, 6, 0.236, 0.0004, 6, 0.75, 0.3333, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " pieces.append(''.join(nameChunks))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L629_C16", "label": "nameChunks =", "type": "assigned_variable", "loc": [629, 629], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L626_C12", "vector": [14, 6, 0.2364, 0.0004, 6, 0.75, 0.6667, 214, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "nameChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " nameChunks = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L630_C12", "label": "if", "type": "if", "loc": [630, 633], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L626_C12", "vector": [4, 6, 0.2373, 0.0015, 6, 0.75, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif c in (' ', '\\t'):\n self.getc()\n else:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L631_C16", "label": "getc()", "type": "expression", "loc": [631, 631], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L630_C12", "vector": [8, 7, 0.2371, 0.0004, 7, 0.72, 0.0, 827, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getc", "arg_names": [], "import_names": [], "rhs_call_name": "getc", "annotation": ""}, "snippet": " self.getc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L635_C8", "label": "if", "type": "if", "loc": [635, 636], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "vector": [4, 2, 0.2388, 0.0008, 2, 0.85, 0.8571, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if nameChunks:\n pieces.append(''.join(nameChunks))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L636_C12", "label": "append()", "type": "expression", "loc": [636, 636], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L635_C8", "vector": [8, 3, 0.239, 0.0004, 3, 0.55, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " pieces.append(''.join(nameChunks))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L638_C8", "label": "return", "type": "return", "loc": [638, 638], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "vector": [13, 2, 0.2398, 0.0004, 2, 0.85, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return pieces"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L640_C4", "label": "getDottedName", "type": "function", "loc": [640, 660], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2443, 0.0079, 1, 0.31, 0.4375, 891, 0, 1, 1, 0, 0, 0, 12], "semantic": {"name": "getDottedName", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getDottedName(self):\n srcLen = len(self)\n nameChunks = []\n \n if not self.peek() in identchars:\n raise ParseError(self)\n \n while self.pos() < srcLen:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L641_C8", "label": "srcLen = len()", "type": "assigned_variable", "loc": [641, 641], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L640_C4", "vector": [14, 2, 0.2409, 0.0004, 2, 0.27, 0.0, 468, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "srcLen", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " srcLen = len(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L642_C8", "label": "nameChunks =", "type": "assigned_variable", "loc": [642, 642], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L640_C4", "vector": [14, 2, 0.2413, 0.0004, 2, 0.27, 0.25, 214, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "nameChunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " nameChunks = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L644_C8", "label": "if", "type": "if", "loc": [644, 645], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L640_C4", "vector": [4, 2, 0.2422, 0.0008, 2, 0.27, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.peek() in identchars:\n raise ParseError(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L647_C8", "label": "while", "type": "while", "loc": [647, 658], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L640_C4", "vector": [5, 2, 0.2452, 0.0045, 2, 0.27, 0.75, 0, 0, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while self.pos() < srcLen:\n c = self.peek()\n if c in namechars:\n nameChunk = self.getIdentifier()\n nameChunks.append(nameChunk)\n elif c == '.':\n if self.pos()+1 <srcLen and self.peek(1) in identchars:\n nameChunks.append(self.getc())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L648_C12", "label": "c = peek()", "type": "assigned_variable", "loc": [648, 648], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L647_C8", "vector": [14, 3, 0.2435, 0.0004, 3, 0.02, 0.0, 411, 3, 0, 0, 0, 129, 10, 1], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "peek", "annotation": ""}, "snippet": " c = self.peek()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L649_C12", "label": "if", "type": "if", "loc": [649, 658], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L647_C8", "vector": [4, 3, 0.2456, 0.0038, 3, 0.02, 1.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if c in namechars:\n nameChunk = self.getIdentifier()\n nameChunks.append(nameChunk)\n elif c == '.':\n if self.pos()+1 <srcLen and self.peek(1) in identchars:\n nameChunks.append(self.getc())\n else:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L650_C16", "label": "nameChunk = getIdentifier()", "type": "assigned_variable", "loc": [650, 650], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L649_C12", "vector": [14, 4, 0.2443, 0.0004, 4, 0.73, 0.0, 43, 3, 0, 0, 0, 419, 10, 1], "semantic": {"name": "nameChunk", "arg_names": [], "import_names": [], "rhs_call_name": "getIdentifier", "annotation": ""}, "snippet": " nameChunk = self.getIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L651_C16", "label": "append()", "type": "expression", "loc": [651, 651], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L649_C12", "vector": [8, 4, 0.2446, 0.0004, 4, 0.73, 0.5, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " nameChunks.append(nameChunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L652_C12", "label": "if", "type": "if", "loc": [652, 658], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L649_C12", "vector": [4, 4, 0.2461, 0.0026, 4, 0.73, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif c == '.':\n if self.pos()+1 <srcLen and self.peek(1) in identchars:\n nameChunks.append(self.getc())\n else:\n break\n else:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L653_C16", "label": "if", "type": "if", "loc": [653, 656], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L652_C12", "vector": [4, 5, 0.246, 0.0015, 5, 0.11, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.pos()+1 <srcLen and self.peek(1) in identchars:\n nameChunks.append(self.getc())\n else:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L654_C20", "label": "append()", "type": "expression", "loc": [654, 654], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L653_C16", "vector": [8, 6, 0.2458, 0.0004, 6, 0.65, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " nameChunks.append(self.getc())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L660_C8", "label": "return", "type": "return", "loc": [660, 660], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L640_C4", "vector": [13, 2, 0.248, 0.0004, 2, 0.27, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''.join(nameChunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L662_C4", "label": "matchIdentifier", "type": "function", "loc": [662, 663], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.249, 0.0008, 1, 0.31, 0.4531, 448, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "matchIdentifier", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchIdentifier(self):\n return identRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L663_C8", "label": "return", "type": "return", "loc": [663, 663], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L662_C4", "vector": [13, 2, 0.2492, 0.0004, 2, 0.62, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return identRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L665_C4", "label": "getIdentifier", "type": "function", "loc": [665, 669], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2507, 0.0019, 1, 0.31, 0.4688, 419, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "getIdentifier", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getIdentifier(self):\n match = self.matchIdentifier()\n if not match:\n raise ParseError(self, msg='Invalid identifier')\n return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L666_C8", "label": "match = matchIdentifier()", "type": "assigned_variable", "loc": [666, 666], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L665_C4", "vector": [14, 2, 0.2503, 0.0004, 2, 0.66, 0.0, 36, 3, 0, 0, 0, 448, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchIdentifier", "annotation": ""}, "snippet": " match = self.matchIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L667_C8", "label": "if", "type": "if", "loc": [667, 668], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L665_C4", "vector": [4, 2, 0.2508, 0.0008, 2, 0.66, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not match:\n raise ParseError(self, msg='Invalid identifier')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L669_C8", "label": "return", "type": "return", "loc": [669, 669], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L665_C4", "vector": [13, 2, 0.2514, 0.0004, 2, 0.66, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L671_C4", "label": "matchOperator", "type": "function", "loc": [671, 675], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2529, 0.0019, 1, 0.31, 0.4844, 278, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "matchOperator", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchOperator(self):\n match = self.matchPyToken()\n if match and match.group() not in operators:\n match = None\n return match"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L672_C8", "label": "match = matchPyToken()", "type": "assigned_variable", "loc": [672, 672], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L671_C4", "vector": [14, 2, 0.2525, 0.0004, 2, 0.33, 0.0, 36, 3, 0, 0, 0, 925, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchPyToken", "annotation": ""}, "snippet": " match = self.matchPyToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L673_C8", "label": "if", "type": "if", "loc": [673, 674], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L671_C4", "vector": [4, 2, 0.2531, 0.0008, 2, 0.33, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if match and match.group() not in operators:\n match = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L674_C12", "label": "match =", "type": "assigned_variable", "loc": [674, 674], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L673_C8", "vector": [14, 3, 0.2533, 0.0004, 3, 0.61, 0.0, 36, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " match = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L675_C8", "label": "return", "type": "return", "loc": [675, 675], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L671_C4", "vector": [13, 2, 0.2537, 0.0004, 2, 0.33, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return match"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L677_C4", "label": "getOperator", "type": "function", "loc": [677, 681], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2552, 0.0019, 1, 0.31, 0.5, 671, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "getOperator", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getOperator(self):\n match = self.matchOperator()\n if not match:\n raise ParseError(self, msg='Expected operator')\n return self.readTo( match.end() )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L678_C8", "label": "match = matchOperator()", "type": "assigned_variable", "loc": [678, 678], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L677_C4", "vector": [14, 2, 0.2548, 0.0004, 2, 0.53, 0.0, 36, 3, 0, 0, 0, 278, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchOperator", "annotation": ""}, "snippet": " match = self.matchOperator()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L679_C8", "label": "if", "type": "if", "loc": [679, 680], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L677_C4", "vector": [4, 2, 0.2554, 0.0008, 2, 0.53, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not match:\n raise ParseError(self, msg='Expected operator')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L681_C8", "label": "return", "type": "return", "loc": [681, 681], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L677_C4", "vector": [13, 2, 0.2559, 0.0004, 2, 0.53, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.readTo( match.end() )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L683_C4", "label": "matchAssignmentOperator", "type": "function", "loc": [683, 687], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2574, 0.0019, 1, 0.31, 0.5156, 96, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "matchAssignmentOperator", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchAssignmentOperator(self):\n match = self.matchPyToken()\n if match and match.group() not in assignmentOps:\n match = None\n return match"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L684_C8", "label": "match = matchPyToken()", "type": "assigned_variable", "loc": [684, 684], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L683_C4", "vector": [14, 2, 0.257, 0.0004, 2, 0.54, 0.0, 36, 3, 0, 0, 0, 925, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchPyToken", "annotation": ""}, "snippet": " match = self.matchPyToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L685_C8", "label": "if", "type": "if", "loc": [685, 686], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L683_C4", "vector": [4, 2, 0.2576, 0.0008, 2, 0.54, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if match and match.group() not in assignmentOps:\n match = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L686_C12", "label": "match =", "type": "assigned_variable", "loc": [686, 686], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L685_C8", "vector": [14, 3, 0.2578, 0.0004, 3, 0.69, 0.0, 36, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " match = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L687_C8", "label": "return", "type": "return", "loc": [687, 687], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L683_C4", "vector": [13, 2, 0.2582, 0.0004, 2, 0.54, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return match"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L689_C4", "label": "getAssignmentOperator", "type": "function", "loc": [689, 693], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2597, 0.0019, 1, 0.31, 0.5312, 942, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "getAssignmentOperator", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getAssignmentOperator(self):\n match = self.matchAssignmentOperator()\n if not match:\n raise ParseError(self, msg='Expected assignment operator')\n return self.readTo( match.end() )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L690_C8", "label": "match = matchAssignmentOperator()", "type": "assigned_variable", "loc": [690, 690], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L689_C4", "vector": [14, 2, 0.2593, 0.0004, 2, 0.69, 0.0, 36, 3, 0, 0, 0, 96, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchAssignmentOperator", "annotation": ""}, "snippet": " match = self.matchAssignmentOperator()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L691_C8", "label": "if", "type": "if", "loc": [691, 692], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L689_C4", "vector": [4, 2, 0.2599, 0.0008, 2, 0.69, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not match:\n raise ParseError(self, msg='Expected assignment operator')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L693_C8", "label": "return", "type": "return", "loc": [693, 693], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L689_C4", "vector": [13, 2, 0.2604, 0.0004, 2, 0.69, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.readTo( match.end() )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L695_C4", "label": "matchDirective", "type": "function", "loc": [695, 704], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2629, 0.0038, 1, 0.31, 0.5469, 893, 0, 1, 1, 0, 0, 0, 5], "semantic": {"name": "matchDirective", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchDirective(self):\n \"\"\"Returns False or the name of the directive matched.\n \"\"\"\n startPos = self.pos()\n if not self.matchDirectiveStartToken():\n return False\n self.getDirectiveStartToken()\n directiveName = self.matchDirectiveName()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L696_C8", "label": "expression", "type": "expression", "loc": [696, 697], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L695_C4", "vector": [8, 2, 0.2617, 0.0008, 2, 0.84, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Returns False or the name of the directive matched.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L698_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [698, 698], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L695_C4", "vector": [14, 2, 0.2623, 0.0004, 2, 0.84, 0.1667, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L699_C8", "label": "if", "type": "if", "loc": [699, 700], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L695_C4", "vector": [4, 2, 0.2629, 0.0008, 2, 0.84, 0.3333, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.matchDirectiveStartToken():\n return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L700_C12", "label": "return", "type": "return", "loc": [700, 700], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L699_C8", "vector": [13, 3, 0.2631, 0.0004, 3, 0.26, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L701_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [701, 701], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L695_C4", "vector": [8, 2, 0.2634, 0.0004, 2, 0.84, 0.5, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L702_C8", "label": "directiveName = matchDirectiveName()", "type": "assigned_variable", "loc": [702, 702], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L695_C4", "vector": [14, 2, 0.2638, 0.0004, 2, 0.84, 0.6667, 508, 3, 0, 0, 0, 827, 10, 1], "semantic": {"name": "directiveName", "arg_names": [], "import_names": [], "rhs_call_name": "matchDirectiveName", "annotation": ""}, "snippet": " directiveName = self.matchDirectiveName()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L703_C8", "label": "setPos()", "type": "expression", "loc": [703, 703], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L695_C4", "vector": [8, 2, 0.2642, 0.0004, 2, 0.84, 0.8333, 659, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L704_C8", "label": "return", "type": "return", "loc": [704, 704], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L695_C4", "vector": [13, 2, 0.2646, 0.0004, 2, 0.84, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return directiveName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L706_C4", "label": "matchDirectiveName", "type": "function", "loc": [706, 729], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2696, 0.009, 1, 0.31, 0.5625, 827, 0, 2, 1, 0, 0, 0, 10], "semantic": {"name": "matchDirectiveName", "arg_names": ["self", "directiveNameChars"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchDirectiveName(self, directiveNameChars=identchars+'0123456789-@'):\n startPos = self.pos()\n possibleMatches = self._directiveNamesAndParsers.keys()\n name = ''\n match = None\n\n while not self.atEnd():\n c = self.getc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L707_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [707, 707], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L706_C4", "vector": [14, 2, 0.2657, 0.0004, 2, 0.19, 0.0, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L708_C8", "label": "possibleMatches = keys()", "type": "assigned_variable", "loc": [708, 708], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L706_C4", "vector": [14, 2, 0.2661, 0.0004, 2, 0.19, 0.1667, 134, 3, 0, 0, 0, 204, 10, 1], "semantic": {"name": "possibleMatches", "arg_names": [], "import_names": [], "rhs_call_name": "keys", "annotation": ""}, "snippet": " possibleMatches = self._directiveNamesAndParsers.keys()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L709_C8", "label": "name =", "type": "assigned_variable", "loc": [709, 709], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L706_C4", "vector": [14, 2, 0.2664, 0.0004, 2, 0.19, 0.3333, 57, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " name = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L710_C8", "label": "match =", "type": "assigned_variable", "loc": [710, 710], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L706_C4", "vector": [14, 2, 0.2668, 0.0004, 2, 0.19, 0.5, 36, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " match = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L712_C8", "label": "while", "type": "while", "loc": [712, 726], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L706_C4", "vector": [5, 2, 0.2702, 0.0056, 2, 0.19, 0.6667, 0, 0, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while not self.atEnd():\n c = self.getc()\n if not c in directiveNameChars:\n break\n name += c\n if name == '@':\n if not self.atEnd() and self.peek() in identchars:\n match = '@'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L713_C12", "label": "c = getc()", "type": "assigned_variable", "loc": [713, 713], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L712_C8", "vector": [14, 3, 0.2679, 0.0004, 3, 0.92, 0.0, 411, 3, 0, 0, 0, 827, 10, 1], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "getc", "annotation": ""}, "snippet": " c = self.getc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L714_C12", "label": "if", "type": "if", "loc": [714, 715], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L712_C8", "vector": [4, 3, 0.2685, 0.0008, 3, 0.92, 0.25, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not c in directiveNameChars:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L717_C12", "label": "if", "type": "if", "loc": [717, 720], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L712_C8", "vector": [4, 3, 0.27, 0.0015, 3, 0.92, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name == '@':\n if not self.atEnd() and self.peek() in identchars:\n match = '@'\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L718_C16", "label": "if", "type": "if", "loc": [718, 719], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L717_C12", "vector": [4, 4, 0.27, 0.0008, 4, 0.17, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.atEnd() and self.peek() in identchars:\n match = '@'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L719_C20", "label": "match =", "type": "assigned_variable", "loc": [719, 719], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L718_C16", "vector": [14, 5, 0.2702, 0.0004, 5, 0.0, 0.0, 36, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " match = '@'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L721_C12", "label": "possibleMatches =", "type": "assigned_variable", "loc": [721, 721], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L712_C8", "vector": [14, 3, 0.271, 0.0004, 3, 0.92, 0.75, 134, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "possibleMatches", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " possibleMatches = [dn for dn in possibleMatches if dn.startswith(name)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L722_C12", "label": "if", "type": "if", "loc": [722, 726], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L712_C8", "vector": [4, 3, 0.2721, 0.0019, 3, 0.92, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not possibleMatches:\n break\n elif (name in possibleMatches and (self.atEnd() or self.peek() not in directiveNameChars)):\n match = name\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L724_C12", "label": "if", "type": "if", "loc": [724, 726], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L722_C12", "vector": [4, 4, 0.2725, 0.0011, 4, 0.84, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif (name in possibleMatches and (self.atEnd() or self.peek() not in directiveNameChars)):\n match = name\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L725_C16", "label": "match =", "type": "assigned_variable", "loc": [725, 725], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L724_C12", "vector": [14, 5, 0.2725, 0.0004, 5, 0.46, 0.0, 36, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " match = name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L728_C8", "label": "setPos()", "type": "expression", "loc": [728, 728], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L706_C4", "vector": [8, 2, 0.2736, 0.0004, 2, 0.19, 0.8333, 659, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L729_C8", "label": "return", "type": "return", "loc": [729, 729], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L706_C4", "vector": [13, 2, 0.274, 0.0004, 2, 0.19, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return match"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L731_C4", "label": "matchDirectiveStartToken", "type": "function", "loc": [731, 732], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2749, 0.0008, 1, 0.31, 0.5781, 724, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "matchDirectiveStartToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchDirectiveStartToken(self):\n return self.directiveStartTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L732_C8", "label": "return", "type": "return", "loc": [732, 732], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L731_C4", "vector": [13, 2, 0.2751, 0.0004, 2, 0.68, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.directiveStartTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L734_C4", "label": "getDirectiveStartToken", "type": "function", "loc": [734, 738], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2766, 0.0019, 1, 0.31, 0.5938, 261, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "getDirectiveStartToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getDirectiveStartToken(self):\n match = self.matchDirectiveStartToken()\n if not match:\n raise ParseError(self, msg='Invalid directive start token')\n return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L735_C8", "label": "match = matchDirectiveStartToken()", "type": "assigned_variable", "loc": [735, 735], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L734_C4", "vector": [14, 2, 0.2762, 0.0004, 2, 0.71, 0.0, 36, 3, 0, 0, 0, 724, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchDirectiveStartToken", "annotation": ""}, "snippet": " match = self.matchDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L736_C8", "label": "if", "type": "if", "loc": [736, 737], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L734_C4", "vector": [4, 2, 0.2768, 0.0008, 2, 0.71, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not match:\n raise ParseError(self, msg='Invalid directive start token')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L738_C8", "label": "return", "type": "return", "loc": [738, 738], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L734_C4", "vector": [13, 2, 0.2773, 0.0004, 2, 0.71, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L740_C4", "label": "matchDirectiveEndToken", "type": "function", "loc": [740, 741], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2783, 0.0008, 1, 0.31, 0.6094, 360, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "matchDirectiveEndToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchDirectiveEndToken(self):\n return self.directiveEndTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L741_C8", "label": "return", "type": "return", "loc": [741, 741], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L740_C4", "vector": [13, 2, 0.2785, 0.0004, 2, 0.01, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.directiveEndTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L743_C4", "label": "getDirectiveEndToken", "type": "function", "loc": [743, 747], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.28, 0.0019, 1, 0.31, 0.625, 925, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "getDirectiveEndToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getDirectiveEndToken(self):\n match = self.matchDirectiveEndToken()\n if not match:\n raise ParseError(self, msg='Invalid directive end token')\n return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L744_C8", "label": "match = matchDirectiveEndToken()", "type": "assigned_variable", "loc": [744, 744], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L743_C4", "vector": [14, 2, 0.2796, 0.0004, 2, 0.99, 0.0, 36, 3, 0, 0, 0, 360, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchDirectiveEndToken", "annotation": ""}, "snippet": " match = self.matchDirectiveEndToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L745_C8", "label": "if", "type": "if", "loc": [745, 746], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L743_C4", "vector": [4, 2, 0.2802, 0.0008, 2, 0.99, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not match:\n raise ParseError(self, msg='Invalid directive end token')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L747_C8", "label": "return", "type": "return", "loc": [747, 747], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L743_C4", "vector": [13, 2, 0.2807, 0.0004, 2, 0.99, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L750_C4", "label": "matchColonForSingleLineShortFormDirective", "type": "function", "loc": [750, 760], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2837, 0.0041, 1, 0.31, 0.6406, 438, 0, 1, 1, 0, 0, 0, 6], "semantic": {"name": "matchColonForSingleLineShortFormDirective", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchColonForSingleLineShortFormDirective(self):\n if not self.atEnd() and self.peek()==':':\n restOfLine = self[self.pos()+1:self.findEOL()]\n restOfLine = restOfLine.strip()\n if not restOfLine:\n return False\n elif self.commentStartTokenRE.match(restOfLine):\n return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L751_C8", "label": "if", "type": "if", "loc": [751, 759], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L750_C4", "vector": [4, 2, 0.2837, 0.0034, 2, 0.68, 0.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.atEnd() and self.peek()==':':\n restOfLine = self[self.pos()+1:self.findEOL()]\n restOfLine = restOfLine.strip()\n if not restOfLine:\n return False\n elif self.commentStartTokenRE.match(restOfLine):\n return False\n else: # non-whitespace, non-commment chars found"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L752_C12", "label": "restOfLine =", "type": "assigned_variable", "loc": [752, 752], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L751_C8", "vector": [14, 3, 0.2826, 0.0004, 3, 0.36, 0.0, 888, 6, 0, 0, 0, 0, 0, 2], "semantic": {"name": "restOfLine", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " restOfLine = self[self.pos()+1:self.findEOL()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L753_C12", "label": "restOfLine = strip()", "type": "assigned_variable", "loc": [753, 753], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L751_C8", "vector": [14, 3, 0.283, 0.0004, 3, 0.36, 0.5, 888, 3, 0, 0, 0, 973, 10, 1], "semantic": {"name": "restOfLine", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " restOfLine = restOfLine.strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L754_C12", "label": "if", "type": "if", "loc": [754, 759], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L751_C8", "vector": [4, 3, 0.2843, 0.0023, 3, 0.36, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not restOfLine:\n return False\n elif self.commentStartTokenRE.match(restOfLine):\n return False\n else: # non-whitespace, non-commment chars found\n return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L755_C16", "label": "return", "type": "return", "loc": [755, 755], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L754_C12", "vector": [13, 4, 0.2837, 0.0004, 4, 0.73, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L756_C12", "label": "if", "type": "if", "loc": [756, 759], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L754_C12", "vector": [4, 4, 0.2847, 0.0015, 4, 0.73, 1.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.commentStartTokenRE.match(restOfLine):\n return False\n else: # non-whitespace, non-commment chars found\n return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L757_C16", "label": "return", "type": "return", "loc": [757, 757], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L756_C12", "vector": [13, 5, 0.2845, 0.0004, 5, 0.82, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L759_C16", "label": "return", "type": "return", "loc": [759, 759], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L756_C12", "vector": [13, 5, 0.2852, 0.0004, 5, 0.82, 1.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L760_C8", "label": "return", "type": "return", "loc": [760, 760], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L750_C4", "vector": [13, 2, 0.2856, 0.0004, 2, 0.68, 1.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return False "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L762_C4", "label": "matchPSPStartToken", "type": "function", "loc": [762, 763], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2865, 0.0008, 1, 0.31, 0.6562, 294, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "matchPSPStartToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchPSPStartToken(self):\n return self.PSPStartTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L763_C8", "label": "return", "type": "return", "loc": [763, 763], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L762_C4", "vector": [13, 2, 0.2867, 0.0004, 2, 0.74, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.PSPStartTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L765_C4", "label": "matchPSPEndToken", "type": "function", "loc": [765, 766], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2877, 0.0008, 1, 0.31, 0.6719, 820, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "matchPSPEndToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchPSPEndToken(self):\n return self.PSPEndTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L766_C8", "label": "return", "type": "return", "loc": [766, 766], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L765_C4", "vector": [13, 2, 0.2879, 0.0004, 2, 0.05, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.PSPEndTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L768_C4", "label": "getPSPStartToken", "type": "function", "loc": [768, 772], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2894, 0.0019, 1, 0.31, 0.6875, 681, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "getPSPStartToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getPSPStartToken(self):\n match = self.matchPSPStartToken()\n if not match:\n raise ParseError(self, msg='Invalid psp start token')\n return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L769_C8", "label": "match = matchPSPStartToken()", "type": "assigned_variable", "loc": [769, 769], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L768_C4", "vector": [14, 2, 0.289, 0.0004, 2, 0.24, 0.0, 36, 3, 0, 0, 0, 294, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchPSPStartToken", "annotation": ""}, "snippet": " match = self.matchPSPStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L770_C8", "label": "if", "type": "if", "loc": [770, 771], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L768_C4", "vector": [4, 2, 0.2896, 0.0008, 2, 0.24, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not match:\n raise ParseError(self, msg='Invalid psp start token')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L772_C8", "label": "return", "type": "return", "loc": [772, 772], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L768_C4", "vector": [13, 2, 0.2901, 0.0004, 2, 0.24, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L774_C4", "label": "getPSPEndToken", "type": "function", "loc": [774, 778], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2916, 0.0019, 1, 0.31, 0.7031, 795, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "getPSPEndToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getPSPEndToken(self):\n match = self.matchPSPEndToken()\n if not match:\n raise ParseError(self, msg='Invalid psp end token')\n return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L775_C8", "label": "match = matchPSPEndToken()", "type": "assigned_variable", "loc": [775, 775], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L774_C4", "vector": [14, 2, 0.2912, 0.0004, 2, 0.71, 0.0, 36, 3, 0, 0, 0, 820, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchPSPEndToken", "annotation": ""}, "snippet": " match = self.matchPSPEndToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L776_C8", "label": "if", "type": "if", "loc": [776, 777], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L774_C4", "vector": [4, 2, 0.2918, 0.0008, 2, 0.71, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not match:\n raise ParseError(self, msg='Invalid psp end token')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L778_C8", "label": "return", "type": "return", "loc": [778, 778], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L774_C4", "vector": [13, 2, 0.2924, 0.0004, 2, 0.71, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.readTo(match.end())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L780_C4", "label": "matchCheetahVarStart", "type": "function", "loc": [780, 782], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2935, 0.0011, 1, 0.31, 0.7188, 471, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "matchCheetahVarStart", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchCheetahVarStart(self):\n \"\"\"includes the enclosure and cache token\"\"\"\n return self.cheetahVarStartRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L781_C8", "label": "expression", "type": "expression", "loc": [781, 781], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L780_C4", "vector": [8, 2, 0.2935, 0.0004, 2, 0.56, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"includes the enclosure and cache token\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L782_C8", "label": "return", "type": "return", "loc": [782, 782], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L780_C4", "vector": [13, 2, 0.2939, 0.0004, 2, 0.56, 1.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.cheetahVarStartRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L784_C4", "label": "matchCheetahVarStartToken", "type": "function", "loc": [784, 786], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.295, 0.0011, 1, 0.31, 0.7344, 255, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "matchCheetahVarStartToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchCheetahVarStartToken(self):\n \"\"\"includes the enclosure and cache token\"\"\"\n return self.cheetahVarStartTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L785_C8", "label": "expression", "type": "expression", "loc": [785, 785], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L784_C4", "vector": [8, 2, 0.295, 0.0004, 2, 0.29, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"includes the enclosure and cache token\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L786_C8", "label": "return", "type": "return", "loc": [786, 786], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L784_C4", "vector": [13, 2, 0.2954, 0.0004, 2, 0.29, 1.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.cheetahVarStartTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L788_C4", "label": "matchCheetahVarInExpressionStartToken", "type": "function", "loc": [788, 790], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2965, 0.0011, 1, 0.31, 0.75, 270, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "matchCheetahVarInExpressionStartToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchCheetahVarInExpressionStartToken(self):\n \"\"\"no enclosures or cache tokens allowed\"\"\"\n return self.cheetahVarInExpressionStartTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L789_C8", "label": "expression", "type": "expression", "loc": [789, 789], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L788_C4", "vector": [8, 2, 0.2965, 0.0004, 2, 0.81, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"no enclosures or cache tokens allowed\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L790_C8", "label": "return", "type": "return", "loc": [790, 790], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L788_C4", "vector": [13, 2, 0.2969, 0.0004, 2, 0.81, 1.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.cheetahVarInExpressionStartTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L792_C4", "label": "matchVariablePlaceholderStart", "type": "function", "loc": [792, 794], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.298, 0.0011, 1, 0.31, 0.7656, 92, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "matchVariablePlaceholderStart", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchVariablePlaceholderStart(self):\n \"\"\"includes the enclosure and cache token\"\"\"\n return self.cheetahVarStartRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L793_C8", "label": "expression", "type": "expression", "loc": [793, 793], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L792_C4", "vector": [8, 2, 0.298, 0.0004, 2, 0.27, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"includes the enclosure and cache token\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L794_C8", "label": "return", "type": "return", "loc": [794, 794], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L792_C4", "vector": [13, 2, 0.2984, 0.0004, 2, 0.27, 1.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.cheetahVarStartRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L796_C4", "label": "matchExpressionPlaceholderStart", "type": "function", "loc": [796, 798], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.2995, 0.0011, 1, 0.31, 0.7812, 936, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "matchExpressionPlaceholderStart", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def matchExpressionPlaceholderStart(self):\n \"\"\"includes the enclosure and cache token\"\"\"\n return self.expressionPlaceholderStartRE.match(self.src(), self.pos()) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L797_C8", "label": "expression", "type": "expression", "loc": [797, 797], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L796_C4", "vector": [8, 2, 0.2995, 0.0004, 2, 0.18, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"includes the enclosure and cache token\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L798_C8", "label": "return", "type": "return", "loc": [798, 798], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L796_C4", "vector": [13, 2, 0.2999, 0.0004, 2, 0.18, 1.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.expressionPlaceholderStartRE.match(self.src(), self.pos()) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L800_C4", "label": "getCheetahVarStartToken", "type": "function", "loc": [800, 805], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.3016, 0.0023, 1, 0.31, 0.7969, 711, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "getCheetahVarStartToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getCheetahVarStartToken(self):\n \"\"\"just the start token, not the enclosure or cache token\"\"\"\n match = self.matchCheetahVarStartToken()\n if not match:\n raise ParseError(self, msg='Expected Cheetah $var start token') \n return self.readTo( match.end() )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L801_C8", "label": "expression", "type": "expression", "loc": [801, 801], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L800_C4", "vector": [8, 2, 0.301, 0.0004, 2, 0.7, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"just the start token, not the enclosure or cache token\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L802_C8", "label": "match = matchCheetahVarStartToken()", "type": "assigned_variable", "loc": [802, 802], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L800_C4", "vector": [14, 2, 0.3014, 0.0004, 2, 0.7, 0.3333, 36, 3, 0, 0, 0, 255, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchCheetahVarStartToken", "annotation": ""}, "snippet": " match = self.matchCheetahVarStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L803_C8", "label": "if", "type": "if", "loc": [803, 804], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L800_C4", "vector": [4, 2, 0.302, 0.0008, 2, 0.7, 0.6667, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not match:\n raise ParseError(self, msg='Expected Cheetah $var start token') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L805_C8", "label": "return", "type": "return", "loc": [805, 805], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L800_C4", "vector": [13, 2, 0.3025, 0.0004, 2, 0.7, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.readTo( match.end() )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L808_C4", "label": "getCacheToken", "type": "function", "loc": [808, 814], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.3048, 0.0026, 1, 0.31, 0.8125, 269, 0, 1, 1, 0, 0, 0, 7], "semantic": {"name": "getCacheToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getCacheToken(self):\n try:\n token = self.cacheTokenRE.match(self.src(), self.pos())\n self.setPos( token.end() )\n return token.group()\n except:\n raise ParseError(self, msg='Expected cache token')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L809_C8", "label": "try", "type": "try", "loc": [809, 814], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L808_C4", "vector": [7, 2, 0.305, 0.0023, 2, 0.68, 0.0, 0, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n token = self.cacheTokenRE.match(self.src(), self.pos())\n self.setPos( token.end() )\n return token.group()\n except:\n raise ParseError(self, msg='Expected cache token')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L810_C12", "label": "token = match()", "type": "assigned_variable", "loc": [810, 810], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L809_C8", "vector": [14, 3, 0.3044, 0.0004, 3, 0.11, 0.0, 129, 3, 2, 0, 0, 36, 10, 3], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " token = self.cacheTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L811_C12", "label": "setPos()", "type": "expression", "loc": [811, 811], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L809_C8", "vector": [8, 3, 0.3048, 0.0004, 3, 0.11, 0.5, 659, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos( token.end() )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L812_C12", "label": "return", "type": "return", "loc": [812, 812], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L809_C8", "vector": [13, 3, 0.3051, 0.0004, 3, 0.11, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return token.group()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L816_C4", "label": "getSilentPlaceholderToken", "type": "function", "loc": [816, 822], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.3078, 0.0026, 1, 0.31, 0.8281, 131, 0, 1, 1, 0, 0, 0, 7], "semantic": {"name": "getSilentPlaceholderToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getSilentPlaceholderToken(self):\n try:\n token = self.silentPlaceholderTokenRE.match(self.src(), self.pos())\n self.setPos( token.end() )\n return token.group()\n except:\n raise ParseError(self, msg='Expected silent placeholder token')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L817_C8", "label": "try", "type": "try", "loc": [817, 822], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L816_C4", "vector": [7, 2, 0.308, 0.0023, 2, 0.38, 0.0, 0, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n token = self.silentPlaceholderTokenRE.match(self.src(), self.pos())\n self.setPos( token.end() )\n return token.group()\n except:\n raise ParseError(self, msg='Expected silent placeholder token')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L818_C12", "label": "token = match()", "type": "assigned_variable", "loc": [818, 818], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L817_C8", "vector": [14, 3, 0.3074, 0.0004, 3, 0.08, 0.0, 129, 3, 2, 0, 0, 36, 10, 3], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " token = self.silentPlaceholderTokenRE.match(self.src(), self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L819_C12", "label": "setPos()", "type": "expression", "loc": [819, 819], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L817_C8", "vector": [8, 3, 0.3078, 0.0004, 3, 0.08, 0.5, 659, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos( token.end() )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L820_C12", "label": "return", "type": "return", "loc": [820, 820], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L817_C8", "vector": [13, 3, 0.3082, 0.0004, 3, 0.08, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return token.group()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L826_C4", "label": "getTargetVarsList", "type": "function", "loc": [826, 847], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.3144, 0.0083, 1, 0.31, 0.8438, 132, 0, 1, 1, 0, 0, 0, 17], "semantic": {"name": "getTargetVarsList", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getTargetVarsList(self):\n varnames = []\n while not self.atEnd():\n if self.peek() in ' \\t\\f':\n self.getWhiteSpace()\n elif self.peek() in '\\r\\n':\n break\n elif self.startswith(','):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L827_C8", "label": "varnames =", "type": "assigned_variable", "loc": [827, 827], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L826_C4", "vector": [14, 2, 0.3108, 0.0004, 2, 0.84, 0.0, 728, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "varnames", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " varnames = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L828_C8", "label": "while", "type": "while", "loc": [828, 846], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L826_C4", "vector": [5, 2, 0.3145, 0.0071, 2, 0.84, 0.5, 0, 0, 0, 0, 0, 0, 0, 17], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while not self.atEnd():\n if self.peek() in ' \\t\\f':\n self.getWhiteSpace()\n elif self.peek() in '\\r\\n':\n break\n elif self.startswith(','):\n self.advance()\n elif self.startswith('in ') or self.startswith('in\\t'):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L829_C12", "label": "if", "type": "if", "loc": [829, 846], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L828_C8", "vector": [4, 3, 0.3147, 0.0068, 3, 0.83, 0.0, 0, 0, 0, 0, 0, 0, 0, 16], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek() in ' \\t\\f':\n self.getWhiteSpace()\n elif self.peek() in '\\r\\n':\n break\n elif self.startswith(','):\n self.advance()\n elif self.startswith('in ') or self.startswith('in\\t'):\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L830_C16", "label": "getWhiteSpace()", "type": "expression", "loc": [830, 830], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L829_C12", "vector": [8, 4, 0.3119, 0.0004, 4, 0.19, 0.0, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L831_C12", "label": "if", "type": "if", "loc": [831, 846], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L829_C12", "vector": [4, 4, 0.3151, 0.006, 4, 0.19, 1.0, 0, 0, 0, 0, 0, 0, 0, 14], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.peek() in '\\r\\n':\n break\n elif self.startswith(','):\n self.advance()\n elif self.startswith('in ') or self.startswith('in\\t'):\n break\n #elif self.matchCheetahVarStart():\n elif self.matchCheetahVarInExpressionStartToken():"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L833_C12", "label": "if", "type": "if", "loc": [833, 846], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L831_C12", "vector": [4, 5, 0.3155, 0.0053, 5, 0.78, 0.0, 0, 3, 0, 0, 0, 0, 0, 13], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.startswith(','):\n self.advance()\n elif self.startswith('in ') or self.startswith('in\\t'):\n break\n #elif self.matchCheetahVarStart():\n elif self.matchCheetahVarInExpressionStartToken():\n self.getCheetahVarStartToken()\n self.getSilentPlaceholderToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L834_C16", "label": "advance()", "type": "expression", "loc": [834, 834], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L833_C12", "vector": [8, 6, 0.3134, 0.0004, 6, 0.4, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L835_C12", "label": "if", "type": "if", "loc": [835, 846], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L833_C12", "vector": [4, 6, 0.3159, 0.0045, 6, 0.4, 1.0, 0, 0, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.startswith('in ') or self.startswith('in\\t'):\n break\n #elif self.matchCheetahVarStart():\n elif self.matchCheetahVarInExpressionStartToken():\n self.getCheetahVarStartToken()\n self.getSilentPlaceholderToken()\n self.getCacheToken()\n varnames.append( self.getDottedName() )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L838_C12", "label": "if", "type": "if", "loc": [838, 846], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L835_C12", "vector": [4, 7, 0.3164, 0.0034, 7, 0.07, 0.0, 0, 3, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchCheetahVarInExpressionStartToken():\n self.getCheetahVarStartToken()\n self.getSilentPlaceholderToken()\n self.getCacheToken()\n varnames.append( self.getDottedName() )\n elif self.matchIdentifier():\n varnames.append( self.getDottedName() )\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L839_C16", "label": "getCheetahVarStartToken()", "type": "expression", "loc": [839, 839], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L838_C12", "vector": [8, 8, 0.3153, 0.0004, 8, 0.26, 0.0, 711, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getCheetahVarStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getCheetahVarStartToken", "annotation": ""}, "snippet": " self.getCheetahVarStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L840_C16", "label": "getSilentPlaceholderToken()", "type": "expression", "loc": [840, 840], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L838_C12", "vector": [8, 8, 0.3157, 0.0004, 8, 0.26, 0.25, 131, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getSilentPlaceholderToken", "arg_names": [], "import_names": [], "rhs_call_name": "getSilentPlaceholderToken", "annotation": ""}, "snippet": " self.getSilentPlaceholderToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L841_C16", "label": "getCacheToken()", "type": "expression", "loc": [841, 841], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L838_C12", "vector": [8, 8, 0.316, 0.0004, 8, 0.26, 0.5, 269, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getCacheToken", "arg_names": [], "import_names": [], "rhs_call_name": "getCacheToken", "annotation": ""}, "snippet": " self.getCacheToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L842_C16", "label": "append()", "type": "expression", "loc": [842, 842], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L838_C12", "vector": [8, 8, 0.3164, 0.0004, 8, 0.26, 0.75, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " varnames.append( self.getDottedName() )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L843_C12", "label": "if", "type": "if", "loc": [843, 846], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L838_C12", "vector": [4, 8, 0.3174, 0.0015, 8, 0.26, 1.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchIdentifier():\n varnames.append( self.getDottedName() )\n else:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L844_C16", "label": "append()", "type": "expression", "loc": [844, 844], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L843_C12", "vector": [8, 9, 0.3172, 0.0004, 9, 0.32, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " varnames.append( self.getDottedName() )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L847_C8", "label": "return", "type": "return", "loc": [847, 847], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L826_C4", "vector": [13, 2, 0.3183, 0.0004, 2, 0.84, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return varnames"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L849_C4", "label": "getCheetahVar", "type": "function", "loc": [849, 857], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.3206, 0.0034, 1, 0.31, 0.8594, 741, 0, 3, 1, 0, 0, 0, 4], "semantic": {"name": "getCheetahVar", "arg_names": ["self", "plain", "skipStartToken"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getCheetahVar(self, plain=False, skipStartToken=False):\n \"\"\"This is called when parsing inside expressions. Cache tokens are only\n valid in placeholders so this method discards any cache tokens found.\n \"\"\"\n if not skipStartToken:\n self.getCheetahVarStartToken()\n self.getSilentPlaceholderToken()\n self.getCacheToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L850_C8", "label": "expression", "type": "expression", "loc": [850, 852], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L849_C4", "vector": [8, 2, 0.3198, 0.0011, 2, 0.01, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"This is called when parsing inside expressions. Cache tokens are only\n valid in placeholders so this method discards any cache tokens found.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L853_C8", "label": "if", "type": "if", "loc": [853, 854], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L849_C4", "vector": [4, 2, 0.3207, 0.0008, 2, 0.01, 0.25, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not skipStartToken:\n self.getCheetahVarStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L854_C12", "label": "getCheetahVarStartToken()", "type": "expression", "loc": [854, 854], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L853_C8", "vector": [8, 3, 0.3209, 0.0004, 3, 0.39, 0.0, 711, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getCheetahVarStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getCheetahVarStartToken", "annotation": ""}, "snippet": " self.getCheetahVarStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L855_C8", "label": "getSilentPlaceholderToken()", "type": "expression", "loc": [855, 855], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L849_C4", "vector": [8, 2, 0.3213, 0.0004, 2, 0.01, 0.5, 131, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getSilentPlaceholderToken", "arg_names": [], "import_names": [], "rhs_call_name": "getSilentPlaceholderToken", "annotation": ""}, "snippet": " self.getSilentPlaceholderToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L856_C8", "label": "getCacheToken()", "type": "expression", "loc": [856, 856], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L849_C4", "vector": [8, 2, 0.3217, 0.0004, 2, 0.01, 0.75, 269, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getCacheToken", "arg_names": [], "import_names": [], "rhs_call_name": "getCacheToken", "annotation": ""}, "snippet": " self.getCacheToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L857_C8", "label": "return", "type": "return", "loc": [857, 857], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L849_C4", "vector": [13, 2, 0.3221, 0.0004, 2, 0.01, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.getCheetahVarBody(plain=plain)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L859_C4", "label": "getCheetahVarBody", "type": "function", "loc": [859, 861], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.3232, 0.0011, 1, 0.31, 0.875, 3, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "getCheetahVarBody", "arg_names": ["self", "plain"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getCheetahVarBody(self, plain=False):\n # @@TR: this should be in the compiler\n return self._compiler.genCheetahVar(self.getCheetahVarNameChunks(), plain=plain)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L861_C8", "label": "return", "type": "return", "loc": [861, 861], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L859_C4", "vector": [13, 2, 0.3236, 0.0004, 2, 0.89, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._compiler.genCheetahVar(self.getCheetahVarNameChunks(), plain=plain)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L863_C4", "label": "getCheetahVarNameChunks", "type": "function", "loc": [863, 919], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.3348, 0.0214, 1, 0.31, 0.8906, 3, 0, 1, 1, 0, 0, 0, 18], "semantic": {"name": "getCheetahVarNameChunks", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getCheetahVarNameChunks(self):\n \n \"\"\"\n nameChunks = list of Cheetah $var subcomponents represented as tuples\n [ (namemapperPart,autoCall,restOfName),\n ]\n where:\n namemapperPart = the dottedName base"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L865_C8", "label": "expression", "type": "expression", "loc": [865, 889], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L863_C4", "vector": [8, 2, 0.3296, 0.0094, 2, 0.3, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n nameChunks = list of Cheetah $var subcomponents represented as tuples\n [ (namemapperPart,autoCall,restOfName),\n ]\n where:\n namemapperPart = the dottedName base\n autocall = where NameMapper should use autocalling on namemapperPart\n restOfName = any arglist, index, or slice"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L891_C8", "label": "chunks =", "type": "assigned_variable", "loc": [891, 891], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L863_C4", "vector": [14, 2, 0.3348, 0.0004, 2, 0.3, 0.3333, 284, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "chunks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " chunks = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L892_C8", "label": "while", "type": "while", "loc": [892, 917], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L863_C4", "vector": [5, 2, 0.3399, 0.0098, 2, 0.3, 0.6667, 0, 0, 0, 0, 0, 0, 0, 18], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while self.pos() < len(self):\n rest = ''\n autoCall = True\n if not self.peek() in identchars + '.':\n break\n elif self.peek() == '.':\n \n if self.pos()+1 < len(self) and self.peek(1) in identchars:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L893_C12", "label": "rest =", "type": "assigned_variable", "loc": [893, 893], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L892_C8", "vector": [14, 3, 0.3356, 0.0004, 3, 0.21, 0.0, 788, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "rest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rest = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L894_C12", "label": "autoCall =", "type": "assigned_variable", "loc": [894, 894], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L892_C8", "vector": [14, 3, 0.336, 0.0004, 3, 0.21, 0.2, 826, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "autoCall", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " autoCall = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L895_C12", "label": "if", "type": "if", "loc": [895, 902], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L892_C8", "vector": [4, 3, 0.3377, 0.003, 3, 0.21, 0.4, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.peek() in identchars + '.':\n break\n elif self.peek() == '.':\n \n if self.pos()+1 < len(self) and self.peek(1) in identchars:\n self.advance() # discard the period as it isn't needed with NameMapper\n else:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L897_C12", "label": "if", "type": "if", "loc": [897, 902], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L895_C12", "vector": [4, 4, 0.338, 0.0023, 4, 0.48, 0.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.peek() == '.':\n \n if self.pos()+1 < len(self) and self.peek(1) in identchars:\n self.advance() # discard the period as it isn't needed with NameMapper\n else:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L899_C16", "label": "if", "type": "if", "loc": [899, 902], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L897_C12", "vector": [4, 5, 0.3384, 0.0015, 5, 0.46, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.pos()+1 < len(self) and self.peek(1) in identchars:\n self.advance() # discard the period as it isn't needed with NameMapper\n else:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L900_C20", "label": "advance()", "type": "expression", "loc": [900, 900], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L899_C16", "vector": [8, 6, 0.3382, 0.0004, 6, 0.75, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance() # discard the period as it isn't needed with NameMapper"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L904_C12", "label": "dottedName = getDottedName()", "type": "assigned_variable", "loc": [904, 904], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L892_C8", "vector": [14, 3, 0.3397, 0.0004, 3, 0.21, 0.6, 246, 3, 0, 0, 0, 891, 10, 1], "semantic": {"name": "dottedName", "arg_names": [], "import_names": [], "rhs_call_name": "getDottedName", "annotation": ""}, "snippet": " dottedName = self.getDottedName()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L905_C12", "label": "if", "type": "if", "loc": [905, 916], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L892_C8", "vector": [4, 3, 0.3422, 0.0045, 3, 0.21, 0.8, 0, 0, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.atEnd() and self.peek() in '([':\n if self.peek() == '(':\n rest = self.getCallArgString()\n else:\n rest = self.getExpression(enclosed=True)\n \n period = max(dottedName.rfind('.'), 0)\n if period:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L906_C16", "label": "if", "type": "if", "loc": [906, 909], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L905_C12", "vector": [4, 4, 0.341, 0.0015, 4, 0.76, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek() == '(':\n rest = self.getCallArgString()\n else:\n rest = self.getExpression(enclosed=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L907_C20", "label": "rest = getCallArgString()", "type": "assigned_variable", "loc": [907, 907], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L906_C16", "vector": [14, 5, 0.3408, 0.0004, 5, 0.79, 0.0, 788, 3, 0, 0, 0, 612, 10, 1], "semantic": {"name": "rest", "arg_names": [], "import_names": [], "rhs_call_name": "getCallArgString", "annotation": ""}, "snippet": " rest = self.getCallArgString()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L909_C20", "label": "rest = getExpression()", "type": "assigned_variable", "loc": [909, 909], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L906_C16", "vector": [14, 5, 0.3416, 0.0004, 5, 0.79, 1.0, 788, 3, 1, 0, 0, 119, 10, 1], "semantic": {"name": "rest", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " rest = self.getExpression(enclosed=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L911_C16", "label": "period = max()", "type": "assigned_variable", "loc": [911, 911], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L905_C12", "vector": [14, 4, 0.3424, 0.0004, 4, 0.76, 0.3333, 297, 3, 2, 0, 0, 442, 10, 2], "semantic": {"name": "period", "arg_names": [], "import_names": [], "rhs_call_name": "max", "annotation": ""}, "snippet": " period = max(dottedName.rfind('.'), 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L912_C16", "label": "if", "type": "if", "loc": [912, 914], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L905_C12", "vector": [4, 4, 0.3431, 0.0011, 4, 0.76, 0.6667, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if period:\n chunks.append( (dottedName[:period], autoCall, '') )\n dottedName = dottedName[period+1:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L913_C20", "label": "append()", "type": "expression", "loc": [913, 913], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L912_C16", "vector": [8, 5, 0.3431, 0.0004, 5, 0.39, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " chunks.append( (dottedName[:period], autoCall, '') )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L914_C20", "label": "dottedName =", "type": "assigned_variable", "loc": [914, 914], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L912_C16", "vector": [14, 5, 0.3435, 0.0004, 5, 0.39, 1.0, 246, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "dottedName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " dottedName = dottedName[period+1:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L915_C16", "label": "if", "type": "if", "loc": [915, 916], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L905_C12", "vector": [4, 4, 0.344, 0.0008, 4, 0.76, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if rest and rest[0]=='(':\n autoCall = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L916_C20", "label": "autoCall =", "type": "assigned_variable", "loc": [916, 916], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L915_C16", "vector": [14, 5, 0.3442, 0.0004, 5, 0.1, 0.0, 826, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "autoCall", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " autoCall = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L917_C12", "label": "append()", "type": "expression", "loc": [917, 917], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L892_C8", "vector": [8, 3, 0.3446, 0.0004, 3, 0.21, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " chunks.append( (dottedName, autoCall, rest) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L919_C8", "label": "return", "type": "return", "loc": [919, 919], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L863_C4", "vector": [13, 2, 0.3454, 0.0004, 2, 0.3, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return chunks"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "label": "getCallArgString", "type": "function", "loc": [922, 1003], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.3617, 0.0308, 1, 0.31, 0.9062, 612, 0, 3, 1, 0, 0, 0, 40], "semantic": {"name": "getCallArgString", "arg_names": ["self", "enclosures", "useNameMapper"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getCallArgString(self,\n enclosures=[], # list of tuples (char, pos), where char is ({ or [ \n useNameMapper=Unspecified):\n\n \"\"\" Get a method/function call argument string. \n\n This method understands *arg, and **kw\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L926_C8", "label": "expression", "type": "expression", "loc": [926, 929], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "vector": [8, 2, 0.3486, 0.0015, 2, 0.27, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\" Get a method/function call argument string. \n\n This method understands *arg, and **kw\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L932_C8", "label": "if", "type": "if", "loc": [932, 934], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "vector": [4, 2, 0.3506, 0.0011, 2, 0.27, 0.1429, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if useNameMapper is not Unspecified:\n useNameMapper_orig = self.setting('useNameMapper')\n self.setSetting('useNameMapper', useNameMapper)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L933_C12", "label": "useNameMapper_orig = setting()", "type": "assigned_variable", "loc": [933, 933], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L932_C8", "vector": [14, 3, 0.3506, 0.0004, 3, 0.17, 0.0, 334, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "useNameMapper_orig", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " useNameMapper_orig = self.setting('useNameMapper')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L934_C12", "label": "setSetting()", "type": "expression", "loc": [934, 934], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L932_C8", "vector": [8, 3, 0.351, 0.0004, 3, 0.17, 1.0, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self.setSetting('useNameMapper', useNameMapper)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L936_C8", "label": "if", "type": "if", "loc": [936, 944], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "vector": [4, 2, 0.3533, 0.0034, 2, 0.27, 0.2857, 0, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if enclosures:\n pass\n else:\n if not self.peek() == '(':\n raise ParseError(self, msg=\"Expected '('\")\n startPos = self.pos()\n self.getc()\n enclosures = [('(', startPos),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L939_C12", "label": "if", "type": "if", "loc": [939, 940], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L936_C8", "vector": [4, 3, 0.3531, 0.0008, 3, 0.47, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.peek() == '(':\n raise ParseError(self, msg=\"Expected '('\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L941_C12", "label": "startPos = pos()", "type": "assigned_variable", "loc": [941, 941], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L936_C8", "vector": [14, 3, 0.3536, 0.0004, 3, 0.47, 0.3333, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L942_C12", "label": "getc()", "type": "expression", "loc": [942, 942], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L936_C8", "vector": [8, 3, 0.354, 0.0004, 3, 0.47, 0.6667, 827, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getc", "arg_names": [], "import_names": [], "rhs_call_name": "getc", "annotation": ""}, "snippet": " self.getc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L943_C12", "label": "enclosures =", "type": "assigned_variable", "loc": [943, 944], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L936_C8", "vector": [14, 3, 0.3546, 0.0008, 3, 0.47, 1.0, 44, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "enclosures", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " enclosures = [('(', startPos),\n ]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L946_C8", "label": "argStringBits =", "type": "assigned_variable", "loc": [946, 946], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "vector": [14, 2, 0.3555, 0.0004, 2, 0.27, 0.4286, 573, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "argStringBits", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " argStringBits = ['(']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L947_C8", "label": "addBit =", "type": "assigned_variable", "loc": [947, 947], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "vector": [14, 2, 0.3559, 0.0004, 2, 0.27, 0.5714, 405, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "addBit", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " addBit = argStringBits.append"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L949_C8", "label": "while", "type": "while", "loc": [949, 998], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "vector": [5, 2, 0.3658, 0.0188, 2, 0.27, 0.7143, 0, 1, 0, 0, 0, 0, 0, 32], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while True:\n if self.atEnd():\n open = enclosures[-1][0]\n close = closurePairsRev[open]\n self.setPos(enclosures[-1][1])\n raise ParseError(\n self, msg=\"EOF was reached before a matching '\" + close +\n \"' was found for the '\" + open + \"'\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L950_C12", "label": "if", "type": "if", "loc": [950, 956], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L949_C8", "vector": [4, 3, 0.3581, 0.0026, 3, 0.18, 0.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.atEnd():\n open = enclosures[-1][0]\n close = closurePairsRev[open]\n self.setPos(enclosures[-1][1])\n raise ParseError(\n self, msg=\"EOF was reached before a matching '\" + close +\n \"' was found for the '\" + open + \"'\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L951_C16", "label": "open =", "type": "assigned_variable", "loc": [951, 951], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L950_C12", "vector": [14, 4, 0.3574, 0.0004, 4, 0.8, 0.0, 693, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "open", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " open = enclosures[-1][0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L952_C16", "label": "close =", "type": "assigned_variable", "loc": [952, 952], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L950_C12", "vector": [14, 4, 0.3578, 0.0004, 4, 0.8, 0.5, 77, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " close = closurePairsRev[open]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L953_C16", "label": "setPos()", "type": "expression", "loc": [953, 953], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L950_C12", "vector": [8, 4, 0.3581, 0.0004, 4, 0.8, 1.0, 659, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(enclosures[-1][1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L958_C12", "label": "c = peek()", "type": "assigned_variable", "loc": [958, 958], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L949_C8", "vector": [14, 3, 0.36, 0.0004, 3, 0.18, 0.5, 411, 3, 0, 0, 0, 129, 10, 1], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "peek", "annotation": ""}, "snippet": " c = self.peek()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L959_C12", "label": "if", "type": "if", "loc": [959, 998], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L949_C8", "vector": [4, 3, 0.3677, 0.015, 3, 0.18, 1.0, 0, 0, 0, 0, 0, 0, 0, 28], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if c in \")}]\": # get the ending enclosure and break \n if not enclosures:\n raise ParseError(self)\n c = self.getc()\n open = closurePairs[c]\n if enclosures[-1][0] == open:\n enclosures.pop()\n addBit(')') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L960_C16", "label": "if", "type": "if", "loc": [960, 961], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L959_C12", "vector": [4, 4, 0.361, 0.0008, 4, 0.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not enclosures:\n raise ParseError(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L962_C16", "label": "c = getc()", "type": "assigned_variable", "loc": [962, 962], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L959_C12", "vector": [14, 4, 0.3615, 0.0004, 4, 0.0, 0.25, 411, 3, 0, 0, 0, 827, 10, 1], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "getc", "annotation": ""}, "snippet": " c = self.getc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L963_C16", "label": "open =", "type": "assigned_variable", "loc": [963, 963], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L959_C12", "vector": [14, 4, 0.3619, 0.0004, 4, 0.0, 0.5, 693, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "open", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " open = closurePairs[c]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L964_C16", "label": "if", "type": "if", "loc": [964, 969], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L959_C12", "vector": [4, 4, 0.3632, 0.0023, 4, 0.0, 0.75, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if enclosures[-1][0] == open:\n enclosures.pop()\n addBit(')') \n break\n else:\n raise ParseError(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L965_C20", "label": "pop()", "type": "expression", "loc": [965, 965], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L964_C16", "vector": [8, 5, 0.3626, 0.0004, 5, 0.54, 0.0, 969, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "pop", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " enclosures.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L966_C20", "label": "addBit()", "type": "expression", "loc": [966, 966], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L964_C16", "vector": [8, 5, 0.363, 0.0004, 5, 0.54, 1.0, 405, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addBit", "arg_names": [], "import_names": [], "rhs_call_name": "addBit", "annotation": ""}, "snippet": " addBit(')') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L970_C12", "label": "if", "type": "if", "loc": [970, 998], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L959_C12", "vector": [4, 4, 0.3698, 0.0109, 4, 0.0, 1.0, 0, 0, 0, 0, 0, 0, 0, 23], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif c in \" \\t\\f\\r\\n\":\n addBit(self.getc())\n elif self.matchCheetahVarInExpressionStartToken():\n startPos = self.pos()\n codeFor1stToken = self.getCheetahVar()\n WS = self.getWhiteSpace()\n if not self.atEnd() and self.peek() == '=':\n nextToken = self.getPyToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L971_C16", "label": "addBit()", "type": "expression", "loc": [971, 971], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L970_C12", "vector": [8, 5, 0.3649, 0.0004, 5, 0.77, 0.0, 405, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addBit", "arg_names": [], "import_names": [], "rhs_call_name": "addBit", "annotation": ""}, "snippet": " addBit(self.getc())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L972_C12", "label": "if", "type": "if", "loc": [972, 998], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L970_C12", "vector": [4, 5, 0.3702, 0.0101, 5, 0.77, 1.0, 0, 3, 0, 0, 0, 0, 0, 21], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchCheetahVarInExpressionStartToken():\n startPos = self.pos()\n codeFor1stToken = self.getCheetahVar()\n WS = self.getWhiteSpace()\n if not self.atEnd() and self.peek() == '=':\n nextToken = self.getPyToken()\n if nextToken == '=':\n endPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L973_C16", "label": "startPos = pos()", "type": "assigned_variable", "loc": [973, 973], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L972_C12", "vector": [14, 6, 0.3657, 0.0004, 6, 0.99, 0.0, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L974_C16", "label": "codeFor1stToken = getCheetahVar()", "type": "assigned_variable", "loc": [974, 974], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L972_C12", "vector": [14, 6, 0.366, 0.0004, 6, 0.99, 0.25, 792, 3, 0, 0, 0, 741, 10, 1], "semantic": {"name": "codeFor1stToken", "arg_names": [], "import_names": [], "rhs_call_name": "getCheetahVar", "annotation": ""}, "snippet": " codeFor1stToken = self.getCheetahVar()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L975_C16", "label": "WS = getWhiteSpace()", "type": "assigned_variable", "loc": [975, 975], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L972_C12", "vector": [14, 6, 0.3664, 0.0004, 6, 0.99, 0.5, 690, 3, 0, 0, 0, 84, 10, 1], "semantic": {"name": "WS", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " WS = self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L976_C16", "label": "if", "type": "if", "loc": [976, 987], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L972_C12", "vector": [4, 6, 0.3688, 0.0045, 6, 0.99, 0.75, 0, 0, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.atEnd() and self.peek() == '=':\n nextToken = self.getPyToken()\n if nextToken == '=':\n endPos = self.pos()\n self.setPos(startPos)\n codeFor1stToken = self.getCheetahVar(plain=True)\n self.setPos(endPos)\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L977_C20", "label": "nextToken = getPyToken()", "type": "assigned_variable", "loc": [977, 977], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L976_C16", "vector": [14, 7, 0.3672, 0.0004, 7, 0.57, 0.0, 854, 3, 0, 0, 0, 764, 10, 1], "semantic": {"name": "nextToken", "arg_names": [], "import_names": [], "rhs_call_name": "getPyToken", "annotation": ""}, "snippet": " nextToken = self.getPyToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L978_C20", "label": "if", "type": "if", "loc": [978, 982], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L976_C16", "vector": [4, 7, 0.3683, 0.0019, 7, 0.57, 0.3333, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if nextToken == '=':\n endPos = self.pos()\n self.setPos(startPos)\n codeFor1stToken = self.getCheetahVar(plain=True)\n self.setPos(endPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L979_C24", "label": "endPos = pos()", "type": "assigned_variable", "loc": [979, 979], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L978_C20", "vector": [14, 8, 0.3679, 0.0004, 8, 0.33, 0.0, 406, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "endPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " endPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L980_C24", "label": "setPos()", "type": "expression", "loc": [980, 980], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L978_C20", "vector": [8, 8, 0.3683, 0.0004, 8, 0.33, 0.3333, 659, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L981_C24", "label": "codeFor1stToken = getCheetahVar()", "type": "assigned_variable", "loc": [981, 981], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L978_C20", "vector": [14, 8, 0.3687, 0.0004, 8, 0.33, 0.6667, 792, 3, 1, 0, 0, 741, 10, 1], "semantic": {"name": "codeFor1stToken", "arg_names": [], "import_names": [], "rhs_call_name": "getCheetahVar", "annotation": ""}, "snippet": " codeFor1stToken = self.getCheetahVar(plain=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L982_C24", "label": "setPos()", "type": "expression", "loc": [982, 982], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L978_C20", "vector": [8, 8, 0.369, 0.0004, 8, 0.33, 1.0, 659, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(endPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L985_C20", "label": "addBit()", "type": "expression", "loc": [985, 985], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L976_C16", "vector": [8, 7, 0.3702, 0.0004, 7, 0.57, 0.6667, 405, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addBit", "arg_names": [], "import_names": [], "rhs_call_name": "addBit", "annotation": ""}, "snippet": " addBit( codeFor1stToken + WS + nextToken )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L987_C20", "label": "addBit()", "type": "expression", "loc": [987, 987], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L976_C16", "vector": [8, 7, 0.3709, 0.0004, 7, 0.57, 1.0, 405, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addBit", "arg_names": [], "import_names": [], "rhs_call_name": "addBit", "annotation": ""}, "snippet": " addBit( codeFor1stToken + WS)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L988_C12", "label": "if", "type": "if", "loc": [988, 998], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L972_C12", "vector": [4, 6, 0.3732, 0.0041, 6, 0.99, 1.0, 0, 3, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchCheetahVarStart():\n # it has syntax that is only valid at the top level\n self._raiseErrorAboutInvalidCheetahVarSyntaxInExpr()\n else:\n beforeTokenPos = self.pos()\n token = self.getPyToken()\n if token in ('{', '(', '['):\n self.rev()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L990_C16", "label": "_raiseErrorAboutInvalidCheetahVarSyntaxInExpr()", "type": "expression", "loc": [990, 990], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L988_C12", "vector": [8, 7, 0.372, 0.0004, 7, 0.33, 0.0, 322, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_raiseErrorAboutInvalidCheetahVarSyntaxInExpr", "arg_names": [], "import_names": [], "rhs_call_name": "_raiseErrorAboutInvalidCheetahVarSyntaxInExpr", "annotation": ""}, "snippet": " self._raiseErrorAboutInvalidCheetahVarSyntaxInExpr()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L992_C16", "label": "beforeTokenPos = pos()", "type": "assigned_variable", "loc": [992, 992], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L988_C12", "vector": [14, 7, 0.3728, 0.0004, 7, 0.33, 0.2, 400, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "beforeTokenPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " beforeTokenPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L993_C16", "label": "token = getPyToken()", "type": "assigned_variable", "loc": [993, 993], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L988_C12", "vector": [14, 7, 0.3732, 0.0004, 7, 0.33, 0.4, 129, 3, 0, 0, 0, 764, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "getPyToken", "annotation": ""}, "snippet": " token = self.getPyToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L994_C16", "label": "if", "type": "if", "loc": [994, 996], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L988_C12", "vector": [4, 7, 0.3739, 0.0011, 7, 0.33, 0.6, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if token in ('{', '(', '['):\n self.rev()\n token = self.getExpression(enclosed=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L995_C20", "label": "rev()", "type": "expression", "loc": [995, 995], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L994_C16", "vector": [8, 8, 0.3739, 0.0004, 8, 0.44, 0.0, 337, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "rev", "arg_names": [], "import_names": [], "rhs_call_name": "rev", "annotation": ""}, "snippet": " self.rev()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L996_C20", "label": "token = getExpression()", "type": "assigned_variable", "loc": [996, 996], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L994_C16", "vector": [14, 8, 0.3743, 0.0004, 8, 0.44, 1.0, 129, 3, 1, 0, 0, 119, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " token = self.getExpression(enclosed=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L997_C16", "label": "token = transformToken()", "type": "assigned_variable", "loc": [997, 997], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L988_C12", "vector": [14, 7, 0.3747, 0.0004, 7, 0.33, 0.8, 129, 3, 2, 0, 0, 672, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "transformToken", "annotation": ""}, "snippet": " token = self.transformToken(token, beforeTokenPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L998_C16", "label": "addBit()", "type": "expression", "loc": [998, 998], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L988_C12", "vector": [8, 7, 0.375, 0.0004, 7, 0.33, 1.0, 405, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addBit", "arg_names": [], "import_names": [], "rhs_call_name": "addBit", "annotation": ""}, "snippet": " addBit(token)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1000_C8", "label": "if", "type": "if", "loc": [1000, 1001], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "vector": [4, 2, 0.376, 0.0008, 2, 0.27, 0.8571, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if useNameMapper is not Unspecified:\n self.setSetting('useNameMapper', useNameMapper_orig) # @@TR: see comment above"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1001_C12", "label": "setSetting()", "type": "expression", "loc": [1001, 1001], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1000_C8", "vector": [8, 3, 0.3762, 0.0004, 3, 0.94, 0.0, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self.setSetting('useNameMapper', useNameMapper_orig) # @@TR: see comment above"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1003_C8", "label": "return", "type": "return", "loc": [1003, 1003], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "vector": [13, 2, 0.3769, 0.0004, 2, 0.27, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''.join(argStringBits)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "label": "getDefArgList", "type": "function", "loc": [1005, 1090], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.3936, 0.0323, 1, 0.31, 0.9219, 197, 0, 3, 1, 0, 0, 0, 42], "semantic": {"name": "getDefArgList", "arg_names": ["self", "exitPos", "useNameMapper"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getDefArgList(self, exitPos=None, useNameMapper=False):\n\n \"\"\" Get an argument list. Can be used for method/function definition\n argument lists or for #directive argument lists. Returns a list of\n tuples in the form (argName, defVal=None) with one tuple for each arg\n name.\n\n These defVals are always strings, so (argName, defVal=None) is safe even"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1007_C8", "label": "expression", "type": "expression", "loc": [1007, 1021], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "vector": [8, 2, 0.3811, 0.0056, 2, 0.94, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\" Get an argument list. Can be used for method/function definition\n argument lists or for #directive argument lists. Returns a list of\n tuples in the form (argName, defVal=None) with one tuple for each arg\n name.\n\n These defVals are always strings, so (argName, defVal=None) is safe even\n with a case like (arg1, arg2=None, arg3=1234*2), which would be returned as\n [('arg1', None),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1023_C8", "label": "if", "type": "if", "loc": [1023, 1026], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "vector": [4, 2, 0.385, 0.0015, 2, 0.94, 0.125, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek() == '(':\n self.advance()\n else:\n exitPos = self.findEOL() # it's a directive so break at the EOL"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1024_C12", "label": "advance()", "type": "expression", "loc": [1024, 1024], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1023_C8", "vector": [8, 3, 0.3848, 0.0004, 3, 0.41, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1026_C12", "label": "exitPos = findEOL()", "type": "assigned_variable", "loc": [1026, 1026], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1023_C8", "vector": [14, 3, 0.3856, 0.0004, 3, 0.41, 1.0, 355, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "exitPos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " exitPos = self.findEOL() # it's a directive so break at the EOL"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1027_C8", "label": "argList = ArgList()", "type": "assigned_variable", "loc": [1027, 1027], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "vector": [14, 2, 0.3859, 0.0004, 2, 0.94, 0.25, 566, 3, 0, 0, 0, 179, 10, 1], "semantic": {"name": "argList", "arg_names": [], "import_names": [], "rhs_call_name": "ArgList", "annotation": ""}, "snippet": " argList = ArgList()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1028_C8", "label": "onDefVal =", "type": "assigned_variable", "loc": [1028, 1028], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "vector": [14, 2, 0.3863, 0.0004, 2, 0.94, 0.375, 810, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "onDefVal", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " onDefVal = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1031_C8", "label": "useNameMapper_orig = setting()", "type": "assigned_variable", "loc": [1031, 1031], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "vector": [14, 2, 0.3874, 0.0004, 2, 0.94, 0.5, 334, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "useNameMapper_orig", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " useNameMapper_orig = self.setting('useNameMapper')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1032_C8", "label": "setSetting()", "type": "expression", "loc": [1032, 1032], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "vector": [8, 2, 0.3878, 0.0004, 2, 0.94, 0.625, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self.setSetting('useNameMapper', useNameMapper)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1034_C8", "label": "while", "type": "while", "loc": [1034, 1086], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "vector": [5, 2, 0.3983, 0.0199, 2, 0.94, 0.75, 0, 1, 0, 0, 0, 0, 0, 34], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while True:\n if self.atEnd():\n raise ParseError(\n self, msg=\"EOF was reached before a matching ')'\"+\n \" was found for the '('\")\n\n if self.pos() == exitPos:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1035_C12", "label": "if", "type": "if", "loc": [1035, 1038], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1034_C8", "vector": [4, 3, 0.3895, 0.0015, 3, 0.32, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.atEnd():\n raise ParseError(\n self, msg=\"EOF was reached before a matching ')'\"+\n \" was found for the '('\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1040_C12", "label": "if", "type": "if", "loc": [1040, 1041], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1034_C8", "vector": [4, 3, 0.391, 0.0008, 3, 0.32, 0.3333, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.pos() == exitPos:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1043_C12", "label": "c = peek()", "type": "assigned_variable", "loc": [1043, 1043], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1034_C8", "vector": [14, 3, 0.392, 0.0004, 3, 0.32, 0.6667, 411, 3, 0, 0, 0, 129, 10, 1], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "peek", "annotation": ""}, "snippet": " c = self.peek()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1044_C12", "label": "if", "type": "if", "loc": [1044, 1086], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1034_C8", "vector": [4, 3, 0.4002, 0.0162, 3, 0.32, 1.0, 0, 0, 0, 0, 0, 0, 0, 30], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if c == \")\" or self.matchDirectiveEndToken():\n break\n elif c == \":\":\n break \n elif c in \" \\t\\f\\r\\n\":\n if onDefVal:\n argList.add_default(c)\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1046_C12", "label": "if", "type": "if", "loc": [1046, 1086], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1044_C12", "vector": [4, 4, 0.4006, 0.0154, 4, 0.85, 0.0, 0, 0, 0, 0, 0, 0, 0, 29], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif c == \":\":\n break \n elif c in \" \\t\\f\\r\\n\":\n if onDefVal:\n argList.add_default(c)\n self.advance()\n elif c == '=':\n onDefVal = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1048_C12", "label": "if", "type": "if", "loc": [1048, 1086], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1046_C12", "vector": [4, 5, 0.401, 0.0147, 5, 0.67, 0.0, 0, 0, 0, 0, 0, 0, 0, 29], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif c in \" \\t\\f\\r\\n\":\n if onDefVal:\n argList.add_default(c)\n self.advance()\n elif c == '=':\n onDefVal = True\n self.advance()\n elif c == \",\":"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1049_C16", "label": "if", "type": "if", "loc": [1049, 1050], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1048_C12", "vector": [4, 6, 0.3944, 0.0008, 6, 0.19, 0.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if onDefVal:\n argList.add_default(c)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1050_C20", "label": "add_default()", "type": "expression", "loc": [1050, 1050], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1049_C16", "vector": [8, 7, 0.3946, 0.0004, 7, 0.33, 0.0, 48, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add_default", "arg_names": [], "import_names": [], "rhs_call_name": "add_default", "annotation": ""}, "snippet": " argList.add_default(c)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1051_C16", "label": "advance()", "type": "expression", "loc": [1051, 1051], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1048_C12", "vector": [8, 6, 0.395, 0.0004, 6, 0.19, 0.5, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1052_C12", "label": "if", "type": "if", "loc": [1052, 1086], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1048_C12", "vector": [4, 6, 0.4017, 0.0132, 6, 0.19, 1.0, 0, 0, 0, 0, 0, 0, 0, 27], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif c == '=':\n onDefVal = True\n self.advance()\n elif c == \",\":\n argList.next()\n onDefVal = False\n self.advance()\n elif self.startswith(self.cheetahVarStartToken) and not onDefVal:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1053_C16", "label": "onDefVal =", "type": "assigned_variable", "loc": [1053, 1053], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1052_C12", "vector": [14, 7, 0.3957, 0.0004, 7, 0.74, 0.0, 810, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "onDefVal", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " onDefVal = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1054_C16", "label": "advance()", "type": "expression", "loc": [1054, 1054], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1052_C12", "vector": [8, 7, 0.3961, 0.0004, 7, 0.74, 0.5, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1055_C12", "label": "if", "type": "if", "loc": [1055, 1086], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1052_C12", "vector": [4, 7, 0.4023, 0.012, 7, 0.74, 1.0, 0, 0, 0, 0, 0, 0, 0, 26], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif c == \",\":\n argList.next()\n onDefVal = False\n self.advance()\n elif self.startswith(self.cheetahVarStartToken) and not onDefVal:\n self.advance(len(self.cheetahVarStartToken))\n elif self.matchIdentifier() and not onDefVal:\n argList.add_argument( self.getIdentifier() )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1056_C16", "label": "next()", "type": "expression", "loc": [1056, 1056], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1055_C12", "vector": [8, 8, 0.3968, 0.0004, 8, 0.41, 0.0, 11, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "next", "arg_names": [], "import_names": [], "rhs_call_name": "next", "annotation": ""}, "snippet": " argList.next()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1057_C16", "label": "onDefVal =", "type": "assigned_variable", "loc": [1057, 1057], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1055_C12", "vector": [14, 8, 0.3972, 0.0004, 8, 0.41, 0.3333, 810, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "onDefVal", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " onDefVal = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1058_C16", "label": "advance()", "type": "expression", "loc": [1058, 1058], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1055_C12", "vector": [8, 8, 0.3976, 0.0004, 8, 0.41, 0.6667, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1059_C12", "label": "if", "type": "if", "loc": [1059, 1086], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1055_C12", "vector": [4, 8, 0.403, 0.0105, 8, 0.41, 1.0, 0, 0, 0, 0, 0, 0, 0, 24], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.startswith(self.cheetahVarStartToken) and not onDefVal:\n self.advance(len(self.cheetahVarStartToken))\n elif self.matchIdentifier() and not onDefVal:\n argList.add_argument( self.getIdentifier() )\n elif onDefVal:\n if self.matchCheetahVarInExpressionStartToken():\n token = self.getCheetahVar()\n elif self.matchCheetahVarStart():"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1060_C16", "label": "advance()", "type": "expression", "loc": [1060, 1060], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1059_C12", "vector": [8, 9, 0.3983, 0.0004, 9, 0.46, 0.0, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len(self.cheetahVarStartToken))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1061_C12", "label": "if", "type": "if", "loc": [1061, 1086], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1059_C12", "vector": [4, 9, 0.4034, 0.0098, 9, 0.46, 1.0, 0, 0, 0, 0, 0, 0, 0, 21], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchIdentifier() and not onDefVal:\n argList.add_argument( self.getIdentifier() )\n elif onDefVal:\n if self.matchCheetahVarInExpressionStartToken():\n token = self.getCheetahVar()\n elif self.matchCheetahVarStart():\n # it has syntax that is only valid at the top level \n self._raiseErrorAboutInvalidCheetahVarSyntaxInExpr()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1062_C16", "label": "add_argument()", "type": "expression", "loc": [1062, 1062], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1061_C12", "vector": [8, 10, 0.3991, 0.0004, 10, 0.26, 0.0, 178, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "add_argument", "arg_names": [], "import_names": [], "rhs_call_name": "add_argument", "annotation": ""}, "snippet": " argList.add_argument( self.getIdentifier() )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1063_C12", "label": "if", "type": "if", "loc": [1063, 1086], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1061_C12", "vector": [4, 10, 0.4038, 0.009, 10, 0.26, 1.0, 0, 2, 0, 0, 0, 0, 0, 18], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif onDefVal:\n if self.matchCheetahVarInExpressionStartToken():\n token = self.getCheetahVar()\n elif self.matchCheetahVarStart():\n # it has syntax that is only valid at the top level \n self._raiseErrorAboutInvalidCheetahVarSyntaxInExpr()\n else:\n beforeTokenPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1064_C16", "label": "if", "type": "if", "loc": [1064, 1075], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1063_C12", "vector": [4, 11, 0.4019, 0.0045, 11, 0.77, 0.0, 0, 3, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchCheetahVarInExpressionStartToken():\n token = self.getCheetahVar()\n elif self.matchCheetahVarStart():\n # it has syntax that is only valid at the top level \n self._raiseErrorAboutInvalidCheetahVarSyntaxInExpr()\n else:\n beforeTokenPos = self.pos()\n token = self.getPyToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1065_C20", "label": "token = getCheetahVar()", "type": "assigned_variable", "loc": [1065, 1065], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1064_C16", "vector": [14, 12, 0.4002, 0.0004, 12, 0.37, 0.0, 129, 3, 0, 0, 0, 741, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "getCheetahVar", "annotation": ""}, "snippet": " token = self.getCheetahVar()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1066_C16", "label": "if", "type": "if", "loc": [1066, 1075], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1064_C16", "vector": [4, 12, 0.4023, 0.0038, 12, 0.37, 1.0, 0, 3, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchCheetahVarStart():\n # it has syntax that is only valid at the top level \n self._raiseErrorAboutInvalidCheetahVarSyntaxInExpr()\n else:\n beforeTokenPos = self.pos()\n token = self.getPyToken()\n if token in ('{', '(', '['):\n self.rev()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1068_C20", "label": "_raiseErrorAboutInvalidCheetahVarSyntaxInExpr()", "type": "expression", "loc": [1068, 1068], "level": 13, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1066_C16", "vector": [8, 13, 0.4014, 0.0004, 13, 0.46, 0.0, 322, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_raiseErrorAboutInvalidCheetahVarSyntaxInExpr", "arg_names": [], "import_names": [], "rhs_call_name": "_raiseErrorAboutInvalidCheetahVarSyntaxInExpr", "annotation": ""}, "snippet": " self._raiseErrorAboutInvalidCheetahVarSyntaxInExpr()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1070_C20", "label": "beforeTokenPos = pos()", "type": "assigned_variable", "loc": [1070, 1070], "level": 13, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1066_C16", "vector": [14, 13, 0.4021, 0.0004, 13, 0.46, 0.25, 400, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "beforeTokenPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " beforeTokenPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1071_C20", "label": "token = getPyToken()", "type": "assigned_variable", "loc": [1071, 1071], "level": 13, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1066_C16", "vector": [14, 13, 0.4025, 0.0004, 13, 0.46, 0.5, 129, 3, 0, 0, 0, 764, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "getPyToken", "annotation": ""}, "snippet": " token = self.getPyToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1072_C20", "label": "if", "type": "if", "loc": [1072, 1074], "level": 13, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1066_C16", "vector": [4, 13, 0.4032, 0.0011, 13, 0.46, 0.75, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if token in ('{', '(', '['):\n self.rev()\n token = self.getExpression(enclosed=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1073_C24", "label": "rev()", "type": "expression", "loc": [1073, 1073], "level": 14, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1072_C20", "vector": [8, 14, 0.4032, 0.0004, 14, 0.17, 0.0, 337, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "rev", "arg_names": [], "import_names": [], "rhs_call_name": "rev", "annotation": ""}, "snippet": " self.rev()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1074_C24", "label": "token = getExpression()", "type": "assigned_variable", "loc": [1074, 1074], "level": 14, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1072_C20", "vector": [14, 14, 0.4036, 0.0004, 14, 0.17, 1.0, 129, 3, 1, 0, 0, 119, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " token = self.getExpression(enclosed=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1075_C20", "label": "token = transformToken()", "type": "assigned_variable", "loc": [1075, 1075], "level": 13, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1066_C16", "vector": [14, 13, 0.404, 0.0004, 13, 0.46, 1.0, 129, 3, 2, 0, 0, 672, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "transformToken", "annotation": ""}, "snippet": " token = self.transformToken(token, beforeTokenPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1076_C16", "label": "add_default()", "type": "expression", "loc": [1076, 1076], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1063_C12", "vector": [8, 11, 0.4044, 0.0004, 11, 0.77, 0.5, 48, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add_default", "arg_names": [], "import_names": [], "rhs_call_name": "add_default", "annotation": ""}, "snippet": " argList.add_default(token)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1077_C12", "label": "if", "type": "if", "loc": [1077, 1086], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1063_C12", "vector": [4, 11, 0.4064, 0.0038, 11, 0.77, 1.0, 0, 0, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif c == '*' and not onDefVal:\n varName = self.getc()\n if self.peek() == '*':\n varName += self.getc()\n if not self.matchIdentifier():\n raise ParseError(self)\n varName += self.getIdentifier()\n argList.add_argument(varName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1078_C16", "label": "varName = getc()", "type": "assigned_variable", "loc": [1078, 1078], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1077_C12", "vector": [14, 12, 0.4051, 0.0004, 12, 0.2, 0.0, 624, 3, 0, 0, 0, 827, 10, 1], "semantic": {"name": "varName", "arg_names": [], "import_names": [], "rhs_call_name": "getc", "annotation": ""}, "snippet": " varName = self.getc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1079_C16", "label": "if", "type": "if", "loc": [1079, 1080], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1077_C12", "vector": [4, 12, 0.4057, 0.0008, 12, 0.2, 0.3333, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek() == '*':\n varName += self.getc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1081_C16", "label": "if", "type": "if", "loc": [1081, 1082], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1077_C12", "vector": [4, 12, 0.4064, 0.0008, 12, 0.2, 0.6667, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.matchIdentifier():\n raise ParseError(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1084_C16", "label": "add_argument()", "type": "expression", "loc": [1084, 1084], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1077_C12", "vector": [8, 12, 0.4074, 0.0004, 12, 0.2, 1.0, 178, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add_argument", "arg_names": [], "import_names": [], "rhs_call_name": "add_argument", "annotation": ""}, "snippet": " argList.add_argument(varName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1089_C8", "label": "setSetting()", "type": "expression", "loc": [1089, 1089], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "vector": [8, 2, 0.4092, 0.0004, 2, 0.94, 0.875, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self.setSetting('useNameMapper', useNameMapper_orig) # @@TR: see comment above"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1090_C8", "label": "return", "type": "return", "loc": [1090, 1090], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "vector": [13, 2, 0.4096, 0.0004, 2, 0.94, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return argList.merge()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "label": "getExpressionParts", "type": "function", "loc": [1092, 1196], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.4299, 0.0395, 1, 0.31, 0.9375, 255, 0, 5, 1, 0, 0, 0, 52], "semantic": {"name": "getExpressionParts", "arg_names": ["self", "enclosed", "enclosures", "pyTokensToBreakAt", "useNameMapper"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getExpressionParts(self,\n enclosed=False, \n enclosures=None, # list of tuples (char, pos), where char is ({ or [ \n pyTokensToBreakAt=None, # only works if not enclosed\n useNameMapper=Unspecified,\n ):\n\n \"\"\" Get a Cheetah expression that includes $CheetahVars and break at"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1099_C8", "label": "expression", "type": "expression", "loc": [1099, 1102], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "vector": [8, 2, 0.4136, 0.0015, 2, 0.47, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\" Get a Cheetah expression that includes $CheetahVars and break at\n directive end tokens, the end of an enclosure, or at a specified\n pyToken.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1104_C8", "label": "if", "type": "if", "loc": [1104, 1106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "vector": [4, 2, 0.4153, 0.0011, 2, 0.47, 0.1429, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if useNameMapper is not Unspecified:\n useNameMapper_orig = self.setting('useNameMapper')\n self.setSetting('useNameMapper', useNameMapper)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1105_C12", "label": "useNameMapper_orig = setting()", "type": "assigned_variable", "loc": [1105, 1105], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1104_C8", "vector": [14, 3, 0.4153, 0.0004, 3, 0.65, 0.0, 334, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "useNameMapper_orig", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " useNameMapper_orig = self.setting('useNameMapper')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1106_C12", "label": "setSetting()", "type": "expression", "loc": [1106, 1106], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1104_C8", "vector": [8, 3, 0.4156, 0.0004, 3, 0.65, 1.0, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self.setSetting('useNameMapper', useNameMapper)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1108_C8", "label": "if", "type": "if", "loc": [1108, 1109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "vector": [4, 2, 0.4166, 0.0008, 2, 0.47, 0.2857, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if enclosures is None:\n enclosures = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1109_C12", "label": "enclosures =", "type": "assigned_variable", "loc": [1109, 1109], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1108_C8", "vector": [14, 3, 0.4168, 0.0004, 3, 0.26, 0.0, 44, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "enclosures", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " enclosures = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1111_C8", "label": "srcLen = len()", "type": "assigned_variable", "loc": [1111, 1111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "vector": [14, 2, 0.4175, 0.0004, 2, 0.47, 0.4286, 468, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "srcLen", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " srcLen = len(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1112_C8", "label": "exprBits =", "type": "assigned_variable", "loc": [1112, 1112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "vector": [14, 2, 0.4179, 0.0004, 2, 0.47, 0.5714, 177, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "exprBits", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " exprBits = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1113_C8", "label": "while", "type": "while", "loc": [1113, 1192], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "vector": [5, 2, 0.4331, 0.0301, 2, 0.47, 0.7143, 0, 1, 0, 0, 0, 0, 0, 48], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while True:\n if self.atEnd():\n if enclosures:\n open = enclosures[-1][0]\n close = closurePairsRev[open]\n self.setPos(enclosures[-1][1])\n raise ParseError(\n self, msg=\"EOF was reached before a matching '\" + close +"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1114_C12", "label": "if", "type": "if", "loc": [1114, 1123], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1113_C8", "vector": [4, 3, 0.4203, 0.0038, 3, 0.11, 0.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.atEnd():\n if enclosures:\n open = enclosures[-1][0]\n close = closurePairsRev[open]\n self.setPos(enclosures[-1][1])\n raise ParseError(\n self, msg=\"EOF was reached before a matching '\" + close +\n \"' was found for the '\" + open + \"'\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1115_C16", "label": "if", "type": "if", "loc": [1115, 1123], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1114_C12", "vector": [4, 4, 0.4205, 0.0034, 4, 0.88, 0.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if enclosures:\n open = enclosures[-1][0]\n close = closurePairsRev[open]\n self.setPos(enclosures[-1][1])\n raise ParseError(\n self, msg=\"EOF was reached before a matching '\" + close +\n \"' was found for the '\" + open + \"'\")\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1116_C20", "label": "open =", "type": "assigned_variable", "loc": [1116, 1116], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1115_C16", "vector": [14, 5, 0.4194, 0.0004, 5, 0.51, 0.0, 693, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "open", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " open = enclosures[-1][0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1117_C20", "label": "close =", "type": "assigned_variable", "loc": [1117, 1117], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1115_C16", "vector": [14, 5, 0.4198, 0.0004, 5, 0.51, 0.5, 77, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " close = closurePairsRev[open]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1118_C20", "label": "setPos()", "type": "expression", "loc": [1118, 1118], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1115_C16", "vector": [8, 5, 0.4201, 0.0004, 5, 0.51, 1.0, 659, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(enclosures[-1][1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1125_C12", "label": "c = peek()", "type": "assigned_variable", "loc": [1125, 1125], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1113_C8", "vector": [14, 3, 0.4228, 0.0004, 3, 0.11, 0.5, 411, 3, 0, 0, 0, 129, 10, 1], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "peek", "annotation": ""}, "snippet": " c = self.peek()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1126_C12", "label": "if", "type": "if", "loc": [1126, 1192], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1113_C8", "vector": [4, 3, 0.4356, 0.0252, 3, 0.11, 1.0, 0, 0, 0, 0, 0, 0, 0, 44], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if c in \"{([\":\n exprBits.append(c)\n enclosures.append( (c, self.pos()) )\n self.advance() \n elif enclosed and not enclosures:\n break \n elif c in \"])}\":\n if not enclosures:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1127_C16", "label": "append()", "type": "expression", "loc": [1127, 1127], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1126_C12", "vector": [8, 4, 0.4235, 0.0004, 4, 0.66, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " exprBits.append(c)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1128_C16", "label": "append()", "type": "expression", "loc": [1128, 1128], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1126_C12", "vector": [8, 4, 0.4239, 0.0004, 4, 0.66, 0.3333, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " enclosures.append( (c, self.pos()) )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1129_C16", "label": "advance()", "type": "expression", "loc": [1129, 1129], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1126_C12", "vector": [8, 4, 0.4243, 0.0004, 4, 0.66, 0.6667, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1130_C12", "label": "if", "type": "if", "loc": [1130, 1192], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1126_C12", "vector": [4, 4, 0.4363, 0.0237, 4, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 40], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif enclosed and not enclosures:\n break \n elif c in \"])}\":\n if not enclosures:\n raise ParseError(self)\n open = closurePairs[c]\n if enclosures[-1][0] == open:\n enclosures.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1132_C12", "label": "if", "type": "if", "loc": [1132, 1192], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1130_C12", "vector": [4, 5, 0.4367, 0.0229, 5, 0.05, 0.0, 0, 0, 0, 0, 0, 0, 0, 40], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif c in \"])}\":\n if not enclosures:\n raise ParseError(self)\n open = closurePairs[c]\n if enclosures[-1][0] == open:\n enclosures.pop()\n exprBits.append(c)\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1133_C16", "label": "if", "type": "if", "loc": [1133, 1134], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1132_C12", "vector": [4, 6, 0.426, 0.0008, 6, 0.85, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not enclosures:\n raise ParseError(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1135_C16", "label": "open =", "type": "assigned_variable", "loc": [1135, 1135], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1132_C12", "vector": [14, 6, 0.4265, 0.0004, 6, 0.85, 0.25, 693, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "open", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " open = closurePairs[c]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1136_C16", "label": "if", "type": "if", "loc": [1136, 1148], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1132_C12", "vector": [4, 6, 0.4292, 0.0049, 6, 0.85, 0.5, 0, 0, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if enclosures[-1][0] == open:\n enclosures.pop()\n exprBits.append(c)\n else:\n open = enclosures[-1][0]\n close = closurePairsRev[open]\n row, col = self.getRowCol()\n self.setPos(enclosures[-1][1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1137_C20", "label": "pop()", "type": "expression", "loc": [1137, 1137], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1136_C16", "vector": [8, 7, 0.4273, 0.0004, 7, 0.57, 0.0, 969, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "pop", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " enclosures.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1138_C20", "label": "append()", "type": "expression", "loc": [1138, 1138], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1136_C16", "vector": [8, 7, 0.4277, 0.0004, 7, 0.57, 0.2, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " exprBits.append(c)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1140_C20", "label": "open =", "type": "assigned_variable", "loc": [1140, 1140], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1136_C16", "vector": [14, 7, 0.4284, 0.0004, 7, 0.57, 0.4, 693, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "open", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " open = enclosures[-1][0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1141_C20", "label": "close =", "type": "assigned_variable", "loc": [1141, 1141], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1136_C16", "vector": [14, 7, 0.4288, 0.0004, 7, 0.57, 0.6, 77, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " close = closurePairsRev[open]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1142_C20", "label": "row, col = getRowCol()", "type": "assigned_variable", "loc": [1142, 1142], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1136_C16", "vector": [14, 7, 0.4292, 0.0004, 7, 0.57, 0.8, 777, 3, 0, 0, 0, 946, 10, 1], "semantic": {"name": "row, col", "arg_names": [], "import_names": [], "rhs_call_name": "getRowCol", "annotation": ""}, "snippet": " row, col = self.getRowCol()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1143_C20", "label": "setPos()", "type": "expression", "loc": [1143, 1143], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1136_C16", "vector": [8, 7, 0.4295, 0.0004, 7, 0.57, 1.0, 659, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(enclosures[-1][1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1149_C16", "label": "advance()", "type": "expression", "loc": [1149, 1149], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1132_C12", "vector": [8, 6, 0.4318, 0.0004, 6, 0.85, 0.75, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1151_C12", "label": "if", "type": "if", "loc": [1151, 1192], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1132_C12", "vector": [4, 6, 0.4402, 0.0158, 6, 0.85, 1.0, 0, 0, 0, 0, 0, 0, 0, 31], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif c in \" \\f\\t\":\n exprBits.append(self.getWhiteSpace()) \n elif self.matchDirectiveEndToken() and not enclosures:\n break \n elif c == \"\\\\\" and self.pos()+1 < srcLen:\n eolMatch = EOLre.match(self.src(), self.pos()+1)\n if not eolMatch:\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1152_C16", "label": "append()", "type": "expression", "loc": [1152, 1152], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1151_C12", "vector": [8, 7, 0.4329, 0.0004, 7, 0.43, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " exprBits.append(self.getWhiteSpace()) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1153_C12", "label": "if", "type": "if", "loc": [1153, 1192], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1151_C12", "vector": [4, 7, 0.4406, 0.015, 7, 0.43, 1.0, 0, 0, 0, 0, 0, 0, 0, 29], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchDirectiveEndToken() and not enclosures:\n break \n elif c == \"\\\\\" and self.pos()+1 < srcLen:\n eolMatch = EOLre.match(self.src(), self.pos()+1)\n if not eolMatch:\n self.advance()\n raise ParseError(self, msg='Line ending expected')\n self.setPos( eolMatch.end() )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1155_C12", "label": "if", "type": "if", "loc": [1155, 1192], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1153_C12", "vector": [4, 8, 0.441, 0.0143, 8, 0.98, 0.0, 0, 0, 0, 0, 0, 0, 0, 28], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif c == \"\\\\\" and self.pos()+1 < srcLen:\n eolMatch = EOLre.match(self.src(), self.pos()+1)\n if not eolMatch:\n self.advance()\n raise ParseError(self, msg='Line ending expected')\n self.setPos( eolMatch.end() )\n elif c in '\\r\\n':\n if enclosures:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1156_C16", "label": "eolMatch = match()", "type": "assigned_variable", "loc": [1156, 1156], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1155_C12", "vector": [14, 9, 0.4344, 0.0004, 9, 0.49, 0.0, 53, 3, 2, 0, 0, 36, 10, 3], "semantic": {"name": "eolMatch", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " eolMatch = EOLre.match(self.src(), self.pos()+1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1157_C16", "label": "if", "type": "if", "loc": [1157, 1159], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1155_C12", "vector": [4, 9, 0.4352, 0.0011, 9, 0.49, 0.3333, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not eolMatch:\n self.advance()\n raise ParseError(self, msg='Line ending expected')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1158_C20", "label": "advance()", "type": "expression", "loc": [1158, 1158], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1157_C16", "vector": [8, 10, 0.4352, 0.0004, 10, 0.83, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1160_C16", "label": "setPos()", "type": "expression", "loc": [1160, 1160], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1155_C12", "vector": [8, 9, 0.4359, 0.0004, 9, 0.49, 0.6667, 659, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos( eolMatch.end() )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1161_C12", "label": "if", "type": "if", "loc": [1161, 1192], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1155_C12", "vector": [4, 9, 0.4421, 0.012, 9, 0.49, 1.0, 0, 0, 0, 0, 0, 0, 0, 20], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif c in '\\r\\n':\n if enclosures:\n self.advance() \n else:\n break \n elif self.matchCheetahVarInExpressionStartToken():\n expr = self.getCheetahVar()\n exprBits.append(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1162_C16", "label": "if", "type": "if", "loc": [1162, 1165], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1161_C12", "vector": [4, 10, 0.4372, 0.0015, 10, 0.99, 0.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if enclosures:\n self.advance() \n else:\n break "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1163_C20", "label": "advance()", "type": "expression", "loc": [1163, 1163], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1162_C16", "vector": [8, 11, 0.4371, 0.0004, 11, 0.0, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1166_C12", "label": "if", "type": "if", "loc": [1166, 1192], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1161_C12", "vector": [4, 10, 0.4431, 0.0101, 10, 0.99, 1.0, 0, 3, 0, 0, 0, 0, 0, 19], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchCheetahVarInExpressionStartToken():\n expr = self.getCheetahVar()\n exprBits.append(expr)\n elif self.matchCheetahVarStart():\n # it has syntax that is only valid at the top level \n self._raiseErrorAboutInvalidCheetahVarSyntaxInExpr() \n else: \n beforeTokenPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1167_C16", "label": "expr = getCheetahVar()", "type": "assigned_variable", "loc": [1167, 1167], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1166_C12", "vector": [14, 11, 0.4386, 0.0004, 11, 0.81, 0.0, 236, 3, 0, 0, 0, 741, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "getCheetahVar", "annotation": ""}, "snippet": " expr = self.getCheetahVar()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1168_C16", "label": "append()", "type": "expression", "loc": [1168, 1168], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1166_C12", "vector": [8, 11, 0.4389, 0.0004, 11, 0.81, 0.5, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " exprBits.append(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1169_C12", "label": "if", "type": "if", "loc": [1169, 1192], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1166_C12", "vector": [4, 11, 0.4436, 0.009, 11, 0.81, 1.0, 0, 3, 0, 0, 0, 0, 0, 16], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchCheetahVarStart():\n # it has syntax that is only valid at the top level \n self._raiseErrorAboutInvalidCheetahVarSyntaxInExpr() \n else: \n beforeTokenPos = self.pos()\n token = self.getPyToken()\n if (not enclosures \n and pyTokensToBreakAt"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1171_C16", "label": "_raiseErrorAboutInvalidCheetahVarSyntaxInExpr()", "type": "expression", "loc": [1171, 1171], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1169_C12", "vector": [8, 12, 0.4401, 0.0004, 12, 0.31, 0.0, 322, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_raiseErrorAboutInvalidCheetahVarSyntaxInExpr", "arg_names": [], "import_names": [], "rhs_call_name": "_raiseErrorAboutInvalidCheetahVarSyntaxInExpr", "annotation": ""}, "snippet": " self._raiseErrorAboutInvalidCheetahVarSyntaxInExpr() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1173_C16", "label": "beforeTokenPos = pos()", "type": "assigned_variable", "loc": [1173, 1173], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1169_C12", "vector": [14, 12, 0.4408, 0.0004, 12, 0.31, 0.1667, 400, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "beforeTokenPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " beforeTokenPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1174_C16", "label": "token = getPyToken()", "type": "assigned_variable", "loc": [1174, 1174], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1169_C12", "vector": [14, 12, 0.4412, 0.0004, 12, 0.31, 0.3333, 129, 3, 0, 0, 0, 764, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "getPyToken", "annotation": ""}, "snippet": " token = self.getPyToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1175_C16", "label": "if", "type": "if", "loc": [1175, 1180], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1169_C12", "vector": [4, 12, 0.4425, 0.0023, 12, 0.31, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (not enclosures \n and pyTokensToBreakAt\n and token in pyTokensToBreakAt):\n \n self.setPos(beforeTokenPos)\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1179_C20", "label": "setPos()", "type": "expression", "loc": [1179, 1179], "level": 13, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1175_C16", "vector": [8, 13, 0.4431, 0.0004, 13, 0.92, 0.0, 659, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(beforeTokenPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1182_C16", "label": "token = transformToken()", "type": "assigned_variable", "loc": [1182, 1182], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1169_C12", "vector": [14, 12, 0.4442, 0.0004, 12, 0.31, 0.6667, 129, 3, 2, 0, 0, 672, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "transformToken", "annotation": ""}, "snippet": " token = self.transformToken(token, beforeTokenPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1184_C16", "label": "append()", "type": "expression", "loc": [1184, 1184], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1169_C12", "vector": [8, 12, 0.4449, 0.0004, 12, 0.31, 0.8333, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " exprBits.append(token) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1185_C16", "label": "if", "type": "if", "loc": [1185, 1192], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1169_C12", "vector": [4, 12, 0.4466, 0.003, 12, 0.31, 1.0, 0, 3, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if identRE.match(token):\n if token == 'for':\n expr = self.getExpression(useNameMapper=False, pyTokensToBreakAt=['in'])\n exprBits.append(expr)\n else:\n exprBits.append(self.getWhiteSpace())\n if not self.atEnd() and self.peek() == '(':\n exprBits.append(self.getCallArgString()) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1186_C20", "label": "if", "type": "if", "loc": [1186, 1192], "level": 13, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1185_C16", "vector": [4, 13, 0.4468, 0.0026, 13, 0.05, 0.0, 0, 0, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if token == 'for':\n expr = self.getExpression(useNameMapper=False, pyTokensToBreakAt=['in'])\n exprBits.append(expr)\n else:\n exprBits.append(self.getWhiteSpace())\n if not self.atEnd() and self.peek() == '(':\n exprBits.append(self.getCallArgString()) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1187_C24", "label": "expr = getExpression()", "type": "assigned_variable", "loc": [1187, 1187], "level": 14, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1186_C20", "vector": [14, 14, 0.4461, 0.0004, 14, 0.56, 0.0, 236, 3, 2, 0, 0, 119, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " expr = self.getExpression(useNameMapper=False, pyTokensToBreakAt=['in'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1188_C24", "label": "append()", "type": "expression", "loc": [1188, 1188], "level": 14, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1186_C20", "vector": [8, 14, 0.4464, 0.0004, 14, 0.56, 0.3333, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " exprBits.append(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1190_C24", "label": "append()", "type": "expression", "loc": [1190, 1190], "level": 14, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1186_C20", "vector": [8, 14, 0.4472, 0.0004, 14, 0.56, 0.6667, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " exprBits.append(self.getWhiteSpace())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1191_C24", "label": "if", "type": "if", "loc": [1191, 1192], "level": 14, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1186_C20", "vector": [4, 14, 0.4478, 0.0008, 14, 0.56, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.atEnd() and self.peek() == '(':\n exprBits.append(self.getCallArgString()) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1192_C28", "label": "append()", "type": "expression", "loc": [1192, 1192], "level": 15, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1191_C24", "vector": [8, 15, 0.448, 0.0004, 15, 0.03, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " exprBits.append(self.getCallArgString()) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1194_C8", "label": "if", "type": "if", "loc": [1194, 1195], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "vector": [4, 2, 0.4489, 0.0008, 2, 0.47, 0.8571, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if useNameMapper is not Unspecified: \n self.setSetting('useNameMapper', useNameMapper_orig) # @@TR: see comment above"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1195_C12", "label": "setSetting()", "type": "expression", "loc": [1195, 1195], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1194_C8", "vector": [8, 3, 0.4491, 0.0004, 3, 0.61, 0.0, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self.setSetting('useNameMapper', useNameMapper_orig) # @@TR: see comment above"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1196_C8", "label": "return", "type": "return", "loc": [1196, 1196], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "vector": [13, 2, 0.4495, 0.0004, 2, 0.47, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return exprBits"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1198_C4", "label": "getExpression", "type": "function", "loc": [1198, 1210], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.4525, 0.0049, 1, 0.31, 0.9531, 119, 0, 5, 1, 0, 0, 0, 2], "semantic": {"name": "getExpression", "arg_names": ["self", "enclosed", "enclosures", "pyTokensToBreakAt", "useNameMapper"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getExpression(self,\n enclosed=False, \n enclosures=None, # list of tuples (char, pos), where # char is ({ or [\n pyTokensToBreakAt=None,\n useNameMapper=Unspecified,\n ):\n \"\"\"Returns the output of self.getExpressionParts() as a concatenated\n string rather than as a list."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1204_C8", "label": "expression", "type": "expression", "loc": [1204, 1206], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1198_C4", "vector": [8, 2, 0.4528, 0.0011, 2, 0.43, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Returns the output of self.getExpressionParts() as a concatenated\n string rather than as a list.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1207_C8", "label": "return", "type": "return", "loc": [1207, 1210], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1198_C4", "vector": [13, 2, 0.4542, 0.0015, 2, 0.43, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''.join(self.getExpressionParts(\n enclosed=enclosed, enclosures=enclosures,\n pyTokensToBreakAt=pyTokensToBreakAt,\n useNameMapper=useNameMapper))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1213_C4", "label": "transformToken", "type": "function", "loc": [1213, 1247], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.4622, 0.0132, 1, 0.31, 0.9688, 672, 0, 3, 1, 0, 0, 0, 21], "semantic": {"name": "transformToken", "arg_names": ["self", "token", "beforeTokenPos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def transformToken(self, token, beforeTokenPos):\n \"\"\"Takes a token from the expression being parsed and performs and\n special transformations required by Cheetah.\n\n At the moment only Cheetah's c'$placeholder strings' are transformed.\n \"\"\"\n if token=='c' and not self.atEnd() and self.peek() in '\\'\"':\n nextToken = self.getPyToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1214_C8", "label": "expression", "type": "expression", "loc": [1214, 1218], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1213_C4", "vector": [8, 2, 0.457, 0.0019, 2, 0.16, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Takes a token from the expression being parsed and performs and\n special transformations required by Cheetah.\n\n At the moment only Cheetah's c'$placeholder strings' are transformed.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "label": "if", "type": "if", "loc": [1219, 1246], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1213_C4", "vector": [4, 2, 0.4632, 0.0105, 2, 0.16, 0.5, 0, 0, 0, 0, 0, 0, 0, 21], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if token=='c' and not self.atEnd() and self.peek() in '\\'\"':\n nextToken = self.getPyToken()\n token = nextToken.upper()\n theStr = eval(token)\n endPos = self.pos()\n if not theStr:\n return\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1220_C12", "label": "nextToken = getPyToken()", "type": "assigned_variable", "loc": [1220, 1220], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "vector": [14, 3, 0.4585, 0.0004, 3, 0.87, 0.0, 854, 3, 0, 0, 0, 764, 10, 1], "semantic": {"name": "nextToken", "arg_names": [], "import_names": [], "rhs_call_name": "getPyToken", "annotation": ""}, "snippet": " nextToken = self.getPyToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1221_C12", "label": "token = upper()", "type": "assigned_variable", "loc": [1221, 1221], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "vector": [14, 3, 0.4589, 0.0004, 3, 0.87, 0.0833, 129, 3, 0, 0, 0, 347, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "upper", "annotation": ""}, "snippet": " token = nextToken.upper()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1222_C12", "label": "theStr = eval()", "type": "assigned_variable", "loc": [1222, 1222], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "vector": [14, 3, 0.4592, 0.0004, 3, 0.87, 0.1667, 280, 3, 1, 0, 0, 776, 10, 1], "semantic": {"name": "theStr", "arg_names": [], "import_names": [], "rhs_call_name": "eval", "annotation": ""}, "snippet": " theStr = eval(token)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1223_C12", "label": "endPos = pos()", "type": "assigned_variable", "loc": [1223, 1223], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "vector": [14, 3, 0.4596, 0.0004, 3, 0.87, 0.25, 406, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "endPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " endPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1224_C12", "label": "if", "type": "if", "loc": [1224, 1225], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "vector": [4, 3, 0.4602, 0.0008, 3, 0.87, 0.3333, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not theStr:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1225_C16", "label": "return", "type": "return", "loc": [1225, 1225], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1224_C12", "vector": [13, 4, 0.4604, 0.0004, 4, 0.15, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1227_C12", "label": "if", "type": "if", "loc": [1227, 1230], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "vector": [4, 3, 0.4617, 0.0015, 3, 0.87, 0.4167, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if token.startswith(single3) or token.startswith(double3):\n startPosIdx = 3\n else:\n startPosIdx = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1228_C16", "label": "startPosIdx =", "type": "assigned_variable", "loc": [1228, 1228], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1227_C12", "vector": [14, 4, 0.4615, 0.0004, 4, 0.23, 0.0, 754, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "startPosIdx", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " startPosIdx = 3"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1230_C16", "label": "startPosIdx =", "type": "assigned_variable", "loc": [1230, 1230], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1227_C12", "vector": [14, 4, 0.4622, 0.0004, 4, 0.23, 1.0, 754, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "startPosIdx", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " startPosIdx = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1231_C12", "label": "setPos()", "type": "expression", "loc": [1231, 1231], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "vector": [8, 3, 0.4626, 0.0004, 3, 0.87, 0.5, 659, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(beforeTokenPos+startPosIdx+1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1232_C12", "label": "outputExprs =", "type": "assigned_variable", "loc": [1232, 1232], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "vector": [14, 3, 0.463, 0.0004, 3, 0.87, 0.5833, 721, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "outputExprs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " outputExprs = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1233_C12", "label": "strConst =", "type": "assigned_variable", "loc": [1233, 1233], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "vector": [14, 3, 0.4634, 0.0004, 3, 0.87, 0.6667, 616, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "strConst", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " strConst = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1234_C12", "label": "while", "type": "while", "loc": [1234, 1242], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "vector": [5, 3, 0.4652, 0.0034, 3, 0.87, 0.75, 0, 0, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while self.pos() < (endPos-startPosIdx):\n if self.matchCheetahVarStart() or self.matchExpressionPlaceholderStart():\n if strConst:\n outputExprs.append(repr(strConst))\n strConst = ''\n placeholderExpr = self.getPlaceholder()\n outputExprs.append('str('+placeholderExpr+')')\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1235_C16", "label": "if", "type": "if", "loc": [1235, 1242], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1234_C12", "vector": [4, 4, 0.4654, 0.003, 4, 0.64, 0.0, 0, 0, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchCheetahVarStart() or self.matchExpressionPlaceholderStart():\n if strConst:\n outputExprs.append(repr(strConst))\n strConst = ''\n placeholderExpr = self.getPlaceholder()\n outputExprs.append('str('+placeholderExpr+')')\n else:\n strConst += self.getc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1236_C20", "label": "if", "type": "if", "loc": [1236, 1238], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1235_C16", "vector": [4, 5, 0.4649, 0.0011, 5, 0.5, 0.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if strConst:\n outputExprs.append(repr(strConst))\n strConst = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1237_C24", "label": "append()", "type": "expression", "loc": [1237, 1237], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1236_C20", "vector": [8, 6, 0.4649, 0.0004, 6, 0.59, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " outputExprs.append(repr(strConst))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1238_C24", "label": "strConst =", "type": "assigned_variable", "loc": [1238, 1238], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1236_C20", "vector": [14, 6, 0.4652, 0.0004, 6, 0.59, 1.0, 616, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "strConst", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " strConst = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1239_C20", "label": "placeholderExpr = getPlaceholder()", "type": "assigned_variable", "loc": [1239, 1239], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1235_C16", "vector": [14, 5, 0.4656, 0.0004, 5, 0.5, 0.5, 550, 3, 0, 0, 0, 439, 10, 1], "semantic": {"name": "placeholderExpr", "arg_names": [], "import_names": [], "rhs_call_name": "getPlaceholder", "annotation": ""}, "snippet": " placeholderExpr = self.getPlaceholder()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1240_C20", "label": "append()", "type": "expression", "loc": [1240, 1240], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1235_C16", "vector": [8, 5, 0.466, 0.0004, 5, 0.5, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " outputExprs.append('str('+placeholderExpr+')')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1243_C12", "label": "setPos()", "type": "expression", "loc": [1243, 1243], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "vector": [8, 3, 0.4671, 0.0004, 3, 0.87, 0.8333, 659, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(endPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1244_C12", "label": "if", "type": "if", "loc": [1244, 1245], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "vector": [4, 3, 0.4677, 0.0008, 3, 0.87, 0.9167, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if strConst:\n outputExprs.append(repr(strConst))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1245_C16", "label": "append()", "type": "expression", "loc": [1245, 1245], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1244_C12", "vector": [8, 4, 0.4679, 0.0004, 4, 0.74, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " outputExprs.append(repr(strConst))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1246_C12", "label": "token =", "type": "assigned_variable", "loc": [1246, 1246], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "vector": [14, 3, 0.4682, 0.0004, 3, 0.87, 1.0, 129, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " token = \"''.join([\"+','.join(outputExprs)+\"])\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1247_C8", "label": "return", "type": "return", "loc": [1247, 1247], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1213_C4", "vector": [13, 2, 0.4686, 0.0004, 2, 0.16, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return token"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1249_C4", "label": "_raiseErrorAboutInvalidCheetahVarSyntaxInExpr", "type": "function", "loc": [1249, 1265], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.4724, 0.0064, 1, 0.31, 0.9844, 322, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "_raiseErrorAboutInvalidCheetahVarSyntaxInExpr", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _raiseErrorAboutInvalidCheetahVarSyntaxInExpr(self):\n match = self.matchCheetahVarStart()\n groupdict = match.groupdict()\n if groupdict.get('cacheToken'):\n raise ParseError(\n self,\n msg='Cache tokens are not valid inside expressions. '\n 'Use them in top-level $placeholders only.') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1250_C8", "label": "match = matchCheetahVarStart()", "type": "assigned_variable", "loc": [1250, 1250], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1249_C4", "vector": [14, 2, 0.4697, 0.0004, 2, 0.58, 0.0, 36, 3, 0, 0, 0, 471, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchCheetahVarStart", "annotation": ""}, "snippet": " match = self.matchCheetahVarStart()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1251_C8", "label": "groupdict = groupdict()", "type": "assigned_variable", "loc": [1251, 1251], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1249_C4", "vector": [14, 2, 0.4701, 0.0004, 2, 0.58, 0.5, 572, 3, 0, 0, 0, 572, 10, 1], "semantic": {"name": "groupdict", "arg_names": [], "import_names": [], "rhs_call_name": "groupdict", "annotation": ""}, "snippet": " groupdict = match.groupdict()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1252_C8", "label": "if", "type": "if", "loc": [1252, 1265], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1249_C4", "vector": [4, 2, 0.4729, 0.0053, 2, 0.58, 1.0, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if groupdict.get('cacheToken'):\n raise ParseError(\n self,\n msg='Cache tokens are not valid inside expressions. '\n 'Use them in top-level $placeholders only.') \n elif groupdict.get('enclosure'): \n raise ParseError(\n self,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1257_C8", "label": "if", "type": "if", "loc": [1257, 1265], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1252_C8", "vector": [4, 3, 0.4739, 0.0034, 3, 0.85, 0.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif groupdict.get('enclosure'): \n raise ParseError(\n self,\n msg='Long-form placeholders - ${}, $(), $[], etc. are not valid inside expressions. '\n 'Use them in top-level $placeholders only.')\n else:\n raise ParseError(\n self,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "label": "getPlaceholder", "type": "function", "loc": [1268, 1331], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "vector": [2, 1, 0.4884, 0.0241, 1, 0.31, 1.0, 439, 0, 4, 1, 0, 0, 0, 29], "semantic": {"name": "getPlaceholder", "arg_names": ["self", "allowCacheTokens", "plain", "returnEverything"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getPlaceholder(self, allowCacheTokens=False, plain=False, returnEverything=False):\n # filtered \n for callback in self.setting('preparsePlaceholderHooks'):\n callback(parser=self)\n\n startPos = self.pos()\n lineCol = self.getRowCol(startPos)\n startToken = self.getCheetahVarStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1270_C8", "label": "for callback", "type": "for", "loc": [1270, 1271], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "vector": [6, 2, 0.4775, 0.0008, 2, 0.71, 0.0, 342, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for callback in self.setting('preparsePlaceholderHooks'):\n callback(parser=self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1271_C12", "label": "callback()", "type": "expression", "loc": [1271, 1271], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1270_C8", "vector": [8, 3, 0.4776, 0.0004, 3, 0.03, 0.0, 342, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "callback", "annotation": ""}, "snippet": " callback(parser=self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1273_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [1273, 1273], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "vector": [14, 2, 0.4784, 0.0004, 2, 0.71, 0.0833, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1274_C8", "label": "lineCol = getRowCol()", "type": "assigned_variable", "loc": [1274, 1274], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "vector": [14, 2, 0.4788, 0.0004, 2, 0.71, 0.1667, 562, 3, 1, 0, 0, 946, 10, 1], "semantic": {"name": "lineCol", "arg_names": [], "import_names": [], "rhs_call_name": "getRowCol", "annotation": ""}, "snippet": " lineCol = self.getRowCol(startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1275_C8", "label": "startToken = getCheetahVarStartToken()", "type": "assigned_variable", "loc": [1275, 1275], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "vector": [14, 2, 0.4791, 0.0004, 2, 0.71, 0.25, 135, 3, 0, 0, 0, 711, 10, 1], "semantic": {"name": "startToken", "arg_names": [], "import_names": [], "rhs_call_name": "getCheetahVarStartToken", "annotation": ""}, "snippet": " startToken = self.getCheetahVarStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1276_C8", "label": "silentPlaceholderToken = getSilentPlaceholderToken()", "type": "assigned_variable", "loc": [1276, 1276], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "vector": [14, 2, 0.4795, 0.0004, 2, 0.71, 0.3333, 281, 3, 0, 0, 0, 131, 10, 1], "semantic": {"name": "silentPlaceholderToken", "arg_names": [], "import_names": [], "rhs_call_name": "getSilentPlaceholderToken", "annotation": ""}, "snippet": " silentPlaceholderToken = self.getSilentPlaceholderToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1277_C8", "label": "if", "type": "if", "loc": [1277, 1280], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "vector": [4, 2, 0.4805, 0.0015, 2, 0.71, 0.4167, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if silentPlaceholderToken:\n isSilentPlaceholder = True\n else:\n isSilentPlaceholder = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1278_C12", "label": "isSilentPlaceholder =", "type": "assigned_variable", "loc": [1278, 1278], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1277_C8", "vector": [14, 3, 0.4803, 0.0004, 3, 0.62, 0.0, 790, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "isSilentPlaceholder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isSilentPlaceholder = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1280_C12", "label": "isSilentPlaceholder =", "type": "assigned_variable", "loc": [1280, 1280], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1277_C8", "vector": [14, 3, 0.481, 0.0004, 3, 0.62, 1.0, 790, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "isSilentPlaceholder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isSilentPlaceholder = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1283_C8", "label": "if", "type": "if", "loc": [1283, 1287], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "vector": [4, 2, 0.4829, 0.0019, 2, 0.71, 0.5, 0, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if allowCacheTokens:\n cacheToken = self.getCacheToken()\n cacheTokenParts = self.cacheTokenRE.match(cacheToken).groupdict() \n else:\n cacheTokenParts = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1284_C12", "label": "cacheToken = getCacheToken()", "type": "assigned_variable", "loc": [1284, 1284], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1283_C8", "vector": [14, 3, 0.4825, 0.0004, 3, 0.34, 0.0, 937, 3, 0, 0, 0, 269, 10, 1], "semantic": {"name": "cacheToken", "arg_names": [], "import_names": [], "rhs_call_name": "getCacheToken", "annotation": ""}, "snippet": " cacheToken = self.getCacheToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1285_C12", "label": "cacheTokenParts = groupdict()", "type": "assigned_variable", "loc": [1285, 1285], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1283_C8", "vector": [14, 3, 0.4829, 0.0004, 3, 0.34, 0.5, 207, 3, 0, 0, 0, 572, 10, 2], "semantic": {"name": "cacheTokenParts", "arg_names": [], "import_names": [], "rhs_call_name": "groupdict", "annotation": ""}, "snippet": " cacheTokenParts = self.cacheTokenRE.match(cacheToken).groupdict() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1287_C12", "label": "cacheTokenParts =", "type": "assigned_variable", "loc": [1287, 1287], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1283_C8", "vector": [14, 3, 0.4837, 0.0004, 3, 0.34, 1.0, 207, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "cacheTokenParts", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cacheTokenParts = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1289_C8", "label": "if", "type": "if", "loc": [1289, 1295], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "vector": [4, 2, 0.4855, 0.0026, 2, 0.71, 0.5833, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek() in '({[': \n pos = self.pos()\n enclosureOpenChar = self.getc()\n enclosures = [ (enclosureOpenChar, pos) ]\n self.getWhiteSpace()\n else:\n enclosures = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1290_C12", "label": "pos = pos()", "type": "assigned_variable", "loc": [1290, 1290], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1289_C8", "vector": [14, 3, 0.4848, 0.0004, 3, 0.58, 0.0, 627, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " pos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1291_C12", "label": "enclosureOpenChar = getc()", "type": "assigned_variable", "loc": [1291, 1291], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1289_C8", "vector": [14, 3, 0.4852, 0.0004, 3, 0.58, 0.25, 900, 3, 0, 0, 0, 827, 10, 1], "semantic": {"name": "enclosureOpenChar", "arg_names": [], "import_names": [], "rhs_call_name": "getc", "annotation": ""}, "snippet": " enclosureOpenChar = self.getc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1292_C12", "label": "enclosures =", "type": "assigned_variable", "loc": [1292, 1292], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1289_C8", "vector": [14, 3, 0.4855, 0.0004, 3, 0.58, 0.5, 44, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "enclosures", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " enclosures = [ (enclosureOpenChar, pos) ]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1293_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [1293, 1293], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1289_C8", "vector": [8, 3, 0.4859, 0.0004, 3, 0.58, 0.75, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1295_C12", "label": "enclosures =", "type": "assigned_variable", "loc": [1295, 1295], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1289_C8", "vector": [14, 3, 0.4867, 0.0004, 3, 0.58, 1.0, 44, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "enclosures", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " enclosures = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1297_C8", "label": "filterArgs =", "type": "assigned_variable", "loc": [1297, 1297], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "vector": [14, 2, 0.4874, 0.0004, 2, 0.71, 0.6667, 278, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "filterArgs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " filterArgs = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "label": "if", "type": "if", "loc": [1298, 1320], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "vector": [4, 2, 0.4919, 0.0086, 2, 0.71, 0.75, 0, 3, 0, 0, 0, 0, 0, 13], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchIdentifier(): \n nameChunks = self.getCheetahVarNameChunks()\n expr = self._compiler.genCheetahVar(nameChunks[:], plain=plain)\n restOfExpr = None\n if enclosures:\n WS = self.getWhiteSpace()\n expr += WS\n if self.setting('allowPlaceholderFilterArgs') and self.peek()==',':"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1299_C12", "label": "nameChunks = getCheetahVarNameChunks()", "type": "assigned_variable", "loc": [1299, 1299], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "vector": [14, 3, 0.4882, 0.0004, 3, 0.44, 0.0, 214, 3, 0, 0, 0, 3, 10, 1], "semantic": {"name": "nameChunks", "arg_names": [], "import_names": [], "rhs_call_name": "getCheetahVarNameChunks", "annotation": ""}, "snippet": " nameChunks = self.getCheetahVarNameChunks()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1300_C12", "label": "expr = genCheetahVar()", "type": "assigned_variable", "loc": [1300, 1300], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "vector": [14, 3, 0.4885, 0.0004, 3, 0.44, 0.1429, 236, 3, 2, 0, 0, 729, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "genCheetahVar", "annotation": ""}, "snippet": " expr = self._compiler.genCheetahVar(nameChunks[:], plain=plain)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1301_C12", "label": "restOfExpr =", "type": "assigned_variable", "loc": [1301, 1301], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "vector": [14, 3, 0.4889, 0.0004, 3, 0.44, 0.2857, 73, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "restOfExpr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " restOfExpr = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1302_C12", "label": "if", "type": "if", "loc": [1302, 1314], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "vector": [4, 3, 0.4915, 0.0049, 3, 0.44, 0.4286, 0, 2, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if enclosures:\n WS = self.getWhiteSpace()\n expr += WS\n if self.setting('allowPlaceholderFilterArgs') and self.peek()==',':\n filterArgs = self.getCallArgString(enclosures=enclosures)[1:-1]\n else:\n if self.peek()==closurePairsRev[enclosureOpenChar]:\n self.getc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1303_C16", "label": "WS = getWhiteSpace()", "type": "assigned_variable", "loc": [1303, 1303], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1302_C12", "vector": [14, 4, 0.4897, 0.0004, 4, 0.77, 0.0, 690, 3, 0, 0, 0, 84, 10, 1], "semantic": {"name": "WS", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " WS = self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1305_C16", "label": "if", "type": "if", "loc": [1305, 1314], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1302_C12", "vector": [4, 4, 0.4921, 0.0038, 4, 0.77, 1.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('allowPlaceholderFilterArgs') and self.peek()==',':\n filterArgs = self.getCallArgString(enclosures=enclosures)[1:-1]\n else:\n if self.peek()==closurePairsRev[enclosureOpenChar]:\n self.getc()\n else:\n restOfExpr = self.getExpression(enclosed=True, enclosures=enclosures)\n if restOfExpr[-1] == closurePairsRev[enclosureOpenChar]:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1306_C20", "label": "filterArgs =", "type": "assigned_variable", "loc": [1306, 1306], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1305_C16", "vector": [14, 5, 0.4908, 0.0004, 5, 0.65, 0.0, 278, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "filterArgs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " filterArgs = self.getCallArgString(enclosures=enclosures)[1:-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1308_C20", "label": "if", "type": "if", "loc": [1308, 1314], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1305_C16", "vector": [4, 5, 0.4927, 0.0026, 5, 0.65, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek()==closurePairsRev[enclosureOpenChar]:\n self.getc()\n else:\n restOfExpr = self.getExpression(enclosed=True, enclosures=enclosures)\n if restOfExpr[-1] == closurePairsRev[enclosureOpenChar]:\n restOfExpr = restOfExpr[:-1]\n expr += restOfExpr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1309_C24", "label": "getc()", "type": "expression", "loc": [1309, 1309], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1308_C20", "vector": [8, 6, 0.4919, 0.0004, 6, 0.55, 0.0, 827, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getc", "arg_names": [], "import_names": [], "rhs_call_name": "getc", "annotation": ""}, "snippet": " self.getc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1311_C24", "label": "restOfExpr = getExpression()", "type": "assigned_variable", "loc": [1311, 1311], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1308_C20", "vector": [14, 6, 0.4927, 0.0004, 6, 0.55, 0.5, 73, 3, 2, 0, 0, 119, 10, 1], "semantic": {"name": "restOfExpr", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " restOfExpr = self.getExpression(enclosed=True, enclosures=enclosures)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1312_C24", "label": "if", "type": "if", "loc": [1312, 1313], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1308_C20", "vector": [4, 6, 0.4932, 0.0008, 6, 0.55, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if restOfExpr[-1] == closurePairsRev[enclosureOpenChar]:\n restOfExpr = restOfExpr[:-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1313_C28", "label": "restOfExpr =", "type": "assigned_variable", "loc": [1313, 1313], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1312_C24", "vector": [14, 7, 0.4934, 0.0004, 7, 0.98, 0.0, 73, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "restOfExpr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " restOfExpr = restOfExpr[:-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1315_C12", "label": "rawPlaceholder =", "type": "assigned_variable", "loc": [1315, 1315], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "vector": [14, 3, 0.4942, 0.0004, 3, 0.44, 0.5714, 35, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "rawPlaceholder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rawPlaceholder = self[startPos: self.pos()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1317_C12", "label": "expr = getExpression()", "type": "assigned_variable", "loc": [1317, 1317], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "vector": [14, 3, 0.4949, 0.0004, 3, 0.44, 0.7143, 236, 3, 2, 0, 0, 119, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " expr = self.getExpression(enclosed=True, enclosures=enclosures)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1318_C12", "label": "if", "type": "if", "loc": [1318, 1319], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "vector": [4, 3, 0.4955, 0.0008, 3, 0.44, 0.8571, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if expr[-1] == closurePairsRev[enclosureOpenChar]:\n expr = expr[:-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1319_C16", "label": "expr =", "type": "assigned_variable", "loc": [1319, 1319], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1318_C12", "vector": [14, 4, 0.4957, 0.0004, 4, 0.16, 0.0, 236, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expr = expr[:-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1320_C12", "label": "rawPlaceholder =", "type": "assigned_variable", "loc": [1320, 1320], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "vector": [14, 3, 0.4961, 0.0004, 3, 0.44, 1.0, 35, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "rawPlaceholder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rawPlaceholder=self[startPos: self.pos()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1322_C8", "label": "expr = _applyExpressionFilters()", "type": "assigned_variable", "loc": [1322, 1323], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "vector": [14, 2, 0.497, 0.0008, 2, 0.71, 0.8333, 236, 3, 4, 0, 0, 289, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " expr = self._applyExpressionFilters(expr, 'placeholder',\n rawExpr=rawPlaceholder, startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1324_C8", "label": "for callback", "type": "for", "loc": [1324, 1325], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "vector": [6, 2, 0.4977, 0.0008, 2, 0.71, 0.9167, 342, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for callback in self.setting('postparsePlaceholderHooks'):\n callback(parser=self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1325_C12", "label": "callback()", "type": "expression", "loc": [1325, 1325], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1324_C8", "vector": [8, 3, 0.4979, 0.0004, 3, 0.9, 0.0, 342, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "callback", "annotation": ""}, "snippet": " callback(parser=self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1327_C8", "label": "if", "type": "if", "loc": [1327, 1331], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "vector": [4, 2, 0.4994, 0.0019, 2, 0.71, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if returnEverything:\n return (expr, rawPlaceholder, lineCol, cacheTokenParts,\n filterArgs, isSilentPlaceholder)\n else:\n return expr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1328_C12", "label": "return", "type": "return", "loc": [1328, 1329], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1327_C8", "vector": [13, 3, 0.4992, 0.0008, 3, 0.52, 0.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return (expr, rawPlaceholder, lineCol, cacheTokenParts,\n filterArgs, isSilentPlaceholder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1331_C12", "label": "return", "type": "return", "loc": [1331, 1331], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1327_C8", "vector": [13, 3, 0.5002, 0.0004, 3, 0.52, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return expr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "label": "_HighLevelParser", "type": "class", "loc": [1334, 2657], "level": 0, "parent": null, "vector": [3, 0, 0.7499, 0.4976, 0, 0.66, 0.9868, 164, 0, 58, 0, 0, 638, 0, 99], "semantic": {"name": "_HighLevelParser", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class _HighLevelParser(_LowLevelParser):\n \"\"\"This class is a StateMachine for parsing Cheetah source and\n sending state dependent code generation commands to\n Cheetah.Compiler.Compiler.\n \"\"\"\n def __init__(self, src, filename=None, breakPoint=None, compiler=None):\n super(_HighLevelParser, self).__init__(src, filename=filename, breakPoint=breakPoint)\n self.setSettingsManager(compiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1335_C4", "label": "expression", "type": "expression", "loc": [1335, 1338], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [8, 1, 0.5023, 0.0015, 1, 0.84, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"This class is a StateMachine for parsing Cheetah source and\n sending state dependent code generation commands to\n Cheetah.Compiler.Compiler.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1339_C4", "label": "__init__", "type": "function", "loc": [1339, 1344], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.5041, 0.0023, 1, 0.84, 0.0175, 555, 0, 5, 0, 0, 0, 0, 5], "semantic": {"name": "__init__", "arg_names": ["self", "src", "filename", "breakPoint", "compiler"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, src, filename=None, breakPoint=None, compiler=None):\n super(_HighLevelParser, self).__init__(src, filename=filename, breakPoint=breakPoint)\n self.setSettingsManager(compiler)\n self._compiler = compiler\n self.setupState()\n self.configureParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1340_C8", "label": "__init__()", "type": "expression", "loc": [1340, 1340], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1339_C4", "vector": [8, 2, 0.5036, 0.0004, 2, 0.62, 0.0, 555, 3, 3, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(_HighLevelParser, self).__init__(src, filename=filename, breakPoint=breakPoint)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1341_C8", "label": "setSettingsManager()", "type": "expression", "loc": [1341, 1341], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1339_C4", "vector": [8, 2, 0.5039, 0.0004, 2, 0.62, 0.25, 85, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setSettingsManager", "arg_names": [], "import_names": [], "rhs_call_name": "setSettingsManager", "annotation": ""}, "snippet": " self.setSettingsManager(compiler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1342_C8", "label": "self._compiler =", "type": "assigned_variable", "loc": [1342, 1342], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1339_C4", "vector": [14, 2, 0.5043, 0.0004, 2, 0.62, 0.5, 318, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._compiler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._compiler = compiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1343_C8", "label": "setupState()", "type": "expression", "loc": [1343, 1343], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1339_C4", "vector": [8, 2, 0.5047, 0.0004, 2, 0.62, 0.75, 166, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "setupState", "arg_names": [], "import_names": [], "rhs_call_name": "setupState", "annotation": ""}, "snippet": " self.setupState()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1344_C8", "label": "configureParser()", "type": "expression", "loc": [1344, 1344], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1339_C4", "vector": [8, 2, 0.5051, 0.0004, 2, 0.62, 1.0, 43, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "configureParser", "arg_names": [], "import_names": [], "rhs_call_name": "configureParser", "annotation": ""}, "snippet": " self.configureParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1346_C4", "label": "setupState", "type": "function", "loc": [1346, 1349], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.5064, 0.0015, 1, 0.84, 0.0351, 166, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "setupState", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setupState(self):\n self._macros = {} \n self._macroDetails = {}\n self._openDirectivesStack = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1347_C8", "label": "self._macros =", "type": "assigned_variable", "loc": [1347, 1347], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1346_C4", "vector": [14, 2, 0.5062, 0.0004, 2, 0.71, 0.0, 713, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._macros", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._macros = {} "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1348_C8", "label": "self._macroDetails =", "type": "assigned_variable", "loc": [1348, 1348], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1346_C4", "vector": [14, 2, 0.5066, 0.0004, 2, 0.71, 0.5, 768, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._macroDetails", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._macroDetails = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1349_C8", "label": "self._openDirectivesStack =", "type": "assigned_variable", "loc": [1349, 1349], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1346_C4", "vector": [14, 2, 0.507, 0.0004, 2, 0.71, 1.0, 680, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._openDirectivesStack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._openDirectivesStack = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1351_C4", "label": "cleanup", "type": "function", "loc": [1351, 1358], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.509, 0.003, 1, 0.84, 0.0526, 656, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "cleanup", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def cleanup(self):\n \"\"\"Cleanup to remove any possible reference cycles\n \"\"\"\n self._macros.clear()\n for macroname, macroDetails in self._macroDetails.items():\n macroDetails.template.shutdown()\n del macroDetails.template\n self._macroDetails.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1352_C8", "label": "expression", "type": "expression", "loc": [1352, 1353], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1351_C4", "vector": [8, 2, 0.5083, 0.0008, 2, 0.35, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Cleanup to remove any possible reference cycles\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1354_C8", "label": "clear()", "type": "expression", "loc": [1354, 1354], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1351_C4", "vector": [8, 2, 0.5088, 0.0004, 2, 0.35, 0.3333, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " self._macros.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1355_C8", "label": "for macroname, macroDetails", "type": "for", "loc": [1355, 1357], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1351_C4", "vector": [6, 2, 0.5096, 0.0011, 2, 0.35, 0.6667, 340, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "macroname, macroDetails", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for macroname, macroDetails in self._macroDetails.items():\n macroDetails.template.shutdown()\n del macroDetails.template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1356_C12", "label": "shutdown()", "type": "expression", "loc": [1356, 1356], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1355_C8", "vector": [8, 3, 0.5096, 0.0004, 3, 0.37, 0.0, 322, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "shutdown", "arg_names": [], "import_names": [], "rhs_call_name": "shutdown", "annotation": ""}, "snippet": " macroDetails.template.shutdown()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1358_C8", "label": "clear()", "type": "expression", "loc": [1358, 1358], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1351_C4", "vector": [8, 2, 0.5103, 0.0004, 2, 0.35, 1.0, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " self._macroDetails.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1360_C4", "label": "configureParser", "type": "function", "loc": [1360, 1362], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.5115, 0.0011, 1, 0.84, 0.0702, 43, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "configureParser", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def configureParser(self):\n super(_HighLevelParser, self).configureParser()\n self._initDirectives()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1361_C8", "label": "configureParser()", "type": "expression", "loc": [1361, 1361], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1360_C4", "vector": [8, 2, 0.5115, 0.0004, 2, 0.98, 0.0, 43, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "configureParser", "arg_names": [], "import_names": [], "rhs_call_name": "configureParser", "annotation": ""}, "snippet": " super(_HighLevelParser, self).configureParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1362_C8", "label": "_initDirectives()", "type": "expression", "loc": [1362, 1362], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1360_C4", "vector": [8, 2, 0.5118, 0.0004, 2, 0.98, 1.0, 250, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_initDirectives", "arg_names": [], "import_names": [], "rhs_call_name": "_initDirectives", "annotation": ""}, "snippet": " self._initDirectives()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "label": "_initDirectives", "type": "function", "loc": [1364, 1423], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.5237, 0.0225, 1, 0.84, 0.0877, 250, 0, 1, 1, 0, 0, 0, 22], "semantic": {"name": "_initDirectives", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _initDirectives(self):\n def normalizeParserVal(val):\n if isinstance(val, (str, unicode)):\n handler = getattr(self, val)\n elif type(val) in (ClassType, TypeType):\n handler = val(self)\n elif hasattr(val, '__call__'):\n handler = val"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1365_C8", "label": "normalizeParserVal", "type": "function", "loc": [1365, 1376], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [2, 2, 0.515, 0.0045, 2, 0.78, 0.0, 674, 0, 1, 1, 0, 0, 0, 6], "semantic": {"name": "normalizeParserVal", "arg_names": ["val"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def normalizeParserVal(val):\n if isinstance(val, (str, unicode)):\n handler = getattr(self, val)\n elif type(val) in (ClassType, TypeType):\n handler = val(self)\n elif hasattr(val, '__call__'):\n handler = val\n elif val is None:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1366_C12", "label": "if", "type": "if", "loc": [1366, 1375], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1365_C8", "vector": [4, 3, 0.515, 0.0038, 3, 0.11, 0.0, 0, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(val, (str, unicode)):\n handler = getattr(self, val)\n elif type(val) in (ClassType, TypeType):\n handler = val(self)\n elif hasattr(val, '__call__'):\n handler = val\n elif val is None:\n handler = val"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1367_C16", "label": "handler = getattr()", "type": "assigned_variable", "loc": [1367, 1367], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1366_C12", "vector": [14, 4, 0.5137, 0.0004, 4, 0.39, 0.0, 388, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "handler", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " handler = getattr(self, val)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1368_C12", "label": "if", "type": "if", "loc": [1368, 1375], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1366_C12", "vector": [4, 4, 0.5154, 0.003, 4, 0.39, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif type(val) in (ClassType, TypeType):\n handler = val(self)\n elif hasattr(val, '__call__'):\n handler = val\n elif val is None:\n handler = val\n else:\n raise Exception('Invalid parser/handler value %r for %s'%(val, name))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1369_C16", "label": "handler = val()", "type": "assigned_variable", "loc": [1369, 1369], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1368_C12", "vector": [14, 5, 0.5145, 0.0004, 5, 0.29, 0.0, 388, 3, 1, 0, 0, 618, 10, 1], "semantic": {"name": "handler", "arg_names": [], "import_names": [], "rhs_call_name": "val", "annotation": ""}, "snippet": " handler = val(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1370_C12", "label": "if", "type": "if", "loc": [1370, 1375], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1368_C12", "vector": [4, 5, 0.5158, 0.0023, 5, 0.29, 1.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif hasattr(val, '__call__'):\n handler = val\n elif val is None:\n handler = val\n else:\n raise Exception('Invalid parser/handler value %r for %s'%(val, name))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1371_C16", "label": "handler =", "type": "assigned_variable", "loc": [1371, 1371], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1370_C12", "vector": [14, 6, 0.5152, 0.0004, 6, 0.35, 0.0, 388, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "handler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " handler = val"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1372_C12", "label": "if", "type": "if", "loc": [1372, 1375], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1370_C12", "vector": [4, 6, 0.5162, 0.0015, 6, 0.35, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif val is None:\n handler = val\n else:\n raise Exception('Invalid parser/handler value %r for %s'%(val, name))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1373_C16", "label": "handler =", "type": "assigned_variable", "loc": [1373, 1373], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1372_C12", "vector": [14, 7, 0.516, 0.0004, 7, 0.71, 0.0, 388, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "handler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " handler = val"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1376_C12", "label": "return", "type": "return", "loc": [1376, 1376], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1365_C8", "vector": [13, 3, 0.5171, 0.0004, 3, 0.11, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return handler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1378_C8", "label": "normalizeHandlerVal =", "type": "assigned_variable", "loc": [1378, 1378], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [14, 2, 0.5179, 0.0004, 2, 0.78, 0.0625, 821, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "normalizeHandlerVal", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " normalizeHandlerVal = normalizeParserVal"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1380_C8", "label": "_directiveNamesAndParsers = copy()", "type": "assigned_variable", "loc": [1380, 1380], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [14, 2, 0.5186, 0.0004, 2, 0.78, 0.125, 252, 3, 0, 0, 0, 739, 10, 1], "semantic": {"name": "_directiveNamesAndParsers", "arg_names": [], "import_names": [], "rhs_call_name": "copy", "annotation": ""}, "snippet": " _directiveNamesAndParsers = directiveNamesAndParsers.copy()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1381_C8", "label": "customNamesAndParsers = setting()", "type": "assigned_variable", "loc": [1381, 1381], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [14, 2, 0.519, 0.0004, 2, 0.78, 0.1875, 24, 3, 2, 0, 0, 368, 10, 1], "semantic": {"name": "customNamesAndParsers", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " customNamesAndParsers = self.setting('directiveNamesAndParsers', {})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1382_C8", "label": "update()", "type": "expression", "loc": [1382, 1382], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [8, 2, 0.5194, 0.0004, 2, 0.78, 0.25, 637, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": " _directiveNamesAndParsers.update(customNamesAndParsers)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1384_C8", "label": "_endDirectiveNamesAndHandlers = copy()", "type": "assigned_variable", "loc": [1384, 1384], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [14, 2, 0.5201, 0.0004, 2, 0.78, 0.3125, 217, 3, 0, 0, 0, 739, 10, 1], "semantic": {"name": "_endDirectiveNamesAndHandlers", "arg_names": [], "import_names": [], "rhs_call_name": "copy", "annotation": ""}, "snippet": " _endDirectiveNamesAndHandlers = endDirectiveNamesAndHandlers.copy()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1385_C8", "label": "customNamesAndHandlers = setting()", "type": "assigned_variable", "loc": [1385, 1385], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [14, 2, 0.5205, 0.0004, 2, 0.78, 0.375, 708, 3, 2, 0, 0, 368, 10, 1], "semantic": {"name": "customNamesAndHandlers", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " customNamesAndHandlers = self.setting('endDirectiveNamesAndHandlers', {})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1386_C8", "label": "update()", "type": "expression", "loc": [1386, 1386], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [8, 2, 0.5209, 0.0004, 2, 0.78, 0.4375, 637, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": " _endDirectiveNamesAndHandlers.update(customNamesAndHandlers) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1388_C8", "label": "self._directiveNamesAndParsers =", "type": "assigned_variable", "loc": [1388, 1388], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [14, 2, 0.5216, 0.0004, 2, 0.78, 0.5, 633, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._directiveNamesAndParsers", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._directiveNamesAndParsers = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1389_C8", "label": "for name, val", "type": "for", "loc": [1389, 1392], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [6, 2, 0.5225, 0.0015, 2, 0.78, 0.5625, 762, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "name, val", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for name, val in _directiveNamesAndParsers.items():\n if val in (False, 0):\n continue\n self._directiveNamesAndParsers[name] = normalizeParserVal(val)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1390_C12", "label": "if", "type": "if", "loc": [1390, 1391], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1389_C8", "vector": [4, 3, 0.5225, 0.0008, 3, 0.67, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if val in (False, 0):\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1392_C12", "label": " = normalizeParserVal()", "type": "assigned_variable", "loc": [1392, 1392], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1389_C8", "vector": [14, 3, 0.5231, 0.0004, 3, 0.67, 1.0, 0, 3, 1, 0, 0, 674, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "normalizeParserVal", "annotation": ""}, "snippet": " self._directiveNamesAndParsers[name] = normalizeParserVal(val)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1394_C8", "label": "self._endDirectiveNamesAndHandlers =", "type": "assigned_variable", "loc": [1394, 1394], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [14, 2, 0.5239, 0.0004, 2, 0.78, 0.625, 329, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._endDirectiveNamesAndHandlers", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._endDirectiveNamesAndHandlers = {} "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1395_C8", "label": "for name, val", "type": "for", "loc": [1395, 1398], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [6, 2, 0.5248, 0.0015, 2, 0.78, 0.6875, 762, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "name, val", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for name, val in _endDirectiveNamesAndHandlers.items():\n if val in (False, 0):\n continue\n self._endDirectiveNamesAndHandlers[name] = normalizeHandlerVal(val)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1396_C12", "label": "if", "type": "if", "loc": [1396, 1397], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1395_C8", "vector": [4, 3, 0.5248, 0.0008, 3, 0.01, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if val in (False, 0):\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1398_C12", "label": " = normalizeHandlerVal()", "type": "assigned_variable", "loc": [1398, 1398], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1395_C8", "vector": [14, 3, 0.5254, 0.0004, 3, 0.01, 1.0, 0, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "normalizeHandlerVal", "annotation": ""}, "snippet": " self._endDirectiveNamesAndHandlers[name] = normalizeHandlerVal(val)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1400_C8", "label": "self._closeableDirectives =", "type": "assigned_variable", "loc": [1400, 1408], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [14, 2, 0.5276, 0.0034, 2, 0.78, 0.75, 647, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._closeableDirectives", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._closeableDirectives = ['def', 'block', 'closure', 'defmacro',\n 'call',\n 'capture',\n 'cache',\n 'filter',\n 'if', 'unless',\n 'for', 'while', 'repeat',\n 'try',"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1409_C8", "label": "for directiveName", "type": "for", "loc": [1409, 1410], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [6, 2, 0.5297, 0.0008, 2, 0.78, 0.8125, 508, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "directiveName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for directiveName in self.setting('closeableDirectives', []):\n self._closeableDirectives.append(directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1410_C12", "label": "append()", "type": "expression", "loc": [1410, 1410], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1409_C8", "vector": [8, 3, 0.5299, 0.0004, 3, 0.35, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._closeableDirectives.append(directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1414_C8", "label": "macroDirectives = setting()", "type": "assigned_variable", "loc": [1414, 1414], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [14, 2, 0.5314, 0.0004, 2, 0.78, 0.875, 986, 3, 2, 0, 0, 368, 10, 1], "semantic": {"name": "macroDirectives", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " macroDirectives = self.setting('macroDirectives', {})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1415_C8", "label": "assign", "type": "assigned_variable", "loc": [1415, 1415], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [14, 2, 0.5318, 0.0004, 2, 0.78, 0.9375, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " macroDirectives['i18n'] = I18n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1418_C8", "label": "for macroName, callback", "type": "for", "loc": [1418, 1423], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "vector": [6, 2, 0.5338, 0.0023, 2, 0.78, 1.0, 728, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "macroName, callback", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for macroName, callback in macroDirectives.items():\n if type(callback) in (ClassType, TypeType):\n callback = callback(parser=self)\n assert callback \n self._macros[macroName] = callback\n self._directiveNamesAndParsers[macroName] = self.eatMacroCall"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1419_C12", "label": "if", "type": "if", "loc": [1419, 1420], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1418_C8", "vector": [4, 3, 0.5334, 0.0008, 3, 0.03, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if type(callback) in (ClassType, TypeType):\n callback = callback(parser=self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1420_C16", "label": "callback = callback()", "type": "assigned_variable", "loc": [1420, 1420], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1419_C12", "vector": [14, 4, 0.5336, 0.0004, 4, 0.53, 0.0, 342, 3, 1, 0, 0, 342, 10, 1], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "callback", "annotation": ""}, "snippet": " callback = callback(parser=self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1422_C12", "label": "assign", "type": "assigned_variable", "loc": [1422, 1422], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1418_C8", "vector": [14, 3, 0.5344, 0.0004, 3, 0.03, 0.5, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._macros[macroName] = callback"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1423_C12", "label": "assign", "type": "assigned_variable", "loc": [1423, 1423], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1418_C8", "vector": [14, 3, 0.5348, 0.0004, 3, 0.03, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._directiveNamesAndParsers[macroName] = self.eatMacroCall"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1425_C4", "label": "_applyExpressionFilters", "type": "function", "loc": [1425, 1460], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.5421, 0.0135, 1, 0.84, 0.1053, 289, 0, 5, 1, 0, 0, 0, 2], "semantic": {"name": "_applyExpressionFilters", "arg_names": ["self", "expr", "exprType", "rawExpr", "startPos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _applyExpressionFilters(self, expr, exprType, rawExpr=None, startPos=None):\n \"\"\"Pipes cheetah expressions through a set of optional filter hooks.\n\n The filters are functions which may modify the expressions or raise\n a ForbiddenExpression exception if the expression is not allowed. They\n are defined in the compiler setting 'expressionFilterHooks'.\n\n Some intended use cases:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1426_C8", "label": "expression", "type": "expression", "loc": [1426, 1456], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1425_C4", "vector": [8, 2, 0.5415, 0.0116, 2, 0.9, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Pipes cheetah expressions through a set of optional filter hooks.\n\n The filters are functions which may modify the expressions or raise\n a ForbiddenExpression exception if the expression is not allowed. They\n are defined in the compiler setting 'expressionFilterHooks'.\n\n Some intended use cases:\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1457_C8", "label": "for callback", "type": "for", "loc": [1457, 1459], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1425_C4", "vector": [6, 2, 0.5479, 0.0011, 2, 0.9, 0.5, 342, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for callback in self.setting('expressionFilterHooks'):\n expr = callback(parser=self, expr=expr, exprType=exprType,\n rawExpr=rawExpr, startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1458_C12", "label": "expr = callback()", "type": "assigned_variable", "loc": [1458, 1459], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1457_C8", "vector": [14, 3, 0.5481, 0.0008, 3, 0.57, 0.0, 236, 3, 5, 0, 0, 342, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "callback", "annotation": ""}, "snippet": " expr = callback(parser=self, expr=expr, exprType=exprType,\n rawExpr=rawExpr, startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1460_C8", "label": "return", "type": "return", "loc": [1460, 1460], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1425_C4", "vector": [13, 2, 0.5487, 0.0004, 2, 0.9, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return expr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1462_C4", "label": "_filterDisabledDirectives", "type": "function", "loc": [1462, 1469], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.5507, 0.003, 1, 0.84, 0.1228, 621, 0, 2, 0, 0, 0, 0, 7], "semantic": {"name": "_filterDisabledDirectives", "arg_names": ["self", "directiveName"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _filterDisabledDirectives(self, directiveName):\n directiveName = directiveName.lower()\n if (directiveName in self.setting('disabledDirectives')\n or (self.setting('enabledDirectives')\n and directiveName not in self.setting('enabledDirectives'))):\n for callback in self.setting('disabledDirectiveHooks'):\n callback(parser=self, directiveName=directiveName)\n raise ForbiddenDirective(self, msg='This %r directive is disabled'%directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1463_C8", "label": "directiveName = lower()", "type": "assigned_variable", "loc": [1463, 1463], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1462_C4", "vector": [14, 2, 0.5498, 0.0004, 2, 0.49, 0.0, 508, 3, 0, 0, 0, 432, 10, 1], "semantic": {"name": "directiveName", "arg_names": [], "import_names": [], "rhs_call_name": "lower", "annotation": ""}, "snippet": " directiveName = directiveName.lower()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1464_C8", "label": "if", "type": "if", "loc": [1464, 1469], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1462_C4", "vector": [4, 2, 0.5511, 0.0023, 2, 0.49, 1.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (directiveName in self.setting('disabledDirectives')\n or (self.setting('enabledDirectives')\n and directiveName not in self.setting('enabledDirectives'))):\n for callback in self.setting('disabledDirectiveHooks'):\n callback(parser=self, directiveName=directiveName)\n raise ForbiddenDirective(self, msg='This %r directive is disabled'%directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1467_C12", "label": "for callback", "type": "for", "loc": [1467, 1468], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1464_C8", "vector": [6, 3, 0.5515, 0.0008, 3, 0.62, 0.0, 342, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for callback in self.setting('disabledDirectiveHooks'):\n callback(parser=self, directiveName=directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1468_C16", "label": "callback()", "type": "expression", "loc": [1468, 1468], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1467_C12", "vector": [8, 4, 0.5517, 0.0004, 4, 0.16, 0.0, 342, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "callback", "annotation": ""}, "snippet": " callback(parser=self, directiveName=directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1473_C4", "label": "parse", "type": "function", "loc": [1473, 1499], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.5584, 0.0101, 1, 0.84, 0.1404, 678, 0, 3, 0, 0, 0, 0, 20], "semantic": {"name": "parse", "arg_names": ["self", "breakPoint", "assertEmptyStack"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def parse(self, breakPoint=None, assertEmptyStack=True):\n if breakPoint:\n origBP = self.breakPoint()\n self.setBreakPoint(breakPoint)\n assertEmptyStack = False\n\n while not self.atEnd():\n if self.matchCommentStartToken():"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1474_C8", "label": "if", "type": "if", "loc": [1474, 1477], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1473_C4", "vector": [4, 2, 0.5545, 0.0015, 2, 0.85, 0.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if breakPoint:\n origBP = self.breakPoint()\n self.setBreakPoint(breakPoint)\n assertEmptyStack = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1475_C12", "label": "origBP = breakPoint()", "type": "assigned_variable", "loc": [1475, 1475], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1474_C8", "vector": [14, 3, 0.5543, 0.0004, 3, 0.07, 0.0, 261, 3, 0, 0, 0, 691, 10, 1], "semantic": {"name": "origBP", "arg_names": [], "import_names": [], "rhs_call_name": "breakPoint", "annotation": ""}, "snippet": " origBP = self.breakPoint()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1476_C12", "label": "setBreakPoint()", "type": "expression", "loc": [1476, 1476], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1474_C8", "vector": [8, 3, 0.5547, 0.0004, 3, 0.07, 0.5, 285, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setBreakPoint", "arg_names": [], "import_names": [], "rhs_call_name": "setBreakPoint", "annotation": ""}, "snippet": " self.setBreakPoint(breakPoint)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1477_C12", "label": "assertEmptyStack =", "type": "assigned_variable", "loc": [1477, 1477], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1474_C8", "vector": [14, 3, 0.5551, 0.0004, 3, 0.07, 1.0, 957, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "assertEmptyStack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " assertEmptyStack = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1479_C8", "label": "while", "type": "while", "loc": [1479, 1495], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1473_C4", "vector": [5, 2, 0.5588, 0.0064, 2, 0.85, 0.3333, 0, 0, 0, 0, 0, 0, 0, 16], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while not self.atEnd():\n if self.matchCommentStartToken():\n self.eatComment()\n elif self.matchMultiLineCommentStartToken():\n self.eatMultiLineComment()\n elif self.matchVariablePlaceholderStart():\n self.eatPlaceholder()\n elif self.matchExpressionPlaceholderStart():"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1480_C12", "label": "if", "type": "if", "loc": [1480, 1495], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1479_C8", "vector": [4, 3, 0.559, 0.006, 3, 0.16, 0.0, 0, 3, 0, 0, 0, 0, 0, 15], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchCommentStartToken():\n self.eatComment()\n elif self.matchMultiLineCommentStartToken():\n self.eatMultiLineComment()\n elif self.matchVariablePlaceholderStart():\n self.eatPlaceholder()\n elif self.matchExpressionPlaceholderStart():\n self.eatPlaceholder()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1481_C16", "label": "eatComment()", "type": "expression", "loc": [1481, 1481], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1480_C12", "vector": [8, 4, 0.5566, 0.0004, 4, 0.01, 0.0, 344, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "eatComment", "arg_names": [], "import_names": [], "rhs_call_name": "eatComment", "annotation": ""}, "snippet": " self.eatComment()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1482_C12", "label": "if", "type": "if", "loc": [1482, 1495], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1480_C12", "vector": [4, 4, 0.5594, 0.0053, 4, 0.01, 1.0, 0, 3, 0, 0, 0, 0, 0, 13], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchMultiLineCommentStartToken():\n self.eatMultiLineComment()\n elif self.matchVariablePlaceholderStart():\n self.eatPlaceholder()\n elif self.matchExpressionPlaceholderStart():\n self.eatPlaceholder()\n elif self.matchDirective():\n self.eatDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1483_C16", "label": "eatMultiLineComment()", "type": "expression", "loc": [1483, 1483], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1482_C12", "vector": [8, 5, 0.5573, 0.0004, 5, 0.95, 0.0, 120, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "eatMultiLineComment", "arg_names": [], "import_names": [], "rhs_call_name": "eatMultiLineComment", "annotation": ""}, "snippet": " self.eatMultiLineComment()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1484_C12", "label": "if", "type": "if", "loc": [1484, 1495], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1482_C12", "vector": [4, 5, 0.5598, 0.0045, 5, 0.95, 1.0, 0, 3, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchVariablePlaceholderStart():\n self.eatPlaceholder()\n elif self.matchExpressionPlaceholderStart():\n self.eatPlaceholder()\n elif self.matchDirective():\n self.eatDirective()\n elif self.matchPSPStartToken():\n self.eatPSP()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1485_C16", "label": "eatPlaceholder()", "type": "expression", "loc": [1485, 1485], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1484_C12", "vector": [8, 6, 0.5581, 0.0004, 6, 0.55, 0.0, 787, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "eatPlaceholder", "arg_names": [], "import_names": [], "rhs_call_name": "eatPlaceholder", "annotation": ""}, "snippet": " self.eatPlaceholder()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1486_C12", "label": "if", "type": "if", "loc": [1486, 1495], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1484_C12", "vector": [4, 6, 0.5601, 0.0038, 6, 0.55, 1.0, 0, 3, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchExpressionPlaceholderStart():\n self.eatPlaceholder()\n elif self.matchDirective():\n self.eatDirective()\n elif self.matchPSPStartToken():\n self.eatPSP()\n elif self.matchEOLSlurpToken():\n self.eatEOLSlurpToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1487_C16", "label": "eatPlaceholder()", "type": "expression", "loc": [1487, 1487], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1486_C12", "vector": [8, 7, 0.5588, 0.0004, 7, 0.3, 0.0, 787, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "eatPlaceholder", "arg_names": [], "import_names": [], "rhs_call_name": "eatPlaceholder", "annotation": ""}, "snippet": " self.eatPlaceholder()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1488_C12", "label": "if", "type": "if", "loc": [1488, 1495], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1486_C12", "vector": [4, 7, 0.5605, 0.003, 7, 0.3, 1.0, 0, 3, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchDirective():\n self.eatDirective()\n elif self.matchPSPStartToken():\n self.eatPSP()\n elif self.matchEOLSlurpToken():\n self.eatEOLSlurpToken()\n else:\n self.eatPlainText()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1489_C16", "label": "eatDirective()", "type": "expression", "loc": [1489, 1489], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1488_C12", "vector": [8, 8, 0.5596, 0.0004, 8, 0.08, 0.0, 873, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "eatDirective", "arg_names": [], "import_names": [], "rhs_call_name": "eatDirective", "annotation": ""}, "snippet": " self.eatDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1490_C12", "label": "if", "type": "if", "loc": [1490, 1495], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1488_C12", "vector": [4, 8, 0.5609, 0.0023, 8, 0.08, 1.0, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchPSPStartToken():\n self.eatPSP()\n elif self.matchEOLSlurpToken():\n self.eatEOLSlurpToken()\n else:\n self.eatPlainText()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1491_C16", "label": "eatPSP()", "type": "expression", "loc": [1491, 1491], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1490_C12", "vector": [8, 9, 0.5603, 0.0004, 9, 0.41, 0.0, 521, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "eatPSP", "arg_names": [], "import_names": [], "rhs_call_name": "eatPSP", "annotation": ""}, "snippet": " self.eatPSP()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1492_C12", "label": "if", "type": "if", "loc": [1492, 1495], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1490_C12", "vector": [4, 9, 0.5613, 0.0015, 9, 0.41, 1.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchEOLSlurpToken():\n self.eatEOLSlurpToken()\n else:\n self.eatPlainText()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1493_C16", "label": "eatEOLSlurpToken()", "type": "expression", "loc": [1493, 1493], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1492_C12", "vector": [8, 10, 0.5611, 0.0004, 10, 0.67, 0.0, 337, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "eatEOLSlurpToken", "arg_names": [], "import_names": [], "rhs_call_name": "eatEOLSlurpToken", "annotation": ""}, "snippet": " self.eatEOLSlurpToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1495_C16", "label": "eatPlainText()", "type": "expression", "loc": [1495, 1495], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1492_C12", "vector": [8, 10, 0.5618, 0.0004, 10, 0.67, 1.0, 898, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "eatPlainText", "arg_names": [], "import_names": [], "rhs_call_name": "eatPlainText", "annotation": ""}, "snippet": " self.eatPlainText()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1496_C8", "label": "if", "type": "if", "loc": [1496, 1497], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1473_C4", "vector": [4, 2, 0.5624, 0.0008, 2, 0.85, 0.6667, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if assertEmptyStack:\n self.assertEmptyOpenDirectivesStack()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1497_C12", "label": "assertEmptyOpenDirectivesStack()", "type": "expression", "loc": [1497, 1497], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1496_C8", "vector": [8, 3, 0.5626, 0.0004, 3, 0.12, 0.0, 307, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "assertEmptyOpenDirectivesStack", "arg_names": [], "import_names": [], "rhs_call_name": "assertEmptyOpenDirectivesStack", "annotation": ""}, "snippet": " self.assertEmptyOpenDirectivesStack()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1498_C8", "label": "if", "type": "if", "loc": [1498, 1499], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1473_C4", "vector": [4, 2, 0.5631, 0.0008, 2, 0.85, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if breakPoint:\n self.setBreakPoint(origBP)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1499_C12", "label": "setBreakPoint()", "type": "expression", "loc": [1499, 1499], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1498_C8", "vector": [8, 3, 0.5633, 0.0004, 3, 0.26, 0.0, 285, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setBreakPoint", "arg_names": [], "import_names": [], "rhs_call_name": "setBreakPoint", "annotation": ""}, "snippet": " self.setBreakPoint(origBP)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "label": "eatPlainText", "type": "function", "loc": [1503, 1516], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.5673, 0.0053, 1, 0.84, 0.1579, 898, 0, 1, 1, 0, 0, 0, 9], "semantic": {"name": "eatPlainText", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatPlainText(self):\n startPos = self.pos()\n match = None\n while not self.atEnd():\n match = self.matchTopLevelToken()\n if match:\n break\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1504_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [1504, 1504], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "vector": [14, 2, 0.5652, 0.0004, 2, 0.48, 0.0, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1505_C8", "label": "match =", "type": "assigned_variable", "loc": [1505, 1505], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "vector": [14, 2, 0.5656, 0.0004, 2, 0.48, 0.1429, 36, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " match = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1506_C8", "label": "while", "type": "while", "loc": [1506, 1511], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "vector": [5, 2, 0.5669, 0.0023, 2, 0.48, 0.2857, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while not self.atEnd():\n match = self.matchTopLevelToken()\n if match:\n break\n else:\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1507_C12", "label": "match = matchTopLevelToken()", "type": "assigned_variable", "loc": [1507, 1507], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1506_C8", "vector": [14, 3, 0.5663, 0.0004, 3, 0.26, 0.0, 36, 3, 0, 0, 0, 803, 10, 1], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "matchTopLevelToken", "annotation": ""}, "snippet": " match = self.matchTopLevelToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1508_C12", "label": "if", "type": "if", "loc": [1508, 1511], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1506_C8", "vector": [4, 3, 0.5673, 0.0015, 3, 0.26, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if match:\n break\n else:\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1511_C16", "label": "advance()", "type": "expression", "loc": [1511, 1511], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1508_C12", "vector": [8, 4, 0.5678, 0.0004, 4, 0.07, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1512_C8", "label": "strConst = readTo()", "type": "assigned_variable", "loc": [1512, 1512], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "vector": [14, 2, 0.5682, 0.0004, 2, 0.48, 0.4286, 616, 3, 2, 0, 0, 293, 10, 2], "semantic": {"name": "strConst", "arg_names": [], "import_names": [], "rhs_call_name": "readTo", "annotation": ""}, "snippet": " strConst = self.readTo(self.pos(), start=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1513_C8", "label": "strConst = _unescapeCheetahVars()", "type": "assigned_variable", "loc": [1513, 1513], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "vector": [14, 2, 0.5686, 0.0004, 2, 0.48, 0.5714, 616, 3, 1, 0, 0, 350, 10, 1], "semantic": {"name": "strConst", "arg_names": [], "import_names": [], "rhs_call_name": "_unescapeCheetahVars", "annotation": ""}, "snippet": " strConst = self._unescapeCheetahVars(strConst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1514_C8", "label": "strConst = _unescapeDirectives()", "type": "assigned_variable", "loc": [1514, 1514], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "vector": [14, 2, 0.569, 0.0004, 2, 0.48, 0.7143, 616, 3, 1, 0, 0, 559, 10, 1], "semantic": {"name": "strConst", "arg_names": [], "import_names": [], "rhs_call_name": "_unescapeDirectives", "annotation": ""}, "snippet": " strConst = self._unescapeDirectives(strConst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1515_C8", "label": "addStrConst()", "type": "expression", "loc": [1515, 1515], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "vector": [8, 2, 0.5693, 0.0004, 2, 0.48, 0.8571, 170, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "addStrConst", "annotation": ""}, "snippet": " self._compiler.addStrConst(strConst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1516_C8", "label": "return", "type": "return", "loc": [1516, 1516], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "vector": [13, 2, 0.5697, 0.0004, 2, 0.48, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return match"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1518_C4", "label": "eatComment", "type": "function", "loc": [1518, 1524], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.5716, 0.0026, 1, 0.84, 0.1754, 344, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "eatComment", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatComment(self):\n isLineClearToStartToken = self.isLineClearToStartToken()\n if isLineClearToStartToken:\n self._compiler.handleWSBeforeDirective()\n self.getCommentStartToken() \n comm = self.readToEOL(gobble=isLineClearToStartToken)\n self._compiler.addComment(comm)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1519_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [1519, 1519], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1518_C4", "vector": [14, 2, 0.5708, 0.0004, 2, 0.51, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1520_C8", "label": "if", "type": "if", "loc": [1520, 1521], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1518_C4", "vector": [4, 2, 0.5714, 0.0008, 2, 0.51, 0.25, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isLineClearToStartToken:\n self._compiler.handleWSBeforeDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1521_C12", "label": "handleWSBeforeDirective()", "type": "expression", "loc": [1521, 1521], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1520_C8", "vector": [8, 3, 0.5716, 0.0004, 3, 0.49, 0.0, 788, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "handleWSBeforeDirective", "arg_names": [], "import_names": [], "rhs_call_name": "handleWSBeforeDirective", "annotation": ""}, "snippet": " self._compiler.handleWSBeforeDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1522_C8", "label": "getCommentStartToken()", "type": "expression", "loc": [1522, 1522], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1518_C4", "vector": [8, 2, 0.572, 0.0004, 2, 0.51, 0.5, 315, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getCommentStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getCommentStartToken", "annotation": ""}, "snippet": " self.getCommentStartToken() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1523_C8", "label": "comm = readToEOL()", "type": "assigned_variable", "loc": [1523, 1523], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1518_C4", "vector": [14, 2, 0.5723, 0.0004, 2, 0.51, 0.75, 544, 3, 1, 0, 0, 553, 10, 1], "semantic": {"name": "comm", "arg_names": [], "import_names": [], "rhs_call_name": "readToEOL", "annotation": ""}, "snippet": " comm = self.readToEOL(gobble=isLineClearToStartToken)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1524_C8", "label": "addComment()", "type": "expression", "loc": [1524, 1524], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1518_C4", "vector": [8, 2, 0.5727, 0.0004, 2, 0.51, 1.0, 738, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addComment", "arg_names": [], "import_names": [], "rhs_call_name": "addComment", "annotation": ""}, "snippet": " self._compiler.addComment(comm)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "label": "eatMultiLineComment", "type": "function", "loc": [1526, 1559], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.5797, 0.0128, 1, 0.84, 0.193, 120, 0, 1, 0, 0, 0, 0, 24], "semantic": {"name": "eatMultiLineComment", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatMultiLineComment(self):\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLine = self.findEOL()\n\n self.getMultiLineCommentStartToken()\n endPos = startPos = self.pos()\n level = 1\n while True:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1527_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [1527, 1527], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "vector": [14, 2, 0.5738, 0.0004, 2, 0.94, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1528_C8", "label": "endOfFirstLine = findEOL()", "type": "assigned_variable", "loc": [1528, 1528], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "vector": [14, 2, 0.5742, 0.0004, 2, 0.94, 0.1111, 478, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLine", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLine = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1530_C8", "label": "getMultiLineCommentStartToken()", "type": "expression", "loc": [1530, 1530], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "vector": [8, 2, 0.575, 0.0004, 2, 0.94, 0.2222, 210, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getMultiLineCommentStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getMultiLineCommentStartToken", "annotation": ""}, "snippet": " self.getMultiLineCommentStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1531_C8", "label": "endPos = pos()", "type": "assigned_variable", "loc": [1531, 1531], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "vector": [14, 2, 0.5753, 0.0004, 2, 0.94, 0.3333, 406, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "endPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " endPos = startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1532_C8", "label": "level =", "type": "assigned_variable", "loc": [1532, 1532], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "vector": [14, 2, 0.5757, 0.0004, 2, 0.94, 0.4444, 479, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "level", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " level = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1533_C8", "label": "while", "type": "while", "loc": [1533, 1545], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "vector": [5, 2, 0.5784, 0.0049, 2, 0.94, 0.5556, 0, 1, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while True:\n endPos = self.pos()\n if self.atEnd():\n break\n if self.matchMultiLineCommentStartToken():\n self.getMultiLineCommentStartToken()\n level += 1\n elif self.matchMultiLineCommentEndToken():"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1534_C12", "label": "endPos = pos()", "type": "assigned_variable", "loc": [1534, 1534], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1533_C8", "vector": [14, 3, 0.5765, 0.0004, 3, 0.55, 0.0, 406, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "endPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " endPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1535_C12", "label": "if", "type": "if", "loc": [1535, 1536], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1533_C8", "vector": [4, 3, 0.577, 0.0008, 3, 0.55, 0.25, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.atEnd():\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1537_C12", "label": "if", "type": "if", "loc": [1537, 1542], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1533_C8", "vector": [4, 3, 0.5785, 0.0023, 3, 0.55, 0.5, 0, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchMultiLineCommentStartToken():\n self.getMultiLineCommentStartToken()\n level += 1\n elif self.matchMultiLineCommentEndToken():\n self.getMultiLineCommentEndToken()\n level -= 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1538_C16", "label": "getMultiLineCommentStartToken()", "type": "expression", "loc": [1538, 1538], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1537_C12", "vector": [8, 4, 0.578, 0.0004, 4, 0.13, 0.0, 210, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getMultiLineCommentStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getMultiLineCommentStartToken", "annotation": ""}, "snippet": " self.getMultiLineCommentStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1540_C12", "label": "if", "type": "if", "loc": [1540, 1542], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1537_C12", "vector": [4, 4, 0.5791, 0.0011, 4, 0.13, 1.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchMultiLineCommentEndToken():\n self.getMultiLineCommentEndToken()\n level -= 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1541_C16", "label": "getMultiLineCommentEndToken()", "type": "expression", "loc": [1541, 1541], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1540_C12", "vector": [8, 5, 0.5791, 0.0004, 5, 0.26, 0.0, 291, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getMultiLineCommentEndToken", "arg_names": [], "import_names": [], "rhs_call_name": "getMultiLineCommentEndToken", "annotation": ""}, "snippet": " self.getMultiLineCommentEndToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1543_C12", "label": "if", "type": "if", "loc": [1543, 1544], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1533_C8", "vector": [4, 3, 0.58, 0.0008, 3, 0.55, 0.75, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not level:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1545_C12", "label": "advance()", "type": "expression", "loc": [1545, 1545], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1533_C8", "vector": [8, 3, 0.5806, 0.0004, 3, 0.55, 1.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1546_C8", "label": "comm = readTo()", "type": "assigned_variable", "loc": [1546, 1546], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "vector": [14, 2, 0.581, 0.0004, 2, 0.94, 0.6667, 544, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "comm", "arg_names": [], "import_names": [], "rhs_call_name": "readTo", "annotation": ""}, "snippet": " comm = self.readTo(endPos, start=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1548_C8", "label": "if", "type": "if", "loc": [1548, 1549], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "vector": [4, 2, 0.5819, 0.0008, 2, 0.94, 0.7778, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.atEnd():\n self.getMultiLineCommentEndToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1549_C12", "label": "getMultiLineCommentEndToken()", "type": "expression", "loc": [1549, 1549], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1548_C8", "vector": [8, 3, 0.5821, 0.0004, 3, 0.99, 0.0, 291, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getMultiLineCommentEndToken", "arg_names": [], "import_names": [], "rhs_call_name": "getMultiLineCommentEndToken", "annotation": ""}, "snippet": " self.getMultiLineCommentEndToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1551_C8", "label": "if", "type": "if", "loc": [1551, 1557], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "vector": [4, 2, 0.584, 0.0026, 2, 0.94, 0.8889, 0, 0, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (not self.atEnd()) and self.setting('gobbleWhitespaceAroundMultiLineComments'):\n restOfLine = self[self.pos():self.findEOL()]\n if not restOfLine.strip(): # WS only to EOL\n self.readToEOL(gobble=isLineClearToStartToken)\n\n if isLineClearToStartToken and (self.atEnd() or self.pos() > endOfFirstLine):\n self._compiler.handleWSBeforeDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1552_C12", "label": "restOfLine =", "type": "assigned_variable", "loc": [1552, 1552], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1551_C8", "vector": [14, 3, 0.5832, 0.0004, 3, 0.48, 0.0, 888, 6, 0, 0, 0, 0, 0, 2], "semantic": {"name": "restOfLine", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " restOfLine = self[self.pos():self.findEOL()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1553_C12", "label": "if", "type": "if", "loc": [1553, 1554], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1551_C8", "vector": [4, 3, 0.5838, 0.0008, 3, 0.48, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not restOfLine.strip(): # WS only to EOL\n self.readToEOL(gobble=isLineClearToStartToken)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1554_C16", "label": "readToEOL()", "type": "expression", "loc": [1554, 1554], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1553_C12", "vector": [8, 4, 0.584, 0.0004, 4, 0.2, 0.0, 553, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "readToEOL", "arg_names": [], "import_names": [], "rhs_call_name": "readToEOL", "annotation": ""}, "snippet": " self.readToEOL(gobble=isLineClearToStartToken)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1556_C12", "label": "if", "type": "if", "loc": [1556, 1557], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1551_C8", "vector": [4, 3, 0.5849, 0.0008, 3, 0.48, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isLineClearToStartToken and (self.atEnd() or self.pos() > endOfFirstLine):\n self._compiler.handleWSBeforeDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1557_C16", "label": "handleWSBeforeDirective()", "type": "expression", "loc": [1557, 1557], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1556_C12", "vector": [8, 4, 0.5851, 0.0004, 4, 0.05, 0.0, 788, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "handleWSBeforeDirective", "arg_names": [], "import_names": [], "rhs_call_name": "handleWSBeforeDirective", "annotation": ""}, "snippet": " self._compiler.handleWSBeforeDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1559_C8", "label": "addComment()", "type": "expression", "loc": [1559, 1559], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "vector": [8, 2, 0.5859, 0.0004, 2, 0.94, 1.0, 738, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addComment", "arg_names": [], "import_names": [], "rhs_call_name": "addComment", "annotation": ""}, "snippet": " self._compiler.addComment(comm)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1561_C4", "label": "eatPlaceholder", "type": "function", "loc": [1561, 1574], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.5891, 0.0053, 1, 0.84, 0.2105, 787, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "eatPlaceholder", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatPlaceholder(self):\n (expr, rawPlaceholder,\n lineCol, cacheTokenParts,\n filterArgs, isSilentPlaceholder) = self.getPlaceholder(\n allowCacheTokens=True, returnEverything=True)\n \n self._compiler.addPlaceholder(\n expr,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1562_C8", "label": "expr, rawPlaceholder, lineCol, cacheTokenParts, filterArgs, isSilentPlaceholder = getPlaceholder()", "type": "assigned_variable", "loc": [1562, 1565], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1561_C4", "vector": [14, 2, 0.5876, 0.0015, 2, 0.6, 0.0, 570, 3, 2, 0, 0, 439, 10, 1], "semantic": {"name": "expr, rawPlaceholder, lineCol, cacheTokenParts, filterArgs, isSilentPlaceholder", "arg_names": [], "import_names": [], "rhs_call_name": "getPlaceholder", "annotation": ""}, "snippet": " (expr, rawPlaceholder,\n lineCol, cacheTokenParts,\n filterArgs, isSilentPlaceholder) = self.getPlaceholder(\n allowCacheTokens=True, returnEverything=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1567_C8", "label": "addPlaceholder()", "type": "expression", "loc": [1567, 1573], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1561_C4", "vector": [8, 2, 0.59, 0.0026, 2, 0.6, 0.5, 741, 3, 6, 0, 0, 0, 0, 1], "semantic": {"name": "addPlaceholder", "arg_names": [], "import_names": [], "rhs_call_name": "addPlaceholder", "annotation": ""}, "snippet": " self._compiler.addPlaceholder(\n expr,\n filterArgs=filterArgs,\n rawPlaceholder=rawPlaceholder,\n cacheTokenParts=cacheTokenParts,\n lineCol=lineCol,\n silentMode=isSilentPlaceholder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1574_C8", "label": "return", "type": "return", "loc": [1574, 1574], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1561_C4", "vector": [13, 2, 0.5915, 0.0004, 2, 0.6, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "label": "eatPSP", "type": "function", "loc": [1576, 1590], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.5949, 0.0056, 1, 0.84, 0.2281, 521, 0, 1, 0, 0, 0, 0, 14], "semantic": {"name": "eatPSP", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatPSP(self):\n # filtered\n self._filterDisabledDirectives(directiveName='psp')\n self.getPSPStartToken()\n endToken = self.setting('PSPEndToken')\n startPos = self.pos() \n while not self.atEnd():\n if self.peek() == endToken[0]:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1578_C8", "label": "_filterDisabledDirectives()", "type": "expression", "loc": [1578, 1578], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "vector": [8, 2, 0.593, 0.0004, 2, 0.93, 0.0, 621, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_filterDisabledDirectives", "arg_names": [], "import_names": [], "rhs_call_name": "_filterDisabledDirectives", "annotation": ""}, "snippet": " self._filterDisabledDirectives(directiveName='psp')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1579_C8", "label": "getPSPStartToken()", "type": "expression", "loc": [1579, 1579], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "vector": [8, 2, 0.5934, 0.0004, 2, 0.93, 0.125, 681, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getPSPStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getPSPStartToken", "annotation": ""}, "snippet": " self.getPSPStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1580_C8", "label": "endToken = setting()", "type": "assigned_variable", "loc": [1580, 1580], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "vector": [14, 2, 0.5938, 0.0004, 2, 0.93, 0.25, 93, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "endToken", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " endToken = self.setting('PSPEndToken')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1581_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [1581, 1581], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "vector": [14, 2, 0.5941, 0.0004, 2, 0.93, 0.375, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1582_C8", "label": "while", "type": "while", "loc": [1582, 1586], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "vector": [5, 2, 0.5953, 0.0019, 2, 0.93, 0.5, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while not self.atEnd():\n if self.peek() == endToken[0]:\n if self.matchPSPEndToken():\n break\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1583_C12", "label": "if", "type": "if", "loc": [1583, 1585], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1582_C8", "vector": [4, 3, 0.5953, 0.0011, 3, 0.47, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek() == endToken[0]:\n if self.matchPSPEndToken():\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1584_C16", "label": "if", "type": "if", "loc": [1584, 1585], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1583_C12", "vector": [4, 4, 0.5955, 0.0008, 4, 0.15, 0.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchPSPEndToken():\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1586_C12", "label": "advance()", "type": "expression", "loc": [1586, 1586], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1582_C8", "vector": [8, 3, 0.596, 0.0004, 3, 0.47, 1.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1587_C8", "label": "pspString = strip()", "type": "assigned_variable", "loc": [1587, 1587], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "vector": [14, 2, 0.5964, 0.0004, 2, 0.93, 0.625, 354, 3, 0, 0, 0, 973, 10, 3], "semantic": {"name": "pspString", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " pspString = self.readTo(self.pos(), start=startPos).strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1588_C8", "label": "pspString = _applyExpressionFilters()", "type": "assigned_variable", "loc": [1588, 1588], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "vector": [14, 2, 0.5968, 0.0004, 2, 0.93, 0.75, 354, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "pspString", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " pspString = self._applyExpressionFilters(pspString, 'psp', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1589_C8", "label": "addPSP()", "type": "expression", "loc": [1589, 1589], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "vector": [8, 2, 0.5971, 0.0004, 2, 0.93, 0.875, 946, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addPSP", "arg_names": [], "import_names": [], "rhs_call_name": "addPSP", "annotation": ""}, "snippet": " self._compiler.addPSP(pspString)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1590_C8", "label": "getPSPEndToken()", "type": "expression", "loc": [1590, 1590], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "vector": [8, 2, 0.5975, 0.0004, 2, 0.93, 1.0, 795, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getPSPEndToken", "arg_names": [], "import_names": [], "rhs_call_name": "getPSPEndToken", "annotation": ""}, "snippet": " self.getPSPEndToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1593_C4", "label": "_simpleIndentingDirectives = split()", "type": "assigned_variable", "loc": [1593, 1594], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [14, 1, 0.5988, 0.0008, 1, 0.84, 0.2456, 219, 3, 0, 0, 0, 908, 10, 1], "semantic": {"name": "_simpleIndentingDirectives", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " _simpleIndentingDirectives = '''\n else elif for while repeat unless try except finally'''.split()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1595_C4", "label": "_simpleExprDirectives = split()", "type": "assigned_variable", "loc": [1595, 1599], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [14, 1, 0.6002, 0.0019, 1, 0.84, 0.2632, 563, 3, 0, 0, 0, 908, 10, 1], "semantic": {"name": "_simpleExprDirectives", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " _simpleExprDirectives = '''\n pass continue stop return yield break\n del assert raise\n silent echo \n import from'''.split()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1600_C4", "label": "_directiveHandlerNames =", "type": "assigned_variable", "loc": [1600, 1601], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [14, 1, 0.6015, 0.0008, 1, 0.84, 0.2807, 15, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "_directiveHandlerNames", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _directiveHandlerNames = {'import': 'addImportStatement',\n 'from': 'addImportStatement', }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1602_C4", "label": "eatDirective", "type": "function", "loc": [1602, 1635], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.6082, 0.0128, 1, 0.84, 0.2982, 873, 0, 1, 0, 0, 0, 0, 17], "semantic": {"name": "eatDirective", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatDirective(self):\n directiveName = self.matchDirective()\n self._filterDisabledDirectives(directiveName)\n\n for callback in self.setting('preparseDirectiveHooks'):\n callback(parser=self, directiveName=directiveName)\n\n # subclasses can override the default behaviours here by providing an"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1603_C8", "label": "directiveName = matchDirective()", "type": "assigned_variable", "loc": [1603, 1603], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1602_C4", "vector": [14, 2, 0.6024, 0.0004, 2, 0.29, 0.0, 508, 3, 0, 0, 0, 893, 10, 1], "semantic": {"name": "directiveName", "arg_names": [], "import_names": [], "rhs_call_name": "matchDirective", "annotation": ""}, "snippet": " directiveName = self.matchDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1604_C8", "label": "_filterDisabledDirectives()", "type": "expression", "loc": [1604, 1604], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1602_C4", "vector": [8, 2, 0.6028, 0.0004, 2, 0.29, 0.2, 621, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_filterDisabledDirectives", "arg_names": [], "import_names": [], "rhs_call_name": "_filterDisabledDirectives", "annotation": ""}, "snippet": " self._filterDisabledDirectives(directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1606_C8", "label": "for callback", "type": "for", "loc": [1606, 1607], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1602_C4", "vector": [6, 2, 0.6037, 0.0008, 2, 0.29, 0.4, 342, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for callback in self.setting('preparseDirectiveHooks'):\n callback(parser=self, directiveName=directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1607_C12", "label": "callback()", "type": "expression", "loc": [1607, 1607], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1606_C8", "vector": [8, 3, 0.6039, 0.0004, 3, 0.68, 0.0, 342, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "callback", "annotation": ""}, "snippet": " callback(parser=self, directiveName=directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1611_C8", "label": "directiveParser = get()", "type": "assigned_variable", "loc": [1611, 1611], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1602_C4", "vector": [14, 2, 0.6054, 0.0004, 2, 0.29, 0.6, 656, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "directiveParser", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " directiveParser = self._directiveNamesAndParsers.get(directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1612_C8", "label": "if", "type": "if", "loc": [1612, 1632], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1602_C4", "vector": [4, 2, 0.6095, 0.0079, 2, 0.29, 0.8, 0, 2, 0, 0, 0, 0, 0, 10], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if directiveParser:\n directiveParser()\n elif directiveName in self._simpleIndentingDirectives:\n handlerName = self._directiveHandlerNames.get(directiveName)\n if not handlerName:\n handlerName = 'add'+directiveName.capitalize()\n handler = getattr(self._compiler, handlerName)\n self.eatSimpleIndentingDirective(directiveName, callback=handler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1613_C12", "label": "directiveParser()", "type": "expression", "loc": [1613, 1613], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1612_C8", "vector": [8, 3, 0.6062, 0.0004, 3, 0.27, 0.0, 656, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "directiveParser", "arg_names": [], "import_names": [], "rhs_call_name": "directiveParser", "annotation": ""}, "snippet": " directiveParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1614_C8", "label": "if", "type": "if", "loc": [1614, 1632], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1612_C8", "vector": [4, 3, 0.6099, 0.0071, 3, 0.27, 1.0, 0, 0, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif directiveName in self._simpleIndentingDirectives:\n handlerName = self._directiveHandlerNames.get(directiveName)\n if not handlerName:\n handlerName = 'add'+directiveName.capitalize()\n handler = getattr(self._compiler, handlerName)\n self.eatSimpleIndentingDirective(directiveName, callback=handler)\n elif directiveName in self._simpleExprDirectives:\n handlerName = self._directiveHandlerNames.get(directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1615_C12", "label": "handlerName = get()", "type": "assigned_variable", "loc": [1615, 1615], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1614_C8", "vector": [14, 4, 0.6069, 0.0004, 4, 0.55, 0.0, 79, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "handlerName", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " handlerName = self._directiveHandlerNames.get(directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1616_C12", "label": "if", "type": "if", "loc": [1616, 1617], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1614_C8", "vector": [4, 4, 0.6075, 0.0008, 4, 0.55, 0.25, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not handlerName:\n handlerName = 'add'+directiveName.capitalize()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1617_C16", "label": "handlerName =", "type": "assigned_variable", "loc": [1617, 1617], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1616_C12", "vector": [14, 5, 0.6077, 0.0004, 5, 0.06, 0.0, 79, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "handlerName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " handlerName = 'add'+directiveName.capitalize()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1618_C12", "label": "handler = getattr()", "type": "assigned_variable", "loc": [1618, 1618], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1614_C8", "vector": [14, 4, 0.608, 0.0004, 4, 0.55, 0.5, 388, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "handler", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " handler = getattr(self._compiler, handlerName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1619_C12", "label": "eatSimpleIndentingDirective()", "type": "expression", "loc": [1619, 1619], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1614_C8", "vector": [8, 4, 0.6084, 0.0004, 4, 0.55, 0.75, 510, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "eatSimpleIndentingDirective", "arg_names": [], "import_names": [], "rhs_call_name": "eatSimpleIndentingDirective", "annotation": ""}, "snippet": " self.eatSimpleIndentingDirective(directiveName, callback=handler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1620_C8", "label": "if", "type": "if", "loc": [1620, 1632], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1614_C8", "vector": [4, 4, 0.611, 0.0049, 4, 0.55, 1.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif directiveName in self._simpleExprDirectives:\n handlerName = self._directiveHandlerNames.get(directiveName)\n if not handlerName:\n handlerName = 'add'+directiveName.capitalize()\n handler = getattr(self._compiler, handlerName)\n if directiveName in ('silent', 'echo'):\n includeDirectiveNameInExpr = False\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1621_C12", "label": "handlerName = get()", "type": "assigned_variable", "loc": [1621, 1621], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1620_C8", "vector": [14, 5, 0.6092, 0.0004, 5, 0.43, 0.0, 79, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "handlerName", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " handlerName = self._directiveHandlerNames.get(directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1622_C12", "label": "if", "type": "if", "loc": [1622, 1623], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1620_C8", "vector": [4, 5, 0.6097, 0.0008, 5, 0.43, 0.2, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not handlerName:\n handlerName = 'add'+directiveName.capitalize()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1623_C16", "label": "handlerName =", "type": "assigned_variable", "loc": [1623, 1623], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1622_C12", "vector": [14, 6, 0.6099, 0.0004, 6, 0.63, 0.0, 79, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "handlerName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " handlerName = 'add'+directiveName.capitalize()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1624_C12", "label": "handler = getattr()", "type": "assigned_variable", "loc": [1624, 1624], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1620_C8", "vector": [14, 5, 0.6103, 0.0004, 5, 0.43, 0.4, 388, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "handler", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " handler = getattr(self._compiler, handlerName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1625_C12", "label": "if", "type": "if", "loc": [1625, 1628], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1620_C8", "vector": [4, 5, 0.6112, 0.0015, 5, 0.43, 0.6, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if directiveName in ('silent', 'echo'):\n includeDirectiveNameInExpr = False\n else:\n includeDirectiveNameInExpr = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1626_C16", "label": "includeDirectiveNameInExpr =", "type": "assigned_variable", "loc": [1626, 1626], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1625_C12", "vector": [14, 6, 0.611, 0.0004, 6, 0.8, 0.0, 587, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "includeDirectiveNameInExpr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " includeDirectiveNameInExpr = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1628_C16", "label": "includeDirectiveNameInExpr =", "type": "assigned_variable", "loc": [1628, 1628], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1625_C12", "vector": [14, 6, 0.6118, 0.0004, 6, 0.8, 1.0, 587, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "includeDirectiveNameInExpr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " includeDirectiveNameInExpr = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1629_C12", "label": "expr = eatSimpleExprDirective()", "type": "assigned_variable", "loc": [1629, 1631], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1620_C8", "vector": [14, 5, 0.6126, 0.0011, 5, 0.43, 0.8, 236, 3, 2, 0, 0, 503, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "eatSimpleExprDirective", "annotation": ""}, "snippet": " expr = self.eatSimpleExprDirective(\n directiveName,\n includeDirectiveNameInExpr=includeDirectiveNameInExpr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1632_C12", "label": "handler()", "type": "expression", "loc": [1632, 1632], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1620_C8", "vector": [8, 5, 0.6133, 0.0004, 5, 0.43, 1.0, 388, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "handler", "arg_names": [], "import_names": [], "rhs_call_name": "handler", "annotation": ""}, "snippet": " handler(expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1634_C8", "label": "for callback", "type": "for", "loc": [1634, 1635], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1602_C4", "vector": [6, 2, 0.6142, 0.0008, 2, 0.29, 1.0, 342, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for callback in self.setting('postparseDirectiveHooks'):\n callback(parser=self, directiveName=directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1635_C12", "label": "callback()", "type": "expression", "loc": [1635, 1635], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1634_C8", "vector": [8, 3, 0.6144, 0.0004, 3, 0.65, 0.0, 342, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "callback", "annotation": ""}, "snippet": " callback(parser=self, directiveName=directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1637_C4", "label": "_eatRestOfDirectiveTag", "type": "function", "loc": [1637, 1656], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.6188, 0.0075, 1, 0.84, 0.3158, 130, 0, 3, 0, 0, 0, 0, 15], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": ["self", "isLineClearToStartToken", "endOfFirstLinePos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _eatRestOfDirectiveTag(self, isLineClearToStartToken, endOfFirstLinePos):\n foundComment = False\n if self.matchCommentStartToken():\n pos = self.pos()\n self.advance()\n if not self.matchDirective():\n self.setPos(pos)\n foundComment = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1638_C8", "label": "foundComment =", "type": "assigned_variable", "loc": [1638, 1638], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1637_C4", "vector": [14, 2, 0.6156, 0.0004, 2, 0.64, 0.0, 804, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "foundComment", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " foundComment = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1639_C8", "label": "if", "type": "if", "loc": [1639, 1647], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1637_C4", "vector": [4, 2, 0.6174, 0.0034, 2, 0.64, 0.3333, 0, 3, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchCommentStartToken():\n pos = self.pos()\n self.advance()\n if not self.matchDirective():\n self.setPos(pos)\n foundComment = True\n self.eatComment() # this won't gobble the EOL\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1640_C12", "label": "pos = pos()", "type": "assigned_variable", "loc": [1640, 1640], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1639_C8", "vector": [14, 3, 0.6163, 0.0004, 3, 0.32, 0.0, 627, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " pos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1641_C12", "label": "advance()", "type": "expression", "loc": [1641, 1641], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1639_C8", "vector": [8, 3, 0.6167, 0.0004, 3, 0.32, 0.5, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1642_C12", "label": "if", "type": "if", "loc": [1642, 1647], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1639_C8", "vector": [4, 3, 0.618, 0.0023, 3, 0.32, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.matchDirective():\n self.setPos(pos)\n foundComment = True\n self.eatComment() # this won't gobble the EOL\n else:\n self.setPos(pos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1643_C16", "label": "setPos()", "type": "expression", "loc": [1643, 1643], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1642_C12", "vector": [8, 4, 0.6174, 0.0004, 4, 0.67, 0.0, 659, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(pos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1644_C16", "label": "foundComment =", "type": "assigned_variable", "loc": [1644, 1644], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1642_C12", "vector": [14, 4, 0.6178, 0.0004, 4, 0.67, 0.3333, 804, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "foundComment", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " foundComment = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1645_C16", "label": "eatComment()", "type": "expression", "loc": [1645, 1645], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1642_C12", "vector": [8, 4, 0.6182, 0.0004, 4, 0.67, 0.6667, 344, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "eatComment", "arg_names": [], "import_names": [], "rhs_call_name": "eatComment", "annotation": ""}, "snippet": " self.eatComment() # this won't gobble the EOL"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1647_C16", "label": "setPos()", "type": "expression", "loc": [1647, 1647], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1642_C12", "vector": [8, 4, 0.6189, 0.0004, 4, 0.67, 1.0, 659, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(pos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1649_C8", "label": "if", "type": "if", "loc": [1649, 1653], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1637_C4", "vector": [4, 2, 0.6204, 0.0019, 2, 0.64, 0.6667, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not foundComment and self.matchDirectiveEndToken():\n self.getDirectiveEndToken()\n elif isLineClearToStartToken and (not self.atEnd()) and self.peek() in '\\r\\n':\n # still gobble the EOL if a comment was found. \n self.readToEOL(gobble=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1650_C16", "label": "getDirectiveEndToken()", "type": "expression", "loc": [1650, 1650], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1649_C8", "vector": [8, 3, 0.6201, 0.0004, 3, 0.62, 0.0, 925, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveEndToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveEndToken", "annotation": ""}, "snippet": " self.getDirectiveEndToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1651_C8", "label": "if", "type": "if", "loc": [1651, 1653], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1649_C8", "vector": [4, 3, 0.6208, 0.0011, 3, 0.62, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isLineClearToStartToken and (not self.atEnd()) and self.peek() in '\\r\\n':\n # still gobble the EOL if a comment was found. \n self.readToEOL(gobble=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1653_C12", "label": "readToEOL()", "type": "expression", "loc": [1653, 1653], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1651_C8", "vector": [8, 4, 0.6212, 0.0004, 4, 0.96, 0.0, 553, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "readToEOL", "arg_names": [], "import_names": [], "rhs_call_name": "readToEOL", "annotation": ""}, "snippet": " self.readToEOL(gobble=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1655_C8", "label": "if", "type": "if", "loc": [1655, 1656], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1637_C4", "vector": [4, 2, 0.6221, 0.0008, 2, 0.64, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isLineClearToStartToken and (self.atEnd() or self.pos() > endOfFirstLinePos):\n self._compiler.handleWSBeforeDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1656_C12", "label": "handleWSBeforeDirective()", "type": "expression", "loc": [1656, 1656], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1655_C8", "vector": [8, 3, 0.6223, 0.0004, 3, 0.86, 0.0, 788, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "handleWSBeforeDirective", "arg_names": [], "import_names": [], "rhs_call_name": "handleWSBeforeDirective", "annotation": ""}, "snippet": " self._compiler.handleWSBeforeDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "label": "_eatToThisEndDirective", "type": "function", "loc": [1658, 1692], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.6295, 0.0132, 1, 0.84, 0.3333, 335, 0, 2, 1, 0, 0, 0, 29], "semantic": {"name": "_eatToThisEndDirective", "arg_names": ["self", "directiveName"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _eatToThisEndDirective(self, directiveName):\n finalPos = endRawPos = startPos = self.pos()\n directiveChar = self.setting('directiveStartToken')[0]\n isLineClearToStartToken = False\n while not self.atEnd():\n if self.peek() == directiveChar:\n if self.matchDirective() == 'end':\n endRawPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1659_C8", "label": "finalPos = pos()", "type": "assigned_variable", "loc": [1659, 1659], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "vector": [14, 2, 0.6234, 0.0004, 2, 0.99, 0.0, 499, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "finalPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " finalPos = endRawPos = startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1660_C8", "label": "directiveChar =", "type": "assigned_variable", "loc": [1660, 1660], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "vector": [14, 2, 0.6238, 0.0004, 2, 0.99, 0.1111, 344, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "directiveChar", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " directiveChar = self.setting('directiveStartToken')[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1661_C8", "label": "isLineClearToStartToken =", "type": "assigned_variable", "loc": [1661, 1661], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "vector": [14, 2, 0.6242, 0.0004, 2, 0.99, 0.2222, 110, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isLineClearToStartToken = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1662_C8", "label": "while", "type": "while", "loc": [1662, 1678], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "vector": [5, 2, 0.6276, 0.0064, 2, 0.99, 0.3333, 0, 0, 0, 0, 0, 0, 0, 17], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while not self.atEnd():\n if self.peek() == directiveChar:\n if self.matchDirective() == 'end':\n endRawPos = self.pos()\n self.getDirectiveStartToken()\n self.advance(len('end'))\n self.getWhiteSpace()\n if self.startswith(directiveName):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1663_C12", "label": "if", "type": "if", "loc": [1663, 1676], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1662_C8", "vector": [4, 3, 0.6274, 0.0053, 3, 0.74, 0.0, 0, 0, 0, 0, 0, 0, 0, 14], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek() == directiveChar:\n if self.matchDirective() == 'end':\n endRawPos = self.pos()\n self.getDirectiveStartToken()\n self.advance(len('end'))\n self.getWhiteSpace()\n if self.startswith(directiveName):\n if self.isLineClearToStartToken(endRawPos):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1664_C16", "label": "if", "type": "if", "loc": [1664, 1676], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1663_C12", "vector": [4, 4, 0.6276, 0.0049, 4, 0.27, 0.0, 0, 0, 0, 0, 0, 0, 0, 13], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchDirective() == 'end':\n endRawPos = self.pos()\n self.getDirectiveStartToken()\n self.advance(len('end'))\n self.getWhiteSpace()\n if self.startswith(directiveName):\n if self.isLineClearToStartToken(endRawPos):\n isLineClearToStartToken = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1665_C20", "label": "endRawPos = pos()", "type": "assigned_variable", "loc": [1665, 1665], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1664_C16", "vector": [14, 5, 0.6257, 0.0004, 5, 0.39, 0.0, 628, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "endRawPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " endRawPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1666_C20", "label": "getDirectiveStartToken()", "type": "expression", "loc": [1666, 1666], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1664_C16", "vector": [8, 5, 0.6261, 0.0004, 5, 0.39, 0.25, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1667_C20", "label": "advance()", "type": "expression", "loc": [1667, 1667], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1664_C16", "vector": [8, 5, 0.6265, 0.0004, 5, 0.39, 0.5, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('end'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1668_C20", "label": "getWhiteSpace()", "type": "expression", "loc": [1668, 1668], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1664_C16", "vector": [8, 5, 0.6268, 0.0004, 5, 0.39, 0.75, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1669_C20", "label": "if", "type": "if", "loc": [1669, 1676], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1664_C16", "vector": [4, 5, 0.6285, 0.003, 5, 0.39, 1.0, 0, 3, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.startswith(directiveName):\n if self.isLineClearToStartToken(endRawPos):\n isLineClearToStartToken = True\n endRawPos = self.findBOL(endRawPos)\n self.advance(len(directiveName)) # to end of directiveName\n self.getWhiteSpace()\n finalPos = self.pos()\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1670_C24", "label": "if", "type": "if", "loc": [1670, 1672], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1669_C20", "vector": [4, 6, 0.628, 0.0011, 6, 0.22, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.isLineClearToStartToken(endRawPos):\n isLineClearToStartToken = True\n endRawPos = self.findBOL(endRawPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1671_C28", "label": "isLineClearToStartToken =", "type": "assigned_variable", "loc": [1671, 1671], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1670_C24", "vector": [14, 7, 0.628, 0.0004, 7, 0.88, 0.0, 110, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isLineClearToStartToken = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1672_C28", "label": "endRawPos = findBOL()", "type": "assigned_variable", "loc": [1672, 1672], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1670_C24", "vector": [14, 7, 0.6283, 0.0004, 7, 0.88, 1.0, 628, 3, 1, 0, 0, 817, 10, 1], "semantic": {"name": "endRawPos", "arg_names": [], "import_names": [], "rhs_call_name": "findBOL", "annotation": ""}, "snippet": " endRawPos = self.findBOL(endRawPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1673_C24", "label": "advance()", "type": "expression", "loc": [1673, 1673], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1669_C20", "vector": [8, 6, 0.6287, 0.0004, 6, 0.22, 0.3333, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len(directiveName)) # to end of directiveName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1674_C24", "label": "getWhiteSpace()", "type": "expression", "loc": [1674, 1674], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1669_C20", "vector": [8, 6, 0.6291, 0.0004, 6, 0.22, 0.6667, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1675_C24", "label": "finalPos = pos()", "type": "assigned_variable", "loc": [1675, 1675], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1669_C20", "vector": [14, 6, 0.6295, 0.0004, 6, 0.22, 1.0, 499, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "finalPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " finalPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1677_C12", "label": "advance()", "type": "expression", "loc": [1677, 1677], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1662_C8", "vector": [8, 3, 0.6302, 0.0004, 3, 0.74, 0.5, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1678_C12", "label": "finalPos = pos()", "type": "assigned_variable", "loc": [1678, 1678], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1662_C8", "vector": [14, 3, 0.6306, 0.0004, 3, 0.74, 1.0, 499, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "finalPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " finalPos = endRawPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1680_C8", "label": "textEaten = readTo()", "type": "assigned_variable", "loc": [1680, 1680], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "vector": [14, 2, 0.6313, 0.0004, 2, 0.99, 0.4444, 586, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "textEaten", "arg_names": [], "import_names": [], "rhs_call_name": "readTo", "annotation": ""}, "snippet": " textEaten = self.readTo(endRawPos, start=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1681_C8", "label": "setPos()", "type": "expression", "loc": [1681, 1681], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "vector": [8, 2, 0.6317, 0.0004, 2, 0.99, 0.5556, 659, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(finalPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1683_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [1683, 1683], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "vector": [14, 2, 0.6325, 0.0004, 2, 0.99, 0.6667, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1685_C8", "label": "if", "type": "if", "loc": [1685, 1688], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "vector": [4, 2, 0.6338, 0.0015, 2, 0.99, 0.7778, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchDirectiveEndToken():\n self.getDirectiveEndToken()\n elif isLineClearToStartToken and (not self.atEnd()) and self.peek() in '\\r\\n':\n self.readToEOL(gobble=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1686_C12", "label": "getDirectiveEndToken()", "type": "expression", "loc": [1686, 1686], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1685_C8", "vector": [8, 3, 0.6336, 0.0004, 3, 0.12, 0.0, 925, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveEndToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveEndToken", "annotation": ""}, "snippet": " self.getDirectiveEndToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1687_C8", "label": "if", "type": "if", "loc": [1687, 1688], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1685_C8", "vector": [4, 3, 0.6342, 0.0008, 3, 0.12, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isLineClearToStartToken and (not self.atEnd()) and self.peek() in '\\r\\n':\n self.readToEOL(gobble=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1688_C12", "label": "readToEOL()", "type": "expression", "loc": [1688, 1688], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1687_C8", "vector": [8, 4, 0.6343, 0.0004, 4, 0.09, 0.0, 553, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "readToEOL", "arg_names": [], "import_names": [], "rhs_call_name": "readToEOL", "annotation": ""}, "snippet": " self.readToEOL(gobble=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1690_C8", "label": "if", "type": "if", "loc": [1690, 1691], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "vector": [4, 2, 0.6353, 0.0008, 2, 0.99, 0.8889, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isLineClearToStartToken and self.pos() > endOfFirstLinePos:\n self._compiler.handleWSBeforeDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1691_C12", "label": "handleWSBeforeDirective()", "type": "expression", "loc": [1691, 1691], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1690_C8", "vector": [8, 3, 0.6355, 0.0004, 3, 0.68, 0.0, 788, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "handleWSBeforeDirective", "arg_names": [], "import_names": [], "rhs_call_name": "handleWSBeforeDirective", "annotation": ""}, "snippet": " self._compiler.handleWSBeforeDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1692_C8", "label": "return", "type": "return", "loc": [1692, 1692], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "vector": [13, 2, 0.6359, 0.0004, 2, 0.99, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return textEaten"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "label": "eatSimpleExprDirective", "type": "function", "loc": [1695, 1709], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.6396, 0.0056, 1, 0.84, 0.3509, 503, 0, 3, 1, 0, 0, 0, 12], "semantic": {"name": "eatSimpleExprDirective", "arg_names": ["self", "directiveName", "includeDirectiveNameInExpr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatSimpleExprDirective(self, directiveName, includeDirectiveNameInExpr=True):\n # filtered \n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLine = self.findEOL()\n self.getDirectiveStartToken()\n if not includeDirectiveNameInExpr:\n self.advance(len(directiveName))\n startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1697_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [1697, 1697], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "vector": [14, 2, 0.6377, 0.0004, 2, 0.06, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1698_C8", "label": "endOfFirstLine = findEOL()", "type": "assigned_variable", "loc": [1698, 1698], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "vector": [14, 2, 0.6381, 0.0004, 2, 0.06, 0.1, 478, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLine", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLine = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1699_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [1699, 1699], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "vector": [8, 2, 0.6385, 0.0004, 2, 0.06, 0.2, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1700_C8", "label": "if", "type": "if", "loc": [1700, 1701], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "vector": [4, 2, 0.639, 0.0008, 2, 0.06, 0.3, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not includeDirectiveNameInExpr:\n self.advance(len(directiveName))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1701_C12", "label": "advance()", "type": "expression", "loc": [1701, 1701], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1700_C8", "vector": [8, 3, 0.6392, 0.0004, 3, 0.73, 0.0, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len(directiveName))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1702_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [1702, 1702], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "vector": [14, 2, 0.6396, 0.0004, 2, 0.06, 0.4, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1703_C8", "label": "expr = strip()", "type": "assigned_variable", "loc": [1703, 1703], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "vector": [14, 2, 0.64, 0.0004, 2, 0.06, 0.5, 236, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " expr = self.getExpression().strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1704_C8", "label": "directiveName =", "type": "assigned_variable", "loc": [1704, 1704], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "vector": [14, 2, 0.6404, 0.0004, 2, 0.06, 0.6, 508, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "directiveName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " directiveName = expr.split()[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1705_C8", "label": "expr = _applyExpressionFilters()", "type": "assigned_variable", "loc": [1705, 1705], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "vector": [14, 2, 0.6407, 0.0004, 2, 0.06, 0.7, 236, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " expr = self._applyExpressionFilters(expr, directiveName, startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1706_C8", "label": "if", "type": "if", "loc": [1706, 1707], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "vector": [4, 2, 0.6413, 0.0008, 2, 0.06, 0.8, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if directiveName in self._closeableDirectives:\n self.pushToOpenDirectivesStack(directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1707_C12", "label": "pushToOpenDirectivesStack()", "type": "expression", "loc": [1707, 1707], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1706_C8", "vector": [8, 3, 0.6415, 0.0004, 3, 0.33, 0.0, 853, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "pushToOpenDirectivesStack", "arg_names": [], "import_names": [], "rhs_call_name": "pushToOpenDirectivesStack", "annotation": ""}, "snippet": " self.pushToOpenDirectivesStack(directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1708_C8", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [1708, 1708], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "vector": [8, 2, 0.6419, 0.0004, 2, 0.06, 0.9, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1709_C8", "label": "return", "type": "return", "loc": [1709, 1709], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "vector": [13, 2, 0.6422, 0.0004, 2, 0.06, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return expr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "label": "eatSimpleIndentingDirective", "type": "function", "loc": [1711, 1744], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.6492, 0.0128, 1, 0.84, 0.3684, 510, 0, 4, 0, 0, 0, 0, 27], "semantic": {"name": "eatSimpleIndentingDirective", "arg_names": ["self", "directiveName", "callback", "includeDirectiveNameInExpr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatSimpleIndentingDirective(self, directiveName, callback,\n includeDirectiveNameInExpr=False):\n # filtered \n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLinePos = self.findEOL()\n lineCol = self.getRowCol()\n self.getDirectiveStartToken()\n if directiveName not in 'else elif for while try except finally'.split():"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1714_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [1714, 1714], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "vector": [14, 2, 0.6441, 0.0004, 2, 0.0, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1715_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [1715, 1715], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "vector": [14, 2, 0.6445, 0.0004, 2, 0.0, 0.1111, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1716_C8", "label": "lineCol = getRowCol()", "type": "assigned_variable", "loc": [1716, 1716], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "vector": [14, 2, 0.6449, 0.0004, 2, 0.0, 0.2222, 562, 3, 0, 0, 0, 946, 10, 1], "semantic": {"name": "lineCol", "arg_names": [], "import_names": [], "rhs_call_name": "getRowCol", "annotation": ""}, "snippet": " lineCol = self.getRowCol()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1717_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [1717, 1717], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "vector": [8, 2, 0.6452, 0.0004, 2, 0.0, 0.3333, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1718_C8", "label": "if", "type": "if", "loc": [1718, 1719], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "vector": [4, 2, 0.6458, 0.0008, 2, 0.0, 0.4444, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if directiveName not in 'else elif for while try except finally'.split():\n self.advance(len(directiveName))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1719_C12", "label": "advance()", "type": "expression", "loc": [1719, 1719], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1718_C8", "vector": [8, 3, 0.646, 0.0004, 3, 0.7, 0.0, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len(directiveName))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1720_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [1720, 1720], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "vector": [14, 2, 0.6464, 0.0004, 2, 0.0, 0.5556, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1722_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [1722, 1722], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "vector": [8, 2, 0.6471, 0.0004, 2, 0.0, 0.6667, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1724_C8", "label": "expr = getExpression()", "type": "assigned_variable", "loc": [1724, 1724], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "vector": [14, 2, 0.6479, 0.0004, 2, 0.0, 0.7778, 236, 3, 1, 0, 0, 119, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " expr = self.getExpression(pyTokensToBreakAt=[':'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1725_C8", "label": "expr = _applyExpressionFilters()", "type": "assigned_variable", "loc": [1725, 1725], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "vector": [14, 2, 0.6483, 0.0004, 2, 0.0, 0.8889, 236, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " expr = self._applyExpressionFilters(expr, directiveName, startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "label": "if", "type": "if", "loc": [1726, 1744], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "vector": [4, 2, 0.652, 0.0071, 2, 0.0, 1.0, 0, 3, 0, 0, 0, 0, 0, 16], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchColonForSingleLineShortFormDirective():\n self.advance() # skip over :\n if directiveName in 'else elif except finally'.split():\n callback(expr, dedent=False, lineCol=lineCol)\n else:\n callback(expr, lineCol=lineCol)\n \n self.getWhiteSpace(max=1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1727_C12", "label": "advance()", "type": "expression", "loc": [1727, 1727], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "vector": [8, 3, 0.649, 0.0004, 3, 0.94, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance() # skip over :"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1728_C12", "label": "if", "type": "if", "loc": [1728, 1731], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "vector": [4, 3, 0.6499, 0.0015, 3, 0.94, 0.1, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if directiveName in 'else elif except finally'.split():\n callback(expr, dedent=False, lineCol=lineCol)\n else:\n callback(expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1729_C16", "label": "callback()", "type": "expression", "loc": [1729, 1729], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1728_C12", "vector": [8, 4, 0.6498, 0.0004, 4, 0.16, 0.0, 342, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "callback", "annotation": ""}, "snippet": " callback(expr, dedent=False, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1731_C16", "label": "callback()", "type": "expression", "loc": [1731, 1731], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1728_C12", "vector": [8, 4, 0.6505, 0.0004, 4, 0.16, 1.0, 342, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "callback", "annotation": ""}, "snippet": " callback(expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1733_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [1733, 1733], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "vector": [8, 3, 0.6513, 0.0004, 3, 0.94, 0.2, 84, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace(max=1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1734_C12", "label": "parse()", "type": "expression", "loc": [1734, 1734], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "vector": [8, 3, 0.6516, 0.0004, 3, 0.94, 0.3, 678, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "parse", "arg_names": [], "import_names": [], "rhs_call_name": "parse", "annotation": ""}, "snippet": " self.parse(breakPoint=self.findEOL(gobble=True))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1735_C12", "label": "commitStrConst()", "type": "expression", "loc": [1735, 1735], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "vector": [8, 3, 0.652, 0.0004, 3, 0.94, 0.4, 212, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "commitStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "commitStrConst", "annotation": ""}, "snippet": " self._compiler.commitStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1736_C12", "label": "dedent()", "type": "expression", "loc": [1736, 1736], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "vector": [8, 3, 0.6524, 0.0004, 3, 0.94, 0.5, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self._compiler.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1738_C12", "label": "if", "type": "if", "loc": [1738, 1739], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "vector": [4, 3, 0.6533, 0.0008, 3, 0.94, 0.6, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek()==':':\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1739_C16", "label": "advance()", "type": "expression", "loc": [1739, 1739], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1738_C12", "vector": [8, 4, 0.6535, 0.0004, 4, 0.53, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1740_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [1740, 1740], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "vector": [8, 3, 0.6539, 0.0004, 3, 0.94, 0.7, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1741_C12", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [1741, 1741], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "vector": [8, 3, 0.6543, 0.0004, 3, 0.94, 0.8, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1742_C12", "label": "if", "type": "if", "loc": [1742, 1743], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "vector": [4, 3, 0.6548, 0.0008, 3, 0.94, 0.9, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if directiveName in self._closeableDirectives:\n self.pushToOpenDirectivesStack(directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1743_C16", "label": "pushToOpenDirectivesStack()", "type": "expression", "loc": [1743, 1743], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1742_C12", "vector": [8, 4, 0.655, 0.0004, 4, 0.85, 0.0, 853, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "pushToOpenDirectivesStack", "arg_names": [], "import_names": [], "rhs_call_name": "pushToOpenDirectivesStack", "annotation": ""}, "snippet": " self.pushToOpenDirectivesStack(directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1744_C12", "label": "callback()", "type": "expression", "loc": [1744, 1744], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "vector": [8, 3, 0.6554, 0.0004, 3, 0.94, 1.0, 342, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "callback", "arg_names": [], "import_names": [], "rhs_call_name": "callback", "annotation": ""}, "snippet": " callback(expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "label": "eatEndDirective", "type": "function", "loc": [1746, 1791], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.6646, 0.0173, 1, 0.84, 0.386, 436, 0, 1, 0, 0, 0, 0, 27], "semantic": {"name": "eatEndDirective", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatEndDirective(self):\n isLineClearToStartToken = self.isLineClearToStartToken()\n self.getDirectiveStartToken()\n self.advance(3) # to end of 'end'\n self.getWhiteSpace()\n pos = self.pos()\n directiveName = False\n for key in self._endDirectiveNamesAndHandlers.keys():"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1747_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [1747, 1747], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "vector": [14, 2, 0.6565, 0.0004, 2, 0.56, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1748_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [1748, 1748], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "vector": [8, 2, 0.6569, 0.0004, 2, 0.56, 0.0833, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1749_C8", "label": "advance()", "type": "expression", "loc": [1749, 1749], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "vector": [8, 2, 0.6573, 0.0004, 2, 0.56, 0.1667, 341, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(3) # to end of 'end'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1750_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [1750, 1750], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "vector": [8, 2, 0.6576, 0.0004, 2, 0.56, 0.25, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1751_C8", "label": "pos = pos()", "type": "assigned_variable", "loc": [1751, 1751], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "vector": [14, 2, 0.658, 0.0004, 2, 0.56, 0.3333, 627, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " pos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1752_C8", "label": "directiveName =", "type": "assigned_variable", "loc": [1752, 1752], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "vector": [14, 2, 0.6584, 0.0004, 2, 0.56, 0.4167, 508, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "directiveName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " directiveName = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1753_C8", "label": "for key", "type": "for", "loc": [1753, 1756], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "vector": [6, 2, 0.6593, 0.0015, 2, 0.56, 0.5, 230, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for key in self._endDirectiveNamesAndHandlers.keys():\n if self.find(key, pos) == pos:\n directiveName = key\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1754_C12", "label": "if", "type": "if", "loc": [1754, 1756], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1753_C8", "vector": [4, 3, 0.6595, 0.0011, 3, 0.17, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.find(key, pos) == pos:\n directiveName = key\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1755_C16", "label": "directiveName =", "type": "assigned_variable", "loc": [1755, 1755], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1754_C12", "vector": [14, 4, 0.6595, 0.0004, 4, 0.76, 0.0, 508, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "directiveName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " directiveName = key"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1757_C8", "label": "if", "type": "if", "loc": [1757, 1758], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "vector": [4, 2, 0.6605, 0.0008, 2, 0.56, 0.5833, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not directiveName:\n raise ParseError(self, msg='Invalid end directive')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1760_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [1760, 1760], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "vector": [14, 2, 0.6614, 0.0004, 2, 0.56, 0.6667, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1761_C8", "label": "getExpression()", "type": "expression", "loc": [1761, 1761], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "vector": [8, 2, 0.6618, 0.0004, 2, 0.56, 0.75, 119, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getExpression", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " self.getExpression() # eat in any extra comment-like crap"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1762_C8", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [1762, 1762], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "vector": [8, 2, 0.6622, 0.0004, 2, 0.56, 0.8333, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1763_C8", "label": "if", "type": "if", "loc": [1763, 1764], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "vector": [4, 2, 0.6627, 0.0008, 2, 0.56, 0.9167, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if directiveName in self._closeableDirectives:\n self.popFromOpenDirectivesStack(directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1764_C12", "label": "popFromOpenDirectivesStack()", "type": "expression", "loc": [1764, 1764], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1763_C8", "vector": [8, 3, 0.6629, 0.0004, 3, 0.09, 0.0, 759, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "popFromOpenDirectivesStack", "arg_names": [], "import_names": [], "rhs_call_name": "popFromOpenDirectivesStack", "annotation": ""}, "snippet": " self.popFromOpenDirectivesStack(directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1768_C8", "label": "if", "type": "if", "loc": [1768, 1791], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "vector": [4, 2, 0.6687, 0.009, 2, 0.56, 1.0, 0, 3, 0, 0, 0, 0, 0, 15], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._endDirectiveNamesAndHandlers.get(directiveName):\n handler = self._endDirectiveNamesAndHandlers[directiveName]\n handler()\n elif directiveName in 'block capture cache call filter errorCatcher'.split():\n if key == 'block':\n self._compiler.closeBlock()\n elif key == 'capture':\n self._compiler.endCaptureRegion()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1769_C12", "label": "handler =", "type": "assigned_variable", "loc": [1769, 1769], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1768_C8", "vector": [14, 3, 0.6648, 0.0004, 3, 0.31, 0.0, 388, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "handler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " handler = self._endDirectiveNamesAndHandlers[directiveName]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1770_C12", "label": "handler()", "type": "expression", "loc": [1770, 1770], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1768_C8", "vector": [8, 3, 0.6652, 0.0004, 3, 0.31, 0.5, 388, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "handler", "arg_names": [], "import_names": [], "rhs_call_name": "handler", "annotation": ""}, "snippet": " handler()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1771_C8", "label": "if", "type": "if", "loc": [1771, 1791], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1768_C8", "vector": [4, 3, 0.6693, 0.0079, 3, 0.31, 1.0, 0, 0, 0, 0, 0, 0, 0, 13], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif directiveName in 'block capture cache call filter errorCatcher'.split():\n if key == 'block':\n self._compiler.closeBlock()\n elif key == 'capture':\n self._compiler.endCaptureRegion()\n elif key == 'cache':\n self._compiler.endCacheRegion()\n elif key == 'call':"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1772_C12", "label": "if", "type": "if", "loc": [1772, 1783], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1771_C8", "vector": [4, 4, 0.668, 0.0045, 4, 0.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if key == 'block':\n self._compiler.closeBlock()\n elif key == 'capture':\n self._compiler.endCaptureRegion()\n elif key == 'cache':\n self._compiler.endCacheRegion()\n elif key == 'call':\n self._compiler.endCallRegion()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1773_C16", "label": "closeBlock()", "type": "expression", "loc": [1773, 1773], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1772_C12", "vector": [8, 5, 0.6663, 0.0004, 5, 0.7, 0.0, 27, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "closeBlock", "arg_names": [], "import_names": [], "rhs_call_name": "closeBlock", "annotation": ""}, "snippet": " self._compiler.closeBlock()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1774_C12", "label": "if", "type": "if", "loc": [1774, 1783], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1772_C12", "vector": [4, 5, 0.6684, 0.0038, 5, 0.7, 1.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif key == 'capture':\n self._compiler.endCaptureRegion()\n elif key == 'cache':\n self._compiler.endCacheRegion()\n elif key == 'call':\n self._compiler.endCallRegion()\n elif key == 'filter':\n self._compiler.closeFilterBlock()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1775_C16", "label": "endCaptureRegion()", "type": "expression", "loc": [1775, 1775], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1774_C12", "vector": [8, 6, 0.667, 0.0004, 6, 0.84, 0.0, 608, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "endCaptureRegion", "arg_names": [], "import_names": [], "rhs_call_name": "endCaptureRegion", "annotation": ""}, "snippet": " self._compiler.endCaptureRegion()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1776_C12", "label": "if", "type": "if", "loc": [1776, 1783], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1774_C12", "vector": [4, 6, 0.6687, 0.003, 6, 0.84, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif key == 'cache':\n self._compiler.endCacheRegion()\n elif key == 'call':\n self._compiler.endCallRegion()\n elif key == 'filter':\n self._compiler.closeFilterBlock()\n elif key == 'errorCatcher':\n self._compiler.turnErrorCatcherOff()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1777_C16", "label": "endCacheRegion()", "type": "expression", "loc": [1777, 1777], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1776_C12", "vector": [8, 7, 0.6678, 0.0004, 7, 0.66, 0.0, 281, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "endCacheRegion", "arg_names": [], "import_names": [], "rhs_call_name": "endCacheRegion", "annotation": ""}, "snippet": " self._compiler.endCacheRegion()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1778_C12", "label": "if", "type": "if", "loc": [1778, 1783], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1776_C12", "vector": [4, 7, 0.6691, 0.0023, 7, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif key == 'call':\n self._compiler.endCallRegion()\n elif key == 'filter':\n self._compiler.closeFilterBlock()\n elif key == 'errorCatcher':\n self._compiler.turnErrorCatcherOff()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1779_C16", "label": "endCallRegion()", "type": "expression", "loc": [1779, 1779], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1778_C12", "vector": [8, 8, 0.6685, 0.0004, 8, 0.96, 0.0, 789, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "endCallRegion", "arg_names": [], "import_names": [], "rhs_call_name": "endCallRegion", "annotation": ""}, "snippet": " self._compiler.endCallRegion()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1780_C12", "label": "if", "type": "if", "loc": [1780, 1783], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1778_C12", "vector": [4, 8, 0.6695, 0.0015, 8, 0.96, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif key == 'filter':\n self._compiler.closeFilterBlock()\n elif key == 'errorCatcher':\n self._compiler.turnErrorCatcherOff()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1781_C16", "label": "closeFilterBlock()", "type": "expression", "loc": [1781, 1781], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1780_C12", "vector": [8, 9, 0.6693, 0.0004, 9, 0.89, 0.0, 141, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "closeFilterBlock", "arg_names": [], "import_names": [], "rhs_call_name": "closeFilterBlock", "annotation": ""}, "snippet": " self._compiler.closeFilterBlock()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1782_C12", "label": "if", "type": "if", "loc": [1782, 1783], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1780_C12", "vector": [4, 9, 0.6699, 0.0008, 9, 0.89, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif key == 'errorCatcher':\n self._compiler.turnErrorCatcherOff()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1783_C16", "label": "turnErrorCatcherOff()", "type": "expression", "loc": [1783, 1783], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1782_C12", "vector": [8, 10, 0.67, 0.0004, 10, 0.3, 0.0, 880, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "turnErrorCatcherOff", "arg_names": [], "import_names": [], "rhs_call_name": "turnErrorCatcherOff", "annotation": ""}, "snippet": " self._compiler.turnErrorCatcherOff()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1784_C8", "label": "if", "type": "if", "loc": [1784, 1791], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1771_C8", "vector": [4, 4, 0.6717, 0.003, 4, 0.4, 1.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif directiveName in 'while for if try repeat unless'.split():\n self._compiler.commitStrConst()\n self._compiler.dedent()\n elif directiveName=='closure':\n self._compiler.commitStrConst()\n self._compiler.dedent()\n # @@TR: temporary hack of useSearchList\n self.setSetting('useSearchList', self._useSearchList_orig) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1785_C12", "label": "commitStrConst()", "type": "expression", "loc": [1785, 1785], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1784_C8", "vector": [8, 5, 0.6708, 0.0004, 5, 0.82, 0.0, 212, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "commitStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "commitStrConst", "annotation": ""}, "snippet": " self._compiler.commitStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1786_C12", "label": "dedent()", "type": "expression", "loc": [1786, 1786], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1784_C8", "vector": [8, 5, 0.6712, 0.0004, 5, 0.82, 0.5, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self._compiler.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1787_C8", "label": "if", "type": "if", "loc": [1787, 1791], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1784_C8", "vector": [4, 5, 0.6723, 0.0019, 5, 0.82, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif directiveName=='closure':\n self._compiler.commitStrConst()\n self._compiler.dedent()\n # @@TR: temporary hack of useSearchList\n self.setSetting('useSearchList', self._useSearchList_orig) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1788_C12", "label": "commitStrConst()", "type": "expression", "loc": [1788, 1788], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1787_C8", "vector": [8, 6, 0.6719, 0.0004, 6, 0.01, 0.0, 212, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "commitStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "commitStrConst", "annotation": ""}, "snippet": " self._compiler.commitStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1789_C12", "label": "dedent()", "type": "expression", "loc": [1789, 1789], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1787_C8", "vector": [8, 6, 0.6723, 0.0004, 6, 0.01, 0.5, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self._compiler.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1791_C12", "label": "setSetting()", "type": "expression", "loc": [1791, 1791], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1787_C8", "vector": [8, 6, 0.6731, 0.0004, 6, 0.01, 1.0, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self.setSetting('useSearchList', self._useSearchList_orig) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1795_C4", "label": "eatBreakPoint", "type": "function", "loc": [1795, 1801], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.6757, 0.0026, 1, 0.84, 0.4035, 395, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "eatBreakPoint", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatBreakPoint(self):\n \"\"\"Tells the parser to stop parsing at this point and completely ignore\n everything else.\n\n This is a debugging tool.\n \"\"\"\n self.setBreakPoint(self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1796_C8", "label": "expression", "type": "expression", "loc": [1796, 1800], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1795_C4", "vector": [8, 2, 0.6757, 0.0019, 2, 0.76, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Tells the parser to stop parsing at this point and completely ignore\n everything else.\n\n This is a debugging tool.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1801_C8", "label": "setBreakPoint()", "type": "expression", "loc": [1801, 1801], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1795_C4", "vector": [8, 2, 0.6768, 0.0004, 2, 0.76, 1.0, 285, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setBreakPoint", "arg_names": [], "import_names": [], "rhs_call_name": "setBreakPoint", "annotation": ""}, "snippet": " self.setBreakPoint(self.pos())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1803_C4", "label": "eatShbang", "type": "function", "loc": [1803, 1811], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.6791, 0.0034, 1, 0.84, 0.4211, 605, 0, 1, 0, 0, 0, 0, 9], "semantic": {"name": "eatShbang", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatShbang(self):\n # filtered \n self.getDirectiveStartToken()\n self.advance(len('shBang'))\n self.getWhiteSpace()\n startPos = self.pos()\n shBang = self.readToEOL()\n shBang = self._applyExpressionFilters(shBang, 'shbang', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1805_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [1805, 1805], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1803_C4", "vector": [8, 2, 0.6783, 0.0004, 2, 0.84, 0.0, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1806_C8", "label": "advance()", "type": "expression", "loc": [1806, 1806], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1803_C4", "vector": [8, 2, 0.6787, 0.0004, 2, 0.84, 0.1667, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('shBang'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1807_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [1807, 1807], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1803_C4", "vector": [8, 2, 0.6791, 0.0004, 2, 0.84, 0.3333, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1808_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [1808, 1808], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1803_C4", "vector": [14, 2, 0.6794, 0.0004, 2, 0.84, 0.5, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1809_C8", "label": "shBang = readToEOL()", "type": "assigned_variable", "loc": [1809, 1809], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1803_C4", "vector": [14, 2, 0.6798, 0.0004, 2, 0.84, 0.6667, 26, 3, 0, 0, 0, 553, 10, 1], "semantic": {"name": "shBang", "arg_names": [], "import_names": [], "rhs_call_name": "readToEOL", "annotation": ""}, "snippet": " shBang = self.readToEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1810_C8", "label": "shBang = _applyExpressionFilters()", "type": "assigned_variable", "loc": [1810, 1810], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1803_C4", "vector": [14, 2, 0.6802, 0.0004, 2, 0.84, 0.8333, 26, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "shBang", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " shBang = self._applyExpressionFilters(shBang, 'shbang', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1811_C8", "label": "setShBang()", "type": "expression", "loc": [1811, 1811], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1803_C4", "vector": [8, 2, 0.6806, 0.0004, 2, 0.84, 1.0, 182, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setShBang", "arg_names": [], "import_names": [], "rhs_call_name": "setShBang", "annotation": ""}, "snippet": " self._compiler.setShBang(shBang.strip())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1813_C4", "label": "eatEncoding", "type": "function", "loc": [1813, 1821], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.6828, 0.0034, 1, 0.84, 0.4386, 890, 0, 1, 0, 0, 0, 0, 9], "semantic": {"name": "eatEncoding", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatEncoding(self):\n # filtered \n self.getDirectiveStartToken()\n self.advance(len('encoding'))\n self.getWhiteSpace()\n startPos = self.pos()\n encoding = self.readToEOL()\n encoding = self._applyExpressionFilters(encoding, 'encoding', startPos=startPos) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1815_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [1815, 1815], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1813_C4", "vector": [8, 2, 0.6821, 0.0004, 2, 0.29, 0.0, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1816_C8", "label": "advance()", "type": "expression", "loc": [1816, 1816], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1813_C4", "vector": [8, 2, 0.6825, 0.0004, 2, 0.29, 0.1667, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('encoding'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1817_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [1817, 1817], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1813_C4", "vector": [8, 2, 0.6828, 0.0004, 2, 0.29, 0.3333, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1818_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [1818, 1818], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1813_C4", "vector": [14, 2, 0.6832, 0.0004, 2, 0.29, 0.5, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1819_C8", "label": "encoding = readToEOL()", "type": "assigned_variable", "loc": [1819, 1819], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1813_C4", "vector": [14, 2, 0.6836, 0.0004, 2, 0.29, 0.6667, 325, 3, 0, 0, 0, 553, 10, 1], "semantic": {"name": "encoding", "arg_names": [], "import_names": [], "rhs_call_name": "readToEOL", "annotation": ""}, "snippet": " encoding = self.readToEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1820_C8", "label": "encoding = _applyExpressionFilters()", "type": "assigned_variable", "loc": [1820, 1820], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1813_C4", "vector": [14, 2, 0.684, 0.0004, 2, 0.29, 0.8333, 325, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "encoding", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " encoding = self._applyExpressionFilters(encoding, 'encoding', startPos=startPos) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1821_C8", "label": "setModuleEncoding()", "type": "expression", "loc": [1821, 1821], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1813_C4", "vector": [8, 2, 0.6843, 0.0004, 2, 0.29, 1.0, 14, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setModuleEncoding", "arg_names": [], "import_names": [], "rhs_call_name": "setModuleEncoding", "annotation": ""}, "snippet": " self._compiler.setModuleEncoding(encoding.strip())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "label": "eatCompiler", "type": "function", "loc": [1823, 1865], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.693, 0.0162, 1, 0.84, 0.4561, 509, 0, 1, 0, 0, 0, 0, 28], "semantic": {"name": "eatCompiler", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatCompiler(self):\n # filtered \n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLine = self.findEOL()\n startPos = self.pos()\n self.getDirectiveStartToken()\n self.advance(len('compiler')) # to end of 'compiler'\n self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1825_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [1825, 1825], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "vector": [14, 2, 0.6858, 0.0004, 2, 0.67, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1826_C8", "label": "endOfFirstLine = findEOL()", "type": "assigned_variable", "loc": [1826, 1826], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "vector": [14, 2, 0.6862, 0.0004, 2, 0.67, 0.0667, 478, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLine", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLine = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1827_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [1827, 1827], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "vector": [14, 2, 0.6866, 0.0004, 2, 0.67, 0.1333, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1828_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [1828, 1828], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "vector": [8, 2, 0.687, 0.0004, 2, 0.67, 0.2, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1829_C8", "label": "advance()", "type": "expression", "loc": [1829, 1829], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "vector": [8, 2, 0.6873, 0.0004, 2, 0.67, 0.2667, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('compiler')) # to end of 'compiler'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1830_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [1830, 1830], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "vector": [8, 2, 0.6877, 0.0004, 2, 0.67, 0.3333, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1832_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [1832, 1832], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "vector": [14, 2, 0.6885, 0.0004, 2, 0.67, 0.4, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1833_C8", "label": "settingName = getIdentifier()", "type": "assigned_variable", "loc": [1833, 1833], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "vector": [14, 2, 0.6888, 0.0004, 2, 0.67, 0.4667, 925, 3, 0, 0, 0, 419, 10, 1], "semantic": {"name": "settingName", "arg_names": [], "import_names": [], "rhs_call_name": "getIdentifier", "annotation": ""}, "snippet": " settingName = self.getIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1835_C8", "label": "if", "type": "if", "loc": [1835, 1840], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "vector": [4, 2, 0.6905, 0.0023, 2, 0.67, 0.5333, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if settingName.lower() == 'reset':\n self.getExpression() # gobble whitespace & junk\n self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine)\n self._initializeSettings()\n self.configureParser()\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1836_C12", "label": "getExpression()", "type": "expression", "loc": [1836, 1836], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1835_C8", "vector": [8, 3, 0.69, 0.0004, 3, 0.94, 0.0, 119, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getExpression", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " self.getExpression() # gobble whitespace & junk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1837_C12", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [1837, 1837], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1835_C8", "vector": [8, 3, 0.6903, 0.0004, 3, 0.94, 0.25, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1838_C12", "label": "_initializeSettings()", "type": "expression", "loc": [1838, 1838], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1835_C8", "vector": [8, 3, 0.6907, 0.0004, 3, 0.94, 0.5, 393, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_initializeSettings", "arg_names": [], "import_names": [], "rhs_call_name": "_initializeSettings", "annotation": ""}, "snippet": " self._initializeSettings()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1839_C12", "label": "configureParser()", "type": "expression", "loc": [1839, 1839], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1835_C8", "vector": [8, 3, 0.6911, 0.0004, 3, 0.94, 0.75, 43, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "configureParser", "arg_names": [], "import_names": [], "rhs_call_name": "configureParser", "annotation": ""}, "snippet": " self.configureParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1840_C12", "label": "return", "type": "return", "loc": [1840, 1840], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1835_C8", "vector": [13, 3, 0.6915, 0.0004, 3, 0.94, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1842_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [1842, 1842], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "vector": [8, 2, 0.6922, 0.0004, 2, 0.67, 0.6, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1843_C8", "label": "if", "type": "if", "loc": [1843, 1846], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "vector": [4, 2, 0.6932, 0.0015, 2, 0.67, 0.6667, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek() == '=':\n self.advance()\n else:\n raise ParseError(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1844_C12", "label": "advance()", "type": "expression", "loc": [1844, 1844], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1843_C8", "vector": [8, 3, 0.693, 0.0004, 3, 0.01, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1847_C8", "label": "valueExpr = getExpression()", "type": "assigned_variable", "loc": [1847, 1847], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "vector": [14, 2, 0.6941, 0.0004, 2, 0.67, 0.7333, 156, 3, 0, 0, 0, 119, 10, 1], "semantic": {"name": "valueExpr", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " valueExpr = self.getExpression()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1848_C8", "label": "endPos = pos()", "type": "assigned_variable", "loc": [1848, 1848], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "vector": [14, 2, 0.6945, 0.0004, 2, 0.67, 0.8, 406, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "endPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " endPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1853_C8", "label": "_applyExpressionFilters()", "type": "expression", "loc": [1853, 1854], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "vector": [8, 2, 0.6965, 0.0008, 2, 0.67, 0.8667, 289, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "_applyExpressionFilters", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " self._applyExpressionFilters('%s=%r'%(settingName, valueExpr),\n 'compiler', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1856_C8", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [1856, 1856], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "vector": [8, 2, 0.6975, 0.0004, 2, 0.67, 0.9333, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1857_C8", "label": "try", "type": "try", "loc": [1857, 1865], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "vector": [7, 2, 0.6994, 0.0034, 2, 0.67, 1.0, 0, 0, 1, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n self._compiler.setCompilerSetting(settingName, valueExpr)\n except:\n sys.stderr.write('An error occurred while processing the following #compiler directive.\\n')\n sys.stderr.write('----------------------------------------------------------------------\\n')\n sys.stderr.write('%s\\n' % self[startPos:endPos])\n sys.stderr.write('----------------------------------------------------------------------\\n')\n sys.stderr.write('Please check the syntax of these settings.\\n\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1858_C12", "label": "setCompilerSetting()", "type": "expression", "loc": [1858, 1858], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1857_C8", "vector": [8, 3, 0.6982, 0.0004, 3, 0.86, 0.0, 680, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setCompilerSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setCompilerSetting", "annotation": ""}, "snippet": " self._compiler.setCompilerSetting(settingName, valueExpr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1860_C12", "label": "write()", "type": "expression", "loc": [1860, 1860], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1857_C8", "vector": [8, 3, 0.699, 0.0004, 3, 0.86, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stderr.write('An error occurred while processing the following #compiler directive.\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1861_C12", "label": "write()", "type": "expression", "loc": [1861, 1861], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1857_C8", "vector": [8, 3, 0.6994, 0.0004, 3, 0.86, 0.25, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stderr.write('----------------------------------------------------------------------\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1862_C12", "label": "write()", "type": "expression", "loc": [1862, 1862], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1857_C8", "vector": [8, 3, 0.6997, 0.0004, 3, 0.86, 0.5, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stderr.write('%s\\n' % self[startPos:endPos])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1863_C12", "label": "write()", "type": "expression", "loc": [1863, 1863], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1857_C8", "vector": [8, 3, 0.7001, 0.0004, 3, 0.86, 0.75, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stderr.write('----------------------------------------------------------------------\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1864_C12", "label": "write()", "type": "expression", "loc": [1864, 1864], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1857_C8", "vector": [8, 3, 0.7005, 0.0004, 3, 0.86, 1.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stderr.write('Please check the syntax of these settings.\\n\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "label": "eatCompilerSettings", "type": "function", "loc": [1868, 1899], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.7078, 0.012, 1, 0.84, 0.4737, 196, 0, 1, 0, 0, 0, 0, 20], "semantic": {"name": "eatCompilerSettings", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatCompilerSettings(self):\n # filtered \n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLine = self.findEOL()\n self.getDirectiveStartToken()\n self.advance(len('compiler-settings')) # to end of 'settings'\n \n keywords = self.getTargetVarsList()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1870_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [1870, 1870], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "vector": [14, 2, 0.7027, 0.0004, 2, 0.31, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1871_C8", "label": "endOfFirstLine = findEOL()", "type": "assigned_variable", "loc": [1871, 1871], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "vector": [14, 2, 0.7031, 0.0004, 2, 0.31, 0.0909, 478, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLine", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLine = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1872_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [1872, 1872], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "vector": [8, 2, 0.7035, 0.0004, 2, 0.31, 0.1818, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1873_C8", "label": "advance()", "type": "expression", "loc": [1873, 1873], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "vector": [8, 2, 0.7039, 0.0004, 2, 0.31, 0.2727, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('compiler-settings')) # to end of 'settings'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1875_C8", "label": "keywords = getTargetVarsList()", "type": "assigned_variable", "loc": [1875, 1875], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "vector": [14, 2, 0.7046, 0.0004, 2, 0.31, 0.3636, 211, 3, 0, 0, 0, 132, 10, 1], "semantic": {"name": "keywords", "arg_names": [], "import_names": [], "rhs_call_name": "getTargetVarsList", "annotation": ""}, "snippet": " keywords = self.getTargetVarsList()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1876_C8", "label": "getExpression()", "type": "expression", "loc": [1876, 1876], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "vector": [8, 2, 0.705, 0.0004, 2, 0.31, 0.4545, 119, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getExpression", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " self.getExpression() # gobble any garbage"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1878_C8", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [1878, 1878], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "vector": [8, 2, 0.7057, 0.0004, 2, 0.31, 0.5455, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1880_C8", "label": "if", "type": "if", "loc": [1880, 1886], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "vector": [4, 2, 0.7076, 0.0026, 2, 0.31, 0.6364, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'reset' in keywords:\n self._compiler._initializeSettings()\n self.configureParser()\n # @@TR: this implies a single-line #compiler-settings directive, and\n # thus we should parse forward for an end directive.\n # Subject to change in the future\n return "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1881_C12", "label": "_initializeSettings()", "type": "expression", "loc": [1881, 1881], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1880_C8", "vector": [8, 3, 0.7069, 0.0004, 3, 0.08, 0.0, 393, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_initializeSettings", "arg_names": [], "import_names": [], "rhs_call_name": "_initializeSettings", "annotation": ""}, "snippet": " self._compiler._initializeSettings()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1882_C12", "label": "configureParser()", "type": "expression", "loc": [1882, 1882], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1880_C8", "vector": [8, 3, 0.7073, 0.0004, 3, 0.08, 0.5, 43, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "configureParser", "arg_names": [], "import_names": [], "rhs_call_name": "configureParser", "annotation": ""}, "snippet": " self.configureParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1886_C12", "label": "return", "type": "return", "loc": [1886, 1886], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1880_C8", "vector": [13, 3, 0.7088, 0.0004, 3, 0.08, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1887_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [1887, 1887], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "vector": [14, 2, 0.7091, 0.0004, 2, 0.31, 0.7273, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1888_C8", "label": "settingsStr = _eatToThisEndDirective()", "type": "assigned_variable", "loc": [1888, 1888], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "vector": [14, 2, 0.7095, 0.0004, 2, 0.31, 0.8182, 177, 3, 1, 0, 0, 335, 10, 1], "semantic": {"name": "settingsStr", "arg_names": [], "import_names": [], "rhs_call_name": "_eatToThisEndDirective", "annotation": ""}, "snippet": " settingsStr = self._eatToThisEndDirective('compiler-settings') "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1889_C8", "label": "settingsStr = _applyExpressionFilters()", "type": "assigned_variable", "loc": [1889, 1890], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "vector": [14, 2, 0.7101, 0.0008, 2, 0.31, 0.9091, 177, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "settingsStr", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " settingsStr = self._applyExpressionFilters(settingsStr, 'compilerSettings', \n startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1891_C8", "label": "try", "type": "try", "loc": [1891, 1899], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "vector": [7, 2, 0.7121, 0.0034, 2, 0.31, 1.0, 0, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n self._compiler.setCompilerSettings(keywords=keywords, settingsStr=settingsStr)\n except:\n sys.stderr.write('An error occurred while processing the following compiler settings.\\n')\n sys.stderr.write('----------------------------------------------------------------------\\n')\n sys.stderr.write('%s\\n' % settingsStr.strip())\n sys.stderr.write('----------------------------------------------------------------------\\n')\n sys.stderr.write('Please check the syntax of these settings.\\n\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1892_C12", "label": "setCompilerSettings()", "type": "expression", "loc": [1892, 1892], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1891_C8", "vector": [8, 3, 0.711, 0.0004, 3, 0.68, 0.0, 684, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setCompilerSettings", "arg_names": [], "import_names": [], "rhs_call_name": "setCompilerSettings", "annotation": ""}, "snippet": " self._compiler.setCompilerSettings(keywords=keywords, settingsStr=settingsStr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1894_C12", "label": "write()", "type": "expression", "loc": [1894, 1894], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1891_C8", "vector": [8, 3, 0.7118, 0.0004, 3, 0.68, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stderr.write('An error occurred while processing the following compiler settings.\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1895_C12", "label": "write()", "type": "expression", "loc": [1895, 1895], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1891_C8", "vector": [8, 3, 0.7121, 0.0004, 3, 0.68, 0.25, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stderr.write('----------------------------------------------------------------------\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1896_C12", "label": "write()", "type": "expression", "loc": [1896, 1896], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1891_C8", "vector": [8, 3, 0.7125, 0.0004, 3, 0.68, 0.5, 837, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stderr.write('%s\\n' % settingsStr.strip())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1897_C12", "label": "write()", "type": "expression", "loc": [1897, 1897], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1891_C8", "vector": [8, 3, 0.7129, 0.0004, 3, 0.68, 0.75, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stderr.write('----------------------------------------------------------------------\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1898_C12", "label": "write()", "type": "expression", "loc": [1898, 1898], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1891_C8", "vector": [8, 3, 0.7133, 0.0004, 3, 0.68, 1.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stderr.write('Please check the syntax of these settings.\\n\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "label": "eatAttr", "type": "function", "loc": [1901, 1918], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.7176, 0.0068, 1, 0.84, 0.4912, 702, 0, 1, 0, 0, 0, 0, 17], "semantic": {"name": "eatAttr", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatAttr(self):\n # filtered \n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLinePos = self.findEOL()\n startPos = self.pos()\n self.getDirectiveStartToken()\n self.advance(len('attr'))\n self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1903_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [1903, 1903], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "vector": [14, 2, 0.7151, 0.0004, 2, 0.17, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1904_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [1904, 1904], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "vector": [14, 2, 0.7155, 0.0004, 2, 0.17, 0.0714, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1905_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [1905, 1905], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "vector": [14, 2, 0.7159, 0.0004, 2, 0.17, 0.1429, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1906_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [1906, 1906], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "vector": [8, 2, 0.7163, 0.0004, 2, 0.17, 0.2143, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1907_C8", "label": "advance()", "type": "expression", "loc": [1907, 1907], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "vector": [8, 2, 0.7166, 0.0004, 2, 0.17, 0.2857, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('attr'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1908_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [1908, 1908], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "vector": [8, 2, 0.717, 0.0004, 2, 0.17, 0.3571, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1909_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [1909, 1909], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "vector": [14, 2, 0.7174, 0.0004, 2, 0.17, 0.4286, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1910_C8", "label": "if", "type": "if", "loc": [1910, 1911], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "vector": [4, 2, 0.718, 0.0008, 2, 0.17, 0.5, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchCheetahVarStart():\n self.getCheetahVarStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1911_C12", "label": "getCheetahVarStartToken()", "type": "expression", "loc": [1911, 1911], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1910_C8", "vector": [8, 3, 0.7182, 0.0004, 3, 0.76, 0.0, 711, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getCheetahVarStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getCheetahVarStartToken", "annotation": ""}, "snippet": " self.getCheetahVarStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1912_C8", "label": "attribName = getIdentifier()", "type": "assigned_variable", "loc": [1912, 1912], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "vector": [14, 2, 0.7185, 0.0004, 2, 0.17, 0.5714, 640, 3, 0, 0, 0, 419, 10, 1], "semantic": {"name": "attribName", "arg_names": [], "import_names": [], "rhs_call_name": "getIdentifier", "annotation": ""}, "snippet": " attribName = self.getIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1913_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [1913, 1913], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "vector": [8, 2, 0.7189, 0.0004, 2, 0.17, 0.6429, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1914_C8", "label": "getAssignmentOperator()", "type": "expression", "loc": [1914, 1914], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "vector": [8, 2, 0.7193, 0.0004, 2, 0.17, 0.7143, 942, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getAssignmentOperator", "arg_names": [], "import_names": [], "rhs_call_name": "getAssignmentOperator", "annotation": ""}, "snippet": " self.getAssignmentOperator()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1915_C8", "label": "expr = getExpression()", "type": "assigned_variable", "loc": [1915, 1915], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "vector": [14, 2, 0.7197, 0.0004, 2, 0.17, 0.7857, 236, 3, 0, 0, 0, 119, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " expr = self.getExpression()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1916_C8", "label": "expr = _applyExpressionFilters()", "type": "assigned_variable", "loc": [1916, 1916], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "vector": [14, 2, 0.72, 0.0004, 2, 0.17, 0.8571, 236, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " expr = self._applyExpressionFilters(expr, 'attr', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1917_C8", "label": "addAttribute()", "type": "expression", "loc": [1917, 1917], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "vector": [8, 2, 0.7204, 0.0004, 2, 0.17, 0.9286, 333, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addAttribute", "arg_names": [], "import_names": [], "rhs_call_name": "addAttribute", "annotation": ""}, "snippet": " self._compiler.addAttribute(attribName, expr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1918_C8", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [1918, 1918], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "vector": [8, 2, 0.7208, 0.0004, 2, 0.17, 1.0, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "label": "eatDecorator", "type": "function", "loc": [1920, 1937], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.7247, 0.0068, 1, 0.84, 0.5088, 361, 0, 1, 0, 0, 0, 0, 13], "semantic": {"name": "eatDecorator", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatDecorator(self):\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLinePos = self.findEOL()\n startPos = self.pos()\n self.getDirectiveStartToken()\n #self.advance() # eat @\n startPos = self.pos()\n decoratorExpr = self.getExpression()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1921_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [1921, 1921], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "vector": [14, 2, 0.7219, 0.0004, 2, 0.61, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1922_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [1922, 1922], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "vector": [14, 2, 0.7223, 0.0004, 2, 0.61, 0.0833, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1923_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [1923, 1923], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "vector": [14, 2, 0.7227, 0.0004, 2, 0.61, 0.1667, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1924_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [1924, 1924], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "vector": [8, 2, 0.723, 0.0004, 2, 0.61, 0.25, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1926_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [1926, 1926], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "vector": [14, 2, 0.7238, 0.0004, 2, 0.61, 0.3333, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1927_C8", "label": "decoratorExpr = getExpression()", "type": "assigned_variable", "loc": [1927, 1927], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "vector": [14, 2, 0.7242, 0.0004, 2, 0.61, 0.4167, 368, 3, 0, 0, 0, 119, 10, 1], "semantic": {"name": "decoratorExpr", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " decoratorExpr = self.getExpression()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1928_C8", "label": "decoratorExpr = _applyExpressionFilters()", "type": "assigned_variable", "loc": [1928, 1928], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "vector": [14, 2, 0.7245, 0.0004, 2, 0.61, 0.5, 368, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "decoratorExpr", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " decoratorExpr = self._applyExpressionFilters(decoratorExpr, 'decorator', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1929_C8", "label": "addDecorator()", "type": "expression", "loc": [1929, 1929], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "vector": [8, 2, 0.7249, 0.0004, 2, 0.61, 0.5833, 200, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addDecorator", "arg_names": [], "import_names": [], "rhs_call_name": "addDecorator", "annotation": ""}, "snippet": " self._compiler.addDecorator(decoratorExpr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1930_C8", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [1930, 1930], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "vector": [8, 2, 0.7253, 0.0004, 2, 0.61, 0.6667, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1931_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [1931, 1931], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "vector": [8, 2, 0.7257, 0.0004, 2, 0.61, 0.75, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1933_C8", "label": "directiveName = matchDirective()", "type": "assigned_variable", "loc": [1933, 1933], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "vector": [14, 2, 0.7264, 0.0004, 2, 0.61, 0.8333, 508, 3, 0, 0, 0, 893, 10, 1], "semantic": {"name": "directiveName", "arg_names": [], "import_names": [], "rhs_call_name": "matchDirective", "annotation": ""}, "snippet": " directiveName = self.matchDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1934_C8", "label": "if", "type": "if", "loc": [1934, 1936], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "vector": [4, 2, 0.7272, 0.0011, 2, 0.61, 0.9167, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not directiveName or directiveName not in ('def', 'block', 'closure', '@'):\n raise ParseError(\n self, msg='Expected #def, #block, #closure or another @decorator')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1937_C8", "label": "eatDirective()", "type": "expression", "loc": [1937, 1937], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "vector": [8, 2, 0.7279, 0.0004, 2, 0.61, 1.0, 873, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "eatDirective", "arg_names": [], "import_names": [], "rhs_call_name": "eatDirective", "annotation": ""}, "snippet": " self.eatDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1939_C4", "label": "eatDef", "type": "function", "loc": [1939, 1941], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.729, 0.0011, 1, 0.84, 0.5263, 433, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "eatDef", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatDef(self):\n # filtered \n self._eatDefOrBlock('def')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1941_C8", "label": "_eatDefOrBlock()", "type": "expression", "loc": [1941, 1941], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1939_C4", "vector": [8, 2, 0.7294, 0.0004, 2, 0.01, 0.0, 79, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_eatDefOrBlock", "arg_names": [], "import_names": [], "rhs_call_name": "_eatDefOrBlock", "annotation": ""}, "snippet": " self._eatDefOrBlock('def')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1943_C4", "label": "eatBlock", "type": "function", "loc": [1943, 1950], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.7315, 0.003, 1, 0.84, 0.5439, 60, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "eatBlock", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatBlock(self):\n # filtered\n startPos = self.pos()\n methodName, rawSignature = self._eatDefOrBlock('block')\n self._compiler._blockMetaData[methodName] = {\n 'raw': rawSignature,\n 'lineCol': self.getRowCol(startPos),\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1945_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [1945, 1945], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1943_C4", "vector": [14, 2, 0.7309, 0.0004, 2, 0.82, 0.0, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1946_C8", "label": "methodName, rawSignature = _eatDefOrBlock()", "type": "assigned_variable", "loc": [1946, 1946], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1943_C4", "vector": [14, 2, 0.7313, 0.0004, 2, 0.82, 0.5, 531, 3, 1, 0, 0, 79, 10, 1], "semantic": {"name": "methodName, rawSignature", "arg_names": [], "import_names": [], "rhs_call_name": "_eatDefOrBlock", "annotation": ""}, "snippet": " methodName, rawSignature = self._eatDefOrBlock('block')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1947_C8", "label": "assign", "type": "assigned_variable", "loc": [1947, 1950], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1943_C4", "vector": [14, 2, 0.7322, 0.0015, 2, 0.82, 1.0, 0, 0, 0, 0, 0, 0, 6, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._compiler._blockMetaData[methodName] = {\n 'raw': rawSignature,\n 'lineCol': self.getRowCol(startPos),\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1952_C4", "label": "eatClosure", "type": "function", "loc": [1952, 1954], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.7339, 0.0011, 1, 0.84, 0.5614, 205, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "eatClosure", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatClosure(self):\n # filtered \n self._eatDefOrBlock('closure')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1954_C8", "label": "_eatDefOrBlock()", "type": "expression", "loc": [1954, 1954], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1952_C4", "vector": [8, 2, 0.7343, 0.0004, 2, 0.91, 0.0, 79, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_eatDefOrBlock", "arg_names": [], "import_names": [], "rhs_call_name": "_eatDefOrBlock", "annotation": ""}, "snippet": " self._eatDefOrBlock('closure')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "label": "_eatDefOrBlock", "type": "function", "loc": [1956, 2018], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.7467, 0.0237, 1, 0.84, 0.5789, 79, 0, 2, 1, 0, 0, 0, 34], "semantic": {"name": "_eatDefOrBlock", "arg_names": ["self", "directiveName"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _eatDefOrBlock(self, directiveName):\n # filtered \n assert directiveName in ('def', 'block', 'closure')\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLinePos = self.findEOL()\n startPos = self.pos()\n self.getDirectiveStartToken()\n self.advance(len(directiveName))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1959_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [1959, 1959], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "vector": [14, 2, 0.7362, 0.0004, 2, 0.29, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1960_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [1960, 1960], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "vector": [14, 2, 0.7366, 0.0004, 2, 0.29, 0.0769, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1961_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [1961, 1961], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "vector": [14, 2, 0.7369, 0.0004, 2, 0.29, 0.1538, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1962_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [1962, 1962], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "vector": [8, 2, 0.7373, 0.0004, 2, 0.29, 0.2308, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1963_C8", "label": "advance()", "type": "expression", "loc": [1963, 1963], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "vector": [8, 2, 0.7377, 0.0004, 2, 0.29, 0.3077, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len(directiveName))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1964_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [1964, 1964], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "vector": [8, 2, 0.7381, 0.0004, 2, 0.29, 0.3846, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1965_C8", "label": "if", "type": "if", "loc": [1965, 1966], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "vector": [4, 2, 0.7386, 0.0008, 2, 0.29, 0.4615, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchCheetahVarStart():\n self.getCheetahVarStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1966_C12", "label": "getCheetahVarStartToken()", "type": "expression", "loc": [1966, 1966], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1965_C8", "vector": [8, 3, 0.7388, 0.0004, 3, 0.09, 0.0, 711, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getCheetahVarStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getCheetahVarStartToken", "annotation": ""}, "snippet": " self.getCheetahVarStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1967_C8", "label": "methodName = getIdentifier()", "type": "assigned_variable", "loc": [1967, 1967], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "vector": [14, 2, 0.7392, 0.0004, 2, 0.29, 0.5385, 681, 3, 0, 0, 0, 419, 10, 1], "semantic": {"name": "methodName", "arg_names": [], "import_names": [], "rhs_call_name": "getIdentifier", "annotation": ""}, "snippet": " methodName = self.getIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1968_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [1968, 1968], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "vector": [8, 2, 0.7396, 0.0004, 2, 0.29, 0.6154, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1969_C8", "label": "if", "type": "if", "loc": [1969, 1975], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "vector": [4, 2, 0.7411, 0.0026, 2, 0.29, 0.6923, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek() == '(':\n argsList = self.getDefArgList()\n self.advance() # past the closing ')'\n if argsList and argsList[0][0] == 'self':\n del argsList[0]\n else:\n argsList=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1970_C12", "label": "argsList = getDefArgList()", "type": "assigned_variable", "loc": [1970, 1970], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1969_C8", "vector": [14, 3, 0.7403, 0.0004, 3, 0.18, 0.0, 5, 3, 0, 0, 0, 197, 10, 1], "semantic": {"name": "argsList", "arg_names": [], "import_names": [], "rhs_call_name": "getDefArgList", "annotation": ""}, "snippet": " argsList = self.getDefArgList()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1971_C12", "label": "advance()", "type": "expression", "loc": [1971, 1971], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1969_C8", "vector": [8, 3, 0.7407, 0.0004, 3, 0.18, 0.3333, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance() # past the closing ')'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1972_C12", "label": "if", "type": "if", "loc": [1972, 1973], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1969_C8", "vector": [4, 3, 0.7413, 0.0008, 3, 0.18, 0.6667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if argsList and argsList[0][0] == 'self':\n del argsList[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1975_C12", "label": "argsList =", "type": "assigned_variable", "loc": [1975, 1975], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1969_C8", "vector": [14, 3, 0.7422, 0.0004, 3, 0.18, 1.0, 5, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "argsList", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " argsList=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1977_C8", "label": "includeBlockMarkers", "type": "function", "loc": [1977, 1980], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "vector": [2, 2, 0.7435, 0.0015, 2, 0.29, 0.7692, 324, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "includeBlockMarkers", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def includeBlockMarkers():\n if self.setting('includeBlockMarkers'):\n startMarker = self.setting('blockMarkerStart')\n self._compiler.addStrConst(startMarker[0] + methodName + startMarker[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1978_C12", "label": "if", "type": "if", "loc": [1978, 1980], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1977_C8", "vector": [4, 3, 0.7437, 0.0011, 3, 0.34, 0.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('includeBlockMarkers'):\n startMarker = self.setting('blockMarkerStart')\n self._compiler.addStrConst(startMarker[0] + methodName + startMarker[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1979_C16", "label": "startMarker = setting()", "type": "assigned_variable", "loc": [1979, 1979], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1978_C12", "vector": [14, 4, 0.7437, 0.0004, 4, 0.6, 0.0, 206, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "startMarker", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " startMarker = self.setting('blockMarkerStart')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1980_C16", "label": "addStrConst()", "type": "expression", "loc": [1980, 1980], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1978_C12", "vector": [8, 4, 0.7441, 0.0004, 4, 0.6, 1.0, 170, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "addStrConst", "annotation": ""}, "snippet": " self._compiler.addStrConst(startMarker[0] + methodName + startMarker[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1983_C8", "label": "_applyExpressionFilters()", "type": "expression", "loc": [1983, 1983], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "vector": [8, 2, 0.7452, 0.0004, 2, 0.29, 0.8462, 289, 3, 3, 0, 0, 0, 0, 2], "semantic": {"name": "_applyExpressionFilters", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " self._applyExpressionFilters(self[startPos:self.pos()], 'def', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "label": "if", "type": "if", "loc": [1985, 2016], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "vector": [4, 2, 0.7518, 0.012, 2, 0.29, 0.9231, 0, 3, 0, 0, 0, 0, 0, 15], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchColonForSingleLineShortFormDirective():\n isNestedDef = (self.setting('allowNestedDefScopes')\n and [name for name in self._openDirectivesStack if name=='def'])\n self.getc()\n rawSignature = self[startPos:endOfFirstLinePos]\n self._eatSingleLineDef(directiveName=directiveName,\n methodName=methodName,\n argsList=argsList,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1986_C12", "label": "isNestedDef =", "type": "assigned_variable", "loc": [1986, 1987], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "vector": [14, 3, 0.7465, 0.0008, 3, 0.48, 0.0, 611, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "isNestedDef", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isNestedDef = (self.setting('allowNestedDefScopes')\n and [name for name in self._openDirectivesStack if name=='def'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1988_C12", "label": "getc()", "type": "expression", "loc": [1988, 1988], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "vector": [8, 3, 0.7471, 0.0004, 3, 0.48, 0.1, 827, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getc", "arg_names": [], "import_names": [], "rhs_call_name": "getc", "annotation": ""}, "snippet": " self.getc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1989_C12", "label": "rawSignature =", "type": "assigned_variable", "loc": [1989, 1989], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "vector": [14, 3, 0.7475, 0.0004, 3, 0.48, 0.2, 226, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "rawSignature", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rawSignature = self[startPos:endOfFirstLinePos]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1990_C12", "label": "_eatSingleLineDef()", "type": "expression", "loc": [1990, 1994], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "vector": [8, 3, 0.7486, 0.0019, 3, 0.48, 0.3, 974, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "_eatSingleLineDef", "arg_names": [], "import_names": [], "rhs_call_name": "_eatSingleLineDef", "annotation": ""}, "snippet": " self._eatSingleLineDef(directiveName=directiveName,\n methodName=methodName,\n argsList=argsList,\n startPos=startPos,\n endPos=endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1995_C12", "label": "if", "type": "if", "loc": [1995, 2002], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "vector": [4, 3, 0.751, 0.003, 3, 0.48, 0.4, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if directiveName == 'def' and not isNestedDef:\n #@@TR: must come before _eatRestOfDirectiveTag ... for some reason\n self._compiler.closeDef()\n elif directiveName == 'block':\n includeBlockMarkers()\n self._compiler.closeBlock()\n elif directiveName == 'closure' or isNestedDef:\n self._compiler.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1997_C16", "label": "closeDef()", "type": "expression", "loc": [1997, 1997], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1995_C12", "vector": [8, 4, 0.7505, 0.0004, 4, 0.65, 0.0, 276, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "closeDef", "arg_names": [], "import_names": [], "rhs_call_name": "closeDef", "annotation": ""}, "snippet": " self._compiler.closeDef()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1998_C12", "label": "if", "type": "if", "loc": [1998, 2002], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1995_C12", "vector": [4, 4, 0.7516, 0.0019, 4, 0.65, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif directiveName == 'block':\n includeBlockMarkers()\n self._compiler.closeBlock()\n elif directiveName == 'closure' or isNestedDef:\n self._compiler.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1999_C16", "label": "includeBlockMarkers()", "type": "expression", "loc": [1999, 1999], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1998_C12", "vector": [8, 5, 0.7512, 0.0004, 5, 0.8, 0.0, 324, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "includeBlockMarkers", "arg_names": [], "import_names": [], "rhs_call_name": "includeBlockMarkers", "annotation": ""}, "snippet": " includeBlockMarkers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2000_C16", "label": "closeBlock()", "type": "expression", "loc": [2000, 2000], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1998_C12", "vector": [8, 5, 0.7516, 0.0004, 5, 0.8, 0.5, 27, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "closeBlock", "arg_names": [], "import_names": [], "rhs_call_name": "closeBlock", "annotation": ""}, "snippet": " self._compiler.closeBlock()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2001_C12", "label": "if", "type": "if", "loc": [2001, 2002], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1998_C12", "vector": [4, 5, 0.7522, 0.0008, 5, 0.8, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif directiveName == 'closure' or isNestedDef:\n self._compiler.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2002_C16", "label": "dedent()", "type": "expression", "loc": [2002, 2002], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2001_C12", "vector": [8, 6, 0.7523, 0.0004, 6, 0.09, 0.0, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self._compiler.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2004_C12", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2004, 2004], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "vector": [8, 3, 0.7531, 0.0004, 3, 0.48, 0.5, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2006_C12", "label": "if", "type": "if", "loc": [2006, 2007], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "vector": [4, 3, 0.754, 0.0008, 3, 0.48, 0.6, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek()==':':\n self.getc() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2007_C16", "label": "getc()", "type": "expression", "loc": [2007, 2007], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2006_C12", "vector": [8, 4, 0.7542, 0.0004, 4, 0.92, 0.0, 827, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getc", "arg_names": [], "import_names": [], "rhs_call_name": "getc", "annotation": ""}, "snippet": " self.getc() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2008_C12", "label": "pushToOpenDirectivesStack()", "type": "expression", "loc": [2008, 2008], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "vector": [8, 3, 0.7546, 0.0004, 3, 0.48, 0.7, 853, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "pushToOpenDirectivesStack", "arg_names": [], "import_names": [], "rhs_call_name": "pushToOpenDirectivesStack", "annotation": ""}, "snippet": " self.pushToOpenDirectivesStack(directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2009_C12", "label": "rawSignature =", "type": "assigned_variable", "loc": [2009, 2009], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "vector": [14, 3, 0.755, 0.0004, 3, 0.48, 0.8, 226, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "rawSignature", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rawSignature = self[startPos:self.pos()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2010_C12", "label": "_eatMultiLineDef()", "type": "expression", "loc": [2010, 2014], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "vector": [8, 3, 0.7561, 0.0019, 3, 0.48, 0.9, 858, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "_eatMultiLineDef", "arg_names": [], "import_names": [], "rhs_call_name": "_eatMultiLineDef", "annotation": ""}, "snippet": " self._eatMultiLineDef(directiveName=directiveName,\n methodName=methodName,\n argsList=argsList,\n startPos=startPos,\n isLineClearToStartToken=isLineClearToStartToken)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2015_C12", "label": "if", "type": "if", "loc": [2015, 2016], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "vector": [4, 3, 0.7574, 0.0008, 3, 0.48, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if directiveName == 'block':\n includeBlockMarkers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2016_C16", "label": "includeBlockMarkers()", "type": "expression", "loc": [2016, 2016], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2015_C12", "vector": [8, 4, 0.7576, 0.0004, 4, 0.43, 0.0, 324, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "includeBlockMarkers", "arg_names": [], "import_names": [], "rhs_call_name": "includeBlockMarkers", "annotation": ""}, "snippet": " includeBlockMarkers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L2018_C8", "label": "return", "type": "return", "loc": [2018, 2018], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "vector": [13, 2, 0.7584, 0.0004, 2, 0.29, 1.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return methodName, rawSignature"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "label": "_eatMultiLineDef", "type": "function", "loc": [2020, 2041], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.7631, 0.0083, 1, 0.84, 0.5965, 858, 0, 6, 1, 0, 0, 0, 14], "semantic": {"name": "_eatMultiLineDef", "arg_names": ["self", "directiveName", "methodName", "argsList", "startPos", "isLineClearToStartToken"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _eatMultiLineDef(self, directiveName, methodName, argsList, startPos,\n isLineClearToStartToken=False):\n # filtered in calling method\n self.getExpression() # slurp up any garbage left at the end\n signature = self[startPos:self.pos()]\n endOfFirstLinePos = self.findEOL()\n self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)\n signature = ' '.join([line.strip() for line in signature.splitlines()]) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2023_C8", "label": "getExpression()", "type": "expression", "loc": [2023, 2023], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "vector": [8, 2, 0.7602, 0.0004, 2, 0.46, 0.0, 119, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getExpression", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " self.getExpression() # slurp up any garbage left at the end"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2024_C8", "label": "signature =", "type": "assigned_variable", "loc": [2024, 2024], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "vector": [14, 2, 0.7606, 0.0004, 2, 0.46, 0.125, 932, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "signature", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " signature = self[startPos:self.pos()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2025_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [2025, 2025], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "vector": [14, 2, 0.761, 0.0004, 2, 0.46, 0.25, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2026_C8", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2026, 2026], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "vector": [8, 2, 0.7614, 0.0004, 2, 0.46, 0.375, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2027_C8", "label": "signature = join()", "type": "assigned_variable", "loc": [2027, 2027], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "vector": [14, 2, 0.7617, 0.0004, 2, 0.46, 0.5, 932, 3, 1, 0, 0, 933, 10, 3], "semantic": {"name": "signature", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " signature = ' '.join([line.strip() for line in signature.splitlines()]) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2028_C8", "label": "parserComment =", "type": "assigned_variable", "loc": [2028, 2030], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "vector": [14, 2, 0.7625, 0.0011, 2, 0.46, 0.625, 181, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "parserComment", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parserComment = ('## CHEETAH: generated from ' + signature + \n ' at line %s, col %s' % self.getRowCol(startPos)\n + '.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2032_C8", "label": "isNestedDef =", "type": "assigned_variable", "loc": [2032, 2033], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "vector": [14, 2, 0.7638, 0.0008, 2, 0.46, 0.75, 611, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "isNestedDef", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isNestedDef = (self.setting('allowNestedDefScopes')\n and len([name for name in self._openDirectivesStack if name=='def'])>1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2034_C8", "label": "if", "type": "if", "loc": [2034, 2039], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "vector": [4, 2, 0.7653, 0.0023, 2, 0.46, 0.875, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if directiveName=='block' or (directiveName=='def' and not isNestedDef):\n self._compiler.startMethodDef(methodName, argsList, parserComment)\n else: #closure\n self._useSearchList_orig = self.setting('useSearchList')\n self.setSetting('useSearchList', False)\n self._compiler.addClosure(methodName, argsList, parserComment)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2035_C12", "label": "startMethodDef()", "type": "expression", "loc": [2035, 2035], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2034_C8", "vector": [8, 3, 0.7648, 0.0004, 3, 0.58, 0.0, 456, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "startMethodDef", "arg_names": [], "import_names": [], "rhs_call_name": "startMethodDef", "annotation": ""}, "snippet": " self._compiler.startMethodDef(methodName, argsList, parserComment)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2037_C12", "label": "self._useSearchList_orig = setting()", "type": "assigned_variable", "loc": [2037, 2037], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2034_C8", "vector": [14, 3, 0.7655, 0.0004, 3, 0.58, 0.3333, 196, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "self._useSearchList_orig", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " self._useSearchList_orig = self.setting('useSearchList')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2038_C12", "label": "setSetting()", "type": "expression", "loc": [2038, 2038], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2034_C8", "vector": [8, 3, 0.7659, 0.0004, 3, 0.58, 0.6667, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self.setSetting('useSearchList', False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2039_C12", "label": "addClosure()", "type": "expression", "loc": [2039, 2039], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2034_C8", "vector": [8, 3, 0.7663, 0.0004, 3, 0.58, 1.0, 683, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addClosure", "arg_names": [], "import_names": [], "rhs_call_name": "addClosure", "annotation": ""}, "snippet": " self._compiler.addClosure(methodName, argsList, parserComment)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L2041_C8", "label": "return", "type": "return", "loc": [2041, 2041], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "vector": [13, 2, 0.767, 0.0004, 2, 0.46, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return methodName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2043_C4", "label": "_eatSingleLineDef", "type": "function", "loc": [2043, 2062], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.7713, 0.0075, 1, 0.84, 0.614, 974, 0, 6, 0, 0, 0, 0, 9], "semantic": {"name": "_eatSingleLineDef", "arg_names": ["self", "directiveName", "methodName", "argsList", "startPos", "endPos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _eatSingleLineDef(self, directiveName, methodName, argsList, startPos, endPos):\n # filtered in calling method \n fullSignature = self[startPos:endPos]\n parserComment = ('## Generated from ' + fullSignature + \n ' at line %s, col %s' % self.getRowCol(startPos)\n + '.')\n isNestedDef = (self.setting('allowNestedDefScopes')\n and [name for name in self._openDirectivesStack if name=='def'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2045_C8", "label": "fullSignature =", "type": "assigned_variable", "loc": [2045, 2045], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2043_C4", "vector": [14, 2, 0.7685, 0.0004, 2, 0.55, 0.0, 382, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "fullSignature", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " fullSignature = self[startPos:endPos]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2046_C8", "label": "parserComment =", "type": "assigned_variable", "loc": [2046, 2048], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2043_C4", "vector": [14, 2, 0.7693, 0.0011, 2, 0.55, 0.1667, 181, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "parserComment", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parserComment = ('## Generated from ' + fullSignature + \n ' at line %s, col %s' % self.getRowCol(startPos)\n + '.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2049_C8", "label": "isNestedDef =", "type": "assigned_variable", "loc": [2049, 2050], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2043_C4", "vector": [14, 2, 0.7702, 0.0008, 2, 0.55, 0.3333, 611, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "isNestedDef", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isNestedDef = (self.setting('allowNestedDefScopes')\n and [name for name in self._openDirectivesStack if name=='def'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2051_C8", "label": "if", "type": "if", "loc": [2051, 2057], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2043_C4", "vector": [4, 2, 0.7719, 0.0026, 2, 0.55, 0.5, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if directiveName=='block' or (directiveName=='def' and not isNestedDef):\n self._compiler.startMethodDef(methodName, argsList, parserComment)\n else: #closure\n # @@TR: temporary hack of useSearchList\n useSearchList_orig = self.setting('useSearchList')\n self.setSetting('useSearchList', False) \n self._compiler.addClosure(methodName, argsList, parserComment) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2052_C12", "label": "startMethodDef()", "type": "expression", "loc": [2052, 2052], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2051_C8", "vector": [8, 3, 0.7711, 0.0004, 3, 0.79, 0.0, 456, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "startMethodDef", "arg_names": [], "import_names": [], "rhs_call_name": "startMethodDef", "annotation": ""}, "snippet": " self._compiler.startMethodDef(methodName, argsList, parserComment)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2055_C12", "label": "useSearchList_orig = setting()", "type": "assigned_variable", "loc": [2055, 2055], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2051_C8", "vector": [14, 3, 0.7723, 0.0004, 3, 0.79, 0.3333, 834, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "useSearchList_orig", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " useSearchList_orig = self.setting('useSearchList')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2056_C12", "label": "setSetting()", "type": "expression", "loc": [2056, 2056], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2051_C8", "vector": [8, 3, 0.7726, 0.0004, 3, 0.79, 0.6667, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self.setSetting('useSearchList', False) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2057_C12", "label": "addClosure()", "type": "expression", "loc": [2057, 2057], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2051_C8", "vector": [8, 3, 0.773, 0.0004, 3, 0.79, 1.0, 683, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addClosure", "arg_names": [], "import_names": [], "rhs_call_name": "addClosure", "annotation": ""}, "snippet": " self._compiler.addClosure(methodName, argsList, parserComment) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2059_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2059, 2059], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2043_C4", "vector": [8, 2, 0.7738, 0.0004, 2, 0.55, 0.6667, 84, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace(max=1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2060_C8", "label": "parse()", "type": "expression", "loc": [2060, 2060], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2043_C4", "vector": [8, 2, 0.7741, 0.0004, 2, 0.55, 0.8333, 678, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "parse", "arg_names": [], "import_names": [], "rhs_call_name": "parse", "annotation": ""}, "snippet": " self.parse(breakPoint=endPos) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2061_C8", "label": "if", "type": "if", "loc": [2061, 2062], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2043_C4", "vector": [4, 2, 0.7747, 0.0008, 2, 0.55, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if directiveName=='closure' or isNestedDef: # @@TR: temporary hack of useSearchList\n self.setSetting('useSearchList', useSearchList_orig)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2062_C12", "label": "setSetting()", "type": "expression", "loc": [2062, 2062], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2061_C8", "vector": [8, 3, 0.7749, 0.0004, 3, 0.91, 0.0, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self.setSetting('useSearchList', useSearchList_orig)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "label": "eatExtends", "type": "function", "loc": [2064, 2080], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.7787, 0.0064, 1, 0.84, 0.6316, 402, 0, 1, 0, 0, 0, 0, 14], "semantic": {"name": "eatExtends", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatExtends(self):\n # filtered\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLine = self.findEOL()\n self.getDirectiveStartToken()\n self.advance(len('extends'))\n self.getWhiteSpace()\n startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2066_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [2066, 2066], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "vector": [14, 2, 0.7764, 0.0004, 2, 0.1, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2067_C8", "label": "endOfFirstLine = findEOL()", "type": "assigned_variable", "loc": [2067, 2067], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "vector": [14, 2, 0.7768, 0.0004, 2, 0.1, 0.1111, 478, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLine", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLine = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2068_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [2068, 2068], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "vector": [8, 2, 0.7772, 0.0004, 2, 0.1, 0.2222, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2069_C8", "label": "advance()", "type": "expression", "loc": [2069, 2069], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "vector": [8, 2, 0.7775, 0.0004, 2, 0.1, 0.3333, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('extends'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2070_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2070, 2070], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "vector": [8, 2, 0.7779, 0.0004, 2, 0.1, 0.4444, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2071_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [2071, 2071], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "vector": [14, 2, 0.7783, 0.0004, 2, 0.1, 0.5556, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2072_C8", "label": "if", "type": "if", "loc": [2072, 2076], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "vector": [4, 2, 0.7794, 0.0019, 2, 0.1, 0.6667, 0, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.setting('allowExpressionsInExtendsDirective'):\n baseName = self.getExpression()\n else:\n baseName = self.getCommaSeparatedSymbols()\n baseName = ', '.join(baseName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2073_C12", "label": "baseName = getExpression()", "type": "assigned_variable", "loc": [2073, 2073], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2072_C8", "vector": [14, 3, 0.779, 0.0004, 3, 0.06, 0.0, 345, 3, 0, 0, 0, 119, 10, 1], "semantic": {"name": "baseName", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " baseName = self.getExpression()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2075_C12", "label": "baseName = getCommaSeparatedSymbols()", "type": "assigned_variable", "loc": [2075, 2075], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2072_C8", "vector": [14, 3, 0.7798, 0.0004, 3, 0.06, 0.5, 345, 3, 0, 0, 0, 564, 10, 1], "semantic": {"name": "baseName", "arg_names": [], "import_names": [], "rhs_call_name": "getCommaSeparatedSymbols", "annotation": ""}, "snippet": " baseName = self.getCommaSeparatedSymbols()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2076_C12", "label": "baseName = join()", "type": "assigned_variable", "loc": [2076, 2076], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2072_C8", "vector": [14, 3, 0.7802, 0.0004, 3, 0.06, 1.0, 345, 3, 1, 0, 0, 933, 10, 1], "semantic": {"name": "baseName", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " baseName = ', '.join(baseName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2078_C8", "label": "baseName = _applyExpressionFilters()", "type": "assigned_variable", "loc": [2078, 2078], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "vector": [14, 2, 0.7809, 0.0004, 2, 0.1, 0.7778, 345, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "baseName", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " baseName = self._applyExpressionFilters(baseName, 'extends', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2079_C8", "label": "setBaseClass()", "type": "expression", "loc": [2079, 2079], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "vector": [8, 2, 0.7813, 0.0004, 2, 0.1, 0.8889, 143, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setBaseClass", "arg_names": [], "import_names": [], "rhs_call_name": "setBaseClass", "annotation": ""}, "snippet": " self._compiler.setBaseClass(baseName) # in compiler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2080_C8", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2080, 2080], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "vector": [8, 2, 0.7817, 0.0004, 2, 0.1, 1.0, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "label": "eatImplements", "type": "function", "loc": [2082, 2107], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.7871, 0.0098, 1, 0.84, 0.6491, 107, 0, 1, 0, 0, 0, 0, 18], "semantic": {"name": "eatImplements", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatImplements(self):\n # filtered\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLine = self.findEOL()\n self.getDirectiveStartToken()\n self.advance(len('implements'))\n self.getWhiteSpace() \n startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2084_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [2084, 2084], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "vector": [14, 2, 0.7832, 0.0004, 2, 0.45, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2085_C8", "label": "endOfFirstLine = findEOL()", "type": "assigned_variable", "loc": [2085, 2085], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "vector": [14, 2, 0.7835, 0.0004, 2, 0.45, 0.0833, 478, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLine", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLine = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2086_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [2086, 2086], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "vector": [8, 2, 0.7839, 0.0004, 2, 0.45, 0.1667, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2087_C8", "label": "advance()", "type": "expression", "loc": [2087, 2087], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "vector": [8, 2, 0.7843, 0.0004, 2, 0.45, 0.25, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('implements'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2088_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2088, 2088], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "vector": [8, 2, 0.7847, 0.0004, 2, 0.45, 0.3333, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2089_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [2089, 2089], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "vector": [14, 2, 0.785, 0.0004, 2, 0.45, 0.4167, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2090_C8", "label": "methodName = getIdentifier()", "type": "assigned_variable", "loc": [2090, 2090], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "vector": [14, 2, 0.7854, 0.0004, 2, 0.45, 0.5, 681, 3, 0, 0, 0, 419, 10, 1], "semantic": {"name": "methodName", "arg_names": [], "import_names": [], "rhs_call_name": "getIdentifier", "annotation": ""}, "snippet": " methodName = self.getIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2091_C8", "label": "if", "type": "if", "loc": [2091, 2097], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "vector": [4, 2, 0.7869, 0.0026, 2, 0.45, 0.5833, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.atEnd() and self.peek() == '(':\n argsList = self.getDefArgList()\n self.advance() # past the closing ')'\n if argsList and argsList[0][0] == 'self':\n del argsList[0]\n else:\n argsList=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2092_C12", "label": "argsList = getDefArgList()", "type": "assigned_variable", "loc": [2092, 2092], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2091_C8", "vector": [14, 3, 0.7862, 0.0004, 3, 0.02, 0.0, 5, 3, 0, 0, 0, 197, 10, 1], "semantic": {"name": "argsList", "arg_names": [], "import_names": [], "rhs_call_name": "getDefArgList", "annotation": ""}, "snippet": " argsList = self.getDefArgList()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2093_C12", "label": "advance()", "type": "expression", "loc": [2093, 2093], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2091_C8", "vector": [8, 3, 0.7865, 0.0004, 3, 0.02, 0.3333, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance() # past the closing ')'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2094_C12", "label": "if", "type": "if", "loc": [2094, 2095], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2091_C8", "vector": [4, 3, 0.7871, 0.0008, 3, 0.02, 0.6667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if argsList and argsList[0][0] == 'self':\n del argsList[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2097_C12", "label": "argsList =", "type": "assigned_variable", "loc": [2097, 2097], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2091_C8", "vector": [14, 3, 0.788, 0.0004, 3, 0.02, 1.0, 5, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "argsList", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " argsList=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2101_C8", "label": "_applyExpressionFilters()", "type": "expression", "loc": [2101, 2101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "vector": [8, 2, 0.7896, 0.0004, 2, 0.45, 0.6667, 289, 3, 3, 0, 0, 0, 0, 2], "semantic": {"name": "_applyExpressionFilters", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " self._applyExpressionFilters(self[startPos:self.pos()], 'implements', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2103_C8", "label": "setMainMethodName()", "type": "expression", "loc": [2103, 2103], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "vector": [8, 2, 0.7903, 0.0004, 2, 0.45, 0.75, 62, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setMainMethodName", "arg_names": [], "import_names": [], "rhs_call_name": "setMainMethodName", "annotation": ""}, "snippet": " self._compiler.setMainMethodName(methodName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2104_C8", "label": "setMainMethodArgs()", "type": "expression", "loc": [2104, 2104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "vector": [8, 2, 0.7907, 0.0004, 2, 0.45, 0.8333, 889, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setMainMethodArgs", "arg_names": [], "import_names": [], "rhs_call_name": "setMainMethodArgs", "annotation": ""}, "snippet": " self._compiler.setMainMethodArgs(argsList)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2106_C8", "label": "getExpression()", "type": "expression", "loc": [2106, 2106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "vector": [8, 2, 0.7914, 0.0004, 2, 0.45, 0.9167, 119, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getExpression", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " self.getExpression() # throw away and unwanted crap that got added in"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2107_C8", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2107, 2107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "vector": [8, 2, 0.7918, 0.0004, 2, 0.45, 1.0, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "label": "eatSuper", "type": "function", "loc": [2109, 2133], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.7971, 0.0094, 1, 0.84, 0.6667, 92, 0, 1, 0, 0, 0, 0, 16], "semantic": {"name": "eatSuper", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatSuper(self):\n # filtered\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLine = self.findEOL()\n self.getDirectiveStartToken()\n self.advance(len('super'))\n self.getWhiteSpace()\n startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2111_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [2111, 2111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "vector": [14, 2, 0.7933, 0.0004, 2, 0.91, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2112_C8", "label": "endOfFirstLine = findEOL()", "type": "assigned_variable", "loc": [2112, 2112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "vector": [14, 2, 0.7937, 0.0004, 2, 0.91, 0.1, 478, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLine", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLine = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2113_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [2113, 2113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "vector": [8, 2, 0.7941, 0.0004, 2, 0.91, 0.2, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2114_C8", "label": "advance()", "type": "expression", "loc": [2114, 2114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "vector": [8, 2, 0.7944, 0.0004, 2, 0.91, 0.3, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('super'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2115_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2115, 2115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "vector": [8, 2, 0.7948, 0.0004, 2, 0.91, 0.4, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2116_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [2116, 2116], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "vector": [14, 2, 0.7952, 0.0004, 2, 0.91, 0.5, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2117_C8", "label": "if", "type": "if", "loc": [2117, 2123], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "vector": [4, 2, 0.7967, 0.0026, 2, 0.91, 0.6, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.atEnd() and self.peek() == '(':\n argsList = self.getDefArgList()\n self.advance() # past the closing ')'\n if argsList and argsList[0][0] == 'self':\n del argsList[0]\n else:\n argsList=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2118_C12", "label": "argsList = getDefArgList()", "type": "assigned_variable", "loc": [2118, 2118], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2117_C8", "vector": [14, 3, 0.7959, 0.0004, 3, 0.07, 0.0, 5, 3, 0, 0, 0, 197, 10, 1], "semantic": {"name": "argsList", "arg_names": [], "import_names": [], "rhs_call_name": "getDefArgList", "annotation": ""}, "snippet": " argsList = self.getDefArgList()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2119_C12", "label": "advance()", "type": "expression", "loc": [2119, 2119], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2117_C8", "vector": [8, 3, 0.7963, 0.0004, 3, 0.07, 0.3333, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance() # past the closing ')'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2120_C12", "label": "if", "type": "if", "loc": [2120, 2121], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2117_C8", "vector": [4, 3, 0.7969, 0.0008, 3, 0.07, 0.6667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if argsList and argsList[0][0] == 'self':\n del argsList[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2123_C12", "label": "argsList =", "type": "assigned_variable", "loc": [2123, 2123], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2117_C8", "vector": [14, 3, 0.7978, 0.0004, 3, 0.07, 1.0, 5, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "argsList", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " argsList=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2125_C8", "label": "_applyExpressionFilters()", "type": "expression", "loc": [2125, 2125], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "vector": [8, 2, 0.7986, 0.0004, 2, 0.91, 0.7, 289, 3, 3, 0, 0, 0, 0, 2], "semantic": {"name": "_applyExpressionFilters", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " self._applyExpressionFilters(self[startPos:self.pos()], 'super', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2131_C8", "label": "getExpression()", "type": "expression", "loc": [2131, 2131], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "vector": [8, 2, 0.8008, 0.0004, 2, 0.91, 0.8, 119, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getExpression", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " self.getExpression() # throw away and unwanted crap that got added in"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2132_C8", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2132, 2132], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "vector": [8, 2, 0.8012, 0.0004, 2, 0.91, 0.9, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2133_C8", "label": "addSuper()", "type": "expression", "loc": [2133, 2133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "vector": [8, 2, 0.8016, 0.0004, 2, 0.91, 1.0, 890, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addSuper", "arg_names": [], "import_names": [], "rhs_call_name": "addSuper", "annotation": ""}, "snippet": " self._compiler.addSuper(argsList)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "label": "eatSet", "type": "function", "loc": [2135, 2170], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.8089, 0.0135, 1, 0.84, 0.6842, 562, 0, 1, 0, 0, 0, 0, 25], "semantic": {"name": "eatSet", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatSet(self):\n # filtered\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLine = self.findEOL()\n self.getDirectiveStartToken()\n self.advance(3)\n self.getWhiteSpace()\n style = SET_LOCAL"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2137_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [2137, 2137], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [14, 2, 0.8031, 0.0004, 2, 0.36, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2138_C8", "label": "endOfFirstLine = findEOL()", "type": "assigned_variable", "loc": [2138, 2138], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [14, 2, 0.8035, 0.0004, 2, 0.36, 0.05, 478, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLine", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLine = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2139_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [2139, 2139], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [8, 2, 0.8038, 0.0004, 2, 0.36, 0.1, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2140_C8", "label": "advance()", "type": "expression", "loc": [2140, 2140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [8, 2, 0.8042, 0.0004, 2, 0.36, 0.15, 341, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2141_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2141, 2141], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [8, 2, 0.8046, 0.0004, 2, 0.36, 0.2, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2142_C8", "label": "style =", "type": "assigned_variable", "loc": [2142, 2142], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [14, 2, 0.805, 0.0004, 2, 0.36, 0.25, 3, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "style", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " style = SET_LOCAL"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2143_C8", "label": "if", "type": "if", "loc": [2143, 2153], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [4, 2, 0.8072, 0.0041, 2, 0.36, 0.3, 0, 3, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.startswith('local'):\n self.getIdentifier()\n self.getWhiteSpace()\n elif self.startswith('global'):\n self.getIdentifier()\n self.getWhiteSpace()\n style = SET_GLOBAL\n elif self.startswith('module'):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2144_C12", "label": "getIdentifier()", "type": "expression", "loc": [2144, 2144], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2143_C8", "vector": [8, 3, 0.8057, 0.0004, 3, 0.58, 0.0, 419, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getIdentifier", "arg_names": [], "import_names": [], "rhs_call_name": "getIdentifier", "annotation": ""}, "snippet": " self.getIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2145_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2145, 2145], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2143_C8", "vector": [8, 3, 0.8061, 0.0004, 3, 0.58, 0.5, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2146_C8", "label": "if", "type": "if", "loc": [2146, 2153], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2143_C8", "vector": [4, 3, 0.8078, 0.003, 3, 0.58, 1.0, 0, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.startswith('global'):\n self.getIdentifier()\n self.getWhiteSpace()\n style = SET_GLOBAL\n elif self.startswith('module'):\n self.getIdentifier()\n self.getWhiteSpace()\n style = SET_MODULE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2147_C12", "label": "getIdentifier()", "type": "expression", "loc": [2147, 2147], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2146_C8", "vector": [8, 4, 0.8068, 0.0004, 4, 0.34, 0.0, 419, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getIdentifier", "arg_names": [], "import_names": [], "rhs_call_name": "getIdentifier", "annotation": ""}, "snippet": " self.getIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2148_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2148, 2148], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2146_C8", "vector": [8, 4, 0.8072, 0.0004, 4, 0.34, 0.3333, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2149_C12", "label": "style =", "type": "assigned_variable", "loc": [2149, 2149], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2146_C8", "vector": [14, 4, 0.8076, 0.0004, 4, 0.34, 0.6667, 3, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "style", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " style = SET_GLOBAL"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2150_C8", "label": "if", "type": "if", "loc": [2150, 2153], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2146_C8", "vector": [4, 4, 0.8085, 0.0015, 4, 0.34, 1.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.startswith('module'):\n self.getIdentifier()\n self.getWhiteSpace()\n style = SET_MODULE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2151_C12", "label": "getIdentifier()", "type": "expression", "loc": [2151, 2151], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2150_C8", "vector": [8, 5, 0.8083, 0.0004, 5, 0.66, 0.0, 419, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getIdentifier", "arg_names": [], "import_names": [], "rhs_call_name": "getIdentifier", "annotation": ""}, "snippet": " self.getIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2152_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2152, 2152], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2150_C8", "vector": [8, 5, 0.8087, 0.0004, 5, 0.66, 0.5, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2153_C12", "label": "style =", "type": "assigned_variable", "loc": [2153, 2153], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2150_C8", "vector": [14, 5, 0.8091, 0.0004, 5, 0.66, 1.0, 3, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "style", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " style = SET_MODULE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2155_C8", "label": "startsWithDollar = matchCheetahVarStart()", "type": "assigned_variable", "loc": [2155, 2155], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [14, 2, 0.8098, 0.0004, 2, 0.36, 0.35, 750, 3, 0, 0, 0, 471, 10, 1], "semantic": {"name": "startsWithDollar", "arg_names": [], "import_names": [], "rhs_call_name": "matchCheetahVarStart", "annotation": ""}, "snippet": " startsWithDollar = self.matchCheetahVarStart()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2156_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [2156, 2156], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [14, 2, 0.8102, 0.0004, 2, 0.36, 0.4, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2157_C8", "label": "LVALUE = strip()", "type": "assigned_variable", "loc": [2157, 2157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [14, 2, 0.8106, 0.0004, 2, 0.36, 0.45, 183, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "LVALUE", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " LVALUE = self.getExpression(pyTokensToBreakAt=assignmentOps, useNameMapper=False).strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2158_C8", "label": "OP = getAssignmentOperator()", "type": "assigned_variable", "loc": [2158, 2158], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [14, 2, 0.811, 0.0004, 2, 0.36, 0.5, 242, 3, 0, 0, 0, 942, 10, 1], "semantic": {"name": "OP", "arg_names": [], "import_names": [], "rhs_call_name": "getAssignmentOperator", "annotation": ""}, "snippet": " OP = self.getAssignmentOperator()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2159_C8", "label": "RVALUE = getExpression()", "type": "assigned_variable", "loc": [2159, 2159], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [14, 2, 0.8113, 0.0004, 2, 0.36, 0.55, 159, 3, 0, 0, 0, 119, 10, 1], "semantic": {"name": "RVALUE", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " RVALUE = self.getExpression() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2160_C8", "label": "expr =", "type": "assigned_variable", "loc": [2160, 2160], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [14, 2, 0.8117, 0.0004, 2, 0.36, 0.6, 236, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expr = LVALUE + ' ' + OP + ' ' + RVALUE.strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2162_C8", "label": "expr = _applyExpressionFilters()", "type": "assigned_variable", "loc": [2162, 2162], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [14, 2, 0.8125, 0.0004, 2, 0.36, 0.65, 236, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " expr = self._applyExpressionFilters(expr, 'set', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2163_C8", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2163, 2163], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [8, 2, 0.8129, 0.0004, 2, 0.36, 0.7, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L2165_C8", "label": "Components", "type": "class", "loc": [2165, 2165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [3, 2, 0.8136, 0.0004, 2, 0.36, 0.75, 439, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "Components", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class Components: pass # used for 'set global'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2166_C8", "label": "exprComponents = Components()", "type": "assigned_variable", "loc": [2166, 2166], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [14, 2, 0.814, 0.0004, 2, 0.36, 0.8, 369, 3, 0, 0, 0, 439, 10, 1], "semantic": {"name": "exprComponents", "arg_names": [], "import_names": [], "rhs_call_name": "Components", "annotation": ""}, "snippet": " exprComponents = Components()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2167_C8", "label": "exprComponents.LVALUE =", "type": "assigned_variable", "loc": [2167, 2167], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [14, 2, 0.8144, 0.0004, 2, 0.36, 0.85, 103, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "exprComponents.LVALUE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " exprComponents.LVALUE = LVALUE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2168_C8", "label": "exprComponents.OP =", "type": "assigned_variable", "loc": [2168, 2168], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [14, 2, 0.8147, 0.0004, 2, 0.36, 0.9, 264, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "exprComponents.OP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " exprComponents.OP = OP"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2169_C8", "label": "exprComponents.RVALUE =", "type": "assigned_variable", "loc": [2169, 2169], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [14, 2, 0.8151, 0.0004, 2, 0.36, 0.95, 706, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "exprComponents.RVALUE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " exprComponents.RVALUE = RVALUE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2170_C8", "label": "addSet()", "type": "expression", "loc": [2170, 2170], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "vector": [8, 2, 0.8155, 0.0004, 2, 0.36, 1.0, 402, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addSet", "arg_names": [], "import_names": [], "rhs_call_name": "addSet", "annotation": ""}, "snippet": " self._compiler.addSet(expr, exprComponents, style)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2172_C4", "label": "eatSlurp", "type": "function", "loc": [2172, 2176], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.817, 0.0019, 1, 0.84, 0.7018, 252, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "eatSlurp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatSlurp(self):\n if self.isLineClearToStartToken():\n self._compiler.handleWSBeforeDirective()\n self._compiler.commitStrConst()\n self.readToEOL(gobble=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2173_C8", "label": "if", "type": "if", "loc": [2173, 2174], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2172_C4", "vector": [4, 2, 0.8168, 0.0008, 2, 0.72, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.isLineClearToStartToken():\n self._compiler.handleWSBeforeDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2174_C12", "label": "handleWSBeforeDirective()", "type": "expression", "loc": [2174, 2174], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2173_C8", "vector": [8, 3, 0.817, 0.0004, 3, 0.57, 0.0, 788, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "handleWSBeforeDirective", "arg_names": [], "import_names": [], "rhs_call_name": "handleWSBeforeDirective", "annotation": ""}, "snippet": " self._compiler.handleWSBeforeDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2175_C8", "label": "commitStrConst()", "type": "expression", "loc": [2175, 2175], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2172_C4", "vector": [8, 2, 0.8174, 0.0004, 2, 0.72, 0.5, 212, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "commitStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "commitStrConst", "annotation": ""}, "snippet": " self._compiler.commitStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2176_C8", "label": "readToEOL()", "type": "expression", "loc": [2176, 2176], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2172_C4", "vector": [8, 2, 0.8177, 0.0004, 2, 0.72, 1.0, 553, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "readToEOL", "arg_names": [], "import_names": [], "rhs_call_name": "readToEOL", "annotation": ""}, "snippet": " self.readToEOL(gobble=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2178_C4", "label": "eatEOLSlurpToken", "type": "function", "loc": [2178, 2182], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.8192, 0.0019, 1, 0.84, 0.7193, 337, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "eatEOLSlurpToken", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatEOLSlurpToken(self):\n if self.isLineClearToStartToken():\n self._compiler.handleWSBeforeDirective()\n self._compiler.commitStrConst()\n self.readToEOL(gobble=True) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2179_C8", "label": "if", "type": "if", "loc": [2179, 2180], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2178_C4", "vector": [4, 2, 0.8191, 0.0008, 2, 0.5, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.isLineClearToStartToken():\n self._compiler.handleWSBeforeDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2180_C12", "label": "handleWSBeforeDirective()", "type": "expression", "loc": [2180, 2180], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2179_C8", "vector": [8, 3, 0.8192, 0.0004, 3, 0.72, 0.0, 788, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "handleWSBeforeDirective", "arg_names": [], "import_names": [], "rhs_call_name": "handleWSBeforeDirective", "annotation": ""}, "snippet": " self._compiler.handleWSBeforeDirective()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2181_C8", "label": "commitStrConst()", "type": "expression", "loc": [2181, 2181], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2178_C4", "vector": [8, 2, 0.8196, 0.0004, 2, 0.5, 0.5, 212, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "commitStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "commitStrConst", "annotation": ""}, "snippet": " self._compiler.commitStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2182_C8", "label": "readToEOL()", "type": "expression", "loc": [2182, 2182], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2178_C4", "vector": [8, 2, 0.82, 0.0004, 2, 0.5, 1.0, 553, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "readToEOL", "arg_names": [], "import_names": [], "rhs_call_name": "readToEOL", "annotation": ""}, "snippet": " self.readToEOL(gobble=True) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2184_C4", "label": "eatRaw", "type": "function", "loc": [2184, 2200], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.8238, 0.0064, 1, 0.84, 0.7368, 201, 0, 1, 0, 0, 0, 0, 16], "semantic": {"name": "eatRaw", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatRaw(self):\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLinePos = self.findEOL()\n self.getDirectiveStartToken()\n self.advance(len('raw'))\n self.getWhiteSpace()\n if self.matchColonForSingleLineShortFormDirective():\n self.advance() # skip over :"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2185_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [2185, 2185], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2184_C4", "vector": [14, 2, 0.8211, 0.0004, 2, 0.57, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2186_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [2186, 2186], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2184_C4", "vector": [14, 2, 0.8215, 0.0004, 2, 0.57, 0.1667, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2187_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [2187, 2187], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2184_C4", "vector": [8, 2, 0.8219, 0.0004, 2, 0.57, 0.3333, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2188_C8", "label": "advance()", "type": "expression", "loc": [2188, 2188], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2184_C4", "vector": [8, 2, 0.8222, 0.0004, 2, 0.57, 0.5, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('raw'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2189_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2189, 2189], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2184_C4", "vector": [8, 2, 0.8226, 0.0004, 2, 0.57, 0.6667, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2190_C8", "label": "if", "type": "if", "loc": [2190, 2199], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2184_C4", "vector": [4, 2, 0.8247, 0.0038, 2, 0.57, 0.8333, 0, 3, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchColonForSingleLineShortFormDirective():\n self.advance() # skip over :\n self.getWhiteSpace(max=1)\n rawBlock = self.readToEOL(gobble=False)\n else:\n if self.peek()==':':\n self.advance()\n self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2191_C12", "label": "advance()", "type": "expression", "loc": [2191, 2191], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2190_C8", "vector": [8, 3, 0.8234, 0.0004, 3, 0.66, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance() # skip over :"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2192_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2192, 2192], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2190_C8", "vector": [8, 3, 0.8238, 0.0004, 3, 0.66, 0.1667, 84, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace(max=1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2193_C12", "label": "rawBlock = readToEOL()", "type": "assigned_variable", "loc": [2193, 2193], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2190_C8", "vector": [14, 3, 0.8241, 0.0004, 3, 0.66, 0.3333, 97, 3, 1, 0, 0, 553, 10, 1], "semantic": {"name": "rawBlock", "arg_names": [], "import_names": [], "rhs_call_name": "readToEOL", "annotation": ""}, "snippet": " rawBlock = self.readToEOL(gobble=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2195_C12", "label": "if", "type": "if", "loc": [2195, 2196], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2190_C8", "vector": [4, 3, 0.8251, 0.0008, 3, 0.66, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek()==':':\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2196_C16", "label": "advance()", "type": "expression", "loc": [2196, 2196], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2195_C12", "vector": [8, 4, 0.8253, 0.0004, 4, 0.51, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2197_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2197, 2197], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2190_C8", "vector": [8, 3, 0.8256, 0.0004, 3, 0.66, 0.6667, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2198_C12", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2198, 2198], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2190_C8", "vector": [8, 3, 0.826, 0.0004, 3, 0.66, 0.8333, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2199_C12", "label": "rawBlock = _eatToThisEndDirective()", "type": "assigned_variable", "loc": [2199, 2199], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2190_C8", "vector": [14, 3, 0.8264, 0.0004, 3, 0.66, 1.0, 97, 3, 1, 0, 0, 335, 10, 1], "semantic": {"name": "rawBlock", "arg_names": [], "import_names": [], "rhs_call_name": "_eatToThisEndDirective", "annotation": ""}, "snippet": " rawBlock = self._eatToThisEndDirective('raw')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2200_C8", "label": "addRawText()", "type": "expression", "loc": [2200, 2200], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2184_C4", "vector": [8, 2, 0.8268, 0.0004, 2, 0.57, 1.0, 65, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addRawText", "arg_names": [], "import_names": [], "rhs_call_name": "addRawText", "annotation": ""}, "snippet": " self._compiler.addRawText(rawBlock)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "label": "eatInclude", "type": "function", "loc": [2202, 2228], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.8324, 0.0101, 1, 0.84, 0.7544, 311, 0, 1, 0, 0, 0, 0, 21], "semantic": {"name": "eatInclude", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatInclude(self):\n # filtered\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLinePos = self.findEOL()\n self.getDirectiveStartToken()\n self.advance(len('include'))\n\n self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2204_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [2204, 2204], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "vector": [14, 2, 0.8283, 0.0004, 2, 0.94, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2205_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [2205, 2205], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "vector": [14, 2, 0.8286, 0.0004, 2, 0.94, 0.0714, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2206_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [2206, 2206], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "vector": [8, 2, 0.829, 0.0004, 2, 0.94, 0.1429, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2207_C8", "label": "advance()", "type": "expression", "loc": [2207, 2207], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "vector": [8, 2, 0.8294, 0.0004, 2, 0.94, 0.2143, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('include'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2209_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2209, 2209], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "vector": [8, 2, 0.8301, 0.0004, 2, 0.94, 0.2857, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2210_C8", "label": "includeFrom =", "type": "assigned_variable", "loc": [2210, 2210], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "vector": [14, 2, 0.8305, 0.0004, 2, 0.94, 0.3571, 800, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "includeFrom", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " includeFrom = 'file'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2211_C8", "label": "isRaw =", "type": "assigned_variable", "loc": [2211, 2211], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "vector": [14, 2, 0.8309, 0.0004, 2, 0.94, 0.4286, 283, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "isRaw", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isRaw = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2212_C8", "label": "if", "type": "if", "loc": [2212, 2214], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "vector": [4, 2, 0.8316, 0.0011, 2, 0.94, 0.5, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.startswith('raw'):\n self.advance(3)\n isRaw=True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2213_C12", "label": "advance()", "type": "expression", "loc": [2213, 2213], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2212_C8", "vector": [8, 3, 0.8316, 0.0004, 3, 0.95, 0.0, 341, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2214_C12", "label": "isRaw =", "type": "assigned_variable", "loc": [2214, 2214], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2212_C8", "vector": [14, 3, 0.832, 0.0004, 3, 0.95, 1.0, 283, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "isRaw", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isRaw=True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2216_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2216, 2216], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "vector": [8, 2, 0.8328, 0.0004, 2, 0.94, 0.5714, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2217_C8", "label": "if", "type": "if", "loc": [2217, 2223], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "vector": [4, 2, 0.8343, 0.0026, 2, 0.94, 0.6429, 0, 3, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.startswith('source'):\n self.advance(len('source'))\n includeFrom = 'str'\n self.getWhiteSpace()\n if not self.peek() == '=':\n raise ParseError(self)\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2218_C12", "label": "advance()", "type": "expression", "loc": [2218, 2218], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2217_C8", "vector": [8, 3, 0.8335, 0.0004, 3, 0.72, 0.0, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('source'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2219_C12", "label": "includeFrom =", "type": "assigned_variable", "loc": [2219, 2219], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2217_C8", "vector": [14, 3, 0.8339, 0.0004, 3, 0.72, 0.25, 800, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "includeFrom", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " includeFrom = 'str'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2220_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2220, 2220], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2217_C8", "vector": [8, 3, 0.8343, 0.0004, 3, 0.72, 0.5, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2221_C12", "label": "if", "type": "if", "loc": [2221, 2222], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2217_C8", "vector": [4, 3, 0.8348, 0.0008, 3, 0.72, 0.75, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.peek() == '=':\n raise ParseError(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2223_C12", "label": "advance()", "type": "expression", "loc": [2223, 2223], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2217_C8", "vector": [8, 3, 0.8354, 0.0004, 3, 0.72, 1.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2224_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [2224, 2224], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "vector": [14, 2, 0.8358, 0.0004, 2, 0.94, 0.7143, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2225_C8", "label": "sourceExpr = getExpression()", "type": "assigned_variable", "loc": [2225, 2225], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "vector": [14, 2, 0.8362, 0.0004, 2, 0.94, 0.7857, 441, 3, 0, 0, 0, 119, 10, 1], "semantic": {"name": "sourceExpr", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " sourceExpr = self.getExpression()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2226_C8", "label": "sourceExpr = _applyExpressionFilters()", "type": "assigned_variable", "loc": [2226, 2226], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "vector": [14, 2, 0.8365, 0.0004, 2, 0.94, 0.8571, 441, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "sourceExpr", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " sourceExpr = self._applyExpressionFilters(sourceExpr, 'include', startPos=startPos) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2227_C8", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2227, 2227], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "vector": [8, 2, 0.8369, 0.0004, 2, 0.94, 0.9286, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2228_C8", "label": "addInclude()", "type": "expression", "loc": [2228, 2228], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "vector": [8, 2, 0.8373, 0.0004, 2, 0.94, 1.0, 816, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "addInclude", "arg_names": [], "import_names": [], "rhs_call_name": "addInclude", "annotation": ""}, "snippet": " self._compiler.addInclude(sourceExpr, includeFrom, isRaw)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "label": "eatDefMacro", "type": "function", "loc": [2231, 2309], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.8531, 0.0297, 1, 0.84, 0.7719, 375, 0, 1, 0, 0, 0, 0, 43], "semantic": {"name": "eatDefMacro", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatDefMacro(self):\n # @@TR: not filtered yet\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLinePos = self.findEOL()\n self.getDirectiveStartToken()\n self.advance(len('defmacro'))\n\n self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2233_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [2233, 2233], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [14, 2, 0.8392, 0.0004, 2, 0.11, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2234_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [2234, 2234], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [14, 2, 0.8395, 0.0004, 2, 0.11, 0.0294, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2235_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [2235, 2235], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [8, 2, 0.8399, 0.0004, 2, 0.11, 0.0588, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2236_C8", "label": "advance()", "type": "expression", "loc": [2236, 2236], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [8, 2, 0.8403, 0.0004, 2, 0.11, 0.0882, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('defmacro'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2238_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2238, 2238], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [8, 2, 0.841, 0.0004, 2, 0.11, 0.1176, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2239_C8", "label": "if", "type": "if", "loc": [2239, 2240], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [4, 2, 0.8416, 0.0008, 2, 0.11, 0.1471, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchCheetahVarStart():\n self.getCheetahVarStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2240_C12", "label": "getCheetahVarStartToken()", "type": "expression", "loc": [2240, 2240], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2239_C8", "vector": [8, 3, 0.8418, 0.0004, 3, 0.05, 0.0, 711, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getCheetahVarStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getCheetahVarStartToken", "annotation": ""}, "snippet": " self.getCheetahVarStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2241_C8", "label": "macroName = getIdentifier()", "type": "assigned_variable", "loc": [2241, 2241], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [14, 2, 0.8422, 0.0004, 2, 0.11, 0.1765, 627, 3, 0, 0, 0, 419, 10, 1], "semantic": {"name": "macroName", "arg_names": [], "import_names": [], "rhs_call_name": "getIdentifier", "annotation": ""}, "snippet": " macroName = self.getIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2242_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2242, 2242], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [8, 2, 0.8425, 0.0004, 2, 0.11, 0.2059, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2243_C8", "label": "if", "type": "if", "loc": [2243, 2249], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [4, 2, 0.844, 0.0026, 2, 0.11, 0.2353, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek() == '(':\n argsList = self.getDefArgList(useNameMapper=False)\n self.advance() # past the closing ')'\n if argsList and argsList[0][0] == 'self':\n del argsList[0]\n else:\n argsList=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2244_C12", "label": "argsList = getDefArgList()", "type": "assigned_variable", "loc": [2244, 2244], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2243_C8", "vector": [14, 3, 0.8433, 0.0004, 3, 0.23, 0.0, 5, 3, 1, 0, 0, 197, 10, 1], "semantic": {"name": "argsList", "arg_names": [], "import_names": [], "rhs_call_name": "getDefArgList", "annotation": ""}, "snippet": " argsList = self.getDefArgList(useNameMapper=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2245_C12", "label": "advance()", "type": "expression", "loc": [2245, 2245], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2243_C8", "vector": [8, 3, 0.8437, 0.0004, 3, 0.23, 0.3333, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance() # past the closing ')'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2246_C12", "label": "if", "type": "if", "loc": [2246, 2247], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2243_C8", "vector": [4, 3, 0.8442, 0.0008, 3, 0.23, 0.6667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if argsList and argsList[0][0] == 'self':\n del argsList[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2249_C12", "label": "argsList =", "type": "assigned_variable", "loc": [2249, 2249], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2243_C8", "vector": [14, 3, 0.8452, 0.0004, 3, 0.23, 1.0, 5, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "argsList", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " argsList=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2252_C8", "label": "insert()", "type": "expression", "loc": [2252, 2252], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [8, 2, 0.8463, 0.0004, 2, 0.11, 0.2647, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " argsList.insert(0, ('src', None))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2253_C8", "label": "append()", "type": "expression", "loc": [2253, 2253], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [8, 2, 0.8467, 0.0004, 2, 0.11, 0.2941, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " argsList.append(('parser', 'None'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2254_C8", "label": "append()", "type": "expression", "loc": [2254, 2254], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [8, 2, 0.847, 0.0004, 2, 0.11, 0.3235, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " argsList.append(('macros', 'None'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2255_C8", "label": "append()", "type": "expression", "loc": [2255, 2255], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [8, 2, 0.8474, 0.0004, 2, 0.11, 0.3529, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " argsList.append(('compilerSettings', 'None'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2256_C8", "label": "append()", "type": "expression", "loc": [2256, 2256], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [8, 2, 0.8478, 0.0004, 2, 0.11, 0.3824, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " argsList.append(('isShortForm', 'None'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2257_C8", "label": "append()", "type": "expression", "loc": [2257, 2257], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [8, 2, 0.8482, 0.0004, 2, 0.11, 0.4118, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " argsList.append(('EOLCharsInShortForm', 'None')) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2258_C8", "label": "append()", "type": "expression", "loc": [2258, 2258], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [8, 2, 0.8486, 0.0004, 2, 0.11, 0.4412, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " argsList.append(('startPos', 'None'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2259_C8", "label": "append()", "type": "expression", "loc": [2259, 2259], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [8, 2, 0.8489, 0.0004, 2, 0.11, 0.4706, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " argsList.append(('endPos', 'None'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "label": "if", "type": "if", "loc": [2261, 2271], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [4, 2, 0.8516, 0.0041, 2, 0.11, 0.5, 0, 3, 0, 0, 0, 0, 0, 10], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchColonForSingleLineShortFormDirective():\n self.advance() # skip over :\n self.getWhiteSpace(max=1)\n macroSrc = self.readToEOL(gobble=False)\n self.readToEOL(gobble=True)\n else:\n if self.peek()==':':\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2262_C12", "label": "advance()", "type": "expression", "loc": [2262, 2262], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "vector": [8, 3, 0.8501, 0.0004, 3, 0.45, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance() # skip over :"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2263_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2263, 2263], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "vector": [8, 3, 0.8504, 0.0004, 3, 0.45, 0.1429, 84, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace(max=1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2264_C12", "label": "macroSrc = readToEOL()", "type": "assigned_variable", "loc": [2264, 2264], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "vector": [14, 3, 0.8508, 0.0004, 3, 0.45, 0.2857, 705, 3, 1, 0, 0, 553, 10, 1], "semantic": {"name": "macroSrc", "arg_names": [], "import_names": [], "rhs_call_name": "readToEOL", "annotation": ""}, "snippet": " macroSrc = self.readToEOL(gobble=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2265_C12", "label": "readToEOL()", "type": "expression", "loc": [2265, 2265], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "vector": [8, 3, 0.8512, 0.0004, 3, 0.45, 0.4286, 553, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "readToEOL", "arg_names": [], "import_names": [], "rhs_call_name": "readToEOL", "annotation": ""}, "snippet": " self.readToEOL(gobble=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2267_C12", "label": "if", "type": "if", "loc": [2267, 2268], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "vector": [4, 3, 0.8521, 0.0008, 3, 0.45, 0.5714, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek()==':':\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2268_C16", "label": "advance()", "type": "expression", "loc": [2268, 2268], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2267_C12", "vector": [8, 4, 0.8523, 0.0004, 4, 0.44, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2269_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2269, 2269], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "vector": [8, 3, 0.8527, 0.0004, 3, 0.45, 0.7143, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2270_C12", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2270, 2270], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "vector": [8, 3, 0.8531, 0.0004, 3, 0.45, 0.8571, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2271_C12", "label": "macroSrc = _eatToThisEndDirective()", "type": "assigned_variable", "loc": [2271, 2271], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "vector": [14, 3, 0.8534, 0.0004, 3, 0.45, 1.0, 705, 3, 1, 0, 0, 335, 10, 1], "semantic": {"name": "macroSrc", "arg_names": [], "import_names": [], "rhs_call_name": "_eatToThisEndDirective", "annotation": ""}, "snippet": " macroSrc = self._eatToThisEndDirective('defmacro')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2274_C8", "label": "normalizedMacroSrc = join()", "type": "assigned_variable", "loc": [2274, 2279], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [14, 2, 0.8555, 0.0023, 2, 0.11, 0.5294, 175, 3, 1, 0, 0, 933, 10, 2], "semantic": {"name": "normalizedMacroSrc", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " normalizedMacroSrc = ''.join(\n ['%def callMacro('+','.join([defv and '%s=%s'%(n, defv) or n\n for n, defv in argsList])\n +')\\n',\n macroSrc,\n '%end def'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ImportFrom_L2282_C8", "label": "from Cheetah.Template import Template", "type": "import", "loc": [2282, 2282], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [1, 2, 0.8576, 0.0004, 2, 0.11, 0.5588, 171, 0, 1, 0, 0, 171, 0, 0], "semantic": {"name": "Cheetah.Template", "arg_names": [], "import_names": ["Template"], "rhs_call_name": "", "annotation": ""}, "snippet": " from Cheetah.Template import Template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2283_C8", "label": "templateAPIClass = setting()", "type": "assigned_variable", "loc": [2283, 2283], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [14, 2, 0.8579, 0.0004, 2, 0.11, 0.5882, 267, 3, 2, 0, 0, 368, 10, 1], "semantic": {"name": "templateAPIClass", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " templateAPIClass = self.setting('templateAPIClassForDefMacro', default=Template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2284_C8", "label": "compilerSettings = setting()", "type": "assigned_variable", "loc": [2284, 2284], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [14, 2, 0.8583, 0.0004, 2, 0.11, 0.6176, 181, 3, 2, 0, 0, 368, 10, 1], "semantic": {"name": "compilerSettings", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " compilerSettings = self.setting('compilerSettingsForDefMacro', default={})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2285_C8", "label": "searchListForMacros = setting()", "type": "assigned_variable", "loc": [2285, 2285], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [14, 2, 0.8587, 0.0004, 2, 0.11, 0.6471, 159, 3, 2, 0, 0, 368, 10, 1], "semantic": {"name": "searchListForMacros", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " searchListForMacros = self.setting('searchListForDefMacro', default=[])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2286_C8", "label": "searchListForMacros = list()", "type": "assigned_variable", "loc": [2286, 2286], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [14, 2, 0.8591, 0.0004, 2, 0.11, 0.6765, 159, 3, 1, 0, 0, 430, 10, 1], "semantic": {"name": "searchListForMacros", "arg_names": [], "import_names": [], "rhs_call_name": "list", "annotation": ""}, "snippet": " searchListForMacros = list(searchListForMacros) # copy to avoid mutation bugs"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2287_C8", "label": "append()", "type": "expression", "loc": [2287, 2290], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [8, 2, 0.86, 0.0015, 2, 0.11, 0.7059, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " searchListForMacros.append({'macros': self._macros,\n 'parser': self,\n 'compilerSettings': self.settings(), \n })"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2292_C8", "label": "_updateSettingsWithPreprocessTokens()", "type": "expression", "loc": [2292, 2293], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [8, 2, 0.8615, 0.0008, 2, 0.11, 0.7353, 377, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "_updateSettingsWithPreprocessTokens", "arg_names": [], "import_names": [], "rhs_call_name": "_updateSettingsWithPreprocessTokens", "annotation": ""}, "snippet": " templateAPIClass._updateSettingsWithPreprocessTokens(\n compilerSettings, placeholderToken='@', directiveToken='%')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2294_C8", "label": "macroTemplateClass = compile()", "type": "assigned_variable", "loc": [2294, 2295], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [14, 2, 0.8623, 0.0008, 2, 0.11, 0.7647, 115, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "macroTemplateClass", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " macroTemplateClass = templateAPIClass.compile(source=normalizedMacroSrc,\n compilerSettings=compilerSettings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L2301_C8", "label": "MacroDetails", "type": "class", "loc": [2301, 2301], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [3, 2, 0.8647, 0.0004, 2, 0.11, 0.7941, 78, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "MacroDetails", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class MacroDetails: pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2302_C8", "label": "macroDetails = MacroDetails()", "type": "assigned_variable", "loc": [2302, 2302], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [14, 2, 0.8651, 0.0004, 2, 0.11, 0.8235, 104, 3, 0, 0, 0, 78, 10, 1], "semantic": {"name": "macroDetails", "arg_names": [], "import_names": [], "rhs_call_name": "MacroDetails", "annotation": ""}, "snippet": " macroDetails = MacroDetails()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2303_C8", "label": "macroDetails.macroSrc =", "type": "assigned_variable", "loc": [2303, 2303], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [14, 2, 0.8655, 0.0004, 2, 0.11, 0.8529, 397, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "macroDetails.macroSrc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " macroDetails.macroSrc = macroSrc"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2304_C8", "label": "macroDetails.argsList =", "type": "assigned_variable", "loc": [2304, 2304], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [14, 2, 0.8658, 0.0004, 2, 0.11, 0.8824, 632, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "macroDetails.argsList", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " macroDetails.argsList = argsList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2305_C8", "label": "macroDetails.template = macroTemplateClass()", "type": "assigned_variable", "loc": [2305, 2305], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [14, 2, 0.8662, 0.0004, 2, 0.11, 0.9118, 848, 3, 1, 0, 0, 115, 10, 1], "semantic": {"name": "macroDetails.template", "arg_names": [], "import_names": [], "rhs_call_name": "macroTemplateClass", "annotation": ""}, "snippet": " macroDetails.template = macroTemplateClass(searchList=searchListForMacros)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2307_C8", "label": "assign", "type": "assigned_variable", "loc": [2307, 2307], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [14, 2, 0.867, 0.0004, 2, 0.11, 0.9412, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._macroDetails[macroName] = macroDetails"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2308_C8", "label": "assign", "type": "assigned_variable", "loc": [2308, 2308], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [14, 2, 0.8673, 0.0004, 2, 0.11, 0.9706, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._macros[macroName] = macroDetails.template.callMacro"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2309_C8", "label": "assign", "type": "assigned_variable", "loc": [2309, 2309], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "vector": [14, 2, 0.8677, 0.0004, 2, 0.11, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._directiveNamesAndParsers[macroName] = self.eatMacroCall"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "label": "eatMacroCall", "type": "function", "loc": [2311, 2394], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.8841, 0.0316, 1, 0.84, 0.7895, 664, 0, 1, 1, 0, 0, 0, 41], "semantic": {"name": "eatMacroCall", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatMacroCall(self):\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLinePos = self.findEOL()\n startPos = self.pos()\n self.getDirectiveStartToken()\n macroName = self.getIdentifier()\n macro = self._macros[macroName]\n if hasattr(macro, 'parse'):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2312_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [2312, 2312], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [14, 2, 0.8688, 0.0004, 2, 0.54, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2313_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [2313, 2313], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [14, 2, 0.8692, 0.0004, 2, 0.54, 0.0333, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2314_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [2314, 2314], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [14, 2, 0.8696, 0.0004, 2, 0.54, 0.0667, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2315_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [2315, 2315], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [8, 2, 0.87, 0.0004, 2, 0.54, 0.1, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2316_C8", "label": "macroName = getIdentifier()", "type": "assigned_variable", "loc": [2316, 2316], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [14, 2, 0.8703, 0.0004, 2, 0.54, 0.1333, 627, 3, 0, 0, 0, 419, 10, 1], "semantic": {"name": "macroName", "arg_names": [], "import_names": [], "rhs_call_name": "getIdentifier", "annotation": ""}, "snippet": " macroName = self.getIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2317_C8", "label": "macro =", "type": "assigned_variable", "loc": [2317, 2317], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [14, 2, 0.8707, 0.0004, 2, 0.54, 0.1667, 518, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "macro", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " macro = self._macros[macroName]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2318_C8", "label": "if", "type": "if", "loc": [2318, 2319], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [4, 2, 0.8713, 0.0008, 2, 0.54, 0.2, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if hasattr(macro, 'parse'):\n return macro.parse(parser=self, startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L2319_C12", "label": "return", "type": "return", "loc": [2319, 2319], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2318_C8", "vector": [13, 3, 0.8715, 0.0004, 3, 0.95, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return macro.parse(parser=self, startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2321_C8", "label": "if", "type": "if", "loc": [2321, 2326], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [4, 2, 0.8732, 0.0023, 2, 0.54, 0.2333, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if hasattr(macro, 'parseArgs'):\n args = macro.parseArgs(parser=self, startPos=startPos)\n else:\n self.getWhiteSpace()\n args = self.getExpression(useNameMapper=False,\n pyTokensToBreakAt=[':']).strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2322_C12", "label": "args = parseArgs()", "type": "assigned_variable", "loc": [2322, 2322], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2321_C8", "vector": [14, 3, 0.8726, 0.0004, 3, 0.35, 0.0, 805, 3, 2, 0, 0, 905, 10, 1], "semantic": {"name": "args", "arg_names": [], "import_names": [], "rhs_call_name": "parseArgs", "annotation": ""}, "snippet": " args = macro.parseArgs(parser=self, startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2324_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2324, 2324], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2321_C8", "vector": [8, 3, 0.8734, 0.0004, 3, 0.35, 0.5, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2325_C12", "label": "args = strip()", "type": "assigned_variable", "loc": [2325, 2326], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2321_C8", "vector": [14, 3, 0.8739, 0.0008, 3, 0.35, 1.0, 805, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "args", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " args = self.getExpression(useNameMapper=False,\n pyTokensToBreakAt=[':']).strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "label": "if", "type": "if", "loc": [2328, 2341], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [4, 2, 0.8773, 0.0053, 2, 0.54, 0.2667, 0, 3, 0, 0, 0, 0, 0, 10], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchColonForSingleLineShortFormDirective():\n isShortForm = True\n self.advance() # skip over :\n self.getWhiteSpace(max=1)\n srcBlock = self.readToEOL(gobble=False)\n EOLCharsInShortForm = self.readToEOL(gobble=True)\n #self.readToEOL(gobble=False)\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2329_C12", "label": "isShortForm =", "type": "assigned_variable", "loc": [2329, 2329], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "vector": [14, 3, 0.8752, 0.0004, 3, 0.52, 0.0, 434, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "isShortForm", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isShortForm = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2330_C12", "label": "advance()", "type": "expression", "loc": [2330, 2330], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "vector": [8, 3, 0.8756, 0.0004, 3, 0.52, 0.1111, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance() # skip over :"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2331_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2331, 2331], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "vector": [8, 3, 0.876, 0.0004, 3, 0.52, 0.2222, 84, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace(max=1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2332_C12", "label": "srcBlock = readToEOL()", "type": "assigned_variable", "loc": [2332, 2332], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "vector": [14, 3, 0.8764, 0.0004, 3, 0.52, 0.3333, 494, 3, 1, 0, 0, 553, 10, 1], "semantic": {"name": "srcBlock", "arg_names": [], "import_names": [], "rhs_call_name": "readToEOL", "annotation": ""}, "snippet": " srcBlock = self.readToEOL(gobble=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2333_C12", "label": "EOLCharsInShortForm = readToEOL()", "type": "assigned_variable", "loc": [2333, 2333], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "vector": [14, 3, 0.8767, 0.0004, 3, 0.52, 0.4444, 142, 3, 1, 0, 0, 553, 10, 1], "semantic": {"name": "EOLCharsInShortForm", "arg_names": [], "import_names": [], "rhs_call_name": "readToEOL", "annotation": ""}, "snippet": " EOLCharsInShortForm = self.readToEOL(gobble=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2336_C12", "label": "isShortForm =", "type": "assigned_variable", "loc": [2336, 2336], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "vector": [14, 3, 0.8779, 0.0004, 3, 0.52, 0.5556, 434, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "isShortForm", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isShortForm = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2337_C12", "label": "if", "type": "if", "loc": [2337, 2338], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "vector": [4, 3, 0.8784, 0.0008, 3, 0.52, 0.6667, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek()==':':\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2338_C16", "label": "advance()", "type": "expression", "loc": [2338, 2338], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2337_C12", "vector": [8, 4, 0.8786, 0.0004, 4, 0.68, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2339_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2339, 2339], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "vector": [8, 3, 0.879, 0.0004, 3, 0.52, 0.7778, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2340_C12", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2340, 2340], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "vector": [8, 3, 0.8794, 0.0004, 3, 0.52, 0.8889, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2341_C12", "label": "srcBlock = _eatToThisEndDirective()", "type": "assigned_variable", "loc": [2341, 2341], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "vector": [14, 3, 0.8797, 0.0004, 3, 0.52, 1.0, 494, 3, 1, 0, 0, 335, 10, 1], "semantic": {"name": "srcBlock", "arg_names": [], "import_names": [], "rhs_call_name": "_eatToThisEndDirective", "annotation": ""}, "snippet": " srcBlock = self._eatToThisEndDirective(macroName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2344_C8", "label": "if", "type": "if", "loc": [2344, 2349], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [4, 2, 0.8818, 0.0023, 2, 0.54, 0.3, 0, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if hasattr(macro, 'convertArgStrToDict'):\n kwArgs = macro.convertArgStrToDict(args, parser=self, startPos=startPos)\n else:\n def getArgs(*pargs, **kws):\n return pargs, kws\n exec('positionalArgs, kwArgs = getArgs(%(args)s)'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2345_C12", "label": "kwArgs = convertArgStrToDict()", "type": "assigned_variable", "loc": [2345, 2345], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2344_C8", "vector": [14, 3, 0.8812, 0.0004, 3, 0.62, 0.0, 402, 3, 3, 0, 0, 738, 10, 1], "semantic": {"name": "kwArgs", "arg_names": [], "import_names": [], "rhs_call_name": "convertArgStrToDict", "annotation": ""}, "snippet": " kwArgs = macro.convertArgStrToDict(args, parser=self, startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2347_C12", "label": "getArgs", "type": "function", "loc": [2347, 2348], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2344_C8", "vector": [2, 3, 0.8822, 0.0008, 3, 0.62, 0.5, 966, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "getArgs", "arg_names": ["pargs", "kws"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def getArgs(*pargs, **kws):\n return pargs, kws"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L2348_C16", "label": "return", "type": "return", "loc": [2348, 2348], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2347_C12", "vector": [13, 4, 0.8824, 0.0004, 4, 0.41, 0.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return pargs, kws"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2349_C12", "label": "exec()", "type": "expression", "loc": [2349, 2349], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2344_C8", "vector": [8, 3, 0.8828, 0.0004, 3, 0.62, 1.0, 272, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "exec", "arg_names": [], "import_names": [], "rhs_call_name": "exec", "annotation": ""}, "snippet": " exec('positionalArgs, kwArgs = getArgs(%(args)s)'%locals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2352_C8", "label": "assign", "type": "assigned_variable", "loc": [2352, 2352], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [14, 2, 0.8839, 0.0004, 2, 0.54, 0.3333, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " kwArgs['src'] = srcBlock"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2354_C8", "label": "if", "type": "if", "loc": [2354, 2360], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [4, 2, 0.8858, 0.0026, 2, 0.54, 0.3667, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(macro, new.instancemethod):\n co = macro.im_func.func_code\n elif (hasattr(macro, '__call__')\n and hasattr(macro.__call__, 'im_func')):\n co = macro.__call__.im_func.func_code\n else:\n co = macro.func_code"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2355_C12", "label": "co =", "type": "assigned_variable", "loc": [2355, 2355], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2354_C8", "vector": [14, 3, 0.885, 0.0004, 3, 0.27, 0.0, 730, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "co", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " co = macro.im_func.func_code"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2356_C8", "label": "if", "type": "if", "loc": [2356, 2360], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2354_C8", "vector": [4, 3, 0.8861, 0.0019, 3, 0.27, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif (hasattr(macro, '__call__')\n and hasattr(macro.__call__, 'im_func')):\n co = macro.__call__.im_func.func_code\n else:\n co = macro.func_code"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2358_C12", "label": "co =", "type": "assigned_variable", "loc": [2358, 2358], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2356_C8", "vector": [14, 4, 0.8861, 0.0004, 4, 0.38, 0.0, 730, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "co", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " co = macro.__call__.im_func.func_code"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2360_C12", "label": "co =", "type": "assigned_variable", "loc": [2360, 2360], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2356_C8", "vector": [14, 4, 0.8869, 0.0004, 4, 0.38, 1.0, 730, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "co", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " co = macro.func_code"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2361_C8", "label": "availableKwArgs =", "type": "assigned_variable", "loc": [2361, 2361], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [14, 2, 0.8873, 0.0004, 2, 0.54, 0.4, 154, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "availableKwArgs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " availableKwArgs = inspect.getargs(co)[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2363_C8", "label": "if", "type": "if", "loc": [2363, 2364], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [4, 2, 0.8882, 0.0008, 2, 0.54, 0.4333, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'parser' in availableKwArgs:\n kwArgs['parser'] = self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2364_C12", "label": "assign", "type": "assigned_variable", "loc": [2364, 2364], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2363_C8", "vector": [14, 3, 0.8884, 0.0004, 3, 0.06, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " kwArgs['parser'] = self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2365_C8", "label": "if", "type": "if", "loc": [2365, 2366], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [4, 2, 0.889, 0.0008, 2, 0.54, 0.4667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'macros' in availableKwArgs:\n kwArgs['macros'] = self._macros"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2366_C12", "label": "assign", "type": "assigned_variable", "loc": [2366, 2366], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2365_C8", "vector": [14, 3, 0.8891, 0.0004, 3, 0.97, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " kwArgs['macros'] = self._macros"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2367_C8", "label": "if", "type": "if", "loc": [2367, 2368], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [4, 2, 0.8897, 0.0008, 2, 0.54, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'compilerSettings' in availableKwArgs:\n kwArgs['compilerSettings'] = self.settings()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2368_C12", "label": " = settings()", "type": "assigned_variable", "loc": [2368, 2368], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2367_C8", "vector": [14, 3, 0.8899, 0.0004, 3, 0.32, 0.0, 0, 3, 0, 0, 0, 168, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "settings", "annotation": ""}, "snippet": " kwArgs['compilerSettings'] = self.settings()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2369_C8", "label": "if", "type": "if", "loc": [2369, 2370], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [4, 2, 0.8905, 0.0008, 2, 0.54, 0.5333, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'isShortForm' in availableKwArgs:\n kwArgs['isShortForm'] = isShortForm"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2370_C12", "label": "assign", "type": "assigned_variable", "loc": [2370, 2370], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2369_C8", "vector": [14, 3, 0.8906, 0.0004, 3, 0.42, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " kwArgs['isShortForm'] = isShortForm"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2371_C8", "label": "if", "type": "if", "loc": [2371, 2372], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [4, 2, 0.8912, 0.0008, 2, 0.54, 0.5667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isShortForm and 'EOLCharsInShortForm' in availableKwArgs:\n kwArgs['EOLCharsInShortForm'] = EOLCharsInShortForm"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2372_C12", "label": "assign", "type": "assigned_variable", "loc": [2372, 2372], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2371_C8", "vector": [14, 3, 0.8914, 0.0004, 3, 0.16, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " kwArgs['EOLCharsInShortForm'] = EOLCharsInShortForm"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2374_C8", "label": "if", "type": "if", "loc": [2374, 2375], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [4, 2, 0.8923, 0.0008, 2, 0.54, 0.6, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'startPos' in availableKwArgs:\n kwArgs['startPos'] = startPos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2375_C12", "label": "assign", "type": "assigned_variable", "loc": [2375, 2375], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2374_C8", "vector": [14, 3, 0.8925, 0.0004, 3, 0.48, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " kwArgs['startPos'] = startPos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2376_C8", "label": "if", "type": "if", "loc": [2376, 2377], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [4, 2, 0.8931, 0.0008, 2, 0.54, 0.6333, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'endPos' in availableKwArgs:\n kwArgs['endPos'] = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2377_C12", "label": " = pos()", "type": "assigned_variable", "loc": [2377, 2377], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2376_C8", "vector": [14, 3, 0.8933, 0.0004, 3, 0.4, 0.0, 0, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " kwArgs['endPos'] = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2379_C8", "label": "srcFromMacroOutput = macro()", "type": "assigned_variable", "loc": [2379, 2379], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [14, 2, 0.894, 0.0004, 2, 0.54, 0.6667, 695, 3, 1, 0, 0, 518, 10, 1], "semantic": {"name": "srcFromMacroOutput", "arg_names": [], "import_names": [], "rhs_call_name": "macro", "annotation": ""}, "snippet": " srcFromMacroOutput = macro(**kwArgs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2381_C8", "label": "origParseSrc =", "type": "assigned_variable", "loc": [2381, 2381], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [14, 2, 0.8948, 0.0004, 2, 0.54, 0.7, 852, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "origParseSrc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " origParseSrc = self._src"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2382_C8", "label": "origBreakPoint = breakPoint()", "type": "assigned_variable", "loc": [2382, 2382], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [14, 2, 0.8952, 0.0004, 2, 0.54, 0.7333, 866, 3, 0, 0, 0, 691, 10, 1], "semantic": {"name": "origBreakPoint", "arg_names": [], "import_names": [], "rhs_call_name": "breakPoint", "annotation": ""}, "snippet": " origBreakPoint = self.breakPoint()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2383_C8", "label": "origPos = pos()", "type": "assigned_variable", "loc": [2383, 2383], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [14, 2, 0.8955, 0.0004, 2, 0.54, 0.7667, 830, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "origPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " origPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2386_C8", "label": "self._src =", "type": "assigned_variable", "loc": [2386, 2386], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [14, 2, 0.8967, 0.0004, 2, 0.54, 0.8, 8, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._src", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._src = srcFromMacroOutput"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2387_C8", "label": "setPos()", "type": "expression", "loc": [2387, 2387], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [8, 2, 0.897, 0.0004, 2, 0.54, 0.8333, 659, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2388_C8", "label": "setBreakPoint()", "type": "expression", "loc": [2388, 2388], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [8, 2, 0.8974, 0.0004, 2, 0.54, 0.8667, 285, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setBreakPoint", "arg_names": [], "import_names": [], "rhs_call_name": "setBreakPoint", "annotation": ""}, "snippet": " self.setBreakPoint(len(srcFromMacroOutput))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2390_C8", "label": "parse()", "type": "expression", "loc": [2390, 2390], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [8, 2, 0.8982, 0.0004, 2, 0.54, 0.9, 678, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "parse", "arg_names": [], "import_names": [], "rhs_call_name": "parse", "annotation": ""}, "snippet": " self.parse(assertEmptyStack=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2392_C8", "label": "self._src =", "type": "assigned_variable", "loc": [2392, 2392], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [14, 2, 0.8989, 0.0004, 2, 0.54, 0.9333, 8, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._src", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._src = origParseSrc"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2393_C8", "label": "setBreakPoint()", "type": "expression", "loc": [2393, 2393], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [8, 2, 0.8993, 0.0004, 2, 0.54, 0.9667, 285, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setBreakPoint", "arg_names": [], "import_names": [], "rhs_call_name": "setBreakPoint", "annotation": ""}, "snippet": " self.setBreakPoint(origBreakPoint)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2394_C8", "label": "setPos()", "type": "expression", "loc": [2394, 2394], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "vector": [8, 2, 0.8997, 0.0004, 2, 0.54, 1.0, 659, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setPos", "arg_names": [], "import_names": [], "rhs_call_name": "setPos", "annotation": ""}, "snippet": " self.setPos(origPos) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "label": "eatCache", "type": "function", "loc": [2399, 2426], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.9066, 0.0105, 1, 0.84, 0.807, 124, 0, 1, 0, 0, 0, 0, 24], "semantic": {"name": "eatCache", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatCache(self):\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLinePos = self.findEOL()\n lineCol = self.getRowCol()\n self.getDirectiveStartToken()\n self.advance(len('cache'))\n\n startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2400_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [2400, 2400], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "vector": [14, 2, 0.9019, 0.0004, 2, 0.57, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2401_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [2401, 2401], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "vector": [14, 2, 0.9023, 0.0004, 2, 0.57, 0.1111, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2402_C8", "label": "lineCol = getRowCol()", "type": "assigned_variable", "loc": [2402, 2402], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "vector": [14, 2, 0.9027, 0.0004, 2, 0.57, 0.2222, 562, 3, 0, 0, 0, 946, 10, 1], "semantic": {"name": "lineCol", "arg_names": [], "import_names": [], "rhs_call_name": "getRowCol", "annotation": ""}, "snippet": " lineCol = self.getRowCol()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2403_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [2403, 2403], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "vector": [8, 2, 0.903, 0.0004, 2, 0.57, 0.3333, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2404_C8", "label": "advance()", "type": "expression", "loc": [2404, 2404], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "vector": [8, 2, 0.9034, 0.0004, 2, 0.57, 0.4444, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('cache'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2406_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [2406, 2406], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "vector": [14, 2, 0.9042, 0.0004, 2, 0.57, 0.5556, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2407_C8", "label": "argList = getDefArgList()", "type": "assigned_variable", "loc": [2407, 2407], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "vector": [14, 2, 0.9045, 0.0004, 2, 0.57, 0.6667, 566, 3, 1, 0, 0, 197, 10, 1], "semantic": {"name": "argList", "arg_names": [], "import_names": [], "rhs_call_name": "getDefArgList", "annotation": ""}, "snippet": " argList = self.getDefArgList(useNameMapper=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2408_C8", "label": "argList = _applyExpressionFilters()", "type": "assigned_variable", "loc": [2408, 2408], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "vector": [14, 2, 0.9049, 0.0004, 2, 0.57, 0.7778, 566, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "argList", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " argList = self._applyExpressionFilters(argList, 'cache', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2410_C8", "label": "startCache", "type": "function", "loc": [2410, 2412], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "vector": [2, 2, 0.9061, 0.0011, 2, 0.57, 0.8889, 447, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "startCache", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def startCache():\n cacheInfo = self._compiler.genCacheInfoFromArgList(argList)\n self._compiler.startCacheRegion(cacheInfo, lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2411_C12", "label": "cacheInfo = genCacheInfoFromArgList()", "type": "assigned_variable", "loc": [2411, 2411], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2410_C8", "vector": [14, 3, 0.9061, 0.0004, 3, 0.55, 0.0, 241, 3, 1, 0, 0, 989, 10, 1], "semantic": {"name": "cacheInfo", "arg_names": [], "import_names": [], "rhs_call_name": "genCacheInfoFromArgList", "annotation": ""}, "snippet": " cacheInfo = self._compiler.genCacheInfoFromArgList(argList)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2412_C12", "label": "startCacheRegion()", "type": "expression", "loc": [2412, 2412], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2410_C8", "vector": [8, 3, 0.9064, 0.0004, 3, 0.55, 1.0, 609, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "startCacheRegion", "arg_names": [], "import_names": [], "rhs_call_name": "startCacheRegion", "annotation": ""}, "snippet": " self._compiler.startCacheRegion(cacheInfo, lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "label": "if", "type": "if", "loc": [2414, 2426], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "vector": [4, 2, 0.9094, 0.0049, 2, 0.57, 1.0, 0, 3, 0, 0, 0, 0, 0, 13], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchColonForSingleLineShortFormDirective(): \n self.advance() # skip over :\n self.getWhiteSpace(max=1)\n startCache()\n self.parse(breakPoint=self.findEOL(gobble=True))\n self._compiler.endCacheRegion()\n else:\n if self.peek()==':':"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2415_C12", "label": "advance()", "type": "expression", "loc": [2415, 2415], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "vector": [8, 3, 0.9076, 0.0004, 3, 0.84, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance() # skip over :"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2416_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2416, 2416], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "vector": [8, 3, 0.9079, 0.0004, 3, 0.84, 0.1111, 84, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace(max=1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2417_C12", "label": "startCache()", "type": "expression", "loc": [2417, 2417], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "vector": [8, 3, 0.9083, 0.0004, 3, 0.84, 0.2222, 447, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "startCache", "arg_names": [], "import_names": [], "rhs_call_name": "startCache", "annotation": ""}, "snippet": " startCache()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2418_C12", "label": "parse()", "type": "expression", "loc": [2418, 2418], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "vector": [8, 3, 0.9087, 0.0004, 3, 0.84, 0.3333, 678, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "parse", "arg_names": [], "import_names": [], "rhs_call_name": "parse", "annotation": ""}, "snippet": " self.parse(breakPoint=self.findEOL(gobble=True))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2419_C12", "label": "endCacheRegion()", "type": "expression", "loc": [2419, 2419], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "vector": [8, 3, 0.9091, 0.0004, 3, 0.84, 0.4444, 281, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "endCacheRegion", "arg_names": [], "import_names": [], "rhs_call_name": "endCacheRegion", "annotation": ""}, "snippet": " self._compiler.endCacheRegion()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2421_C12", "label": "if", "type": "if", "loc": [2421, 2422], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "vector": [4, 3, 0.91, 0.0008, 3, 0.84, 0.5556, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek()==':':\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2422_C16", "label": "advance()", "type": "expression", "loc": [2422, 2422], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2421_C12", "vector": [8, 4, 0.9102, 0.0004, 4, 0.68, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2423_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2423, 2423], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "vector": [8, 3, 0.9106, 0.0004, 3, 0.84, 0.6667, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2424_C12", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2424, 2424], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "vector": [8, 3, 0.9109, 0.0004, 3, 0.84, 0.7778, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2425_C12", "label": "pushToOpenDirectivesStack()", "type": "expression", "loc": [2425, 2425], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "vector": [8, 3, 0.9113, 0.0004, 3, 0.84, 0.8889, 853, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "pushToOpenDirectivesStack", "arg_names": [], "import_names": [], "rhs_call_name": "pushToOpenDirectivesStack", "annotation": ""}, "snippet": " self.pushToOpenDirectivesStack('cache')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2426_C12", "label": "startCache()", "type": "expression", "loc": [2426, 2426], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "vector": [8, 3, 0.9117, 0.0004, 3, 0.84, 1.0, 447, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "startCache", "arg_names": [], "import_names": [], "rhs_call_name": "startCache", "annotation": ""}, "snippet": " startCache() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "label": "eatCall", "type": "function", "loc": [2428, 2462], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.9188, 0.0132, 1, 0.84, 0.8246, 541, 0, 1, 0, 0, 0, 0, 32], "semantic": {"name": "eatCall", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatCall(self):\n # @@TR: need to enable single line version of this\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLinePos = self.findEOL()\n lineCol = self.getRowCol()\n self.getDirectiveStartToken()\n self.advance(len('call'))\n startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2430_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [2430, 2430], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "vector": [14, 2, 0.9132, 0.0004, 2, 0.48, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2431_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [2431, 2431], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "vector": [14, 2, 0.9136, 0.0004, 2, 0.48, 0.0714, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2432_C8", "label": "lineCol = getRowCol()", "type": "assigned_variable", "loc": [2432, 2432], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "vector": [14, 2, 0.9139, 0.0004, 2, 0.48, 0.1429, 562, 3, 0, 0, 0, 946, 10, 1], "semantic": {"name": "lineCol", "arg_names": [], "import_names": [], "rhs_call_name": "getRowCol", "annotation": ""}, "snippet": " lineCol = self.getRowCol()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2433_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [2433, 2433], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "vector": [8, 2, 0.9143, 0.0004, 2, 0.48, 0.2143, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2434_C8", "label": "advance()", "type": "expression", "loc": [2434, 2434], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "vector": [8, 2, 0.9147, 0.0004, 2, 0.48, 0.2857, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('call'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2435_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [2435, 2435], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "vector": [14, 2, 0.9151, 0.0004, 2, 0.48, 0.3571, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2437_C8", "label": "useAutocallingOrig = setting()", "type": "assigned_variable", "loc": [2437, 2437], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "vector": [14, 2, 0.9158, 0.0004, 2, 0.48, 0.4286, 617, 3, 1, 0, 0, 368, 10, 1], "semantic": {"name": "useAutocallingOrig", "arg_names": [], "import_names": [], "rhs_call_name": "setting", "annotation": ""}, "snippet": " useAutocallingOrig = self.setting('useAutocalling')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2438_C8", "label": "setSetting()", "type": "expression", "loc": [2438, 2438], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "vector": [8, 2, 0.9162, 0.0004, 2, 0.48, 0.5, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self.setSetting('useAutocalling', False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2439_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2439, 2439], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "vector": [8, 2, 0.9166, 0.0004, 2, 0.48, 0.5714, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2440_C8", "label": "if", "type": "if", "loc": [2440, 2443], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "vector": [4, 2, 0.9175, 0.0015, 2, 0.48, 0.6429, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchCheetahVarStart():\n functionName = self.getCheetahVar()\n else:\n functionName = self.getCheetahVar(plain=True, skipStartToken=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2441_C12", "label": "functionName = getCheetahVar()", "type": "assigned_variable", "loc": [2441, 2441], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2440_C8", "vector": [14, 3, 0.9173, 0.0004, 3, 0.09, 0.0, 61, 3, 0, 0, 0, 741, 10, 1], "semantic": {"name": "functionName", "arg_names": [], "import_names": [], "rhs_call_name": "getCheetahVar", "annotation": ""}, "snippet": " functionName = self.getCheetahVar()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2443_C12", "label": "functionName = getCheetahVar()", "type": "assigned_variable", "loc": [2443, 2443], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2440_C8", "vector": [14, 3, 0.9181, 0.0004, 3, 0.09, 1.0, 61, 3, 2, 0, 0, 741, 10, 1], "semantic": {"name": "functionName", "arg_names": [], "import_names": [], "rhs_call_name": "getCheetahVar", "annotation": ""}, "snippet": " functionName = self.getCheetahVar(plain=True, skipStartToken=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2444_C8", "label": "setSetting()", "type": "expression", "loc": [2444, 2444], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "vector": [8, 2, 0.9185, 0.0004, 2, 0.48, 0.7143, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self.setSetting('useAutocalling', useAutocallingOrig)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2446_C8", "label": "_applyExpressionFilters()", "type": "expression", "loc": [2446, 2446], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "vector": [8, 2, 0.9192, 0.0004, 2, 0.48, 0.7857, 289, 3, 3, 0, 0, 0, 0, 2], "semantic": {"name": "_applyExpressionFilters", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " self._applyExpressionFilters(self[startPos:self.pos()], 'call', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2448_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2448, 2448], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "vector": [8, 2, 0.92, 0.0004, 2, 0.48, 0.8571, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2449_C8", "label": "args = strip()", "type": "assigned_variable", "loc": [2449, 2449], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "vector": [14, 2, 0.9203, 0.0004, 2, 0.48, 0.9286, 805, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "args", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " args = self.getExpression(pyTokensToBreakAt=[':']).strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "label": "if", "type": "if", "loc": [2450, 2462], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "vector": [4, 2, 0.923, 0.0049, 2, 0.48, 1.0, 0, 3, 0, 0, 0, 0, 0, 13], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchColonForSingleLineShortFormDirective():\n self.advance() # skip over :\n self._compiler.startCallRegion(functionName, args, lineCol)\n self.getWhiteSpace(max=1)\n self.parse(breakPoint=self.findEOL(gobble=False))\n self._compiler.endCallRegion()\n else:\n if self.peek()==':':"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2451_C12", "label": "advance()", "type": "expression", "loc": [2451, 2451], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "vector": [8, 3, 0.9211, 0.0004, 3, 0.41, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance() # skip over :"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2452_C12", "label": "startCallRegion()", "type": "expression", "loc": [2452, 2452], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "vector": [8, 3, 0.9215, 0.0004, 3, 0.41, 0.1111, 586, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "startCallRegion", "arg_names": [], "import_names": [], "rhs_call_name": "startCallRegion", "annotation": ""}, "snippet": " self._compiler.startCallRegion(functionName, args, lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2453_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2453, 2453], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "vector": [8, 3, 0.9218, 0.0004, 3, 0.41, 0.2222, 84, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace(max=1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2454_C12", "label": "parse()", "type": "expression", "loc": [2454, 2454], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "vector": [8, 3, 0.9222, 0.0004, 3, 0.41, 0.3333, 678, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "parse", "arg_names": [], "import_names": [], "rhs_call_name": "parse", "annotation": ""}, "snippet": " self.parse(breakPoint=self.findEOL(gobble=False))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2455_C12", "label": "endCallRegion()", "type": "expression", "loc": [2455, 2455], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "vector": [8, 3, 0.9226, 0.0004, 3, 0.41, 0.4444, 789, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "endCallRegion", "arg_names": [], "import_names": [], "rhs_call_name": "endCallRegion", "annotation": ""}, "snippet": " self._compiler.endCallRegion()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2457_C12", "label": "if", "type": "if", "loc": [2457, 2458], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "vector": [4, 3, 0.9235, 0.0008, 3, 0.41, 0.5556, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek()==':':\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2458_C16", "label": "advance()", "type": "expression", "loc": [2458, 2458], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2457_C12", "vector": [8, 4, 0.9237, 0.0004, 4, 0.25, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2459_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2459, 2459], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "vector": [8, 3, 0.9241, 0.0004, 3, 0.41, 0.6667, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2460_C12", "label": "pushToOpenDirectivesStack()", "type": "expression", "loc": [2460, 2460], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "vector": [8, 3, 0.9245, 0.0004, 3, 0.41, 0.7778, 853, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "pushToOpenDirectivesStack", "arg_names": [], "import_names": [], "rhs_call_name": "pushToOpenDirectivesStack", "annotation": ""}, "snippet": " self.pushToOpenDirectivesStack(\"call\") "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2461_C12", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2461, 2461], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "vector": [8, 3, 0.9248, 0.0004, 3, 0.41, 0.8889, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2462_C12", "label": "startCallRegion()", "type": "expression", "loc": [2462, 2462], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "vector": [8, 3, 0.9252, 0.0004, 3, 0.41, 1.0, 586, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "startCallRegion", "arg_names": [], "import_names": [], "rhs_call_name": "startCallRegion", "annotation": ""}, "snippet": " self._compiler.startCallRegion(functionName, args, lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "label": "eatCallArg", "type": "function", "loc": [2464, 2480], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.929, 0.0064, 1, 0.84, 0.8421, 811, 0, 1, 0, 0, 0, 0, 15], "semantic": {"name": "eatCallArg", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatCallArg(self):\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLinePos = self.findEOL()\n lineCol = self.getRowCol()\n self.getDirectiveStartToken()\n\n self.advance(len('arg'))\n startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2465_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [2465, 2465], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "vector": [14, 2, 0.9263, 0.0004, 2, 0.67, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2466_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [2466, 2466], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "vector": [14, 2, 0.9267, 0.0004, 2, 0.67, 0.0909, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2467_C8", "label": "lineCol = getRowCol()", "type": "assigned_variable", "loc": [2467, 2467], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "vector": [14, 2, 0.9271, 0.0004, 2, 0.67, 0.1818, 562, 3, 0, 0, 0, 946, 10, 1], "semantic": {"name": "lineCol", "arg_names": [], "import_names": [], "rhs_call_name": "getRowCol", "annotation": ""}, "snippet": " lineCol = self.getRowCol()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2468_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [2468, 2468], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "vector": [8, 2, 0.9275, 0.0004, 2, 0.67, 0.2727, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2470_C8", "label": "advance()", "type": "expression", "loc": [2470, 2470], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "vector": [8, 2, 0.9282, 0.0004, 2, 0.67, 0.3636, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('arg'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2471_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [2471, 2471], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "vector": [14, 2, 0.9286, 0.0004, 2, 0.67, 0.4545, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2472_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2472, 2472], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "vector": [8, 2, 0.929, 0.0004, 2, 0.67, 0.5455, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2473_C8", "label": "argName = getIdentifier()", "type": "assigned_variable", "loc": [2473, 2473], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "vector": [14, 2, 0.9293, 0.0004, 2, 0.67, 0.6364, 599, 3, 0, 0, 0, 419, 10, 1], "semantic": {"name": "argName", "arg_names": [], "import_names": [], "rhs_call_name": "getIdentifier", "annotation": ""}, "snippet": " argName = self.getIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2474_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2474, 2474], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "vector": [8, 2, 0.9297, 0.0004, 2, 0.67, 0.7273, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2475_C8", "label": "argName = _applyExpressionFilters()", "type": "assigned_variable", "loc": [2475, 2475], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "vector": [14, 2, 0.9301, 0.0004, 2, 0.67, 0.8182, 599, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "argName", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " argName = self._applyExpressionFilters(argName, 'arg', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2476_C8", "label": "setCallArg()", "type": "expression", "loc": [2476, 2476], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "vector": [8, 2, 0.9305, 0.0004, 2, 0.67, 0.9091, 867, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setCallArg", "arg_names": [], "import_names": [], "rhs_call_name": "setCallArg", "annotation": ""}, "snippet": " self._compiler.setCallArg(argName, lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2477_C8", "label": "if", "type": "if", "loc": [2477, 2480], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "vector": [4, 2, 0.9314, 0.0015, 2, 0.67, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek() == ':':\n self.getc()\n else: \n self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2478_C12", "label": "getc()", "type": "expression", "loc": [2478, 2478], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2477_C8", "vector": [8, 3, 0.9312, 0.0004, 3, 0.55, 0.0, 827, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getc", "arg_names": [], "import_names": [], "rhs_call_name": "getc", "annotation": ""}, "snippet": " self.getc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2480_C12", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2480, 2480], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2477_C8", "vector": [8, 3, 0.932, 0.0004, 3, 0.55, 1.0, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "label": "eatFilter", "type": "function", "loc": [2482, 2511], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.9382, 0.0113, 1, 0.84, 0.8596, 6, 0, 1, 0, 0, 0, 0, 25], "semantic": {"name": "eatFilter", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatFilter(self):\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLinePos = self.findEOL()\n\n self.getDirectiveStartToken()\n self.advance(len('filter'))\n self.getWhiteSpace()\n startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2483_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [2483, 2483], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "vector": [14, 2, 0.9331, 0.0004, 2, 0.79, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2484_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [2484, 2484], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "vector": [14, 2, 0.9335, 0.0004, 2, 0.79, 0.125, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2486_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [2486, 2486], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "vector": [8, 2, 0.9342, 0.0004, 2, 0.79, 0.25, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2487_C8", "label": "advance()", "type": "expression", "loc": [2487, 2487], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "vector": [8, 2, 0.9346, 0.0004, 2, 0.79, 0.375, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('filter'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2488_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2488, 2488], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "vector": [8, 2, 0.935, 0.0004, 2, 0.79, 0.5, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2489_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [2489, 2489], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "vector": [14, 2, 0.9354, 0.0004, 2, 0.79, 0.625, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2490_C8", "label": "if", "type": "if", "loc": [2490, 2496], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "vector": [4, 2, 0.9369, 0.0026, 2, 0.79, 0.75, 0, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchCheetahVarStart():\n isKlass = True\n theFilter = self.getExpression(pyTokensToBreakAt=[':'])\n else:\n isKlass = False\n theFilter = self.getIdentifier()\n self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2491_C12", "label": "isKlass =", "type": "assigned_variable", "loc": [2491, 2491], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2490_C8", "vector": [14, 3, 0.9361, 0.0004, 3, 0.24, 0.0, 964, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "isKlass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isKlass = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2492_C12", "label": "theFilter = getExpression()", "type": "assigned_variable", "loc": [2492, 2492], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2490_C8", "vector": [14, 3, 0.9365, 0.0004, 3, 0.24, 0.25, 325, 3, 1, 0, 0, 119, 10, 1], "semantic": {"name": "theFilter", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " theFilter = self.getExpression(pyTokensToBreakAt=[':'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2494_C12", "label": "isKlass =", "type": "assigned_variable", "loc": [2494, 2494], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2490_C8", "vector": [14, 3, 0.9372, 0.0004, 3, 0.24, 0.5, 964, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "isKlass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isKlass = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2495_C12", "label": "theFilter = getIdentifier()", "type": "assigned_variable", "loc": [2495, 2495], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2490_C8", "vector": [14, 3, 0.9376, 0.0004, 3, 0.24, 0.75, 325, 3, 0, 0, 0, 419, 10, 1], "semantic": {"name": "theFilter", "arg_names": [], "import_names": [], "rhs_call_name": "getIdentifier", "annotation": ""}, "snippet": " theFilter = self.getIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2496_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2496, 2496], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2490_C8", "vector": [8, 3, 0.938, 0.0004, 3, 0.24, 1.0, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2497_C8", "label": "theFilter = _applyExpressionFilters()", "type": "assigned_variable", "loc": [2497, 2497], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "vector": [14, 2, 0.9384, 0.0004, 2, 0.79, 0.875, 325, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "theFilter", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " theFilter = self._applyExpressionFilters(theFilter, 'filter', startPos=startPos) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "label": "if", "type": "if", "loc": [2499, 2511], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "vector": [4, 2, 0.9414, 0.0049, 2, 0.79, 1.0, 0, 3, 0, 0, 0, 0, 0, 13], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchColonForSingleLineShortFormDirective():\n self.advance() # skip over :\n self.getWhiteSpace(max=1) \n self._compiler.setFilter(theFilter, isKlass)\n self.parse(breakPoint=self.findEOL(gobble=False))\n self._compiler.closeFilterBlock()\n else:\n if self.peek()==':':"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2500_C12", "label": "advance()", "type": "expression", "loc": [2500, 2500], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "vector": [8, 3, 0.9395, 0.0004, 3, 0.07, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance() # skip over :"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2501_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2501, 2501], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "vector": [8, 3, 0.9399, 0.0004, 3, 0.07, 0.1111, 84, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace(max=1) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2502_C12", "label": "setFilter()", "type": "expression", "loc": [2502, 2502], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "vector": [8, 3, 0.9402, 0.0004, 3, 0.07, 0.2222, 941, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setFilter", "arg_names": [], "import_names": [], "rhs_call_name": "setFilter", "annotation": ""}, "snippet": " self._compiler.setFilter(theFilter, isKlass)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2503_C12", "label": "parse()", "type": "expression", "loc": [2503, 2503], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "vector": [8, 3, 0.9406, 0.0004, 3, 0.07, 0.3333, 678, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "parse", "arg_names": [], "import_names": [], "rhs_call_name": "parse", "annotation": ""}, "snippet": " self.parse(breakPoint=self.findEOL(gobble=False))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2504_C12", "label": "closeFilterBlock()", "type": "expression", "loc": [2504, 2504], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "vector": [8, 3, 0.941, 0.0004, 3, 0.07, 0.4444, 141, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "closeFilterBlock", "arg_names": [], "import_names": [], "rhs_call_name": "closeFilterBlock", "annotation": ""}, "snippet": " self._compiler.closeFilterBlock()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2506_C12", "label": "if", "type": "if", "loc": [2506, 2507], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "vector": [4, 3, 0.9419, 0.0008, 3, 0.07, 0.5556, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek()==':':\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2507_C16", "label": "advance()", "type": "expression", "loc": [2507, 2507], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2506_C12", "vector": [8, 4, 0.9421, 0.0004, 4, 0.62, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2508_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2508, 2508], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "vector": [8, 3, 0.9425, 0.0004, 3, 0.07, 0.6667, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2509_C12", "label": "pushToOpenDirectivesStack()", "type": "expression", "loc": [2509, 2509], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "vector": [8, 3, 0.9429, 0.0004, 3, 0.07, 0.7778, 853, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "pushToOpenDirectivesStack", "arg_names": [], "import_names": [], "rhs_call_name": "pushToOpenDirectivesStack", "annotation": ""}, "snippet": " self.pushToOpenDirectivesStack(\"filter\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2510_C12", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2510, 2510], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "vector": [8, 3, 0.9433, 0.0004, 3, 0.07, 0.8889, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2511_C12", "label": "setFilter()", "type": "expression", "loc": [2511, 2511], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "vector": [8, 3, 0.9436, 0.0004, 3, 0.07, 1.0, 941, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setFilter", "arg_names": [], "import_names": [], "rhs_call_name": "setFilter", "annotation": ""}, "snippet": " self._compiler.setFilter(theFilter, isKlass) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "label": "eatTransform", "type": "function", "loc": [2513, 2534], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.9483, 0.0083, 1, 0.84, 0.8772, 694, 0, 1, 0, 0, 0, 0, 17], "semantic": {"name": "eatTransform", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatTransform(self):\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLinePos = self.findEOL()\n\n self.getDirectiveStartToken()\n self.advance(len('transform'))\n self.getWhiteSpace()\n startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2514_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [2514, 2514], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "vector": [14, 2, 0.9448, 0.0004, 2, 0.71, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2515_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [2515, 2515], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "vector": [14, 2, 0.9451, 0.0004, 2, 0.71, 0.0909, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2517_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [2517, 2517], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "vector": [8, 2, 0.9459, 0.0004, 2, 0.71, 0.1818, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2518_C8", "label": "advance()", "type": "expression", "loc": [2518, 2518], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "vector": [8, 2, 0.9463, 0.0004, 2, 0.71, 0.2727, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('transform'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2519_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2519, 2519], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "vector": [8, 2, 0.9466, 0.0004, 2, 0.71, 0.3636, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2520_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [2520, 2520], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "vector": [14, 2, 0.947, 0.0004, 2, 0.71, 0.4545, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2521_C8", "label": "if", "type": "if", "loc": [2521, 2527], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "vector": [4, 2, 0.9485, 0.0026, 2, 0.71, 0.5455, 0, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchCheetahVarStart():\n isKlass = True\n transformer = self.getExpression(pyTokensToBreakAt=[':'])\n else:\n isKlass = False\n transformer = self.getIdentifier()\n self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2522_C12", "label": "isKlass =", "type": "assigned_variable", "loc": [2522, 2522], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2521_C8", "vector": [14, 3, 0.9478, 0.0004, 3, 0.73, 0.0, 964, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "isKlass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isKlass = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2523_C12", "label": "transformer = getExpression()", "type": "assigned_variable", "loc": [2523, 2523], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2521_C8", "vector": [14, 3, 0.9481, 0.0004, 3, 0.73, 0.25, 160, 3, 1, 0, 0, 119, 10, 1], "semantic": {"name": "transformer", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " transformer = self.getExpression(pyTokensToBreakAt=[':'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2525_C12", "label": "isKlass =", "type": "assigned_variable", "loc": [2525, 2525], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2521_C8", "vector": [14, 3, 0.9489, 0.0004, 3, 0.73, 0.5, 964, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "isKlass", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isKlass = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2526_C12", "label": "transformer = getIdentifier()", "type": "assigned_variable", "loc": [2526, 2526], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2521_C8", "vector": [14, 3, 0.9493, 0.0004, 3, 0.73, 0.75, 160, 3, 0, 0, 0, 419, 10, 1], "semantic": {"name": "transformer", "arg_names": [], "import_names": [], "rhs_call_name": "getIdentifier", "annotation": ""}, "snippet": " transformer = self.getIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2527_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2527, 2527], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2521_C8", "vector": [8, 3, 0.9496, 0.0004, 3, 0.73, 1.0, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2528_C8", "label": "transformer = _applyExpressionFilters()", "type": "assigned_variable", "loc": [2528, 2528], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "vector": [14, 2, 0.95, 0.0004, 2, 0.71, 0.6364, 160, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "transformer", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " transformer = self._applyExpressionFilters(transformer, 'transform', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2530_C8", "label": "if", "type": "if", "loc": [2530, 2531], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "vector": [4, 2, 0.951, 0.0008, 2, 0.71, 0.7273, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek()==':':\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2531_C12", "label": "advance()", "type": "expression", "loc": [2531, 2531], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2530_C8", "vector": [8, 3, 0.9511, 0.0004, 3, 0.81, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2532_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2532, 2532], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "vector": [8, 2, 0.9515, 0.0004, 2, 0.71, 0.8182, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2533_C8", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2533, 2533], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "vector": [8, 2, 0.9519, 0.0004, 2, 0.71, 0.9091, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2534_C8", "label": "setTransform()", "type": "expression", "loc": [2534, 2534], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "vector": [8, 2, 0.9523, 0.0004, 2, 0.71, 1.0, 58, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setTransform", "arg_names": [], "import_names": [], "rhs_call_name": "setTransform", "annotation": ""}, "snippet": " self._compiler.setTransform(transformer, isKlass)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "label": "eatErrorCatcher", "type": "function", "loc": [2537, 2548], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.9555, 0.0045, 1, 0.84, 0.8947, 868, 0, 1, 0, 0, 0, 0, 11], "semantic": {"name": "eatErrorCatcher", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatErrorCatcher(self):\n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLinePos = self.findEOL()\n self.getDirectiveStartToken()\n self.advance(len('errorCatcher'))\n self.getWhiteSpace()\n startPos = self.pos()\n errorCatcherName = self.getIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2538_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [2538, 2538], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "vector": [14, 2, 0.9538, 0.0004, 2, 0.15, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2539_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [2539, 2539], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "vector": [14, 2, 0.9542, 0.0004, 2, 0.15, 0.1111, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2540_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [2540, 2540], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "vector": [8, 2, 0.9545, 0.0004, 2, 0.15, 0.2222, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2541_C8", "label": "advance()", "type": "expression", "loc": [2541, 2541], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "vector": [8, 2, 0.9549, 0.0004, 2, 0.15, 0.3333, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('errorCatcher'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2542_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2542, 2542], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "vector": [8, 2, 0.9553, 0.0004, 2, 0.15, 0.4444, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2543_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [2543, 2543], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "vector": [14, 2, 0.9557, 0.0004, 2, 0.15, 0.5556, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2544_C8", "label": "errorCatcherName = getIdentifier()", "type": "assigned_variable", "loc": [2544, 2544], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "vector": [14, 2, 0.956, 0.0004, 2, 0.15, 0.6667, 525, 3, 0, 0, 0, 419, 10, 1], "semantic": {"name": "errorCatcherName", "arg_names": [], "import_names": [], "rhs_call_name": "getIdentifier", "annotation": ""}, "snippet": " errorCatcherName = self.getIdentifier()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2545_C8", "label": "errorCatcherName = _applyExpressionFilters()", "type": "assigned_variable", "loc": [2545, 2546], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "vector": [14, 2, 0.9566, 0.0008, 2, 0.15, 0.7778, 525, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "errorCatcherName", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " errorCatcherName = self._applyExpressionFilters(\n errorCatcherName, 'errorcatcher', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2547_C8", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2547, 2547], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "vector": [8, 2, 0.9572, 0.0004, 2, 0.15, 0.8889, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2548_C8", "label": "setErrorCatcher()", "type": "expression", "loc": [2548, 2548], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "vector": [8, 2, 0.9575, 0.0004, 2, 0.15, 1.0, 508, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setErrorCatcher", "arg_names": [], "import_names": [], "rhs_call_name": "setErrorCatcher", "annotation": ""}, "snippet": " self._compiler.setErrorCatcher(errorCatcherName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "label": "eatCapture", "type": "function", "loc": [2550, 2576], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.9632, 0.0101, 1, 0.84, 0.9123, 204, 0, 1, 0, 0, 0, 0, 23], "semantic": {"name": "eatCapture", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatCapture(self):\n # @@TR: this could be refactored to use the code in eatSimpleIndentingDirective\n # filtered \n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLinePos = self.findEOL()\n lineCol = self.getRowCol()\n\n self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2553_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [2553, 2553], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "vector": [14, 2, 0.9594, 0.0004, 2, 0.15, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2554_C8", "label": "endOfFirstLinePos = findEOL()", "type": "assigned_variable", "loc": [2554, 2554], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "vector": [14, 2, 0.9598, 0.0004, 2, 0.15, 0.1111, 364, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLinePos", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLinePos = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2555_C8", "label": "lineCol = getRowCol()", "type": "assigned_variable", "loc": [2555, 2555], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "vector": [14, 2, 0.9602, 0.0004, 2, 0.15, 0.2222, 562, 3, 0, 0, 0, 946, 10, 1], "semantic": {"name": "lineCol", "arg_names": [], "import_names": [], "rhs_call_name": "getRowCol", "annotation": ""}, "snippet": " lineCol = self.getRowCol()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2557_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [2557, 2557], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "vector": [8, 2, 0.9609, 0.0004, 2, 0.15, 0.3333, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2558_C8", "label": "advance()", "type": "expression", "loc": [2558, 2558], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "vector": [8, 2, 0.9613, 0.0004, 2, 0.15, 0.4444, 341, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance(len('capture')) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2559_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [2559, 2559], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "vector": [14, 2, 0.9617, 0.0004, 2, 0.15, 0.5556, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2560_C8", "label": "getWhiteSpace()", "type": "expression", "loc": [2560, 2560], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "vector": [8, 2, 0.962, 0.0004, 2, 0.15, 0.6667, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2562_C8", "label": "expr = getExpression()", "type": "assigned_variable", "loc": [2562, 2562], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "vector": [14, 2, 0.9628, 0.0004, 2, 0.15, 0.7778, 236, 3, 1, 0, 0, 119, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "getExpression", "annotation": ""}, "snippet": " expr = self.getExpression(pyTokensToBreakAt=[':'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2563_C8", "label": "expr = _applyExpressionFilters()", "type": "assigned_variable", "loc": [2563, 2563], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "vector": [14, 2, 0.9632, 0.0004, 2, 0.15, 0.8889, 236, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " expr = self._applyExpressionFilters(expr, 'capture', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "label": "if", "type": "if", "loc": [2564, 2576], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "vector": [4, 2, 0.9658, 0.0049, 2, 0.15, 1.0, 0, 3, 0, 0, 0, 0, 0, 13], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.matchColonForSingleLineShortFormDirective():\n self.advance() # skip over :\n self._compiler.startCaptureRegion(assignTo=expr, lineCol=lineCol)\n self.getWhiteSpace(max=1)\n self.parse(breakPoint=self.findEOL(gobble=False))\n self._compiler.endCaptureRegion()\n else:\n if self.peek()==':':"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2565_C12", "label": "advance()", "type": "expression", "loc": [2565, 2565], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "vector": [8, 3, 0.9639, 0.0004, 3, 0.69, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance() # skip over :"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2566_C12", "label": "startCaptureRegion()", "type": "expression", "loc": [2566, 2566], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "vector": [8, 3, 0.9643, 0.0004, 3, 0.69, 0.1111, 646, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "startCaptureRegion", "arg_names": [], "import_names": [], "rhs_call_name": "startCaptureRegion", "annotation": ""}, "snippet": " self._compiler.startCaptureRegion(assignTo=expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2567_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2567, 2567], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "vector": [8, 3, 0.9647, 0.0004, 3, 0.69, 0.2222, 84, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace(max=1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2568_C12", "label": "parse()", "type": "expression", "loc": [2568, 2568], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "vector": [8, 3, 0.9651, 0.0004, 3, 0.69, 0.3333, 678, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "parse", "arg_names": [], "import_names": [], "rhs_call_name": "parse", "annotation": ""}, "snippet": " self.parse(breakPoint=self.findEOL(gobble=False))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2569_C12", "label": "endCaptureRegion()", "type": "expression", "loc": [2569, 2569], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "vector": [8, 3, 0.9654, 0.0004, 3, 0.69, 0.4444, 608, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "endCaptureRegion", "arg_names": [], "import_names": [], "rhs_call_name": "endCaptureRegion", "annotation": ""}, "snippet": " self._compiler.endCaptureRegion()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2571_C12", "label": "if", "type": "if", "loc": [2571, 2572], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "vector": [4, 3, 0.9664, 0.0008, 3, 0.69, 0.5556, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek()==':':\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2572_C16", "label": "advance()", "type": "expression", "loc": [2572, 2572], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2571_C12", "vector": [8, 4, 0.9666, 0.0004, 4, 0.58, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2573_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2573, 2573], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "vector": [8, 3, 0.9669, 0.0004, 3, 0.69, 0.6667, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2574_C12", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2574, 2574], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "vector": [8, 3, 0.9673, 0.0004, 3, 0.69, 0.7778, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLinePos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2575_C12", "label": "pushToOpenDirectivesStack()", "type": "expression", "loc": [2575, 2575], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "vector": [8, 3, 0.9677, 0.0004, 3, 0.69, 0.8889, 853, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "pushToOpenDirectivesStack", "arg_names": [], "import_names": [], "rhs_call_name": "pushToOpenDirectivesStack", "annotation": ""}, "snippet": " self.pushToOpenDirectivesStack(\"capture\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2576_C12", "label": "startCaptureRegion()", "type": "expression", "loc": [2576, 2576], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "vector": [8, 3, 0.9681, 0.0004, 3, 0.69, 1.0, 646, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "startCaptureRegion", "arg_names": [], "import_names": [], "rhs_call_name": "startCaptureRegion", "annotation": ""}, "snippet": " self._compiler.startCaptureRegion(assignTo=expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "label": "eatIf", "type": "function", "loc": [2579, 2623], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.9775, 0.0169, 1, 0.84, 0.9298, 277, 0, 1, 0, 0, 0, 0, 31], "semantic": {"name": "eatIf", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def eatIf(self):\n # filtered \n isLineClearToStartToken = self.isLineClearToStartToken()\n endOfFirstLine = self.findEOL()\n lineCol = self.getRowCol()\n self.getDirectiveStartToken()\n startPos = self.pos()\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2581_C8", "label": "isLineClearToStartToken = isLineClearToStartToken()", "type": "assigned_variable", "loc": [2581, 2581], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "vector": [14, 2, 0.9699, 0.0004, 2, 0.52, 0.0, 110, 3, 0, 0, 0, 110, 10, 1], "semantic": {"name": "isLineClearToStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "isLineClearToStartToken", "annotation": ""}, "snippet": " isLineClearToStartToken = self.isLineClearToStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2582_C8", "label": "endOfFirstLine = findEOL()", "type": "assigned_variable", "loc": [2582, 2582], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "vector": [14, 2, 0.9703, 0.0004, 2, 0.52, 0.1111, 478, 3, 0, 0, 0, 286, 10, 1], "semantic": {"name": "endOfFirstLine", "arg_names": [], "import_names": [], "rhs_call_name": "findEOL", "annotation": ""}, "snippet": " endOfFirstLine = self.findEOL()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2583_C8", "label": "lineCol = getRowCol()", "type": "assigned_variable", "loc": [2583, 2583], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "vector": [14, 2, 0.9707, 0.0004, 2, 0.52, 0.2222, 562, 3, 0, 0, 0, 946, 10, 1], "semantic": {"name": "lineCol", "arg_names": [], "import_names": [], "rhs_call_name": "getRowCol", "annotation": ""}, "snippet": " lineCol = self.getRowCol()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2584_C8", "label": "getDirectiveStartToken()", "type": "expression", "loc": [2584, 2584], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "vector": [8, 2, 0.9711, 0.0004, 2, 0.52, 0.3333, 261, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getDirectiveStartToken", "arg_names": [], "import_names": [], "rhs_call_name": "getDirectiveStartToken", "annotation": ""}, "snippet": " self.getDirectiveStartToken()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2585_C8", "label": "startPos = pos()", "type": "assigned_variable", "loc": [2585, 2585], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "vector": [14, 2, 0.9714, 0.0004, 2, 0.52, 0.4444, 122, 3, 0, 0, 0, 627, 10, 1], "semantic": {"name": "startPos", "arg_names": [], "import_names": [], "rhs_call_name": "pos", "annotation": ""}, "snippet": " startPos = self.pos()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2587_C8", "label": "expressionParts = getExpressionParts()", "type": "assigned_variable", "loc": [2587, 2587], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "vector": [14, 2, 0.9722, 0.0004, 2, 0.52, 0.5556, 902, 3, 1, 0, 0, 255, 10, 1], "semantic": {"name": "expressionParts", "arg_names": [], "import_names": [], "rhs_call_name": "getExpressionParts", "annotation": ""}, "snippet": " expressionParts = self.getExpressionParts(pyTokensToBreakAt=[':'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2588_C8", "label": "expr = strip()", "type": "assigned_variable", "loc": [2588, 2588], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "vector": [14, 2, 0.9726, 0.0004, 2, 0.52, 0.6667, 236, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " expr = ''.join(expressionParts).strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2589_C8", "label": "expr = _applyExpressionFilters()", "type": "assigned_variable", "loc": [2589, 2589], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "vector": [14, 2, 0.9729, 0.0004, 2, 0.52, 0.7778, 236, 3, 3, 0, 0, 289, 10, 1], "semantic": {"name": "expr", "arg_names": [], "import_names": [], "rhs_call_name": "_applyExpressionFilters", "annotation": ""}, "snippet": " expr = self._applyExpressionFilters(expr, 'if', startPos=startPos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2591_C8", "label": "isTernaryExpr =", "type": "assigned_variable", "loc": [2591, 2591], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "vector": [14, 2, 0.9737, 0.0004, 2, 0.52, 0.8889, 656, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "isTernaryExpr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isTernaryExpr = ('then' in expressionParts and 'else' in expressionParts)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "label": "if", "type": "if", "loc": [2592, 2623], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "vector": [4, 2, 0.9799, 0.012, 2, 0.52, 1.0, 0, 2, 0, 0, 0, 0, 0, 22], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isTernaryExpr:\n conditionExpr = []\n trueExpr = []\n falseExpr = []\n currentExpr = conditionExpr\n for part in expressionParts:\n if part.strip()=='then':\n currentExpr = trueExpr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2593_C12", "label": "conditionExpr =", "type": "assigned_variable", "loc": [2593, 2593], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "vector": [14, 3, 0.9744, 0.0004, 3, 0.97, 0.0, 366, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "conditionExpr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " conditionExpr = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2594_C12", "label": "trueExpr =", "type": "assigned_variable", "loc": [2594, 2594], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "vector": [14, 3, 0.9748, 0.0004, 3, 0.97, 0.1, 288, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "trueExpr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " trueExpr = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2595_C12", "label": "falseExpr =", "type": "assigned_variable", "loc": [2595, 2595], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "vector": [14, 3, 0.9752, 0.0004, 3, 0.97, 0.2, 313, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "falseExpr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " falseExpr = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2596_C12", "label": "currentExpr =", "type": "assigned_variable", "loc": [2596, 2596], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "vector": [14, 3, 0.9756, 0.0004, 3, 0.97, 0.3, 324, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "currentExpr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " currentExpr = conditionExpr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L2597_C12", "label": "for part", "type": "for", "loc": [2597, 2603], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "vector": [6, 3, 0.9771, 0.0026, 3, 0.97, 0.4, 374, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "part", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for part in expressionParts:\n if part.strip()=='then':\n currentExpr = trueExpr\n elif part.strip()=='else':\n currentExpr = falseExpr\n else:\n currentExpr.append(part)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2598_C16", "label": "if", "type": "if", "loc": [2598, 2603], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L2597_C12", "vector": [4, 4, 0.9773, 0.0023, 4, 0.96, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if part.strip()=='then':\n currentExpr = trueExpr\n elif part.strip()=='else':\n currentExpr = falseExpr\n else:\n currentExpr.append(part)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2599_C20", "label": "currentExpr =", "type": "assigned_variable", "loc": [2599, 2599], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2598_C16", "vector": [14, 5, 0.9767, 0.0004, 5, 0.55, 0.0, 324, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "currentExpr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " currentExpr = trueExpr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2600_C16", "label": "if", "type": "if", "loc": [2600, 2603], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2598_C16", "vector": [4, 5, 0.9776, 0.0015, 5, 0.55, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif part.strip()=='else':\n currentExpr = falseExpr\n else:\n currentExpr.append(part)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2601_C20", "label": "currentExpr =", "type": "assigned_variable", "loc": [2601, 2601], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2600_C16", "vector": [14, 6, 0.9775, 0.0004, 6, 0.47, 0.0, 324, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "currentExpr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " currentExpr = falseExpr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2603_C20", "label": "append()", "type": "expression", "loc": [2603, 2603], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2600_C16", "vector": [8, 6, 0.9782, 0.0004, 6, 0.47, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " currentExpr.append(part)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2605_C12", "label": "conditionExpr = join()", "type": "assigned_variable", "loc": [2605, 2605], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "vector": [14, 3, 0.979, 0.0004, 3, 0.97, 0.5, 366, 3, 1, 0, 0, 933, 10, 1], "semantic": {"name": "conditionExpr", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " conditionExpr = ''.join(conditionExpr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2606_C12", "label": "trueExpr = join()", "type": "assigned_variable", "loc": [2606, 2606], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "vector": [14, 3, 0.9793, 0.0004, 3, 0.97, 0.6, 288, 3, 1, 0, 0, 933, 10, 1], "semantic": {"name": "trueExpr", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " trueExpr = ''.join(trueExpr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2607_C12", "label": "falseExpr = join()", "type": "assigned_variable", "loc": [2607, 2607], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "vector": [14, 3, 0.9797, 0.0004, 3, 0.97, 0.7, 313, 3, 1, 0, 0, 933, 10, 1], "semantic": {"name": "falseExpr", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " falseExpr = ''.join(falseExpr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2608_C12", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2608, 2608], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "vector": [8, 3, 0.9801, 0.0004, 3, 0.97, 0.8, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2609_C12", "label": "addTernaryExpr()", "type": "expression", "loc": [2609, 2609], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "vector": [8, 3, 0.9805, 0.0004, 3, 0.97, 0.9, 424, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "addTernaryExpr", "arg_names": [], "import_names": [], "rhs_call_name": "addTernaryExpr", "annotation": ""}, "snippet": " self._compiler.addTernaryExpr(conditionExpr, trueExpr, falseExpr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "label": "if", "type": "if", "loc": [2610, 2623], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "vector": [4, 3, 0.9833, 0.0053, 3, 0.97, 1.0, 0, 3, 0, 0, 0, 0, 0, 14], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.matchColonForSingleLineShortFormDirective():\n self.advance() # skip over :\n self._compiler.addIf(expr, lineCol=lineCol)\n self.getWhiteSpace(max=1)\n self.parse(breakPoint=self.findEOL(gobble=True)) \n self._compiler.commitStrConst() \n self._compiler.dedent()\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2611_C12", "label": "advance()", "type": "expression", "loc": [2611, 2611], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "vector": [8, 4, 0.9812, 0.0004, 4, 0.47, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance() # skip over :"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2612_C12", "label": "addIf()", "type": "expression", "loc": [2612, 2612], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "vector": [8, 4, 0.9816, 0.0004, 4, 0.47, 0.1, 359, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addIf", "arg_names": [], "import_names": [], "rhs_call_name": "addIf", "annotation": ""}, "snippet": " self._compiler.addIf(expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2613_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2613, 2613], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "vector": [8, 4, 0.982, 0.0004, 4, 0.47, 0.2, 84, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace(max=1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2614_C12", "label": "parse()", "type": "expression", "loc": [2614, 2614], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "vector": [8, 4, 0.9823, 0.0004, 4, 0.47, 0.3, 678, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "parse", "arg_names": [], "import_names": [], "rhs_call_name": "parse", "annotation": ""}, "snippet": " self.parse(breakPoint=self.findEOL(gobble=True)) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2615_C12", "label": "commitStrConst()", "type": "expression", "loc": [2615, 2615], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "vector": [8, 4, 0.9827, 0.0004, 4, 0.47, 0.4, 212, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "commitStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "commitStrConst", "annotation": ""}, "snippet": " self._compiler.commitStrConst() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2616_C12", "label": "dedent()", "type": "expression", "loc": [2616, 2616], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "vector": [8, 4, 0.9831, 0.0004, 4, 0.47, 0.5, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self._compiler.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2618_C12", "label": "if", "type": "if", "loc": [2618, 2619], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "vector": [4, 4, 0.984, 0.0008, 4, 0.47, 0.6, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.peek()==':':\n self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2619_C16", "label": "advance()", "type": "expression", "loc": [2619, 2619], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2618_C12", "vector": [8, 5, 0.9842, 0.0004, 5, 0.83, 0.0, 341, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "advance", "arg_names": [], "import_names": [], "rhs_call_name": "advance", "annotation": ""}, "snippet": " self.advance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2620_C12", "label": "getWhiteSpace()", "type": "expression", "loc": [2620, 2620], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "vector": [8, 4, 0.9846, 0.0004, 4, 0.47, 0.7, 84, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "getWhiteSpace", "arg_names": [], "import_names": [], "rhs_call_name": "getWhiteSpace", "annotation": ""}, "snippet": " self.getWhiteSpace() "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2621_C12", "label": "_eatRestOfDirectiveTag()", "type": "expression", "loc": [2621, 2621], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "vector": [8, 4, 0.985, 0.0004, 4, 0.47, 0.8, 130, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_eatRestOfDirectiveTag", "arg_names": [], "import_names": [], "rhs_call_name": "_eatRestOfDirectiveTag", "annotation": ""}, "snippet": " self._eatRestOfDirectiveTag(isLineClearToStartToken, endOfFirstLine) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2622_C12", "label": "pushToOpenDirectivesStack()", "type": "expression", "loc": [2622, 2622], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "vector": [8, 4, 0.9853, 0.0004, 4, 0.47, 0.9, 853, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "pushToOpenDirectivesStack", "arg_names": [], "import_names": [], "rhs_call_name": "pushToOpenDirectivesStack", "annotation": ""}, "snippet": " self.pushToOpenDirectivesStack('if')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2623_C12", "label": "addIf()", "type": "expression", "loc": [2623, 2623], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "vector": [8, 4, 0.9857, 0.0004, 4, 0.47, 1.0, 359, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addIf", "arg_names": [], "import_names": [], "rhs_call_name": "addIf", "annotation": ""}, "snippet": " self._compiler.addIf(expr, lineCol=lineCol)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2626_C4", "label": "handleEndDef", "type": "function", "loc": [2626, 2635], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.9885, 0.0038, 1, 0.84, 0.9474, 969, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "handleEndDef", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def handleEndDef(self):\n isNestedDef = (self.setting('allowNestedDefScopes')\n and [name for name in self._openDirectivesStack if name=='def'])\n if not isNestedDef:\n self._compiler.closeDef()\n else:\n # @@TR: temporary hack of useSearchList\n self.setSetting('useSearchList', self._useSearchList_orig) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2627_C8", "label": "isNestedDef =", "type": "assigned_variable", "loc": [2627, 2628], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2626_C4", "vector": [14, 2, 0.9874, 0.0008, 2, 0.04, 0.0, 611, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "isNestedDef", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isNestedDef = (self.setting('allowNestedDefScopes')\n and [name for name in self._openDirectivesStack if name=='def'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2629_C8", "label": "if", "type": "if", "loc": [2629, 2635], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2626_C4", "vector": [4, 2, 0.9891, 0.0026, 2, 0.04, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not isNestedDef:\n self._compiler.closeDef()\n else:\n # @@TR: temporary hack of useSearchList\n self.setSetting('useSearchList', self._useSearchList_orig) \n self._compiler.commitStrConst()\n self._compiler.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2630_C12", "label": "closeDef()", "type": "expression", "loc": [2630, 2630], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2629_C8", "vector": [8, 3, 0.9884, 0.0004, 3, 0.09, 0.0, 276, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "closeDef", "arg_names": [], "import_names": [], "rhs_call_name": "closeDef", "annotation": ""}, "snippet": " self._compiler.closeDef()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2633_C12", "label": "setSetting()", "type": "expression", "loc": [2633, 2633], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2629_C8", "vector": [8, 3, 0.9895, 0.0004, 3, 0.09, 0.3333, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setSetting", "arg_names": [], "import_names": [], "rhs_call_name": "setSetting", "annotation": ""}, "snippet": " self.setSetting('useSearchList', self._useSearchList_orig) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2634_C12", "label": "commitStrConst()", "type": "expression", "loc": [2634, 2634], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2629_C8", "vector": [8, 3, 0.9899, 0.0004, 3, 0.09, 0.6667, 212, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "commitStrConst", "arg_names": [], "import_names": [], "rhs_call_name": "commitStrConst", "annotation": ""}, "snippet": " self._compiler.commitStrConst()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2635_C12", "label": "dedent()", "type": "expression", "loc": [2635, 2635], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2629_C8", "vector": [8, 3, 0.9902, 0.0004, 3, 0.09, 1.0, 899, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "dedent", "arg_names": [], "import_names": [], "rhs_call_name": "dedent", "annotation": ""}, "snippet": " self._compiler.dedent()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2638_C4", "label": "pushToOpenDirectivesStack", "type": "function", "loc": [2638, 2640], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.9917, 0.0011, 1, 0.84, 0.9649, 853, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "pushToOpenDirectivesStack", "arg_names": ["self", "directiveName"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def pushToOpenDirectivesStack(self, directiveName):\n assert directiveName in self._closeableDirectives\n self._openDirectivesStack.append(directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2640_C8", "label": "append()", "type": "expression", "loc": [2640, 2640], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2638_C4", "vector": [8, 2, 0.9921, 0.0004, 2, 0.24, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._openDirectivesStack.append(directiveName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2642_C4", "label": "popFromOpenDirectivesStack", "type": "function", "loc": [2642, 2650], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.9944, 0.0034, 1, 0.84, 0.9825, 759, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "popFromOpenDirectivesStack", "arg_names": ["self", "directiveName"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def popFromOpenDirectivesStack(self, directiveName):\n if not self._openDirectivesStack:\n raise ParseError(self, msg=\"#end found, but nothing to end\")\n \n if self._openDirectivesStack[-1] == directiveName:\n del self._openDirectivesStack[-1]\n else:\n raise ParseError(self, msg=\"#end %s found, expected #end %s\" %("}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2643_C8", "label": "if", "type": "if", "loc": [2643, 2644], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2642_C4", "vector": [4, 2, 0.9934, 0.0008, 2, 0.39, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self._openDirectivesStack:\n raise ParseError(self, msg=\"#end found, but nothing to end\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2646_C8", "label": "if", "type": "if", "loc": [2646, 2650], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2642_C4", "vector": [4, 2, 0.9951, 0.0019, 2, 0.39, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._openDirectivesStack[-1] == directiveName:\n del self._openDirectivesStack[-1]\n else:\n raise ParseError(self, msg=\"#end %s found, expected #end %s\" %(\n directiveName, self._openDirectivesStack[-1]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2652_C4", "label": "assertEmptyOpenDirectivesStack", "type": "function", "loc": [2652, 2657], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "vector": [2, 1, 0.9976, 0.0023, 1, 0.84, 1.0, 307, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "assertEmptyOpenDirectivesStack", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def assertEmptyOpenDirectivesStack(self):\n if self._openDirectivesStack:\n errorMsg = (\n \"Some #directives are missing their corresponding #end ___ tag: %s\" %(\n ', '.join(self._openDirectivesStack)))\n raise ParseError(self, msg=errorMsg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2653_C8", "label": "if", "type": "if", "loc": [2653, 2657], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2652_C4", "vector": [4, 2, 0.9977, 0.0019, 2, 0.5, 0.0, 0, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._openDirectivesStack:\n errorMsg = (\n \"Some #directives are missing their corresponding #end ___ tag: %s\" %(\n ', '.join(self._openDirectivesStack)))\n raise ParseError(self, msg=errorMsg)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2654_C12", "label": "errorMsg =", "type": "assigned_variable", "loc": [2654, 2656], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2653_C8", "vector": [14, 3, 0.9977, 0.0011, 3, 0.96, 0.0, 60, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "errorMsg", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " errorMsg = (\n \"Some #directives are missing their corresponding #end ___ tag: %s\" %(\n ', '.join(self._openDirectivesStack)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2661_C0", "label": "Parser =", "type": "assigned_variable", "loc": [2661, 2661], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.0004, 0, 0.66, 1.0, 717, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "Parser", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "Parser = _HighLevelParser"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L42_C21"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L43_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L44_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L45_C19"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L46_C21"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L123_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L124_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L123_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L125_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L123_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L126_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L129_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L243_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L244_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L245_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L246_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L246_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L247_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L248_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L249_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L250_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L244_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L251_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L243_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L253_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L253_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L254_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L243_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L257_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L258_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L258_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L259_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L258_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L261_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L262_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L263_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L263_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L264_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L263_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L265_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L263_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L268_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L271_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L272_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L273_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L273_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L274_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L273_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L276_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L278_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L279_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L279_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L280_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L279_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L282_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L283_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L290_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L290_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L291_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L296_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L296_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L297_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L300_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L256_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L303_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L312_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L313_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L313_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L315_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L313_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L316_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L313_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L317_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L313_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L318_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L323_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L324_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L323_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L326_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L326_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L327_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L326_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L328_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L326_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L329_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L323_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L331_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L331_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L332_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L331_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L333_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L323_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L335_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L323_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L338_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L338_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L339_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L338_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L340_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L340_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L341_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L323_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L344_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L344_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L345_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L344_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L346_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L323_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L348_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L348_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L349_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L352_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L357_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L359_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L359_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L360_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L362_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L362_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L363_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L363_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L364_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L363_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L366_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L368_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L368_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L369_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L371_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L371_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L372_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L374_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L374_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L375_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L377_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L377_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L378_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L380_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L380_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L381_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L380_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L384_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L380_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L385_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L380_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L386_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L380_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L387_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L380_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L388_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L380_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L394_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L408_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L410_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L411_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L420_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L427_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L429_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L434_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L436_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L443_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L444_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L445_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L451_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L456_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L406_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L465_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L465_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L466_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L465_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L472_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L475_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L475_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L476_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L475_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L477_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L475_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L478_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L475_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L481_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L475_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L483_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L475_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L485_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L475_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L487_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L491_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L492_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L493_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L494_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L495_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L496_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L497_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L498_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L498_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L499_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L500_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L501_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L490_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L502_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L504_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L504_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L505_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L504_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L506_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L504_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L507_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L504_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L508_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L504_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L509_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L504_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L510_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L504_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L511_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L513_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L513_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L514_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L513_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L517_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L513_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L518_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L520_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L520_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L521_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L520_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L524_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L520_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L525_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L527_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L527_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L528_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L530_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L530_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L531_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L530_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L542_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L530_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L543_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L543_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L544_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L544_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L545_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L544_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L546_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L530_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L548_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L550_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L550_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L551_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L550_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L553_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L553_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L554_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L553_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L555_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L555_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L556_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L550_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L557_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L559_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L559_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L560_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L559_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L561_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L561_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L563_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L559_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L565_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L567_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L567_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L568_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L568_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L569_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L571_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L571_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L572_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L571_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L573_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L571_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L575_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L577_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L577_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L578_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L580_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L580_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L581_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L580_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L582_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L580_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L584_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L586_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L586_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L587_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L589_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L589_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L590_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L589_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L591_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L589_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L593_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L595_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L595_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L596_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L598_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L598_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L599_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L598_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L600_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L598_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L602_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L605_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L609_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L610_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L611_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L613_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L616_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L616_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L617_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L616_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L618_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L618_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L619_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L618_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L620_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L618_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L621_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L621_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L622_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L622_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L623_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L621_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L626_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L626_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L627_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L626_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L628_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L626_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L629_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L626_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L630_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L630_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L631_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L635_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L635_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L636_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L604_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L638_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L640_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L640_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L641_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L640_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L642_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L640_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L644_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L640_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L647_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L647_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L648_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L647_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L649_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L649_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L650_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L649_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L651_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L649_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L652_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L652_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L653_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L653_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L654_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L640_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L660_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L662_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L662_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L663_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L665_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L665_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L666_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L665_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L667_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L665_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L669_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L671_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L671_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L672_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L671_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L673_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L673_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L674_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L671_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L675_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L677_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L677_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L678_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L677_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L679_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L677_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L681_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L683_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L683_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L684_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L683_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L685_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L685_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L686_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L683_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L687_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L689_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L689_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L690_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L689_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L691_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L689_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L693_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L695_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L696_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L698_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L699_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L699_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L700_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L701_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L702_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L703_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L704_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L706_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L706_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L707_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L706_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L708_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L706_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L709_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L706_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L710_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L706_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L712_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L712_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L713_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L712_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L714_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L712_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L717_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L717_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L718_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L718_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L719_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L712_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L721_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L712_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L722_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L722_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L724_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L724_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L725_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L706_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L728_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L706_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L729_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L731_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L731_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L732_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L734_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L734_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L735_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L734_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L736_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L734_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L738_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L740_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L740_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L741_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L743_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L743_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L744_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L743_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L745_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L743_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L747_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L750_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L750_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L751_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L751_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L752_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L751_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L753_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L751_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L754_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L754_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L755_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L754_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L756_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L756_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L757_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L756_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L759_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L750_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L760_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L762_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L762_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L763_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L765_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L765_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L766_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L768_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L768_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L769_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L768_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L770_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L768_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L772_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L774_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L774_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L775_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L774_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L776_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L774_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L778_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L780_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L780_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L781_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L780_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L782_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L784_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L784_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L785_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L784_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L786_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L788_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L788_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L789_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L788_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L790_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L792_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L792_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L793_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L792_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L794_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L796_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L796_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L797_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L796_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L798_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L800_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L800_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L801_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L800_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L802_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L800_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L803_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L800_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L805_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L808_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L808_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L809_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L809_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L810_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L809_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L811_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L809_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L812_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L816_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L816_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L817_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L817_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L818_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L817_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L819_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L817_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L820_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L826_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L826_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L827_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L826_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L828_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L828_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L829_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L829_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L830_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L829_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L831_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L831_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L833_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L833_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L834_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L833_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L835_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L835_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L838_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L838_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L839_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L838_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L840_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L838_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L841_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L838_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L842_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L838_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L843_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L843_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L844_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L826_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L847_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L849_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L849_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L850_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L849_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L853_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L853_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L854_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L849_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L855_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L849_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L856_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L849_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L857_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L859_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L859_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L861_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L863_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L863_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L865_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L863_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L891_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L863_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L892_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L892_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L893_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L892_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L894_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L892_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L895_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L895_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L897_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L897_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L899_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L899_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L900_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L892_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L904_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L892_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L905_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L905_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L906_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L906_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L907_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L906_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L909_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L905_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L911_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L905_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L912_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L912_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L913_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L912_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L914_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L905_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L915_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L915_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L916_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L892_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L917_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L863_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L919_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L926_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L932_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L932_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L933_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L932_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L934_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L936_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L936_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L939_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L936_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L941_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L936_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L942_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L936_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L943_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L946_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L947_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L949_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L949_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L950_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L950_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L951_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L950_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L952_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L950_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L953_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L949_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L958_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L949_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L959_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L959_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L960_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L959_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L962_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L959_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L963_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L959_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L964_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L964_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L965_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L964_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L966_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L959_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L970_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L970_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L971_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L970_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L972_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L972_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L973_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L972_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L974_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L972_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L975_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L972_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L976_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L976_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L977_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L976_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L978_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L978_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L979_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L978_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L980_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L978_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L981_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L978_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L982_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L976_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L985_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L976_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L987_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L972_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L988_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L988_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L990_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L988_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L992_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L988_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L993_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L988_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L994_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L994_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L995_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L994_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L996_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L988_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L997_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L988_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L998_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1000_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1000_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1001_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L922_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1003_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1007_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1023_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1023_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1024_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1023_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1026_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1027_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1028_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1031_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1032_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1034_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1035_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1040_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1043_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1044_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1044_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1046_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1046_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1048_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1048_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1049_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1049_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1050_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1048_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1051_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1048_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1052_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1052_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1053_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1052_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1054_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1052_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1055_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1055_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1056_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1055_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1057_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1055_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1058_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1055_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1059_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1059_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1060_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1059_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1061_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1061_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1062_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1061_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1063_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1063_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1064_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1064_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1065_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1064_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1066_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1066_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1068_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1066_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1070_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1066_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1071_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1066_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1072_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1072_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1073_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1072_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1074_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1066_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1075_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1063_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1076_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1063_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1077_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1077_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1078_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1077_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1079_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1077_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1081_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1077_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1084_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1089_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1005_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1090_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1099_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1104_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1105_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1104_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1106_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1108_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1109_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1112_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1113_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1113_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1114_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1114_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1115_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1115_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1116_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1115_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1117_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1115_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1118_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1113_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1125_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1113_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1126_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1126_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1127_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1126_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1128_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1126_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1129_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1126_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1130_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1130_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1132_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1132_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1133_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1132_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1135_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1132_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1136_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1136_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1137_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1136_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1138_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1136_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1140_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1136_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1141_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1136_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1142_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1136_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1143_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1132_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1149_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1132_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1151_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1151_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1152_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1151_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1153_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1153_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1155_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1155_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1156_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1155_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1157_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1157_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1158_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1155_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1160_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1155_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1161_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1161_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1162_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1162_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1163_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1161_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1166_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1166_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1167_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1166_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1168_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1166_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1169_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1169_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1171_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1169_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1173_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1169_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1174_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1169_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1175_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1175_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1179_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1169_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1182_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1169_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1184_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1169_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1185_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1185_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1186_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1186_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1187_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1186_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1188_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1186_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1190_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1186_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1191_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1191_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1192_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1194_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1194_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1195_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1092_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1196_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1198_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1198_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1204_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1198_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1207_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1213_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1213_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1214_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1213_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1220_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1221_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1222_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1223_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1224_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1224_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1225_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1227_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1227_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1228_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1227_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1230_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1231_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1232_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1233_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1234_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1234_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1235_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1235_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1236_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1236_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1237_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1236_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1238_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1235_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1239_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1235_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1240_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1243_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1244_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1244_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1245_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1219_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1246_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1213_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1247_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1249_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1249_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1250_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1249_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1251_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1249_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1252_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1252_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1257_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L351_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1270_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1270_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1271_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1273_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1274_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1275_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1276_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1277_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1277_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1278_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1277_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1280_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1283_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1283_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1284_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1283_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1285_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1283_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1287_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1289_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1289_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1290_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1289_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1291_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1289_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1292_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1289_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1293_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1289_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1295_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1297_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1299_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1300_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1301_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1302_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1302_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1303_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1302_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1305_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1305_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1306_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1305_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1308_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1308_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1309_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1308_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1311_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1308_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1312_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1312_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1313_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1315_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1317_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1318_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1318_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1319_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1298_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1320_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1322_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1324_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1324_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1325_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1268_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1327_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1327_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1328_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1327_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1331_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1335_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1339_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1339_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1340_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1339_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1341_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1339_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1342_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1339_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1343_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1339_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1344_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1346_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1346_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1347_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1346_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1348_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1346_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1349_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1351_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1351_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1352_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1351_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1354_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1351_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1355_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1355_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1356_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1351_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1358_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1360_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1360_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1361_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1360_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1362_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1365_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1365_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1366_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1366_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1367_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1366_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1368_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1368_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1369_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1368_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1370_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1370_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1371_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1370_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1372_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1372_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1373_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1365_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1376_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1378_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1380_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1381_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1382_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1384_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1385_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1386_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1388_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1389_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1389_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1390_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1389_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1392_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1394_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1395_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1395_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1396_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1395_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1398_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1400_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1409_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1409_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1410_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1414_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1415_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1364_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1418_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1418_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1419_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1419_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1420_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1418_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1422_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1418_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1423_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1425_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1425_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1426_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1425_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1457_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1457_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1458_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1425_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1460_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1462_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1462_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1463_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1462_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1464_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1464_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1467_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1467_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1468_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1473_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1473_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1474_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1474_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1475_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1474_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1476_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1474_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1477_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1473_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1479_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1479_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1480_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1480_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1481_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1480_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1482_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1482_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1483_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1482_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1484_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1484_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1485_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1484_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1486_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1486_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1487_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1486_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1488_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1488_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1489_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1488_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1490_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1490_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1491_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1490_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1492_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1492_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1493_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1492_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1495_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1473_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1496_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1496_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1497_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1473_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1498_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1498_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1499_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1504_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1505_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1506_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1506_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1507_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1506_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1508_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1508_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1511_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1512_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1513_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1514_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1515_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1503_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1516_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1518_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1518_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1519_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1518_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1520_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1520_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1521_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1518_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1522_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1518_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1523_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1518_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1524_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1527_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1528_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1530_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1531_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1532_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1533_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1533_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1534_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1533_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1535_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1533_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1537_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1537_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1538_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1537_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1540_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1540_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1541_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1533_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1543_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1533_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1545_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1546_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1548_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1548_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1549_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1551_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1551_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1552_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1551_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1553_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1553_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1554_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1551_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1556_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1556_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1557_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1526_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1559_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1561_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1561_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1562_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1561_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1567_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1561_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1574_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1578_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1579_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1580_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1581_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1582_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1582_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1583_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1583_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1584_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1582_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1586_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1587_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1588_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1589_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1576_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1590_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1593_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1595_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1600_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1602_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1602_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1603_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1602_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1604_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1602_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1606_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1606_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1607_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1602_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1611_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1602_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1612_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1612_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1613_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1612_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1614_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1614_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1615_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1614_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1616_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1616_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1617_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1614_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1618_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1614_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1619_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1614_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1620_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1620_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1621_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1620_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1622_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1622_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1623_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1620_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1624_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1620_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1625_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1625_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1626_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1625_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1628_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1620_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1629_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1620_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1632_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1602_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1634_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1634_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1635_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1637_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1637_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1638_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1637_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1639_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1639_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1640_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1639_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1641_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1639_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1642_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1642_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1643_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1642_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1644_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1642_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1645_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1642_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1647_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1637_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1649_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1649_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1650_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1649_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1651_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1651_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1653_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1637_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1655_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1655_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1656_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1659_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1660_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1661_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1662_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1662_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1663_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1663_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1664_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1664_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1665_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1664_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1666_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1664_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1667_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1664_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1668_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1664_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1669_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1669_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1670_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1670_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1671_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1670_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1672_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1669_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1673_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1669_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1674_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1669_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1675_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1662_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1677_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:While_L1662_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1678_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1680_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1681_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1683_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1685_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1685_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1686_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1685_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1687_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1687_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1688_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1690_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1690_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1691_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1658_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1692_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1697_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1698_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1699_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1700_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1700_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1701_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1702_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1703_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1704_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1705_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1706_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1706_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1707_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1708_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1695_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1709_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1714_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1715_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1716_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1717_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1718_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1718_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1719_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1720_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1722_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1724_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1725_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1711_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1727_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1728_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1728_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1729_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1728_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1731_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1733_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1734_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1735_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1736_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1738_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1738_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1739_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1740_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1741_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1742_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1742_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1743_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1726_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1744_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1747_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1748_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1749_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1750_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1751_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1752_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1753_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L1753_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1754_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1754_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1755_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1757_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1760_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1761_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1762_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1763_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1763_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1764_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1746_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1768_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1768_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1769_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1768_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1770_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1768_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1771_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1771_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1772_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1772_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1773_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1772_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1774_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1774_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1775_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1774_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1776_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1776_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1777_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1776_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1778_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1778_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1779_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1778_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1780_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1780_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1781_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1780_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1782_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1782_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1783_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1771_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1784_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1784_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1785_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1784_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1786_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1784_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1787_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1787_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1788_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1787_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1789_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1787_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1791_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1795_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1795_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1796_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1795_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1801_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1803_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1803_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1805_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1803_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1806_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1803_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1807_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1803_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1808_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1803_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1809_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1803_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1810_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1803_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1811_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1813_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1813_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1815_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1813_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1816_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1813_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1817_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1813_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1818_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1813_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1819_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1813_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1820_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1813_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1821_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1825_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1826_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1827_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1828_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1829_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1830_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1832_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1833_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1835_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1835_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1836_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1835_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1837_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1835_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1838_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1835_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1839_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1835_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1840_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1842_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1843_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1843_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1844_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1847_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1848_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1853_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1856_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1823_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1857_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1857_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1858_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1857_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1860_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1857_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1861_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1857_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1862_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1857_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1863_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1857_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1864_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1870_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1871_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1872_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1873_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1875_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1876_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1878_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1880_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1880_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1881_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1880_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1882_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1880_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L1886_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1887_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1888_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1889_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1868_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1891_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1891_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1892_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1891_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1894_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1891_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1895_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1891_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1896_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1891_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1897_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:Try_L1891_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1898_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1903_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1904_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1905_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1906_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1907_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1908_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1909_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1910_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1910_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1911_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1912_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1913_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1914_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1915_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1916_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1917_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1901_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1918_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1921_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1922_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1923_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1924_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1926_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1927_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1928_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1929_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1930_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1931_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1933_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1934_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1920_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1937_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1939_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1939_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1941_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1943_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1943_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1945_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1943_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1946_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1943_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1947_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1952_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1952_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1954_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1959_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1960_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1961_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1962_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1963_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1964_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1965_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1965_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1966_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1967_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1968_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1969_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1969_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1970_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1969_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1971_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1969_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1972_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1969_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1975_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1977_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1977_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1978_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1978_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1979_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1978_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1980_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1983_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1986_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1988_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L1989_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1990_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1995_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1995_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1997_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1995_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1998_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1998_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L1999_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1998_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2000_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1998_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2001_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2001_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2002_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2004_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2006_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2006_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2007_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2008_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2009_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2010_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L1985_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2015_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2015_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2016_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L1956_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L2018_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2023_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2024_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2025_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2026_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2027_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2028_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2032_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2034_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2035_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2037_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2038_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2034_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2039_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2020_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L2041_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2043_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2043_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2045_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2043_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2046_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2043_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2049_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2043_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2051_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2051_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2052_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2051_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2055_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2051_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2056_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2051_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2057_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2043_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2059_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2043_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2060_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2043_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2061_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2061_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2062_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2066_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2067_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2068_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2069_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2070_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2071_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2072_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2072_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2073_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2072_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2075_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2072_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2076_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2078_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2079_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2064_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2080_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2084_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2085_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2086_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2087_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2088_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2089_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2090_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2091_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2091_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2092_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2091_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2093_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2091_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2094_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2091_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2097_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2101_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2103_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2082_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2112_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2113_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2116_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2117_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2117_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2118_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2117_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2119_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2117_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2120_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2117_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2123_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2125_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2131_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2132_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2133_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2137_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2138_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2139_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2142_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2143_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2143_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2144_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2143_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2145_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2143_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2146_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2146_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2147_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2146_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2148_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2146_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2149_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2146_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2150_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2150_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2151_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2150_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2152_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2150_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2153_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2155_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2156_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2157_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2158_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2159_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2160_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2162_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2163_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L2165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2166_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2167_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2168_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2169_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2170_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2172_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2173_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2173_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2174_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2175_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2176_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2178_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2179_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2180_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2181_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2182_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2184_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2184_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2185_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2184_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2186_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2184_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2187_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2184_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2188_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2184_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2189_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2184_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2190_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2190_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2191_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2190_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2192_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2190_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2193_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2190_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2195_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2195_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2196_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2190_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2197_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2190_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2198_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2190_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2199_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2184_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2200_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2204_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2205_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2206_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2207_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2209_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2210_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2211_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2212_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2212_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2213_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2212_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2214_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2216_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2217_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2217_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2218_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2217_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2219_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2217_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2220_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2217_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2221_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2217_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2223_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2224_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2225_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2226_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2227_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2228_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2233_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2234_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2235_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2236_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2238_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2239_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2239_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2240_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2241_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2242_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2243_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2243_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2244_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2243_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2245_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2243_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2246_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2243_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2249_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2252_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2253_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2254_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2255_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2256_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2257_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2258_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2259_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2262_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2263_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2264_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2265_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2267_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2267_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2268_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2269_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2270_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2261_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2271_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2274_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:ImportFrom_L2282_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2283_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2284_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2285_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2286_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2287_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2292_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2294_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L2301_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2302_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2303_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2304_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2305_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2307_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2308_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2231_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2309_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2312_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2313_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2314_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2315_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2316_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2317_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2318_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2318_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L2319_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2321_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2321_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2322_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2321_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2324_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2321_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2325_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2329_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2330_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2331_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2332_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2333_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2336_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2337_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2337_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2338_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2339_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2340_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2328_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2341_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2344_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2344_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2345_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2344_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2347_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2347_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Return_L2348_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2344_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2349_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2352_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2354_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2354_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2355_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2354_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2356_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2356_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2358_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2356_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2360_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2361_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2363_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2363_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2364_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2365_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2365_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2366_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2367_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2367_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2368_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2369_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2369_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2370_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2371_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2371_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2372_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2374_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2374_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2375_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2376_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2376_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2377_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2379_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2381_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2382_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2383_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2386_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2387_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2388_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2390_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2392_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2393_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2311_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2394_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2400_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2401_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2402_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2403_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2404_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2406_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2407_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2408_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2410_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2410_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2411_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2410_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2412_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2399_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2415_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2416_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2417_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2418_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2419_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2421_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2421_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2422_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2423_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2424_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2425_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2414_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2426_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2430_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2431_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2432_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2433_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2434_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2435_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2437_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2438_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2439_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2440_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2440_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2441_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2440_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2443_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2444_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2446_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2448_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2449_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2428_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2451_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2452_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2453_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2454_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2455_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2457_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2457_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2458_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2459_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2460_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2461_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2450_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2462_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2465_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2466_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2467_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2468_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2470_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2471_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2472_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2473_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2474_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2475_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2476_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2464_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2477_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2477_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2478_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2477_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2480_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2483_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2484_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2486_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2487_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2488_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2489_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2490_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2490_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2491_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2490_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2492_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2490_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2494_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2490_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2495_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2490_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2496_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2497_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2482_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2500_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2501_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2502_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2503_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2504_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2506_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2506_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2507_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2508_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2509_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2510_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2499_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2511_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2514_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2515_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2517_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2518_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2519_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2520_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2521_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2521_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2522_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2521_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2523_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2521_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2525_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2521_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2526_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2521_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2527_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2528_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2530_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2530_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2531_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2532_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2533_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2513_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2534_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2538_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2539_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2540_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2541_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2542_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2543_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2544_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2545_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2547_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2537_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2548_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2553_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2554_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2555_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2557_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2558_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2559_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2560_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2562_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2563_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2550_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2565_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2566_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2567_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2568_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2569_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2571_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2571_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2572_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2573_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2574_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2575_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2564_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2576_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2581_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2582_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2583_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2584_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2585_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2587_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2588_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2589_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2591_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2593_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2594_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2595_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2596_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L2597_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:For_L2597_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2598_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2598_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2599_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2598_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2600_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2600_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2601_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2600_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2603_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2605_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2606_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2607_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2608_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2609_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2592_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2611_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2612_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2613_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2614_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2615_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2616_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2618_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2618_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2619_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2620_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2621_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2622_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2610_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2623_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2626_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2626_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2627_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2626_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2629_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2629_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2630_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2629_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2633_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2629_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2634_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2629_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2635_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2638_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2638_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Expr_L2640_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2642_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2642_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2643_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2642_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2646_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:ClassDef_L1334_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2652_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:FunctionDef_L2652_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2653_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1520:If_L2653_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1520:Assign_L2654_C12"}]
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Michael Liao (askxuefeng@gmail.com)' import datetime from xml.parsers.expat import ParserCreate codes = { 0 : u'龙卷风', # tornado 1 : u'热带风暴', # tropical storm 2 : u'飓风', # hurricane 3 : u'风暴', # severe thunderstorms 4 : u'雷雨', # thunderstorms 5 : u'雨夹雪', # mixed rain and snow 6 : u'雨夹冰雹', # mixed rain and sleet 7 : u'雪夹冰雹', # mixed snow and sleet 8 : u'冰毛毛雨', # freezing drizzle 9 : u'毛毛雨', # drizzle 10 : u'冰雨', # freezing rain 11 : u'阵雨', # showers 12 : u'阵雨', # showers 13 : u'小雪', # snow flurries 14 : u'小雨雪', # light snow showers 15 : u'风雪', # blowing snow 16 : u'下雪', # snow 17 : u'冰雹', # hail 18 : u'雨夹雪', # sleet 19 : u'尘土', # dust 20 : u'雾', # foggy 21 : u'霾', # haze 22 : u'烟雾', # smoky 23 : u'狂风', # blustery 24 : u'大风', # windy 25 : u'寒冷', # cold 26 : u'多云', # cloudy 27 : u'多云', # mostly cloudy (night) 28 : u'多云', # mostly cloudy (day) 29 : u'局部多云', # partly cloudy (night) 30 : u'局部多云', # partly cloudy (day) 31 : u'晴朗', # clear (night) 32 : u'晴', # sunny 33 : u'晴朗', # fair (night) 34 : u'晴朗', # fair (day) 35 : u'雨夹冰雹', # mixed rain and hail 36 : u'炎热', # hot 37 : u'局部雷雨', # isolated thunderstorms 38 : u'零星雷雨', # scattered thunderstorms 39 : u'零星雷雨', # scattered thunderstorms 40 : u'零星阵雨', # scattered showers 41 : u'大雪', # heavy snow 42 : u'零星雨夹雪', # scattered snow showers 43 : u'大雪', # heavy snow 44 : u'局部多云', # partly cloudy 45 : u'雷阵雨', # thundershowers 46 : u'小雪', # snow showers 47 : u'局部雷雨', # isolated thundershowers 3200 : u'暂无数据' # not available } class Wind(object): def __init__(self, chill, direction, speed): self.chill = chill self.direction = direction self.speed = speed def __str__(self): return r'{"chill" : %s, "direction" : %s, "speed" : %s}' % (\ self.chill or "null", self.direction or "null", self.speed or "null" ) __repr__ = __str__ class Atmosphere(object): def __init__(self, humidity, visibility, pressure, rising): self.humidity = humidity self.visibility = visibility self.pressure = pressure self.rising = rising def __str__(self): return r'{"humidity" : %s, "visibility" : %s, "pressure" : %s, "rising": %s}' % (\ self.humidity or "null", self.visibility or "null", self.pressure or "null", self.rising or "null" ) __repr__ = __str__ class Astronomy(object): def __init__(self, sunrise, sunset): self.sunrise = sunrise self.sunset = sunset def __str__(self): return r'{"sunrise" : "%s", "sunset": "%s"}' % (self.sunrise, self.sunset) __repr__ = __str__ class Forecast(object): '<yweather:forecast day="Wed" date="30 Jun 2010" low="24" high="30" text="Mostly Cloudy" code="28" />' def __init__(self, day, date, low, high, code): self.day = day self.date = date self.low = low self.high = high self.code = code def __str__(self): return '{"date" : "%s", "day" : %s, "code" : %s, "text" : "%s", "low" : %d, "high" : %d, "image_large" : "%s", "image_small" : "%s"}' % ( self.date, self.day, self.code, codes[self.code].encode('utf-8'), self.low, self.high, "http://weather.china.xappengine.com/static/w/img/d%s.png" % self.code, "http://weather.china.xappengine.com/static/w/img/s%s.png" % self.code, ) __repr__ = __str__ def index_of(list, data): for i, item in enumerate(list): if data==item: return i return None def get_day(day): return index_of(('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'), day) def get_date(date): '30 Jun 2010' ss = date.split(' ') month = index_of(('', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), ss[1]) return datetime.date(int(ss[2]), month, int(ss[0])) def f2c(temp): f = float(temp) c = (f - 32) * 5 / 9 + 0.5 return int(c) def to_24hour(time): ' convert "4:39 pm" to "16:39" ' if time.endswith(' am'): return time[:-3] if time.endswith(' pm'): time = time[:-3] n = time.find(':') to_24h = int(time[:n]) + 12 return "%d:%s" % (to_24h, time[n+1:]) return time class Weather(object): def char_data(self, text): if self.__isLastBuildDate: n = text.find(', ') text = text[n+2:] n1 = text.find(' ') n2 = text.find(' ', n1+1) m = text[n1+1:n2] month = index_of(('', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), m) text = text.replace(m, str(month)) if not text.endswith(' CST'): return text = text[:-4] is_pm = text.endswith(' pm') text = text[:-3] time = datetime.datetime.strptime(text, '%d %m %Y %I:%M') h = time.hour if is_pm: h = h + 12 self.pub = '%d-%#02d-%#02d %#02d:%#02d' % (time.year, time.month, time.day, h, time.minute) def end_element(self, name): if name=='lastBuildDate': self.__isLastBuildDate = False def start_element(self, name, attrs): if name=='lastBuildDate': self.__isLastBuildDate = True return if name=='yweather:forecast': self.forecasts.append(Forecast( get_day(attrs['day']), get_date(attrs['date']), f2c(attrs['low']), f2c(attrs['high']), int(attrs['code']) )) if name=='yweather:astronomy': self.astronomy.sunrise = to_24hour(attrs['sunrise']) self.astronomy.sunset = to_24hour(attrs['sunset']) if name=='yweather:atmosphere': self.atmosphere.humidity = attrs['humidity'] self.atmosphere.visibility = attrs['visibility'] self.atmosphere.pressure = attrs['pressure'] self.atmosphere.rising = attrs['rising'] if name=='yweather:wind': self.wind.chill = attrs['chill'] self.wind.direction = attrs['direction'] self.wind.speed = attrs['speed'] def __init__(self, name, data): self.__isLastBuildDate = False if isinstance(name, unicode): name = name.encode('utf-8') self.name = name self.pub = None self.wind = Wind(None, None, None) self.atmosphere = Atmosphere(None, None, None, None) self.astronomy = Astronomy(None, None) self.forecasts = [] parser = ParserCreate() parser.returns_unicode = False parser.StartElementHandler = self.start_element parser.EndElementHandler = self.end_element parser.CharacterDataHandler = self.char_data parser.Parse(data) def __str__(self): pub = 'null' if self.pub: pub = r'"%s"' % self.pub return '{"pub" : %s, "name" : "%s", "wind" : %s, "astronomy" : %s, "atmosphere" : %s, "forecasts" : %s}' \ % (pub, self.name, self.wind, self.astronomy, self.atmosphere, self.forecasts) __repr__ = __str__ if __name__=='__main__': import urllib url = 'http://weather.yahooapis.com/forecastrss?u=c&w=2143712' result = urllib.urlopen(url).read() print Weather(result)
ajibawa-2023/Python-Code-Large/train/row_1521
133
233
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L4_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.0172, 0.0043, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__author__ = 'Michael Liao (askxuefeng@gmail.com)'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Import_L6_C0", "label": "datetime import datetime", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0258, 0.0043, 0, 0.66, 0.0714, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime"], "rhs_call_name": "", "annotation": ""}, "snippet": "import datetime"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:ImportFrom_L7_C0", "label": "from xml.parsers.expat import ParserCreate", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.03, 0.0043, 0, 0.66, 0.1429, 573, 0, 1, 0, 0, 573, 0, 0], "semantic": {"name": "xml.parsers.expat", "arg_names": [], "import_names": ["ParserCreate"], "rhs_call_name": "", "annotation": ""}, "snippet": "from xml.parsers.expat import ParserCreate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L9_C0", "label": "codes =", "type": "assigned_variable", "loc": [9, 59], "level": 0, "parent": null, "vector": [14, 0, 0.1459, 0.2189, 0, 0.66, 0.2143, 865, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "codes", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "codes = {\n 0 : u'\u9f99\u5377\u98ce', # tornado\n 1 : u'\u70ed\u5e26\u98ce\u66b4', # tropical storm\n 2 : u'\u98d3\u98ce', # hurricane\n 3 : u'\u98ce\u66b4', # severe thunderstorms\n 4 : u'\u96f7\u96e8', # thunderstorms\n 5 : u'\u96e8\u5939\u96ea', # mixed rain and snow\n 6 : u'\u96e8\u5939\u51b0\u96f9', # mixed rain and sleet"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L61_C0", "label": "Wind", "type": "class", "loc": [61, 74], "level": 0, "parent": null, "vector": [3, 0, 0.2897, 0.0601, 0, 0.66, 0.2857, 528, 0, 2, 0, 0, 186, 0, 0], "semantic": {"name": "Wind", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Wind(object):\n def __init__(self, chill, direction, speed):\n self.chill = chill\n self.direction = direction\n self.speed = speed\n\n def __str__(self):\n return r'{\"chill\" : %s, \"direction\" : %s, \"speed\" : %s}' % (\\"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L62_C4", "label": "__init__", "type": "function", "loc": [62, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L61_C0", "vector": [2, 1, 0.2725, 0.0172, 1, 0.79, 0.0, 555, 0, 4, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "chill", "direction", "speed"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, chill, direction, speed):\n self.chill = chill\n self.direction = direction\n self.speed = speed"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L63_C8", "label": "self.chill =", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L62_C4", "vector": [14, 2, 0.2704, 0.0043, 2, 0.03, 0.0, 547, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.chill", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.chill = chill"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L64_C8", "label": "self.direction =", "type": "assigned_variable", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L62_C4", "vector": [14, 2, 0.2747, 0.0043, 2, 0.03, 0.5, 691, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.direction", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.direction = direction"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L65_C8", "label": "self.speed =", "type": "assigned_variable", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L62_C4", "vector": [14, 2, 0.279, 0.0043, 2, 0.03, 1.0, 290, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.speed", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.speed = speed"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L67_C4", "label": "__str__", "type": "function", "loc": [67, 72], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L61_C0", "vector": [2, 1, 0.2983, 0.0258, 1, 0.79, 0.5, 527, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__str__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __str__(self):\n return r'{\"chill\" : %s, \"direction\" : %s, \"speed\" : %s}' % (\\\n self.chill or \"null\",\n self.direction or \"null\",\n self.speed or \"null\"\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L68_C8", "label": "return", "type": "return", "loc": [68, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L67_C4", "vector": [13, 2, 0.3004, 0.0215, 2, 0.36, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return r'{\"chill\" : %s, \"direction\" : %s, \"speed\" : %s}' % (\\\n self.chill or \"null\",\n self.direction or \"null\",\n self.speed or \"null\"\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L74_C4", "label": "__repr__ =", "type": "assigned_variable", "loc": [74, 74], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L61_C0", "vector": [14, 1, 0.3176, 0.0043, 1, 0.79, 1.0, 204, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__repr__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __repr__ = __str__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L76_C0", "label": "Atmosphere", "type": "class", "loc": [76, 91], "level": 0, "parent": null, "vector": [3, 0, 0.3584, 0.0687, 0, 0.66, 0.3571, 91, 0, 2, 0, 0, 186, 0, 0], "semantic": {"name": "Atmosphere", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Atmosphere(object):\n def __init__(self, humidity, visibility, pressure, rising):\n self.humidity = humidity\n self.visibility = visibility\n self.pressure = pressure\n self.rising = rising\n\n def __str__(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L77_C4", "label": "__init__", "type": "function", "loc": [77, 81], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L76_C0", "vector": [2, 1, 0.3391, 0.0215, 1, 0.98, 0.0, 555, 0, 5, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "humidity", "visibility", "pressure", "rising"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, humidity, visibility, pressure, rising):\n self.humidity = humidity\n self.visibility = visibility\n self.pressure = pressure\n self.rising = rising"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L78_C8", "label": "self.humidity =", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L77_C4", "vector": [14, 2, 0.3348, 0.0043, 2, 0.9, 0.0, 272, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.humidity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.humidity = humidity"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L79_C8", "label": "self.visibility =", "type": "assigned_variable", "loc": [79, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L77_C4", "vector": [14, 2, 0.3391, 0.0043, 2, 0.9, 0.3333, 393, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.visibility", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.visibility = visibility"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L80_C8", "label": "self.pressure =", "type": "assigned_variable", "loc": [80, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L77_C4", "vector": [14, 2, 0.3433, 0.0043, 2, 0.9, 0.6667, 864, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.pressure", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.pressure = pressure"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L81_C8", "label": "self.rising =", "type": "assigned_variable", "loc": [81, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L77_C4", "vector": [14, 2, 0.3476, 0.0043, 2, 0.9, 1.0, 255, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.rising", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.rising = rising"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L83_C4", "label": "__str__", "type": "function", "loc": [83, 89], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L76_C0", "vector": [2, 1, 0.3691, 0.03, 1, 0.98, 0.5, 527, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__str__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __str__(self):\n return r'{\"humidity\" : %s, \"visibility\" : %s, \"pressure\" : %s, \"rising\": %s}' % (\\\n self.humidity or \"null\",\n self.visibility or \"null\",\n self.pressure or \"null\",\n self.rising or \"null\"\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L84_C8", "label": "return", "type": "return", "loc": [84, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L83_C4", "vector": [13, 2, 0.3712, 0.0258, 2, 0.8, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return r'{\"humidity\" : %s, \"visibility\" : %s, \"pressure\" : %s, \"rising\": %s}' % (\\\n self.humidity or \"null\",\n self.visibility or \"null\",\n self.pressure or \"null\",\n self.rising or \"null\"\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L91_C4", "label": "__repr__ =", "type": "assigned_variable", "loc": [91, 91], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L76_C0", "vector": [14, 1, 0.3906, 0.0043, 1, 0.98, 1.0, 204, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__repr__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __repr__ = __str__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L93_C0", "label": "Astronomy", "type": "class", "loc": [93, 101], "level": 0, "parent": null, "vector": [3, 0, 0.4163, 0.0386, 0, 0.66, 0.4286, 675, 0, 2, 0, 0, 186, 0, 0], "semantic": {"name": "Astronomy", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Astronomy(object):\n def __init__(self, sunrise, sunset):\n self.sunrise = sunrise\n self.sunset = sunset\n\n def __str__(self):\n return r'{\"sunrise\" : \"%s\", \"sunset\": \"%s\"}' % (self.sunrise, self.sunset)\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L94_C4", "label": "__init__", "type": "function", "loc": [94, 96], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L93_C0", "vector": [2, 1, 0.4077, 0.0129, 1, 0.73, 0.0, 555, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "sunrise", "sunset"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, sunrise, sunset):\n self.sunrise = sunrise\n self.sunset = sunset"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L95_C8", "label": "self.sunrise =", "type": "assigned_variable", "loc": [95, 95], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L94_C4", "vector": [14, 2, 0.4077, 0.0043, 2, 0.1, 0.0, 304, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.sunrise", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.sunrise = sunrise"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L96_C8", "label": "self.sunset =", "type": "assigned_variable", "loc": [96, 96], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L94_C4", "vector": [14, 2, 0.412, 0.0043, 2, 0.1, 1.0, 196, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.sunset", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.sunset = sunset"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L98_C4", "label": "__str__", "type": "function", "loc": [98, 99], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L93_C0", "vector": [2, 1, 0.4227, 0.0086, 1, 0.73, 0.5, 527, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__str__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __str__(self):\n return r'{\"sunrise\" : \"%s\", \"sunset\": \"%s\"}' % (self.sunrise, self.sunset)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L99_C8", "label": "return", "type": "return", "loc": [99, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L98_C4", "vector": [13, 2, 0.4249, 0.0043, 2, 0.11, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return r'{\"sunrise\" : \"%s\", \"sunset\": \"%s\"}' % (self.sunrise, self.sunset)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L101_C4", "label": "__repr__ =", "type": "assigned_variable", "loc": [101, 101], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L93_C0", "vector": [14, 1, 0.4335, 0.0043, 1, 0.73, 1.0, 204, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__repr__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __repr__ = __str__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L103_C0", "label": "Forecast", "type": "class", "loc": [103, 119], "level": 0, "parent": null, "vector": [3, 0, 0.4764, 0.073, 0, 0.66, 0.5, 767, 0, 2, 0, 0, 186, 0, 1], "semantic": {"name": "Forecast", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Forecast(object):\n '<yweather:forecast day=\"Wed\" date=\"30 Jun 2010\" low=\"24\" high=\"30\" text=\"Mostly Cloudy\" code=\"28\" />'\n def __init__(self, day, date, low, high, code):\n self.day = day\n self.date = date\n self.low = low\n self.high = high\n self.code = code"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Expr_L104_C4", "label": "expression", "type": "expression", "loc": [104, 104], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L103_C0", "vector": [8, 1, 0.4464, 0.0043, 1, 0.32, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '<yweather:forecast day=\"Wed\" date=\"30 Jun 2010\" low=\"24\" high=\"30\" text=\"Mostly Cloudy\" code=\"28\" />'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L105_C4", "label": "__init__", "type": "function", "loc": [105, 110], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L103_C0", "vector": [2, 1, 0.4614, 0.0258, 1, 0.32, 0.3333, 555, 0, 6, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "day", "date", "low", "high", "code"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, day, date, low, high, code):\n self.day = day\n self.date = date\n self.low = low\n self.high = high\n self.code = code"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L106_C8", "label": "self.day =", "type": "assigned_variable", "loc": [106, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L105_C4", "vector": [14, 2, 0.4549, 0.0043, 2, 0.81, 0.0, 352, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.day", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.day = day"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L107_C8", "label": "self.date =", "type": "assigned_variable", "loc": [107, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L105_C4", "vector": [14, 2, 0.4592, 0.0043, 2, 0.81, 0.25, 715, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.date", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.date = date"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L108_C8", "label": "self.low =", "type": "assigned_variable", "loc": [108, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L105_C4", "vector": [14, 2, 0.4635, 0.0043, 2, 0.81, 0.5, 349, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.low", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.low = low"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L109_C8", "label": "self.high =", "type": "assigned_variable", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L105_C4", "vector": [14, 2, 0.4678, 0.0043, 2, 0.81, 0.75, 787, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.high", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.high = high"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L110_C8", "label": "self.code =", "type": "assigned_variable", "loc": [110, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L105_C4", "vector": [14, 2, 0.4721, 0.0043, 2, 0.81, 1.0, 296, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.code", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.code = code"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L112_C4", "label": "__str__", "type": "function", "loc": [112, 117], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L103_C0", "vector": [2, 1, 0.4914, 0.0258, 1, 0.32, 0.6667, 527, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "__str__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __str__(self):\n return '{\"date\" : \"%s\", \"day\" : %s, \"code\" : %s, \"text\" : \"%s\", \"low\" : %d, \"high\" : %d, \"image_large\" : \"%s\", \"image_small\" : \"%s\"}' % (\n self.date, self.day, self.code, codes[self.code].encode('utf-8'), self.low, self.high,\n \"http://weather.china.xappengine.com/static/w/img/d%s.png\" % self.code,\n \"http://weather.china.xappengine.com/static/w/img/s%s.png\" % self.code,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L113_C8", "label": "return", "type": "return", "loc": [113, 117], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L112_C4", "vector": [13, 2, 0.4936, 0.0215, 2, 0.47, 0.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '{\"date\" : \"%s\", \"day\" : %s, \"code\" : %s, \"text\" : \"%s\", \"low\" : %d, \"high\" : %d, \"image_large\" : \"%s\", \"image_small\" : \"%s\"}' % (\n self.date, self.day, self.code, codes[self.code].encode('utf-8'), self.low, self.high,\n \"http://weather.china.xappengine.com/static/w/img/d%s.png\" % self.code,\n \"http://weather.china.xappengine.com/static/w/img/s%s.png\" % self.code,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L119_C4", "label": "__repr__ =", "type": "assigned_variable", "loc": [119, 119], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L103_C0", "vector": [14, 1, 0.5107, 0.0043, 1, 0.32, 1.0, 204, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__repr__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __repr__ = __str__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L121_C0", "label": "index_of", "type": "function", "loc": [121, 125], "level": 0, "parent": null, "vector": [2, 0, 0.5279, 0.0215, 0, 0.66, 0.5714, 478, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "index_of", "arg_names": ["list", "data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def index_of(list, data):\n for i, item in enumerate(list):\n if data==item:\n return i\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:For_L122_C4", "label": "for i, item", "type": "for", "loc": [122, 124], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L121_C0", "vector": [6, 1, 0.5279, 0.0129, 1, 0.27, 0.0, 849, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "i, item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i, item in enumerate(list):\n if data==item:\n return i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L123_C8", "label": "if", "type": "if", "loc": [123, 124], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:For_L122_C4", "vector": [4, 2, 0.53, 0.0086, 2, 0.74, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if data==item:\n return i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L124_C12", "label": "return", "type": "return", "loc": [124, 124], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L123_C8", "vector": [13, 3, 0.5322, 0.0043, 3, 0.32, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L125_C4", "label": "return", "type": "return", "loc": [125, 125], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L121_C0", "vector": [13, 1, 0.5365, 0.0043, 1, 0.27, 1.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L127_C0", "label": "get_day", "type": "function", "loc": [127, 128], "level": 0, "parent": null, "vector": [2, 0, 0.5472, 0.0086, 0, 0.66, 0.6429, 936, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_day", "arg_names": ["day"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_day(day):\n return index_of(('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'), day)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L128_C4", "label": "return", "type": "return", "loc": [128, 128], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L127_C0", "vector": [13, 1, 0.5494, 0.0043, 1, 0.51, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return index_of(('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'), day)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L130_C0", "label": "get_date", "type": "function", "loc": [130, 134], "level": 0, "parent": null, "vector": [2, 0, 0.5665, 0.0215, 0, 0.66, 0.7143, 806, 0, 1, 1, 0, 0, 0, 5], "semantic": {"name": "get_date", "arg_names": ["date"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_date(date):\n '30 Jun 2010'\n ss = date.split(' ')\n month = index_of(('', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), ss[1])\n return datetime.date(int(ss[2]), month, int(ss[0]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Expr_L131_C4", "label": "expression", "type": "expression", "loc": [131, 131], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L130_C0", "vector": [8, 1, 0.5622, 0.0043, 1, 0.04, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '30 Jun 2010'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L132_C4", "label": "ss = split()", "type": "assigned_variable", "loc": [132, 132], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L130_C0", "vector": [14, 1, 0.5665, 0.0043, 1, 0.04, 0.3333, 582, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "ss", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " ss = date.split(' ')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L133_C4", "label": "month = index_of()", "type": "assigned_variable", "loc": [133, 133], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L130_C0", "vector": [14, 1, 0.5708, 0.0043, 1, 0.04, 0.6667, 918, 3, 2, 0, 0, 478, 10, 1], "semantic": {"name": "month", "arg_names": [], "import_names": [], "rhs_call_name": "index_of", "annotation": ""}, "snippet": " month = index_of(('', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), ss[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L134_C4", "label": "return", "type": "return", "loc": [134, 134], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L130_C0", "vector": [13, 1, 0.5751, 0.0043, 1, 0.04, 1.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return datetime.date(int(ss[2]), month, int(ss[0]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L136_C0", "label": "f2c", "type": "function", "loc": [136, 139], "level": 0, "parent": null, "vector": [2, 0, 0.5901, 0.0172, 0, 0.66, 0.7857, 535, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "f2c", "arg_names": ["temp"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def f2c(temp):\n f = float(temp)\n c = (f - 32) * 5 / 9 + 0.5\n return int(c)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L137_C4", "label": "f = float()", "type": "assigned_variable", "loc": [137, 137], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L136_C0", "vector": [14, 1, 0.588, 0.0043, 1, 0.96, 0.0, 899, 3, 1, 0, 0, 639, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "float", "annotation": ""}, "snippet": " f = float(temp)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L138_C4", "label": "c =", "type": "assigned_variable", "loc": [138, 138], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L136_C0", "vector": [14, 1, 0.5923, 0.0043, 1, 0.96, 0.5, 411, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " c = (f - 32) * 5 / 9 + 0.5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L139_C4", "label": "return", "type": "return", "loc": [139, 139], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L136_C0", "vector": [13, 1, 0.5966, 0.0043, 1, 0.96, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return int(c)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L141_C0", "label": "to_24hour", "type": "function", "loc": [141, 150], "level": 0, "parent": null, "vector": [2, 0, 0.6245, 0.0429, 0, 0.66, 0.8571, 962, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "to_24hour", "arg_names": ["time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def to_24hour(time):\n ' convert \"4:39 pm\" to \"16:39\" '\n if time.endswith(' am'):\n return time[:-3]\n if time.endswith(' pm'):\n time = time[:-3]\n n = time.find(':')\n to_24h = int(time[:n]) + 12"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Expr_L142_C4", "label": "expression", "type": "expression", "loc": [142, 142], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L141_C0", "vector": [8, 1, 0.6094, 0.0043, 1, 0.23, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ' convert \"4:39 pm\" to \"16:39\" '"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L143_C4", "label": "if", "type": "if", "loc": [143, 144], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L141_C0", "vector": [4, 1, 0.6159, 0.0086, 1, 0.23, 0.3333, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if time.endswith(' am'):\n return time[:-3]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L144_C8", "label": "return", "type": "return", "loc": [144, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L143_C4", "vector": [13, 2, 0.618, 0.0043, 2, 0.86, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return time[:-3]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L145_C4", "label": "if", "type": "if", "loc": [145, 149], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L141_C0", "vector": [4, 1, 0.6309, 0.0215, 1, 0.23, 0.6667, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if time.endswith(' pm'):\n time = time[:-3]\n n = time.find(':')\n to_24h = int(time[:n]) + 12\n return \"%d:%s\" % (to_24h, time[n+1:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L146_C8", "label": "time =", "type": "assigned_variable", "loc": [146, 146], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L145_C4", "vector": [14, 2, 0.6266, 0.0043, 2, 0.71, 0.0, 654, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " time = time[:-3]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L147_C8", "label": "n = find()", "type": "assigned_variable", "loc": [147, 147], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L145_C4", "vector": [14, 2, 0.6309, 0.0043, 2, 0.71, 0.3333, 773, 3, 1, 0, 0, 340, 10, 1], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "find", "annotation": ""}, "snippet": " n = time.find(':')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L148_C8", "label": "to_24h =", "type": "assigned_variable", "loc": [148, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L145_C4", "vector": [14, 2, 0.6352, 0.0043, 2, 0.71, 0.6667, 635, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "to_24h", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " to_24h = int(time[:n]) + 12"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L149_C8", "label": "return", "type": "return", "loc": [149, 149], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L145_C4", "vector": [13, 2, 0.6395, 0.0043, 2, 0.71, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return \"%d:%s\" % (to_24h, time[n+1:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L150_C4", "label": "return", "type": "return", "loc": [150, 150], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L141_C0", "vector": [13, 1, 0.6438, 0.0043, 1, 0.23, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L152_C0", "label": "Weather", "type": "class", "loc": [152, 227], "level": 0, "parent": null, "vector": [3, 0, 0.8133, 0.3262, 0, 0.66, 0.9286, 565, 0, 5, 0, 0, 186, 0, 25], "semantic": {"name": "Weather", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Weather(object):\n\n def char_data(self, text):\n if self.__isLastBuildDate:\n n = text.find(', ')\n text = text[n+2:]\n n1 = text.find(' ')\n n2 = text.find(' ', n1+1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L154_C4", "label": "char_data", "type": "function", "loc": [154, 172], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L152_C0", "vector": [2, 1, 0.6996, 0.0815, 1, 0.15, 0.0, 935, 0, 2, 0, 0, 0, 0, 9], "semantic": {"name": "char_data", "arg_names": ["self", "text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def char_data(self, text):\n if self.__isLastBuildDate:\n n = text.find(', ')\n text = text[n+2:]\n n1 = text.find(' ')\n n2 = text.find(' ', n1+1)\n m = text[n1+1:n2]\n month = index_of(('', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), m)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "label": "if", "type": "if", "loc": [155, 172], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L154_C4", "vector": [4, 2, 0.7017, 0.0773, 2, 0.76, 0.0, 0, 7, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.__isLastBuildDate:\n n = text.find(', ')\n text = text[n+2:]\n n1 = text.find(' ')\n n2 = text.find(' ', n1+1)\n m = text[n1+1:n2]\n month = index_of(('', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), m)\n text = text.replace(m, str(month))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L156_C12", "label": "n = find()", "type": "assigned_variable", "loc": [156, 156], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "vector": [14, 3, 0.6695, 0.0043, 3, 0.68, 0.0, 773, 3, 1, 0, 0, 340, 10, 1], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "find", "annotation": ""}, "snippet": " n = text.find(', ')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L157_C12", "label": "text =", "type": "assigned_variable", "loc": [157, 157], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "vector": [14, 3, 0.6738, 0.0043, 3, 0.68, 0.0714, 439, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " text = text[n+2:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L158_C12", "label": "n1 = find()", "type": "assigned_variable", "loc": [158, 158], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "vector": [14, 3, 0.6781, 0.0043, 3, 0.68, 0.1429, 884, 3, 1, 0, 0, 340, 10, 1], "semantic": {"name": "n1", "arg_names": [], "import_names": [], "rhs_call_name": "find", "annotation": ""}, "snippet": " n1 = text.find(' ')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L159_C12", "label": "n2 = find()", "type": "assigned_variable", "loc": [159, 159], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "vector": [14, 3, 0.6824, 0.0043, 3, 0.68, 0.2143, 601, 3, 2, 0, 0, 340, 10, 1], "semantic": {"name": "n2", "arg_names": [], "import_names": [], "rhs_call_name": "find", "annotation": ""}, "snippet": " n2 = text.find(' ', n1+1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L160_C12", "label": "m =", "type": "assigned_variable", "loc": [160, 160], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "vector": [14, 3, 0.6867, 0.0043, 3, 0.68, 0.2857, 711, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " m = text[n1+1:n2]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L161_C12", "label": "month = index_of()", "type": "assigned_variable", "loc": [161, 161], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "vector": [14, 3, 0.691, 0.0043, 3, 0.68, 0.3571, 918, 3, 2, 0, 0, 478, 10, 1], "semantic": {"name": "month", "arg_names": [], "import_names": [], "rhs_call_name": "index_of", "annotation": ""}, "snippet": " month = index_of(('', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), m)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L162_C12", "label": "text = replace()", "type": "assigned_variable", "loc": [162, 162], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "vector": [14, 3, 0.6953, 0.0043, 3, 0.68, 0.4286, 439, 3, 2, 0, 0, 293, 10, 2], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " text = text.replace(m, str(month))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L163_C12", "label": "if", "type": "if", "loc": [163, 164], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "vector": [4, 3, 0.7017, 0.0086, 3, 0.68, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not text.endswith(' CST'):\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L164_C16", "label": "return", "type": "return", "loc": [164, 164], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L163_C12", "vector": [13, 4, 0.7039, 0.0043, 4, 0.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L165_C12", "label": "text =", "type": "assigned_variable", "loc": [165, 165], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "vector": [14, 3, 0.7082, 0.0043, 3, 0.68, 0.5714, 439, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " text = text[:-4]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L166_C12", "label": "is_pm = endswith()", "type": "assigned_variable", "loc": [166, 166], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "vector": [14, 3, 0.7124, 0.0043, 3, 0.68, 0.6429, 620, 3, 1, 0, 0, 487, 10, 1], "semantic": {"name": "is_pm", "arg_names": [], "import_names": [], "rhs_call_name": "endswith", "annotation": ""}, "snippet": " is_pm = text.endswith(' pm')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L167_C12", "label": "text =", "type": "assigned_variable", "loc": [167, 167], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "vector": [14, 3, 0.7167, 0.0043, 3, 0.68, 0.7143, 439, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " text = text[:-3]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L168_C12", "label": "time = strptime()", "type": "assigned_variable", "loc": [168, 168], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "vector": [14, 3, 0.721, 0.0043, 3, 0.68, 0.7857, 654, 3, 2, 0, 0, 839, 10, 1], "semantic": {"name": "time", "arg_names": [], "import_names": [], "rhs_call_name": "strptime", "annotation": ""}, "snippet": " time = datetime.datetime.strptime(text, '%d %m %Y %I:%M')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L169_C12", "label": "h =", "type": "assigned_variable", "loc": [169, 169], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "vector": [14, 3, 0.7253, 0.0043, 3, 0.68, 0.8571, 686, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "h", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " h = time.hour"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L170_C12", "label": "if", "type": "if", "loc": [170, 171], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "vector": [4, 3, 0.7318, 0.0086, 3, 0.68, 0.9286, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if is_pm:\n h = h + 12"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L171_C16", "label": "h =", "type": "assigned_variable", "loc": [171, 171], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L170_C12", "vector": [14, 4, 0.7339, 0.0043, 4, 0.89, 0.0, 686, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "h", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " h = h + 12"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L172_C12", "label": "self.pub =", "type": "assigned_variable", "loc": [172, 172], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "vector": [14, 3, 0.7382, 0.0043, 3, 0.68, 1.0, 86, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.pub", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.pub = '%d-%#02d-%#02d %#02d:%#02d' % (time.year, time.month, time.day, h, time.minute)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L174_C4", "label": "end_element", "type": "function", "loc": [174, 176], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L152_C0", "vector": [2, 1, 0.7511, 0.0129, 1, 0.15, 0.2, 513, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "end_element", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def end_element(self, name):\n if name=='lastBuildDate':\n self.__isLastBuildDate = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L175_C8", "label": "if", "type": "if", "loc": [175, 176], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L174_C4", "vector": [4, 2, 0.7532, 0.0086, 2, 0.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name=='lastBuildDate':\n self.__isLastBuildDate = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L176_C12", "label": "self.__isLastBuildDate =", "type": "assigned_variable", "loc": [176, 176], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L175_C8", "vector": [14, 3, 0.7554, 0.0043, 3, 0.44, 0.0, 741, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.__isLastBuildDate", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.__isLastBuildDate = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L178_C4", "label": "start_element", "type": "function", "loc": [178, 201], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L152_C0", "vector": [2, 1, 0.8133, 0.103, 1, 0.15, 0.4, 385, 0, 3, 0, 0, 0, 0, 9], "semantic": {"name": "start_element", "arg_names": ["self", "name", "attrs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def start_element(self, name, attrs):\n if name=='lastBuildDate':\n self.__isLastBuildDate = True\n return\n if name=='yweather:forecast':\n self.forecasts.append(Forecast(\n get_day(attrs['day']),\n get_date(attrs['date']),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L179_C8", "label": "if", "type": "if", "loc": [179, 181], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L178_C4", "vector": [4, 2, 0.7725, 0.0129, 2, 0.19, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name=='lastBuildDate':\n self.__isLastBuildDate = True\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L180_C12", "label": "self.__isLastBuildDate =", "type": "assigned_variable", "loc": [180, 180], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L179_C8", "vector": [14, 3, 0.7725, 0.0043, 3, 0.27, 0.0, 741, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.__isLastBuildDate", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.__isLastBuildDate = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L181_C12", "label": "return", "type": "return", "loc": [181, 181], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L179_C8", "vector": [13, 3, 0.7768, 0.0043, 3, 0.27, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L182_C8", "label": "if", "type": "if", "loc": [182, 189], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L178_C4", "vector": [4, 2, 0.7961, 0.0343, 2, 0.19, 0.25, 0, 0, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name=='yweather:forecast':\n self.forecasts.append(Forecast(\n get_day(attrs['day']),\n get_date(attrs['date']),\n f2c(attrs['low']),\n f2c(attrs['high']),\n int(attrs['code'])\n ))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Expr_L183_C12", "label": "append()", "type": "expression", "loc": [183, 189], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L182_C8", "vector": [8, 3, 0.7983, 0.03, 3, 0.16, 0.0, 243, 3, 1, 0, 0, 0, 0, 7], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.forecasts.append(Forecast(\n get_day(attrs['day']),\n get_date(attrs['date']),\n f2c(attrs['low']),\n f2c(attrs['high']),\n int(attrs['code'])\n ))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L190_C8", "label": "if", "type": "if", "loc": [190, 192], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L178_C4", "vector": [4, 2, 0.8197, 0.0129, 2, 0.19, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name=='yweather:astronomy':\n self.astronomy.sunrise = to_24hour(attrs['sunrise'])\n self.astronomy.sunset = to_24hour(attrs['sunset'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L191_C12", "label": "self.astronomy.sunrise = to_24hour()", "type": "assigned_variable", "loc": [191, 191], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L190_C8", "vector": [14, 3, 0.8197, 0.0043, 3, 0.1, 0.0, 203, 3, 1, 0, 0, 962, 10, 1], "semantic": {"name": "self.astronomy.sunrise", "arg_names": [], "import_names": [], "rhs_call_name": "to_24hour", "annotation": ""}, "snippet": " self.astronomy.sunrise = to_24hour(attrs['sunrise'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L192_C12", "label": "self.astronomy.sunset = to_24hour()", "type": "assigned_variable", "loc": [192, 192], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L190_C8", "vector": [14, 3, 0.824, 0.0043, 3, 0.1, 1.0, 205, 3, 1, 0, 0, 962, 10, 1], "semantic": {"name": "self.astronomy.sunset", "arg_names": [], "import_names": [], "rhs_call_name": "to_24hour", "annotation": ""}, "snippet": " self.astronomy.sunset = to_24hour(attrs['sunset'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L193_C8", "label": "if", "type": "if", "loc": [193, 197], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L178_C4", "vector": [4, 2, 0.8369, 0.0215, 2, 0.19, 0.75, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name=='yweather:atmosphere':\n self.atmosphere.humidity = attrs['humidity']\n self.atmosphere.visibility = attrs['visibility']\n self.atmosphere.pressure = attrs['pressure']\n self.atmosphere.rising = attrs['rising']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L194_C12", "label": "self.atmosphere.humidity =", "type": "assigned_variable", "loc": [194, 194], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L193_C8", "vector": [14, 3, 0.8326, 0.0043, 3, 0.03, 0.0, 89, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.atmosphere.humidity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atmosphere.humidity = attrs['humidity']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L195_C12", "label": "self.atmosphere.visibility =", "type": "assigned_variable", "loc": [195, 195], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L193_C8", "vector": [14, 3, 0.8369, 0.0043, 3, 0.03, 0.3333, 811, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.atmosphere.visibility", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atmosphere.visibility = attrs['visibility']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L196_C12", "label": "self.atmosphere.pressure =", "type": "assigned_variable", "loc": [196, 196], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L193_C8", "vector": [14, 3, 0.8412, 0.0043, 3, 0.03, 0.6667, 897, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.atmosphere.pressure", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atmosphere.pressure = attrs['pressure']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L197_C12", "label": "self.atmosphere.rising =", "type": "assigned_variable", "loc": [197, 197], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L193_C8", "vector": [14, 3, 0.8455, 0.0043, 3, 0.03, 1.0, 190, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.atmosphere.rising", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atmosphere.rising = attrs['rising']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L198_C8", "label": "if", "type": "if", "loc": [198, 201], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L178_C4", "vector": [4, 2, 0.8562, 0.0172, 2, 0.19, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name=='yweather:wind':\n self.wind.chill = attrs['chill']\n self.wind.direction = attrs['direction']\n self.wind.speed = attrs['speed']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L199_C12", "label": "self.wind.chill =", "type": "assigned_variable", "loc": [199, 199], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L198_C8", "vector": [14, 3, 0.8541, 0.0043, 3, 0.24, 0.0, 181, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.wind.chill", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.wind.chill = attrs['chill']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L200_C12", "label": "self.wind.direction =", "type": "assigned_variable", "loc": [200, 200], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L198_C8", "vector": [14, 3, 0.8584, 0.0043, 3, 0.24, 0.5, 390, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.wind.direction", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.wind.direction = attrs['direction']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L201_C12", "label": "self.wind.speed =", "type": "assigned_variable", "loc": [201, 201], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L198_C8", "vector": [14, 3, 0.8627, 0.0043, 3, 0.24, 1.0, 50, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.wind.speed", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.wind.speed = attrs['speed']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "label": "__init__", "type": "function", "loc": [203, 218], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L152_C0", "vector": [2, 1, 0.9034, 0.0687, 1, 0.15, 0.6, 555, 0, 3, 0, 0, 0, 0, 7], "semantic": {"name": "__init__", "arg_names": ["self", "name", "data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, name, data):\n self.__isLastBuildDate = False\n if isinstance(name, unicode):\n name = name.encode('utf-8')\n self.name = name\n self.pub = None\n self.wind = Wind(None, None, None)\n self.atmosphere = Atmosphere(None, None, None, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L204_C8", "label": "self.__isLastBuildDate =", "type": "assigned_variable", "loc": [204, 204], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "vector": [14, 2, 0.8755, 0.0043, 2, 0.78, 0.0, 741, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.__isLastBuildDate", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.__isLastBuildDate = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L205_C8", "label": "if", "type": "if", "loc": [205, 206], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "vector": [4, 2, 0.882, 0.0086, 2, 0.78, 0.0769, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(name, unicode):\n name = name.encode('utf-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L206_C12", "label": "name = encode()", "type": "assigned_variable", "loc": [206, 206], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L205_C8", "vector": [14, 3, 0.8841, 0.0043, 3, 0.62, 0.0, 57, 3, 1, 0, 0, 623, 10, 1], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "encode", "annotation": ""}, "snippet": " name = name.encode('utf-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L207_C8", "label": "self.name =", "type": "assigned_variable", "loc": [207, 207], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "vector": [14, 2, 0.8884, 0.0043, 2, 0.78, 0.1538, 689, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.name = name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L208_C8", "label": "self.pub =", "type": "assigned_variable", "loc": [208, 208], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "vector": [14, 2, 0.8927, 0.0043, 2, 0.78, 0.2308, 86, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.pub", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.pub = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L209_C8", "label": "self.wind = Wind()", "type": "assigned_variable", "loc": [209, 209], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "vector": [14, 2, 0.897, 0.0043, 2, 0.78, 0.3077, 377, 3, 3, 0, 0, 528, 10, 1], "semantic": {"name": "self.wind", "arg_names": [], "import_names": [], "rhs_call_name": "Wind", "annotation": ""}, "snippet": " self.wind = Wind(None, None, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L210_C8", "label": "self.atmosphere = Atmosphere()", "type": "assigned_variable", "loc": [210, 210], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "vector": [14, 2, 0.9013, 0.0043, 2, 0.78, 0.3846, 994, 3, 4, 0, 0, 91, 10, 1], "semantic": {"name": "self.atmosphere", "arg_names": [], "import_names": [], "rhs_call_name": "Atmosphere", "annotation": ""}, "snippet": " self.atmosphere = Atmosphere(None, None, None, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L211_C8", "label": "self.astronomy = Astronomy()", "type": "assigned_variable", "loc": [211, 211], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "vector": [14, 2, 0.9056, 0.0043, 2, 0.78, 0.4615, 802, 3, 2, 0, 0, 675, 10, 1], "semantic": {"name": "self.astronomy", "arg_names": [], "import_names": [], "rhs_call_name": "Astronomy", "annotation": ""}, "snippet": " self.astronomy = Astronomy(None, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L212_C8", "label": "self.forecasts =", "type": "assigned_variable", "loc": [212, 212], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "vector": [14, 2, 0.9099, 0.0043, 2, 0.78, 0.5385, 610, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.forecasts", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.forecasts = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L213_C8", "label": "parser = ParserCreate()", "type": "assigned_variable", "loc": [213, 213], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "vector": [14, 2, 0.9142, 0.0043, 2, 0.78, 0.6154, 968, 3, 0, 0, 0, 684, 10, 1], "semantic": {"name": "parser", "arg_names": [], "import_names": [], "rhs_call_name": "ParserCreate", "annotation": ""}, "snippet": " parser = ParserCreate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L214_C8", "label": "parser.returns_unicode =", "type": "assigned_variable", "loc": [214, 214], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "vector": [14, 2, 0.9185, 0.0043, 2, 0.78, 0.6923, 810, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "parser.returns_unicode", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parser.returns_unicode = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L215_C8", "label": "parser.StartElementHandler =", "type": "assigned_variable", "loc": [215, 215], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "vector": [14, 2, 0.9227, 0.0043, 2, 0.78, 0.7692, 740, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "parser.StartElementHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parser.StartElementHandler = self.start_element"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L216_C8", "label": "parser.EndElementHandler =", "type": "assigned_variable", "loc": [216, 216], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "vector": [14, 2, 0.927, 0.0043, 2, 0.78, 0.8462, 85, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "parser.EndElementHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parser.EndElementHandler = self.end_element"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L217_C8", "label": "parser.CharacterDataHandler =", "type": "assigned_variable", "loc": [217, 217], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "vector": [14, 2, 0.9313, 0.0043, 2, 0.78, 0.9231, 133, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "parser.CharacterDataHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parser.CharacterDataHandler = self.char_data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Expr_L218_C8", "label": "Parse()", "type": "expression", "loc": [218, 218], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "vector": [8, 2, 0.9356, 0.0043, 2, 0.78, 1.0, 291, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "Parse", "arg_names": [], "import_names": [], "rhs_call_name": "Parse", "annotation": ""}, "snippet": " parser.Parse(data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L220_C4", "label": "__str__", "type": "function", "loc": [220, 225], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L152_C0", "vector": [2, 1, 0.9549, 0.0258, 1, 0.15, 0.8, 527, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__str__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __str__(self):\n pub = 'null'\n if self.pub:\n pub = r'\"%s\"' % self.pub\n return '{\"pub\" : %s, \"name\" : \"%s\", \"wind\" : %s, \"astronomy\" : %s, \"atmosphere\" : %s, \"forecasts\" : %s}' \\\n % (pub, self.name, self.wind, self.astronomy, self.atmosphere, self.forecasts)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L221_C8", "label": "pub =", "type": "assigned_variable", "loc": [221, 221], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L220_C4", "vector": [14, 2, 0.9485, 0.0043, 2, 0.6, 0.0, 41, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "pub", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pub = 'null'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L222_C8", "label": "if", "type": "if", "loc": [222, 223], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L220_C4", "vector": [4, 2, 0.9549, 0.0086, 2, 0.6, 0.5, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.pub:\n pub = r'\"%s\"' % self.pub"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L223_C12", "label": "pub =", "type": "assigned_variable", "loc": [223, 223], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L222_C8", "vector": [14, 3, 0.9571, 0.0043, 3, 0.78, 0.0, 41, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pub", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pub = r'\"%s\"' % self.pub"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L224_C8", "label": "return", "type": "return", "loc": [224, 225], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L220_C4", "vector": [13, 2, 0.9635, 0.0086, 2, 0.6, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '{\"pub\" : %s, \"name\" : \"%s\", \"wind\" : %s, \"astronomy\" : %s, \"atmosphere\" : %s, \"forecasts\" : %s}' \\\n % (pub, self.name, self.wind, self.astronomy, self.atmosphere, self.forecasts)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L227_C4", "label": "__repr__ =", "type": "assigned_variable", "loc": [227, 227], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L152_C0", "vector": [14, 1, 0.9742, 0.0043, 1, 0.15, 1.0, 204, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__repr__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __repr__ = __str__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L229_C0", "label": "if", "type": "if", "loc": [229, 233], "level": 0, "parent": null, "vector": [4, 0, 0.9914, 0.0215, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__=='__main__':\n import urllib\n url = 'http://weather.yahooapis.com/forecastrss?u=c&w=2143712'\n result = urllib.urlopen(url).read()\n print(Weather(result))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Import_L230_C4", "label": "urllib import urllib", "type": "import", "loc": [230, 230], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L229_C0", "vector": [1, 1, 0.9871, 0.0043, 1, 0.12, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib"], "rhs_call_name": "", "annotation": ""}, "snippet": " import urllib"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L231_C4", "label": "url =", "type": "assigned_variable", "loc": [231, 231], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L229_C0", "vector": [14, 1, 0.9914, 0.0043, 1, 0.12, 0.3333, 789, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "url", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " url = 'http://weather.yahooapis.com/forecastrss?u=c&w=2143712'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L232_C4", "label": "result = read()", "type": "assigned_variable", "loc": [232, 232], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L229_C0", "vector": [14, 1, 0.9957, 0.0043, 1, 0.12, 0.6667, 51, 3, 0, 0, 0, 453, 10, 2], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " result = urllib.urlopen(url).read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1521:Expr_L233_C4", "label": "print()", "type": "expression", "loc": [233, 233], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L229_C0", "vector": [8, 1, 1.0, 0.0043, 1, 0.12, 1.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(Weather(result))"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L61_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L61_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L61_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L76_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L77_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L77_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L77_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L79_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L77_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L77_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L81_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L76_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L83_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L84_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L76_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L91_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L94_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L94_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L95_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L94_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L98_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L101_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L103_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Expr_L104_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L103_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L105_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L109_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L110_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L103_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L112_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L112_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L113_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L103_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L119_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L121_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:For_L122_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:For_L122_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L123_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L123_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L124_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L121_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L125_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L127_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L128_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Expr_L131_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L132_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L133_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L130_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L134_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L136_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L137_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L136_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L138_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L136_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L139_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L141_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Expr_L142_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L141_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L143_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L143_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L144_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L141_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L145_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L145_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L146_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L145_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L145_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L148_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L145_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L149_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L141_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L150_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L152_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L154_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L154_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L156_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L157_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L158_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L159_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L160_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L161_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L162_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L163_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L163_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L164_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L165_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L166_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L167_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L168_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L169_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L170_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L170_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L171_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L155_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L172_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L152_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L174_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L174_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L175_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L175_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L176_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L152_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L178_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L179_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L180_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L179_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L181_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L182_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L182_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Expr_L183_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L190_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L190_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L191_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L190_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L192_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L193_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L193_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L194_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L193_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L195_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L193_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L196_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L193_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L197_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L198_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L198_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L199_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L198_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L200_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L198_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L201_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L152_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L204_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L205_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L205_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L206_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L207_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L208_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L209_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L210_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L211_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L212_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L213_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L214_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L215_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L216_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L217_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Expr_L218_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L152_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L220_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L220_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L221_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L220_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L222_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L222_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L223_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:FunctionDef_L220_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Return_L224_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:ClassDef_L152_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L227_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L229_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Import_L230_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L229_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L231_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L229_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Assign_L232_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1521:If_L229_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1521:Expr_L233_C4"}]
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Michael Liao (askxuefeng@gmail.com)' from os import path from Cheetah.Template import Template def main(): file = path.join(path.split(__file__)[0], 'home.html') print 'Compile template %s...' % file cc = Template.compile(source=None, file=file, returnAClass=False, moduleName='autogen', className='CompiledTemplate') target = path.join(path.split(__file__)[0], 'autogen', '__init__.py') print 'Writing file %s...' % target f = open(target, 'w') f.write(cc) f.close() from autogen import CompiledTemplate CompiledTemplate(searchList=[]) print 'Compiled ok.' if __name__ == '__main__': main()
ajibawa-2023/Python-Code-Large/train/row_1522
17
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1522:Assign_L4_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.1739, 0.0435, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__author__ = 'Michael Liao (askxuefeng@gmail.com)'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1522:ImportFrom_L6_C0", "label": "from os import path", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.2609, 0.0435, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["path"], "rhs_call_name": "", "annotation": ""}, "snippet": "from os import path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1522:ImportFrom_L7_C0", "label": "from Cheetah.Template import Template", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.3043, 0.0435, 0, 0.66, 0.5, 171, 0, 1, 0, 0, 171, 0, 0], "semantic": {"name": "Cheetah.Template", "arg_names": [], "import_names": ["Template"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Template import Template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "label": "main", "type": "function", "loc": [9, 20], "level": 0, "parent": null, "vector": [2, 0, 0.6304, 0.5217, 0, 0.66, 0.75, 624, 0, 0, 0, 0, 0, 0, 12], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n file = path.join(path.split(__file__)[0], 'home.html')\n print('Compile template %s...' % file)\n cc = Template.compile(source=None, file=file, returnAClass=False, moduleName='autogen', className='CompiledTemplate')\n target = path.join(path.split(__file__)[0], 'autogen', '__init__.py')\n print('Writing file %s...' % target)\n f = open(target, 'w')\n f.write(cc)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1522:Assign_L10_C4", "label": "file = join()", "type": "assigned_variable", "loc": [10, 10], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "vector": [14, 1, 0.4348, 0.0435, 1, 0.59, 0.0, 107, 3, 2, 0, 0, 933, 10, 2], "semantic": {"name": "file", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " file = path.join(path.split(__file__)[0], 'home.html')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1522:Expr_L11_C4", "label": "print()", "type": "expression", "loc": [11, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "vector": [8, 1, 0.4783, 0.0435, 1, 0.59, 0.1, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Compile template %s...' % file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1522:Assign_L12_C4", "label": "cc = compile()", "type": "assigned_variable", "loc": [12, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "vector": [14, 1, 0.5217, 0.0435, 1, 0.59, 0.2, 206, 3, 5, 0, 0, 821, 10, 1], "semantic": {"name": "cc", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " cc = Template.compile(source=None, file=file, returnAClass=False, moduleName='autogen', className='CompiledTemplate')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1522:Assign_L13_C4", "label": "target = join()", "type": "assigned_variable", "loc": [13, 13], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "vector": [14, 1, 0.5652, 0.0435, 1, 0.59, 0.3, 766, 3, 3, 0, 0, 933, 10, 2], "semantic": {"name": "target", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " target = path.join(path.split(__file__)[0], 'autogen', '__init__.py')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1522:Expr_L14_C4", "label": "print()", "type": "expression", "loc": [14, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "vector": [8, 1, 0.6087, 0.0435, 1, 0.59, 0.4, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Writing file %s...' % target)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1522:Assign_L15_C4", "label": "f = open()", "type": "assigned_variable", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "vector": [14, 1, 0.6522, 0.0435, 1, 0.59, 0.5, 899, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " f = open(target, 'w')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1522:Expr_L16_C4", "label": "write()", "type": "expression", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "vector": [8, 1, 0.6957, 0.0435, 1, 0.59, 0.6, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " f.write(cc)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1522:Expr_L17_C4", "label": "close()", "type": "expression", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "vector": [8, 1, 0.7391, 0.0435, 1, 0.59, 0.7, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " f.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1522:ImportFrom_L18_C4", "label": "from autogen import CompiledTemplate", "type": "import", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "vector": [1, 1, 0.7826, 0.0435, 1, 0.59, 0.8, 870, 0, 1, 0, 0, 870, 0, 0], "semantic": {"name": "autogen", "arg_names": [], "import_names": ["CompiledTemplate"], "rhs_call_name": "", "annotation": ""}, "snippet": " from autogen import CompiledTemplate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1522:Expr_L19_C4", "label": "CompiledTemplate()", "type": "expression", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "vector": [8, 1, 0.8261, 0.0435, 1, 0.59, 0.9, 455, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "CompiledTemplate", "arg_names": [], "import_names": [], "rhs_call_name": "CompiledTemplate", "annotation": ""}, "snippet": " CompiledTemplate(searchList=[])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1522:Expr_L20_C4", "label": "print()", "type": "expression", "loc": [20, 20], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "vector": [8, 1, 0.8696, 0.0435, 1, 0.59, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Compiled ok.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1522:If_L22_C0", "label": "if", "type": "if", "loc": [22, 23], "level": 0, "parent": null, "vector": [4, 0, 0.9783, 0.087, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1522:Expr_L23_C4", "label": "main()", "type": "expression", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1522:If_L22_C0", "vector": [8, 1, 1.0, 0.0435, 1, 0.53, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1522:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1522:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1522:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1522:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1522:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1522:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1522:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1522:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1522:ImportFrom_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1522:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1522:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1522:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1522:If_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1522:Expr_L23_C4"}]
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Michael Liao (askxuefeng@gmail.com)' from google.appengine.ext import db class City(db.Model): name = db.StringProperty(required=True) aliases = db.StringListProperty(required=True) code = db.IntegerProperty(required=True) def first_alias(self): return self.aliases[0] def aliases_str(self): return ', '.join(self.aliases) def get_city(key=None): city = None if key: city = City.get(key) if city is None: city = find_city('beijing') return city def get_cities(): return City.all().order('aliases').fetch(1000) def find_city(name, return_default=True): ''' Find city by name. Return City or None if not found. ''' city = City.all().filter('aliases =', name).get() if city is None: city = City.all().filter('name =', name).get() if city is None and return_default: city = City.all().filter('aliases =', 'beijing').get() return city def create_city(name, aliases, code): c = City(name=name, aliases=aliases, code=code) c.put() return c def delete_city(key): City.get(key).delete() import urllib import datetime from xml.parsers.expat import ParserCreate codes = { 0 : u'龙卷风', # tornado 1 : u'热带风暴', # tropical storm 2 : u'飓风', # hurricane 3 : u'风暴', # severe thunderstorms 4 : u'雷雨', # thunderstorms 5 : u'雨夹雪', # mixed rain and snow 6 : u'雨夹冰雹', # mixed rain and sleet 7 : u'雪夹冰雹', # mixed snow and sleet 8 : u'冰毛毛雨', # freezing drizzle 9 : u'毛毛雨', # drizzle 10 : u'冰雨', # freezing rain 11 : u'阵雨', # showers 12 : u'阵雨', # showers 13 : u'小雪', # snow flurries 14 : u'小雨雪', # light snow showers 15 : u'风雪', # blowing snow 16 : u'下雪', # snow 17 : u'冰雹', # hail 18 : u'雨夹雪', # sleet 19 : u'尘土', # dust 20 : u'雾', # foggy 21 : u'霾', # haze 22 : u'烟雾', # smoky 23 : u'狂风', # blustery 24 : u'大风', # windy 25 : u'寒冷', # cold 26 : u'多云', # cloudy 27 : u'多云', # mostly cloudy (night) 28 : u'多云', # mostly cloudy (day) 29 : u'局部多云', # partly cloudy (night) 30 : u'局部多云', # partly cloudy (day) 31 : u'晴朗', # clear (night) 32 : u'晴', # sunny 33 : u'晴朗', # fair (night) 34 : u'晴朗', # fair (day) 35 : u'雨夹冰雹', # mixed rain and hail 36 : u'炎热', # hot 37 : u'局部雷雨', # isolated thunderstorms 38 : u'零星雷雨', # scattered thunderstorms 39 : u'零星雷雨', # scattered thunderstorms 40 : u'零星阵雨', # scattered showers 41 : u'大雪', # heavy snow 42 : u'零星雨夹雪', # scattered snow showers 43 : u'大雪', # heavy snow 44 : u'局部多云', # partly cloudy 45 : u'雷阵雨', # thundershowers 46 : u'小雪', # snow showers 47 : u'局部雷雨', # isolated thundershowers 3200 : u'暂无数据' # not available } def load_rss(url): f = urllib.urlopen(url) data = f.read() f.close() return data class Wind(object): def __init__(self, chill, direction, speed): self.chill = chill self.direction = direction self.speed = speed def __str__(self): return r'{"chill" : %s, "direction" : %s, "speed" : %s}' % (self.chill, self.direction, self.speed) __repr__ = __str__ class Atmosphere(object): def __init__(self, humidity, visibility, pressure, rising): self.humidity = humidity self.visibility = visibility self.pressure = pressure self.rising = rising def __str__(self): return r'{"humidity" : %s, "visibility" : %s, "pressure" : %s, "rising": %s}' % (self.humidity, self.visibility, self.pressure, self.rising) __repr__ = __str__ class Astronomy(object): def __init__(self, sunrise, sunset): self.sunrise = sunrise self.sunset = sunset def __str__(self): return r'{"sunrise" : "%s", "sunset": "%s"}' % (self.sunrise, self.sunset) __repr__ = __str__ class Forecast(object): '<yweather:forecast day="Wed" date="30 Jun 2010" low="24" high="30" text="Mostly Cloudy" code="28" />' def __init__(self, day, date, low, high, code): self.day = day self.date = date self.low = low self.high = high self.code = code def __str__(self): return u'{"date" : "%s", "day" : %s, "code" : %s, "text" : "%s", "low" : %d, "high" : %d, "image_large" : "%s", "image_small" : "%s"}' % ( self.date, self.day, self.code, codes[self.code], self.low, self.high, "http://l.yimg.com/a/i/us/nws/weather/gr/%sd.png" % self.code, "http://l.yimg.com/a/i/us/nws/weather/gr/%ss.png" % self.code, ) __repr__ = __str__ def index_of(list, data): for i, item in enumerate(list): if data==item: return i return None def get_day(day): return index_of(('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'), day) def get_date(date): '30 Jun 2010' ss = date.split(' ') month = index_of(('', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), ss[1]) return datetime.date(int(ss[2]), month, int(ss[0])) def to_24hour(time): ' convert "4:39 pm" to "16:39" ' if time.endswith(' am'): return time[:-3] if time.endswith(' pm'): time = time[:-3] n = time.find(':') to_24h = int(time[:n]) + 12 return "%d:%s" % (to_24h, time[n+1:]) return time class Weather(object): def char_data(self, text): if self.__isLastBuildDate: n = text.find(', ') text = text[n+2:] n1 = text.find(' ') n2 = text.find(' ', n1+1) m = text[n1+1:n2] month = index_of(('', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), m) text = text.replace(m, str(month)) if not text.endswith(' CST'): return text = text[:-4] is_pm = text.endswith(' pm') text = text[:-3] time = datetime.datetime.strptime(text, '%d %m %Y %I:%M') h = time.hour if is_pm: h = h + 12 self.pub = '%d-%#02d-%#02d %#02d:%#02d' % (time.year, time.month, time.day, h, time.minute) def end_element(self, name): if name=='lastBuildDate': self.__isLastBuildDate = False def start_element(self, name, attrs): if name=='lastBuildDate': self.__isLastBuildDate = True return if name=='yweather:forecast': self.forecasts.append(Forecast( get_day(attrs['day']), get_date(attrs['date']), int(attrs['low']), int(attrs['high']), int(attrs['code']) )) if name=='yweather:astronomy': self.astronomy.sunrise = to_24hour(attrs['sunrise']) self.astronomy.sunset = to_24hour(attrs['sunset']) if name=='yweather:atmosphere': self.atmosphere.humidity = attrs['humidity'] self.atmosphere.visibility = attrs['visibility'] self.atmosphere.pressure = attrs['pressure'] self.atmosphere.rising = attrs['rising'] if name=='yweather:wind': self.wind.chill = attrs['chill'] self.wind.direction = attrs['direction'] self.wind.speed = attrs['speed'] def __init__(self, data): self.__isLastBuildDate = False self.pub = None self.wind = Wind(None, None, None) self.atmosphere = Atmosphere(None, None, None, None) self.astronomy = Astronomy(None, None) self.forecasts = [] parser = ParserCreate() parser.returns_unicode = False parser.StartElementHandler = self.start_element parser.EndElementHandler = self.end_element parser.CharacterDataHandler = self.char_data parser.Parse(data) def __str__(self): pub = 'null' if self.pub: pub = r'"%s"' % self.pub return u'{"pub" : %s, "wind" : %s, "astronomy" : %s, "atmosphere" : %s, "forecasts" : %s}' \ % (pub, self.wind, self.astronomy, self.atmosphere, self.forecasts) __repr__ = __str__ class Subscriber(db.Model): mobile = db.StringProperty(required=True) city = db.StringProperty(required=True) time = db.IntegerProperty(required=True)
ajibawa-2023/Python-Code-Large/train/row_1523
163
265
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L4_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.0151, 0.0038, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__author__ = 'Michael Liao (askxuefeng@gmail.com)'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:ImportFrom_L6_C0", "label": "from google.appengine.ext import db", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0226, 0.0038, 0, 0.66, 0.0455, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names": [], "import_names": ["db"], "rhs_call_name": "", "annotation": ""}, "snippet": "from google.appengine.ext import db"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L8_C0", "label": "City", "type": "class", "loc": [8, 17], "level": 0, "parent": null, "vector": [3, 0, 0.0472, 0.0377, 0, 0.66, 0.0909, 801, 0, 2, 0, 0, 697, 0, 4], "semantic": {"name": "City", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class City(db.Model):\n name = db.StringProperty(required=True)\n aliases = db.StringListProperty(required=True)\n code = db.IntegerProperty(required=True)\n\n def first_alias(self):\n return self.aliases[0]\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L9_C4", "label": "name = StringProperty()", "type": "assigned_variable", "loc": [9, 9], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L8_C0", "vector": [14, 1, 0.034, 0.0038, 1, 0.46, 0.0, 57, 3, 1, 0, 0, 882, 10, 1], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "StringProperty", "annotation": ""}, "snippet": " name = db.StringProperty(required=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L10_C4", "label": "aliases = StringListProperty()", "type": "assigned_variable", "loc": [10, 10], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L8_C0", "vector": [14, 1, 0.0377, 0.0038, 1, 0.46, 0.25, 88, 3, 1, 0, 0, 239, 10, 1], "semantic": {"name": "aliases", "arg_names": [], "import_names": [], "rhs_call_name": "StringListProperty", "annotation": ""}, "snippet": " aliases = db.StringListProperty(required=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L11_C4", "label": "code = IntegerProperty()", "type": "assigned_variable", "loc": [11, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L8_C0", "vector": [14, 1, 0.0415, 0.0038, 1, 0.46, 0.5, 44, 3, 1, 0, 0, 703, 10, 1], "semantic": {"name": "code", "arg_names": [], "import_names": [], "rhs_call_name": "IntegerProperty", "annotation": ""}, "snippet": " code = db.IntegerProperty(required=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L13_C4", "label": "first_alias", "type": "function", "loc": [13, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L8_C0", "vector": [2, 1, 0.0509, 0.0075, 1, 0.46, 0.75, 461, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "first_alias", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def first_alias(self):\n return self.aliases[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L14_C8", "label": "return", "type": "return", "loc": [14, 14], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L13_C4", "vector": [13, 2, 0.0528, 0.0038, 2, 0.43, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.aliases[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L16_C4", "label": "aliases_str", "type": "function", "loc": [16, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L8_C0", "vector": [2, 1, 0.0623, 0.0075, 1, 0.46, 1.0, 815, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "aliases_str", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def aliases_str(self):\n return ', '.join(self.aliases)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L17_C8", "label": "return", "type": "return", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L16_C4", "vector": [13, 2, 0.0642, 0.0038, 2, 0.33, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ', '.join(self.aliases)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L19_C0", "label": "get_city", "type": "function", "loc": [19, 25], "level": 0, "parent": null, "vector": [2, 0, 0.083, 0.0264, 0, 0.66, 0.1364, 573, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "get_city", "arg_names": ["key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_city(key=None):\n city = None\n if key:\n city = City.get(key)\n if city is None:\n city = find_city('beijing')\n return city"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L20_C4", "label": "city =", "type": "assigned_variable", "loc": [20, 20], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L19_C0", "vector": [14, 1, 0.0755, 0.0038, 1, 0.85, 0.0, 825, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "city", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " city = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L21_C4", "label": "if", "type": "if", "loc": [21, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L19_C0", "vector": [4, 1, 0.0811, 0.0075, 1, 0.85, 0.3333, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if key:\n city = City.get(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L22_C8", "label": "city = get()", "type": "assigned_variable", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L21_C4", "vector": [14, 2, 0.083, 0.0038, 2, 0.43, 0.0, 825, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "city", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " city = City.get(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L23_C4", "label": "if", "type": "if", "loc": [23, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L19_C0", "vector": [4, 1, 0.0887, 0.0075, 1, 0.85, 0.6667, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if city is None:\n city = find_city('beijing')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L24_C8", "label": "city = find_city()", "type": "assigned_variable", "loc": [24, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L23_C4", "vector": [14, 2, 0.0906, 0.0038, 2, 0.87, 0.0, 825, 3, 1, 0, 0, 717, 10, 1], "semantic": {"name": "city", "arg_names": [], "import_names": [], "rhs_call_name": "find_city", "annotation": ""}, "snippet": " city = find_city('beijing')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L25_C4", "label": "return", "type": "return", "loc": [25, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L19_C0", "vector": [13, 1, 0.0943, 0.0038, 1, 0.85, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return city"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L27_C0", "label": "get_cities", "type": "function", "loc": [27, 28], "level": 0, "parent": null, "vector": [2, 0, 0.1038, 0.0075, 0, 0.66, 0.1818, 77, 0, 0, 1, 0, 0, 0, 3], "semantic": {"name": "get_cities", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_cities():\n return City.all().order('aliases').fetch(1000)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L28_C4", "label": "return", "type": "return", "loc": [28, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L27_C0", "vector": [13, 1, 0.1057, 0.0038, 1, 0.91, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return City.all().order('aliases').fetch(1000)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L30_C0", "label": "find_city", "type": "function", "loc": [30, 39], "level": 0, "parent": null, "vector": [2, 0, 0.1302, 0.0377, 0, 0.66, 0.2273, 717, 0, 2, 1, 0, 0, 0, 9], "semantic": {"name": "find_city", "arg_names": ["name", "return_default"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def find_city(name, return_default=True):\n '''\n Find city by name. Return City or None if not found.\n '''\n city = City.all().filter('aliases =', name).get()\n if city is None:\n city = City.all().filter('name =', name).get()\n if city is None and return_default:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L31_C4", "label": "expression", "type": "expression", "loc": [31, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L30_C0", "vector": [8, 1, 0.1208, 0.0113, 1, 0.1, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Find city by name. Return City or None if not found.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L34_C4", "label": "city = get()", "type": "assigned_variable", "loc": [34, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L30_C0", "vector": [14, 1, 0.1283, 0.0038, 1, 0.1, 0.25, 825, 3, 0, 0, 0, 607, 10, 3], "semantic": {"name": "city", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " city = City.all().filter('aliases =', name).get()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L35_C4", "label": "if", "type": "if", "loc": [35, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L30_C0", "vector": [4, 1, 0.134, 0.0075, 1, 0.1, 0.5, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if city is None:\n city = City.all().filter('name =', name).get()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L36_C8", "label": "city = get()", "type": "assigned_variable", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L35_C4", "vector": [14, 2, 0.1358, 0.0038, 2, 0.7, 0.0, 825, 3, 0, 0, 0, 607, 10, 3], "semantic": {"name": "city", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " city = City.all().filter('name =', name).get()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L37_C4", "label": "if", "type": "if", "loc": [37, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L30_C0", "vector": [4, 1, 0.1415, 0.0075, 1, 0.1, 0.75, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if city is None and return_default:\n city = City.all().filter('aliases =', 'beijing').get()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L38_C8", "label": "city = get()", "type": "assigned_variable", "loc": [38, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L37_C4", "vector": [14, 2, 0.1434, 0.0038, 2, 0.11, 0.0, 825, 3, 0, 0, 0, 607, 10, 3], "semantic": {"name": "city", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " city = City.all().filter('aliases =', 'beijing').get()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L39_C4", "label": "return", "type": "return", "loc": [39, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L30_C0", "vector": [13, 1, 0.1472, 0.0038, 1, 0.1, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return city"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L41_C0", "label": "create_city", "type": "function", "loc": [41, 44], "level": 0, "parent": null, "vector": [2, 0, 0.1604, 0.0151, 0, 0.66, 0.2727, 799, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "create_city", "arg_names": ["name", "aliases", "code"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def create_city(name, aliases, code):\n c = City(name=name, aliases=aliases, code=code)\n c.put()\n return c"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L42_C4", "label": "c = City()", "type": "assigned_variable", "loc": [42, 42], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L41_C0", "vector": [14, 1, 0.1585, 0.0038, 1, 0.66, 0.0, 411, 3, 3, 0, 0, 801, 10, 1], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "City", "annotation": ""}, "snippet": " c = City(name=name, aliases=aliases, code=code)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L43_C4", "label": "put()", "type": "expression", "loc": [43, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L41_C0", "vector": [8, 1, 0.1623, 0.0038, 1, 0.66, 0.5, 636, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "put", "arg_names": [], "import_names": [], "rhs_call_name": "put", "annotation": ""}, "snippet": " c.put()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L44_C4", "label": "return", "type": "return", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L41_C0", "vector": [13, 1, 0.166, 0.0038, 1, 0.66, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return c"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L46_C0", "label": "delete_city", "type": "function", "loc": [46, 47], "level": 0, "parent": null, "vector": [2, 0, 0.1755, 0.0075, 0, 0.66, 0.3182, 118, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "delete_city", "arg_names": ["key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def delete_city(key):\n City.get(key).delete()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L47_C4", "label": "delete()", "type": "expression", "loc": [47, 47], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L46_C0", "vector": [8, 1, 0.1774, 0.0038, 1, 0.44, 0.0, 266, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "delete", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " City.get(key).delete()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Import_L49_C0", "label": "urllib import urllib", "type": "import", "loc": [49, 49], "level": 0, "parent": null, "vector": [1, 0, 0.1849, 0.0038, 0, 0.66, 0.3636, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urllib"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Import_L50_C0", "label": "datetime import datetime", "type": "import", "loc": [50, 50], "level": 0, "parent": null, "vector": [1, 0, 0.1887, 0.0038, 0, 0.66, 0.4091, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime"], "rhs_call_name": "", "annotation": ""}, "snippet": "import datetime"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:ImportFrom_L51_C0", "label": "from xml.parsers.expat import ParserCreate", "type": "import", "loc": [51, 51], "level": 0, "parent": null, "vector": [1, 0, 0.1925, 0.0038, 0, 0.66, 0.4545, 573, 0, 1, 0, 0, 573, 0, 0], "semantic": {"name": "xml.parsers.expat", "arg_names": [], "import_names": ["ParserCreate"], "rhs_call_name": "", "annotation": ""}, "snippet": "from xml.parsers.expat import ParserCreate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L53_C0", "label": "codes =", "type": "assigned_variable", "loc": [53, 103], "level": 0, "parent": null, "vector": [14, 0, 0.2943, 0.1925, 0, 0.66, 0.5, 865, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "codes", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "codes = {\n 0 : u'\u9f99\u5377\u98ce', # tornado\n 1 : u'\u70ed\u5e26\u98ce\u66b4', # tropical storm\n 2 : u'\u98d3\u98ce', # hurricane\n 3 : u'\u98ce\u66b4', # severe thunderstorms\n 4 : u'\u96f7\u96e8', # thunderstorms\n 5 : u'\u96e8\u5939\u96ea', # mixed rain and snow\n 6 : u'\u96e8\u5939\u51b0\u96f9', # mixed rain and sleet"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L105_C0", "label": "load_rss", "type": "function", "loc": [105, 109], "level": 0, "parent": null, "vector": [2, 0, 0.4038, 0.0189, 0, 0.66, 0.5455, 820, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "load_rss", "arg_names": ["url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def load_rss(url):\n f = urllib.urlopen(url)\n data = f.read()\n f.close()\n return data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L106_C4", "label": "f = urlopen()", "type": "assigned_variable", "loc": [106, 106], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L105_C0", "vector": [14, 1, 0.4, 0.0038, 1, 0.15, 0.0, 899, 3, 1, 0, 0, 687, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "urlopen", "annotation": ""}, "snippet": " f = urllib.urlopen(url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L107_C4", "label": "data = read()", "type": "assigned_variable", "loc": [107, 107], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L105_C0", "vector": [14, 1, 0.4038, 0.0038, 1, 0.15, 0.3333, 929, 3, 0, 0, 0, 453, 10, 1], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " data = f.read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L108_C4", "label": "close()", "type": "expression", "loc": [108, 108], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L105_C0", "vector": [8, 1, 0.4075, 0.0038, 1, 0.15, 0.6667, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " f.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L109_C4", "label": "return", "type": "return", "loc": [109, 109], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L105_C0", "vector": [13, 1, 0.4113, 0.0038, 1, 0.15, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L111_C0", "label": "Wind", "type": "class", "loc": [111, 120], "level": 0, "parent": null, "vector": [3, 0, 0.4358, 0.0377, 0, 0.66, 0.5909, 528, 0, 2, 0, 0, 186, 0, 0], "semantic": {"name": "Wind", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Wind(object):\n def __init__(self, chill, direction, speed):\n self.chill = chill\n self.direction = direction\n self.speed = speed\n\n def __str__(self):\n return r'{\"chill\" : %s, \"direction\" : %s, \"speed\" : %s}' % (self.chill, self.direction, self.speed)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L112_C4", "label": "__init__", "type": "function", "loc": [112, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L111_C0", "vector": [2, 1, 0.4283, 0.0151, 1, 0.34, 0.0, 555, 0, 4, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "chill", "direction", "speed"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, chill, direction, speed):\n self.chill = chill\n self.direction = direction\n self.speed = speed"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L113_C8", "label": "self.chill =", "type": "assigned_variable", "loc": [113, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L112_C4", "vector": [14, 2, 0.4264, 0.0038, 2, 0.12, 0.0, 547, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.chill", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.chill = chill"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L114_C8", "label": "self.direction =", "type": "assigned_variable", "loc": [114, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L112_C4", "vector": [14, 2, 0.4302, 0.0038, 2, 0.12, 0.5, 691, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.direction", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.direction = direction"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L115_C8", "label": "self.speed =", "type": "assigned_variable", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L112_C4", "vector": [14, 2, 0.434, 0.0038, 2, 0.12, 1.0, 290, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.speed", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.speed = speed"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L117_C4", "label": "__str__", "type": "function", "loc": [117, 118], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L111_C0", "vector": [2, 1, 0.4434, 0.0075, 1, 0.34, 0.5, 527, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__str__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __str__(self):\n return r'{\"chill\" : %s, \"direction\" : %s, \"speed\" : %s}' % (self.chill, self.direction, self.speed)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L118_C8", "label": "return", "type": "return", "loc": [118, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L117_C4", "vector": [13, 2, 0.4453, 0.0038, 2, 0.04, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return r'{\"chill\" : %s, \"direction\" : %s, \"speed\" : %s}' % (self.chill, self.direction, self.speed)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L120_C4", "label": "__repr__ =", "type": "assigned_variable", "loc": [120, 120], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L111_C0", "vector": [14, 1, 0.4528, 0.0038, 1, 0.34, 1.0, 204, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__repr__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __repr__ = __str__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L122_C0", "label": "Atmosphere", "type": "class", "loc": [122, 132], "level": 0, "parent": null, "vector": [3, 0, 0.4792, 0.0415, 0, 0.66, 0.6364, 91, 0, 2, 0, 0, 186, 0, 0], "semantic": {"name": "Atmosphere", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Atmosphere(object):\n def __init__(self, humidity, visibility, pressure, rising):\n self.humidity = humidity\n self.visibility = visibility\n self.pressure = pressure\n self.rising = rising\n\n def __str__(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L123_C4", "label": "__init__", "type": "function", "loc": [123, 127], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L122_C0", "vector": [2, 1, 0.4717, 0.0189, 1, 0.03, 0.0, 555, 0, 5, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "humidity", "visibility", "pressure", "rising"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, humidity, visibility, pressure, rising):\n self.humidity = humidity\n self.visibility = visibility\n self.pressure = pressure\n self.rising = rising"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L124_C8", "label": "self.humidity =", "type": "assigned_variable", "loc": [124, 124], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L123_C4", "vector": [14, 2, 0.4679, 0.0038, 2, 0.53, 0.0, 272, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.humidity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.humidity = humidity"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L125_C8", "label": "self.visibility =", "type": "assigned_variable", "loc": [125, 125], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L123_C4", "vector": [14, 2, 0.4717, 0.0038, 2, 0.53, 0.3333, 393, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.visibility", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.visibility = visibility"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L126_C8", "label": "self.pressure =", "type": "assigned_variable", "loc": [126, 126], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L123_C4", "vector": [14, 2, 0.4755, 0.0038, 2, 0.53, 0.6667, 864, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.pressure", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.pressure = pressure"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L127_C8", "label": "self.rising =", "type": "assigned_variable", "loc": [127, 127], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L123_C4", "vector": [14, 2, 0.4792, 0.0038, 2, 0.53, 1.0, 255, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.rising", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.rising = rising"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L129_C4", "label": "__str__", "type": "function", "loc": [129, 130], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L122_C0", "vector": [2, 1, 0.4887, 0.0075, 1, 0.03, 0.5, 527, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__str__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __str__(self):\n return r'{\"humidity\" : %s, \"visibility\" : %s, \"pressure\" : %s, \"rising\": %s}' % (self.humidity, self.visibility, self.pressure, self.rising)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L130_C8", "label": "return", "type": "return", "loc": [130, 130], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L129_C4", "vector": [13, 2, 0.4906, 0.0038, 2, 0.25, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return r'{\"humidity\" : %s, \"visibility\" : %s, \"pressure\" : %s, \"rising\": %s}' % (self.humidity, self.visibility, self.pressure, self.rising)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L132_C4", "label": "__repr__ =", "type": "assigned_variable", "loc": [132, 132], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L122_C0", "vector": [14, 1, 0.4981, 0.0038, 1, 0.03, 1.0, 204, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__repr__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __repr__ = __str__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L134_C0", "label": "Astronomy", "type": "class", "loc": [134, 142], "level": 0, "parent": null, "vector": [3, 0, 0.5208, 0.034, 0, 0.66, 0.6818, 675, 0, 2, 0, 0, 186, 0, 0], "semantic": {"name": "Astronomy", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Astronomy(object):\n def __init__(self, sunrise, sunset):\n self.sunrise = sunrise\n self.sunset = sunset\n\n def __str__(self):\n return r'{\"sunrise\" : \"%s\", \"sunset\": \"%s\"}' % (self.sunrise, self.sunset)\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L135_C4", "label": "__init__", "type": "function", "loc": [135, 137], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L134_C0", "vector": [2, 1, 0.5132, 0.0113, 1, 0.61, 0.0, 555, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "sunrise", "sunset"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, sunrise, sunset):\n self.sunrise = sunrise\n self.sunset = sunset"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L136_C8", "label": "self.sunrise =", "type": "assigned_variable", "loc": [136, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L135_C4", "vector": [14, 2, 0.5132, 0.0038, 2, 0.7, 0.0, 304, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.sunrise", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.sunrise = sunrise"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L137_C8", "label": "self.sunset =", "type": "assigned_variable", "loc": [137, 137], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L135_C4", "vector": [14, 2, 0.517, 0.0038, 2, 0.7, 1.0, 196, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.sunset", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.sunset = sunset"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L139_C4", "label": "__str__", "type": "function", "loc": [139, 140], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L134_C0", "vector": [2, 1, 0.5264, 0.0075, 1, 0.61, 0.5, 527, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__str__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __str__(self):\n return r'{\"sunrise\" : \"%s\", \"sunset\": \"%s\"}' % (self.sunrise, self.sunset)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L140_C8", "label": "return", "type": "return", "loc": [140, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L139_C4", "vector": [13, 2, 0.5283, 0.0038, 2, 0.06, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return r'{\"sunrise\" : \"%s\", \"sunset\": \"%s\"}' % (self.sunrise, self.sunset)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L142_C4", "label": "__repr__ =", "type": "assigned_variable", "loc": [142, 142], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L134_C0", "vector": [14, 1, 0.5358, 0.0038, 1, 0.61, 1.0, 204, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__repr__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __repr__ = __str__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L144_C0", "label": "Forecast", "type": "class", "loc": [144, 160], "level": 0, "parent": null, "vector": [3, 0, 0.5736, 0.0642, 0, 0.66, 0.7273, 767, 0, 2, 0, 0, 186, 0, 0], "semantic": {"name": "Forecast", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Forecast(object):\n '<yweather:forecast day=\"Wed\" date=\"30 Jun 2010\" low=\"24\" high=\"30\" text=\"Mostly Cloudy\" code=\"28\" />'\n def __init__(self, day, date, low, high, code):\n self.day = day\n self.date = date\n self.low = low\n self.high = high\n self.code = code"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L145_C4", "label": "expression", "type": "expression", "loc": [145, 145], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L144_C0", "vector": [8, 1, 0.5472, 0.0038, 1, 0.0, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '<yweather:forecast day=\"Wed\" date=\"30 Jun 2010\" low=\"24\" high=\"30\" text=\"Mostly Cloudy\" code=\"28\" />'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L146_C4", "label": "__init__", "type": "function", "loc": [146, 151], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L144_C0", "vector": [2, 1, 0.5604, 0.0226, 1, 0.0, 0.3333, 555, 0, 6, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "day", "date", "low", "high", "code"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, day, date, low, high, code):\n self.day = day\n self.date = date\n self.low = low\n self.high = high\n self.code = code"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L147_C8", "label": "self.day =", "type": "assigned_variable", "loc": [147, 147], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L146_C4", "vector": [14, 2, 0.5547, 0.0038, 2, 0.4, 0.0, 352, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.day", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.day = day"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L148_C8", "label": "self.date =", "type": "assigned_variable", "loc": [148, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L146_C4", "vector": [14, 2, 0.5585, 0.0038, 2, 0.4, 0.25, 715, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.date", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.date = date"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L149_C8", "label": "self.low =", "type": "assigned_variable", "loc": [149, 149], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L146_C4", "vector": [14, 2, 0.5623, 0.0038, 2, 0.4, 0.5, 349, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.low", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.low = low"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L150_C8", "label": "self.high =", "type": "assigned_variable", "loc": [150, 150], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L146_C4", "vector": [14, 2, 0.566, 0.0038, 2, 0.4, 0.75, 787, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.high", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.high = high"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L151_C8", "label": "self.code =", "type": "assigned_variable", "loc": [151, 151], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L146_C4", "vector": [14, 2, 0.5698, 0.0038, 2, 0.4, 1.0, 296, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.code", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.code = code"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L153_C4", "label": "__str__", "type": "function", "loc": [153, 158], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L144_C0", "vector": [2, 1, 0.5868, 0.0226, 1, 0.0, 0.6667, 527, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__str__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __str__(self):\n return u'{\"date\" : \"%s\", \"day\" : %s, \"code\" : %s, \"text\" : \"%s\", \"low\" : %d, \"high\" : %d, \"image_large\" : \"%s\", \"image_small\" : \"%s\"}' % (\n self.date, self.day, self.code, codes[self.code], self.low, self.high,\n \"http://l.yimg.com/a/i/us/nws/weather/gr/%sd.png\" % self.code,\n \"http://l.yimg.com/a/i/us/nws/weather/gr/%ss.png\" % self.code,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L154_C8", "label": "return", "type": "return", "loc": [154, 158], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L153_C4", "vector": [13, 2, 0.5887, 0.0189, 2, 0.96, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return u'{\"date\" : \"%s\", \"day\" : %s, \"code\" : %s, \"text\" : \"%s\", \"low\" : %d, \"high\" : %d, \"image_large\" : \"%s\", \"image_small\" : \"%s\"}' % (\n self.date, self.day, self.code, codes[self.code], self.low, self.high,\n \"http://l.yimg.com/a/i/us/nws/weather/gr/%sd.png\" % self.code,\n \"http://l.yimg.com/a/i/us/nws/weather/gr/%ss.png\" % self.code,\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L160_C4", "label": "__repr__ =", "type": "assigned_variable", "loc": [160, 160], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L144_C0", "vector": [14, 1, 0.6038, 0.0038, 1, 0.0, 1.0, 204, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__repr__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __repr__ = __str__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L162_C0", "label": "index_of", "type": "function", "loc": [162, 166], "level": 0, "parent": null, "vector": [2, 0, 0.6189, 0.0189, 0, 0.66, 0.7727, 478, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "index_of", "arg_names": ["list", "data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def index_of(list, data):\n for i, item in enumerate(list):\n if data==item:\n return i\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:For_L163_C4", "label": "for i, item", "type": "for", "loc": [163, 165], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L162_C0", "vector": [6, 1, 0.6189, 0.0113, 1, 0.84, 0.0, 849, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "i, item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i, item in enumerate(list):\n if data==item:\n return i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L164_C8", "label": "if", "type": "if", "loc": [164, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:For_L163_C4", "vector": [4, 2, 0.6208, 0.0075, 2, 0.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if data==item:\n return i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L165_C12", "label": "return", "type": "return", "loc": [165, 165], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L164_C8", "vector": [13, 3, 0.6226, 0.0038, 3, 0.77, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return i"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L166_C4", "label": "return", "type": "return", "loc": [166, 166], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L162_C0", "vector": [13, 1, 0.6264, 0.0038, 1, 0.84, 1.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L168_C0", "label": "get_day", "type": "function", "loc": [168, 169], "level": 0, "parent": null, "vector": [2, 0, 0.6358, 0.0075, 0, 0.66, 0.8182, 936, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_day", "arg_names": ["day"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_day(day):\n return index_of(('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'), day)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L169_C4", "label": "return", "type": "return", "loc": [169, 169], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L168_C0", "vector": [13, 1, 0.6377, 0.0038, 1, 0.24, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return index_of(('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'), day)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L171_C0", "label": "get_date", "type": "function", "loc": [171, 175], "level": 0, "parent": null, "vector": [2, 0, 0.6528, 0.0189, 0, 0.66, 0.8636, 806, 0, 1, 1, 0, 0, 0, 5], "semantic": {"name": "get_date", "arg_names": ["date"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_date(date):\n '30 Jun 2010'\n ss = date.split(' ')\n month = index_of(('', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), ss[1])\n return datetime.date(int(ss[2]), month, int(ss[0]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L172_C4", "label": "expression", "type": "expression", "loc": [172, 172], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L171_C0", "vector": [8, 1, 0.6491, 0.0038, 1, 0.21, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '30 Jun 2010'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L173_C4", "label": "ss = split()", "type": "assigned_variable", "loc": [173, 173], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L171_C0", "vector": [14, 1, 0.6528, 0.0038, 1, 0.21, 0.3333, 582, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "ss", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " ss = date.split(' ')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L174_C4", "label": "month = index_of()", "type": "assigned_variable", "loc": [174, 174], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L171_C0", "vector": [14, 1, 0.6566, 0.0038, 1, 0.21, 0.6667, 918, 3, 2, 0, 0, 478, 10, 1], "semantic": {"name": "month", "arg_names": [], "import_names": [], "rhs_call_name": "index_of", "annotation": ""}, "snippet": " month = index_of(('', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), ss[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L175_C4", "label": "return", "type": "return", "loc": [175, 175], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L171_C0", "vector": [13, 1, 0.6604, 0.0038, 1, 0.21, 1.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return datetime.date(int(ss[2]), month, int(ss[0]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L177_C0", "label": "to_24hour", "type": "function", "loc": [177, 186], "level": 0, "parent": null, "vector": [2, 0, 0.6849, 0.0377, 0, 0.66, 0.9091, 962, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "to_24hour", "arg_names": ["time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def to_24hour(time):\n ' convert \"4:39 pm\" to \"16:39\" '\n if time.endswith(' am'):\n return time[:-3]\n if time.endswith(' pm'):\n time = time[:-3]\n n = time.find(':')\n to_24h = int(time[:n]) + 12"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L178_C4", "label": "expression", "type": "expression", "loc": [178, 178], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L177_C0", "vector": [8, 1, 0.6717, 0.0038, 1, 0.63, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ' convert \"4:39 pm\" to \"16:39\" '"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L179_C4", "label": "if", "type": "if", "loc": [179, 180], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L177_C0", "vector": [4, 1, 0.6774, 0.0075, 1, 0.63, 0.3333, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if time.endswith(' am'):\n return time[:-3]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L180_C8", "label": "return", "type": "return", "loc": [180, 180], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L179_C4", "vector": [13, 2, 0.6792, 0.0038, 2, 0.08, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return time[:-3]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L181_C4", "label": "if", "type": "if", "loc": [181, 185], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L177_C0", "vector": [4, 1, 0.6906, 0.0189, 1, 0.63, 0.6667, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if time.endswith(' pm'):\n time = time[:-3]\n n = time.find(':')\n to_24h = int(time[:n]) + 12\n return \"%d:%s\" % (to_24h, time[n+1:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L182_C8", "label": "time =", "type": "assigned_variable", "loc": [182, 182], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L181_C4", "vector": [14, 2, 0.6868, 0.0038, 2, 0.01, 0.0, 654, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " time = time[:-3]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L183_C8", "label": "n = find()", "type": "assigned_variable", "loc": [183, 183], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L181_C4", "vector": [14, 2, 0.6906, 0.0038, 2, 0.01, 0.3333, 773, 3, 1, 0, 0, 340, 10, 1], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "find", "annotation": ""}, "snippet": " n = time.find(':')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L184_C8", "label": "to_24h =", "type": "assigned_variable", "loc": [184, 184], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L181_C4", "vector": [14, 2, 0.6943, 0.0038, 2, 0.01, 0.6667, 635, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "to_24h", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " to_24h = int(time[:n]) + 12"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L185_C8", "label": "return", "type": "return", "loc": [185, 185], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L181_C4", "vector": [13, 2, 0.6981, 0.0038, 2, 0.01, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return \"%d:%s\" % (to_24h, time[n+1:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L186_C4", "label": "return", "type": "return", "loc": [186, 186], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L177_C0", "vector": [13, 1, 0.7019, 0.0038, 1, 0.63, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L188_C0", "label": "Weather", "type": "class", "loc": [188, 260], "level": 0, "parent": null, "vector": [3, 0, 0.8453, 0.2755, 0, 0.66, 0.9545, 565, 0, 5, 0, 0, 186, 0, 23], "semantic": {"name": "Weather", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Weather(object):\n\n def char_data(self, text):\n if self.__isLastBuildDate:\n n = text.find(', ')\n text = text[n+2:]\n n1 = text.find(' ')\n n2 = text.find(' ', n1+1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L190_C4", "label": "char_data", "type": "function", "loc": [190, 208], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L188_C0", "vector": [2, 1, 0.7509, 0.0717, 1, 0.96, 0.0, 935, 0, 2, 0, 0, 0, 0, 9], "semantic": {"name": "char_data", "arg_names": ["self", "text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def char_data(self, text):\n if self.__isLastBuildDate:\n n = text.find(', ')\n text = text[n+2:]\n n1 = text.find(' ')\n n2 = text.find(' ', n1+1)\n m = text[n1+1:n2]\n month = index_of(('', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), m)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "label": "if", "type": "if", "loc": [191, 208], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L190_C4", "vector": [4, 2, 0.7528, 0.0679, 2, 0.62, 0.0, 0, 7, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.__isLastBuildDate:\n n = text.find(', ')\n text = text[n+2:]\n n1 = text.find(' ')\n n2 = text.find(' ', n1+1)\n m = text[n1+1:n2]\n month = index_of(('', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), m)\n text = text.replace(m, str(month))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L192_C12", "label": "n = find()", "type": "assigned_variable", "loc": [192, 192], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "vector": [14, 3, 0.7245, 0.0038, 3, 0.0, 0.0, 773, 3, 1, 0, 0, 340, 10, 1], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "find", "annotation": ""}, "snippet": " n = text.find(', ')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L193_C12", "label": "text =", "type": "assigned_variable", "loc": [193, 193], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "vector": [14, 3, 0.7283, 0.0038, 3, 0.0, 0.0714, 439, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " text = text[n+2:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L194_C12", "label": "n1 = find()", "type": "assigned_variable", "loc": [194, 194], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "vector": [14, 3, 0.7321, 0.0038, 3, 0.0, 0.1429, 884, 3, 1, 0, 0, 340, 10, 1], "semantic": {"name": "n1", "arg_names": [], "import_names": [], "rhs_call_name": "find", "annotation": ""}, "snippet": " n1 = text.find(' ')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L195_C12", "label": "n2 = find()", "type": "assigned_variable", "loc": [195, 195], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "vector": [14, 3, 0.7358, 0.0038, 3, 0.0, 0.2143, 601, 3, 2, 0, 0, 340, 10, 1], "semantic": {"name": "n2", "arg_names": [], "import_names": [], "rhs_call_name": "find", "annotation": ""}, "snippet": " n2 = text.find(' ', n1+1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L196_C12", "label": "m =", "type": "assigned_variable", "loc": [196, 196], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "vector": [14, 3, 0.7396, 0.0038, 3, 0.0, 0.2857, 711, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " m = text[n1+1:n2]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L197_C12", "label": "month = index_of()", "type": "assigned_variable", "loc": [197, 197], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "vector": [14, 3, 0.7434, 0.0038, 3, 0.0, 0.3571, 918, 3, 2, 0, 0, 478, 10, 1], "semantic": {"name": "month", "arg_names": [], "import_names": [], "rhs_call_name": "index_of", "annotation": ""}, "snippet": " month = index_of(('', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), m)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L198_C12", "label": "text = replace()", "type": "assigned_variable", "loc": [198, 198], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "vector": [14, 3, 0.7472, 0.0038, 3, 0.0, 0.4286, 439, 3, 2, 0, 0, 293, 10, 2], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " text = text.replace(m, str(month))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L199_C12", "label": "if", "type": "if", "loc": [199, 200], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "vector": [4, 3, 0.7528, 0.0075, 3, 0.0, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not text.endswith(' CST'):\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L200_C16", "label": "return", "type": "return", "loc": [200, 200], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L199_C12", "vector": [13, 4, 0.7547, 0.0038, 4, 0.71, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L201_C12", "label": "text =", "type": "assigned_variable", "loc": [201, 201], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "vector": [14, 3, 0.7585, 0.0038, 3, 0.0, 0.5714, 439, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " text = text[:-4]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L202_C12", "label": "is_pm = endswith()", "type": "assigned_variable", "loc": [202, 202], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "vector": [14, 3, 0.7623, 0.0038, 3, 0.0, 0.6429, 620, 3, 1, 0, 0, 487, 10, 1], "semantic": {"name": "is_pm", "arg_names": [], "import_names": [], "rhs_call_name": "endswith", "annotation": ""}, "snippet": " is_pm = text.endswith(' pm')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L203_C12", "label": "text =", "type": "assigned_variable", "loc": [203, 203], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "vector": [14, 3, 0.766, 0.0038, 3, 0.0, 0.7143, 439, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " text = text[:-3]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L204_C12", "label": "time = strptime()", "type": "assigned_variable", "loc": [204, 204], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "vector": [14, 3, 0.7698, 0.0038, 3, 0.0, 0.7857, 654, 3, 2, 0, 0, 839, 10, 1], "semantic": {"name": "time", "arg_names": [], "import_names": [], "rhs_call_name": "strptime", "annotation": ""}, "snippet": " time = datetime.datetime.strptime(text, '%d %m %Y %I:%M')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L205_C12", "label": "h =", "type": "assigned_variable", "loc": [205, 205], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "vector": [14, 3, 0.7736, 0.0038, 3, 0.0, 0.8571, 686, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "h", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " h = time.hour"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L206_C12", "label": "if", "type": "if", "loc": [206, 207], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "vector": [4, 3, 0.7792, 0.0075, 3, 0.0, 0.9286, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if is_pm:\n h = h + 12"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L207_C16", "label": "h =", "type": "assigned_variable", "loc": [207, 207], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L206_C12", "vector": [14, 4, 0.7811, 0.0038, 4, 0.84, 0.0, 686, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "h", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " h = h + 12"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L208_C12", "label": "self.pub =", "type": "assigned_variable", "loc": [208, 208], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "vector": [14, 3, 0.7849, 0.0038, 3, 0.0, 1.0, 86, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.pub", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.pub = '%d-%#02d-%#02d %#02d:%#02d' % (time.year, time.month, time.day, h, time.minute)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L210_C4", "label": "end_element", "type": "function", "loc": [210, 212], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L188_C0", "vector": [2, 1, 0.7962, 0.0113, 1, 0.96, 0.2, 513, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "end_element", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def end_element(self, name):\n if name=='lastBuildDate':\n self.__isLastBuildDate = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L211_C8", "label": "if", "type": "if", "loc": [211, 212], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L210_C4", "vector": [4, 2, 0.7981, 0.0075, 2, 0.23, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name=='lastBuildDate':\n self.__isLastBuildDate = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L212_C12", "label": "self.__isLastBuildDate =", "type": "assigned_variable", "loc": [212, 212], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L211_C8", "vector": [14, 3, 0.8, 0.0038, 3, 0.7, 0.0, 741, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.__isLastBuildDate", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.__isLastBuildDate = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L214_C4", "label": "start_element", "type": "function", "loc": [214, 237], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L188_C0", "vector": [2, 1, 0.8509, 0.0906, 1, 0.96, 0.4, 385, 0, 3, 0, 0, 0, 0, 9], "semantic": {"name": "start_element", "arg_names": ["self", "name", "attrs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def start_element(self, name, attrs):\n if name=='lastBuildDate':\n self.__isLastBuildDate = True\n return\n if name=='yweather:forecast':\n self.forecasts.append(Forecast(\n get_day(attrs['day']),\n get_date(attrs['date']),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L215_C8", "label": "if", "type": "if", "loc": [215, 217], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L214_C4", "vector": [4, 2, 0.8151, 0.0113, 2, 0.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name=='lastBuildDate':\n self.__isLastBuildDate = True\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L216_C12", "label": "self.__isLastBuildDate =", "type": "assigned_variable", "loc": [216, 216], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L215_C8", "vector": [14, 3, 0.8151, 0.0038, 3, 0.88, 0.0, 741, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.__isLastBuildDate", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.__isLastBuildDate = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L217_C12", "label": "return", "type": "return", "loc": [217, 217], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L215_C8", "vector": [13, 3, 0.8189, 0.0038, 3, 0.88, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L218_C8", "label": "if", "type": "if", "loc": [218, 225], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L214_C4", "vector": [4, 2, 0.8358, 0.0302, 2, 0.8, 0.25, 0, 0, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name=='yweather:forecast':\n self.forecasts.append(Forecast(\n get_day(attrs['day']),\n get_date(attrs['date']),\n int(attrs['low']),\n int(attrs['high']),\n int(attrs['code'])\n ))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L219_C12", "label": "append()", "type": "expression", "loc": [219, 225], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L218_C8", "vector": [8, 3, 0.8377, 0.0264, 3, 0.62, 0.0, 243, 3, 1, 0, 0, 0, 0, 7], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.forecasts.append(Forecast(\n get_day(attrs['day']),\n get_date(attrs['date']),\n int(attrs['low']),\n int(attrs['high']),\n int(attrs['code'])\n ))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L226_C8", "label": "if", "type": "if", "loc": [226, 228], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L214_C4", "vector": [4, 2, 0.8566, 0.0113, 2, 0.8, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name=='yweather:astronomy':\n self.astronomy.sunrise = to_24hour(attrs['sunrise'])\n self.astronomy.sunset = to_24hour(attrs['sunset'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L227_C12", "label": "self.astronomy.sunrise = to_24hour()", "type": "assigned_variable", "loc": [227, 227], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L226_C8", "vector": [14, 3, 0.8566, 0.0038, 3, 0.59, 0.0, 203, 3, 1, 0, 0, 962, 10, 1], "semantic": {"name": "self.astronomy.sunrise", "arg_names": [], "import_names": [], "rhs_call_name": "to_24hour", "annotation": ""}, "snippet": " self.astronomy.sunrise = to_24hour(attrs['sunrise'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L228_C12", "label": "self.astronomy.sunset = to_24hour()", "type": "assigned_variable", "loc": [228, 228], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L226_C8", "vector": [14, 3, 0.8604, 0.0038, 3, 0.59, 1.0, 205, 3, 1, 0, 0, 962, 10, 1], "semantic": {"name": "self.astronomy.sunset", "arg_names": [], "import_names": [], "rhs_call_name": "to_24hour", "annotation": ""}, "snippet": " self.astronomy.sunset = to_24hour(attrs['sunset'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L229_C8", "label": "if", "type": "if", "loc": [229, 233], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L214_C4", "vector": [4, 2, 0.8717, 0.0189, 2, 0.8, 0.75, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name=='yweather:atmosphere':\n self.atmosphere.humidity = attrs['humidity']\n self.atmosphere.visibility = attrs['visibility']\n self.atmosphere.pressure = attrs['pressure']\n self.atmosphere.rising = attrs['rising']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L230_C12", "label": "self.atmosphere.humidity =", "type": "assigned_variable", "loc": [230, 230], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L229_C8", "vector": [14, 3, 0.8679, 0.0038, 3, 0.18, 0.0, 89, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.atmosphere.humidity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atmosphere.humidity = attrs['humidity']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L231_C12", "label": "self.atmosphere.visibility =", "type": "assigned_variable", "loc": [231, 231], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L229_C8", "vector": [14, 3, 0.8717, 0.0038, 3, 0.18, 0.3333, 811, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.atmosphere.visibility", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atmosphere.visibility = attrs['visibility']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L232_C12", "label": "self.atmosphere.pressure =", "type": "assigned_variable", "loc": [232, 232], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L229_C8", "vector": [14, 3, 0.8755, 0.0038, 3, 0.18, 0.6667, 897, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.atmosphere.pressure", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atmosphere.pressure = attrs['pressure']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L233_C12", "label": "self.atmosphere.rising =", "type": "assigned_variable", "loc": [233, 233], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L229_C8", "vector": [14, 3, 0.8792, 0.0038, 3, 0.18, 1.0, 190, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.atmosphere.rising", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.atmosphere.rising = attrs['rising']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L234_C8", "label": "if", "type": "if", "loc": [234, 237], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L214_C4", "vector": [4, 2, 0.8887, 0.0151, 2, 0.8, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name=='yweather:wind':\n self.wind.chill = attrs['chill']\n self.wind.direction = attrs['direction']\n self.wind.speed = attrs['speed']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L235_C12", "label": "self.wind.chill =", "type": "assigned_variable", "loc": [235, 235], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L234_C8", "vector": [14, 3, 0.8868, 0.0038, 3, 0.69, 0.0, 181, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.wind.chill", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.wind.chill = attrs['chill']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L236_C12", "label": "self.wind.direction =", "type": "assigned_variable", "loc": [236, 236], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L234_C8", "vector": [14, 3, 0.8906, 0.0038, 3, 0.69, 0.5, 390, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.wind.direction", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.wind.direction = attrs['direction']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L237_C12", "label": "self.wind.speed =", "type": "assigned_variable", "loc": [237, 237], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L234_C8", "vector": [14, 3, 0.8943, 0.0038, 3, 0.69, 1.0, 50, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.wind.speed", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.wind.speed = attrs['speed']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "label": "__init__", "type": "function", "loc": [239, 251], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L188_C0", "vector": [2, 1, 0.9245, 0.0491, 1, 0.96, 0.6, 555, 0, 2, 0, 0, 0, 0, 5], "semantic": {"name": "__init__", "arg_names": ["self", "data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, data):\n self.__isLastBuildDate = False\n self.pub = None\n self.wind = Wind(None, None, None)\n self.atmosphere = Atmosphere(None, None, None, None)\n self.astronomy = Astronomy(None, None)\n self.forecasts = []\n parser = ParserCreate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L240_C8", "label": "self.__isLastBuildDate =", "type": "assigned_variable", "loc": [240, 240], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "vector": [14, 2, 0.9057, 0.0038, 2, 0.71, 0.0, 741, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.__isLastBuildDate", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.__isLastBuildDate = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L241_C8", "label": "self.pub =", "type": "assigned_variable", "loc": [241, 241], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "vector": [14, 2, 0.9094, 0.0038, 2, 0.71, 0.0909, 86, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.pub", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.pub = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L242_C8", "label": "self.wind = Wind()", "type": "assigned_variable", "loc": [242, 242], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "vector": [14, 2, 0.9132, 0.0038, 2, 0.71, 0.1818, 377, 3, 3, 0, 0, 528, 10, 1], "semantic": {"name": "self.wind", "arg_names": [], "import_names": [], "rhs_call_name": "Wind", "annotation": ""}, "snippet": " self.wind = Wind(None, None, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L243_C8", "label": "self.atmosphere = Atmosphere()", "type": "assigned_variable", "loc": [243, 243], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "vector": [14, 2, 0.917, 0.0038, 2, 0.71, 0.2727, 994, 3, 4, 0, 0, 91, 10, 1], "semantic": {"name": "self.atmosphere", "arg_names": [], "import_names": [], "rhs_call_name": "Atmosphere", "annotation": ""}, "snippet": " self.atmosphere = Atmosphere(None, None, None, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L244_C8", "label": "self.astronomy = Astronomy()", "type": "assigned_variable", "loc": [244, 244], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "vector": [14, 2, 0.9208, 0.0038, 2, 0.71, 0.3636, 802, 3, 2, 0, 0, 675, 10, 1], "semantic": {"name": "self.astronomy", "arg_names": [], "import_names": [], "rhs_call_name": "Astronomy", "annotation": ""}, "snippet": " self.astronomy = Astronomy(None, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L245_C8", "label": "self.forecasts =", "type": "assigned_variable", "loc": [245, 245], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "vector": [14, 2, 0.9245, 0.0038, 2, 0.71, 0.4545, 610, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.forecasts", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.forecasts = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L246_C8", "label": "parser = ParserCreate()", "type": "assigned_variable", "loc": [246, 246], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "vector": [14, 2, 0.9283, 0.0038, 2, 0.71, 0.5455, 968, 3, 0, 0, 0, 684, 10, 1], "semantic": {"name": "parser", "arg_names": [], "import_names": [], "rhs_call_name": "ParserCreate", "annotation": ""}, "snippet": " parser = ParserCreate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L247_C8", "label": "parser.returns_unicode =", "type": "assigned_variable", "loc": [247, 247], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "vector": [14, 2, 0.9321, 0.0038, 2, 0.71, 0.6364, 810, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "parser.returns_unicode", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parser.returns_unicode = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L248_C8", "label": "parser.StartElementHandler =", "type": "assigned_variable", "loc": [248, 248], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "vector": [14, 2, 0.9358, 0.0038, 2, 0.71, 0.7273, 740, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "parser.StartElementHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parser.StartElementHandler = self.start_element"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L249_C8", "label": "parser.EndElementHandler =", "type": "assigned_variable", "loc": [249, 249], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "vector": [14, 2, 0.9396, 0.0038, 2, 0.71, 0.8182, 85, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "parser.EndElementHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parser.EndElementHandler = self.end_element"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L250_C8", "label": "parser.CharacterDataHandler =", "type": "assigned_variable", "loc": [250, 250], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "vector": [14, 2, 0.9434, 0.0038, 2, 0.71, 0.9091, 133, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "parser.CharacterDataHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parser.CharacterDataHandler = self.char_data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L251_C8", "label": "Parse()", "type": "expression", "loc": [251, 251], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "vector": [8, 2, 0.9472, 0.0038, 2, 0.71, 1.0, 291, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "Parse", "arg_names": [], "import_names": [], "rhs_call_name": "Parse", "annotation": ""}, "snippet": " parser.Parse(data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L253_C4", "label": "__str__", "type": "function", "loc": [253, 258], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L188_C0", "vector": [2, 1, 0.9642, 0.0226, 1, 0.96, 0.8, 527, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "__str__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __str__(self):\n pub = 'null'\n if self.pub:\n pub = r'\"%s\"' % self.pub\n return u'{\"pub\" : %s, \"wind\" : %s, \"astronomy\" : %s, \"atmosphere\" : %s, \"forecasts\" : %s}' \\\n % (pub, self.wind, self.astronomy, self.atmosphere, self.forecasts)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L254_C8", "label": "pub =", "type": "assigned_variable", "loc": [254, 254], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L253_C4", "vector": [14, 2, 0.9585, 0.0038, 2, 0.99, 0.0, 41, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "pub", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pub = 'null'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L255_C8", "label": "if", "type": "if", "loc": [255, 256], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L253_C4", "vector": [4, 2, 0.9642, 0.0075, 2, 0.99, 0.5, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.pub:\n pub = r'\"%s\"' % self.pub"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L256_C12", "label": "pub =", "type": "assigned_variable", "loc": [256, 256], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L255_C8", "vector": [14, 3, 0.966, 0.0038, 3, 0.77, 0.0, 41, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pub", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pub = r'\"%s\"' % self.pub"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L257_C8", "label": "return", "type": "return", "loc": [257, 258], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L253_C4", "vector": [13, 2, 0.9717, 0.0075, 2, 0.99, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return u'{\"pub\" : %s, \"wind\" : %s, \"astronomy\" : %s, \"atmosphere\" : %s, \"forecasts\" : %s}' \\\n % (pub, self.wind, self.astronomy, self.atmosphere, self.forecasts)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L260_C4", "label": "__repr__ =", "type": "assigned_variable", "loc": [260, 260], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L188_C0", "vector": [14, 1, 0.9811, 0.0038, 1, 0.96, 1.0, 204, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__repr__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " __repr__ = __str__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L262_C0", "label": "Subscriber", "type": "class", "loc": [262, 265], "level": 0, "parent": null, "vector": [3, 0, 0.9943, 0.0151, 0, 0.66, 1.0, 455, 0, 0, 0, 0, 697, 0, 3], "semantic": {"name": "Subscriber", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Subscriber(db.Model):\n mobile = db.StringProperty(required=True)\n city = db.StringProperty(required=True)\n time = db.IntegerProperty(required=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L263_C4", "label": "mobile = StringProperty()", "type": "assigned_variable", "loc": [263, 263], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L262_C0", "vector": [14, 1, 0.9925, 0.0038, 1, 0.85, 0.0, 339, 3, 1, 0, 0, 882, 10, 1], "semantic": {"name": "mobile", "arg_names": [], "import_names": [], "rhs_call_name": "StringProperty", "annotation": ""}, "snippet": " mobile = db.StringProperty(required=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L264_C4", "label": "city = StringProperty()", "type": "assigned_variable", "loc": [264, 264], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L262_C0", "vector": [14, 1, 0.9962, 0.0038, 1, 0.85, 0.5, 825, 3, 1, 0, 0, 882, 10, 1], "semantic": {"name": "city", "arg_names": [], "import_names": [], "rhs_call_name": "StringProperty", "annotation": ""}, "snippet": " city = db.StringProperty(required=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L265_C4", "label": "time = IntegerProperty()", "type": "assigned_variable", "loc": [265, 265], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L262_C0", "vector": [14, 1, 1.0, 0.0038, 1, 0.85, 1.0, 654, 3, 1, 0, 0, 703, 10, 1], "semantic": {"name": "time", "arg_names": [], "import_names": [], "rhs_call_name": "IntegerProperty", "annotation": ""}, "snippet": " time = db.IntegerProperty(required=True)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L23_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L105_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L106_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L105_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L107_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L105_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L108_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L105_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L109_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L112_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L112_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L113_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L112_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L112_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L117_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L118_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L120_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L122_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L123_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L123_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L124_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L123_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L125_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L123_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L126_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L123_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L127_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L122_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L129_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L129_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L130_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L122_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L132_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L134_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L135_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L136_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L137_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L134_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L139_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L134_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L142_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L144_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L145_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L144_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L146_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L146_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L146_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L148_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L146_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L149_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L146_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L150_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L146_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L151_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L144_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L153_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L154_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L144_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L160_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L162_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:For_L163_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:For_L163_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L164_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L164_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L165_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L162_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L166_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L168_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L169_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L171_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L172_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L171_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L173_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L171_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L174_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L171_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L175_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L178_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L179_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L179_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L180_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L181_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L181_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L182_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L181_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L183_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L181_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L184_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L181_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L185_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L177_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L186_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L188_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L190_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L192_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L193_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L194_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L195_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L196_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L197_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L198_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L199_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L199_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L200_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L201_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L202_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L203_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L204_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L205_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L206_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L206_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L207_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L191_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L208_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L188_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L210_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L210_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L211_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L211_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L212_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L188_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L214_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L214_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L215_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L215_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L216_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L215_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L217_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L214_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L218_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L218_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L219_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L214_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L226_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L226_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L227_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L226_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L228_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L214_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L229_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L229_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L230_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L229_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L231_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L229_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L232_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L229_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L233_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L214_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L234_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L234_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L235_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L234_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L236_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L234_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L237_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L188_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L240_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L241_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L242_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L243_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L244_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L245_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L246_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L247_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L248_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L249_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L250_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Expr_L251_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L188_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L253_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L253_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L254_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L253_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L255_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:If_L255_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L256_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:FunctionDef_L253_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Return_L257_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L188_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L260_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L262_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L263_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L262_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L264_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1523:ClassDef_L262_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1523:Assign_L265_C4"}]
#!/usr/bin/env python # -*- coding: UTF-8 -*- ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.4.1' __CHEETAH_versionTuple__ = (2, 4, 1, 'final', 0) __CHEETAH_genTime__ = 1284450634.7130001 __CHEETAH_genTimestamp__ = 'Tue Sep 14 15:50:34 2010' __CHEETAH_src__ = 'D:\\workspace\\python\\weather-china\\src\\home.html' __CHEETAH_srcLastModified__ = 'Wed Jul 28 10:35:46 2010' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class CompiledTemplate(Template): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(CompiledTemplate, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def respond(self, trans=None): ## CHEETAH: main method generated for this template if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u'''<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>\u5929\u6c14\u9884\u62a5</title> <script type="text/javascript" src="/static/js/jquery.js"></script> <script type="text/javascript"> var days=["\u661f\u671f\u65e5", "\u661f\u671f\u4e00", "\u661f\u671f\u4e8c", "\u661f\u671f\u4e09", "\u661f\u671f\u56db", "\u661f\u671f\u4e94", "\u661f\u671f\u516d"] jQuery(document).ready(function() { jQuery.getJSON("/api?city=''') _v = VFSL([locals()]+SL+[globals(), __builtin__],"city.first_alias",True) # u'${city.first_alias}' on line 11, col 29 if _v is not None: write(_filter(_v, rawExpr=u'${city.first_alias}')) # from line 11, col 29. write(u'''", function(data) { var today = data.forecasts[0]; \tvar tomorrow = data.forecasts[1]; jQuery("#x-today-date").html(today.date); jQuery("#x-tomorrow-date").html(tomorrow.date); jQuery("#x-today-day").html(days[today.day]); jQuery("#x-tomorrow-day").html(days[tomorrow.day]); jQuery("#x-today-text").html(today.text); jQuery("#x-tomorrow-text").html(tomorrow.text); jQuery("#x-today-temp").html(today.low + " ~ " + today.high + "\xb0"); \tjQuery("#x-tomorrow-temp").html(tomorrow.low + " ~ " + tomorrow.high + "\xb0"); jQuery("#x-today-icon").css("background-image", "url(" + today.image_large + ")"); \tjQuery("#x-tomorrow-icon").css("background-image", "url(" + tomorrow.image_large + ")"); \tjQuery("#x-today-icon-small").css("background-image", "url(" + today.image_small + ")"); jQuery("#x-pub").html(data.pub); \tif (data.wind.chill!=null) \t jQuery("#x-wind-chill").html(data.wind.chill); \tif (data.wind.direction!=null) \t jQuery("#x-wind-direction").html(data.wind.direction); \tif (data.wind.speed!=null) \t jQuery("#x-wind-speed").html(data.wind.speed); if (data.atmosphere.humidity!=null) \t jQuery("#x-atmosphere-humidity").html(data.atmosphere.humidity); if (data.atmosphere.visibility!=null) \t jQuery("#x-atmosphere-visibility").html(data.atmosphere.visibility); if (data.atmosphere.pressure!=null) \t jQuery("#x-atmosphere-pressure").html(data.atmosphere.pressure); if (data.astronomy.sunrise!=null) \t jQuery("#x-astronomy-sunrise").html(data.astronomy.sunrise); if (data.astronomy.sunset!=null) \t jQuery("#x-astronomy-sunset").html(data.astronomy.sunset); }); }); function change_city(key){ if (key=="-") return; location.assign("/?city=" + key); } </script> <link rel="stylesheet" href="/static/css/screen.css" type="text/css" media="screen, projection"> <link rel="stylesheet" href="/static/css/print.css" type="text/css" media="print"> <!--[if lt IE 8]> \t<link rel="stylesheet" href="/static/css/ie.css" type="text/css" media="screen, projection"> <![endif]--> <style type="text/css"> div.w-report span.h { \tmargin:3px 0px; \tfont-weight:bold; font-size:24px; \tdisplay:inline; } div.w-report span.date { \tmargin:3px 0px 3px 12px; \tfont-weight:bold; \tfont-size:16px; } div.weather-report { \tbackground-image:url(static/img/w-bg.png); \tbackground-repeat:no-repeat; \tbackground-position:56px 70px; \tmargin:0px; \tpadding:0px; \twidth:300px; \theight:160px; } div.weather-icon { \tbackground-image:url(static/w/img/d44.png); \tbackground-repeat:no-repeat; \tmargin:0px; \tpadding:0px; \twidth:300px; \theight:160px; } div.weather-text { \ttext-align:right; \tmargin:0px; \tpadding-top:76px; \tpadding-right:20px; } div.weather-text p { \tmargin:0px; \tcolor:#FFF; \tfont-size: 20px; \tfont-weight: bold; \ttext-shadow: #315895 0px -1px 1px; \tline-height:28px; } </style> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push([\'_setAccount\', \'UA-251595-22\']); _gaq.push([\'_trackPageview\']); (function() { var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true; ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\'; var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> <body style="font-size:13px"> <div class="container" style="background-color:#FFF"> <div class="span-24 last"> </div> <div class="span-24 last"> <div id="x-today-icon-small" style="background-repeat:no-repeat; height:34; padding:10px 0px 10px 60px; background-image:url(static/w/img/s44.png)"><strong>''') _v = VFSL([locals()]+SL+[globals(), __builtin__],"city.name",True) # u'${city.name}' on line 125, col 163 if _v is not None: write(_filter(_v, rawExpr=u'${city.name}')) # from line 125, col 163. write(u'''</strong> <select name="change_city" id="change_city" onchange="change_city(this.value)"> <option value="-">\u66f4\u6539\u57ce\u5e02</option> ''') for c in VFSL([locals()]+SL+[globals(), __builtin__],"cities",True): # generated from line 128, col 1 write(u''' <option value="''') _v = VFN(VFSL([locals()]+SL+[globals(), __builtin__],"c",True),"first_alias",False)() # u'${c.first_alias()}' on line 129, col 26 if _v is not None: write(_filter(_v, rawExpr=u'${c.first_alias()}')) # from line 129, col 26. write(u'''">''') _v = VFSL([locals()]+SL+[globals(), __builtin__],"c.name",True) # u'${c.name}' on line 129, col 46 if _v is not None: write(_filter(_v, rawExpr=u'${c.name}')) # from line 129, col 46. write(u'''</option> ''') write(u''' </select> </div> </div> \t<div class="span-16"> <div class="span-16 last"> <div id="weather-today" class="w-report span-8"> <div><span class="h">\u4eca\u65e5\u5929\u6c14</span><span class="date"><span id="x-today-date"></span> <span id="x-today-day"></span></span></div> <div class="weather-report"> <div id="x-today-icon" class="weather-icon"> <div class="weather-text"> <p id="x-today-text">Loading...</p> <p id="x-today-temp"></p> </div> </div> </div> <div><span class="h">\u5176\u4ed6\u4fe1\u606f\uff1a</span></div> <div style="padding:6px"> <div>\u98ce\u529b\uff1a<span id="x-wind-chill">N/A</span> \u98ce\u5411\uff1a<span id="x-wind-direction">N/A</span> \u98ce\u901f\uff1a<span id="x-wind-speed">N/A</span></div> <div>\u80fd\u89c1\u5ea6\uff1a<span id="x-atmosphere-visibility">N/A</span> \u6e7f\u5ea6\uff1a<span id="x-atmosphere-humidity">N/A</span> \u6c14\u538b\uff1a<span id="x-atmosphere-pressure">N/A</span></div> <div>\u65e5\u51fa\uff1a<span id="x-astronomy-sunrise">N/A</span> \u65e5\u843d\uff1a<span id="x-astronomy-sunset">N/A</span></div> <div>\u53d1\u5e03\u4e8e\uff1a<span id="x-pub">N/A</span></div> </div> </div> <div id="weather-tomorrow" class="w-report span-8 last"> <div><span class="h">\u660e\u65e5\u5929\u6c14</span><span class="date"><span id="x-tomorrow-date"></span> <span id="x-tomorrow-day"></span></span></div> <div class="weather-report"> <div id="x-tomorrow-icon" class="weather-icon"> <div class="weather-text"> <p id="x-tomorrow-text">Loading...</p> <p id="x-tomorrow-temp"></p> </div> </div> </div> </div> </div> <div class="w-report span-16 last" style="margin-top:6px"> <div><span class="h">\u5b89\u88c5Chrome\u63d2\u4ef6</span></div> <div style="padding:6px"> <div>\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662f\u652f\u6301HTML 5\u7684Google Chrome\u6d4f\u89c8\u5668\uff0c\u53ef\u4ee5<a href="https://chrome.google.com/extensions/detail/gbmkicglakjoppnghhiceacmbbaihoeh" target="_blank">\u5b89\u88c5\u6700\u65b0\u63d2\u4ef6</a>\u4ee5\u4fbf\u968f\u65f6\u83b7\u53d6\u5929\u6c14\u9884\u62a5\uff1a</div> <div><a href="https://chrome.google.com/extensions/detail/gbmkicglakjoppnghhiceacmbbaihoeh" target="_blank"><img src="static/img/snapshot-chrome-extension.png" width="291" height="99" style="margin:12px"/></a></div> </div> </div> <div class="w-report span-16 last" style="margin-top:6px"> <div><span class="h">GTalk\u673a\u5668\u4eba</span></div> <div style="padding:6px"> <div>\u5982\u679c\u60a8\u4f7f\u7528Google Talk\uff0c\u53ef\u4ee5\u6dfb\u52a0\u673a\u5668\u4eba<strong>weather-china@appspot.com</strong>\u4e3a\u597d\u53cb\uff0c\u968f\u65f6\u5411\u4ed6\u8be2\u95ee\u5929\u6c14\u9884\u62a5\uff1a</div> <div><img src="static/img/snapshot-xmpp.png" width="300" height="254" style="margin:12px"/></div> </div> </div> </div> <div class="span-8 last"> <script type="text/javascript"><!-- google_ad_client = "pub-6727358730461554"; /* 300x250 */ google_ad_slot = "8201905603"; google_ad_width = 300; google_ad_height = 250; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script> <script type="text/javascript"><!-- google_ad_client = "pub-6727358730461554"; /* 300x250 */ google_ad_slot = "8201905603"; google_ad_width = 300; google_ad_height = 250; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script> <script type="text/javascript"><!-- google_ad_client = "pub-6727358730461554"; /* 300x250 */ google_ad_slot = "8201905603"; google_ad_width = 300; google_ad_height = 250; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script> </div> <div class="span-24 last"></div> <div class="span-24 last"><div style="text-align:center;padding:6px"><a href="http://code.google.com/p/weather-china/wiki/API" target="_blank">API\u670d\u52a1</a> | <a href="http://code.google.com/p/weather-china/issues/list" target="_blank">\u610f\u89c1\u53cd\u9988</a> | <a id="x-contact" href="#">\u8054\u7cfb\u6211\u4eec</a> | Copyright&copy;2010</div></div> </div> <script type="text/javascript"> jQuery("#x-contact").attr("href", "mail" + "to:ask" + "xuefeng@" + "gm" + "ail.com"); </script> </body> </html> ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_CompiledTemplate= 'respond' ## END CLASS DEFINITION if not hasattr(CompiledTemplate, '_initCheetahAttributes'): templateAPIClass = getattr(CompiledTemplate, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(CompiledTemplate) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=CompiledTemplate()).run()
ajibawa-2023/Python-Code-Large/train/row_1524
82
356
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Import_L9_C0", "label": "sys import sys", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0253, 0.0028, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Import_L10_C0", "label": "os import os", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0281, 0.0028, 0, 0.66, 0.0345, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Import_L11_C0", "label": "os.path import os.path", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.0309, 0.0028, 0, 0.66, 0.069, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os.path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Import_L12_C0", "label": "__builtin__ import __builtin__", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.0337, 0.0028, 0, 0.66, 0.1034, 364, 0, 1, 0, 0, 364, 0, 0], "semantic": {"name": "__builtin__", "arg_names": [], "import_names": ["__builtin__"], "rhs_call_name": "", "annotation": ""}, "snippet": "import __builtin__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:ImportFrom_L13_C0", "label": "from os.path import getmtime, exists", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0365, 0.0028, 0, 0.66, 0.1379, 79, 0, 2, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["getmtime", "exists"], "rhs_call_name": "", "annotation": ""}, "snippet": "from os.path import getmtime, exists"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Import_L14_C0", "label": "time import time", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0393, 0.0028, 0, 0.66, 0.1724, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Import_L15_C0", "label": "types import types", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0421, 0.0028, 0, 0.66, 0.2069, 209, 0, 1, 0, 0, 209, 0, 0], "semantic": {"name": "types", "arg_names": [], "import_names": ["types"], "rhs_call_name": "", "annotation": ""}, "snippet": "import types"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:ImportFrom_L16_C0", "label": "from Cheetah.Version import RequiredCheetahVersion", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.0449, 0.0028, 0, 0.66, 0.2414, 551, 0, 1, 0, 0, 551, 0, 0], "semantic": {"name": "Cheetah.Version", "arg_names": [], "import_names": ["RequiredCheetahVersion"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:ImportFrom_L17_C0", "label": "from Cheetah.Version import RequiredCheetahVersionTuple", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.0478, 0.0028, 0, 0.66, 0.2759, 551, 0, 1, 0, 0, 551, 0, 0], "semantic": {"name": "Cheetah.Version", "arg_names": [], "import_names": ["RequiredCheetahVersionTuple"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:ImportFrom_L18_C0", "label": "from Cheetah.Template import Template", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0506, 0.0028, 0, 0.66, 0.3103, 171, 0, 1, 0, 0, 171, 0, 0], "semantic": {"name": "Cheetah.Template", "arg_names": [], "import_names": ["Template"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.Template import Template"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:ImportFrom_L19_C0", "label": "from Cheetah.DummyTransaction import *", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.0534, 0.0028, 0, 0.66, 0.3448, 489, 0, 1, 0, 0, 489, 0, 0], "semantic": {"name": "Cheetah.DummyTransaction", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.DummyTransaction import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:ImportFrom_L20_C0", "label": "from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList\u2026", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.0562, 0.0028, 0, 0.66, 0.3793, 308, 0, 4, 0, 0, 308, 0, 0], "semantic": {"name": "Cheetah.NameMapper", "arg_names": [], "import_names": ["NotFound", "valueForName", "valueFromSearchList", "valueFromFrameOrSearchList"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:ImportFrom_L21_C0", "label": "from Cheetah.CacheRegion import CacheRegion", "type": "import", "loc": [21, 21], "level": 0, "parent": null, "vector": [1, 0, 0.059, 0.0028, 0, 0.66, 0.4138, 338, 0, 1, 0, 0, 338, 0, 0], "semantic": {"name": "Cheetah.CacheRegion", "arg_names": [], "import_names": ["CacheRegion"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cheetah.CacheRegion import CacheRegion"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Import_L22_C0", "label": "Cheetah.Filters import Filters", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.0618, 0.0028, 0, 0.66, 0.4483, 989, 0, 1, 0, 0, 989, 0, 0], "semantic": {"name": "Cheetah.Filters", "arg_names": [], "import_names": ["Filters"], "rhs_call_name": "", "annotation": ""}, "snippet": "import Cheetah.Filters as Filters"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Import_L23_C0", "label": "Cheetah.ErrorCatchers import ErrorCatchers", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.0646, 0.0028, 0, 0.66, 0.4828, 989, 0, 1, 0, 0, 989, 0, 0], "semantic": {"name": "Cheetah.ErrorCatchers", "arg_names": [], "import_names": ["ErrorCatchers"], "rhs_call_name": "", "annotation": ""}, "snippet": "import Cheetah.ErrorCatchers as ErrorCatchers"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L27_C0", "label": "VFFSL =", "type": "assigned_variable", "loc": [27, 27], "level": 0, "parent": null, "vector": [14, 0, 0.0758, 0.0028, 0, 0.66, 0.5172, 158, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "VFFSL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "VFFSL=valueFromFrameOrSearchList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L28_C0", "label": "VFSL =", "type": "assigned_variable", "loc": [28, 28], "level": 0, "parent": null, "vector": [14, 0, 0.0787, 0.0028, 0, 0.66, 0.5517, 477, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "VFSL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "VFSL=valueFromSearchList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L29_C0", "label": "VFN =", "type": "assigned_variable", "loc": [29, 29], "level": 0, "parent": null, "vector": [14, 0, 0.0815, 0.0028, 0, 0.66, 0.5862, 174, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "VFN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "VFN=valueForName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L30_C0", "label": "currentTime =", "type": "assigned_variable", "loc": [30, 30], "level": 0, "parent": null, "vector": [14, 0, 0.0843, 0.0028, 0, 0.66, 0.6207, 264, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "currentTime", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "currentTime=time.time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L31_C0", "label": "__CHEETAH_version__ =", "type": "assigned_variable", "loc": [31, 31], "level": 0, "parent": null, "vector": [14, 0, 0.0871, 0.0028, 0, 0.66, 0.6552, 754, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__CHEETAH_version__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__CHEETAH_version__ = '2.4.1'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L32_C0", "label": "__CHEETAH_versionTuple__ =", "type": "assigned_variable", "loc": [32, 32], "level": 0, "parent": null, "vector": [14, 0, 0.0899, 0.0028, 0, 0.66, 0.6897, 332, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "__CHEETAH_versionTuple__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__CHEETAH_versionTuple__ = (2, 4, 1, 'final', 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L33_C0", "label": "__CHEETAH_genTime__ =", "type": "assigned_variable", "loc": [33, 33], "level": 0, "parent": null, "vector": [14, 0, 0.0927, 0.0028, 0, 0.66, 0.7241, 878, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "__CHEETAH_genTime__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__CHEETAH_genTime__ = 1284450634.7130001"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L34_C0", "label": "__CHEETAH_genTimestamp__ =", "type": "assigned_variable", "loc": [34, 34], "level": 0, "parent": null, "vector": [14, 0, 0.0955, 0.0028, 0, 0.66, 0.7586, 825, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__CHEETAH_genTimestamp__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__CHEETAH_genTimestamp__ = 'Tue Sep 14 15:50:34 2010'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L35_C0", "label": "__CHEETAH_src__ =", "type": "assigned_variable", "loc": [35, 35], "level": 0, "parent": null, "vector": [14, 0, 0.0983, 0.0028, 0, 0.66, 0.7931, 868, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__CHEETAH_src__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__CHEETAH_src__ = 'D:\\\\workspace\\\\python\\\\weather-china\\\\src\\\\home.html'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L36_C0", "label": "__CHEETAH_srcLastModified__ =", "type": "assigned_variable", "loc": [36, 36], "level": 0, "parent": null, "vector": [14, 0, 0.1011, 0.0028, 0, 0.66, 0.8276, 567, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__CHEETAH_srcLastModified__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__CHEETAH_srcLastModified__ = 'Wed Jul 28 10:35:46 2010'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L37_C0", "label": "__CHEETAH_docstring__ =", "type": "assigned_variable", "loc": [37, 37], "level": 0, "parent": null, "vector": [14, 0, 0.1039, 0.0028, 0, 0.66, 0.8621, 607, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__CHEETAH_docstring__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L39_C0", "label": "if", "type": "if", "loc": [39, 43], "level": 0, "parent": null, "vector": [4, 0, 0.1152, 0.014, 0, 0.66, 0.8966, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:\n raise AssertionError(\n 'This template was compiled with Cheetah version'\n ' %s. Templates compiled before version %s must be recompiled.'%(\n __CHEETAH_version__, RequiredCheetahVersion))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "label": "CompiledTemplate", "type": "class", "loc": [48, 337], "level": 0, "parent": null, "vector": [3, 0, 0.5407, 0.8146, 0, 0.66, 0.931, 455, 0, 2, 0, 0, 137, 0, 42], "semantic": {"name": "CompiledTemplate", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CompiledTemplate(Template):\n\n ##################################################\n ## CHEETAH GENERATED METHODS\n\n\n def __init__(self, *args, **KWs):\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L54_C4", "label": "__init__", "type": "function", "loc": [54, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "vector": [2, 1, 0.1629, 0.0253, 1, 0.58, 0.0, 555, 0, 3, 0, 0, 0, 0, 5], "semantic": {"name": "__init__", "arg_names": ["self", "args", "KWs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, *args, **KWs):\n\n super(CompiledTemplate, self).__init__(*args, **KWs)\n if not self._CHEETAH__instanceInitialized:\n cheetahKWArgs = {}\n allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()\n for k,v in KWs.items():\n if k in allowedKWs: cheetahKWArgs[k] = v"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L56_C8", "label": "__init__()", "type": "expression", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L54_C4", "vector": [8, 2, 0.1573, 0.0028, 2, 0.46, 0.0, 555, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(CompiledTemplate, self).__init__(*args, **KWs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L57_C8", "label": "if", "type": "if", "loc": [57, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L54_C4", "vector": [4, 2, 0.1671, 0.0169, 2, 0.46, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self._CHEETAH__instanceInitialized:\n cheetahKWArgs = {}\n allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()\n for k,v in KWs.items():\n if k in allowedKWs: cheetahKWArgs[k] = v\n self._initCheetahInstance(**cheetahKWArgs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L58_C12", "label": "cheetahKWArgs =", "type": "assigned_variable", "loc": [58, 58], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L57_C8", "vector": [14, 3, 0.1629, 0.0028, 3, 0.14, 0.0, 716, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "cheetahKWArgs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cheetahKWArgs = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L59_C12", "label": "allowedKWs = split()", "type": "assigned_variable", "loc": [59, 59], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L57_C8", "vector": [14, 3, 0.1657, 0.0028, 3, 0.14, 0.3333, 289, 3, 0, 0, 0, 908, 10, 1], "semantic": {"name": "allowedKWs", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": " allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L60_C12", "label": "for k, v", "type": "for", "loc": [60, 61], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L57_C8", "vector": [6, 3, 0.1699, 0.0056, 3, 0.14, 0.6667, 867, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "k, v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for k,v in KWs.items():\n if k in allowedKWs: cheetahKWArgs[k] = v"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L61_C16", "label": "if", "type": "if", "loc": [61, 61], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L60_C12", "vector": [4, 4, 0.1713, 0.0028, 4, 0.02, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if k in allowedKWs: cheetahKWArgs[k] = v"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L61_C36", "label": "assign", "type": "assigned_variable", "loc": [61, 61], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L61_C16", "vector": [14, 5, 0.1713, 0.0028, 5, 0.94, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if k in allowedKWs: cheetahKWArgs[k] = v"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L62_C12", "label": "_initCheetahInstance()", "type": "expression", "loc": [62, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L57_C8", "vector": [8, 3, 0.1742, 0.0028, 3, 0.14, 1.0, 629, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_initCheetahInstance", "arg_names": [], "import_names": [], "rhs_call_name": "_initCheetahInstance", "annotation": ""}, "snippet": " self._initCheetahInstance(**cheetahKWArgs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "label": "respond", "type": "function", "loc": [65, 317], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "vector": [2, 1, 0.5365, 0.7107, 1, 0.58, 0.1111, 100, 0, 2, 1, 0, 0, 0, 37], "semantic": {"name": "respond", "arg_names": ["self", "trans"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def respond(self, trans=None):\n\n\n\n ## CHEETAH: main method generated for this template\n if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):\n trans = self.transaction # is None unless self.awake() was called\n if not trans:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L70_C8", "label": "if", "type": "if", "loc": [70, 71], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "vector": [4, 2, 0.198, 0.0056, 2, 0.31, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):\n trans = self.transaction # is None unless self.awake() was called"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L71_C12", "label": "trans =", "type": "assigned_variable", "loc": [71, 71], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L70_C8", "vector": [14, 3, 0.1994, 0.0028, 3, 0.17, 0.0, 786, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "trans", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " trans = self.transaction # is None unless self.awake() was called"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L72_C8", "label": "if", "type": "if", "loc": [72, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "vector": [4, 2, 0.2065, 0.0112, 2, 0.31, 0.0714, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not trans:\n trans = DummyTransaction()\n _dummyTrans = True\n else: _dummyTrans = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L73_C12", "label": "trans = DummyTransaction()", "type": "assigned_variable", "loc": [73, 73], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L72_C8", "vector": [14, 3, 0.2051, 0.0028, 3, 0.89, 0.0, 786, 3, 0, 0, 0, 698, 10, 1], "semantic": {"name": "trans", "arg_names": [], "import_names": [], "rhs_call_name": "DummyTransaction", "annotation": ""}, "snippet": " trans = DummyTransaction()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L74_C12", "label": "_dummyTrans =", "type": "assigned_variable", "loc": [74, 74], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L72_C8", "vector": [14, 3, 0.2079, 0.0028, 3, 0.89, 0.5, 303, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "_dummyTrans", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _dummyTrans = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L75_C14", "label": "_dummyTrans =", "type": "assigned_variable", "loc": [75, 75], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L72_C8", "vector": [14, 3, 0.2107, 0.0028, 3, 0.89, 1.0, 303, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "_dummyTrans", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " else: _dummyTrans = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L76_C8", "label": "write =", "type": "assigned_variable", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "vector": [14, 2, 0.2135, 0.0028, 2, 0.31, 0.1429, 837, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " write = trans.response().write"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L77_C8", "label": "SL =", "type": "assigned_variable", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "vector": [14, 2, 0.2163, 0.0028, 2, 0.31, 0.2143, 303, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "SL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " SL = self._CHEETAH__searchList"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L78_C8", "label": "_filter =", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "vector": [14, 2, 0.2191, 0.0028, 2, 0.31, 0.2857, 820, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_filter", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _filter = self._CHEETAH__currentFilter"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L83_C8", "label": "write()", "type": "expression", "loc": [83, 92], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "vector": [8, 2, 0.2458, 0.0281, 2, 0.31, 0.3571, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " write(u'''<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<title>\\u5929\\u6c14\\u9884\\u62a5</title>\n<script type=\"text/javascript\" src=\"/static/js/jquery.js\"></script>\n<script type=\"text/javascript\">\nvar days=[\"\\u661f\\u671f\\u65e5\", \"\\u661f\\u671f\\u4e00\", \"\\u661f\\u671f\\u4e8c\", \"\\u661f\\u671f\\u4e09\", \"\\u661f\\u671f\\u56db\", \"\\u661f\\u671f\\u4e94\", \"\\u661f\\u671f\\u516d\"]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L93_C8", "label": "_v = VFSL()", "type": "assigned_variable", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "vector": [14, 2, 0.2612, 0.0028, 2, 0.31, 0.4286, 861, 3, 3, 0, 0, 477, 10, 3], "semantic": {"name": "_v", "arg_names": [], "import_names": [], "rhs_call_name": "VFSL", "annotation": ""}, "snippet": " _v = VFSL([locals()]+SL+[globals(), __builtin__],\"city.first_alias\",True) # u'${city.first_alias}' on line 11, col 29"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L94_C8", "label": "if", "type": "if", "loc": [94, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "vector": [4, 2, 0.264, 0.0028, 2, 0.31, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if _v is not None: write(_filter(_v, rawExpr=u'${city.first_alias}')) # from line 11, col 29."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L94_C27", "label": "write()", "type": "expression", "loc": [94, 94], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L94_C8", "vector": [8, 3, 0.264, 0.0028, 3, 0.75, 0.0, 837, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " if _v is not None: write(_filter(_v, rawExpr=u'${city.first_alias}')) # from line 11, col 29."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L95_C8", "label": "write()", "type": "expression", "loc": [95, 209], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "vector": [8, 2, 0.427, 0.323, 2, 0.31, 0.5714, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " write(u'''\", function(data) {\n var today = data.forecasts[0];\n\\tvar tomorrow = data.forecasts[1];\n\n jQuery(\"#x-today-date\").html(today.date);\n jQuery(\"#x-tomorrow-date\").html(tomorrow.date);\n\n jQuery(\"#x-today-day\").html(days[today.day]);"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L210_C8", "label": "_v = VFSL()", "type": "assigned_variable", "loc": [210, 210], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "vector": [14, 2, 0.5899, 0.0028, 2, 0.31, 0.6429, 861, 3, 3, 0, 0, 477, 10, 3], "semantic": {"name": "_v", "arg_names": [], "import_names": [], "rhs_call_name": "VFSL", "annotation": ""}, "snippet": " _v = VFSL([locals()]+SL+[globals(), __builtin__],\"city.name\",True) # u'${city.name}' on line 125, col 163"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L211_C8", "label": "if", "type": "if", "loc": [211, 211], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "vector": [4, 2, 0.5927, 0.0028, 2, 0.31, 0.7143, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if _v is not None: write(_filter(_v, rawExpr=u'${city.name}')) # from line 125, col 163."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L211_C27", "label": "write()", "type": "expression", "loc": [211, 211], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L211_C8", "vector": [8, 3, 0.5927, 0.0028, 3, 0.2, 0.0, 837, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " if _v is not None: write(_filter(_v, rawExpr=u'${city.name}')) # from line 125, col 163."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L212_C8", "label": "write()", "type": "expression", "loc": [212, 215], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "vector": [8, 2, 0.5997, 0.0112, 2, 0.31, 0.7857, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " write(u'''</strong>\n <select name=\"change_city\" id=\"change_city\" onchange=\"change_city(this.value)\">\n <option value=\"-\">\\u66f4\\u6539\\u57ce\\u5e02</option>\n''')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L216_C8", "label": "for c", "type": "for", "loc": [216, 224], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "vector": [6, 2, 0.618, 0.0253, 2, 0.31, 0.8571, 411, 3, 0, 0, 0, 0, 0, 18], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for c in VFSL([locals()]+SL+[globals(), __builtin__],\"cities\",True): # generated from line 128, col 1\n write(u''' <option value=\"''')\n _v = VFN(VFSL([locals()]+SL+[globals(), __builtin__],\"c\",True),\"first_alias\",False)() # u'${c.first_alias()}' on line 129, col 26\n if _v is not None: write(_filter(_v, rawExpr=u'${c.first_alias()}')) # from line 129, col 26.\n write(u'''\">''')\n _v = VFSL([locals()]+SL+[globals(), __builtin__],\"c.name\",True) # u'${c.name}' on line 129, col 46\n if _v is not None: write(_filter(_v, rawExpr=u'${c.name}')) # from line 129, col 46.\n write(u'''</option>"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L217_C12", "label": "write()", "type": "expression", "loc": [217, 217], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L216_C8", "vector": [8, 3, 0.6096, 0.0028, 3, 0.15, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " write(u''' <option value=\"''')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L218_C12", "label": "_v =", "type": "assigned_variable", "loc": [218, 218], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L216_C8", "vector": [14, 3, 0.6124, 0.0028, 3, 0.15, 0.1667, 861, 3, 0, 0, 0, 0, 10, 5], "semantic": {"name": "_v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _v = VFN(VFSL([locals()]+SL+[globals(), __builtin__],\"c\",True),\"first_alias\",False)() # u'${c.first_alias()}' on line 129, col 26"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L219_C12", "label": "if", "type": "if", "loc": [219, 219], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L216_C8", "vector": [4, 3, 0.6152, 0.0028, 3, 0.15, 0.3333, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if _v is not None: write(_filter(_v, rawExpr=u'${c.first_alias()}')) # from line 129, col 26."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L219_C31", "label": "write()", "type": "expression", "loc": [219, 219], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L219_C12", "vector": [8, 4, 0.6152, 0.0028, 4, 0.22, 0.0, 837, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " if _v is not None: write(_filter(_v, rawExpr=u'${c.first_alias()}')) # from line 129, col 26."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L220_C12", "label": "write()", "type": "expression", "loc": [220, 220], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L216_C8", "vector": [8, 3, 0.618, 0.0028, 3, 0.15, 0.5, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " write(u'''\">''')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L221_C12", "label": "_v = VFSL()", "type": "assigned_variable", "loc": [221, 221], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L216_C8", "vector": [14, 3, 0.6208, 0.0028, 3, 0.15, 0.6667, 861, 3, 3, 0, 0, 477, 10, 3], "semantic": {"name": "_v", "arg_names": [], "import_names": [], "rhs_call_name": "VFSL", "annotation": ""}, "snippet": " _v = VFSL([locals()]+SL+[globals(), __builtin__],\"c.name\",True) # u'${c.name}' on line 129, col 46"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L222_C12", "label": "if", "type": "if", "loc": [222, 222], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L216_C8", "vector": [4, 3, 0.6236, 0.0028, 3, 0.15, 0.8333, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if _v is not None: write(_filter(_v, rawExpr=u'${c.name}')) # from line 129, col 46."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L222_C31", "label": "write()", "type": "expression", "loc": [222, 222], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L222_C12", "vector": [8, 4, 0.6236, 0.0028, 4, 0.69, 0.0, 837, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " if _v is not None: write(_filter(_v, rawExpr=u'${c.name}')) # from line 129, col 46."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L223_C12", "label": "write()", "type": "expression", "loc": [223, 224], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L216_C8", "vector": [8, 3, 0.6278, 0.0056, 3, 0.15, 1.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " write(u'''</option>\n''')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L225_C8", "label": "write()", "type": "expression", "loc": [225, 312], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "vector": [8, 2, 0.7542, 0.2472, 2, 0.31, 0.9286, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " write(u''' </select>\n </div>\n </div>\n\\t<div class=\"span-16\">\n <div class=\"span-16 last\">\n <div id=\"weather-today\" class=\"w-report span-8\">\n <div><span class=\"h\">\\u4eca\\u65e5\\u5929\\u6c14</span><span class=\"date\"><span id=\"x-today-date\"></span> <span id=\"x-today-day\"></span></span></div>\n <div class=\"weather-report\">"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Return_L317_C8", "label": "return", "type": "return", "loc": [317, 317], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "vector": [13, 2, 0.8904, 0.0028, 2, 0.31, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return _dummyTrans and trans.response().getvalue() or \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L323_C4", "label": "_CHEETAH__instanceInitialized =", "type": "assigned_variable", "loc": [323, 323], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "vector": [14, 1, 0.9073, 0.0028, 1, 0.58, 0.2222, 316, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "_CHEETAH__instanceInitialized", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _CHEETAH__instanceInitialized = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L325_C4", "label": "_CHEETAH_version =", "type": "assigned_variable", "loc": [325, 325], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "vector": [14, 1, 0.9129, 0.0028, 1, 0.58, 0.3333, 564, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_CHEETAH_version", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _CHEETAH_version = __CHEETAH_version__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L327_C4", "label": "_CHEETAH_versionTuple =", "type": "assigned_variable", "loc": [327, 327], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "vector": [14, 1, 0.9185, 0.0028, 1, 0.58, 0.4444, 848, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_CHEETAH_versionTuple", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _CHEETAH_versionTuple = __CHEETAH_versionTuple__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L329_C4", "label": "_CHEETAH_genTime =", "type": "assigned_variable", "loc": [329, 329], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "vector": [14, 1, 0.9242, 0.0028, 1, 0.58, 0.5556, 830, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_CHEETAH_genTime", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _CHEETAH_genTime = __CHEETAH_genTime__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L331_C4", "label": "_CHEETAH_genTimestamp =", "type": "assigned_variable", "loc": [331, 331], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "vector": [14, 1, 0.9298, 0.0028, 1, 0.58, 0.6667, 509, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_CHEETAH_genTimestamp", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L333_C4", "label": "_CHEETAH_src =", "type": "assigned_variable", "loc": [333, 333], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "vector": [14, 1, 0.9354, 0.0028, 1, 0.58, 0.7778, 357, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_CHEETAH_src", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _CHEETAH_src = __CHEETAH_src__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L335_C4", "label": "_CHEETAH_srcLastModified =", "type": "assigned_variable", "loc": [335, 335], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "vector": [14, 1, 0.941, 0.0028, 1, 0.58, 0.8889, 763, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_CHEETAH_srcLastModified", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L337_C4", "label": "_mainCheetahMethod_for_CompiledTemplate =", "type": "assigned_variable", "loc": [337, 337], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "vector": [14, 1, 0.9466, 0.0028, 1, 0.58, 1.0, 322, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "_mainCheetahMethod_for_CompiledTemplate", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _mainCheetahMethod_for_CompiledTemplate= 'respond'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L341_C0", "label": "if", "type": "if", "loc": [341, 343], "level": 0, "parent": null, "vector": [4, 0, 0.9607, 0.0084, 0, 0.66, 0.9655, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if not hasattr(CompiledTemplate, '_initCheetahAttributes'):\n templateAPIClass = getattr(CompiledTemplate, '_CHEETAH_templateClass', Template)\n templateAPIClass._addCheetahPlumbingCodeToClass(CompiledTemplate)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L342_C4", "label": "templateAPIClass = getattr()", "type": "assigned_variable", "loc": [342, 342], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L341_C0", "vector": [14, 1, 0.9607, 0.0028, 1, 0.41, 0.0, 267, 3, 3, 0, 0, 121, 10, 1], "semantic": {"name": "templateAPIClass", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " templateAPIClass = getattr(CompiledTemplate, '_CHEETAH_templateClass', Template)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L343_C4", "label": "_addCheetahPlumbingCodeToClass()", "type": "expression", "loc": [343, 343], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L341_C0", "vector": [8, 1, 0.9635, 0.0028, 1, 0.41, 1.0, 949, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_addCheetahPlumbingCodeToClass", "arg_names": [], "import_names": [], "rhs_call_name": "_addCheetahPlumbingCodeToClass", "annotation": ""}, "snippet": " templateAPIClass._addCheetahPlumbingCodeToClass(CompiledTemplate)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L352_C0", "label": "if", "type": "if", "loc": [352, 354], "level": 0, "parent": null, "vector": [4, 0, 0.9916, 0.0084, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n from Cheetah.TemplateCmdLineIface import CmdLineIface\n CmdLineIface(templateObj=CompiledTemplate()).run()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:ImportFrom_L353_C4", "label": "from Cheetah.TemplateCmdLineIface import CmdLineIface", "type": "import", "loc": [353, 353], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L352_C0", "vector": [1, 1, 0.9916, 0.0028, 1, 0.73, 0.0, 714, 0, 1, 0, 0, 714, 0, 0], "semantic": {"name": "Cheetah.TemplateCmdLineIface", "arg_names": [], "import_names": ["CmdLineIface"], "rhs_call_name": "", "annotation": ""}, "snippet": " from Cheetah.TemplateCmdLineIface import CmdLineIface"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L354_C4", "label": "run()", "type": "expression", "loc": [354, 354], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L352_C0", "vector": [8, 1, 0.9944, 0.0028, 1, 0.73, 1.0, 679, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "run", "arg_names": [], "import_names": [], "rhs_call_name": "run", "annotation": ""}, "snippet": " CmdLineIface(templateObj=CompiledTemplate()).run()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L56_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L57_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L57_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L58_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L57_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L59_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L57_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L60_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L60_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L61_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L61_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L61_C36"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L57_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L62_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L70_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L71_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L72_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L73_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L72_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L74_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L72_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L75_C14"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L83_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L93_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L94_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L94_C27"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L95_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L210_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L211_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L211_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L211_C27"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L212_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L216_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L216_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L217_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L216_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L218_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L216_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L219_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L219_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L219_C31"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L216_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L220_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L216_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L221_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L216_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L222_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L222_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L222_C31"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:For_L216_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L223_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L225_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Return_L317_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L323_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L325_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L327_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L329_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L331_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L333_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L335_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:ClassDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L337_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L341_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Assign_L342_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L341_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L343_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L352_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:ImportFrom_L353_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1524:If_L352_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1524:Expr_L354_C4"}]
''' Cookie-handlin' mix-in helper; inspired by WebOb. This module offers a cookie-handling mixin class meant to be used with Google App Engine; this class can in fact be mixed into any class that shares the following features with webapp.RequestHandler subclasses: - a self.request.cookies object with a get(key, defaultvalue) method - a self.response.headers object offering: - methods add_header(header, value) and getall(header) - the ability to 'del self.response.headers[header]' The mixin class supplies methods to get_, set_, delete_ and unset_ a cookie (each method's name ends with _cookie;-). ''' # Copyright (C) 2008 aleaxit@gmail.com # licensed under CC-by license, http://creativecommons.org/licenses/by/3.0/ import Cookie import datetime import time from Cookie import BaseCookie def _serialize_cookie_date(dt): dt = dt.timetuple() return time.strftime('"%a, %d-%b-%Y %H:%M:%S GMT"', dt.timetuple()) class CookieMixin(object): def get_cookie(self, key, default_value=None): """ Gets a cookie from the request object: Args: key: string that's the cookie's name (mandatory) default_value: default value if name's absent (default: None) Returns: a string (the cookie's value) or the default value if the cookie's absent """ return self.request.cookies.get(key, default_value) def set_cookie(self, key, value='', max_age=None, path='/', domain=None, secure=None, httponly=False, version=None, comment=None, expires=None): """ Set (add) a cookie to the response object. Args: key: string that is the cookie's name (mandatory) value: string (or Unicode) that is the cookie's value (default '') and many optional ones to set the cookie's properties (pass BY NAME only!): max_age (or datetime.timedelta or a number of seconds) expires (string, datetime.timedelta, or datetime.datetime) [if you pass max_age and not expires, expires is computed from max_age] path, domain, secure, httponly, version, comment (typically strings) Side effects: adds to self.response.headers an appropriate Set-Cookie header. """ if isinstance(value, unicode): value = '"%s"' % value.encode('utf8') cookies = Cookie.BaseCookie() cookies[key] = value if isinstance(max_age, datetime.timedelta): max_age = datetime.timedelta.seconds + datetime.timedelta.days*24*60*60 if max_age is not None and expires is None: expires = (datetime.datetime.utcnow() + datetime.timedelta(seconds=max_age)) if isinstance(expires, datetime.timedelta): expires = datetime.datetime.utcnow() + expires if isinstance(expires, datetime.datetime): expires = '"'+_serialize_cookie_date(expires)+'"' for var_name, var_value in [ ('max_age', max_age), ('path', path), ('domain', domain), ('secure', secure), ('HttpOnly', httponly), ('version', version), ('comment', comment), ('expires', expires), ]: if var_value is not None and var_value is not False: cookies[key][var_name.replace('_', '-')] = str(var_value) header_value = cookies[key].output(header='').lstrip() self.response.headers.add_header('Set-Cookie', header_value) def delete_cookie(self, key, path='/', domain=None): """ Delete a cookie from the client. Path and domain must match how the cookie was originally set. This method sets the cookie to the empty string, and max_age=0 so that it should expire immediately (a negative expires should also help with that) Args: key: string that is the cookie's name (mandatory) path, domain: optional strings, must match the original settings Side effects: adds to self.response.headers an appropriate Set-Cookie header. """ self.set_cookie(key, '', path=path, domain=domain, max_age=0, expires=datetime.timedelta(days=-5)) def unset_cookie(self, key): """ Unset a cookie with the given name (remove from the response). If there are multiple cookies (e.g., two cookies with the same name and different paths or domains), all such cookies will be deleted. Args: key: string that is the cookie's name (mandatory) Side effects: delete from self.response.headers all cookies with that name Raises: KeyError if the response had no such cookies (or, none at all) """ existing = self.response.headers.getall('Set-Cookie') if not existing: raise KeyError("No cookies at all had been set") # remove all set-cookie headers, then put back those (if any) that # should not be removed del self.response.headers['Set-Cookie'] found = False for header in existing: cookies = BaseCookie() cookies.load(header) if key in cookies: found = True del cookies[key] header = cookies.output(header='').lstrip() if header: self.response.headers.add_header('Set-Cookie', header) if not found: raise KeyError("No cookie had been set with name %r" % key)
ajibawa-2023/Python-Code-Large/train/row_1526
48
130
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 13], "level": 0, "parent": null, "vector": [8, 0, 0.0538, 0.1, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "''' Cookie-handlin' mix-in helper; inspired by WebOb.\n\nThis module offers a cookie-handling mixin class meant to be used with Google\nApp Engine; this class can in fact be mixed into any class that shares the\nfollowing features with webapp.RequestHandler subclasses:\n - a self.request.cookies object with a get(key, defaultvalue) method\n - a self.response.headers object offering:\n - methods add_header(header, value) and getall(header)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Import_L17_C0", "label": "Cookie import Cookie", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.1308, 0.0077, 0, 0.66, 0.1667, 32, 0, 1, 0, 0, 32, 0, 0], "semantic": {"name": "Cookie", "arg_names": [], "import_names": ["Cookie"], "rhs_call_name": "", "annotation": ""}, "snippet": "import Cookie"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Import_L18_C0", "label": "datetime import datetime", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.1385, 0.0077, 0, 0.66, 0.3333, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime"], "rhs_call_name": "", "annotation": ""}, "snippet": "import datetime"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Import_L19_C0", "label": "time import time", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.1462, 0.0077, 0, 0.66, 0.5, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:ImportFrom_L20_C0", "label": "from Cookie import BaseCookie", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.1538, 0.0077, 0, 0.66, 0.6667, 32, 0, 1, 0, 0, 32, 0, 0], "semantic": {"name": "Cookie", "arg_names": [], "import_names": ["BaseCookie"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Cookie import BaseCookie"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L23_C0", "label": "_serialize_cookie_date", "type": "function", "loc": [23, 25], "level": 0, "parent": null, "vector": [2, 0, 0.1846, 0.0231, 0, 0.66, 0.8333, 584, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "_serialize_cookie_date", "arg_names": ["dt"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def _serialize_cookie_date(dt):\n dt = dt.timetuple()\n return time.strftime('\"%a, %d-%b-%Y %H:%M:%S GMT\"', dt.timetuple())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L24_C2", "label": "dt = timetuple()", "type": "assigned_variable", "loc": [24, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L23_C0", "vector": [14, 1, 0.1846, 0.0077, 1, 0.84, 0.0, 455, 3, 0, 0, 0, 908, 10, 1], "semantic": {"name": "dt", "arg_names": [], "import_names": [], "rhs_call_name": "timetuple", "annotation": ""}, "snippet": " dt = dt.timetuple()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Return_L25_C2", "label": "return", "type": "return", "loc": [25, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L23_C0", "vector": [13, 1, 0.1923, 0.0077, 1, 0.84, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return time.strftime('\"%a, %d-%b-%Y %H:%M:%S GMT\"', dt.timetuple())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:ClassDef_L28_C0", "label": "CookieMixin", "type": "class", "loc": [28, 129], "level": 0, "parent": null, "vector": [3, 0, 0.6038, 0.7846, 0, 0.66, 1.0, 61, 0, 4, 0, 0, 186, 0, 26], "semantic": {"name": "CookieMixin", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CookieMixin(object):\n\n def get_cookie(self, key, default_value=None):\n \"\"\" Gets a cookie from the request object:\n\n Args:\n key: string that's the cookie's name (mandatory)\n default_value: default value if name's absent (default: None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L30_C2", "label": "get_cookie", "type": "function", "loc": [30, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:ClassDef_L28_C0", "vector": [2, 1, 0.2654, 0.0769, 1, 0.17, 0.0, 678, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "get_cookie", "arg_names": ["self", "key", "default_value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_cookie(self, key, default_value=None):\n \"\"\" Gets a cookie from the request object:\n\n Args:\n key: string that's the cookie's name (mandatory)\n default_value: default value if name's absent (default: None)\n Returns:\n a string (the cookie's value) or the default value if the cookie's absent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L31_C4", "label": "expression", "type": "expression", "loc": [31, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L30_C2", "vector": [8, 2, 0.2654, 0.0615, 2, 0.4, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\" Gets a cookie from the request object:\n\n Args:\n key: string that's the cookie's name (mandatory)\n default_value: default value if name's absent (default: None)\n Returns:\n a string (the cookie's value) or the default value if the cookie's absent\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Return_L39_C4", "label": "return", "type": "return", "loc": [39, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L30_C2", "vector": [13, 2, 0.3, 0.0077, 2, 0.4, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.request.cookies.get(key, default_value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "label": "set_cookie", "type": "function", "loc": [41, 83], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:ClassDef_L28_C0", "vector": [2, 1, 0.4769, 0.3308, 1, 0.17, 0.3333, 146, 0, 11, 0, 0, 0, 0, 15], "semantic": {"name": "set_cookie", "arg_names": ["self", "key", "value", "max_age", "path", "domain", "secure", "httponly", "version", "comment", "expires"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def set_cookie(self, key, value='', max_age=None,\n path='/', domain=None, secure=None, httponly=False,\n version=None, comment=None, expires=None):\n \"\"\" Set (add) a cookie to the response object.\n\n Args:\n key: string that is the cookie's name (mandatory)\n value: string (or Unicode) that is the cookie's value (default '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L44_C4", "label": "expression", "type": "expression", "loc": [44, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "vector": [8, 2, 0.3846, 0.1, 2, 0.09, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\" Set (add) a cookie to the response object.\n\n Args:\n key: string that is the cookie's name (mandatory)\n value: string (or Unicode) that is the cookie's value (default '')\n and many optional ones to set the cookie's properties (pass BY NAME only!):\n max_age (or datetime.timedelta or a number of seconds)\n expires (string, datetime.timedelta, or datetime.datetime)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L57_C4", "label": "if", "type": "if", "loc": [57, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "vector": [4, 2, 0.4423, 0.0154, 2, 0.09, 0.1, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(value, unicode):\n value = '\"%s\"' % value.encode('utf8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L58_C6", "label": "value =", "type": "assigned_variable", "loc": [58, 58], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L57_C4", "vector": [14, 3, 0.4462, 0.0077, 3, 0.38, 0.0, 441, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " value = '\"%s\"' % value.encode('utf8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L59_C4", "label": "cookies = BaseCookie()", "type": "assigned_variable", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "vector": [14, 2, 0.4538, 0.0077, 2, 0.09, 0.2, 711, 3, 0, 0, 0, 884, 10, 1], "semantic": {"name": "cookies", "arg_names": [], "import_names": [], "rhs_call_name": "BaseCookie", "annotation": ""}, "snippet": " cookies = Cookie.BaseCookie()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L60_C4", "label": "assign", "type": "assigned_variable", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "vector": [14, 2, 0.4615, 0.0077, 2, 0.09, 0.3, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cookies[key] = value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L61_C4", "label": "if", "type": "if", "loc": [61, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "vector": [4, 2, 0.4731, 0.0154, 2, 0.09, 0.4, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(max_age, datetime.timedelta):\n max_age = datetime.timedelta.seconds + datetime.timedelta.days*24*60*60"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L62_C6", "label": "max_age =", "type": "assigned_variable", "loc": [62, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L61_C4", "vector": [14, 3, 0.4769, 0.0077, 3, 0.7, 0.0, 674, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "max_age", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " max_age = datetime.timedelta.seconds + datetime.timedelta.days*24*60*60"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L63_C4", "label": "if", "type": "if", "loc": [63, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "vector": [4, 2, 0.4923, 0.0231, 2, 0.09, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if max_age is not None and expires is None:\n expires = (datetime.datetime.utcnow() + \n datetime.timedelta(seconds=max_age))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L64_C6", "label": "expires =", "type": "assigned_variable", "loc": [64, 65], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L63_C4", "vector": [14, 3, 0.4962, 0.0154, 3, 0.41, 0.0, 741, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "expires", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expires = (datetime.datetime.utcnow() + \n datetime.timedelta(seconds=max_age))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L66_C4", "label": "if", "type": "if", "loc": [66, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "vector": [4, 2, 0.5115, 0.0154, 2, 0.09, 0.6, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(expires, datetime.timedelta):\n expires = datetime.datetime.utcnow() + expires"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L67_C6", "label": "expires =", "type": "assigned_variable", "loc": [67, 67], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L66_C4", "vector": [14, 3, 0.5154, 0.0077, 3, 0.79, 0.0, 741, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "expires", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expires = datetime.datetime.utcnow() + expires"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L68_C4", "label": "if", "type": "if", "loc": [68, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "vector": [4, 2, 0.5269, 0.0154, 2, 0.09, 0.7, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(expires, datetime.datetime):\n expires = '\"'+_serialize_cookie_date(expires)+'\"'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L69_C6", "label": "expires =", "type": "assigned_variable", "loc": [69, 69], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L68_C4", "vector": [14, 3, 0.5308, 0.0077, 3, 0.44, 0.0, 741, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "expires", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " expires = '\"'+_serialize_cookie_date(expires)+'\"'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:For_L70_C4", "label": "for var_name, var_value", "type": "for", "loc": [70, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "vector": [6, 2, 0.5808, 0.0923, 2, 0.09, 0.8, 442, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "var_name, var_value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for var_name, var_value in [\n ('max_age', max_age),\n ('path', path),\n ('domain', domain),\n ('secure', secure),\n ('HttpOnly', httponly),\n ('version', version),\n ('comment', comment),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L80_C6", "label": "if", "type": "if", "loc": [80, 81], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:For_L70_C4", "vector": [4, 3, 0.6192, 0.0154, 3, 0.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if var_value is not None and var_value is not False:\n cookies[key][var_name.replace('_', '-')] = str(var_value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L81_C8", "label": " = str()", "type": "assigned_variable", "loc": [81, 81], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L80_C6", "vector": [14, 4, 0.6231, 0.0077, 4, 0.43, 0.0, 0, 3, 1, 0, 0, 52, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " cookies[key][var_name.replace('_', '-')] = str(var_value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L82_C4", "label": "header_value = lstrip()", "type": "assigned_variable", "loc": [82, 82], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "vector": [14, 2, 0.6308, 0.0077, 2, 0.09, 0.9, 875, 3, 0, 0, 0, 313, 10, 2], "semantic": {"name": "header_value", "arg_names": [], "import_names": [], "rhs_call_name": "lstrip", "annotation": ""}, "snippet": " header_value = cookies[key].output(header='').lstrip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L83_C4", "label": "add_header()", "type": "expression", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "vector": [8, 2, 0.6385, 0.0077, 2, 0.09, 1.0, 643, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "add_header", "arg_names": [], "import_names": [], "rhs_call_name": "add_header", "annotation": ""}, "snippet": " self.response.headers.add_header('Set-Cookie', header_value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L85_C2", "label": "delete_cookie", "type": "function", "loc": [85, 99], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:ClassDef_L28_C0", "vector": [2, 1, 0.7077, 0.1154, 1, 0.17, 0.6667, 64, 0, 4, 0, 0, 0, 0, 2], "semantic": {"name": "delete_cookie", "arg_names": ["self", "key", "path", "domain"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def delete_cookie(self, key, path='/', domain=None):\n \"\"\" Delete a cookie from the client.\n \n Path and domain must match how the cookie was originally set. This method\n sets the cookie to the empty string, and max_age=0 so that it should \n expire immediately (a negative expires should also help with that)\n\n Args: "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L86_C4", "label": "expression", "type": "expression", "loc": [86, 97], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L85_C2", "vector": [8, 2, 0.7038, 0.0923, 2, 0.43, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\" Delete a cookie from the client.\n \n Path and domain must match how the cookie was originally set. This method\n sets the cookie to the empty string, and max_age=0 so that it should \n expire immediately (a negative expires should also help with that)\n\n Args: \n key: string that is the cookie's name (mandatory)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L98_C4", "label": "set_cookie()", "type": "expression", "loc": [98, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L85_C2", "vector": [8, 2, 0.7577, 0.0154, 2, 0.43, 1.0, 146, 3, 6, 0, 0, 0, 0, 2], "semantic": {"name": "set_cookie", "arg_names": [], "import_names": [], "rhs_call_name": "set_cookie", "annotation": ""}, "snippet": " self.set_cookie(key, '', path=path, domain=domain,\n max_age=0, expires=datetime.timedelta(days=-5))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L101_C2", "label": "unset_cookie", "type": "function", "loc": [101, 129], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:ClassDef_L28_C0", "vector": [2, 1, 0.8846, 0.2231, 1, 0.17, 1.0, 618, 0, 2, 0, 0, 0, 0, 8], "semantic": {"name": "unset_cookie", "arg_names": ["self", "key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def unset_cookie(self, key):\n \"\"\" Unset a cookie with the given name (remove from the response).\n \n If there are multiple cookies (e.g., two cookies with the same name and\n different paths or domains), all such cookies will be deleted.\n \n Args:\n key: string that is the cookie's name (mandatory)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L102_C4", "label": "expression", "type": "expression", "loc": [102, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L101_C2", "vector": [8, 2, 0.8269, 0.0923, 2, 0.92, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\" Unset a cookie with the given name (remove from the response).\n \n If there are multiple cookies (e.g., two cookies with the same name and\n different paths or domains), all such cookies will be deleted.\n \n Args:\n key: string that is the cookie's name (mandatory)\n Side effects:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L114_C4", "label": "existing = getall()", "type": "assigned_variable", "loc": [114, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L101_C2", "vector": [14, 2, 0.8769, 0.0077, 2, 0.92, 0.2, 586, 3, 1, 0, 0, 865, 10, 1], "semantic": {"name": "existing", "arg_names": [], "import_names": [], "rhs_call_name": "getall", "annotation": ""}, "snippet": " existing = self.response.headers.getall('Set-Cookie')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L115_C4", "label": "if", "type": "if", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L101_C2", "vector": [4, 2, 0.8846, 0.0077, 2, 0.92, 0.4, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not existing: raise KeyError(\"No cookies at all had been set\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L119_C4", "label": "found =", "type": "assigned_variable", "loc": [119, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L101_C2", "vector": [14, 2, 0.9154, 0.0077, 2, 0.92, 0.6, 841, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "found", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " found = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:For_L120_C4", "label": "for header", "type": "for", "loc": [120, 128], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L101_C2", "vector": [6, 2, 0.9538, 0.0692, 2, 0.92, 0.8, 481, 2, 0, 0, 0, 0, 0, 5], "semantic": {"name": "header", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for header in existing:\n cookies = BaseCookie()\n cookies.load(header)\n if key in cookies:\n found = True\n del cookies[key]\n header = cookies.output(header='').lstrip()\n if header:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L121_C6", "label": "cookies = BaseCookie()", "type": "assigned_variable", "loc": [121, 121], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:For_L120_C4", "vector": [14, 3, 0.9308, 0.0077, 3, 0.33, 0.0, 711, 3, 0, 0, 0, 884, 10, 1], "semantic": {"name": "cookies", "arg_names": [], "import_names": [], "rhs_call_name": "BaseCookie", "annotation": ""}, "snippet": " cookies = BaseCookie()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L122_C6", "label": "load()", "type": "expression", "loc": [122, 122], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:For_L120_C4", "vector": [8, 3, 0.9385, 0.0077, 3, 0.33, 0.3333, 37, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "load", "arg_names": [], "import_names": [], "rhs_call_name": "load", "annotation": ""}, "snippet": " cookies.load(header)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L123_C6", "label": "if", "type": "if", "loc": [123, 126], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:For_L120_C4", "vector": [4, 3, 0.9577, 0.0308, 3, 0.33, 0.6667, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if key in cookies:\n found = True\n del cookies[key]\n header = cookies.output(header='').lstrip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L124_C8", "label": "found =", "type": "assigned_variable", "loc": [124, 124], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L123_C6", "vector": [14, 4, 0.9538, 0.0077, 4, 0.56, 0.0, 841, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "found", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " found = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L126_C8", "label": "header = lstrip()", "type": "assigned_variable", "loc": [126, 126], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L123_C6", "vector": [14, 4, 0.9692, 0.0077, 4, 0.56, 1.0, 481, 3, 0, 0, 0, 313, 10, 2], "semantic": {"name": "header", "arg_names": [], "import_names": [], "rhs_call_name": "lstrip", "annotation": ""}, "snippet": " header = cookies.output(header='').lstrip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L127_C6", "label": "if", "type": "if", "loc": [127, 128], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:For_L120_C4", "vector": [4, 3, 0.9808, 0.0154, 3, 0.33, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if header:\n self.response.headers.add_header('Set-Cookie', header)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L128_C8", "label": "add_header()", "type": "expression", "loc": [128, 128], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L127_C6", "vector": [8, 4, 0.9846, 0.0077, 4, 0.12, 0.0, 643, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "add_header", "arg_names": [], "import_names": [], "rhs_call_name": "add_header", "annotation": ""}, "snippet": " self.response.headers.add_header('Set-Cookie', header)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L129_C4", "label": "if", "type": "if", "loc": [129, 129], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L101_C2", "vector": [4, 2, 0.9923, 0.0077, 2, 0.92, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not found: raise KeyError(\"No cookie had been set with name %r\" % key)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Return_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L30_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L30_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Return_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L58_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L62_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L64_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L66_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L66_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L67_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L68_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L69_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:For_L70_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:For_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L80_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L80_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L81_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L82_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L41_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L85_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L86_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L85_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L98_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L101_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L101_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L102_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L101_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L114_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L101_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L115_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L101_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L119_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L101_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:For_L120_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:For_L120_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L121_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:For_L120_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L122_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:For_L120_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L123_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L123_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L124_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L123_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Assign_L126_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:For_L120_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L127_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L127_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:Expr_L128_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1526:FunctionDef_L101_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1526:If_L129_C4"}]