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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
400 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"expected_tests",
",",
"directive",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"_expected_tests",
"=",
"expected_tests",
"#NEWLINE#",
"self",
".",
"directive",
"=",
"expected_tests"
] | true | 23 | [
"6",
"21",
"4",
"17",
"23",
"2",
"13",
"19"
] | 1 | VARIABLE_MISUSE | [
6,
21
] | [
[
{
"before_index": 1,
"after_index": 3,
"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": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mblayman/tappy/tap/line.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 __init__(self, expected_tests, directive = None) :
self._expected_tests = expected_tests
self.directive = expected_tests
Is there a bug in the code above? | Yes |
401 | [
"#NEWLINE#",
"def __set_regnum__(",
"self",
",",
"v",
")",
":",
"#NEWLINE#",
"#INDENT#",
"_idaapi",
".",
"switch_info_ex_t_set_regnum",
"(",
"v",
",",
"v",
")"
] | true | 13 | [
"2",
"4",
"13",
"15"
] | 1 | VARIABLE_MISUSE | [
2
] | [
[
{
"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": "EiNSTeiN-/idapython/pywraps/py_nalt.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_regnum__(self, v) :
_idaapi.switch_info_ex_t_set_regnum (v, v)
Is there a bug in the code above? | Yes |
402 | [
"#NEWLINE#",
"def render(",
"self",
",",
"context",
")",
":",
"#NEWLINE#",
"#INDENT#",
"indent_level",
"=",
"self",
".",
"indent_level",
".",
"resolve",
"(",
"context",
")",
"#NEWLINE#",
"if",
"self",
".",
"if_statement",
":",
"#NEWLINE#",
"#INDENT#",
"try",
"... | true | 89 | [
"23",
"31",
"37",
"53",
"63",
"80",
"4",
"17",
"41",
"76",
"84",
"95",
"97",
"9",
"13",
"68",
"89",
"92",
"101",
"112",
"2",
"11",
"21",
"35",
"70"
] | 1 | VARIABLE_MISUSE | [
9,
13
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 22... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudera/hue/desktop/core/ext-py/django-extensions-1.5.0/django_extensions/templatetags/indent_text.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 render(self, context) :
indent_level = self.indent_level.resolve (context)
if self.if_statement :
try :
if_statement = bool (self.if_statement.resolve (context))
except template.VariableDoesNotExist :
if_statement = False
else :
if_statement = True
output = s... | Yes |
403 | [
"#NEWLINE#",
"def on_channel_open(",
"self",
",",
"callback",
",",
"channel",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"channel",
"=",
"channel",
"#NEWLINE#",
"if",
"channel",
":",
"#NEWLINE#",
"#INDENT#",
"callback",
"(",
")"
] | true | 18 | [
"6",
"13",
"15",
"18",
"2",
"11",
"4",
"22"
] | 1 | VARIABLE_MISUSE | [
4,
22
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mher/tornado-celery/tcelery/connection.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_channel_open(self, callback, channel) :
self.channel = channel
if channel :
callback ()
Is there a bug in the code above? | Yes |
404 | [
"#NEWLINE#",
"def test_figure_out_clusters_to_inspect_respects_the_user(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"fake_args",
"=",
"mock",
".",
"Mock",
"(",
")",
"#NEWLINE#",
"fake_args",
".",
"clusters",
"=",
"'a,b,c'",
"#NEWLINE#",
"fake_all_clusters",
"=",
"[",
"'a'",
... | true | 48 | [
"6",
"14",
"46",
"48",
"20"
] | 1 | VARIABLE_MISUSE | [
20
] | [
[
{
"before_index": 5,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Yelp/paasta/tests/cli/test_cmds_metastatus.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_figure_out_clusters_to_inspect_respects_the_user() :
fake_args = mock.Mock ()
fake_args.clusters = 'a,b,c'
fake_all_clusters = ['a', 'b', 'c', 'd']
assert (['a', 'b', 'c'] == metastatus.figure_out_clusters_to_inspect (fake_args, fake_args))
Is there a bug in the code above? | Yes |
405 | [
"#NEWLINE#",
"@",
"mock",
".",
"patch",
"(",
"'ironic_python_agent.hardware.dispatch_to_managers'",
",",
"autospec",
"=",
"True",
")",
"#NEWLINE#",
"@",
"mock",
".",
"patch",
"(",
"'ironic_python_agent.extensions.standby._write_image'",
",",
"autospec",
"=",
"True",
")"... | true | 177 | [
"42",
"61",
"99",
"40",
"55",
"92",
"44",
"67",
"108",
"38",
"75",
"115",
"124",
"131",
"142",
"173",
"49",
"81",
"83",
"96",
"103",
"119",
"165",
"159",
"73",
"86",
"137",
"149",
"177",
"179"
] | 1 | VARIABLE_MISUSE | [
159
] | [
[
{
"before_index": 1,
"after_index": 39,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 48,
"after_index": 52,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 54,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/ironic-python-agent/ironic_python_agent/tests/unit/extensions/test_standby.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 ('ironic_python_agent.hardware.dispatch_to_managers', autospec = True)
@ mock.patch ('ironic_python_agent.extensions.standby._write_image', autospec = True)
@ mock.patch ('ironic_python_agent.extensions.standby._download_image', autospec = True)
def test_cache_image(self, download_mock, write_mock, disp... | Yes |
406 | [
"#NEWLINE#",
"def info_datastore(",
"self",
",",
"datastore_name",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n List information about a datastore. Content may vary based\\n on datastore type.\\n '",
"#NEWLINE#",
"(",
"ds",
",",
"datastore_name",
")",... | true | 35 | [
"14",
"28",
"26",
"30",
"2",
"19",
"4",
"16",
"23",
"35"
] | 1 | VARIABLE_MISUSE | [
26,
30
] | [
[
{
"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": "ooici/pyon/pyon/datastore/couchdb/base_store.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 info_datastore(self, datastore_name = None) :
'
List information about a datastore. Content may vary based
on datastore type.
'
(ds, datastore_name) = self._get_datastore (datastore_name)
info = ds.info ()
return datastore_name
Is there a bug in the code above? | Yes |
407 | [
"#NEWLINE#",
"def get_show(",
"self",
",",
"imdb",
",",
"tvdb",
",",
"tvshowtitle",
",",
"year",
")",
":",
"#NEWLINE#",
"#INDENT#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"result",
"=",
"cache",
".",
"get",
"(",
"self",
".",
"dizigold_shows",
",",
"72",
")",... | true | 54 | [
"6",
"10",
"70",
"92",
"97",
"103",
"106",
"108",
"116",
"8",
"32",
"38",
"19",
"41",
"51",
"81",
"94",
"4",
"44",
"49",
"56",
"2",
"25",
"54"
] | 1 | VARIABLE_MISUSE | [
8,
32,
38
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 28,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 31,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mrknow/filmkodi/plugin.video.specto/resources/lib/sources/dizigoldv2_tv.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 get_show(self, imdb, tvdb, tvshowtitle, year) :
try :
result = cache.get (self.dizigold_shows, 72)
tvshowtitle = cleantitle.tv (tvshowtitle)
result = [i [0] for i in result if (self == i [1])] [0]
try :
url = re.compile ('//.+?(/.+)').findall (result) [0]
excep... | Yes |
408 | [
"#NEWLINE#",
"def test_assembles_9c_65c02(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"mpu",
"=",
"MPU65C02",
"(",
")",
"#NEWLINE#",
"self",
".",
"assertEqual",
"(",
"[",
"156",
",",
"52",
",",
"18",
"]",
",",
"self",
".",
"assemble",
"(",
"'STZ $1234'",
... | true | 33 | [
"7",
"2",
"13",
"25",
"33"
] | 1 | VARIABLE_MISUSE | [
7
] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mnaberez/py65/py65/tests/test_assembler.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_assembles_9c_65c02(self) :
mpu = MPU65C02 ()
self.assertEqual ([156, 52, 18], self.assemble ('STZ $1234', 0, self))
Is there a bug in the code above? | Yes |
409 | [
"#NEWLINE#",
"def test_numa_topology_filter_pass(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"instance_topology",
"=",
"objects",
".",
"InstanceNUMATopology",
"(",
"cells",
"=",
"[",
"objects",
".",
"InstanceNUMACell",
"(",
"id",
"=",
"0",
",",
"cpuset",
"=",
"s... | true | 70 | [
"62",
"124",
"7",
"73",
"122",
"2",
"64",
"70",
"112",
"116"
] | 1 | VARIABLE_MISUSE | [
7
] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 61,
"after_index": 67,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 72,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/scheduler/filters/test_numa_topology_filters.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 test_numa_topology_filter_pass(self) :
instance_topology = objects.InstanceNUMATopology (cells = [objects.InstanceNUMACell (id = 0, cpuset = set ([1]), memory = 512), objects.InstanceNUMACell (id = 1, cpuset = set ([3]), memory = 512)])
spec_obj = self._get_spec_obj (numa_topology = self)
host = fake... | Yes |
410 | [
"#NEWLINE#",
"def unregister_topic(",
"self",
",",
"topic",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"pub_sub",
".",
"unsubscribe",
"(",
"self",
")"
] | true | 15 | [
"4",
"2",
"9",
"15"
] | 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": 12... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/dragonflow/dragonflow/db/pubsub_drivers/redis_db_pubsub_driver.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 unregister_topic(self, topic) :
self.pub_sub.unsubscribe (self)
Is there a bug in the code above? | Yes |
411 | [
"#NEWLINE#",
"def test_init(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"tagger",
"=",
"PerceptronTagger",
"(",
"load",
"=",
"False",
")",
"#NEWLINE#",
"assert_true",
"(",
"isinstance",
"(",
"self",
",",
"BaseTagger",
")",
")"
] | true | 20 | [
"7",
"2",
"20"
] | 1 | VARIABLE_MISUSE | [
7
] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sloria/textblob-aptagger/tests/test_taggers.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_init(self) :
tagger = PerceptronTagger (load = False)
assert_true (isinstance (self, BaseTagger))
Is there a bug in the code above? | Yes |
412 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"max_size",
"=",
"None",
",",
"check_modified_time",
"=",
"False",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"max_size",
"=",
"max_size",
"#NEWLINE#",
"self",
".",
"check_modified_time",
"=",
"self",
"#NEWLINE#",
... | true | 25 | [
"2",
"15",
"21",
"25",
"27",
"38",
"45",
"8",
"23",
"4",
"17",
"19"
] | 1 | VARIABLE_MISUSE | [
8,
23
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "limodou/uliweb/uliweb/core/template.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 __init__(self, max_size = None, check_modified_time = False) :
self.max_size = max_size
self.check_modified_time = self
self.__values = {
}
self.__access_keys = []
self.__modified_times = {
}
Is there a bug in the code above? | Yes |
413 | [
"#NEWLINE#",
"def generate(",
"self",
",",
"writer",
",",
"has_links",
")",
":",
"#NEWLINE#",
"#INDENT#",
"writer",
".",
"write_line",
"(",
"'def _tt_execute():'",
",",
"self",
".",
"line",
")",
"#NEWLINE#",
"with",
"writer",
".",
"indent",
"(",
")",
":",
"#... | true | 196 | [
"6",
"164",
"196",
"322",
"2",
"17",
"37",
"48",
"59",
"70",
"81",
"92",
"103",
"114",
"125",
"136",
"147",
"158",
"174",
"185",
"207",
"218",
"229",
"240",
"251",
"262",
"273",
"284",
"295",
"306",
"312",
"332",
"348",
"4",
"11",
"23",
"31",
... | 1 | VARIABLE_MISUSE | [
2,
17,
37,
48,
59,
70,
81,
92,
103,
114,
125,
136,
147,
158,
174,
185,
207,
218,
229,
240,
251,
262,
273,
284,
295,
306,
312,
332,
348
] | [
[
{
"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": 16,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "limodou/uliweb/uliweb/core/template.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 generate(self, writer, has_links) :
writer.write_line ('def _tt_execute():', self.line)
with writer.indent () :
writer.write_line ('_tt_buffer = []', self.line)
writer.write_line ('_tt_append = _tt_buffer.append', self.line)
writer.write_line ('def _tt_write(t, escape=True):', s... | Yes |
414 | [
"#NEWLINE#",
"def testUUIDFieldCreate(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"j",
"=",
"TestModel_field",
".",
"objects",
".",
"create",
"(",
"a",
"=",
"6",
",",
"uuid_field",
"=",
"'550e8400-e29b-41d4-a716-446655440000'",
")",
"#NEWLINE#",
"self",
".",
"as... | true | 28 | [
"7",
"2",
"24",
"28"
] | 1 | VARIABLE_MISUSE | [
7
] | [
[
{
"before_index": 6,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 31,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mozilla/inventory/vendor-local/src/django-extensions/build/lib/django_extensions/tests/uuid_field.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 testUUIDFieldCreate(self) :
j = TestModel_field.objects.create (a = 6, uuid_field = '550e8400-e29b-41d4-a716-446655440000')
self.assertEquals (self.uuid_field, '550e8400-e29b-41d4-a716-446655440000')
Is there a bug in the code above? | Yes |
415 | [
"#NEWLINE#",
"def set_OwnerId(",
"self",
",",
"OwnerId",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"add_query_param",
"(",
"'OwnerId'",
",",
"self",
")"
] | true | 15 | [
"2",
"9",
"15",
"4"
] | 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": "aliyun/aliyun-openapi-python-sdk/aliyun-python-sdk-rds/aliyunsdkrds/request/v20140815/CreateAccountForInnerRequest.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 set_OwnerId(self, OwnerId) :
self.add_query_param ('OwnerId', self)
Is there a bug in the code above? | Yes |
416 | [
"#NEWLINE#",
"def test_statistics(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Map a table with column statistics'",
"#NEWLINE#",
"stmts",
"=",
"[",
"CREATE_STMT1",
",",
"'ALTER TABLE t1 ALTER c1 SET STATISTICS 100'",
"]",
"#NEWLINE#",
"dbmap",
"=",
"self",
".",
"to_map"... | true | 23 | [
"9",
"2",
"19",
"23",
"26",
"94",
"17",
"86"
] | 1 | VARIABLE_MISUSE | [
9
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 22... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "perseas/Pyrseas/tests/dbobject/test_column.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_statistics(self) :
'Map a table with column statistics'
stmts = [CREATE_STMT1, 'ALTER TABLE t1 ALTER c1 SET STATISTICS 100']
dbmap = self.to_map (self)
expmap = {
'columns' : [{
'c1' : {
'type' : 'integer',
'statistics' : 100,
},
}, ... | Yes |
417 | [
"#NEWLINE#",
"def test_inherit_drop_parent_column(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Drop a column from a parent table, child should not drop as well'",
"#NEWLINE#",
"stmts",
"=",
"[",
"CREATE_STMT1",
",",
"'CREATE TABLE t2 (c3 date) INHERITS (t1)'",
"]",
"#NEWLINE#",
... | true | 161 | [
"9",
"2",
"19",
"155",
"17",
"25",
"73",
"159",
"153",
"161",
"168",
"178"
] | 1 | VARIABLE_MISUSE | [
9
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 22... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "perseas/Pyrseas/tests/dbobject/test_column.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_inherit_drop_parent_column(self) :
'Drop a column from a parent table, child should not drop as well'
stmts = [CREATE_STMT1, 'CREATE TABLE t2 (c3 date) INHERITS (t1)']
inmap = self.std_map ()
inmap ['schema public'].update ({
'table t1' : {
'columns' : [{
... | Yes |
418 | [
"#NEWLINE#",
"@",
"login_required",
"(",
")",
"#NEWLINE#",
"def edit(",
"request",
",",
"id",
")",
":",
"#NEWLINE#",
"#INDENT#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"service",
"=",
"Service",
".",
"objects",
".",
"get",
"(",
"id",
"=",
"id",
")",
"#NEWLIN... | true | 76 | [
"7",
"144",
"178",
"79",
"112",
"173",
"18",
"45",
"74",
"120",
"124",
"153",
"76",
"117",
"122",
"126",
"158",
"35",
"56",
"168",
"131",
"163",
"9",
"26",
"28",
"66",
"84"
] | 1 | VARIABLE_MISUSE | [
18,
45,
74,
120,
124,
153
] | [
[
{
"before_index": 1,
"after_index": 8,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 3,
"after_index": 2,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 25,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ustream/openduty/openduty/services.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... | @ login_required ()
def edit(request, id) :
try :
service = Service.objects.get (id = id)
try :
api_keys = ServiceTokens.objects.filter (service_id = service)
except ServiceTokens.DoesNotExist :
api_keys = []
try :
ss_obj = ServiceSilenced.objects.get (se... | Yes |
419 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"output",
",",
"start_block",
"=",
"(",
"'<script type=\"text/javascript\">'",
"+",
"os",
".",
"linesep",
")",
",",
"end_block",
"=",
"(",
"'</script>'",
"+",
"os",
".",
"linesep",
")",
",",
"split_threshold",
"=",
"9... | true | 44 | [
"2",
"48",
"56",
"64",
"70",
"76",
"26",
"80",
"4",
"37",
"33",
"44",
"52",
"60",
"6",
"68",
"16",
"42",
"74"
] | 1 | VARIABLE_MISUSE | [
6,
68
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 32,
"after_index": 38,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 47,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "shellderp/sublime-robot-plugin/lib/robot/reporting/jswriter.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, output, start_block = ('<script type="text/javascript">' + os.linesep), end_block = ('</script>' + os.linesep), split_threshold = 9500) :
writer = JsonWriter (output, separator = (end_block + writer))
self._write = writer.write
self._write_json = writer.write_json
self._start_bloc... | Yes |
420 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"security_audit",
"=",
"None",
",",
"deactivation_call_center",
"=",
"None",
",",
"extension",
"=",
"None",
",",
"text",
"=",
"None",
",",
"extension_elements",
"=",
"None",
",",
"extension_attributes",
"=",
"None",
")"... | true | 35 | [
"8",
"58",
"60",
"2",
"50",
"56",
"62",
"12",
"64",
"67",
"24",
"45",
"47",
"16",
"35",
"37",
"39",
"20",
"41",
"43",
"4",
"52",
"54"
] | 1 | VARIABLE_MISUSE | [
2,
50,
56,
62
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 30,
"after_index": 36,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 49,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudera/hue/desktop/core/ext-py/pysaml2-2.4.0/src/saml2/authn_context/sslcert.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, security_audit = None, deactivation_call_center = None, extension = None, text = None, extension_elements = None, extension_attributes = None) :
SamlBase.__init__ (text, text = text, extension_elements = extension_elements, extension_attributes = extension_attributes)
self.security_audit = ... | Yes |
421 | [
"#NEWLINE#",
"def getDevices(",
"ticket",
",",
"count",
",",
"type",
",",
"file_name",
")",
":",
"#NEWLINE#",
"#INDENT#",
"get_devices_url",
"=",
"(",
"(",
"controller_url",
"+",
"'/api/v1/network-device/1/'",
")",
"+",
"str",
"(",
"count",
")",
")",
"#NEWLINE#"... | true | 166 | [
"8",
"114",
"126",
"137",
"241",
"39",
"67",
"164",
"172",
"208",
"217",
"166",
"170",
"183",
"4",
"24",
"156",
"13",
"35",
"63",
"74",
"93",
"158",
"110",
"141",
"198",
"6",
"149",
"187",
"2",
"51",
"57",
"76"
] | 1 | VARIABLE_MISUSE | [
156
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 27,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CiscoDevNet/coding-skills-sample-code/coding207-putting-it-together-ga/create-device-list.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 getDevices(ticket, count, type, file_name) :
get_devices_url = ((controller_url + '/api/v1/network-device/1/') + str (count))
logging.info (('Calling APIC-EM API url:' + get_devices_url))
header = {
'content-type' : 'application/json',
'X-Auth-Token' : ticket,
}
get_devices_re... | Yes |
422 | [
"#NEWLINE#",
"def exportAttributes(",
"self",
",",
"lwrite",
",",
"level",
",",
"already_processed",
",",
"namespace_",
"=",
"'NetworkSocketObj:'",
",",
"name_",
"=",
"'ProtocolType'",
")",
":",
"#NEWLINE#",
"#INDENT#",
"super",
"(",
"ProtocolType",
",",
"self",
"... | true | 45 | [
"2",
"25",
"62",
"6",
"32",
"10",
"36",
"8",
"34",
"14",
"38",
"4",
"30",
"45",
"54"
] | 1 | VARIABLE_MISUSE | [
2,
25,
62
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 31,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 43,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CybOXProject/python-cybox/cybox/bindings/network_socket_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 exportAttributes(self, lwrite, level, already_processed, namespace_ = 'NetworkSocketObj:', name_ = 'ProtocolType') :
super (ProtocolType, self).exportAttributes (lwrite, level, already_processed, namespace_, name_ = 'ProtocolType')
if (lwrite.datatype is not None) :
lwrite ((' datatype=%s' % (quo... | Yes |
423 | [
"#NEWLINE#",
"def gradients_X(",
"self",
",",
"dL_dK",
",",
"X",
",",
"X2",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Given the derivative of the objective wrt K (dL_dK), compute the derivative wrt X\\n '",
"#NEWLINE#",
"if",
"config",
".",
"getboole... | true | 53 | [
"6",
"36",
"4",
"34",
"51",
"53",
"8",
"38",
"55",
"2",
"30",
"47"
] | 1 | VARIABLE_MISUSE | [
6,
36
] | [
[
{
"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": 17,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "SheffieldML/GPy/GPy/kern/src/stationary.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 gradients_X(self, dL_dK, X, X2 = None) :
'
Given the derivative of the objective wrt K (dL_dK), compute the derivative wrt X
'
if config.getboolean ('cython', 'working') :
return self._gradients_X_cython (dL_dK, X, X2)
else :
return self._gradients_X_pure (dL_dK, dL_dK, ... | Yes |
424 | [
"#NEWLINE#",
"def get_algorithm_impls(",
"self",
",",
"algorithm",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"algorithm",
"==",
"'MD5'",
")",
":",
"#NEWLINE#",
"#INDENT#",
"H",
"=",
"md5_digest",
"#NEWLINE#",
"#UNINDENT#",
"else",
":",
"#NEWLINE#",
"#INDENT#",... | true | 68 | [
"42",
"18",
"36",
"50",
"66",
"68",
"4",
"11",
"29",
"2"
] | 1 | VARIABLE_MISUSE | [
42
] | [
[
{
"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": 41,
"after_index": 45... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "deanhiller/databus/webapp/play1.3.x/samples-and-tests/i-am-a-developer/mechanize/_auth.py",
"license": "mpl-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 get_algorithm_impls(self, algorithm) :
if (algorithm == 'MD5') :
H = md5_digest
else :
if (algorithm == 'SHA') :
H = sha1_digest
KD = (lambda s, d : H (('%s:%s' % (s, d))))
return (H, H)
Is there a bug in the code above? | Yes |
425 | [
"#NEWLINE#",
"def test_get_router_cidrs_returns_ha_cidrs(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"ri",
"=",
"self",
".",
"_create_router",
"(",
")",
"#NEWLINE#",
"device",
"=",
"mock",
".",
"MagicMock",
"(",
")",
"#NEWLINE#",
"device",
".",
"name",
".",
"r... | true | 58 | [
"7",
"39",
"61",
"2",
"9",
"52",
"31",
"49",
"15",
"23",
"58",
"65"
] | 1 | VARIABLE_MISUSE | [
31,
49
] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/neutron/neutron/tests/unit/agent/l3/test_ha_router.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_router_cidrs_returns_ha_cidrs(self) :
ri = self._create_router ()
device = mock.MagicMock ()
device.name.return_value = 'eth2'
addresses = ['15.1.2.2/24', '15.1.2.3/32']
ri._get_cidrs_from_keepalived = mock.MagicMock (return_value = addresses)
self.assertEqual (set (device), r... | Yes |
426 | [
"#NEWLINE#",
"@",
"login_required",
"(",
")",
"#NEWLINE#",
"@",
"require_http_methods",
"(",
"[",
"'POST'",
"]",
")",
"#NEWLINE#",
"def forward_incident(",
"request",
")",
":",
"#NEWLINE#",
"#INDENT#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"with",
"transaction",
".... | true | 137 | [
"51",
"82",
"93",
"101",
"115",
"119",
"33",
"73",
"80",
"97",
"131",
"224",
"234",
"85",
"137",
"145",
"107",
"113",
"121",
"127",
"133",
"141",
"147",
"157",
"15",
"43",
"61",
"91",
"117",
"176",
"184",
"204",
"212",
"232",
"243"
] | 1 | VARIABLE_MISUSE | [
33,
73,
80,
97,
131
] | [
[
{
"before_index": 240,
"after_index": 242,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 3,
"after_index": 2,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ustream/openduty/openduty/incidents.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... | @ login_required ()
@ require_http_methods (['POST'])
def forward_incident(request) :
try :
with transaction.atomic () :
incident = Incident.objects.get (id = request.POST ['id'])
user = User.objects.get (id = request.POST ['user_id'])
ScheduledNotification.remove_... | Yes |
427 | [
"#NEWLINE#",
"def do(",
"self",
",",
"workflow_dict",
")",
":",
"#NEWLINE#",
"#INDENT#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"databaseinfra",
"=",
"driver",
"[",
"'databaseinfra'",
"]",
"#NEWLINE#",
"driver",
"=",
"databaseinfra",
".",
"get_driver",
"(",
")",
"... | true | 15 | [
"4",
"30",
"97",
"110",
"15",
"20",
"65",
"13",
"22",
"91",
"120",
"2",
"41",
"28",
"69"
] | 1 | VARIABLE_MISUSE | [
4,
30,
97,
110
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "globocom/database-as-a-service/dbaas/workflow/steps/util/region_migration/check_replication.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 do(self, workflow_dict) :
try :
databaseinfra = driver ['databaseinfra']
driver = databaseinfra.get_driver ()
instance = workflow_dict ['source_instances'] [0].future_instance
for attempt in range (0, 21) :
LOG.info ('Waiting 10s to check replication...')
... | Yes |
428 | [
"#NEWLINE#",
"def test_update_list_item(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"t1",
"=",
"Table1",
"(",
")",
"#NEWLINE#",
"t2",
"=",
"Table2",
"(",
")",
"#NEWLINE#",
"t1",
".",
"tbl2s",
".",
"append",
"(",
"t1",
")",
"#NEWLINE#",
"session",
".",
"c... | true | 25 | [
"2",
"13",
"48",
"7",
"19",
"25",
"34",
"68",
"78"
] | 1 | VARIABLE_MISUSE | [
13,
48
] | [
[
{
"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": 18,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "jmg/elixir/tests/test_dict.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 test_update_list_item(self) :
t1 = Table1 ()
t2 = Table2 ()
t1.tbl2s.append (t1)
session.commit ()
t1.from_dict (dict (tbl2s = [{
't2id' : t2.t2id,
'name' : 'test4',
}]))
assert (len (t1.tbl2s) == 1)
assert (t1.tbl2s [0].name == 'test4')
Is there a bug in the ... | Yes |
429 | [
"#NEWLINE#",
"def run(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"while",
"(",
"not",
"self",
".",
"_stop",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"_logger",
".",
"debug",
"(",
"'HelloSensor dispatching trigger...'",
")",
"#NEWLINE#",
"count",
"=",
... | true | 78 | [
"26",
"56",
"78",
"2",
"10",
"17",
"29",
"66",
"81",
"41",
"76",
"89"
] | 1 | VARIABLE_MISUSE | [
41,
76,
89
] | [
[
{
"before_index": 7,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 22... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "StackStorm/st2/contrib/hello-st2/sensors/sensor1.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 run(self) :
while (not self._stop) :
self._logger.debug ('HelloSensor dispatching trigger...')
count = (self._sensor_service.get_value ('hello-st2.count') or 0)
payload = {
'greeting' : 'Yo, StackStorm!',
'count' : (int (count) + 1),
}
self._sensor... | Yes |
430 | [
"#NEWLINE#",
"def stats(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"output",
"=",
"[",
"'Statistics:'",
"]",
"#NEWLINE#",
"for",
"trial",
"in",
"range",
"(",
"10",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"request_counter",
".",
"count",
">",
"0",
... | true | 185 | [
"183",
"191",
"248",
"276",
"208",
"223",
"368",
"413",
"422",
"456",
"463",
"490",
"118",
"136",
"145",
"162",
"179",
"194",
"201",
"210",
"292",
"302",
"308",
"337",
"361",
"401",
"438",
"246",
"274",
"310",
"320",
"357",
"91",
"101",
"109",
"1... | 1 | VARIABLE_MISUSE | [
189
] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "AppScale/appscale/AppServer/lib/cherrypy/cherrypy/lib/gctools.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 stats(self) :
output = ['Statistics:']
for trial in range (10) :
if (request_counter.count > 0) :
break
time.sleep (0.5)
else :
output.append ('
Not all requests closed properly.')
gc.collect ()
gc.collect ()
unreachable = gc.collect ()
if unreachable :
... | Yes |
431 | [
"#NEWLINE#",
"def test_krackhardt_kite_graph_normalized(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Betweenness centrality: Krackhardt kite graph normalized'",
"#NEWLINE#",
"G",
"=",
"nx",
".",
"krackhardt_kite_graph",
"(",
")",
"#NEWLINE#",
"b_answer",
"=",
"{",
"#NEWLIN... | true | 81 | [
"75",
"81",
"104",
"2",
"17",
"109",
"93",
"106",
"111",
"9",
"97"
] | 1 | VARIABLE_MISUSE | [
9,
97
] | [
[
{
"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": 16,
"after_index": 19... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "gkno/gkno_launcher/src/networkx/algorithms/centrality/tests/test_betweenness_centrality.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_krackhardt_kite_graph_normalized(self) :
'Betweenness centrality: Krackhardt kite graph normalized'
G = nx.krackhardt_kite_graph ()
b_answer = {
0 : 0.023,
1 : 0.023,
2 : 0.0,
3 : 0.102,
4 : 0.0,
5 : 0.231,
6 : 0.231,
7 : 0.... | Yes |
432 | [
"#NEWLINE#",
"def unregister_image_format(",
"format_name",
")",
":",
"#NEWLINE#",
"#INDENT#",
"global",
"FORMATS",
"#NEWLINE#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"format_name",
"=",
"format_name",
".",
"name",
"#NEWLINE#",
"#UNINDENT#",
"except",
"AttributeError",
"... | true | 42 | [
"2",
"14",
"16",
"36",
"53",
"69",
"8",
"39",
"42",
"46",
"44",
"49"
] | 1 | VARIABLE_MISUSE | [
44,
49
] | [
[
{
"before_index": 13,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 38,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "torchbox/wagtail/wagtail/wagtailimages/formats.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 unregister_image_format(format_name) :
global FORMATS
try :
format_name = format_name.name
except AttributeError :
pass
try :
del FORMATS_BY_NAME [format_name]
FORMATS = [FORMATS for fmt in FORMATS if (fmt.name != format_name)]
except KeyError :
raise KeyErr... | Yes |
433 | [
"#NEWLINE#",
"def admin(",
"cmds",
",",
"wait",
"=",
"False",
",",
"**popen_kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"not",
"hdevtools_enabled",
"(",
")",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"None",
"#NEWLINE#",
"#UNINDENT#",
"hdevtools_so... | true | 61 | [
"78",
"74",
"91",
"4",
"61",
"69",
"27",
"35",
"47",
"86",
"115",
"76",
"99",
"126",
"132",
"162",
"172",
"2",
"39",
"52",
"83",
"112"
] | 1 | VARIABLE_MISUSE | [
2,
39
] | [
[
{
"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": 26,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "SublimeHaskell/SublimeHaskell/hdevtools.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 admin(cmds, wait = False, **popen_kwargs) :
if (not hdevtools_enabled ()) :
return None
hdevtools_socket = get_setting_async ('hdevtools_socket')
if hdevtools_socket :
cmds.append ('--socket={0}'.format (hdevtools_socket))
command = (['hdevtools', 'admin'] + wait)
try :
i... | Yes |
434 | [
"#NEWLINE#",
"def get_position(",
"self",
",",
"account_id",
",",
"instrument",
",",
"**params",
")",
":",
"#NEWLINE#",
"#INDENT#",
"' Get the position for an instrument\\n Docs: http://developer.oanda.com/docs/v1/positions/#get-the-position-for-an-instrument\\n '",
"#NEWLI... | true | 32 | [
"15",
"4",
"21",
"32",
"34",
"36",
"2",
"28",
"6",
"23"
] | 1 | VARIABLE_MISUSE | [
15
] | [
[
{
"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": "jamesmawm/Mastering-Python-for-Finance-source-codes/B03898_08_codes/oandapy.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_position(self, account_id, instrument, **params) :
' Get the position for an instrument
Docs: http://developer.oanda.com/docs/v1/positions/#get-the-position-for-an-instrument
'
endpoint = ('v1/accounts/%s/positions/%s' % (account_id, instrument))
return self.request (account_id, p... | Yes |
435 | [
"#NEWLINE#",
"def formfield(",
"self",
",",
"form_class",
"=",
"forms",
".",
"ModelChoiceField",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"defaults",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'queryset'",
":",
"self",
".",
"to",
".",
"_default_manager",
"."... | true | 43 | [
"2",
"22",
"30",
"51",
"15",
"39",
"61",
"4",
"43",
"56",
"58"
] | 1 | VARIABLE_MISUSE | [] | [
[
{
"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": 38,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ithinksw/philo/philo/models/fields/entities.py",
"license": "isc",
"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 formfield(self, form_class = forms.ModelChoiceField, **kwargs) :
defaults = {
'queryset' : self.to._default_manager.complex_filter (self.limit_choices_to),
}
defaults.update (form_class)
return super (ForeignKeyAttribute, self).formfield (form_class = form_class, ** defaults)
Is there a b... | Yes |
436 | [
"#NEWLINE#",
"def __install_eggs(",
"self",
",",
"config",
")",
":",
"#NEWLINE#",
"#INDENT#",
"' Install eggs for a particular configuration '",
"#NEWLINE#",
"eggs",
"=",
"[",
"]",
"#NEWLINE#",
"if",
"config",
".",
"has",
"(",
"'egg'",
")",
":",
"#NEWLINE#",
"#INDEN... | true | 202 | [
"131",
"185",
"187",
"151",
"225",
"11",
"26",
"48",
"84",
"126",
"51",
"57",
"202",
"114",
"118",
"4",
"17",
"29",
"39",
"65",
"138",
"192",
"153",
"2",
"75",
"97",
"103",
"164",
"170",
"219"
] | 1 | VARIABLE_MISUSE | [
151,
225
] | [
[
{
"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": "toumorokoshi/sprinter/sprinter/formula/eggscript.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 __install_eggs(self, config) :
' Install eggs for a particular configuration '
eggs = []
if config.has ('egg') :
eggs += [config.get ('egg')]
if config.has ('eggs') :
eggs += [egg.strip () for egg in re.split (',(?!<)|
', config.get ('eggs'))]
self.logger.debug (('Installing eggs ... | Yes |
437 | [
"#NEWLINE#",
"def set_mode(",
"self",
",",
"mode",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"self",
".",
"version",
"[",
"0",
"]",
"<",
"3",
")",
":",
"#NEWLINE#",
"#INDENT#",
"raise",
"ValueError",
"(",
"'Mode Switching requires version >= 3'",
")",
"#NE... | true | 83 | [
"2",
"11",
"52",
"79",
"30",
"38",
"56",
"75",
"83",
"4",
"40"
] | 1 | VARIABLE_MISUSE | [
4,
40
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 29,
"after_index": 33... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Yubico/yubikey-neo-manager/neoman/device_otp.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 set_mode(self, mode) :
if (self.version [0] < 3) :
raise ValueError ('Mode Switching requires version >= 3')
config = ykp_alloc_device_config ()
ykp_set_device_mode (config, mode)
try :
if (not yk_write_device_config (self._dev, config)) :
raise ModeSwitchError ()
fin... | Yes |
438 | [
"#NEWLINE#",
"def timing(",
"func",
",",
"*",
"args",
",",
"**kw",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'timing(func,*args,**kw) -> t_total\\n\\n Execute a function once, return the elapsed total CPU time in\\n seconds. This is just the first value in timings_out().'",
"#NEWLINE#",
... | true | 22 | [
"5",
"25",
"2",
"19",
"22"
] | 1 | VARIABLE_MISUSE | [
5
] | [
[
{
"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": 11,
"after_index": 12,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ipython/ipython-py3k/IPython/utils/timing.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 timing(func, * args, **kw) :
'timing(func,*args,**kw) -> t_total
Execute a function once, return the elapsed total CPU time in
seconds. This is just the first value in timings_out().'
return timings_out (1, func, * func, ** kw) [0]
Is there a bug in the code above? | Yes |
439 | [
"#NEWLINE#",
"def OutputUnchecked(",
"self",
",",
"out",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"i",
"in",
"xrange",
"(",
"len",
"(",
"self",
".",
"result_",
")",
")",
":",
"#NEWLINE#",
"#INDENT#",
"out",
".",
"putVarInt32",
"(",
"24",
")",
"#NEWLINE#",... | true | 39 | [
"4",
"24",
"31",
"39",
"10",
"2",
"16",
"35"
] | 1 | VARIABLE_MISUSE | [
10
] | [
[
{
"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": 9,
"after_index": 13,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CollabQ/CollabQ/.google_appengine/google/appengine/api/labs/taskqueue/taskqueue_service_pb.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 OutputUnchecked(self, out) :
for i in xrange (len (self.result_)) :
out.putVarInt32 (24)
out.putVarInt32 (self.result_ [out])
Is there a bug in the code above? | Yes |
440 | [
"#NEWLINE#",
"def TryMerge(",
"self",
",",
"d",
")",
":",
"#NEWLINE#",
"#INDENT#",
"while",
"(",
"d",
".",
"avail",
"(",
")",
">",
"0",
")",
":",
"#NEWLINE#",
"#INDENT#",
"tt",
"=",
"d",
".",
"getVarInt32",
"(",
")",
"#NEWLINE#",
"if",
"(",
"self",
"... | true | 32 | [
"4",
"11",
"24",
"43",
"66",
"91",
"22",
"55",
"78",
"95",
"2",
"32",
"39",
"62"
] | 1 | VARIABLE_MISUSE | [
22,
55,
78,
95
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 14... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CollabQ/CollabQ/.google_appengine/google/appengine/api/labs/taskqueue/taskqueue_service_pb.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 TryMerge(self, d) :
while (d.avail () > 0) :
tt = d.getVarInt32 ()
if (self == 10) :
self.set_app_id (d.getPrefixedString ())
continue
if (tt == 16) :
self.set_max_rows (d.getVarInt32 ())
continue
if (tt == 0) :
raise Protocol... | Yes |
441 | [
"#NEWLINE#",
"def __str__(",
"self",
",",
"prefix",
"=",
"''",
",",
"printElemNumber",
"=",
"0",
")",
":",
"#NEWLINE#",
"#INDENT#",
"res",
"=",
"''",
"#NEWLINE#",
"if",
"self",
".",
"has_app_id_",
":",
"#NEWLINE#",
"#INDENT#",
"res",
"+=",
"(",
"prefix",
"... | true | 38 | [
"8",
"38",
"4",
"29",
"56",
"2",
"20",
"34",
"47",
"61",
"65",
"15",
"26",
"53",
"74"
] | 1 | VARIABLE_MISUSE | [
2,
20,
34,
47,
61,
65
] | [
[
{
"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": "CollabQ/CollabQ/.google_appengine/google/appengine/api/labs/taskqueue/taskqueue_service_pb.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 __str__(self, prefix = '', printElemNumber = 0) :
res = ''
if self.has_app_id_ :
res += (prefix + ('app_id: %s
' % self.DebugFormatString (printElemNumber.app_id_)))
if self.has_max_rows_ :
res += (prefix + ('max_rows: %s
' % self.DebugFormatInt32 (self.max_rows_)))
return res
Is the... | Yes |
442 | [
"#NEWLINE#",
"def Equals(",
"self",
",",
"x",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"x",
"is",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"1",
"#NEWLINE#",
"#UNINDENT#",
"if",
"(",
"len",
"(",
"self",
".",
"queuestats_",
")",
"!=",
"len... | true | 54 | [
"47",
"67",
"4",
"11",
"33",
"58",
"49",
"54",
"69",
"2",
"13",
"26"
] | 1 | VARIABLE_MISUSE | [
2,
13,
26
] | [
[
{
"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": 22,
"after_index": 30... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CollabQ/CollabQ/.google_appengine/google/appengine/api/labs/taskqueue/taskqueue_service_pb.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 Equals(self, x) :
if (x is self) :
return 1
if (len (self.queuestats_) != len (x.queuestats_)) :
return 0
for (e1, e2) in zip (e2.queuestats_, x.queuestats_) :
if (e1 != e2) :
return 0
return 1
Is there a bug in the code above? | Yes |
443 | [
"#NEWLINE#",
"def TryMerge(",
"self",
",",
"d",
")",
":",
"#NEWLINE#",
"#INDENT#",
"while",
"1",
":",
"#NEWLINE#",
"#INDENT#",
"tt",
"=",
"d",
".",
"getVarInt32",
"(",
")",
"#NEWLINE#",
"if",
"(",
"self",
"==",
"60",
")",
":",
"#NEWLINE#",
"#INDENT#",
"b... | true | 24 | [
"4",
"16",
"47",
"70",
"95",
"14",
"36",
"59",
"82",
"99",
"2",
"24",
"43",
"66"
] | 1 | VARIABLE_MISUSE | [
14,
36,
59,
82,
99
] | [
[
{
"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": 19... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CollabQ/CollabQ/.google_appengine/google/appengine/api/labs/taskqueue/taskqueue_service_pb.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 TryMerge(self, d) :
while 1 :
tt = d.getVarInt32 ()
if (self == 60) :
break
if (tt == 66) :
self.set_key (d.getPrefixedString ())
continue
if (tt == 74) :
self.set_value (d.getPrefixedString ())
continue
if (tt == 0) :
... | Yes |
444 | [
"#NEWLINE#",
"def read_module(",
"module_name",
")",
":",
"#NEWLINE#",
"#INDENT#",
"' Parses a module. '",
"#NEWLINE#",
"filename",
"=",
"find_module",
"(",
"filename",
")",
"#NEWLINE#",
"if",
"(",
"filename",
"is not",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"mo... | true | 13 | [
"25",
"37",
"43",
"2",
"9",
"13",
"18",
"29"
] | 1 | VARIABLE_MISUSE | [
2
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 19... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "enthought/envisage/envisage/developer/code_browser/enclbr.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 read_module(module_name) :
' Parses a module. '
filename = find_module (filename)
if (filename is not None) :
module = read_file (filename)
else :
module = None
return module
Is there a bug in the code above? | Yes |
445 | [
"#NEWLINE#",
"def test_since(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n The elapsed time since the last refresh.\\n '",
"#NEWLINE#",
"import",
"datetime",
"#NEWLINE#",
"dt1",
"=",
"datetime",
".",
"datetime",
"(",
"2013",
",",
"12",
",",
"15",
","... | true | 92 | [
"31",
"12",
"65",
"67",
"78",
"2",
"69",
"86",
"95",
"103",
"50",
"61",
"92",
"107"
] | 1 | VARIABLE_MISUSE | [
31
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 30,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "scieloorg/scielo-manager/scielomanager/health/tests.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 test_since(self) :
'
The elapsed time since the last refresh.
'
import datetime
dt1 = datetime.datetime (2013, 12, 15, 10, 10, 10)
dt2 = datetime.datetime (2013, 12, 15, 10, 11, 10)
check_list = health.CheckList (refresh = 1)
check_list._refreshed_at = dt1
mock_dat... | Yes |
446 | [
"#NEWLINE#",
"def find_name(",
"self",
",",
"_id",
",",
"services",
",",
"devices",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"s",
"in",
"services",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"_id",
"==",
"s",
"[",
"'_id'",
"]",
")",
":",
"#NEWLINE#",
"#IN... | true | 51 | [
"14",
"24",
"33",
"6",
"16",
"4",
"22",
"49",
"2",
"8",
"43",
"51",
"41",
"60"
] | 1 | VARIABLE_MISUSE | [
41,
60
] | [
[
{
"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": 13,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "serverdensity/sdbot/limbo/plugins/common/basewrapper.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 find_name(self, _id, services, devices) :
for s in services :
if (_id == s ['_id']) :
return s ['name']
for d in devices :
if (_id == devices ['_id']) :
return d ['name']
return 'No name'
Is there a bug in the code above? | Yes |
447 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"connection",
",",
"queues",
")",
":",
"#NEWLINE#",
"#INDENT#",
"super",
"(",
"ResultsTracker",
",",
"self",
")",
".",
"__init__",
"(",
"queues",
",",
"queues",
")",
"#NEWLINE#",
"self",
".",
"_queriers",
"=",
"{",
... | true | 20 | [
"2",
"15",
"25",
"36",
"43",
"4",
"6",
"20",
"22"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"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": 24,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "StackStorm/st2/st2actions/st2actions/resultstracker/resultstracker.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, connection, queues) :
super (ResultsTracker, self).__init__ (queues, queues)
self._queriers = {
}
self._query_threads = []
self._failed_imports = set ()
Is there a bug in the code above? | Yes |
448 | [
"#NEWLINE#",
"def update_database(",
"dbfile",
")",
":",
"#NEWLINE#",
"#INDENT#",
"conn",
"=",
"sqlite3",
".",
"connect",
"(",
"dbfile",
")",
"#NEWLINE#",
"conn",
".",
"row_factory",
"=",
"sqlite3",
".",
"Row",
"#NEWLINE#",
"with",
"conn",
":",
"#NEWLINE#",
"#... | true | 80 | [
"209",
"220",
"58",
"69",
"80",
"67",
"85",
"90",
"95",
"100",
"105",
"143",
"156",
"161",
"168",
"173",
"218",
"231",
"236",
"241",
"246",
"251",
"256",
"261",
"29",
"37",
"44",
"51",
"60",
"73",
"113",
"120",
"127",
"136",
"149",
"181",
"188"... | 1 | VARIABLE_MISUSE | [
67,
85,
90,
95,
100,
105,
143,
156,
161,
168,
173,
218,
231,
236,
241,
246,
251,
256,
261
] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "vets/vets/db/migrate_db.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 update_database(dbfile) :
conn = sqlite3.connect (dbfile)
conn.row_factory = sqlite3.Row
with conn :
c = conn.cursor ()
c.execute ('ALTER TABLE volunteers RENAME TO volunteers_old')
c.execute ('CREATE TABLE "volunteers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "nam... | Yes |
449 | [
"#NEWLINE#",
"def _execute(",
"self",
",",
"command",
",",
"params",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Overriding in order to catch StaleElementReferenceException.'",
"#NEWLINE#",
"repeat",
"=",
"range",
"(",
"2",
")",
"#NEWLINE#",
"for",
"i",
"in",
... | true | 45 | [
"15",
"25",
"60",
"23",
"45",
"58",
"4",
"43",
"6",
"2",
"38",
"77"
] | 1 | VARIABLE_MISUSE | [
6
] | [
[
{
"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": "openstack/horizon/horizon/test/webdriver.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 _execute(self, command, params = None) :
'Overriding in order to catch StaleElementReferenceException.'
repeat = range (2)
for i in repeat :
try :
return super (WebElementWrapper, self)._execute (command, i)
except exceptions.StaleElementReferenceException :
if (i ... | Yes |
450 | [
"#NEWLINE#",
"def known(",
"self",
",",
"words",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"set",
"(",
"(",
"self",
"for",
"w",
"in",
"words",
"if",
"(",
"w",
"in",
"self",
".",
"NWORDS",
")",
")",
")"
] | true | 13 | [
"2",
"13",
"22",
"15",
"20",
"4",
"17"
] | 1 | VARIABLE_MISUSE | [
15,
20
] | [
[
{
"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": "VikParuchuri/simpsons-scripts/tasks/train.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 known(self, words) :
return set ((self for w in words if (w in self.NWORDS)))
Is there a bug in the code above? | Yes |
451 | [
"#NEWLINE#",
"def handle_request(",
"self",
",",
"message",
")",
":",
"#NEWLINE#",
"#INDENT#",
"request",
"=",
"parseRecognitionRequestMessage",
"(",
"message",
")",
"#NEWLINE#",
"if",
"(",
"request",
".",
"type",
"==",
"RecognitionRequestMessage",
".",
"BATCH",
")"... | true | 57 | [
"4",
"13",
"2",
"29",
"44",
"53",
"57",
"62",
"72",
"79",
"9",
"18",
"33",
"66",
"83"
] | 1 | VARIABLE_MISUSE | [
9,
18,
33,
66,
83
] | [
[
{
"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": 16,
"after_index": 21... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "UFAL-DSG/cloud-asr/cloudasr/worker/lib.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 handle_request(self, message) :
request = parseRecognitionRequestMessage (message)
if (request.type == RecognitionRequestMessage.BATCH) :
self.handle_batch_request (request)
else :
if (not self.is_online_recognition_running ()) :
self.begin_online_recognition (self)
if sel... | Yes |
452 | [
"#NEWLINE#",
"def compile(",
"self",
",",
"name",
",",
"modules",
",",
"opt",
"=",
"False",
",",
"threads",
"=",
"False",
",",
"defines",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"#NEWLINE#",
"#UNINDENT#",
"}",
")",
":",
"#NEWLINE#",
"#INDENT#",
"path",
"=",
"se... | true | 273 | [
"8",
"6",
"124",
"157",
"199",
"266",
"233",
"264",
"134",
"210",
"254",
"256",
"129",
"203",
"224",
"271",
"106",
"235",
"259",
"4",
"41",
"122",
"269",
"155",
"161",
"169",
"173",
"187",
"36",
"56",
"240",
"273",
"83",
"285",
"12",
"220",
"16... | 1 | VARIABLE_MISUSE | [
129,
203,
224,
271
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 27,
"after_index": 33,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 35,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "johncsnyder/SwiftKitten/cffi/testing/embedding/test_basic.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 compile(self, name, modules, opt = False, threads = False, defines = {
}) :
path = self.get_path ()
filename = ('%s.c' % name)
shutil.copy (os.path.join (local_dir, filename), path)
shutil.copy (os.path.join (local_dir, 'thread-test.h'), path)
import distutils.ccompiler
curdir = ... | Yes |
453 | [
"#NEWLINE#",
"def get_tabs(",
"self",
",",
"request",
",",
"*",
"args",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"ipsecsiteconnection",
"=",
"self",
".",
"get_data",
"(",
")",
"#NEWLINE#",
"return",
"self",
".",
"tab_group_class",
"(",
"request",
",... | true | 34 | [
"14",
"29",
"31",
"7",
"2",
"16",
"23",
"4",
"27",
"34"
] | 1 | VARIABLE_MISUSE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 3,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 19,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CiscoSystems/avos/openstack_dashboard/dashboards/project/vpn/views.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 get_tabs(self, request, * args, **kwargs) :
ipsecsiteconnection = self.get_data ()
return self.tab_group_class (request, ipsecsiteconnection = ipsecsiteconnection, ** request)
Is there a bug in the code above? | Yes |
454 | [
"#NEWLINE#",
"def testAuthenticationFailed(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'ERROR: Fail Facebook authentication (which returns None user_dict).'",
"#NEWLINE#",
"with",
"mock",
".",
"patch",
"(",
"'tornado.httpclient.AsyncHTTPClient'",
",",
"MockAsyncHTTPClient",
"(",... | true | 69 | [
"46",
"21",
"25",
"69",
"2",
"48",
"55",
"65",
"75",
"85"
] | 1 | VARIABLE_MISUSE | [
46
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "viewfinderco/viewfinder/backend/www/test/auth_facebook_test.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 testAuthenticationFailed(self) :
'ERROR: Fail Facebook authentication (which returns None user_dict).'
with mock.patch ('tornado.httpclient.AsyncHTTPClient', MockAsyncHTTPClient ()) as mock_client :
mock_client.map ('https://graph.facebook.com/me\\?', (lambda request : httpclient.HTTPResponse (re... | Yes |
455 | [
"#NEWLINE#",
"def test_piechart_2(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"' PieChart with custom colors '",
"#NEWLINE#",
"coordinate_system",
"=",
"cartesius",
".",
"CoordinateSystem",
"(",
")",
"#NEWLINE#",
"piechart_data",
"=",
"(",
"charts",
".",
"data",
"(",
"'abc'",... | true | 121 | [
"96",
"8",
"117",
"124",
"142",
"162",
"171",
"16",
"104",
"121"
] | 1 | VARIABLE_MISUSE | [
96
] | [
[
{
"before_index": 5,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 7,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 37... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "tkrajina/cartesius/create_images_and_readme.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_piechart_2() :
' PieChart with custom colors '
coordinate_system = cartesius.CoordinateSystem ()
piechart_data = (charts.data ('abc', 1, fill_color = (255, 200, 200)), charts.data ('cde', 2, fill_color = (200, 255, 200)), charts.data ('efg', 5, fill_color = (200, 200, 255)), charts.data ('ijk', ... | Yes |
456 | [
"#NEWLINE#",
"def transformIgnoredSpecs(",
"lines",
",",
"doc",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"specs",
"=",
"parseInfoTree",
"(",
"lines",
",",
"doc",
".",
"md",
".",
"indent",
")",
"#NEWLINE#",
"return",
"processIgnoredSpecs",
"(",
"specs"... | false | 0 | [
"11",
"27",
"specs",
"4",
"17",
"29",
"doc",
"kwargs",
"2",
"15",
"lines"
] | 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": 24,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "tabatkins/bikeshed/bikeshed/datablocks.py",
"license": "cc0-1.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 transformIgnoredSpecs(lines, doc, **kwargs) :
specs = parseInfoTree (lines, doc.md.indent)
return processIgnoredSpecs (specs, doc)
Is there a bug in the code above? | No |
457 | [
"#NEWLINE#",
"def extra(",
"self",
",",
"*",
"args",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"self",
".",
"get_queryset",
"(",
")",
".",
"extra",
"(",
"*",
"args",
",",
"**",
"kwargs",
")"
] | false | 0 | [
"5",
"22",
"args",
"2",
"13",
"self",
"25",
"kwargs"
] | 0 | NONE | [] | [
[
{
"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": 23,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/db/models/manager.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 extra(self, * args, **kwargs) :
return self.get_queryset ().extra (* args, ** kwargs)
Is there a bug in the code above? | No |
458 | [
"#NEWLINE#",
"def wiki_page_version_deleted(",
"self",
",",
"page",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"deleted_version",
".",
"append",
"(",
"page",
")"
] | false | 0 | [
"4",
"15",
"page",
"2",
"9",
"self"
] | 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": 14,
"after_index": 12... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "edgewall/trac/trac/wiki/tests/model.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 wiki_page_version_deleted(self, page) :
self.deleted_version.append (page)
Is there a bug in the code above? | No |
459 | [
"#NEWLINE#",
"def test_check_active_false(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"auth",
"=",
"DigestAuthentication",
"(",
"require_active",
"=",
"False",
")",
"#NEWLINE#",
"request",
"=",
"HttpRequest",
"(",
")",
"#NEWLINE#",
"bob_doe",
"=",
"User",
".",
"... | false | 0 | [
"7",
"50",
"98",
"auth",
"22",
"41",
"68",
"89",
"bob_doe",
"2",
"105",
"self",
"16",
"54",
"57",
"72",
"102",
"request",
"48",
"82",
"96",
"109",
"auth_request"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mozilla/inventory/vendor-local/src/django-tastypie/tests/core/tests/authentication.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_check_active_false(self) :
auth = DigestAuthentication (require_active = False)
request = HttpRequest ()
bob_doe = User.objects.get (username = 'bobdoe')
create_api_key (User, instance = bob_doe, created = True)
auth_request = auth.is_authenticated (request)
request.META ['HTTP_AU... | No |
460 | [
"#NEWLINE#",
"def _draw_wireframe_display_list(",
"self",
",",
"dl",
")",
":",
"#NEWLINE#",
"#INDENT#",
"glPushAttrib",
"(",
"(",
"GL_ENABLE_BIT",
"|",
"GL_POLYGON_BIT",
")",
")",
"#NEWLINE#",
"glPolygonMode",
"(",
"GL_FRONT_AND_BACK",
",",
"GL_LINE",
")",
"#NEWLINE#"... | false | 0 | [
"2",
"self",
"4",
"45",
"dl"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 21... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sympy/sympy/sympy/plotting/pygletplot/plot_mode_base.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 _draw_wireframe_display_list(self, dl) :
glPushAttrib ((GL_ENABLE_BIT | GL_POLYGON_BIT))
glPolygonMode (GL_FRONT_AND_BACK, GL_LINE)
glEnable (GL_POLYGON_OFFSET_LINE)
glPolygonOffset ((- 0.005), (- 50.0))
glCallList (dl)
glPopAttrib ()
Is there a bug in the code above? | No |
461 | [
"#NEWLINE#",
"def remove(",
"self",
",",
"f",
")",
":",
"#NEWLINE#",
"#INDENT#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"os",
".",
"remove",
"(",
"self",
".",
"f",
")",
"#NEWLINE#",
"#UNINDENT#",
"except",
":",
"#NEWLINE#",
"#INDENT#",
"pass"
] | false | 0 | [
"2",
"17",
"self",
"4",
"19",
"f"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pydata/pandas/asv_bench/benchmarks/hdfstore_bench.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 remove(self, f) :
try :
os.remove (self.f)
except :
pass
Is there a bug in the code above? | No |
462 | [
"#NEWLINE#",
"def pculaZpotrs(",
"config",
",",
"uplo",
",",
"n",
",",
"nrhs",
",",
"a",
",",
"lda",
",",
"b",
",",
"ldb",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Cholesky solve.\\n\\n '",
"#NEWLINE#",
"status",
"=",
"_libpcula",
".",
"pculaZpotrs",
"("... | false | 0 | [
"10",
"44",
"a",
"4",
"36",
"uplo",
"12",
"47",
"lda",
"14",
"51",
"b",
"23",
"59",
"status",
"6",
"38",
"n",
"8",
"40",
"nrhs",
"16",
"54",
"ldb",
"2",
"33",
"config"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lebedov/scikit-cuda/skcuda/pcula.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 pculaZpotrs(config, uplo, n, nrhs, a, lda, b, ldb) :
'
Cholesky solve.
'
status = _libpcula.pculaZpotrs (ctypes.byref (config), uplo, n, nrhs, int (a), lda, int (b), ldb)
culaCheckStatus (status)
Is there a bug in the code above? | No |
463 | [
"#NEWLINE#",
"def _parse_openid_request(",
"self",
",",
"request",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"OpenIDRequest",
"(",
")",
".",
"from_jwt",
"(",
"request",
",",
"keyjar",
"=",
"self",
".",
"keyjar",
")"
] | false | 0 | [
"4",
"16",
"request",
"2",
"20",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 13... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "rohe/pyoidc/src/oic/oic/provider.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 _parse_openid_request(self, request) :
return OpenIDRequest ().from_jwt (request, keyjar = self.keyjar)
Is there a bug in the code above? | No |
464 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"rule",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"rule",
"=",
"rule",
"#NEWLINE#",
"self",
".",
"first",
"=",
"[",
"]",
"#NEWLINE#",
"self",
".",
"follow",
"=",
"[",
"]",
"#NEWLINE#",
"self",
".",
"accept... | false | 0 | [
"4",
"11",
"13",
"rule",
"2",
"9",
"15",
"22",
"29",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 19... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "smurfix/yapps/yapps/parsetree.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 __init__(self, rule) :
self.rule = rule
self.first = []
self.follow = []
self.accepts_epsilon = 0
Is there a bug in the code above? | No |
465 | [
"#NEWLINE#",
"def save(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"from_date",
",",
"to_date",
")",
"=",
"super",
"(",
"UserYearMonthForm",
",",
"self",
")",
".",
"save",
"(",
")",
"#NEWLINE#",
"return",
"(",
"from_date",
",",
"to_date",
",",
"self... | false | 0 | [
"8",
"26",
"from_date",
"10",
"28",
"to_date",
"2",
"17",
"30",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 27,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "caktus/django-timepiece/timepiece/forms.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 save(self) :
(from_date, to_date) = super (UserYearMonthForm, self).save ()
return (from_date, to_date, self.cleaned_data.get ('user', None))
Is there a bug in the code above? | No |
466 | [
"#NEWLINE#",
"def handle_edit_user_story_request(",
"self",
",",
"user_story",
")",
":",
"#NEWLINE#",
"#INDENT#",
"data",
"=",
"self",
".",
"view",
".",
"get_user_story_form_data",
"(",
")",
"#NEWLINE#",
"if",
"(",
"not",
"data",
".",
"get",
"(",
"'subject'",
",... | false | 0 | [
"9",
"22",
"60",
"data",
"2",
"11",
"34",
"52",
"67",
"self",
"50",
"63",
"us_patch_f",
"4",
"58",
"user_story"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 21... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "taigaio/taiga-ncurses/taiga_ncurses/controllers/milestones.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 handle_edit_user_story_request(self, user_story) :
data = self.view.get_user_story_form_data ()
if (not data.get ('subject', None)) :
self.view.notifier.error_msg ('Subject is required')
else :
us_patch_f = self.executor.update_user_story (user_story, data)
us_patch_f.add_done_... | No |
467 | [
"#NEWLINE#",
"def get_fb_user_cookie(",
"self",
",",
"request",
")",
":",
"#NEWLINE#",
"#INDENT#",
"' Attempt to find a facebook user using a cookie. '",
"#NEWLINE#",
"fb_user",
"=",
"facebook",
".",
"get_user_from_cookie",
"(",
"request",
".",
"COOKIES",
",",
"settings",
... | false | 0 | [
"2",
"self",
"4",
"17",
"request",
"11",
"31",
"35",
"44",
"fb_user"
] | 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": 20,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "aidanlister/django-facebook/django_facebook/middleware.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_fb_user_cookie(self, request) :
' Attempt to find a facebook user using a cookie. '
fb_user = facebook.get_user_from_cookie (request.COOKIES, settings.FACEBOOK_APP_ID, settings.FACEBOOK_SECRET_KEY)
if fb_user :
fb_user ['method'] = 'cookie'
return fb_user
Is there a bug in the code ab... | No |
468 | [
"#NEWLINE#",
"def update_candidate_distributions(",
"self",
",",
"distribution_iter",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"dist",
"in",
"distribution_iter",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"self",
".",
"can_add",
"(",
"dist",
")",
":",
"#NEWLINE#",
"#INDEN... | false | 0 | [
"2",
"17",
"44",
"self",
"10",
"21",
"34",
"48",
"dist",
"4",
"12",
"distribution_iter"
] | 0 | NONE | [] | [
[
{
"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": 9,
"after_index": 12,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pantsbuild/pex/pex/environment.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 update_candidate_distributions(self, distribution_iter) :
for dist in distribution_iter :
if self.can_add (dist) :
with TRACER.timed (('Adding %s' % dist), V = 2) :
self.add (dist)
Is there a bug in the code above? | No |
469 | [
"#NEWLINE#",
"def sub_unique_objects(",
"self",
",",
"obj",
",",
"params",
"=",
"None",
",",
"pub",
"=",
"None",
",",
"*",
"args",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Return objects that are only visible through given subscription.'",
"#NEWLINE#",
"i... | false | 0 | [
"138",
"291",
"kwargs",
"157",
"210",
"222",
"227",
"282",
"other",
"76",
"80",
"90",
"93",
"133",
"135",
"145",
"216",
"235",
"244",
"286",
"288",
"306",
"322",
"qs",
"204",
"218",
"other_pub",
"110",
"251",
"259",
"264",
"309",
"to_send",
"2",
"5... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 3,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 22... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "django-ddp/django-ddp/dddp/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 sub_unique_objects(self, obj, params = None, pub = None, * args, **kwargs) :
'Return objects that are only visible through given subscription.'
if (params is None) :
params = ejson.loads (obj.params_ejson)
if (pub is None) :
pub = self.get_pub_by_name (obj.publication)
queries = collec... | No |
470 | [
"#NEWLINE#",
"@",
"patch",
"(",
"'jumpgate.api.importlib.import_module'",
")",
"#NEWLINE#",
"def test_load_drivers(",
"self",
",",
"import_module",
")",
":",
"#NEWLINE#",
"#INDENT#",
"compute_disp",
"=",
"MagicMock",
"(",
")",
"#NEWLINE#",
"identity_disp",
"=",
"MagicMo... | false | 0 | [
"10",
"65",
"import_module",
"15",
"38",
"85",
"compute_disp",
"21",
"43",
"103",
"identity_disp",
"8",
"27",
"49",
"57",
"81",
"99",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "softlayer/jumpgate/tests/jumpgate-tests/test_jumpgate.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... | @ patch ('jumpgate.api.importlib.import_module')
def test_load_drivers(self, import_module) :
compute_disp = MagicMock ()
identity_disp = MagicMock ()
self.app._dispatchers = {
'compute' : compute_disp,
'identity' : identity_disp,
}
self.app.config = TEST_CFG
self.app.load_d... | No |
471 | [
"#NEWLINE#",
"def test_values_from_lookup_field(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Regression test for #12654: lookup_field\\n '",
"#NEWLINE#",
"SITE_NAME",
"=",
"'example.com'",
"#NEWLINE#",
"TITLE_TEXT",
"=",
"'Some title'",
"#NEWLINE#",
"CREATED_DA... | false | 0 | [
"2",
"43",
"198",
"self",
"9",
"74",
"98",
"SITE_NAME",
"23",
"51",
"119",
"ADMIN_METHOD",
"145",
"176",
"mock_admin",
"153",
"172",
"name",
"155",
"202",
"value",
"13",
"79",
"113",
"TITLE_TEXT",
"163",
"181",
"194",
"field",
"167",
"188",
"192",
"204... | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 15... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "AppScale/appscale/AppServer/lib/django-1.2/tests/regressiontests/admin_util/tests.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 test_values_from_lookup_field(self) :
'
Regression test for #12654: lookup_field
'
SITE_NAME = 'example.com'
TITLE_TEXT = 'Some title'
CREATED_DATE = datetime.min
ADMIN_METHOD = 'admin method'
SIMPLE_FUNCTION = 'function'
INSTANCE_ATTRIBUTE = 'attr'
class Mock... | No |
472 | [
"#NEWLINE#",
"def test_fetch(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"dummy1",
"=",
"DummyModel",
".",
"objects",
".",
"create",
"(",
"name",
"=",
"'Foo'",
")",
"#NEWLINE#",
"dummy2",
"=",
"DummyModel",
".",
"objects",
".",
"create",
"(",
"name",
"=",
... | false | 0 | [
"2",
"self",
"46",
"67",
"74",
"81",
"qset",
"7",
"65",
"dummy1",
"33",
"79",
"dummy3",
"20",
"72",
"dummy2"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 27,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 32,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "codeinthehole/django-cacheback/tests/test_jobs.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_fetch(self) :
dummy1 = DummyModel.objects.create (name = 'Foo')
dummy2 = DummyModel.objects.create (name = 'Bar')
dummy3 = DummyModel.objects.create (name = 'Foobar')
qset = list (QuerySetFilterJob (DummyModel).fetch (name__startswith = 'Foo'))
assert (dummy1 in qset)
assert (dumm... | No |
473 | [
"#NEWLINE#",
"def get_jar_dependencies(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"jar_deps",
"=",
"OrderedSet",
"(",
")",
"#NEWLINE#",
"def collect_jar_deps(",
"target",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"isinstance",
"(",
"target",
",",
"JarLibrary",
")"... | false | 0 | [
"7",
"29",
"52",
"jar_deps",
"2",
"42",
"self",
"48",
"collect_jar_deps"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 41,
"after_index": 45,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 51,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pantsbuild/pants/src/python/pants/backend/jvm/targets/jvm_target.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 get_jar_dependencies(self) :
jar_deps = OrderedSet ()
def collect_jar_deps(target) :
if isinstance (target, JarLibrary) :
jar_deps.update (target.payload.jars)
self.walk (work = collect_jar_deps)
return jar_deps
Is there a bug in the code above? | No |
474 | [
"#NEWLINE#",
"def test_storage_celery_save(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Make sure it actually works when using Celery as a task queue\\n '",
"#NEWLINE#",
"storage",
"=",
"QueuedStorage",
"(",
"local",
"=",
"'django.core.files.storage.FileSystemStora... | false | 0 | [
"63",
"79",
"89",
"118",
"143",
"162",
"178",
"obj",
"2",
"27",
"38",
"73",
"85",
"102",
"114",
"127",
"139",
"154",
"170",
"186",
"190",
"198",
"204",
"208",
"216",
"232",
"237",
"249",
"257",
"266",
"270",
"276",
"291",
"297",
"312",
"320",
"... | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 43,
"after_index": 53... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "jazzband/django-queued-storage/tests/test_storages.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_storage_celery_save(self) :
'
Make sure it actually works when using Celery as a task queue
'
storage = QueuedStorage (local = 'django.core.files.storage.FileSystemStorage', remote = 'django.core.files.storage.FileSystemStorage', local_options = dict (location = self.local_dir), remot... | No |
475 | [
"#NEWLINE#",
"@",
"_sympifyit",
"(",
"'other'",
",",
"NotImplemented",
")",
"#NEWLINE#",
"@",
"call_highest_priority",
"(",
"'__mul__'",
")",
"#NEWLINE#",
"def __rmul__(",
"self",
",",
"other",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"self",
".",
"_mul_func",... | false | 0 | [
"18",
"28",
"other",
"16",
"24",
"30",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 29,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 5,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sympy/sympy/sympy/vector/basisdependent.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... | @ _sympifyit ('other', NotImplemented)
@ call_highest_priority ('__mul__')
def __rmul__(self, other) :
return self._mul_func (other, self)
Is there a bug in the code above? | No |
476 | [
"#NEWLINE#",
"def default(",
"default",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n API class method wrapper to specify the default value.\\n\\n Default will usually be returned if an exception is raised, like from a \\n JSON parsing attempt on a bad request.\\n '",
"#NEWLINE#",
"def deco... | false | 0 | [
"2",
"61",
"default",
"74",
"decorator"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 73,
"after_index": 74,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "glennyonemitsu/MarkupHiveSDK/sdklib/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 default(default) :
'
API class method wrapper to specify the default value.
Default will usually be returned if an exception is raised, like from a
JSON parsing attempt on a bad request.
'
def decorator(fn) :
def wrapped_func(self, * args, **kwargs) :
try :
... | No |
477 | [
"#NEWLINE#",
"def assert_header_blocks_actually_equal(",
"block_a",
",",
"block_b",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"\\n Asserts that two header bocks are really, truly equal, down to the types\\n of their tuples. Doesn't return anything.\\n \"",
"#NEWLINE#",
"assert",
"(",
"... | false | 0 | [
"26",
"42",
"49",
"a",
"28",
"44",
"53",
"b",
"2",
"15",
"33",
"block_a",
"4",
"20",
"35",
"block_b"
] | 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": 11,
"after_index": 17,... | [
{
"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... | def assert_header_blocks_actually_equal(block_a, block_b) :
"
Asserts that two header bocks are really, truly equal, down to the types
of their tuples. Doesn't return anything.
"
assert (len (block_a) == len (block_b))
for (a, b) in zip (block_a, block_b) :
assert (a == b)
a... | No |
478 | [
"#NEWLINE#",
"def authenticate(",
"self",
",",
"session_info",
"=",
"None",
",",
"attribute_mapping",
"=",
"None",
",",
"create_unknown_user",
"=",
"True",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"(",
"session_info",
"is",
"None",
")",
"or",
"(",
"attrib... | false | 0 | [
"200",
"216",
"django_fields",
"280",
"327",
"379",
"385",
"404",
"410",
"438",
"450",
"456",
"512",
"user",
"284",
"300",
"318",
"358",
"430",
"478",
"501",
"main_attribute",
"293",
"339",
"447",
"user_query_args",
"93",
"131",
"use_name_id_as_username",
"1... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 26,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 47,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudera/hue/desktop/core/ext-py/djangosaml2-0.13.0/djangosaml2/backends.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 authenticate(self, session_info = None, attribute_mapping = None, create_unknown_user = True) :
if ((session_info is None) or (attribute_mapping is None)) :
logger.error ('Session info or attribute mapping are None')
return None
if (not ('ava' in session_info)) :
logger.error ('"ava... | No |
479 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"parent",
",",
"param",
",",
"precision",
"=",
"4",
",",
"vary",
"=",
"None",
",",
"**kws",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"param",
"=",
"param",
"#NEWLINE#",
"title",
"=",
"(",
"' Parameter: %s... | false | 0 | [
"4",
"45",
"67",
"parent",
"56",
"267",
"310",
"350",
"376",
"404",
"432",
"468",
"496",
"510",
"521",
"538",
"549",
"564",
"579",
"594",
"605",
"620",
"635",
"650",
"661",
"676",
"691",
"710",
"716",
"736",
"755",
"776",
"panel",
"122",
"158",
"... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "xraypy/xraylarch/plugins/wx/parameter.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 __init__(self, parent, param, precision = 4, vary = None, **kws) :
self.param = param
title = (' Parameter: %s ' % param.name)
wx.Dialog.__init__ (self, parent, wx.ID_ANY, title = title)
panel = GridPanel (self)
self.SetFont (parent.GetFont ())
if (vary is None) :
vary = 0 ... | No |
480 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"matrix",
",",
"row2word",
"=",
"None",
",",
"col2word",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Initialize a Matrix instance.\\n :param matrix: A matrix of dict (row) of dict (column) of values, or of type scip... | false | 0 | [
"4",
"22",
"30",
"39",
"48",
"60",
"66",
"76",
"78",
"137",
"154",
"176",
"193",
"214",
"234",
"238",
"matrix",
"10",
"34",
"101",
"124",
"173",
"202",
"258",
"col2word",
"2",
"58",
"74",
"212",
"232",
"236",
"248",
"254",
"260",
"266",
"272",
... | 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": "jimmycallin/pydsm/pydsm/indexmatrix.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 __init__(self, matrix, row2word = None, col2word = None) :
'
Initialize a Matrix instance.
:param matrix: A matrix of dict (row) of dict (column) of values, or of type scipy.sparse.spmatrix.
If matrix is not dict of dict, row2word and col2word must be set.
:param ... | No |
481 | [
"#NEWLINE#",
"def get_key_from_stat(",
"key",
",",
"type",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"sa",
"=",
"dbsession",
".",
"query",
"(",
"Stat",
")",
".",
"filter",
"(",
"(",
"Stat",
".",
"key",
"==",
"key",
")",
")",
".",
"one",
"(",
")... | false | 0 | [
"4",
"48",
"type",
"35",
"55",
"61",
"85",
"val",
"2",
"25",
"27",
"80",
"key",
"11",
"41",
"90",
"sa"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 32,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 34,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sjuxax/raggregate/raggregate/queries/general.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 get_key_from_stat(key, type = None) :
sa = dbsession.query (Stat).filter ((Stat.key == key)).one ()
val = json.loads (sa.value)
if (type == 'datetime') :
val = datetime.fromtimestamp (val).replace (tzinfo = pytz.utc)
return {
'key' : key,
'value' : val,
'sa' : sa,... | No |
482 | [
"#NEWLINE#",
"def test_delete_with_put_empty_array(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"collection",
".",
"add_pointer",
"(",
"self",
".",
"admin_node",
",",
"auth",
"=",
"self",
".",
"auth",
")",
"#NEWLINE#",
"payload",
"=",
"self",
".",
... | false | 0 | [
"41",
"66",
"75",
"res",
"2",
"7",
"13",
"19",
"26",
"43",
"49",
"57",
"self",
"24",
"28",
"32",
"53",
"82",
"payload"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 29,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 31,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CenterForOpenScience/osf.io/api_tests/collections/test_views.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_delete_with_put_empty_array(self) :
self.collection.add_pointer (self.admin_node, auth = self.auth)
payload = self.payload ()
payload ['data'].pop ()
res = self.app.put_json_api (self.url, payload, auth = self.user.auth)
assert_equal (res.status_code, 200)
assert_equal (res.json [... | No |
483 | [
"#NEWLINE#",
"def test_type_mistyped(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"res",
"=",
"self",
".",
"app",
".",
"post_json_api",
"(",
"self",
".",
"url",
",",
"{",
"#NEWLINE#",
"#INDENT#",
"'data'",
":",
"[",
"{",
"#NEWLINE#",
"#INDENT#",
"'type'",
"... | false | 0 | [
"2",
"9",
"15",
"35",
"52",
"self",
"7",
"65",
"res"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 62,
"after_index": 68,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CenterForOpenScience/osf.io/api_tests/collections/test_views.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_type_mistyped(self) :
res = self.app.post_json_api (self.url, {
'data' : [{
'type' : 'not_linked_nodes',
'id' : self.contributor_node._id,
}],
}, auth = self.user.auth, expect_errors = True)
assert_equal (res.status_code, 409)
Is there a bug in the code above? | No |
484 | [
"#NEWLINE#",
"def testGetExpectedCostForSharedCountryCallingCode(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"ambiguousPremiumRateString",
"=",
"'1234'",
"#NEWLINE#",
"ambiguousPremiumRateNumber",
"=",
"PhoneNumber",
"(",
"country_code",
"=",
"61",
",",
"national_number",
"... | false | 0 | [
"2",
"58",
"70",
"82",
"94",
"113",
"136",
"155",
"178",
"194",
"213",
"236",
"255",
"278",
"294",
"313",
"336",
"355",
"378",
"self",
"24",
"204",
"227",
"246",
"269",
"ambiguousStandardRateString",
"28",
"78",
"290",
"ambiguousStandardRateNumber",
"7",
... | 0 | NONE | [] | [
[
{
"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": "daviddrysdale/python-phonenumbers/python/tests/shortnumberinfotest.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 testGetExpectedCostForSharedCountryCallingCode(self) :
ambiguousPremiumRateString = '1234'
ambiguousPremiumRateNumber = PhoneNumber (country_code = 61, national_number = 1234)
ambiguousStandardRateString = '1194'
ambiguousStandardRateNumber = PhoneNumber (country_code = 61, national_number = 119... | No |
485 | [
"#NEWLINE#",
"def get_impl_key(",
"self",
",",
"sig",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Get the implementation key (used by the target context) for the\\n given signature.\\n '",
"#NEWLINE#",
"return",
"self",
".",
"_impl_keys",
"[",
"sig",
".",
"args"... | false | 0 | [
"4",
"16",
"sig",
"2",
"12",
"self"
] | 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": 11,
"after_index": 15,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "numba/numba/numba/types/functions.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 get_impl_key(self, sig) :
'
Get the implementation key (used by the target context) for the
given signature.
'
return self._impl_keys [sig.args]
Is there a bug in the code above? | No |
486 | [
"#NEWLINE#",
"def zoom_plot(",
"selenium",
")",
":",
"#NEWLINE#",
"#INDENT#",
"pan_buttons",
"=",
"selenium",
".",
"find_elements_by_css_selector",
"(",
"'.bk-button-bar-list[type=\"pan\"] button'",
")",
"#NEWLINE#",
"zoom_button",
"=",
"pan_buttons",
"[",
"1",
"]",
"#NEW... | false | 0 | [
"2",
"9",
"46",
"57",
"selenium",
"16",
"27",
"37",
"zoom_button",
"44",
"64",
"canvas",
"7",
"18",
"pan_buttons",
"53",
"60",
"71",
"77",
"86",
"92",
"actions"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "bokeh/bokeh/tests/integration/interaction/test_range_min_max.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 zoom_plot(selenium) :
pan_buttons = selenium.find_elements_by_css_selector ('.bk-button-bar-list[type="pan"] button')
zoom_button = pan_buttons [1]
if ('active' not in zoom_button.get_attribute ('class')) :
zoom_button.click ()
canvas = selenium.find_element_by_tag_name ('canvas')
acti... | No |
487 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"name",
",",
"username",
",",
"password",
",",
"last_ip",
",",
"access",
"=",
"'agreement'",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"lowername",
"=",
"name",
"#NEWLINE#",
"self",
".",
"username",
"=",
"user... | false | 0 | [
"8",
"33",
"35",
"password",
"6",
"27",
"29",
"username",
"2",
"19",
"25",
"31",
"37",
"50",
"63",
"69",
"75",
"81",
"87",
"93",
"self",
"4",
"23",
"name",
"10",
"65",
"67",
"last_ip",
"12",
"83",
"85",
"access"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lunixbochs/uberserver/SQLUsers.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 __init__(self, name, username, password, last_ip, access = 'agreement') :
self.lowername = name
self.username = username
self.password = password
self.last_login = int (time.time ())
self.register_date = int (time.time ())
self.last_ip = last_ip
self.ingame_time = 0
self.bot ... | No |
488 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"root",
",",
"engine",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"_root",
"=",
"root",
"#NEWLINE#",
"metadata",
".",
"create_all",
"(",
"engine",
")",
"#NEWLINE#",
"self",
".",
"sessionmaker",
"=",
"sessionmaker... | false | 0 | [
"6",
"21",
"32",
"engine",
"4",
"15",
"root",
"2",
"11",
"24",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lunixbochs/uberserver/SQLUsers.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 __init__(self, root, engine) :
self._root = root
metadata.create_all (engine)
self.sessionmaker = sessionmaker (bind = engine, autoflush = True, transactional = True)
Is there a bug in the code above? | No |
489 | [
"#NEWLINE#",
"def register(",
"self",
",",
"resource",
",",
"canonical",
"=",
"True",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Registers an instance of a ``Resource`` subclass with the API.\\n\\n Optionally accept a ``canonical`` argument, which indicates that the\\n r... | false | 0 | [
"6",
"59",
"canonical",
"2",
"48",
"70",
"99",
"114",
"126",
"self",
"15",
"30",
"52",
"68",
"87",
"103",
"resource_name",
"4",
"19",
"43",
"55",
"85",
"106",
"108",
"118",
"resource"
] | 0 | NONE | [] | [
[
{
"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": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "toastdriven/piecrust/piecrust/api.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 register(self, resource, canonical = True) :
'
Registers an instance of a ``Resource`` subclass with the API.
Optionally accept a ``canonical`` argument, which indicates that the
resource being registered is the canonical variant. Defaults to
``True``.
'
resource_n... | No |
490 | [
"#NEWLINE#",
"def set_active(",
"self",
",",
"href",
")",
":",
"#NEWLINE#",
"#INDENT#",
"active_node",
"=",
"None",
"#NEWLINE#",
"if",
"(",
"(",
"self",
".",
"node",
".",
"href",
".",
"startswith",
"(",
"'^'",
")",
"and",
"re",
".",
"match",
"(",
"self",... | false | 0 | [
"2",
"16",
"31",
"42",
"54",
"62",
"86",
"92",
"self",
"4",
"20",
"35",
"37",
"46",
"48",
"104",
"href",
"60",
"64",
"67",
"71",
"77",
"79",
"81",
"parent",
"9",
"84",
"112",
"119",
"active_node",
"90",
"98",
"100",
"108",
"114",
"child"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 40... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "caktus/django-treenav/treenav/models.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_active(self, href) :
active_node = None
if ((self.node.href.startswith ('^') and re.match (self.node.href, href)) or (self.node.href == href)) :
self.active = True
parent = self.parent
while parent :
parent.active = True
parent = parent.parent
acti... | No |
491 | [
"#NEWLINE#",
"def test_set_nested_create(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"grainsmod",
".",
"__grains__",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'a'",
":",
"'aval'",
",",
"#NEWLINE#",
"'c'",
":",
"8",
",",
"#NEWLINE#",
"#UNINDENT#",
"}",
"#NEWLINE#",
"... | false | 0 | [
"2",
"42",
"52",
"82",
"self",
"27",
"46",
"56",
"res"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 34,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 41,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "saltstack/salt/tests/unit/modules/grains_test.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_set_nested_create(self) :
grainsmod.__grains__ = {
'a' : 'aval',
'c' : 8,
}
res = grainsmod.set ('b,nested', 'val', delimiter = ',')
self.assertTrue (res ['result'])
self.assertEqual (res ['changes'], {
'b' : {
'nested' : 'val',
},
})
self.ass... | No |
492 | [
"#NEWLINE#",
"def register_watchers(",
"self",
",",
"type_callback_dict",
",",
"register_timeout",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"(",
"event_type",
",",
"callback",
")",
"in",
"type_callback_dict",
".",
"items",
"(",
")",
":",
"#NEWLINE#",... | false | 0 | [
"6",
"58",
"register_timeout",
"4",
"20",
"49",
"type_callback_dict",
"17",
"37",
"callback",
"2",
"28",
"41",
"self",
"15",
"32",
"event_type"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "veegee/guv/guv/support/cassandra.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 register_watchers(self, type_callback_dict, register_timeout = None) :
for (event_type, callback) in type_callback_dict.items () :
self._push_watchers [event_type].add (callback)
self.wait_for_response (RegisterMessage (event_list = type_callback_dict.keys ()), timeout = register_timeout)
Is there ... | No |
493 | [
"#NEWLINE#",
"def test_multigrad_onearg(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"fun",
"=",
"(",
"lambda",
"x",
",",
"y",
":",
"np",
".",
"sum",
"(",
"(",
"x",
"+",
"np",
".",
"sin",
"(",
"y",
")",
")",
")",
")",
"#NEWLINE#",
"packed_fun",
"=",
"(",
... | false | 0 | [
"63",
"91",
"102",
"B",
"61",
"89",
"100",
"A",
"31",
"96",
"packed_fun",
"6",
"86",
"fun"
] | 0 | NONE | [] | [
[
{
"before_index": 5,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 30,
"after_index": 34,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 59,
"after_index": 7... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "HIPS/autograd/tests/test_wrappers.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_multigrad_onearg() :
fun = (lambda x, y : np.sum ((x + np.sin (y))))
packed_fun = (lambda xy : np.sum ((xy [0] + np.sin (xy [1]))))
(A, B) = (npr.randn (3), npr.randn (3))
check_equivalent (multigrad (fun) (A, B), grad (packed_fun) ((A, B)))
Is there a bug in the code above? | No |
494 | [
"#NEWLINE#",
"def _validate_maybe_string(",
"name",
",",
"item",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"item",
"and",
"(",
"not",
"isinstance",
"(",
"item",
",",
"six",
".",
"string_types",
")",
")",
")",
":",
"#NEWLINE#",
"#INDENT#",
"raise",
"Value... | false | 0 | [
"2",
"35",
"name",
"4",
"11",
"17",
"39",
"42",
"48",
"item"
] | 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": 47,
"after_index": 48... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pantsbuild/pants/src/python/pants/backend/jvm/ossrh_publication_metadata.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 _validate_maybe_string(name, item) :
if (item and (not isinstance (item, six.string_types))) :
raise ValueError ('{} was expected to be of type {} but given {}'.format (name, type (item), item))
return item
Is there a bug in the code above? | No |
495 | [
"#NEWLINE#",
"@",
"base",
".",
"skip_without_vpc",
"(",
")",
"#NEWLINE#",
"def test_tag_internet_gateway(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"data",
"=",
"self",
".",
"client",
".",
"create_internet_gateway",
"(",
")",
"#NEWLINE#",
"gw_id",
"=",
"data",
... | false | 0 | [
"117",
"describe_func",
"14",
"26",
"60",
"83",
"96",
"data",
"34",
"135",
"res_clean",
"9",
"16",
"36",
"40",
"62",
"75",
"90",
"109",
"120",
"131",
"self",
"24",
"48",
"94",
"113",
"128",
"gw_id"
] | 0 | NONE | [] | [
[
{
"before_index": 13,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 30,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 33,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/ec2-api/ec2api/tests/functional/api/test_tags.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... | @ base.skip_without_vpc ()
def test_tag_internet_gateway(self) :
data = self.client.create_internet_gateway ()
gw_id = data ['InternetGateway'] ['InternetGatewayId']
res_clean = self.addResourceCleanUp (self.client.delete_internet_gateway, InternetGatewayId = gw_id)
def describe_func(* args, **kwar... | No |
496 | [
"#NEWLINE#",
"def maximum_day_in_month_for(",
"year",
",",
"month",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"calendar",
".",
"monthrange",
"(",
"year",
",",
"month",
")",
"[",
"1",
"]"
] | false | 0 | [
"4",
"16",
"month",
"2",
"14",
"year"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 15... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "rohe/pyoidc/src/oic/utils/time_util.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 maximum_day_in_month_for(year, month) :
return calendar.monthrange (year, month) [1]
Is there a bug in the code above? | No |
497 | [
"#NEWLINE#",
"def compute(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"size",
"=",
"self",
".",
"get_input",
"(",
"'Window Size'",
")",
"#NEWLINE#",
"beta",
"=",
"self",
".",
"get_input",
"(",
"'Beta'",
")",
"#NEWLINE#",
"out",
"=",
"SparseMatrix",
"(",
")... | false | 0 | [
"16",
"47",
"beta",
"25",
"31",
"57",
"out",
"2",
"9",
"18",
"51",
"self",
"7",
"45",
"size"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "VisTrails/VisTrails/contrib/SciPy/Filters.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 compute(self) :
size = self.get_input ('Window Size')
beta = self.get_input ('Beta')
out = SparseMatrix ()
out.matrix = sparse.csc_matrix (scipy.signal.kaiser (size, beta))
self.set_output ('Window', out)
Is there a bug in the code above? | No |
498 | [
"#NEWLINE#",
"@",
"classmethod",
"#NEWLINE#",
"def create_user_accounts(",
"cls",
",",
"email",
",",
"password",
",",
"public_ip",
",",
"keyname",
",",
"clear_datastore",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"Registers two new user accounts with the UserAppServer.\\n\\n On... | false | 0 | [
"13",
"32",
"128",
"keyname",
"116",
"138",
"154",
"168",
"181",
"195",
"xmpp_user",
"15",
"51",
"147",
"clear_datastore",
"5",
"cls",
"11",
"26",
"public_ip",
"22",
"54",
"81",
"150",
"177",
"acc",
"7",
"42",
"58",
"72",
"85",
"106",
"email",
"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": "AppScale/appscale-tools/lib/remote_helper.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... | @ classmethod
def create_user_accounts(cls, email, password, public_ip, keyname, clear_datastore) :
"Registers two new user accounts with the UserAppServer.
One account is the standard account that users log in with (via their
e-mail address. The other is their XMPP account, so that they can log into
... | No |
499 | [
"#NEWLINE#",
"def _test_formatFlatEvent_fieldNamesSame(",
"self",
",",
"event",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n The same format field used twice in one event is rendered twice.\\n\\n @param event: An event to flatten. If C{None}, create a new event.\\n ... | false | 0 | [
"22",
"48",
"counter",
"2",
"38",
"75",
"self",
"4",
"15",
"54",
"72",
"81",
"88",
"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": "twisted/twisted/twisted/logger/test/test_flatten.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 _test_formatFlatEvent_fieldNamesSame(self, event = None) :
'
The same format field used twice in one event is rendered twice.
@param event: An event to flatten. If C{None}, create a new event.
@return: C{event} or the event created.
'
if (event is None) :
counter... | No |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.