Search is not available for this dataset
id int32 | source_tokens list | has_bug bool | error_location int32 | repair_candidates list | bug_kind int32 | bug_kind_name string | repair_targets list | edges list | provenances list | template_name string | template string | rendered_input string | rendered_output string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
800 | [
"#NEWLINE#",
"def common_params(",
"task_instance",
",",
"task_cls",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Grab all the values in task_instance that are found in task_cls.\\n '",
"#NEWLINE#",
"if",
"(",
"not",
"isinstance",
"(",
"task_cls",
",",
"task",
".",
"Registe... | true | 113 | [
"87",
"98",
"102",
"119",
"123",
"33",
"73",
"4",
"16",
"52",
"91",
"48",
"78",
"63",
"104",
"125",
"83",
"137",
"2",
"37",
"115",
"133",
"107",
"142",
"113",
"129",
"147"
] | 1 | VARIABLE_MISUSE | [
87,
98,
102,
119,
123
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 13,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "spotify/luigi/luigi/util.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def common_params(task_instance, task_cls) :
'
Grab all the values in task_instance that are found in task_cls.
'
if (not isinstance (task_cls, task.Register)) :
raise TypeError ('task_cls must be an uninstantiated Task')
task_instance_param_names = dict (task_instance.get_params ()).keys ()... | Yes |
801 | [
"#NEWLINE#",
"@",
"validate",
"(",
"name",
"=",
"IN_FILTER",
")",
"#NEWLINE#",
"def validate_in_filters(",
"filters",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"[",
"valid_filter",
"(",
"filters",
")",
"for",
"filter_",
"in",
"filters",
"]"
] | true | 19 | [
"22",
"10",
"19",
"24"
] | 1 | VARIABLE_MISUSE | [
22
] | [
[
{
"before_index": 15,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 3,
"after_index": 2,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "osrg/ryu/ryu/services/protocols/bgp/rtconf/neighbors.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ validate (name = IN_FILTER)
def validate_in_filters(filters) :
return [valid_filter (filters) for filter_ in filters]
Is there a bug in the code above? | Yes |
802 | [
"#NEWLINE#",
"def unpack_args(",
"args",
")",
":",
"#NEWLINE#",
"#INDENT#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"f",
",",
"idx",
",",
"nmax",
",",
"k",
",",
"i",
",",
"j",
",",
"Qt",
",",
"base",
",",
"hdry",
")",
"=",
"args",
"#NEWLINE#",
"#UN... | true | 109 | [
"28",
"111",
"62",
"95",
"109",
"16",
"99",
"24",
"107",
"20",
"103",
"26",
"14",
"97",
"54",
"65",
"22",
"105",
"18",
"101",
"2",
"31",
"12",
"93"
] | 1 | VARIABLE_MISUSE | [
26
] | [
[
{
"before_index": 92,
"after_index": 96,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 31,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 53,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "modflowpy/flopy/examples/groundwater_paper/scripts/uspb_capture_par.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def unpack_args(args) :
try :
(f, idx, nmax, k, i, j, Qt, base, hdry) = args
except :
sys.stdout.write ('could not unpack args
')
raise
try :
current = mp.current_process ()
imod = (current._identity [0] - 1)
except :
sys.stdout.write ('could not get current... | Yes |
803 | [
"#NEWLINE#",
"def get_plan(",
"self",
",",
"code",
")",
":",
"#NEWLINE#",
"#INDENT#",
"response",
"=",
"self",
".",
"client",
".",
"make_request",
"(",
"path",
"=",
"'plans/get'",
",",
"params",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'code'",
":",
"code",
",",
... | true | 58 | [
"4",
"28",
"61",
"2",
"11",
"58",
"41",
"63",
"52",
"67",
"9",
"47",
"35",
"43"
] | 1 | VARIABLE_MISUSE | [
61
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 34,
"after_index": 38... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "SeanOC/sharpy/sharpy/product.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def get_plan(self, code) :
response = self.client.make_request (path = 'plans/get', params = {
'code' : code,
})
plans_parser = PlansParser ()
plans_data = plans_parser.parse_xml (response.content)
plans = [PricingPlan (** self) for plan_data in plans_data]
return plans [0]
Is there... | Yes |
804 | [
"#NEWLINE#",
"def create(",
"kernel",
")",
":",
"#NEWLINE#",
"#INDENT#",
"result",
"=",
"Tangible",
"(",
")",
"#NEWLINE#",
"result",
".",
"template",
"=",
"'object/tangible/instrument/shared_organ_max_rebo.iff'",
"#NEWLINE#",
"result",
".",
"attribute_template_id",
"=",
... | true | 38 | [
"7",
"13",
"19",
"28",
"2",
"38"
] | 1 | VARIABLE_MISUSE | [
7,
13,
19,
28
] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "anhstudios/swganh/data/scripts/templates/object/tangible/instrument/shared_organ_max_rebo.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def create(kernel) :
result = Tangible ()
result.template = 'object/tangible/instrument/shared_organ_max_rebo.iff'
result.attribute_template_id = (- 1)
result.stfName ('obj_n', 'obj_nalargon')
return kernel
Is there a bug in the code above? | Yes |
805 | [
"#NEWLINE#",
"@",
"pytest",
".",
"mark",
".",
"parametrize",
"(",
"'headers'",
",",
"(",
"example_request_headers",
",",
"bytes_example_request_headers",
")",
")",
"#NEWLINE#",
"@",
"pytest",
".",
"mark",
".",
"parametrize",
"(",
"'cookie_header'",
",",
"unsecured... | true | 117 | [
"43",
"102",
"106",
"30",
"53",
"109",
"128",
"34",
"49",
"61",
"70",
"32",
"46",
"56",
"115",
"36",
"111",
"117",
"78",
"88",
"94",
"100",
"122"
] | 1 | VARIABLE_MISUSE | [
53
] | [
[
{
"before_index": 1,
"after_index": 31,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 40,
"after_index": 41,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 42,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "python-hyper/hyper-h2/test/test_header_indexing.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ pytest.mark.parametrize ('headers', (example_request_headers, bytes_example_request_headers))
@ pytest.mark.parametrize ('cookie_header', unsecured_cookie_headers)
def test_long_cookie_headers_can_be_indexed(self, headers, cookie_header, frame_factory) :
'
Longer cookie headers can be indexed.
... | Yes |
806 | [
"#NEWLINE#",
"def get(",
"self",
",",
"*",
"args",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"(",
"200",
",",
"{",
"#NEWLINE#",
"#INDENT#",
"'test'",
":",
"{",
"#NEWLINE#",
"#INDENT#",
"'extra_data'",
":",
"self",
".",
"serialize_extra_data... | true | 30 | [
"5",
"30",
"2",
"26"
] | 1 | VARIABLE_MISUSE | [
2,
26
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 3,
"after_index": 5,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 15,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "reviewboard/reviewboard/reviewboard/extensions/tests.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def get(self, * args, **kwargs) :
return (200, {
'test' : {
'extra_data' : self.serialize_extra_data_field (args),
},
})
Is there a bug in the code above? | Yes |
807 | [
"#NEWLINE#",
"@",
"mock",
".",
"patch",
".",
"object",
"(",
"conductor_utils",
",",
"'_get_cleaning_steps'",
")",
"#NEWLINE#",
"def test__validate_user_clean_steps_missing_required_arg(",
"self",
",",
"mock_steps",
")",
":",
"#NEWLINE#",
"#INDENT#",
"node",
"=",
"obj_ut... | true | 116 | [
"16",
"32",
"119",
"46",
"21",
"91",
"14",
"27",
"37",
"41",
"87",
"100",
"96",
"114",
"116",
"123"
] | 1 | VARIABLE_MISUSE | [
46
] | [
[
{
"before_index": 1,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 26,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 31,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/ironic/ironic/tests/unit/conductor/test_utils.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ mock.patch.object (conductor_utils, '_get_cleaning_steps')
def test__validate_user_clean_steps_missing_required_arg(self, mock_steps) :
node = obj_utils.create_test_node (self.context)
mock_steps.return_value = [self.power_update, self.deploy_raid]
user_steps = [{
'step' : 'update_firmware', ... | Yes |
808 | [
"#NEWLINE#",
"def write(",
"self",
",",
"ostream",
")",
":",
"#NEWLINE#",
"#INDENT#",
"tstream",
"=",
"BytearrayStream",
"(",
")",
"#NEWLINE#",
"self",
".",
"private_key_uuid",
".",
"write",
"(",
"tstream",
")",
"#NEWLINE#",
"self",
".",
"public_key_uuid",
".",
... | true | 71 | [
"9",
"21",
"30",
"50",
"79",
"101",
"4",
"71",
"94",
"97",
"2",
"15",
"24",
"35",
"44",
"56",
"65",
"75",
"89"
] | 1 | VARIABLE_MISUSE | [
9,
21,
30,
50,
79,
101
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 20... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "OpenKMIP/PyKMIP/kmip/core/messages/payloads/create_key_pair.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def write(self, ostream) :
tstream = BytearrayStream ()
self.private_key_uuid.write (tstream)
self.public_key_uuid.write (tstream)
if (self.private_key_template_attribute is not None) :
self.private_key_template_attribute.write (tstream)
if (self.public_key_template_attribute is not None) ... | Yes |
809 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"db_object",
"=",
"None",
",",
"deployment_uuid",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"db_object",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"db_object",
"=",
"self",
"#NEWLINE#",
"#UNINDENT#",
"else"... | true | 24 | [
"8",
"39",
"2",
"20",
"24",
"31",
"4",
"16",
"22",
"33"
] | 1 | VARIABLE_MISUSE | [
4,
16,
22,
33
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/rally/rally/common/objects/verification.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, db_object = None, deployment_uuid = None) :
if db_object :
self.db_object = self
else :
self.db_object = db.verification_create (deployment_uuid)
Is there a bug in the code above? | Yes |
810 | [
"#NEWLINE#",
"def test_file_wrapper_no_sendfile(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"env",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'SERVER_PROTOCOL'",
":",
"'HTTP/1.0'",
",",
"#NEWLINE#",
"#UNINDENT#",
"}",
"#NEWLINE#",
"handler",
"=",
"FileWrapperHandler",
"(",
... | false | 0 | [
"7",
"34",
"env",
"2",
"44",
"53",
"78",
"self",
"20",
"37",
"48",
"57",
"82",
"handler"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 36,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "django/django/tests/builtin_server/tests.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_file_wrapper_no_sendfile(self) :
env = {
'SERVER_PROTOCOL' : 'HTTP/1.0',
}
handler = FileWrapperHandler (None, BytesIO (), BytesIO (), env)
handler.run (wsgi_app)
self.assertFalse (handler._used_sendfile)
self.assertEqual (handler.stdout.getvalue ().splitlines () [(- 1)], b'H... | No |
811 | [
"#NEWLINE#",
"@",
"classmethod",
"#NEWLINE#",
"def name_matches_object(",
"cls",
",",
"name",
",",
"task_id",
"=",
"None",
",",
"exact",
"=",
"True",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"Determine if a resource name could have been created by this class.\\n\\n :param ... | false | 0 | [
"43",
"118",
"143",
"152",
"168",
"190",
"subst",
"5",
"24",
"30",
"93",
"123",
"cls",
"13",
"176",
"exact",
"7",
"201",
"name",
"181",
"197",
"name_re",
"22",
"28",
"37",
"199",
"match",
"35",
"54",
"67",
"80",
"103",
"131",
"159",
"parts",
"9",... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/rally/rally/common/utils.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ classmethod
def name_matches_object(cls, name, task_id = None, exact = True) :
"Determine if a resource name could have been created by this class.
:param name: The resource name to check against this class's
RESOURCE_NAME_FORMAT.
:param task_id: The task ID that must match... | No |
812 | [
"#NEWLINE#",
"def build_BinOp(",
"self",
",",
"o",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"left",
",",
"op",
",",
"right",
")",
"=",
"map",
"(",
"self",
".",
"build",
",",
"[",
"o",
".",
"left",
",",
"o",
".",
"op",
",",
"o",
".",
"right",
"]",
... | false | 0 | [
"14",
"34",
"43",
"right",
"4",
"24",
"28",
"32",
"o",
"12",
"30",
"39",
"op",
"2",
"19",
"self",
"10",
"26",
"41",
"left"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 38,
"after_index": 42... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "AppScale/appscale/AppServer/lib/cherrypy/cherrypy/lib/reprconf.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def build_BinOp(self, o) :
(left, op, right) = map (self.build, [o.left, o.op, o.right])
return op (left, right)
Is there a bug in the code above? | No |
813 | [
"#NEWLINE#",
"def on_message(",
"self",
",",
"body",
",",
"message",
")",
":",
"#NEWLINE#",
"#INDENT#",
"event",
"=",
"body",
"[",
"'event'",
"]",
"#NEWLINE#",
"self",
".",
"handlers",
"[",
"event",
"]",
"(",
"**",
"body",
")",
"#NEWLINE#",
"self",
".",
... | false | 0 | [
"6",
"message",
"11",
"22",
"event",
"2",
"18",
"29",
"40",
"self",
"4",
"13",
"26",
"body"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "celery/cell/cell/presence.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def on_message(self, body, message) :
event = body ['event']
self.handlers [event] (** body)
self.debug ('agents after event recv: %s', promise ((lambda : self.agents)))
Is there a bug in the code above? | No |
814 | [
"#NEWLINE#",
"@",
"mock",
".",
"patch",
"(",
"'oslo_utils.timeutils.is_older_than'",
")",
"#NEWLINE#",
"@",
"mock",
".",
"patch",
"(",
"'oslo_utils.timeutils.parse_strtime'",
")",
"#NEWLINE#",
"def test_shelved_poll_filters_task_state(",
"self",
",",
"mock_parse",
",",
"m... | false | 0 | [
"22",
"36",
"mock_older",
"97",
"105",
"111",
"119",
"129",
"144",
"224",
"instance2",
"42",
"50",
"58",
"66",
"76",
"91",
"instance1",
"20",
"mock_parse",
"150",
"165",
"229",
"data",
"197",
"fake_soi",
"18",
"27",
"44",
"70",
"99",
"123",
"182",
"1... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 30,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 35,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/compute/test_shelve.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ mock.patch ('oslo_utils.timeutils.is_older_than')
@ mock.patch ('oslo_utils.timeutils.parse_strtime')
def test_shelved_poll_filters_task_state(self, mock_parse, mock_older) :
self.flags (shelved_offload_time = 1)
mock_older.return_value = True
instance1 = self._create_fake_instance_obj ()
instan... | No |
815 | [
"#NEWLINE#",
"def check_plausibility(",
"args",
"=",
"[",
"]",
",",
"fix",
"=",
"True",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Called by :manage:`check_plausibility`. See there.'",
"#NEWLINE#",
"Problem",
"=",
"rt",
".",
"modules",
".",
"plausibility",
".",
"Problem",
... | false | 0 | [
"7",
"180",
"fix",
"137",
"183",
"193",
"207",
"212",
"231",
"sums",
"102",
"123",
"154",
"qs",
"160",
"172",
"chk",
"112",
"134",
"220",
"226",
"msg",
"2",
"31",
"args",
"148",
"176",
"obj",
"16",
"24",
"76",
"Problem",
"167",
"190",
"todo",
"26... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lsaffre/lino/lino/modlib/plausibility/management/commands/checkdata.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def check_plausibility(args = [], fix = True) :
'Called by :manage:`check_plausibility`. See there.'
Problem = rt.modules.plausibility.Problem
mc = get_checkable_models (* args)
with translation.override ('en') :
for (m, checkers) in mc.items () :
ct = rt.modules.contenttypes.C... | No |
816 | [
"#NEWLINE#",
"def _write_segment_data(",
"self",
",",
"i",
",",
"j",
",",
"f_sfr",
")",
":",
"#NEWLINE#",
"#INDENT#",
"cols",
"=",
"[",
"'nseg'",
",",
"'icalc'",
",",
"'outseg'",
",",
"'iupseg'",
",",
"'iprior'",
",",
"'nstrpts'",
",",
"'flow'",
",",
"'run... | false | 0 | [
"90",
"308",
"roughbk",
"82",
"243",
"runoff",
"86",
"247",
"pptsw",
"92",
"344",
"cdpth",
"70",
"153",
"195",
"256",
"289",
"318",
"icalc",
"76",
"185",
"iprior",
"78",
"214",
"nstrpts",
"4",
"57",
"122",
"369",
"402",
"i",
"88",
"279",
"roughch",
... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 48,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "modflowpy/flopy/flopy/modflow/mfsfr2.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def _write_segment_data(self, i, j, f_sfr) :
cols = ['nseg', 'icalc', 'outseg', 'iupseg', 'iprior', 'nstrpts', 'flow', 'runoff', 'etsw', 'pptsw', 'roughch', 'roughbk', 'cdpth', 'fdpth', 'awdth', 'bwdth']
fmts = _fmt_string_list (self.segment_data [i] [cols] [j])
(nseg, icalc, outseg, iupseg, iprior, nstr... | No |
817 | [
"#NEWLINE#",
"def test_filter_with_failing_queryset(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"\\n Ensure that when a filter's queryset method fails, it fails loudly and\\n the corresponding exception doesn't get swallowed (#17828).\\n \"",
"#NEWLINE#",
"modeladmin",
"... | false | 0 | [
"18",
"50",
"request",
"9",
"54",
"modeladmin",
"2",
"20",
"37",
"46",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 27... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "django/django/tests/admin_filters/tests.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_filter_with_failing_queryset(self) :
"
Ensure that when a filter's queryset method fails, it fails loudly and
the corresponding exception doesn't get swallowed (#17828).
"
modeladmin = DecadeFilterBookAdminWithFailingQueryset (Book, site)
request = self.request_factory.ge... | No |
818 | [
"#NEWLINE#",
"def find_packages(",
"path",
"=",
"'.'",
",",
"base",
"=",
"''",
",",
"exclude",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Find all packages in path'",
"#NEWLINE#",
"if",
"(",
"not",
"exclude",
")",
":",
"#NEWLINE#",
"#INDENT#",
"exclude",
... | false | 0 | [
"10",
"22",
"27",
"77",
"exclude",
"43",
"64",
"98",
"100",
"110",
"item",
"2",
"49",
"58",
"62",
"path",
"6",
"84",
"94",
"96",
"base",
"54",
"71",
"75",
"118",
"126",
"dir",
"33",
"113",
"120",
"135",
"packages",
"88",
"108",
"115",
"128",
"m... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "uwescience/raco/setup.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def find_packages(path = '.', base = '', exclude = None) :
'Find all packages in path'
if (not exclude) :
exclude = []
packages = {
}
for item in os.listdir (path) :
dir = os.path.join (path, item)
if (is_package (dir) and (dir not in exclude)) :
if base... | No |
819 | [
"#NEWLINE#",
"def test_empty_response_is_false(",
"dummy_response",
")",
":",
"#NEWLINE#",
"#INDENT#",
"dummy_response",
"[",
"'hits'",
"]",
"[",
"'hits'",
"]",
"=",
"[",
"]",
"#NEWLINE#",
"res",
"=",
"result",
".",
"Response",
"(",
"dummy_response",
")",
"#NEWLIN... | false | 0 | [
"18",
"30",
"res",
"2",
"7",
"24",
"dummy_response"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 27,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "elastic/elasticsearch-dsl-py/test_elasticsearch_dsl/test_result.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_empty_response_is_false(dummy_response) :
dummy_response ['hits'] ['hits'] = []
res = result.Response (dummy_response)
assert (not res)
Is there a bug in the code above? | No |
820 | [
"#NEWLINE#",
"def test_SPARK_SUBMIT_SCRIPT_RUNNER_STEP(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"cmd",
"=",
"(",
"(",
"self",
".",
"prefix",
"+",
"'Type=SPARK,'",
")",
"+",
"self",
".",
"SPARK_SUBMIT_BASIC_ARGS",
")",
"#NEWLINE#",
"expected_result",
"=",
"{",
... | false | 0 | [
"7",
"92",
"94",
"cmd",
"2",
"11",
"18",
"51",
"84",
"88",
"self",
"64",
"73",
"100",
"102",
"expected_result_release",
"23",
"70",
"96",
"98",
"expected_result"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 63,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "aws/aws-cli/tests/unit/customizations/emr/test_add_steps.py",
"license": "apache-2.0",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_SPARK_SUBMIT_SCRIPT_RUNNER_STEP(self) :
cmd = ((self.prefix + 'Type=SPARK,') + self.SPARK_SUBMIT_BASIC_ARGS)
expected_result = {
'JobFlowId' : 'j-ABC',
'Steps' : [{
'Name' : 'Spark application',
'ActionOnFailure' : 'CONTINUE',
'HadoopJarStep' :... | No |
821 | [
"#NEWLINE#",
"def run_from_ui(",
"self",
",",
"ar",
",",
"**kw",
")",
":",
"#NEWLINE#",
"#INDENT#",
"obj",
"=",
"ar",
".",
"selected_rows",
"[",
"0",
"]",
"#NEWLINE#",
"ar",
".",
"set_response",
"(",
"message",
"=",
"ar",
".",
"action_param_values",
".",
"... | false | 0 | [
"kw",
"2",
"51",
"self",
"11",
"57",
"obj",
"4",
"13",
"20",
"26",
"33",
"42",
"55",
"ar"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lsaffre/lino/lino/core/actions.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def run_from_ui(self, ar, **kw) :
obj = ar.selected_rows [0]
ar.set_response (message = ar.action_param_values.notify_subject)
ar.set_response (refresh = True)
ar.set_response (success = True)
self.add_system_note (ar, obj)
Is there a bug in the code above? | No |
822 | [
"#NEWLINE#",
"def getModuleByImportString(",
"self",
",",
"importString",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"importString",
"in",
"self",
".",
"modulesByImportString",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"self",
".",
"modulesByImportString",
"[",
... | false | 0 | [
"2",
"13",
"21",
"self",
"4",
"11",
"25",
"importString"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 11... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "jkcom/SublimeRJS/core/model.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def getModuleByImportString(self, importString) :
if (importString in self.modulesByImportString) :
return self.modulesByImportString [importString]
else :
return None
Is there a bug in the code above? | No |
823 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"state",
",",
"**argv",
")",
":",
"#NEWLINE#",
"#INDENT#",
"super",
"(",
"TestError",
",",
"self",
")",
".",
"__init__",
"(",
"state",
",",
"ERROR",
",",
"**",
"argv",
")"
] | false | 0 | [
"25",
"argv",
"4",
"20",
"state",
"2",
"15",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "osrg/ryu/ryu/tests/switch/tester.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, state, **argv) :
super (TestError, self).__init__ (state, ERROR, ** argv)
Is there a bug in the code above? | No |
824 | [
"#NEWLINE#",
"@",
"set_ev_cls",
"(",
"[",
"ofp_event",
".",
"EventOFPFlowStatsReply",
",",
"ofp_event",
".",
"EventOFPMeterConfigStatsReply",
",",
"ofp_event",
".",
"EventOFPTableStatsReply",
",",
"ofp_event",
".",
"EventOFPPortStatsReply",
",",
"ofp_event",
".",
"Event... | false | 0 | [
"34",
"41",
"150",
"165",
"185",
"193",
"ev",
"39",
"94",
"119",
"ofp",
"49",
"105",
"130",
"148",
"event_states",
"32",
"144",
"160",
"171",
"179",
"202",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 33,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 38,
"after_index": 46,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 48,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "osrg/ryu/ryu/tests/switch/tester.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ set_ev_cls ([ofp_event.EventOFPFlowStatsReply, ofp_event.EventOFPMeterConfigStatsReply, ofp_event.EventOFPTableStatsReply, ofp_event.EventOFPPortStatsReply, ofp_event.EventOFPGroupDescStatsReply], handler.MAIN_DISPATCHER)
def stats_reply_handler(self, ev) :
ofp = ev.msg.datapath.ofproto
event_states = {
... | No |
825 | [
"#NEWLINE#",
"def create_node(",
"self",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Creates a node in the IBM Developer Cloud.\\n\\n See L{NodeDriver.create_node} for more keyword args.\\n\\n @keyword ex_configurationData: Image-specific configuration paramet... | false | 0 | [
"11",
"20",
"39",
"60",
"90",
"116",
"154",
"203",
"259",
"261",
"data",
"29",
"48",
"69",
"85",
"99",
"138",
"143",
"163",
"180",
"187",
"kwargs",
"185",
"195",
"212",
"configurationData",
"226",
"271",
"resp",
"2",
"228",
"267",
"self",
"193",
"2... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 13,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "secondstory/dewpoint/libcloud/drivers/ibm_sbc.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def create_node(self, **kwargs) :
'
Creates a node in the IBM Developer Cloud.
See L{NodeDriver.create_node} for more keyword args.
@keyword ex_configurationData: Image-specific configuration parameters.
Configuration parameters are defined in
... | No |
826 | [
"#NEWLINE#",
"def sync_with_handlers(",
"self",
",",
"handlers",
"=",
"(",
")",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Sync the stored log records to the provided log handlers.\\n '",
"#NEWLINE#",
"if",
"(",
"not",
"handlers",
")",
":",
"#NEWLINE#",
"#INDENT... | false | 0 | [
"2",
"26",
"34",
"self",
"44",
"52",
"66",
"handler",
"4",
"17",
"46",
"handlers",
"32",
"56",
"70",
"record"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "saltstack/salt/salt/log/handlers/__init__.py",
"license": "apache-2.0",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def sync_with_handlers(self, handlers = ()) :
'
Sync the stored log records to the provided log handlers.
'
if (not handlers) :
return
while self.__messages :
record = self.__messages.pop (0)
for handler in handlers :
if (handler.level > record.levelno)... | No |
827 | [
"#NEWLINE#",
"def verify_valid_flag(",
"self",
",",
"cmd_line",
")",
":",
"#NEWLINE#",
"#INDENT#",
"data",
"=",
"self",
".",
"start_python",
"(",
"cmd_line",
")",
"#NEWLINE#",
"self",
".",
"assertTrue",
"(",
"(",
"(",
"data",
"==",
"''",
")",
"or",
"data",
... | false | 0 | [
"2",
"11",
"18",
"38",
"self",
"9",
"24",
"29",
"45",
"data",
"4",
"15",
"cmd_line"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 21... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ofermend/medicare-demo/socialite/jython/Lib/test/test_cmd_line.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def verify_valid_flag(self, cmd_line) :
data = self.start_python (cmd_line)
self.assertTrue (((data == '') or data.endswith ('
')))
self.assertTrue (('Traceback' not in data))
Is there a bug in the code above? | No |
828 | [
"#NEWLINE#",
"def test_middleFilter_no_descriptor(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"middle_fprint",
"=",
"'middle fprint'",
"#NEWLINE#",
"rel_stat",
"=",
"mock",
".",
"Mock",
"(",
")",
"#NEWLINE#",
"rel_stat",
".",
"digest",
"=",
"'middle digest'",
"#NEWL... | false | 0 | [
"2",
"71",
"self",
"38",
"83",
"descriptors",
"7",
"79",
"middle_fprint",
"59",
"87",
"exit_status_entry",
"25",
"81",
"cons_rel_stats",
"51",
"95",
"stable",
"11",
"19",
"32",
"rel_stat",
"55",
"85",
"exit_desc",
"63",
"89",
"guard_desc",
"67",
"91",
"gua... | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "nskinkel/oppy/oppy/tests/unit/path/test_path.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_middleFilter_no_descriptor(self) :
middle_fprint = 'middle fprint'
rel_stat = mock.Mock ()
rel_stat.digest = 'middle digest'
cons_rel_stats = {
'middle fprint' : rel_stat,
}
descriptors = {
}
fast = True
stable = True
exit_desc = 'exit desc'
exit... | No |
829 | [
"#NEWLINE#",
"def _add_interval(",
"self",
",",
"data",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"self",
".",
"interval",
":",
"#NEWLINE#",
"#INDENT#",
"data",
"[",
"'interval'",
"]",
"=",
"self",
".",
"interval",
"#NEWLINE#",
"#UNINDENT#",
"else",
":",
"#NEWL... | false | 0 | [
"2",
"10",
"21",
"31",
"42",
"self",
"4",
"16",
"37",
"data"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 10... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "aparo/pyes/pyes/aggs.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def _add_interval(self, data) :
if self.interval :
data ['interval'] = self.interval
else :
if self.time_interval :
data ['time_interval'] = self.time_interval
else :
raise RuntimeError ('Invalid field: interval or time_interval required')
Is there a bug in the code ... | No |
830 | [
"#NEWLINE#",
"def add_utxo(",
"self",
",",
"address",
",",
"data",
")",
":",
"#NEWLINE#",
"#INDENT#",
"txhash",
"=",
"data",
"[",
"0",
"]",
"#NEWLINE#",
"self",
".",
"hash_queue",
".",
"put",
"(",
"txhash",
")"
] | false | 0 | [
"6",
"13",
"data",
"2",
"18",
"self",
"4",
"address",
"11",
"24",
"txhash"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "chromaway/ngcccbase/ngcccbase/utxo_fetcher.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def add_utxo(self, address, data) :
txhash = data [0]
self.hash_queue.put (txhash)
Is there a bug in the code above? | No |
831 | [
"#NEWLINE#",
"@",
"with_model",
"#NEWLINE#",
"def test_kappa_simulation_results(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"Monomer",
"(",
"'A'",
",",
"[",
"'b'",
"]",
")",
"#NEWLINE#",
"Monomer",
"(",
"'B'",
",",
"[",
"'b'",
"]",
")",
"#NEWLINE#",
"Initial",
"(",
... | false | 0 | [
"174",
"190",
"205",
"224",
"npts",
"178",
"198",
"217",
"234",
"251",
"kres"
] | 0 | NONE | [] | [
[
{
"before_index": 8,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pysb/pysb/pysb/tests/test_kappa.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ with_model
def test_kappa_simulation_results() :
Monomer ('A', ['b'])
Monomer ('B', ['b'])
Initial (A (b = None), Parameter ('A_0', 100))
Initial (B (b = None), Parameter ('B_0', 100))
Rule ('A_binds_B', ((A (b = None) + B (b = None)) >> (A (b = 1) % B (b = 1))), Parameter ('kf', 1))
Ru... | No |
832 | [
"#NEWLINE#",
"def check_view_permissions(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Returns True if the user has required permissions.\\n '",
"#NEWLINE#",
"if",
"(",
"self",
".",
"action",
"==",
"'retrieve'",
")",
":",
"#NEWLINE#",
"#INDENT#",
"result",... | false | 0 | [
"2",
"11",
"22",
"30",
"46",
"59",
"69",
"self",
"20",
"42",
"83",
"result"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 82,
"after_index": 83... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "OpenSlides/OpenSlides/openslides/core/views.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def check_view_permissions(self) :
'
Returns True if the user has required permissions.
'
if (self.action == 'retrieve') :
result = self.get_access_permissions ().can_retrieve (self.request.user)
else :
result = ((self.action in ('metadata', 'list', 'create')) and self.reque... | No |
833 | [
"#NEWLINE#",
"def open(",
"self",
",",
"timeout",
"=",
"default_timeout",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n \"Open\" the UEFI menu by sending an interrupt on STDIN after seeing the\\n starting prompt (configurable upon creation of the ``UefiMenu`` object.\\n\\n '",
... | false | 0 | [
"4",
"23",
"timeout",
"2",
"13",
"19",
"26",
"39",
"44",
"52",
"61",
"65",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ARM-software/workload-automation/wlauto/utils/uboot.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def open(self, timeout = default_timeout) :
'
"Open" the UEFI menu by sending an interrupt on STDIN after seeing the
starting prompt (configurable upon creation of the ``UefiMenu`` object.
'
self.conn.expect (self.start_prompt, timeout)
self.conn.sendline ('')
time.sleep (se... | No |
834 | [
"#NEWLINE#",
"def item_link(",
"self",
",",
"item",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"item",
"[",
"'url'",
"]",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"item",
"[",
"'url'",
"]",
"#NEWLINE#",
"#UNINDENT#",
"return",
"''"
] | false | 0 | [
"4",
"10",
"18",
"item",
"2",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 25... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dndtools/dndtools/dndtools/dnd/feeds.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def item_link(self, item) :
if item ['url'] :
return item ['url']
return ''
Is there a bug in the code above? | No |
835 | [
"#NEWLINE#",
"def op_JUMP_IF_FALSE(",
"self",
",",
"info",
",",
"inst",
")",
":",
"#NEWLINE#",
"#INDENT#",
"pred",
"=",
"info",
".",
"tos",
"#NEWLINE#",
"info",
".",
"append",
"(",
"inst",
",",
"pred",
"=",
"pred",
")",
"#NEWLINE#",
"info",
".",
"terminato... | false | 0 | [
"11",
"23",
"25",
"pred",
"2",
"self",
"4",
"13",
"17",
"28",
"info",
"6",
"21",
"32",
"inst"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "numba/numba/numba/dataflow.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def op_JUMP_IF_FALSE(self, info, inst) :
pred = info.tos
info.append (inst, pred = pred)
info.terminator = inst
Is there a bug in the code above? | No |
836 | [
"#NEWLINE#",
"def onKLM(",
"self",
",",
"event",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'selected K, L, or M Markers'",
"#NEWLINE#",
"if",
"(",
"self",
".",
"selected_elem",
"is not",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"onShowLines",... | false | 0 | [
"2",
"15",
"24",
"30",
"self",
"4",
"event"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "xraypy/xraylarch/plugins/wx/xrfdisplay.py",
"license": "bsd-2-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def onKLM(self, event = None) :
'selected K, L, or M Markers'
if (self.selected_elem is not None) :
self.onShowLines (elem = self.selected_elem)
Is there a bug in the code above? | No |
837 | [
"#NEWLINE#",
"def test_verify_detailed_index(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"req",
"=",
"webob",
".",
"Request",
".",
"blank",
"(",
"(",
"'/v1.1/123/os-simple-tenant-usage?detailed=1&start=%s&end=%s'",
"%",
"(",
"START",
".",
"isoformat",
"(",
")",
",",... | false | 0 | [
"106",
"132",
"servers",
"7",
"34",
"40",
"51",
"req",
"97",
"110",
"i",
"89",
"108",
"usages",
"2",
"61",
"67",
"126",
"self",
"78",
"91",
"res_dict",
"49",
"71",
"84",
"res",
"117",
"134",
"j"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 33,
"after_index": 38,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 39,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "nii-cloud/dodai-compute/nova/tests/api/openstack/contrib/test_simple_tenant_usage.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_verify_detailed_index(self) :
req = webob.Request.blank (('/v1.1/123/os-simple-tenant-usage?detailed=1&start=%s&end=%s' % (START.isoformat (), STOP.isoformat ())))
req.method = 'GET'
req.headers ['content-type'] = 'application/json'
res = req.get_response (fakes.wsgi_app (fake_auth_context ... | No |
838 | [
"#NEWLINE#",
"def load_doctests(",
"loader",
",",
"tests",
",",
"ignore",
",",
"module",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Load the doctest tests for the specified module into unittest.'",
"#NEWLINE#",
"_patcher",
"=",
"Patcher",
"(",
")",
"#NEWLINE#",
"globs",
"=",
... | true | 41 | [
"2",
"41",
"15",
"23",
"49",
"55",
"4",
"33",
"62",
"8",
"29",
"6",
"21",
"43",
"45"
] | 1 | VARIABLE_MISUSE | [
8,
29
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "jmcgeheeiv/pyfakefs/pyfakefs/fake_filesystem_unittest.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def load_doctests(loader, tests, ignore, module) :
'Load the doctest tests for the specified module into unittest.'
_patcher = Patcher ()
globs = _patcher.replaceGlobs (vars (module))
tests.addTests (doctest.DocTestSuite (loader, globs = globs, setUp = _patcher.setUp, tearDown = _patcher.tearDown)) ... | Yes |
839 | [
"#NEWLINE#",
"def __set__(",
"self",
",",
"obj",
",",
"value",
")",
":",
"#NEWLINE#",
"#INDENT#",
"currency",
"=",
"getattr",
"(",
"obj",
",",
"self",
".",
"field",
".",
"get_currency_field_name",
"(",
")",
")",
"#NEWLINE#",
"if",
"self",
".",
"field",
"."... | true | 106 | [
"4",
"15",
"39",
"95",
"11",
"63",
"83",
"106",
"2",
"17",
"27",
"41",
"99",
"35",
"55",
"89",
"91",
"6",
"72",
"81",
"87"
] | 1 | VARIABLE_MISUSE | [
6,
72,
81,
87
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "django-bmf/django-bmf/djangobmf/fields/__init__.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __set__(self, obj, value) :
currency = getattr (obj, self.field.get_currency_field_name ())
if self.field.has_precision :
precision = getattr (obj, self.field.get_precision_field_name ())
else :
precision = 0
if ((currency is not None) and (not isinstance (value, BaseCurrency))) :
... | Yes |
840 | [
"#NEWLINE#",
"def test_update_new_instance_of_the_resource_with_content_type_text_xml(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"an_updated_item",
"=",
"'<comment id=\"2\">meu comentario</comment>'",
"#NEWLINE#",
"response",
"=",
"self",
".",
"_fetch",
"(",
"self",
".",
"ge... | true | 146 | [
"104",
"117",
"128",
"135",
"2",
"13",
"17",
"53",
"11",
"46",
"51",
"57",
"84",
"96",
"110",
"7",
"41",
"146"
] | 1 | VARIABLE_MISUSE | [
104,
117,
128,
135
] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 43,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "globocom/tapioca/tests/acceptance/test_rest_api.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_update_new_instance_of_the_resource_with_content_type_text_xml(self) :
an_updated_item = '<comment id="2">meu comentario</comment>'
response = self._fetch (self.get_url ('/api/2'), 'PUT', headers = {
'Content-Type' : 'text/xml',
}, body = an_updated_item)
assert_response_code (response... | Yes |
841 | [
"#NEWLINE#",
"def to_shapefile(",
"self",
",",
"filename",
",",
"kstpkper",
"=",
"None",
",",
"totim",
"=",
"None",
",",
"mflay",
"=",
"None",
",",
"attrib_name",
"=",
"'lf_data'",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"\\n Export model output data to a shape... | true | 61 | [
"18",
"61",
"74",
"129",
"68",
"102",
"139",
"164",
"10",
"41",
"43",
"14",
"45",
"47",
"80",
"112",
"135",
"146",
"6",
"37",
"39",
"2",
"33",
"160",
"27",
"84",
"116",
"144",
"4",
"158",
"126",
"141"
] | 1 | VARIABLE_MISUSE | [
14,
45,
47,
80
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "modflowpy/flopy/flopy/utils/datafile.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def to_shapefile(self, filename, kstpkper = None, totim = None, mflay = None, attrib_name = 'lf_data') :
"
Export model output data to a shapefile at a specific location
in LayerFile instance.
Parameters
----------
filename : str
Shapefile name to write
... | Yes |
842 | [
"#NEWLINE#",
"def show_filtered_lines(",
"self",
",",
"edit",
",",
"lines",
")",
":",
"#NEWLINE#",
"#INDENT#",
"results_view",
"=",
"self",
".",
"view",
".",
"window",
"(",
")",
".",
"new_file",
"(",
")",
"#NEWLINE#",
"results_view",
".",
"set_name",
"(",
"'... | true | 133 | [
"11",
"25",
"32",
"39",
"133",
"162",
"222",
"251",
"123",
"135",
"70",
"146",
"203",
"218",
"103",
"114",
"144",
"156",
"201",
"216",
"116",
"94",
"127",
"2",
"13",
"49",
"64",
"72",
"84",
"97",
"152",
"212",
"255",
"4",
"6",
"76",
"119",
"2... | 1 | VARIABLE_MISUSE | [
70,
146
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "davidpeckham/sublime-filterlines/filter.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def show_filtered_lines(self, edit, lines) :
results_view = self.view.window ().new_file ()
results_view.set_name ('Filter Results')
results_view.set_scratch (True)
results_view.settings ().set ('word_wrap', self.view.settings ().get ('word_wrap'))
if self.invert_search :
source_lines ... | Yes |
843 | [
"#NEWLINE#",
"def test_references_deep(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"root",
"=",
"DeepModel",
"(",
")",
"#NEWLINE#",
"objects",
"=",
"set",
"(",
"[",
"root",
"]",
")",
"#NEWLINE#",
"parent",
"=",
"root",
"#NEWLINE#",
"for",
"i",
"in",
"xrang... | true | 53 | [
"7",
"18",
"24",
"53",
"66",
"36",
"46",
"57",
"27",
"2",
"60",
"22",
"49",
"55",
"13",
"42",
"73"
] | 1 | VARIABLE_MISUSE | [
36,
46,
57
] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "bokeh/bokeh/bokeh/tests/test_objects.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_references_deep(self) :
root = DeepModel ()
objects = set ([root])
parent = root
for i in xrange (900) :
model = DeepModel ()
objects.add (model)
parent.child = root
parent = model
self.assertEqual (set (root.references ()), objects)
Is there a bug in ... | Yes |
844 | [
"#NEWLINE#",
"@",
"with_database",
"#NEWLINE#",
"def test_can_merge_tracks(",
"conn",
")",
":",
"#NEWLINE#",
"#INDENT#",
"prepare_database",
"(",
"groups",
",",
"'\\nINSERT INTO fingerprint (fingerprint, length, track_id, submission_count)\\n VALUES (%(fp1)s, %(len1)s, 1, 1), (%(fp2)s... | true | 12 | [
"5",
"48",
"12",
"44",
"72"
] | 1 | VARIABLE_MISUSE | [
5,
48
] | [
[
{
"before_index": 9,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 43,
"after_index": 49,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 58,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lalinsky/acoustid-server/tests/test_data_track.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ with_database
def test_can_merge_tracks(conn) :
prepare_database (groups, '
INSERT INTO fingerprint (fingerprint, length, track_id, submission_count)
VALUES (%(fp1)s, %(len1)s, 1, 1), (%(fp2)s, %(len2)s, 2, 1),
(%(fp3)s, %(len3)s, 3, 1);
', dict (fp1 = TEST_1A_FP_RAW, len1 = TEST_1A_LENGTH, f... | Yes |
845 | [
"#NEWLINE#",
"def to_string(",
"self",
",",
"buf",
"=",
"None",
",",
"na_rep",
"=",
"'NaN'",
",",
"float_format",
"=",
"None",
",",
"header",
"=",
"True",
",",
"index",
"=",
"True",
",",
"length",
"=",
"False",
",",
"dtype",
"=",
"False",
",",
"name",
... | true | 53 | [
"24",
"67",
"69",
"4",
"117",
"136",
"152",
"32",
"75",
"77",
"157",
"161",
"16",
"59",
"61",
"45",
"53",
"89",
"106",
"125",
"140",
"165",
"36",
"79",
"81",
"28",
"71",
"73",
"12",
"51",
"2",
"47",
"8",
"55",
"57",
"20",
"63",
"65"
] | 1 | VARIABLE_MISUSE | [
12,
51
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 42,
"after_index": 43,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 44,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pydata/pandas/pandas/core/series.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def to_string(self, buf = None, na_rep = 'NaN', float_format = None, header = True, index = True, length = False, dtype = False, name = False, max_rows = None) :
"
Render a string representation of the Series
Parameters
----------
buf : StringIO-like, optional
buffer to... | Yes |
846 | [
"#NEWLINE#",
"@",
"Appender",
"(",
"(",
"generic",
".",
"_shared_docs",
"[",
"'shift'",
"]",
"%",
"_shared_doc_kwargs",
")",
")",
"#NEWLINE#",
"def shift(",
"self",
",",
"periods",
"=",
"1",
",",
"freq",
"=",
"None",
",",
"axis",
"=",
"0",
")",
":",
"#... | true | 54 | [
"17",
"39",
"27",
"52",
"23",
"48",
"50",
"19",
"44",
"46",
"54"
] | 1 | VARIABLE_MISUSE | [
27,
52
] | [
[
{
"before_index": 1,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 34,
"after_index": 47,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 3,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pydata/pandas/pandas/core/series.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ Appender ((generic._shared_docs ['shift'] % _shared_doc_kwargs))
def shift(self, periods = 1, freq = None, axis = 0) :
return super (Series, self).shift (periods = periods, freq = freq, axis = periods)
Is there a bug in the code above? | Yes |
847 | [
"#NEWLINE#",
"@",
"test",
".",
"create_stubs",
"(",
"{",
"#NEWLINE#",
"#INDENT#",
"cinder",
":",
"(",
"'volume_type_list_with_qos_associations'",
",",
"'qos_spec_list'",
",",
"'extension_supported'",
",",
"'volume_encryption_type_list'",
")",
",",
"#NEWLINE#",
"#UNINDENT#... | true | 188 | [
"32",
"118",
"74",
"186",
"201",
"205",
"152",
"170",
"181",
"214",
"27",
"35",
"46",
"72",
"95",
"144",
"154",
"166",
"177",
"197",
"203",
"223",
"229",
"188",
"212",
"227"
] | 1 | VARIABLE_MISUSE | [
152,
170,
181,
214
] | [
[
{
"before_index": 31,
"after_index": 45,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 57,
"after_index": 71,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 80,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CiscoSystems/avos/openstack_dashboard/dashboards/admin/volumes/tests.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ test.create_stubs ({
cinder : ('volume_type_list_with_qos_associations', 'qos_spec_list', 'extension_supported', 'volume_encryption_type_list'),
})
def test_volume_types_tab(self) :
encryption_list = (self.cinder_volume_encryption_types.list () [0], self.cinder_volume_encryption_types.list () [1])
ci... | Yes |
848 | [
"#NEWLINE#",
"def set_collection_name(",
"self",
",",
"collectionName",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"collectionName",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"_coll",
"=",
"collectionName",
".",
"_database",
"[",
"collectionName",
"]",
"#NEWLINE#",
"... | true | 18 | [
"2",
"14",
"25",
"4",
"10",
"18",
"22",
"29"
] | 1 | VARIABLE_MISUSE | [
2,
14,
25
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 21... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "xumiao/pymonk/monk/core/crane.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def set_collection_name(self, collectionName) :
if collectionName :
self._coll = collectionName._database [collectionName]
self._currentCollectionName = collectionName
Is there a bug in the code above? | Yes |
849 | [
"#NEWLINE#",
"def it_adds_an_sp_to_help_add_textbox(",
"self",
",",
"textbox_sp_fixture",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"shapes",
",",
"x_",
",",
"y_",
",",
"cx_",
",",
"cy_",
",",
"spTree_",
",",
"id_",
",",
"name",
",",
"sp_",
")",
"=",
"textbox_... | true | 56 | [
"16",
"41",
"60",
"14",
"39",
"58",
"4",
"29",
"31",
"67",
"18",
"43",
"62",
"24",
"54",
"56",
"26",
"69",
"2",
"10",
"33",
"20",
"46",
"22",
"52",
"12",
"37"
] | 1 | VARIABLE_MISUSE | [
12,
37
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 29,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 30,
"after_index": 38... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "scanny/python-pptx/tests/shapes/test_shapetree.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def it_adds_an_sp_to_help_add_textbox(self, textbox_sp_fixture) :
(shapes, x_, y_, cx_, cy_, spTree_, id_, name, sp_) = textbox_sp_fixture
sp = shapes._add_textbox_sp (x_, y_, cx_, cy_)
spTree_.add_textbox.assert_called_once_with (id_, name, name, y_, cx_, cy_)
assert (sp is sp_)
Is there a bug in... | Yes |
850 | [
"#NEWLINE#",
"@",
"override_settings",
"(",
"TESTS_SHOULD_USE_SQL_BACKEND",
"=",
"True",
")",
"#NEWLINE#",
"def test_case_pillow_sql(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"consumer",
"=",
"get_test_kafka_consumer",
"(",
"topics",
".",
"CASE_SQL",
")",
"#NEWLINE#... | true | 221 | [
"10",
"73",
"99",
"112",
"116",
"144",
"152",
"169",
"189",
"193",
"203",
"215",
"15",
"26",
"84",
"82",
"94",
"69",
"103",
"221",
"125",
"131",
"44",
"77",
"105",
"207",
"54",
"79",
"219",
"24",
"137",
"90",
"107",
"120",
"159",
"175",
"182",
... | 1 | VARIABLE_MISUSE | [
180,
197,
209
] | [
[
{
"before_index": 14,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 34,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 43,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dimagi/commcare-hq/testapps/test_pillowtop/tests/test_case_pillow.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ override_settings (TESTS_SHOULD_USE_SQL_BACKEND = True)
def test_case_pillow_sql(self) :
consumer = get_test_kafka_consumer (topics.CASE_SQL)
kafka_seq = consumer.offsets () ['fetch'] [(topics.CASE_SQL, 0)]
case_id = uuid.uuid4 ().hex
case_name = 'case-name-{}'.format (uuid.uuid4 ().hex)
cas... | Yes |
851 | [
"#NEWLINE#",
"def __ne__(",
"self",
",",
"other",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Returns true iff this tag is not identical to the other tag,\\n as defined in __eq__.'",
"#NEWLINE#",
"return",
"(",
"not",
"(",
"self",
"==",
"self",
")",
")"
] | true | 17 | [
"4",
"2",
"15",
"17"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 13,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "socketubs/pyhn/pyhn/lib/bs4_py3/element.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __ne__(self, other) :
'Returns true iff this tag is not identical to the other tag,
as defined in __eq__.'
return (not (self == self))
Is there a bug in the code above? | Yes |
852 | [
"#NEWLINE#",
"def load_rules(",
"self",
",",
"force_reload",
"=",
"False",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"Loads policy_path's rules.\\n\\n Policy file is cached and will be reloaded if modified.\\n\\n :param force_reload: Whether to overwrite current rules.\\n \"",
... | true | 86 | [
"2",
"18",
"26",
"35",
"42",
"46",
"50",
"56",
"60",
"82",
"112",
"118",
"68",
"80",
"106",
"116",
"4",
"14",
"22",
"64",
"86",
"122"
] | 1 | VARIABLE_MISUSE | [
68,
80,
106,
116
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CiscoSystems/avos/openstack_dashboard/openstack/common/policy.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def load_rules(self, force_reload = False) :
"Loads policy_path's rules.
Policy file is cached and will be reloaded if modified.
:param force_reload: Whether to overwrite current rules.
"
if force_reload :
self.use_conf = force_reload
if self.use_conf :
if (not sel... | Yes |
853 | [
"#NEWLINE#",
"def test_get(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"fake_http_client",
"=",
"fake_client",
".",
"FakeHTTPClient",
"(",
"fixtures",
"=",
"fixtures_get",
")",
"#NEWLINE#",
"api_client",
"=",
"sclient",
".",
"Client",
"(",
"fake_http_client",
")",... | true | 33 | [
"2",
"47",
"18",
"27",
"33",
"38",
"36",
"51",
"7",
"24"
] | 1 | VARIABLE_MISUSE | [
18
] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/python-solumclient/solumclient/tests/v1/test_languagepack.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_get(self) :
fake_http_client = fake_client.FakeHTTPClient (fixtures = fixtures_get)
api_client = sclient.Client (fake_http_client)
mgr = languagepack.LanguagePackManager (mgr)
languagepack_obj = mgr.get (lp_id = 'x1')
self.assert_lp_object (languagepack_obj)
Is there a bug in the cod... | Yes |
854 | [
"#NEWLINE#",
"def resolve_string(",
"string",
")",
":",
"#NEWLINE#",
"#INDENT#",
"localize",
"=",
"(",
"(",
"len",
"(",
"string",
")",
">",
"3",
")",
"and",
"(",
"string",
"[",
"0",
":",
"2",
"]",
"==",
"'_('",
")",
"and",
"(",
"string",
"[",
"(",
... | true | 50 | [
"2",
"13",
"20",
"31",
"48",
"64",
"69",
"79",
"94",
"96",
"111",
"113",
"125",
"129",
"134",
"7",
"44",
"50",
"121"
] | 1 | VARIABLE_MISUSE | [
2,
13,
20,
31,
48,
64,
69,
79,
94,
96,
111,
113,
125,
129,
134
] | [
[
{
"before_index": 6,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 43,
"after_index": 44,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 61,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "y-a-r-g/idea-color-themes/backend/templatetags/__init__.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def resolve_string(string) :
localize = ((len (string) > 3) and (string [0 : 2] == '_(') and (string [(- 1)] == ')'))
if localize :
string = localize [2 : (- 1)]
if ((string [0] == string [(- 1)]) and (string [0] in ['"', "'"])) :
string = string [1 : (- 1)]
else :
string = string... | Yes |
855 | [
"#NEWLINE#",
"def train(",
"self",
",",
"corpus",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"convert_input",
"(",
"corpus",
",",
"infer",
"=",
"False",
")",
"#NEWLINE#",
"cmd",
"=",
"(",
"self",
".",
"mallet_path",
"+",
"' train-topics --input %s --num-top... | true | 46 | [
"4",
"13",
"2",
"9",
"23",
"36",
"42",
"50",
"54",
"60",
"66",
"72",
"76",
"104",
"108",
"20",
"30",
"33",
"46",
"91",
"97"
] | 1 | VARIABLE_MISUSE | [
2,
9,
23,
36,
42,
50,
54,
60,
66,
72,
76,
104,
108
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 26... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "largelymfs/topical_word_embeddings/TWE-1/gensim/models/ldamallet.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def train(self, corpus) :
self.convert_input (corpus, infer = False)
cmd = (self.mallet_path + ' train-topics --input %s --num-topics %s --optimize-interval %s --num-threads %s --output-state %s --output-doc-topics %s --output-topic-keys %s --num-iterations %s --inferencer-filename %s')
cmd = (cmd % (sel... | Yes |
856 | [
"#NEWLINE#",
"def __getitem__(",
"self",
",",
"bow",
",",
"iterations",
"=",
"100",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"is_corpus",
",",
"corpus",
")",
"=",
"utils",
".",
"is_corpus",
"(",
"bow",
")",
"#NEWLINE#",
"if",
"(",
"not",
"is_corpus",
")",
... | true | 65 | [
"2",
"41",
"55",
"69",
"78",
"85",
"147",
"109",
"122",
"135",
"4",
"23",
"34",
"37",
"45",
"65",
"52",
"62",
"105",
"113",
"140",
"160",
"164",
"14",
"21",
"29",
"162",
"16",
"6",
"94"
] | 1 | VARIABLE_MISUSE | [
52,
62,
105,
113
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "largelymfs/topical_word_embeddings/TWE-1/gensim/models/ldamallet.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __getitem__(self, bow, iterations = 100) :
(is_corpus, corpus) = utils.is_corpus (bow)
if (not is_corpus) :
bow = [bow]
self.convert_input (bow, infer = True)
cmd = (self.mallet_path + ' infer-topics --input %s --inferencer %s --output-doc-topics %s --num-iterations %s')
cmd = (bow % (... | Yes |
857 | [
"#NEWLINE#",
"def post(",
"self",
",",
"path",
",",
"data",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"#NEWLINE#",
"#UNINDENT#",
"}",
",",
"content_type",
"=",
"MULTIPART_CONTENT",
",",
"**extra",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Construct a POST request.'",
"#NEWLINE#... | true | 34 | [
"6",
"32",
"37",
"68",
"76",
"15",
"59",
"4",
"41",
"26",
"34",
"53",
"95",
"2",
"28",
"64",
"110",
"44",
"102",
"115",
"106"
] | 1 | VARIABLE_MISUSE | [
15,
59
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "AppScale/appscale/AppServer/lib/django-1.5/django/test/client.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def post(self, path, data = {
}, content_type = MULTIPART_CONTENT, **extra) :
'Construct a POST request.'
post_data = self._encode_data (data, post_data)
parsed = urlparse (path)
r = {
'CONTENT_LENGTH' : len (post_data),
'CONTENT_TYPE' : content_type,
'PATH_INFO' : s... | Yes |
858 | [
"#NEWLINE#",
"def lsh_instance(",
"bits",
",",
"dimensions",
",",
"hashtables",
",",
"storage_type",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\" Build an lsh instance using specified settings & storage method.\\n\\n Params:\\n bits: n bitlength of hash key\\n dimentions: n feat... | true | 89 | [
"4",
"150",
"2",
"89",
"148",
"8",
"17",
"53",
"24",
"60",
"96",
"128",
"158",
"6",
"154",
"144",
"162"
] | 1 | VARIABLE_MISUSE | [
8,
17,
53
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "brandonrobertz/SparseLSH/tests/test_bruteforce_e2e.py",
"license": "mit",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def lsh_instance(bits, dimensions, hashtables, storage_type) :
" Build an lsh instance using specified settings & storage method.
Params:
bits: n bitlength of hash key
dimentions: n features in each input point
hashtables: number of parallel hashtables to construct
storage_type... | Yes |
859 | [
"#NEWLINE#",
"def test_find_role(",
"app",
",",
"datastore",
")",
":",
"#NEWLINE#",
"#INDENT#",
"init_app_with_options",
"(",
"app",
",",
"datastore",
")",
"#NEWLINE#",
"role",
"=",
"datastore",
".",
"find_role",
"(",
"'admin'",
")",
"#NEWLINE#",
"assert",
"(",
... | true | 27 | [
"2",
"11",
"27",
"16",
"32",
"43",
"4",
"13",
"18",
"34"
] | 1 | VARIABLE_MISUSE | [
16,
32,
43
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 21... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mattupstate/flask-security/tests/test_datastore.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_find_role(app, datastore) :
init_app_with_options (app, datastore)
role = datastore.find_role ('admin')
assert (app is not None)
role = datastore.find_role ('bogus')
assert (role is None)
Is there a bug in the code above? | Yes |
860 | [
"#NEWLINE#",
"def __gt__(",
"self",
",",
"other",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"_cmp_err",
"(",
"self",
",",
"'>'",
")"
] | true | 13 | [
"4",
"2",
"9",
"13"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 10... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "schematics/schematics/schematics/undefined.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __gt__(self, other) :
self._cmp_err (self, '>')
Is there a bug in the code above? | Yes |
861 | [
"#NEWLINE#",
"def setup(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"data",
"=",
"dict",
"(",
"(",
"(",
"self",
",",
"dict",
"(",
"(",
"(",
"j",
",",
"float",
"(",
"j",
")",
")",
"for",
"j",
"in",
"range",
"(",
"100",
")",
")",
"... | true | 15 | [
"39",
"2",
"7",
"15",
"21",
"25",
"29"
] | 1 | VARIABLE_MISUSE | [
39
] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 11... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pydata/pandas/asv_bench/benchmarks/frame_ctor.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def setup(self) :
self.data = dict (((self, dict (((j, float (j)) for j in range (100)))) for i in xrange (2000)))
Is there a bug in the code above? | Yes |
862 | [
"#NEWLINE#",
"def test_example_run_pipeline(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"example",
"=",
"os",
".",
"path",
".",
"join",
"(",
"example_dir",
"(",
")",
",",
"'buyapple.py'",
")",
"#NEWLINE#",
"confs",
"=",
"[",
"'-f'",
",",
"example",
",",
"'... | true | 48 | [
"38",
"22",
"42",
"7",
"27",
"48",
"2"
] | 1 | VARIABLE_MISUSE | [
38
] | [
[
{
"before_index": 6,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 37,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "quantopian/zipline/tests/test_examples.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_example_run_pipeline(self) :
example = os.path.join (example_dir (), 'buyapple.py')
confs = ['-f', example, '--start', '2011-1-1', '--end', '2012-1-1']
parsed_args = parse_args (confs)
run_pipeline (** example)
Is there a bug in the code above? | Yes |
863 | [
"#NEWLINE#",
"def test_convert_iso_param_with_tz2(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"s",
"=",
"'2013-01-01T10:12:15.032'",
"#NEWLINE#",
"ret",
"=",
"convert_iso_stamp",
"(",
"s",
",",
"tz",
"=",
"'US/Eastern'",
")",
"#NEWLINE#",
"self",
".",
"assertEquals"... | true | 59 | [
"11",
"26",
"37",
"48",
"70",
"81",
"92",
"7",
"15",
"2",
"22",
"33",
"44",
"55",
"59",
"66",
"77",
"88"
] | 1 | VARIABLE_MISUSE | [
11,
26,
37,
48,
70,
81,
92
] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "tempodb/tempodb-python/tests/test_temp_validate.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_convert_iso_param_with_tz2(self) :
s = '2013-01-01T10:12:15.032'
ret = convert_iso_stamp (s, tz = 'US/Eastern')
self.assertEquals (ret.year, 2013)
self.assertEquals (ret.month, 1)
self.assertEquals (ret.day, 1)
self.assertEquals (self.hour, 10)
self.assertEquals (ret.minute, ... | Yes |
864 | [
"#NEWLINE#",
"def test_solve_quintics(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"skip",
"(",
"'This test is too slow'",
")",
"#NEWLINE#",
"f",
"=",
"(",
"(",
"(",
"(",
"(",
"x",
"**",
"5",
")",
"-",
"(",
"110",
"*",
"(",
"x",
"**",
"3",
")",
")",
")",
"-... | true | 59 | [
"71",
"93",
"135",
"157",
"55",
"59",
"67",
"119",
"131",
"65",
"79",
"129",
"143",
"11",
"73",
"99",
"123",
"137"
] | 1 | VARIABLE_MISUSE | [
11,
73,
99,
123,
137
] | [
[
{
"before_index": 5,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 51,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 54,
"after_index": 6... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sympy/sympy/sympy/solvers/tests/test_solveset.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_solve_quintics() :
skip ('This test is too slow')
f = (((((x ** 5) - (110 * (x ** 3))) - (55 * (x ** 2))) + (2310 * x)) + 979)
s = solveset_complex (s, x)
for root in s :
res = f.subs (x, root.n ()).n ()
assert tn (res, 0)
f = (((x ** 5) + (15 * x)) + 12)
s = solvese... | Yes |
865 | [
"#NEWLINE#",
"@",
"patch",
"(",
"'paasta_tools.cli.utils._run'",
",",
"autospec",
"=",
"True",
")",
"#NEWLINE#",
"def test_run_chronos_rerun(",
"mock_run",
")",
":",
"#NEWLINE#",
"#INDENT#",
"mock_run",
".",
"return_value",
"=",
"(",
"0",
",",
"'fake_output'",
")",
... | true | 67 | [
"31",
"12",
"17",
"52",
"69",
"27",
"56",
"67"
] | 1 | VARIABLE_MISUSE | [
31
] | [
[
{
"before_index": 16,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 29,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 30,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Yelp/paasta/tests/cli/test_utils.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ patch ('paasta_tools.cli.utils._run', autospec = True)
def test_run_chronos_rerun(mock_run) :
mock_run.return_value = (0, 'fake_output')
expected_command = 'ssh -A -n fake_master \'sudo chronos_rerun -v -v "a_service an_instance" "2016-04-08T02:37:27"\''
actual = utils.run_chronos_rerun ('fake_master'... | Yes |
866 | [
"#NEWLINE#",
"def test_raw_exception(",
"worker",
")",
":",
"#NEWLINE#",
"#INDENT#",
"p_queue",
"=",
"'testexception_raw'",
"#NEWLINE#",
"worker",
".",
"start",
"(",
"flags",
"=",
"'--greenlets 10 --config tests/fixtures/config-raw1.py'",
",",
"queues",
"=",
"p_queue",
")... | true | 404 | [
"24",
"34",
"76",
"116",
"235",
"248",
"281",
"368",
"395",
"72",
"127",
"172",
"257",
"295",
"2",
"11",
"26",
"57",
"135",
"144",
"161",
"319",
"328",
"7",
"21",
"47",
"61",
"104",
"209",
"356",
"404"
] | 1 | VARIABLE_MISUSE | [
72,
127,
172,
257,
295
] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pricingassistant/mrq/tests/test_raw.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_raw_exception(worker) :
p_queue = 'testexception_raw'
worker.start (flags = '--greenlets 10 --config tests/fixtures/config-raw1.py', queues = p_queue)
jobs_collection = worker.mongodb_jobs.mrq_jobs
assert (jobs_collection.count () == 0)
assert (Queue (p_queue).size () == 0)
worker... | Yes |
867 | [
"#NEWLINE#",
"def copy_certs_and_keys(",
"self",
",",
"cert_path",
",",
"key_path",
",",
"chain_path",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Copies certs and keys into the temporary directory'",
"#NEWLINE#",
"cert_and_key_dir",
"=",
"os",
".",
"path",
".",
"... | true | 140 | [
"17",
"41",
"51",
"63",
"85",
"112",
"140",
"6",
"94",
"104",
"123",
"131",
"142",
"4",
"72",
"2",
"25",
"77",
"96",
"55",
"74",
"138",
"8",
"100",
"121"
] | 1 | VARIABLE_MISUSE | [
77,
96
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "letsencrypt/letsencrypt/certbot-compatibility-test/certbot_compatibility_test/configurators/common.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def copy_certs_and_keys(self, cert_path, key_path, chain_path = None) :
'Copies certs and keys into the temporary directory'
cert_and_key_dir = os.path.join (self._temp_dir, 'certs_and_keys')
if (not os.path.isdir (cert_and_key_dir)) :
os.mkdir (cert_and_key_dir)
cert = os.path.join (cert_and_k... | Yes |
868 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"conn",
",",
"use_dict_cursor",
"=",
"False",
",",
"fetch_size",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Initializer.\\n\\n Args:\\n conn: A Connection object.\\n use_dict_cursor: Optional boolean to convert each row... | true | 23 | [
"6",
"35",
"10",
"41",
"4",
"2",
"19",
"23",
"25",
"31",
"37",
"43",
"49",
"55",
"61"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "AppScale/appscale/AppServer/google/storage/speckle/python/api/rdbms.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, conn, use_dict_cursor = False, fetch_size = None) :
'Initializer.
Args:
conn: A Connection object.
use_dict_cursor: Optional boolean to convert each row of results into a
dictionary. Defaults to False.
fetch_size: An integer, batch size to fetch the result set fr... | Yes |
869 | [
"#NEWLINE#",
"def execute(",
"self",
",",
"statement",
",",
"args",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"Prepares and executes a database operation (query or command).\\n\\n Args:\\n statement: A string, a SQL statement.\\n args: A sequence or mapping of argument... | true | 45 | [
"27",
"35",
"80",
"88",
"103",
"110",
"6",
"57",
"65",
"68",
"78",
"96",
"2",
"15",
"21",
"72",
"99",
"106",
"4",
"45",
"76",
"90",
"94",
"112"
] | 1 | VARIABLE_MISUSE | [
6,
57,
65,
68,
78,
96
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "AppScale/appscale/AppServer/google/storage/speckle/python/api/rdbms.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def execute(self, statement, args = None) :
"Prepares and executes a database operation (query or command).
Args:
statement: A string, a SQL statement.
args: A sequence or mapping of arguments matching the statement's bind
variables, if any.
Raises:
InterfaceError: Unknown type ... | Yes |
870 | [
"#NEWLINE#",
"def callproc(",
"self",
",",
"procname",
",",
"args",
"=",
"(",
")",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Calls a stored database procedure with the given name.\\n\\n Args:\\n procname: A string, the name of the stored procedure.\\n args: A sequence of paramete... | true | 76 | [
"4",
"54",
"6",
"65",
"80",
"118",
"76",
"97",
"127",
"125",
"136",
"148",
"152",
"114",
"133",
"161",
"2",
"16",
"22",
"72",
"99",
"106",
"144",
"28",
"36",
"46",
"82",
"103",
"110"
] | 1 | VARIABLE_MISUSE | [
28,
36,
46,
82,
103,
110
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "AppScale/appscale/AppServer/google/storage/speckle/python/api/rdbms.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def callproc(self, procname, args = ()) :
'Calls a stored database procedure with the given name.
Args:
procname: A string, the name of the stored procedure.
args: A sequence of parameters to use with the procedure.
Returns:
A modified copy of the given input args. Input parameters are ... | Yes |
871 | [
"#NEWLINE#",
"def delete(",
"self",
",",
"user",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Soft-delete all collected instances.\\n\\n '",
"#NEWLINE#",
"now",
"=",
"utcnow",
"(",
")",
"#NEWLINE#",
"for",
"(",
"model",
",",
"instances",
")",
... | true | 45 | [
"36",
"56",
"23",
"21",
"48",
"39",
"43",
"45",
"2",
"26",
"4",
"67",
"13",
"71"
] | 1 | VARIABLE_MISUSE | [
23
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mozilla/moztrap/moztrap/model/mtmodel.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def delete(self, user = None) :
'
Soft-delete all collected instances.
'
now = utcnow ()
for (model, instances) in self.data.iteritems () :
pk_list = [obj.pk for obj in obj]
model._base_manager.filter (pk__in = pk_list, deleted_on__isnull = True).update (deleted_by = us... | Yes |
872 | [
"#NEWLINE#",
"def forwards(",
"self",
",",
"orm",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Write your forwards methods here.'",
"#NEWLINE#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"role",
"=",
"orm",
"[",
"'auth.Group'",
"]",
".",
"objects",
".",
"get",
"(",
"name",
"... | true | 66 | [
"31",
"4",
"17",
"33",
"66",
"2",
"15",
"60"
] | 1 | VARIABLE_MISUSE | [
31
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 25,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mozilla/moztrap/moztrap/model/core/migrations/0005_add_manage_products_permission_for_test_managers.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def forwards(self, orm) :
'Write your forwards methods here.'
try :
role = orm ['auth.Group'].objects.get (name = 'Test Manager')
perm = orm ['auth.Permission'].objects.get (codename = 'manage_products')
except ObjectDoesNotExist :
pass
else :
role.permissions.add (orm)
... | Yes |
873 | [
"#NEWLINE#",
"def db_for_read(",
"self",
",",
"model",
",",
"**hints",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"model",
".",
"db_alias"
] | true | 12 | [
"4",
"12",
"2"
] | 1 | VARIABLE_MISUSE | [
2
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "BertrandBordage/django-tree/benchmark/router.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def db_for_read(self, model, **hints) :
return model.db_alias
Is there a bug in the code above? | Yes |
874 | [
"#NEWLINE#",
"def vetteChallengeResponse(",
"self",
",",
"romajiResponse",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Return True if the given response matches the current challenge, False\\n otherwise.\\n '",
"#NEWLINE#",
"hiragana",
"=",
"japanese",
".",
"romajiToH... | true | 43 | [
"4",
"19",
"2",
"37",
"43",
"11",
"31"
] | 1 | VARIABLE_MISUSE | [
11,
31
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 24,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "twisted/imaginary/ExampleGame/examplegame/mice.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def vetteChallengeResponse(self, romajiResponse) :
'
Return True if the given response matches the current challenge, False
otherwise.
'
hiragana = japanese.romajiToHiragana.get (romajiResponse.upper (), None)
return ((hiragana is not None) and (self.getCurrentChallenge () in self... | Yes |
875 | [
"#NEWLINE#",
"def evaluate(",
"self",
",",
"data",
",",
"view",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"from",
"glue",
"import",
"env",
"#NEWLINE#",
"references",
"=",
"scope",
".",
"_references",
"#NEWLINE#",
"cmd",
"=",
"_dereference",
"(",
"self",
... | true | 20 | [
"20",
"37",
"44",
"24",
"54",
"2",
"28",
"32",
"6",
"49",
"4",
"18"
] | 1 | VARIABLE_MISUSE | [
2,
28,
32
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "glue-viz/glue/glue/core/parse.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def evaluate(self, data, view = None) :
from glue import env
references = scope._references
cmd = _dereference (self._cmd, self._references)
scope = vars (env)
scope ['__view'] = view
return eval (cmd, vars (env), locals ())
Is there a bug in the code above? | Yes |
876 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"name",
"=",
"None",
",",
"tmp_prefix",
"=",
"'_tmp'",
")",
":",
"#NEWLINE#",
"#INDENT#",
"vtypes",
".",
"VeriloggenNode",
".",
"__init__",
"(",
"self",
")",
"#NEWLINE#",
"self",
".",
"name",
"=",
"(",
"name",
"if... | true | 32 | [
"8",
"164",
"166",
"2",
"21",
"24",
"32",
"37",
"44",
"54",
"64",
"74",
"84",
"94",
"104",
"111",
"118",
"125",
"135",
"145",
"155",
"162",
"168",
"174",
"4",
"26",
"29"
] | 1 | VARIABLE_MISUSE | [
4,
26,
29
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "PyHDI/veriloggen/veriloggen/core/module.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, name = None, tmp_prefix = '_tmp') :
vtypes.VeriloggenNode.__init__ (self)
self.name = (name if (self is not None) else self.__class__.__name__)
self.io_variable = collections.OrderedDict ()
self.variable = collections.OrderedDict ()
self.global_constant = collections.OrderedD... | Yes |
877 | [
"#NEWLINE#",
"def Instance(",
"self",
",",
"module",
",",
"instname",
",",
"params",
"=",
"None",
",",
"ports",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"isinstance",
"(",
"ports",
",",
"str",
")",
":",
"#NEWLINE#",
"#INDENT#",
"module",
"=",
... | true | 22 | [
"101",
"121",
"129",
"195",
"6",
"79",
"96",
"107",
"118",
"8",
"109",
"4",
"29",
"33",
"42",
"64",
"105",
"138",
"154",
"159",
"170",
"186",
"191",
"2",
"75",
"114",
"123",
"134",
"150",
"182",
"12",
"22",
"111"
] | 1 | VARIABLE_MISUSE | [
4,
29,
33,
42,
64,
105,
138,
154,
159,
170,
186,
191
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 37,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "PyHDI/veriloggen/veriloggen/core/module.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def Instance(self, module, instname, params = None, ports = None) :
if isinstance (ports, str) :
module = StubModule (module)
if (not isinstance (module, (Module, StubModule, str))) :
raise TypeError (('"module" of Instance must be Module, StubModule, or str, not %s' % type (module)))
if (not i... | Yes |
878 | [
"#NEWLINE#",
"def show_quick_panel(",
"self",
",",
"items",
",",
"on_done",
",",
"on_highlighted",
",",
"selected_index",
"=",
"(",
"-",
"1",
")",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"view",
".",
"window",
"(",
")",
".",
"show_quick_panel",
"(",
... | true | 40 | [
"6",
"32",
"8",
"2",
"20",
"40",
"10",
"38",
"4",
"30"
] | 1 | VARIABLE_MISUSE | [
8
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 31,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "NicoSantangelo/sublime-text-i18n-rails/base_command.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def show_quick_panel(self, items, on_done, on_highlighted, selected_index = (- 1)) :
self.view.window ().show_quick_panel (items, on_done, sublime.MONOSPACE_FONT, selected_index, self)
Is there a bug in the code above? | Yes |
879 | [
"#NEWLINE#",
"def test_proxy_inheritance(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"obj",
"=",
"CharFieldDefinition",
".",
"objects",
".",
"create",
"(",
"name",
"=",
"'caca'",
",",
"max_length",
"=",
"25",
",",
"model_def",
"=",
"self",
".",
"model_def",
... | true | 52 | [
"30",
"55",
"65",
"7",
"50",
"52",
"2",
"25",
"32",
"46",
"57"
] | 1 | VARIABLE_MISUSE | [
30
] | [
[
{
"before_index": 6,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 29,
"after_index": 43,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 45,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "charettes/django-mutant/tests/test_field_defs.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_proxy_inheritance(self) :
obj = CharFieldDefinition.objects.create (name = 'caca', max_length = 25, model_def = self.model_def)
save_obj = self.model_def.fielddefinitions.select_subclasses ().get ()
self.assertEqual (obj, obj)
Model = self.model_def.model_class ()
Model.objects.create ... | Yes |
880 | [
"#NEWLINE#",
"def buildAttributes(",
"self",
",",
"node",
",",
"attrs",
",",
"already_processed",
")",
":",
"#NEWLINE#",
"#INDENT#",
"value",
"=",
"find_attr_value_",
"(",
"'datatype'",
",",
"node",
")",
"#NEWLINE#",
"if",
"(",
"value",
"is not",
"None",
")",
... | true | 49 | [
"6",
"8",
"51",
"13",
"24",
"35",
"2",
"31",
"42",
"49",
"4",
"19",
"47"
] | 1 | VARIABLE_MISUSE | [
6
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CybOXProject/python-cybox/cybox/bindings/win_system_restore_object.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def buildAttributes(self, node, attrs, already_processed) :
value = find_attr_value_ ('datatype', node)
if (value is not None) :
self.datatype = value
super (ChangeLogEntryTypeType, self).buildAttributes (node, self, already_processed)
Is there a bug in the code above? | Yes |
881 | [
"#NEWLINE#",
"def __getitem__(",
"self",
",",
"k",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"self",
"in",
"self",
".",
"_values",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"self",
".",
"__dict__",
"[",
"k",
"]",
"#NEWLINE#",
"#UNINDENT#",
"else",
"... | true | 11 | [
"2",
"11",
"13",
"21",
"4",
"25",
"36"
] | 1 | VARIABLE_MISUSE | [
4,
25,
36
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 11... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "EasyPost/easypost-python/easypost/__init__.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __getitem__(self, k) :
if (self in self._values) :
return self.__dict__ [k]
else :
raise KeyError (k)
Is there a bug in the code above? | Yes |
882 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"relation_name",
",",
"panels",
"=",
"None",
",",
"label",
"=",
"''",
",",
"help_text",
"=",
"''",
",",
"min_num",
"=",
"None",
",",
"max_num",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"relat... | true | 51 | [
"6",
"37",
"39",
"51",
"4",
"31",
"33",
"22",
"61",
"63",
"18",
"55",
"57",
"2",
"29",
"35",
"41",
"47",
"53",
"59",
"14",
"49",
"10",
"43",
"45"
] | 1 | VARIABLE_MISUSE | [
14,
49
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": 33,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 34,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "torchbox/wagtail/wagtail/wagtailadmin/edit_handlers.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, relation_name, panels = None, label = '', help_text = '', min_num = None, max_num = None) :
self.relation_name = relation_name
self.panels = panels
self.label = label
self.help_text = panels
self.min_num = min_num
self.max_num = max_num
Is there a bug in the code above... | Yes |
883 | [
"#NEWLINE#",
"@",
"pytest",
".",
"mark",
".",
"parametrize",
"(",
"'response,error,dead,reassign'",
",",
"[",
"(",
"OffsetFetchResponse",
"[",
"0",
"]",
"(",
"[",
"(",
"'foobar'",
",",
"[",
"(",
"0",
",",
"123",
",",
"b''",
",",
"14",
")",
",",
"(",
... | true | 308 | [
"286",
"370",
"291",
"301",
"308",
"318",
"331",
"339",
"280",
"303",
"276",
"297",
"349",
"364",
"278",
"343",
"284",
"356",
"282",
"322"
] | 1 | VARIABLE_MISUSE | [
282,
322
] | [
[
{
"before_index": 1,
"after_index": 277,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 290,
"after_index": 294,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 296,
"after_inde... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dpkp/kafka-python/test/test_coordinator.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ pytest.mark.parametrize ('response,error,dead,reassign', [(OffsetFetchResponse [0] ([('foobar', [(0, 123, b'', 14), (1, 234, b'', 14)])]), Errors.GroupLoadInProgressError, False, False), (OffsetFetchResponse [0] ([('foobar', [(0, 123, b'', 16), (1, 234, b'', 16)])]), Errors.NotCoordinatorForGroupError, True, False), ... | Yes |
884 | [
"#NEWLINE#",
"def fetchAllSources(",
"self",
",",
"refreshFilter",
"=",
"None",
",",
"skipFilter",
"=",
"None",
",",
"withEphemeral",
"=",
"True",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n returns a list of file locations for all the sources in\\n the package recip... | true | 75 | [
"8",
"105",
"107",
"51",
"53",
"87",
"182",
"194",
"204",
"129",
"141",
"170",
"186",
"198",
"2",
"22",
"36",
"55",
"81",
"95",
"34",
"59",
"12",
"157",
"4",
"135",
"28",
"46",
"75",
"93",
"115",
"131",
"151"
] | 1 | VARIABLE_MISUSE | [
28,
46
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sassoftware/conary/conary/build/recipe.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def fetchAllSources(self, refreshFilter = None, skipFilter = None, withEphemeral = True) :
'
returns a list of file locations for all the sources in
the package recipe
'
if self.pathConflicts :
errlist = []
for basepath in self.pathConflicts.keys () :
err... | Yes |
885 | [
"#NEWLINE#",
"def single_column_table(",
"column",
",",
"align",
"=",
"None",
",",
"style",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"table",
"=",
"'<table'",
"#NEWLINE#",
"if",
"(",
"align",
"is not",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"table",... | true | 33 | [
"15",
"28",
"46",
"55",
"66",
"78",
"83",
"4",
"21",
"60",
"73",
"2",
"33",
"62",
"8",
"39",
"51"
] | 1 | VARIABLE_MISUSE | [
4,
21
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pydata/pandas/pandas/formats/format.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def single_column_table(column, align = None, style = None) :
table = '<table'
if (align is not None) :
table += (' align="%s"' % column)
if (style is not None) :
table += (' style="%s"' % style)
table += '><tbody>'
for i in column :
table += ('<tr><td>%s</td></tr>' % str (i)... | Yes |
886 | [
"#NEWLINE#",
"def test_product_which_doesnt_track_stock(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"product_class",
"=",
"models",
".",
"ProductClass",
".",
"objects",
".",
"create",
"(",
"name",
"=",
"'Digital'",
",",
"track_stock",
"=",
"False",
")",
"#NEWLINE#... | true | 56 | [
"48",
"63",
"7",
"32",
"34",
"26",
"2",
"50",
"56",
"59"
] | 1 | VARIABLE_MISUSE | [
26
] | [
[
{
"before_index": 6,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": 35,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 47,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "django-oscar/django-oscar/tests/integration/partner/strategy_tests.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_product_which_doesnt_track_stock(self) :
product_class = models.ProductClass.objects.create (name = 'Digital', track_stock = False)
product = factories.create_product (product_class = product_class, price = D ('1.99'), num_in_stock = None)
info = self.strategy.fetch_for_product (self)
self.... | Yes |
887 | [
"#NEWLINE#",
"@",
"contextmanager",
"#NEWLINE#",
"def extra_context(",
"self",
",",
"connection",
",",
"channel",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"send_online",
"(",
")",
"#NEWLINE#",
"self",
".",
"wakeup",
"(",
")",
"#NEWLINE#",
"sleep",
"(",
... | true | 47 | [
"7",
"47",
"9",
"5",
"14",
"20",
"32",
"38",
"51",
"56",
"68"
] | 1 | VARIABLE_MISUSE | [
5,
14,
20,
32,
38,
51,
56,
68
] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "celery/cell/cell/presence.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ contextmanager
def extra_context(self, connection, channel) :
self.send_online ()
self.wakeup ()
sleep (1.0)
if self.on_awake :
self.on_awake ()
timer (connection.interval, self.send_heartbeat)
self.agent.on_presence_ready ()
(yield)
self.send_offline ()
Is there a bug ... | Yes |
888 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"account",
"=",
"None",
",",
"name",
"=",
"None",
",",
"region",
"=",
"None",
",",
"config",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"#NEWLINE#",
"#UNINDENT#",
"}",
")",
":",
"#NEWLINE#",
"#INDENT#",
"super",
"(",
"IAM... | true | 57 | [
"12",
"43",
"45",
"57",
"8",
"51",
"53",
"16",
"2",
"32",
"4",
"47",
"49"
] | 1 | VARIABLE_MISUSE | [
16
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 27,
"after_index": 42,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 42,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Netflix/security_monkey/security_monkey/watchers/iam/iam_ssl.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, account = None, name = None, region = None, config = {
}) :
super (IAMSSLItem, self).__init__ (index = IAMSSL.index, region = region, account = account, name = name, new_config = region)
Is there a bug in the code above? | Yes |
889 | [
"#NEWLINE#",
"@",
"mock",
".",
"patch",
"(",
"'nova.utils.get_image_from_system_metadata'",
")",
"#NEWLINE#",
"def test_unshelve_volume_backed(",
"self",
",",
"mock_image_meta",
")",
":",
"#NEWLINE#",
"#INDENT#",
"instance",
"=",
"self",
".",
"_create_fake_instance_obj",
... | true | 567 | [
"17",
"53",
"61",
"184",
"222",
"232",
"261",
"274",
"283",
"292",
"301",
"310",
"320",
"349",
"364",
"394",
"413",
"428",
"452",
"492",
"510",
"530",
"555",
"40",
"561",
"563",
"535",
"539",
"25",
"565",
"12",
"89",
"543",
"31",
"47",
"415",
"... | 1 | VARIABLE_MISUSE | [
25,
565
] | [
[
{
"before_index": 1,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/compute/test_shelve.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ mock.patch ('nova.utils.get_image_from_system_metadata')
def test_unshelve_volume_backed(self, mock_image_meta) :
instance = self._create_fake_instance_obj ()
node = test_compute.NODENAME
limits = {
}
filter_properties = {
'limits' : limits,
}
instance.task_state = task_s... | Yes |
890 | [
"#NEWLINE#",
"def _append_nonsingleton_leaf_node(",
"Z",
",",
"p",
",",
"n",
",",
"level",
",",
"lvs",
",",
"ivl",
",",
"leaf_label_func",
",",
"i",
",",
"labels",
",",
"show_leaf_counts",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"lvs",
"is not",
"None"... | true | 47 | [
"14",
"55",
"63",
"8",
"6",
"100",
"4",
"10",
"27",
"34",
"12",
"59",
"82",
"119",
"2",
"47",
"94",
"20",
"78",
"18",
"16",
"40",
"67",
"98"
] | 1 | VARIABLE_MISUSE | [
12,
59,
82,
119
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": 28,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 45,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "scipy/scipy/scipy/cluster/hierarchy.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def _append_nonsingleton_leaf_node(Z, p, n, level, lvs, ivl, leaf_label_func, i, labels, show_leaf_counts) :
if (lvs is not None) :
lvs.append (int (i))
if (Z is not None) :
if leaf_label_func :
ivl.append (leaf_label_func (int (i)))
else :
if show_leaf_counts :
... | Yes |
891 | [
"#NEWLINE#",
"def __ne__(",
"self",
",",
"other",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"(",
"self",
".",
"bar",
"!=",
"self",
".",
"bar",
")"
] | true | 15 | [
"4",
"2",
"11",
"15"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 12... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "jaimegildesagredo/expects/specs/matchers/built_in/equal_spec.py",
"license": "apache-2.0",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __ne__(self, other) :
return (self.bar != self.bar)
Is there a bug in the code above? | Yes |
892 | [
"#NEWLINE#",
"def __getslice__(",
"self",
",",
"i",
",",
"j",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"\\n Get a slice from :attr:`i` to :attr:`j`.\\n\\n Doesn't get called in Python 3, :meth:`__getitem__` is called instead\\n \"",
"#NEWLINE#",
"obj",
"=",
"super",
... | true | 45 | [
"2",
"19",
"33",
"45",
"6",
"26",
"41",
"4",
"24",
"39",
"13",
"29"
] | 1 | VARIABLE_MISUSE | [
13,
29
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "NeuralEnsemble/python-neo/neo/core/irregularlysampledsignal.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __getslice__(self, i, j) :
"
Get a slice from :attr:`i` to :attr:`j`.
Doesn't get called in Python 3, :meth:`__getitem__` is called instead
"
obj = super (IrregularlySampledSignal, self).__getslice__ (i, j)
obj.times = self.times.__getslice__ (i, j)
return self
Is ther... | Yes |
893 | [
"#NEWLINE#",
"def createMultiChannelListener(",
"self",
",",
"callbackScheduler",
",",
"ports",
",",
"address",
")",
":",
"#NEWLINE#",
"#INDENT#",
"def makeChannelListener(",
"cbScheduler",
",",
"port",
",",
"portScanIncrement",
"=",
"0",
")",
":",
"#NEWLINE#",
"#INDE... | false | 0 | [
"2",
"26",
"self",
"4",
"43",
"callbackScheduler",
"6",
"45",
"ports",
"8",
"32",
"address",
"47",
"makeChannelListener"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 38,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ufora/ufora/ufora/test/InMemoryCluster.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def createMultiChannelListener(self, callbackScheduler, ports, address) :
def makeChannelListener(cbScheduler, port, portScanIncrement = 0) :
return self.createChannelListener (cbScheduler, address, port)
return MultiChannelListener.MultiChannelListener (callbackScheduler, ports, makeChannelListener)
I... | No |
894 | [
"#NEWLINE#",
"def execute(",
"self",
",",
"request",
"=",
"''",
",",
"root",
"=",
"None",
",",
"args",
"=",
"None",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"kwargs",
"=",
"dict",
"(",
"kwargs",
",",
"request",
"=",
"request",
",",
"root",
"... | false | 0 | [
"57",
"69",
"execute_kwargs",
"8",
"31",
"33",
"root",
"2",
"41",
"47",
"62",
"self",
"4",
"27",
"29",
"request",
"12",
"35",
"37",
"args",
"21",
"25",
"54",
"kwargs"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 26,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "graphql-python/graphene/graphene/core/schema.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def execute(self, request = '', root = None, args = None, **kwargs) :
kwargs = dict (kwargs, request = request, root = root, args = args, schema = self.schema)
with self.plugins.context_execution (** kwargs) as execute_kwargs :
return self.executor.execute (** execute_kwargs)
Is there a bug in the ... | No |
895 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"config",
",",
"path",
"=",
"None",
",",
"bbb_config",
"=",
"False",
",",
"plugins",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"ConfigSection",
".",
"__init__",
"(",
"self",
")",
"#NEWLINE#",
"self",
".",
"c... | false | 0 | [
"99",
"112",
"142",
"153",
"plugin",
"14",
"91",
"101",
"plugins",
"2",
"25",
"28",
"72",
"78",
"130",
"147",
"158",
"self",
"110",
"134",
"massager",
"4",
"30",
"32",
"47",
"67",
"config",
"6",
"36",
"59",
"63",
"74",
"76",
"path",
"10",
"bbb_co... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 27,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ployground/ploy/ploy/config.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, config, path = None, bbb_config = False, plugins = None) :
ConfigSection.__init__ (self)
self.config = config
if (path is None) :
if (getattr (config, 'read', None) is None) :
path = os.path.dirname (config)
self.path = path
self.macro_cleaners = {
... | No |
896 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"label",
"=",
"None",
",",
"validators",
"=",
"None",
",",
"save_as_list",
"=",
"False",
",",
"coerce",
"=",
"text_type",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Initialization\\n\\n :param save_as_list... | false | 0 | [
"16",
"35",
"37",
"coerce",
"8",
"50",
"validators",
"53",
"kwargs",
"2",
"27",
"33",
"43",
"self",
"12",
"29",
"31",
"save_as_list",
"4",
"48",
"label"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "flask-admin/flask-admin/flask_admin/form/fields.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, label = None, validators = None, save_as_list = False, coerce = text_type, **kwargs) :
'Initialization
:param save_as_list:
If `True` then populate ``obj`` using list else string
'
self.save_as_list = save_as_list
self.coerce = coerce
super (Select2Tag... | No |
897 | [
"#NEWLINE#",
"def test_binary_ops(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"binary_ops",
"=",
"[",
"eq",
",",
"ge",
",",
"gt",
",",
"le",
",",
"lt",
",",
"ne",
",",
"sub",
",",
"and_",
",",
"or_",
",",
"xor",
"]",
"#NEWLINE#",
"try",
":",
"#NEWL... | false | 0 | [
"52",
"62",
"73",
"86",
"94",
"105",
"118",
"126",
"137",
"150",
"op",
"7",
"35",
"54",
"binary_ops",
"2",
"58",
"64",
"68",
"75",
"79",
"90",
"96",
"100",
"107",
"111",
"122",
"128",
"132",
"139",
"143",
"155",
"162",
"168",
"175",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 51,
"after_index": 52,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 51,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "awslabs/lambda-apigateway-twilio-tutorial/pytz/tests/test_lazy.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_binary_ops(self) :
binary_ops = [eq, ge, gt, le, lt, ne, sub, and_, or_, xor]
try :
binary_ops.append (cmp)
except NameError :
pass
for op in binary_ops :
self.assertEqual (op (self.lazy, self.lazy), op (self.base, self.base), str (op))
self.assertEqual (op (self... | No |
898 | [
"#NEWLINE#",
"def read(",
"self",
",",
"iprot",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"(",
"iprot",
".",
"__class__",
"==",
"TBinaryProtocol",
".",
"TBinaryProtocolAccelerated",
")",
"and",
"isinstance",
"(",
"iprot",
".",
"trans",
",",
"TTransport",
"... | false | 0 | [
"87",
"100",
"123",
"151",
"164",
"ftype",
"2",
"33",
"53",
"60",
"64",
"132",
"self",
"85",
"fname",
"89",
"114",
"fid",
"4",
"12",
"23",
"55",
"73",
"92",
"136",
"147",
"160",
"168",
"175",
"iprot"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 72,
"after_index": 76... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudera/impyla/impala/_thrift_gen/fb303/FacebookService.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def read(self, iprot) :
if ((iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated) and isinstance (iprot.trans, TTransport.CReadableTransport) and (self.thrift_spec is not None) and (fastbinary is not None)) :
fastbinary.decode_binary (self, iprot.trans, (self.__class__, self.thrift_spec))
... | No |
899 | [
"#NEWLINE#",
"def read(",
"self",
",",
"iprot",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"(",
"iprot",
".",
"__class__",
"==",
"TBinaryProtocol",
".",
"TBinaryProtocolAccelerated",
")",
"and",
"isinstance",
"(",
"iprot",
".",
"trans",
",",
"TTransport",
"... | false | 0 | [
"87",
"100",
"120",
"ftype",
"2",
"33",
"53",
"60",
"64",
"self",
"85",
"fname",
"89",
"fid",
"4",
"12",
"23",
"55",
"73",
"92",
"116",
"124",
"131",
"iprot"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 72,
"after_index": 76... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudera/impyla/impala/_thrift_gen/fb303/FacebookService.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def read(self, iprot) :
if ((iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated) and isinstance (iprot.trans, TTransport.CReadableTransport) and (self.thrift_spec is not None) and (fastbinary is not None)) :
fastbinary.decode_binary (self, iprot.trans, (self.__class__, self.thrift_spec))
... | No |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.