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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
100 | [
"#NEWLINE#",
"def _CreateOutputFileHandles(",
"self",
",",
"output_type",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Creates a new gzipped output tempfile for the output type.\\n\\n We write to JSON data to gzip_filehandle to get compressed data. We hold a\\n reference to the original filehandle (... | false | 0 | [
"22",
"54",
"56",
"gzip_filehandle",
"4",
"19",
"45",
"50",
"52",
"68",
"output_type",
"11",
"28",
"38",
"58",
"60",
"gzip_filehandle_parent",
"2",
"34",
"41",
"64",
"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": 10,
"after_index": 16,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "google/grr/grr/lib/output_plugins/bigquery_plugin.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 _CreateOutputFileHandles(self, output_type) :
'Creates a new gzipped output tempfile for the output type.
We write to JSON data to gzip_filehandle to get compressed data. We hold a
reference to the original filehandle (gzip_filehandle_parent) so we can pass
the gzip data to bigquery.
Args:
... | No |
101 | [
"#NEWLINE#",
"def test_failed_connect_and_then_successful_connect(",
"t",
"=",
"Time",
",",
"logic",
"=",
"DEFAULT_LOGIC",
",",
"nid",
"=",
"NID",
"(",
"'kaamel:123'",
")",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"t",
",",
"logic",
")",
"=",
"test_failed_connect",... | false | 0 | [
"2",
"21",
"28",
"38",
"48",
"t",
"10",
"32",
"34",
"57",
"59",
"nid",
"6",
"23",
"30",
"40",
"54",
"logic"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 29,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 36,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "eallik/spinoff/spinoff/tests/hub_test.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_failed_connect_and_then_successful_connect(t = Time, logic = DEFAULT_LOGIC, nid = NID ('kaamel:123')) :
(t, logic) = test_failed_connect (t, logic, nid = nid)
(t, logic) = test_successful_connect ((lambda : t), (lambda : logic), nid = nid)
Is there a bug in the code above? | No |
102 | [
"#NEWLINE#",
"def test_failed_connect_and_then_successful_connect(",
"t",
"=",
"Time",
",",
"logic",
"=",
"DEFAULT_LOGIC",
",",
"nid",
"=",
"NID",
"(",
"'kaamel:123'",
")",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"t",
",",
"logic",
")",
"=",
"test_failed_connect",... | false | 0 | [
"2",
"21",
"28",
"38",
"48",
"t",
"10",
"32",
"34",
"57",
"59",
"nid",
"6",
"23",
"30",
"40",
"54",
"logic"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 29,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 36,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "eallik/spinoff/spinoff/tests/hub_test.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_failed_connect_and_then_successful_connect(t = Time, logic = DEFAULT_LOGIC, nid = NID ('kaamel:123')) :
(t, logic) = test_failed_connect (t, logic, nid = nid)
(t, logic) = test_successful_connect ((lambda : t), (lambda : logic), nid = nid)
Is there a bug in the code above? | No |
103 | [
"#NEWLINE#",
"def test_ppf_ticket1131(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"vals",
"=",
"stats",
".",
"truncnorm",
".",
"ppf",
"(",
"[",
"(",
"-",
"0.5",
")",
",",
"0",
",",
"0.0001",
",",
"0.5",
",",
"(",
"1",
"-",
"0.0001",
")",
",",
"1",
... | false | 0 | [
"7",
"89",
"vals",
"2",
"self",
"60",
"91",
"expected"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 37,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 59,
"after_index": 65,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 86,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "scipy/scipy/scipy/stats/tests/test_distributions.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_ppf_ticket1131(self) :
vals = stats.truncnorm.ppf ([(- 0.5), 0, 0.0001, 0.5, (1 - 0.0001), 1, 2], (- 1.0), 1.0, loc = ([3] * 7), scale = 2)
expected = np.array ([np.nan, 1, 1.00056419, 3, 4.99943581, 5, np.nan])
assert_array_almost_equal (vals, expected)
Is there a bug in the code above? | No |
104 | [
"#NEWLINE#",
"def test_gh_1489_trac_962_rvs(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"low",
",",
"high",
")",
"=",
"(",
"10",
",",
"15",
")",
"#NEWLINE#",
"x",
"=",
"stats",
".",
"truncnorm",
".",
"rvs",
"(",
"low",
",",
"high",
",",
"0",
","... | false | 0 | [
"8",
"27",
"43",
"low",
"2",
"self",
"19",
"45",
"51",
"x",
"10",
"29",
"57",
"high"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 28,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 39,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "scipy/scipy/scipy/stats/tests/test_distributions.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_gh_1489_trac_962_rvs(self) :
(low, high) = (10, 15)
x = stats.truncnorm.rvs (low, high, 0, 1, size = 10)
assert_ ((low < x.min () < x.max () < high))
Is there a bug in the code above? | No |
105 | [
"#NEWLINE#",
"def test_logpdf_ticket_1866(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"alpha",
",",
"beta",
")",
"=",
"(",
"267",
",",
"1472",
")",
"#NEWLINE#",
"x",
"=",
"np",
".",
"array",
"(",
"[",
"0.2",
",",
"0.5",
",",
"0.6",
"]",
")",
"... | false | 0 | [
"19",
"51",
"70",
"81",
"x",
"34",
"47",
"66",
"77",
"b",
"10",
"38",
"42",
"beta",
"2",
"self",
"8",
"40",
"alpha"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 33,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "scipy/scipy/scipy/stats/tests/test_distributions.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_logpdf_ticket_1866(self) :
(alpha, beta) = (267, 1472)
x = np.array ([0.2, 0.5, 0.6])
b = stats.beta (alpha, beta)
assert_allclose (b.logpdf (x).sum (), (- 1201.699061824062))
assert_allclose (b.pdf (x), np.exp (b.logpdf (x)))
Is there a bug in the code above? | No |
106 | [
"#NEWLINE#",
"def test_fix_fit_norm(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"x",
"=",
"np",
".",
"arange",
"(",
"1",
",",
"6",
")",
"#NEWLINE#",
"(",
"loc",
",",
"scale",
")",
"=",
"stats",
".",
"norm",
".",
"fit",
"(",
"x",
")",
"#NEWLINE#",
"... | false | 0 | [
"2",
"self",
"21",
"42",
"55",
"80",
"93",
"118",
"scale",
"19",
"35",
"53",
"73",
"91",
"111",
"loc",
"7",
"30",
"64",
"102",
"x"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 29,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 32,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "scipy/scipy/scipy/stats/tests/test_distributions.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_fix_fit_norm(self) :
x = np.arange (1, 6)
(loc, scale) = stats.norm.fit (x)
assert_almost_equal (loc, 3)
assert_almost_equal (scale, np.sqrt (2))
(loc, scale) = stats.norm.fit (x, floc = 2)
assert_equal (loc, 2)
assert_equal (scale, np.sqrt (3))
(loc, scale) = stats.norm... | No |
107 | [
"#NEWLINE#",
"def export(",
"self",
",",
"location",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Export the Bazaar repository at the url to the destination location'",
"#NEWLINE#",
"temp_dir",
"=",
"tempfile",
".",
"mkdtemp",
"(",
"'-export'",
",",
"'pip-'",
")",
"#NEWLINE#",
"s... | false | 0 | [
"4",
"36",
"43",
"60",
"location",
"2",
"22",
"54",
"69",
"self",
"11",
"26",
"65",
"85",
"temp_dir"
] | 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": 18,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "balanced/status.balancedpayments.com/venv/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/vcs/bazaar.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 export(self, location) :
'Export the Bazaar repository at the url to the destination location'
temp_dir = tempfile.mkdtemp ('-export', 'pip-')
self.unpack (temp_dir)
if os.path.exists (location) :
rmtree (location)
try :
call_subprocess ([self.cmd, 'export', location], cwd = t... | No |
108 | [
"#NEWLINE#",
"def test_ReduceXOR(",
"setup_sim",
")",
":",
"#NEWLINE#",
"#INDENT#",
"model",
"=",
"ReduceXOR",
"(",
"4",
")",
"#NEWLINE#",
"(",
"model",
",",
"sim",
")",
"=",
"setup_sim",
"(",
"model",
")",
"#NEWLINE#",
"for",
"(",
"i",
",",
"o",
")",
"i... | false | 0 | [
"29",
"113",
"122",
"o",
"2",
"20",
"setup_sim",
"17",
"101",
"sim",
"27",
"99",
"i",
"7",
"15",
"22",
"93",
"109",
"118",
"model"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cornell-brg/pymtl/pymtl/tools/simulation/SimulationTool_comb_test.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_ReduceXOR(setup_sim) :
model = ReduceXOR (4)
(model, sim) = setup_sim (model)
for (i, o) in zip ([15, 10, 5, 0, 9, 14, 13, 11, 7, 1, 2, 4, 8], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]) :
model.in_.value = i
sim.eval_combinational ()
assert (model.out0 == o)
ass... | No |
109 | [
"#NEWLINE#",
"def test_ListOfSubmodPortBundles(",
"setup_sim",
")",
":",
"#NEWLINE#",
"#INDENT#",
"model",
"=",
"ListOfSubmodPortBundles",
"(",
")",
"#NEWLINE#",
"(",
"model",
",",
"sim",
")",
"=",
"setup_sim",
"(",
"model",
")",
"#NEWLINE#",
"model",
".",
"in_",
... | false | 0 | [
"2",
"19",
"setup_sim",
"7",
"14",
"21",
"24",
"37",
"50",
"63",
"84",
"98",
"112",
"126",
"138",
"151",
"164",
"177",
"198",
"212",
"226",
"240",
"model",
"16",
"76",
"190",
"sim"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cornell-brg/pymtl/pymtl/tools/simulation/SimulationTool_comb_test.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_ListOfSubmodPortBundles(setup_sim) :
model = ListOfSubmodPortBundles ()
(model, sim) = setup_sim (model)
model.in_ [0].a.value = 2
model.in_ [0].b.value = 3
model.in_ [1].a.value = 4
model.in_ [1].b.value = 5
sim.eval_combinational ()
assert (model.out [0].a == 3)
a... | No |
110 | [
"#NEWLINE#",
"def E_log_pdf(",
"self",
",",
"Data",
")",
":",
"#NEWLINE#",
"#INDENT#",
"' Calculate E[ log p( x_n | theta ) ] for each x_n in Data.X\\n \\n Args\\n -------\\n Data : bnpy XData object\\n with attribute Data.X, numpy 2D array of size nObs x... | false | 0 | [
"4",
"57",
"Data",
"11",
"65",
"logPDFConst",
"2",
"21",
"36",
"53",
"self",
"45",
"67",
"logPDFData"
] | 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": 28,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "daeilkim/refinery/refinery/bnpy/bnpy-dev/bnpy/distr/GaussGammaDistr.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 E_log_pdf(self, Data) :
' Calculate E[log p(x_n | theta)] for each x_n in Data.X
Args
-------
Data : bnpy XData object
with attribute Data.X, numpy 2D array of size nObs x D
Returns
-------
logp : numpy 1D array, length nObs
'
l... | No |
111 | [
"#NEWLINE#",
"@",
"classmethod",
"#NEWLINE#",
"def validate_params(",
"cls",
",",
"params",
")",
":",
"#NEWLINE#",
"#INDENT#",
"one_day",
"=",
"(",
"(",
"24",
"*",
"60",
")",
"*",
"60",
")",
"#NEWLINE#",
"if",
"(",
"int",
"(",
"params",
"[",
"'timestamp'",... | false | 0 | [
"7",
"28",
"56",
"params",
"12",
"41",
"one_day",
"5",
"52",
"cls"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Shopify/shopify_python_api/shopify/session.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... | @ classmethod
def validate_params(cls, params) :
one_day = ((24 * 60) * 60)
if (int (params ['timestamp']) < (time.time () - one_day)) :
return False
return cls.validate_hmac (params)
Is there a bug in the code above? | No |
112 | [
"#NEWLINE#",
"def bind(",
"self",
",",
"*",
"args",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"type",
"(",
"self",
")",
"(",
"self",
",",
"*",
"args",
",",
"**",
"kwargs",
")"
] | false | 0 | [
"2",
"15",
"18",
"self",
"24",
"kwargs",
"5",
"21",
"args"
] | 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": 19,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pytoolz/toolz/toolz/functoolz.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 bind(self, * args, **kwargs) :
return type (self) (self, * args, ** kwargs)
Is there a bug in the code above? | No |
113 | [
"#NEWLINE#",
"def test_quo4(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"w",
"=",
"Grammar",
"(",
"\"root 'some\\\\''\"",
")",
"#NEWLINE#",
"g",
"=",
"w",
".",
"generate",
"(",
")",
"#NEWLINE#",
"self",
".",
"assertEqual",
"(",
"g",
",",
"\"some'\"",
")... | false | 0 | [
"7",
"16",
"31",
"40",
"w",
"2",
"22",
"46",
"self",
"14",
"26",
"38",
"50",
"g"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "blackberry/ALF/alf/fuzz/grammr2_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 test_quo4(self) :
w = Grammar ("root 'some\\''")
g = w.generate ()
self.assertEqual (g, "some'")
w = Grammar ('root "some\\""')
g = w.generate ()
self.assertEqual (g, 'some"')
Is there a bug in the code above? | No |
114 | [
"#NEWLINE#",
"def insert(",
"self",
",",
"value",
",",
"pivot",
",",
"where",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"self",
".",
"database",
".",
"linsert",
"(",
"self",
".",
"key",
",",
"where",
",",
"pivot",
",",
"value",
")"
] | false | 0 | [
"2",
"14",
"20",
"self",
"8",
"24",
"where",
"6",
"26",
"pivot",
"4",
"28",
"value"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "coleifer/walrus/walrus/containers.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 insert(self, value, pivot, where) :
return self.database.linsert (self.key, where, pivot, value)
Is there a bug in the code above? | No |
115 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"*",
"args",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"super",
"(",
"UserGenericPermsMixin",
",",
"self",
")",
".",
"__init__",
"(",
"*",
"args",
",",
"**",
"kwargs",
")",
"#NEWLINE#",
"self",
".",
"gro... | false | 0 | [
"2",
"16",
"28",
"34",
"self",
"5",
"22",
"args",
"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": 11,
"after_index": 23,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "grey0ne/django-protector/protector/models.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, * args, **kwargs) :
super (UserGenericPermsMixin, self).__init__ (* args, ** kwargs)
self.groups = UserGroupManager (self)
Is there a bug in the code above? | No |
116 | [
"#NEWLINE#",
"def __eq__(",
"self",
",",
"other",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"(",
"unicode",
"(",
"self",
")",
"==",
"unicode",
"(",
"other",
")",
")"
] | false | 0 | [
"2",
"13",
"self",
"4",
"18",
"other"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 12... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "chrippa/livestreamer/src/livestreamer/packages/pbs.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 __eq__(self, other) :
return (unicode (self) == unicode (other))
Is there a bug in the code above? | No |
117 | [
"#NEWLINE#",
"@",
"realname",
".",
"setter",
"#NEWLINE#",
"def realname(",
"self",
",",
"val",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"val",
".",
"connected",
"or",
"self",
".",
"connecting",
")",
":",
"#NEWLINE#",
"#INDENT#",
"raise",
"IOError",
"(",... | true | 16 | [
"9",
"16",
"38",
"7",
"20",
"34"
] | 1 | VARIABLE_MISUSE | [
7,
20,
34
] | [
[
{
"before_index": 1,
"after_index": 8,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 33,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ecdavis/pants/pants/contrib/irc.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... | @ realname.setter
def realname(self, val) :
if (val.connected or self.connecting) :
raise IOError ('Cannot change while connected to server.')
self._realname = val
Is there a bug in the code above? | Yes |
118 | [
"#NEWLINE#",
"def addSuccess(",
"self",
",",
"test",
")",
":",
"#NEWLINE#",
"#INDENT#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"rc_deltas",
",",
"alloc_deltas",
")",
"=",
"self",
".",
"_huntLeaks",
"(",
"test",
")",
"#NEWLINE#",
"#UNINDENT#",
"except",
"Ass... | true | 175 | [
"4",
"23",
"171",
"242",
"266",
"204",
"208",
"244",
"134",
"158",
"165",
"195",
"124",
"184",
"252",
"151",
"132",
"230",
"16",
"147",
"14",
"139",
"143",
"46",
"54",
"59",
"69",
"79",
"95",
"130",
"160",
"173",
"179",
"232",
"2",
"19",
"35",
... | 1 | VARIABLE_MISUSE | [
132,
230
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 123,
"after_index": 126,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 128,
"after_index"... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "numba/llvmlite/llvmlite/tests/customize.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 addSuccess(self, test) :
try :
(rc_deltas, alloc_deltas) = self._huntLeaks (test)
except AssertionError :
assert (not self.wasSuccessful ())
return
def check_rc_deltas(deltas) :
return any (deltas)
def check_alloc_deltas(deltas) :
if ((3 * deltas.count (0)) < len... | Yes |
119 | [
"#NEWLINE#",
"def Layout(",
"self",
",",
"request",
",",
"response",
")",
":",
"#NEWLINE#",
"#INDENT#",
"req_flow",
"=",
"request",
".",
"REQ",
".",
"get",
"(",
"'flow'",
")",
"#NEWLINE#",
"if",
"req_flow",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"state",... | true | 116 | [
"37",
"49",
"60",
"4",
"13",
"39",
"77",
"106",
"116",
"6",
"95",
"108",
"2",
"27",
"53",
"69",
"86",
"101",
"112",
"122",
"11",
"23",
"34",
"65",
"73"
] | 1 | VARIABLE_MISUSE | [
6,
95,
108
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "google/grr/grr/gui/plugins/flow_management.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 Layout(self, request, response) :
req_flow = request.REQ.get ('flow')
if req_flow :
self.state ['flow'] = req_flow
client_id = request.REQ.get ('client_id')
if client_id :
self.state ['client_id'] = client_id
if (req_flow and (not self.IsOutputExportable (req_flow, token = request... | Yes |
120 | [
"#NEWLINE#",
"def _create_ssh(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Create ssh connection'",
"#NEWLINE#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"_client",
"=",
"paramiko",
".",
"SSHClient",
"(",
")",
"#NEWLINE#",
"self",
".",
"_client",
".",
... | true | 96 | [
"65",
"77",
"96",
"2",
"13",
"23",
"36",
"42",
"81"
] | 1 | VARIABLE_MISUSE | [
2,
13,
23,
36,
42,
81
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 87,
"after_index": 91,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "nvbn/coviolations_web/nodes/utils.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def _create_ssh(self) :
'Create ssh connection'
try :
self._client = paramiko.SSHClient ()
self._client.set_missing_host_key_policy (paramiko.AutoAddPolicy ())
self._client.connect (self._get_ip (), username = 'root', password = settings.PYRAX_PASSWORD)
except paramiko.Authenticati... | Yes |
121 | [
"#NEWLINE#",
"@",
"classmethod",
"#NEWLINE#",
"def isa(",
"cls",
",",
"filename",
")",
":",
"#NEWLINE#",
"#INDENT#",
"basename",
"=",
"os",
".",
"path",
".",
"basename",
"(",
"filename",
")",
"#NEWLINE#",
"if",
"basename",
".",
"startswith",
"(",
"'.'",
")",... | true | 40 | [
"5",
"38",
"40",
"51",
"7",
"20",
"49",
"12",
"18",
"24"
] | 1 | VARIABLE_MISUSE | [
5
] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "behave/behave/bin/make_localpi.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... | @ classmethod
def isa(cls, filename) :
basename = os.path.basename (filename)
if basename.startswith ('.') :
return False
for pattern in pattern.PATTERNS :
if fnmatch (filename, pattern) :
return True
return False
Is there a bug in the code above? | Yes |
122 | [
"#NEWLINE#",
"def test_strategy_restore_method_creates_new_instance(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"new_instance",
",",
"user_input",
",",
"snapshot_ids",
",",
"errors",
")",
"=",
"InstanceBackupStrategy",
".",
"deserialize_instance",
"(",
"self",
".",... | true | 75 | [
"10",
"29",
"8",
"49",
"60",
"2",
"21",
"27",
"32",
"45",
"56",
"64",
"71",
"79",
"12",
"75",
"14",
"36",
"41"
] | 1 | VARIABLE_MISUSE | [
8,
49,
60
] | [
[
{
"before_index": 6,
"after_index": 26,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 31,
"after_index": 37,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 44,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "opennode/nodeconductor/nodeconductor/iaas/tests/backup/test_instance_backup.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_strategy_restore_method_creates_new_instance(self) :
(new_instance, user_input, snapshot_ids, errors) = InstanceBackupStrategy.deserialize_instance (self.backup.metadata, self.user_input)
self.assertIsNone (errors, ('Deserialization errors: %s' % errors))
self.assertEqual (new_instance.name, 'ne... | Yes |
123 | [
"#NEWLINE#",
"def user_get_object_permissions_as_choices(",
"self",
",",
"instance",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"\\n Get a list of strings representing the user's permissions for this object\\n \"",
"#NEWLINE#",
"return",
"self",
".",
"get_object_perm",
"(",
"self",
... | true | 16 | [
"2",
"12",
"16",
"4"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 17,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "callowayproject/django-objectpermissions/objectpermissions/registration.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 user_get_object_permissions_as_choices(self, instance) :
"
Get a list of strings representing the user's permissions for this object
"
return self.get_object_perm (self, 'choices')
Is there a bug in the code above? | Yes |
124 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"dtype",
"=",
"'floatX'",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"_dtype",
"=",
"self",
".",
"_clean_dtype_arg",
"(",
"self",
")",
"#NEWLINE#",
"super",
"(",
"SequenceMaskSpace",
",",
"self",
")",
".",
"__i... | true | 19 | [
"2",
"11",
"15",
"19",
"26",
"4",
"31"
] | 1 | VARIABLE_MISUSE | [
4,
31
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lisa-lab/pylearn2/pylearn2/sandbox/rnn/space/__init__.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, dtype = 'floatX') :
self._dtype = self._clean_dtype_arg (self)
super (SequenceMaskSpace, self).__init__ (dtype)
Is there a bug in the code above? | Yes |
125 | [
"#NEWLINE#",
"def evaluate(",
"self",
",",
"environment",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Evaluate a marker.\\n\\n Return the boolean from evaluating the given marker against the\\n environment. environment is an optional argument to override all or\\n pa... | true | 43 | [
"2",
"39",
"43",
"13",
"28",
"4",
"21",
"32"
] | 1 | VARIABLE_MISUSE | [
13,
28
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pypa/pip/pip/_vendor/packaging/markers.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 evaluate(self, environment = None) :
'Evaluate a marker.
Return the boolean from evaluating the given marker against the
environment. environment is an optional argument to override all or
part of the determined environment.
The environment is determined from the current Pytho... | Yes |
126 | [
"#NEWLINE#",
"def fetch(",
"self",
",",
"path",
")",
":",
"#NEWLINE#",
"#INDENT#",
"body",
"=",
"self",
".",
"get_object",
"(",
"path",
")",
".",
"get",
"(",
")",
"[",
"'Body'",
"]",
"#NEWLINE#",
"data",
"=",
"bytes",
"(",
")",
"#NEWLINE#",
"for",
"chu... | true | 58 | [
"2",
"11",
"4",
"15",
"58",
"32",
"54",
"9",
"39",
"25",
"52"
] | 1 | VARIABLE_MISUSE | [
25,
52
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 28... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dcos/dcos/release/storage/aws.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 fetch(self, path) :
body = self.get_object (path).get () ['Body']
data = bytes ()
for chunk in iter ((lambda : body.read (4096)), b'') :
data += chunk
return path
Is there a bug in the code above? | Yes |
127 | [
"#NEWLINE#",
"def upload(",
"self",
",",
"destination_path",
",",
"blob",
"=",
"None",
",",
"local_path",
"=",
"None",
",",
"no_cache",
"=",
"None",
",",
"content_type",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"extra_args",
"=",
"{",
"#NEWLINE#",
"#I... | true | 136 | [
"2",
"62",
"14",
"35",
"10",
"72",
"85",
"92",
"4",
"66",
"18",
"48",
"57",
"97",
"107",
"136",
"60",
"101",
"127",
"25",
"39",
"52",
"110",
"6",
"78",
"122",
"133"
] | 1 | VARIABLE_MISUSE | [
25,
39,
52,
110
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 27,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 34,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dcos/dcos/release/storage/aws.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 upload(self, destination_path, blob = None, local_path = None, no_cache = None, content_type = None) :
extra_args = {
}
if no_cache :
extra_args ['CacheControl'] = 'no-cache'
if content_type :
extra_args ['ContentType'] = content_type
s3_object = self.get_object (destination_... | Yes |
128 | [
"#NEWLINE#",
"def maxProduct(",
"self",
",",
"nums",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"not",
"nums",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"0",
"#NEWLINE#",
"#UNINDENT#",
"n",
"=",
"len",
"(",
"nums",
")",
"#NEWLINE#",
"smallest",
"=",
... | true | 127 | [
"35",
"91",
"104",
"146",
"2",
"127",
"42",
"140",
"144",
"154",
"21",
"56",
"61",
"75",
"87",
"100",
"111",
"123",
"136",
"28",
"68",
"78",
"114",
"50",
"65",
"70",
"81",
"94",
"106",
"117",
"130",
"148",
"4",
"12",
"25",
"32",
"39",
"44",
... | 1 | VARIABLE_MISUSE | [
35,
91,
104,
146
] | [
[
{
"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": 20,
"after_index": 24... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "algorhythms/LintCode/Maximum Product Subarray.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 maxProduct(self, nums) :
if (not nums) :
return 0
n = len (nums)
smallest = list (nums)
largest = list (nums)
maxa = nums [0]
for i in xrange (1, n) :
v = nums [i]
smallest [i] = min (v, (smallest [(i - 1)] * v), (largest [(i - 1)] * v))
largest [i] = ma... | Yes |
129 | [
"#NEWLINE#",
"def test_main(",
"monkeypatch",
",",
"capsys",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Test if main commmand shows help when called without the subcommand.'",
"#NEWLINE#",
"monkeypatch",
".",
"setattr",
"(",
"sys",
",",
"'argv'",
",",
"[",
"'pytest-bdd'",
"]",
... | true | 60 | [
"45",
"60",
"47",
"67",
"4",
"50",
"2",
"11",
"24"
] | 1 | VARIABLE_MISUSE | [
47,
67
] | [
[
{
"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": 16,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pytest-dev/pytest-bdd/tests/scripts/test_main.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_main(monkeypatch, capsys) :
'Test if main commmand shows help when called without the subcommand.'
monkeypatch.setattr (sys, 'argv', ['pytest-bdd'])
monkeypatch.setattr (sys, 'exit', (lambda x : x))
main ()
(out, err) = capsys.readouterr ()
assert ('usage: pytest-bdd [-h]' in out)... | Yes |
130 | [
"#NEWLINE#",
"def _get_single_external(",
"self",
",",
"index",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"GEOSGeometry",
"(",
"capi",
".",
"geom_clone",
"(",
"self",
".",
"_get_single_internal",
"(",
"self",
")",
")",
",",
"srid",
"=",
"self",
".",
"srid",... | true | 20 | [
"2",
"16",
"20",
"26",
"4"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 10... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "AppScale/appscale/AppServer/lib/django-1.2/django/contrib/gis/geos/polygon.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 _get_single_external(self, index) :
return GEOSGeometry (capi.geom_clone (self._get_single_internal (self)), srid = self.srid)
Is there a bug in the code above? | Yes |
131 | [
"#NEWLINE#",
"def test_og_follow(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"#NEWLINE#",
"graph",
"=",
"self",
".",
"thi",
".",
"graph",
"(",
")",
"#NEWLINE#",
"path",
"=",
"'me/og.follows'",
"#NEWLINE#",
"result",
"=",
"graph",
".",
"set",
"(",
... | true | 63 | [
"19",
"29",
"63",
"9",
"15",
"25",
"59",
"50",
"23",
"44",
"52",
"57",
"2",
"11",
"33",
"40"
] | 1 | VARIABLE_MISUSE | [
50
] | [
[
{
"before_index": 8,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "tschellenbach/Django-facebook/open_facebook/tests.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_og_follow(self) :
return
graph = self.thi.graph ()
path = 'me/og.follows'
result = graph.set (path, profile = self.guy.id)
self.assertTrue (result ['id'])
remove_path = result ['id']
deleted = graph.delete (path)
Is there a bug in the code above? | Yes |
132 | [
"#NEWLINE#",
"def get_color(",
"self",
",",
"raw_line",
")",
":",
"#NEWLINE#",
"#INDENT#",
"color",
"=",
"color_map",
"[",
"'white'",
"]",
"#NEWLINE#",
"line",
"=",
"raw_line",
".",
"strip",
"(",
")",
"#NEWLINE#",
"keywords",
"=",
"[",
"'if'",
",",
"'else'",... | true | 53 | [
"9",
"64",
"96",
"120",
"146",
"170",
"202",
"226",
"241",
"16",
"81",
"113",
"137",
"163",
"187",
"219",
"4",
"18",
"24",
"221",
"2",
"53"
] | 1 | VARIABLE_MISUSE | [
16,
81,
113,
137,
163,
187,
219
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 21... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "richrd/suplemon/suplemon/linelight/php.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_color(self, raw_line) :
color = color_map ['white']
line = raw_line.strip ()
keywords = ['if', 'else', 'finally', 'try', 'catch', 'foreach', 'while', 'continue', 'pass', 'break']
if helpers.starts (self, ['include', 'require']) :
color = color_map ['blue']
else :
if helper... | Yes |
133 | [
"#NEWLINE#",
"def make_request(",
"self",
",",
"action",
",",
"body",
"=",
"''",
",",
"callback",
"=",
"None",
",",
"object_hook",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Make an asynchronous HTTP request to DynamoDB. Callback should\\n operate on the decoded j... | true | 250 | [
"23",
"79",
"266",
"4",
"33",
"35",
"160",
"2",
"29",
"52",
"57",
"73",
"131",
"152",
"156",
"191",
"210",
"222",
"228",
"250",
"256",
"270",
"141",
"200",
"202",
"14",
"45",
"47",
"276",
"278",
"184",
"215",
"234",
"10",
"41",
"43",
"260",
"... | 1 | VARIABLE_MISUSE | [
184,
215,
234
] | [
[
{
"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": "viewfinderco/viewfinder/backend/db/asyncdynamo.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 make_request(self, action, body = '', callback = None, object_hook = None) :
'Make an asynchronous HTTP request to DynamoDB. Callback should
operate on the decoded json response (with object hook applied, of
course). It should also accept an error argument, which will be a
boto.exception.DynamoDBRe... | Yes |
134 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"username",
"=",
"None",
",",
"api_token",
"=",
"None",
",",
"url_prefix",
"=",
"None",
",",
"requests_per_second",
"=",
"None",
",",
"access_token",
"=",
"None",
",",
"cache",
"=",
"None",
",",
"proxy_host",
"=",
... | true | 47 | [
"24",
"47",
"205",
"207",
"244",
"246",
"2",
"43",
"49",
"55",
"61",
"76",
"87",
"103",
"114",
"125",
"143",
"150",
"155",
"164",
"171",
"178",
"197",
"232",
"250",
"32",
"229",
"8",
"51",
"53",
"28",
"190",
"227",
"20",
"57",
"59",
"36",
"69... | 1 | VARIABLE_MISUSE | [
4,
45
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 42,
"after_index": 47,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 48,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ask/python-github2/github2/request.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, username = None, api_token = None, url_prefix = None, requests_per_second = None, access_token = None, cache = None, proxy_host = None, proxy_port = None, github_url = None) :
self.username = cache
self.api_token = api_token
self.access_token = access_token
self.url_prefix = url_p... | Yes |
135 | [
"#NEWLINE#",
"def write_index(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"index",
"=",
"self",
".",
"screenshot_root",
".",
"child",
"(",
"'index.rst'",
")",
"#NEWLINE#",
"if",
"self",
".",
"ref",
":",
"#NEWLINE#",
"#INDENT#",
"content",
"=",
"'.. _{0}:\\n\\n... | true | 113 | [
"90",
"25",
"41",
"46",
"59",
"70",
"79",
"101",
"105",
"116",
"133",
"2",
"9",
"19",
"31",
"54",
"64",
"74",
"95",
"113",
"86",
"7",
"129",
"88",
"92"
] | 1 | VARIABLE_MISUSE | [
88
] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 45,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lsaffre/lino/lino/api/selenium.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 write_index(self) :
index = self.screenshot_root.child ('index.rst')
if self.ref :
content = '.. _{0}:
'.format (self.ref)
else :
content = ''
content += rstgen.header (1, self.title)
content += '
'
if self.intro :
content += unindent (self.intro)
content... | Yes |
136 | [
"#NEWLINE#",
"def Deserializer(",
"object_list",
",",
"**options",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"\\n Deserialize simple Python objects back into Django ORM instances.\\n\\n It's expected that you pass the Python objects themselves (instead of a\\n stream or a string) to the constr... | false | 0 | [
"39",
"59",
"83",
"129",
"156",
"data",
"11",
"48",
"use_natural_keys",
"2",
"25",
"object_list",
"13",
"options",
"29",
"85",
"94",
"125",
"152",
"doc_cls",
"23",
"33",
"41",
"53",
"64",
"78",
"102",
"114",
"134",
"d"
] | 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": 18,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "zbyte64/django-dockit/dockit/core/serializers/python.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 Deserializer(object_list, **options) :
"
Deserialize simple Python objects back into Django ORM instances.
It's expected that you pass the Python objects themselves (instead of a
stream or a string) to the constructor
"
use_natural_keys = options.get ('use_natural_keys', True)
for d ... | No |
137 | [
"#NEWLINE#",
"def test_has_module_perms(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"perms",
"=",
"[",
"'permission.add_article'",
",",
"'permission.change_article'",
",",
"'permission.delete_article'",
"]",
"#NEWLINE#",
"app_labels",
"=",
"[",
"'permission'",
"]",
"#NE... | false | 0 | [
"7",
"perms",
"17",
"40",
"61",
"app_labels",
"76",
"169",
"backend",
"2",
"82",
"93",
"111",
"129",
"147",
"165",
"173",
"181",
"192",
"210",
"228",
"246",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lambdalisue/django-permission/src/permission/tests/test_backends.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_has_module_perms(self) :
perms = ['permission.add_article', 'permission.change_article', 'permission.delete_article']
app_labels = ['permission']
registry.get_handlers = MagicMock (return_value = [MagicMock (get_supported_app_labels = MagicMock (return_value = app_labels), has_module_perms = Mag... | No |
138 | [
"#NEWLINE#",
"@",
"login_required",
"#NEWLINE#",
"def published_to_edited(",
"request",
",",
"id",
")",
":",
"#NEWLINE#",
"#INDENT#",
"def transform(",
"entry",
")",
":",
"#NEWLINE#",
"#INDENT#",
"dict",
"=",
"entry",
".",
"__dict__",
".",
"copy",
"(",
")",
"#NE... | false | 0 | [
"13",
"20",
"80",
"99",
"116",
"119",
"entry",
"114",
"transform",
"5",
"request",
"47",
"55",
"70",
"92",
"112",
"131",
"draft",
"7",
"109",
"id"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 27,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lethain/lifeflow/editor/views.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ login_required
def published_to_edited(request, id) :
def transform(entry) :
dict = entry.__dict__.copy ()
dict ['edited'] = True
del dict ['body_html']
del dict ['id']
draft = Draft (** dict)
draft.save ()
for field in MANY_TO_MANY_FIELDS :
... | No |
139 | [
"#NEWLINE#",
"def _find_app_protocol(",
"self",
",",
"function_name",
",",
"candidates",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Return the first protocol in candidates whihc\\n is supported by this device. additionally, check\\n that the datatypes which are returned by t... | false | 0 | [
"40",
"102",
"133",
"data_type_cls",
"2",
"17",
"26",
"130",
"self",
"13",
"32",
"62",
"89",
"115",
"128",
"cls",
"4",
"73",
"95",
"113",
"148",
"function_name",
"49",
"54",
"nm",
"6",
"21",
"75",
"candidates",
"24",
"56",
"93",
"119",
"data_types"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "braiden/python-ant-downloader/antd/garmin.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 _find_app_protocol(self, function_name, candidates) :
'
Return the first protocol in candidates whihc
is supported by this device. additionally, check
that the datatypes which are returned by the give
protocol are implented by this python module.
If not a warning is logg... | No |
140 | [
"#NEWLINE#",
"def decode_packet(",
"self",
",",
"pid",
",",
"length",
",",
"data",
")",
":",
"#NEWLINE#",
"#INDENT#",
"data",
"=",
"super",
"(",
"DownloadProtocol",
",",
"self",
")",
".",
"decode_packet",
"(",
"pid",
",",
"length",
",",
"data",
")",
"#NEWL... | false | 0 | [
"8",
"13",
"28",
"54",
"79",
"106",
"135",
"data",
"2",
"19",
"39",
"48",
"66",
"73",
"91",
"100",
"self",
"4",
"24",
"37",
"52",
"64",
"77",
"89",
"104",
"pid",
"6",
"26",
"length"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "braiden/python-ant-downloader/antd/garmin.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 decode_packet(self, pid, length, data) :
data = super (DownloadProtocol, self).decode_packet (pid, length, data)
try :
if (pid == self.link_proto.PID_RECORDS) :
self.on_start (pid, data)
else :
if (pid in self.pid_data) :
self.on_data (pid, data)
else ... | No |
141 | [
"#NEWLINE#",
"def find_arduino_sdks(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"Finds the SDK and return the path.\\n settings_versions is a version as string we want to find. EX: '1.0.5'\"",
"#NEWLINE#",
"paths_to_look",
"=",
"_get_all_arduino_sdk_paths",
"(",
")",
"#NEWLINE#",
"valid_v... | false | 0 | [
"14",
"38",
"52",
"valid_versions",
"8",
"22",
"paths_to_look",
"20",
"30",
"43",
"sdk_path",
"26",
"34",
"45",
"version"
] | 0 | NONE | [] | [
[
{
"before_index": 5,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 7,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 16... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "biicode/client/setups/finders/arduino_sdk_finder.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_arduino_sdks() :
"Finds the SDK and return the path.
settings_versions is a version as string we want to find. EX: '1.0.5'"
paths_to_look = _get_all_arduino_sdk_paths ()
valid_versions = []
for sdk_path in paths_to_look :
version = valid_arduino_sdk_version (sdk_path)
... | No |
142 | [
"#NEWLINE#",
"def assertResultSetEqual(",
"self",
",",
"actual",
",",
"expected",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"assertEqual",
"(",
"set",
"(",
"actual",
")",
",",
"set",
"(",
"expected",
")",
")"
] | false | 0 | [
"4",
"17",
"actual",
"2",
"11",
"self",
"6",
"22",
"expected"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "torchbox/wagtail/wagtail/wagtailcore/tests/test_permission_policies.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 assertResultSetEqual(self, actual, expected) :
self.assertEqual (set (actual), set (expected))
Is there a bug in the code above? | No |
143 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"root",
",",
"encoding",
"=",
"'utf8'",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Construct a new TIMIT corpus reader in the given directory.\\n :param root: The root directory for this corpus.\\n '",
"#NEWLINE#",
"if",
"... | false | 0 | [
"6",
"18",
"27",
"39",
"61",
"63",
"encoding",
"4",
"50",
"54",
"84",
"104",
"root",
"115",
"125",
"u",
"71",
"80",
"name",
"2",
"48",
"56",
"66",
"86",
"94",
"100",
"106",
"127",
"self"
] | 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": 15,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "nltk/nltk/nltk/corpus/reader/timit.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, root, encoding = 'utf8') :
'
Construct a new TIMIT corpus reader in the given directory.
:param root: The root directory for this corpus.
'
if isinstance (encoding, compat.string_types) :
encoding = [('.*\\.wav', None), ('.*', encoding)]
CorpusReader.__init... | No |
144 | [
"#NEWLINE#",
"def phones(",
"self",
",",
"utterances",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"[",
"line",
".",
"split",
"(",
")",
"[",
"(",
"-",
"1",
")",
"]",
"for",
"fileid",
"in",
"self",
".",
"_utterance_fileids",
"(",
"utterances... | false | 0 | [
"13",
"36",
"45",
"line",
"4",
"31",
"utterances",
"2",
"27",
"38",
"self",
"25",
"42",
"fileid"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "nltk/nltk/nltk/corpus/reader/timit.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 phones(self, utterances = None) :
return [line.split () [(- 1)] for fileid in self._utterance_fileids (utterances, '.phn') for line in self.open (fileid) if line.strip ()]
Is there a bug in the code above? | No |
145 | [
"#NEWLINE#",
"def startup(",
"name",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Start Traffic Server on the local node.\\n\\n .. code-block:: yaml\\n\\n startup_ats:\\n trafficserver.startup\\n '",
"#NEWLINE#",
"ret",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'name'",
... | false | 0 | [
"2",
"16",
"name",
"9",
"50",
"58",
"68",
"75",
"83",
"ret"
] | 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": 42,
"after_index": 44... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "saltstack/salt/salt/states/trafficserver.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 startup(name) :
'
Start Traffic Server on the local node.
.. code-block:: yaml
startup_ats:
trafficserver.startup
'
ret = {
'name' : name,
'changes' : {
},
'result' : None,
'comment' : '',
}
if __opts__ ['test'] :
... | No |
146 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"*",
"args",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"super",
"(",
"_BaseImageServiceTests",
",",
"self",
")",
".",
"__init__",
"(",
"*",
"args",
",",
"**",
"kwargs",
")",
"#NEWLINE#",
"self",
".",
"se... | false | 0 | [
"25",
"kwargs",
"2",
"16",
"28",
"34",
"self",
"5",
"22",
"args"
] | 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": 11,
"after_index": 23,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "nii-cloud/dodai-compute/nova/tests/api/openstack/test_images.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, * args, **kwargs) :
super (_BaseImageServiceTests, self).__init__ (* args, ** kwargs)
self.service = None
self.context = None
Is there a bug in the code above? | No |
147 | [
"#NEWLINE#",
"def test_exit(",
"self",
",",
"space",
")",
":",
"#NEWLINE#",
"#INDENT#",
"with",
"self",
".",
"raises",
"(",
"space",
",",
"'SystemExit'",
")",
":",
"#NEWLINE#",
"#INDENT#",
"space",
".",
"execute",
"(",
"'Kernel.exit'",
")",
"#NEWLINE#",
"#UNIN... | false | 0 | [
"4",
"14",
"21",
"34",
"41",
"space",
"2",
"10",
"30",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 40,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "topazproject/topaz/tests/modules/test_kernel.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_exit(self, space) :
with self.raises (space, 'SystemExit') :
space.execute ('Kernel.exit')
with self.raises (space, 'SystemExit') :
space.execute ('exit')
Is there a bug in the code above? | No |
148 | [
"#NEWLINE#",
"def fork_and_wait(",
"self",
",",
"space",
",",
"capfd",
",",
"code",
")",
":",
"#NEWLINE#",
"#INDENT#",
"cpid",
"=",
"os",
".",
"fork",
"(",
")",
"#NEWLINE#",
"if",
"(",
"cpid",
"==",
"0",
")",
":",
"#NEWLINE#",
"#INDENT#",
"try",
":",
"... | false | 0 | [
"13",
"23",
"63",
"cpid",
"8",
"38",
"code",
"71",
"err",
"4",
"34",
"space",
"6",
"74",
"capfd",
"2",
"self",
"69",
"81",
"out"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "topazproject/topaz/tests/modules/test_kernel.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 fork_and_wait(self, space, capfd, code) :
cpid = os.fork ()
if (cpid == 0) :
try :
space.execute (code)
finally :
os._exit (0)
else :
os.waitpid (cpid, 0)
(out, err) = capfd.readouterr ()
return out
Is there a bug in the code above? | No |
149 | [
"#NEWLINE#",
"def unseen(",
"self",
",",
"limit",
"=",
"10",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"self",
".",
"listup",
"(",
"limit",
",",
"'UNSEEN'",
")"
] | false | 0 | [
"2",
"12",
"self",
"4",
"16",
"limit"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "keitaoouchi/easyimap/easyimap/easyimap.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 unseen(self, limit = 10) :
return self.listup (limit, 'UNSEEN')
Is there a bug in the code above? | No |
150 | [
"#NEWLINE#",
"def solve_univariate_inequality(",
"expr",
",",
"gen",
",",
"relational",
"=",
"True",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"Solves a real univariate inequality.\\n\\n Examples\\n ========\\n\\n >>> from sympy.solvers.inequalities import solve_univariate_inequality\\... | false | 0 | [
"457",
"512",
"583",
"630",
"pt",
"61",
"83",
"652",
"671",
"678",
"rv",
"212",
"556",
"include_x",
"425",
"510",
"628",
"valid",
"344",
"441",
"462",
"471",
"523",
"572",
"589",
"598",
"603",
"611",
"614",
"619",
"641",
"start",
"403",
"409",
"464... | 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": 21,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sympy/sympy/sympy/solvers/inequalities.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 solve_univariate_inequality(expr, gen, relational = True) :
"Solves a real univariate inequality.
Examples
========
>>> from sympy.solvers.inequalities import solve_univariate_inequality
>>> from sympy.core.symbol import Symbol
>>> x = Symbol('x')
>>> solve_univariate_inequality(x**2... | No |
151 | [
"#NEWLINE#",
"@",
"classmethod",
"#NEWLINE#",
"def define_tables(",
"cls",
",",
"metadata",
")",
":",
"#NEWLINE#",
"#INDENT#",
"Table",
"(",
"'single'",
",",
"metadata",
",",
"Column",
"(",
"'id'",
",",
"Integer",
",",
"primary_key",
"=",
"True",
")",
",",
"... | false | 0 | [
"5",
"cls",
"7",
"16",
"48",
"80",
"107",
"metadata"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 43,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "zzzeek/sqlalchemy/test/ext/test_automap.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... | @ classmethod
def define_tables(cls, metadata) :
Table ('single', metadata, Column ('id', Integer, primary_key = True), Column ('type', String (10)), test_needs_fk = True)
Table ('joined_base', metadata, Column ('id', Integer, primary_key = True), Column ('type', String (10)), test_needs_fk = True)
Tabl... | No |
152 | [
"#NEWLINE#",
"def get_first(",
"dct",
",",
"*",
"keys",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Given a dictionary, find the value for the first available key in the\\n list of keys. Otherwise, return none.\\n '",
"#NEWLINE#",
"for",
"key",
"in",
"keys",
":",
"#NEWLINE#",... | false | 0 | [
"13",
"21",
"31",
"key",
"5",
"15",
"keys",
"2",
"23",
"29",
"dct"
] | 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": 9,
"after_index": 10,
... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "heiskr/sagefy/server/modules/util.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def get_first(dct, * keys) :
'
Given a dictionary, find the value for the first available key in the
list of keys. Otherwise, return none.
'
for key in keys :
if (key in dct) :
return dct [key]
return None
Is there a bug in the code above? | No |
153 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"capacity",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"cap",
"=",
"capacity",
"#NEWLINE#",
"self",
".",
"map",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"#NEWLINE#",
"#UNINDENT#",
"}",
"#NEWLINE#",
"self",
".",
"head",... | false | 0 | [
"4",
"13",
"capacity",
"2",
"9",
"15",
"26",
"32",
"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": "algorhythms/LintCode/LRU Cache.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, capacity) :
self.cap = capacity
self.map = {
}
self.head = None
self.tail = None
Is there a bug in the code above? | No |
154 | [
"#NEWLINE#",
"def register_json_consumer(",
"self",
",",
"queue_name",
",",
"callback",
")",
":",
"#NEWLINE#",
"#INDENT#",
"def wrapped_callback(",
"ch",
",",
"method",
",",
"properties",
",",
"body",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"callback",
"(",
"... | false | 0 | [
"6",
"24",
"callback",
"4",
"40",
"queue_name",
"2",
"36",
"self",
"42",
"wrapped_callback"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 35,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "zulip/zulip/zerver/lib/queue.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 register_json_consumer(self, queue_name, callback) :
def wrapped_callback(ch, method, properties, body) :
return callback (ujson.loads (body))
return self.register_consumer (queue_name, wrapped_callback)
Is there a bug in the code above? | No |
155 | [
"#NEWLINE#",
"def configure(",
"ctx",
")",
":",
"#NEWLINE#",
"#INDENT#",
"ctx",
".",
"env",
".",
"has_mpi",
"=",
"False",
"#NEWLINE#",
"mpiccpath",
"=",
"ctx",
".",
"find_program",
"(",
"'mpicc'",
")",
"#NEWLINE#",
"if",
"mpiccpath",
":",
"#NEWLINE#",
"#INDENT... | false | 0 | [
"37",
"53",
"78",
"envmpi",
"76",
"94",
"envmpibld",
"15",
"25",
"63",
"73",
"mpiccpath",
"2",
"7",
"17",
"29",
"39",
"47",
"56",
"66",
"80",
"88",
"ctx"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "baudren/montepython_public/wrapper_wmap/waf_tools/mpicc_extra.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 configure(ctx) :
ctx.env.has_mpi = False
mpiccpath = ctx.find_program ('mpicc')
if mpiccpath :
ctx.env.has_mpi = True
envmpi = ctx.env.copy ()
ctx.setenv ('mpi', envmpi)
ctx.env.CC = [mpiccpath]
ctx.env.LINK_CC = [mpiccpath]
envmpibld = envmpi = c... | No |
156 | [
"#NEWLINE#",
"def get_labels_turbine(",
"self",
",",
"turbine",
",",
"feature_window",
",",
"horizon",
",",
"padding",
"=",
"0",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Get labels for a given turbine, consisting of the values of the\\n corrected score for one turbine dependend ... | false | 0 | [
"4",
"24",
"88",
"turbine",
"8",
"34",
"77",
"horizon",
"10",
"37",
"60",
"padding",
"2",
"self",
"19",
"48",
"62",
"timesteps",
"67",
"95",
"offset",
"44",
"83",
"100",
"labels",
"56",
"72",
"85",
"t",
"6",
"32",
"74",
"feature_window"
] | 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": 18,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cigroup-ol/windml/windml/mapping/power_mapping.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 get_labels_turbine(self, turbine, feature_window, horizon, padding = 0) :
'Get labels for a given turbine, consisting of the values of the
corrected score for one turbine dependend on feature window, horizon and
optionally a certain padding.
Parameters
----------
turbin... | No |
157 | [
"#NEWLINE#",
"def test_get_by_uuid(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"with",
"mock",
".",
"patch",
".",
"object",
"(",
"db",
",",
"'ec2_snapshot_get_by_uuid'",
")",
"as",
"get",
":",
"#NEWLINE#",
"#INDENT#",
"get",
".",
"return_value",
"=",
"fake_map... | false | 0 | [
"29",
"52",
"smap",
"2",
"37",
"44",
"48",
"self",
"19",
"23",
"get"
] | 0 | NONE | [] | [
[
{
"before_index": 18,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/objects/test_ec2.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_get_by_uuid(self) :
with mock.patch.object (db, 'ec2_snapshot_get_by_uuid') as get :
get.return_value = fake_map
smap = ec2_obj.EC2SnapshotMapping.get_by_uuid (self.context, 'fake-uuid-2')
self._compare (self, fake_map, smap)
Is there a bug in the code above? | No |
158 | [
"#NEWLINE#",
"def test_many_to_many_unsaved(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"source",
"=",
"ManyToManySource",
"(",
"name",
"=",
"'source-unsaved'",
")",
"#NEWLINE#",
"serializer",
"=",
"ManyToManySourceSerializer",
"(",
"source",
")",
"#NEWLINE#",
"expect... | false | 0 | [
"2",
"48",
"57",
"self",
"7",
"20",
"source",
"23",
"65",
"expected",
"16",
"61",
"serializer"
] | 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": 22,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "tomchristie/django-rest-framework/tests/test_relations_pk.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_many_to_many_unsaved(self) :
source = ManyToManySource (name = 'source-unsaved')
serializer = ManyToManySourceSerializer (source)
expected = {
'id' : None,
'name' : 'source-unsaved',
'targets' : [],
}
with self.assertNumQueries (0) :
self.assertEqual (se... | No |
159 | [
"#NEWLINE#",
"def test_mon_help(",
"self",
",",
"capsys",
")",
":",
"#NEWLINE#",
"#INDENT#",
"with",
"pytest",
".",
"raises",
"(",
"SystemExit",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"parser",
".",
"parse_args",
"(",
"'mon --help'",
".",
"split",
"("... | false | 0 | [
"36",
"err",
"2",
"19",
"self",
"34",
"49",
"56",
"63",
"out",
"4",
"39",
"capsys"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 32,
"after_index": 42,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 45,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ceph/ceph-deploy/ceph_deploy/tests/parser/test_mon.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_mon_help(self, capsys) :
with pytest.raises (SystemExit) :
self.parser.parse_args ('mon --help'.split ())
(out, err) = capsys.readouterr ()
assert ('usage: ceph-deploy mon' in out)
assert ('positional arguments:' in out)
assert ('optional arguments:' in out)
Is there a bug in th... | No |
160 | [
"#NEWLINE#",
"def addSkip(",
"self",
",",
"test",
",",
"reason",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"\\n Report that the given test was skipped.\\n\\n In Trial, tests can be 'skipped'. Tests are skipped mostly because\\n there is some platform or configuration issue that... | false | 0 | [
"6",
"22",
"reason",
"2",
"13",
"self",
"4",
"20",
"test"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "twisted/twisted/twisted/trial/reporter.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 addSkip(self, test, reason) :
"
Report that the given test was skipped.
In Trial, tests can be 'skipped'. Tests are skipped mostly because
there is some platform or configuration issue that prevents them from
being run correctly.
@type test: L{pyunit.TestCase}
... | No |
161 | [
"#NEWLINE#",
"def _getPreludeSegments(",
"self",
",",
"testID",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Return a list of all non-leaf segments to display in the tree.\\n\\n Normally this is the module and class name.\\n '",
"#NEWLINE#",
"segments",
"=",
"testID",
".... | false | 0 | [
"46",
"48",
"77",
"seg",
"2",
"self",
"11",
"31",
"40",
"43",
"55",
"65",
"85",
"segments",
"4",
"13",
"testID"
] | 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": 19,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "twisted/twisted/twisted/trial/reporter.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 _getPreludeSegments(self, testID) :
'
Return a list of all non-leaf segments to display in the tree.
Normally this is the module and class name.
'
segments = testID.split ('.') [: (- 1)]
if (len (segments) == 0) :
return segments
segments = [seg for seg in ('.'.join... | No |
162 | [
"#NEWLINE#",
"def getLogger(",
"name",
")",
":",
"#NEWLINE#",
"#INDENT#",
"log",
"=",
"logging",
".",
"getLogger",
"(",
"name",
")",
"#NEWLINE#",
"log",
".",
"setLevel",
"(",
"logging",
".",
"DEBUG",
")",
"#NEWLINE#",
"fh",
"=",
"logging",
".",
"FileHandler"... | false | 0 | [
"2",
"13",
"name",
"7",
"16",
"55",
"63",
"log",
"25",
"34",
"43",
"59",
"fh"
] | 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": 24,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "darknessomi/musicbox/NEMbox/logger.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 getLogger(name) :
log = logging.getLogger (name)
log.setLevel (logging.DEBUG)
fh = logging.FileHandler (FILE_NAME)
fh.setLevel (logging.DEBUG)
fh.setFormatter (logging.Formatter ('%(asctime)s - %(levelname)s - %(name)s:%(lineno)s: %(message)s'))
log.addHandler (fh)
return log
Is... | No |
163 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"object",
",",
"language_code",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"object",
"=",
"object",
"#NEWLINE#",
"self",
".",
"language",
"=",
"(",
"language_code",
"or",
"object",
".",
"get_current_... | false | 0 | [
"2",
"13",
"19",
"33",
"41",
"self",
"6",
"24",
"language_code",
"4",
"15",
"17",
"26",
"45",
"object"
] | 0 | NONE | [] | [
[
{
"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": "edoburu/django-parler/parler/utils/context.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, object, language_code = None) :
self.object = object
self.language = (language_code or object.get_current_language ())
self.old_language = get_language ()
self.old_parler_language = object.get_current_language ()
Is there a bug in the code above? | No |
164 | [
"#NEWLINE#",
"def __new__(",
"cls",
",",
"time",
",",
"volume",
",",
"fade_type",
"=",
"'exponential'",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"super",
"(",
"VolumeBreakpoint",
",",
"cls",
")",
".",
"__new__",
"(",
"cls",
",",
"time",
",",
"volume",
... | false | 0 | [
"2",
"20",
"25",
"cls",
"8",
"31",
"fade_type",
"4",
"27",
"time",
"6",
"29",
"volume"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 26,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ucbvislab/radiotool/radiotool/composer/volumebreakpoint.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 __new__(cls, time, volume, fade_type = 'exponential') :
return super (VolumeBreakpoint, cls).__new__ (cls, time, volume, fade_type)
Is there a bug in the code above? | No |
165 | [
"#NEWLINE#",
"@",
"contextlib",
".",
"contextmanager",
"#NEWLINE#",
"def get_backend(",
"backend_uri",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"tmp_dir",
"=",
"None",
"#NEWLINE#",
"if",
"(",
"not",
"backend_uri",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
... | false | 0 | [
"176",
"180",
"conn",
"83",
"138",
"169",
"189",
"backend",
"7",
"21",
"40",
"56",
"69",
"91",
"121",
"146",
"backend_uri",
"101",
"156",
"e",
"14",
"61",
"74",
"108",
"113",
"126",
"135",
"198",
"204",
"tmp_dir"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 8,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/taskflow/taskflow/examples/example_utils.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ contextlib.contextmanager
def get_backend(backend_uri = None) :
tmp_dir = None
if (not backend_uri) :
if (len (sys.argv) > 1) :
backend_uri = str (sys.argv [1])
if (not backend_uri) :
tmp_dir = tempfile.mkdtemp ()
backend_uri = ('file:///%s' % tmp_dir)
try ... | No |
166 | [
"#NEWLINE#",
"def _get_server_version_info(",
"self",
",",
"connection",
")",
":",
"#NEWLINE#",
"#INDENT#",
"version",
"=",
"re",
".",
"search",
"(",
"'Release ([\\\\d\\\\.]+)'",
",",
"connection",
".",
"connection",
".",
"dbversion",
")",
".",
"group",
"(",
"1",
... | false | 0 | [
"35",
"38",
"x",
"4",
"17",
"19",
"connection",
"9",
"40",
"version",
"2",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 29,
"after_index": 31... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/dialects/oracle/zxjdbc.py",
"license": "mit",
"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 _get_server_version_info(self, connection) :
version = re.search ('Release ([\\d\\.]+)', connection.connection.dbversion).group (1)
return tuple ((int (x) for x in version.split ('.')))
Is there a bug in the code above? | No |
167 | [
"#NEWLINE#",
"def make_meetup_blueprint(",
"key",
"=",
"None",
",",
"secret",
"=",
"None",
",",
"scope",
"=",
"None",
",",
"redirect_url",
"=",
"None",
",",
"redirect_to",
"=",
"None",
",",
"login_url",
"=",
"None",
",",
"authorized_url",
"=",
"None",
",",
... | false | 0 | [
"10",
"43",
"46",
"69",
"71",
"scope",
"30",
"101",
"103",
"session_class",
"26",
"97",
"99",
"authorized_url",
"22",
"93",
"95",
"login_url",
"53",
"110",
"119",
"129",
"148",
"154",
"meetup_bp",
"6",
"67",
"secret",
"18",
"89",
"91",
"redirect_to",
"... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 40,
"after_index": 41,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 42,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "singingwolfboy/flask-dance/flask_dance/contrib/meetup.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 make_meetup_blueprint(key = None, secret = None, scope = None, redirect_url = None, redirect_to = None, login_url = None, authorized_url = None, session_class = None, backend = None) :
'
Make a blueprint for authenticating with Meetup using OAuth 2. This requires
an OAuth consumer from Meetup. You shou... | No |
168 | [
"#NEWLINE#",
"def test_hash_memory_storage_pcabp(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"train_vectors",
"=",
"numpy",
".",
"random",
".",
"randn",
"(",
"10",
",",
"100",
")",
"#NEWLINE#",
"hash1",
"=",
"PCABinaryProjections",
"(",
"'testPCABPHash'",
",",
"... | false | 0 | [
"105",
"147",
"158",
"i",
"2",
"31",
"55",
"65",
"78",
"91",
"138",
"self",
"40",
"51",
"73",
"86",
"99",
"153",
"hash2",
"7",
"28",
"train_vectors",
"122",
"149",
"160",
"j",
"20",
"37",
"69",
"82",
"95",
"109",
"126",
"142",
"hash1"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 30,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pixelogik/NearPy/nearpy/tests/hash_storage_tests.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_hash_memory_storage_pcabp(self) :
train_vectors = numpy.random.randn (10, 100)
hash1 = PCABinaryProjections ('testPCABPHash', 4, train_vectors)
self.memory.store_hash_configuration (hash1)
hash2 = PCABinaryProjections (None, None, None)
hash2.apply_config (self.memory.load_hash_configu... | No |
169 | [
"#NEWLINE#",
"def test_export_one_network_none_specified(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"fname",
"=",
"os",
".",
"path",
".",
"join",
"(",
"TEMP_DIR",
",",
"'test'",
")",
"#NEWLINE#",
"self",
".",
"controller",
".",
"clear",
"(",
")",
"#NEWLINE#",... | false | 0 | [
"2",
"20",
"45",
"self",
"7",
"53",
"68",
"79",
"fname"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 27,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "PMEAL/OpenPNM/test/unit/Base/ControllerTest.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_export_one_network_none_specified(self) :
fname = os.path.join (TEMP_DIR, 'test')
self.controller.clear ()
OpenPNM.Network.Cubic (shape = [3, 3, 3])
self.controller.export (filename = fname, fileformat = 'VTK')
assert os.path.isfile ((fname + '.vtp'))
os.remove ((fname + '.vtp')) ... | No |
170 | [
"#NEWLINE#",
"def testCumMin(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"v",
"=",
"numpy",
".",
"array",
"(",
"[",
"5",
",",
"6",
",",
"4",
",",
"5",
",",
"1",
"]",
")",
"#NEWLINE#",
"u",
"=",
"Util",
".",
"cumMin",
"(",
"v",
")",
"#NEWLINE#",
... | false | 0 | [
"2",
"self",
"7",
"32",
"59",
"84",
"93",
"96",
"117",
"v",
"26",
"39",
"78",
"91",
"111",
"124",
"u"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": 31,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 34,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "charanpald/APGL/apgl/util/test/UtilTest.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 testCumMin(self) :
v = numpy.array ([5, 6, 4, 5, 1])
u = Util.cumMin (v)
nptst.assert_array_equal (u, numpy.array ([5, 5, 4, 4, 1]))
v = numpy.array ([5, 4, 3, 2, 1])
u = Util.cumMin (v)
nptst.assert_array_equal (u, v)
v = numpy.array ([1, 2, 3])
u = Util.cumMin (v)
npts... | No |
171 | [
"#NEWLINE#",
"def processBody(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Retrieve the body of the response, encoding it into a usuable\\n form based on the media-type (mime-type)\\n '",
"#NEWLINE#",
"handlerName",
"=",
"self",
".",
"mangled_mtype",
"(",
")... | false | 0 | [
"2",
"11",
"21",
"25",
"self",
"17",
"31",
"handler",
"9",
"23",
"handlerName"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 22... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "jpaugh/agithub/agithub/base.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 processBody(self) :
'
Retrieve the body of the response, encoding it into a usuable
form based on the media-type (mime-type)
'
handlerName = self.mangled_mtype ()
handler = getattr (self, handlerName, self.application_octect_stream)
return handler ()
Is there a bug in t... | No |
172 | [
"#NEWLINE#",
"def run_cmd(",
"cmd",
",",
"attempts",
"=",
"1",
")",
":",
"#NEWLINE#",
"#INDENT#",
"' Runs a command attempts times, logging its output. Returns True if it\\n succeeds once, or False if it never does. '",
"#NEWLINE#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"for",
... | false | 0 | [
"111",
"124",
"e",
"18",
"i",
"4",
"22",
"attempts",
"27",
"45",
"55",
"proc",
"2",
"33",
"71",
"88",
"119",
"cmd"
] | 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": 17,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CiscoCloud/mantl/testing/build-cluster.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_cmd(cmd, attempts = 1) :
' Runs a command attempts times, logging its output. Returns True if it
succeeds once, or False if it never does. '
try :
for i in range (attempts) :
proc = subprocess.Popen (cmd, stdin = open (devnull, 'r'))
proc.wait ()
if ... | No |
173 | [
"#NEWLINE#",
"def test_internal_symlinks_relative(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"dir_a_b",
"=",
"self",
".",
"_create_directory",
"(",
"'a/b'",
")",
"#NEWLINE#",
"dir_p",
"=",
"self",
".",
"_create_directory",
"(",
"'p'",
")",
"#NEWLINE#",
"os",
".... | false | 0 | [
"16",
"62",
"dir_p",
"7",
"37",
"dir_a_b",
"2",
"9",
"18",
"43",
"50",
"65",
"self"
] | 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": "GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/tools/devappserver2/inotify_file_watcher_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 test_internal_symlinks_relative(self) :
dir_a_b = self._create_directory ('a/b')
dir_p = self._create_directory ('p')
os.symlink ('../../p', os.path.join (dir_a_b, 'p'))
self._create_directory ('p/q/r')
self._watcher.start ()
shutil.rmtree (dir_p)
self._watcher.changes ()
Is the... | No |
174 | [
"#NEWLINE#",
"def _active_mounts_freebsd(",
"ret",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n List active mounts on FreeBSD systems\\n '",
"#NEWLINE#",
"for",
"line",
"in",
"__salt__",
"[",
"'cmd.run_stdout'",
"]",
"(",
"'mount -p'",
")",
".",
"split",
"(",
"'\\n'",
... | false | 0 | [
"27",
"46",
"57",
"65",
"75",
"comps",
"2",
"44",
"92",
"ret",
"10",
"37",
"line"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 7,
"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": 21,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "saltstack/salt/salt/modules/mount.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 _active_mounts_freebsd(ret) :
'
List active mounts on FreeBSD systems
'
for line in __salt__ ['cmd.run_stdout'] ('mount -p').split ('
') :
comps = re.sub ('\\s+', ' ', line).split ()
ret [comps [1]] = {
'device' : comps [0],
'fstype' : comps [2],
... | No |
175 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"cfg_manager",
")",
":",
"#NEWLINE#",
"#INDENT#",
"super",
"(",
"DigilentAdept",
",",
"self",
")",
".",
"__init__",
"(",
")",
"#NEWLINE#",
"self",
".",
"_cfg_manager",
"=",
"cfg_manager",
"#NEWLINE#",
"self",
".",
"_l... | false | 0 | [
"4",
"24",
"cfg_manager",
"2",
"13",
"20",
"26",
"36",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 24... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "weblabdeusto/weblabdeusto/server/src/weblab/experiment/devices/xilinx/programmers/digilent_adept.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, cfg_manager) :
super (DigilentAdept, self).__init__ ()
self._cfg_manager = cfg_manager
self._lock = threading.Lock ()
self._busy = False
Is there a bug in the code above? | No |
176 | [
"#NEWLINE#",
"def _create_tree_space(",
"self",
",",
"target_tree_id",
",",
"num_trees",
"=",
"1",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Creates space for a new tree by incrementing all tree ids\\n greater than ``target_tree_id``.\\n '",
"#NEWLINE#",
"qs",
"="... | false | 0 | [
"6",
"42",
"58",
"num_trees",
"15",
"30",
"qs",
"2",
"17",
"26",
"37",
"46",
"self",
"4",
"23",
"53",
"target_tree_id"
] | 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": "django-mptt/django-mptt/mptt/managers.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 _create_tree_space(self, target_tree_id, num_trees = 1) :
'
Creates space for a new tree by incrementing all tree ids
greater than ``target_tree_id``.
'
qs = self._mptt_filter (tree_id__gt = target_tree_id)
self._mptt_update (qs, tree_id = (F (self.tree_id_attr) + num_trees)) ... | No |
177 | [
"#NEWLINE#",
"def load(",
"self",
",",
"irc",
",",
"msg",
",",
"args",
",",
"optlist",
",",
"name",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"[--deprecated] <plugin>\\n\\n Loads the plugin <plugin> from any of the directories in\\n conf.supybot.directories.plugins; usuall... | false | 0 | [
"10",
"30",
"optlist",
"2",
"self",
"4",
"72",
"81",
"122",
"160",
"195",
"207",
"228",
"250",
"irc",
"25",
"36",
"option",
"103",
"230",
"module",
"27",
"argument",
"143",
"150",
"189",
"213",
"e",
"6",
"msg",
"222",
"235",
"cb",
"19",
"43",
"11... | 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": 18,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ProgVal/Limnoria/plugins/Owner/plugin.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 load(self, irc, msg, args, optlist, name) :
"[--deprecated] <plugin>
Loads the plugin <plugin> from any of the directories in
conf.supybot.directories.plugins; usually this includes the main
installed directory and 'plugins' in the current directory.
--deprecated is necessary i... | No |
178 | [
"#NEWLINE#",
"def save(",
"self",
",",
"data",
",",
"mode",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"not",
"self",
".",
"name",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"name",
"=",
"uuid4",
"(",
")",
".",
"hex",
"#NEWLINE#",
... | false | 0 | [
"2",
"16",
"23",
"39",
"43",
"50",
"self",
"4",
"48",
"data",
"6",
"mode"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 33,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "django-import-export/django-import-export/import_export/tmp_storages.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 save(self, data, mode = None) :
if (not self.name) :
self.name = uuid4 ().hex
cache.set ((self.CACHE_PREFIX + self.name), data, self.CACHE_LIFETIME)
Is there a bug in the code above? | No |
179 | [
"#NEWLINE#",
"@",
"classmethod",
"#NEWLINE#",
"def resource_uri(",
"cls",
",",
"obj",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"object_id",
"=",
"'id'",
"#NEWLINE#",
"if",
"(",
"obj",
"is not",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"object_id",
"="... | false | 0 | [
"7",
"20",
"29",
"obj",
"5",
"cls",
"14",
"27",
"39",
"object_id"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "treeio/treeio/treeio/core/administration/api/handlers.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... | @ classmethod
def resource_uri(cls, obj = None) :
object_id = 'id'
if (obj is not None) :
object_id = obj.id
return ('api_admin_users', [object_id])
Is there a bug in the code above? | No |
180 | [
"#NEWLINE#",
"def testModule_aliasInScope(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Tests that goog.module style aliases are supported.'",
"#NEWLINE#",
"input_lines",
"=",
"[",
"\"goog.module('test.module');\"",
",",
"\"var AliasedClass = goog.require('goog.AliasedClass');\"",
",... | false | 0 | [
"2",
"25",
"38",
"45",
"self",
"23",
"49",
"namespaces_info",
"36",
"53",
"namespaceToken",
"9",
"29",
"input_lines"
] | 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": 22,
"after_index": 30... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "google/closure-linter/closure_linter/closurizednamespacesinfo_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 testModule_aliasInScope(self) :
'Tests that goog.module style aliases are supported.'
input_lines = ["goog.module('test.module');", "var AliasedClass = goog.require('goog.AliasedClass');", 'goog.scope(function() {', 'var x = new AliasedClass();', '});']
namespaces_info = self._GetNamespacesInfoForScr... | No |
181 | [
"#NEWLINE#",
"def testScope_usedTypeAlias(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Tests aliased symbols in type annotations.'",
"#NEWLINE#",
"input_lines",
"=",
"[",
"'goog.scope(function() {'",
",",
"'var Event = goog.events.Event;'",
",",
"'/** @type {Event} */;'",
",",
... | false | 0 | [
"21",
"40",
"namespaces_info",
"37",
"77",
"illegal_alias_stmts",
"9",
"27",
"input_lines",
"35",
"57",
"missing_requires",
"2",
"23",
"46",
"60",
"self"
] | 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": 20,
"after_index": 28... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "google/closure-linter/closure_linter/closurizednamespacesinfo_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 testScope_usedTypeAlias(self) :
'Tests aliased symbols in type annotations.'
input_lines = ['goog.scope(function() {', 'var Event = goog.events.Event;', '/** @type {Event} */;', '});']
namespaces_info = self._GetNamespacesInfoForScript (input_lines, ['goog'])
(missing_requires, illegal_alias_stm... | No |
182 | [
"#NEWLINE#",
"def _GetNamespacesInfoForScript(",
"self",
",",
"script",
",",
"closurized_namespaces",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"_",
",",
"namespaces_info",
")",
"=",
"self",
".",
"_GetStartTokenAndNamespacesInfoForScript",
"(",
"script",
",... | false | 0 | [
"16",
"29",
"namespaces_info",
"4",
"23",
"script",
"6",
"25",
"closurized_namespaces",
"2",
"19",
"self",
"14",
"_"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "google/closure-linter/closure_linter/closurizednamespacesinfo_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 _GetNamespacesInfoForScript(self, script, closurized_namespaces = None) :
(_, namespaces_info) = self._GetStartTokenAndNamespacesInfoForScript (script, closurized_namespaces)
return namespaces_info
Is there a bug in the code above? | No |
183 | [
"#NEWLINE#",
"@",
"staticmethod",
"#NEWLINE#",
"def from_stream(",
"body",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"msg_type",
",",
"length",
")",
"=",
"struct",
".",
"unpack",
"(",
"'!BI'",
",",
"(",
"(",
"body",
"[",
"0",
"]",
"+",
"'\\x00'",
")",
"+",... | false | 0 | [
"11",
"43",
"56",
"100",
"141",
"msg_type",
"13",
"70",
"76",
"147",
"length",
"92",
"111",
"type",
"108",
"125",
"size",
"5",
"24",
"32",
"61",
"63",
"80",
"115",
"122",
"body",
"106",
"143",
"obj"
] | 0 | NONE | [] | [
[
{
"before_index": 9,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 41,
"after_index": 44,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 60,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "google/nogotofail/nogotofail/mitm/util/tls/types/handshake.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... | @ staticmethod
def from_stream(body) :
(msg_type, length) = struct.unpack ('!BI', ((body [0] + '\x00') + body [1 : 4]))
if (msg_type not in name_map) :
raise ValueError (('Unknown HanshakeMessage type %d' % msg_type))
body = body [4 : (4 + length)]
if (length != len (body)) :
raise Tl... | No |
184 | [
"#NEWLINE#",
"def act(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"workerName",
"=",
"self",
".",
"get",
"(",
"'name'",
",",
"''",
")",
"#NEWLINE#",
"if",
"(",
"not",
"workerName",
")",
":",
"#NEWLINE#",
"#INDENT#",
"logger",
".",
"error",
"(",
"'empty w... | false | 0 | [
"7",
"21",
"51",
"57",
"72",
"workerName",
"2",
"9",
"34",
"self",
"66",
"75",
"88",
"105",
"engine"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 42,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "xumiao/pymonk/monk/roles/administrator.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 act(self) :
workerName = self.get ('name', '')
if (not workerName) :
logger.error ('empty worker name {}'.format (self.decodedMessage))
return
logger.info ('worker {} unregistering'.format (workerName))
if (workerName in admin.workers) :
engine = admin.workers [workerName]... | No |
185 | [
"#NEWLINE#",
"def __init__(",
"cls",
",",
"name",
",",
"bases",
",",
"dct",
")",
":",
"#NEWLINE#",
"#INDENT#",
"super",
"(",
"NULLType",
",",
"cls",
")",
".",
"__init__",
"(",
"name",
",",
"bases",
",",
"dct",
")"
] | false | 0 | [
"6",
"24",
"bases",
"4",
"22",
"name",
"8",
"26",
"dct",
"2",
"17",
"cls"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "kdart/pycopia/aid/pycopia/aid.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__(cls, name, bases, dct) :
super (NULLType, cls).__init__ (name, bases, dct)
Is there a bug in the code above? | No |
186 | [
"#NEWLINE#",
"def __setattr__(",
"self",
",",
"name",
",",
"value",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"setattr",
"(",
"connections",
"[",
"DEFAULT_DB_ALIAS",
"]",
",",
"name",
",",
"value",
")"
] | false | 0 | [
"6",
"21",
"value",
"4",
"19",
"name",
"2",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "django/django/django/db/__init__.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 __setattr__(self, name, value) :
return setattr (connections [DEFAULT_DB_ALIAS], name, value)
Is there a bug in the code above? | No |
187 | [
"#NEWLINE#",
"def flatzset(",
"iterable",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"iterable",
":",
"#NEWLINE#",
"#INDENT#",
"c",
"=",
"flat2d",
"(",
"iterable",
")",
"#NEWLINE#",
"if",
"kwargs",
":",
"#NEWLINE#",
"#I... | false | 0 | [
"2",
"14",
"22",
"iterable",
"6",
"26",
"38",
"49",
"57",
"kwargs",
"18",
"30",
"34",
"53",
"65",
"c"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 62,
"after_index": 6... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lsbardel/python-stdnet/stdnet/utils/__init__.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def flatzset(iterable = None, kwargs = None) :
if iterable :
c = flat2d (iterable)
if kwargs :
c = chain (c, _flatzsetdict (kwargs))
else :
if kwargs :
c = _flatzsetdict (kwargs)
return tuple (c)
Is there a bug in the code above? | No |
188 | [
"#NEWLINE#",
"def _load_json_config(",
"self",
",",
"context",
")",
":",
"#NEWLINE#",
"#INDENT#",
"user_config_file",
"=",
"self",
".",
"_get_raw_json_config",
"(",
"context",
".",
"resolver",
")",
"#NEWLINE#",
"config_file",
"=",
"self",
".",
"_generate_workgen_confi... | false | 0 | [
"2",
"11",
"22",
"57",
"64",
"80",
"self",
"39",
"49",
"fh",
"43",
"61",
"68",
"86",
"113",
"config_data",
"9",
"26",
"user_config_file",
"105",
"115",
"wfh",
"4",
"15",
"28",
"context",
"20",
"36",
"100",
"124",
"config_file"
] | 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": 19,
"after_index": 27... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ARM-software/workload-automation/wlauto/workloads/rt_app/__init__.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def _load_json_config(self, context) :
user_config_file = self._get_raw_json_config (context.resolver)
config_file = self._generate_workgen_config (user_config_file, context.output_directory)
with open (config_file) as fh :
config_data = json.load (fh, object_pairs_hook = OrderedDict)
self._upd... | No |
189 | [
"#NEWLINE#",
"@",
"has_access",
"#NEWLINE#",
"@",
"expose",
"(",
"'/runsql/'",
",",
"methods",
"=",
"[",
"'POST'",
",",
"'GET'",
"]",
")",
"#NEWLINE#",
"@",
"log_this",
"#NEWLINE#",
"def runsql(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Runs arbitrary sql a... | false | 0 | [
"29",
"33",
"77",
"280",
"session",
"75",
"128",
"134",
"mydb",
"66",
"90",
"database_id",
"158",
"194",
"qry",
"132",
"198",
"232",
"eng",
"41",
"59",
"68",
"data",
"57",
"145",
"147",
"171",
"190",
"226",
"228",
"sql",
"263",
"273",
"e",
"123",
... | 0 | NONE | [] | [
[
{
"before_index": 26,
"after_index": 27,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": 34,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 36,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "airbnb/caravel/caravel/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... | @ has_access
@ expose ('/runsql/', methods = ['POST', 'GET'])
@ log_this
def runsql(self) :
'Runs arbitrary sql and returns and html table'
session = db.session ()
limit = 1000
data = json.loads (request.form.get ('data'))
sql = data.get ('sql')
database_id = data.get ('database_id')
... | No |
190 | [
"#NEWLINE#",
"def _ip_to_int(",
"self",
",",
"ip",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"'.'",
"in",
"ip",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"sum",
"(",
"[",
"int",
"(",
"x",
")",
"for",
"x",
"in",
"ip",
".",
"split",
"(",
"'.'",
... | false | 0 | [
"51",
"80",
"lo",
"49",
"75",
"hi",
"4",
"13",
"29",
"43",
"68",
"90",
"ip",
"24",
"27",
"x",
"2",
"self"
] | 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": 39,
"after_index": 42... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "disqus/gargoyle/gargoyle/builtins.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 _ip_to_int(self, ip) :
if ('.' in ip) :
return sum ([int (x) for x in ip.split ('.')])
if (':' in ip) :
(hi, lo) = struct.unpack ('!QQ', socket.inet_pton (socket.AF_INET6, ip))
return ((hi << 64) | lo)
raise ValueError (('Invalid IP Address %r' % ip))
Is there a bug in the code a... | No |
191 | [
"#NEWLINE#",
"def find_path_in_tree(",
"data",
",",
"path_tokens",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"i",
"in",
"range",
"(",
"0",
",",
"len",
"(",
"path_tokens",
")",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"isinstance",
"(",
"data",
",",
"d... | false | 0 | [
"4",
"18",
"45",
"59",
"77",
"99",
"115",
"129",
"path_tokens",
"2",
"28",
"35",
"50",
"55",
"57",
"125",
"127",
"138",
"data",
"10",
"47",
"61",
"81",
"94",
"119",
"131",
"i"
] | 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": 15,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/api/metadata/base.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 find_path_in_tree(data, path_tokens) :
for i in range (0, len (path_tokens)) :
if (isinstance (data, dict) or isinstance (data, list)) :
if (path_tokens [i] in data) :
data = data [path_tokens [i]]
else :
raise KeyError ('/'.join (path_tokens [0 : i]))
... | No |
192 | [
"#NEWLINE#",
"def _fetch_disk_image(",
"context",
",",
"session",
",",
"instance",
",",
"name_label",
",",
"image_id",
",",
"image_type",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Fetch the image from Glance\\n\\n NOTE:\\n Unlike _fetch_vhd_image, this method does not use the Glan... | false | 0 | [
"2",
"92",
"context",
"138",
"180",
"206",
"242",
"271",
"378",
"vdi_size",
"19",
"44",
"269",
"image_type_str",
"12",
"25",
"57",
"171",
"192",
"317",
"327",
"437",
"472",
"548",
"image_type",
"86",
"98",
"112",
"126",
"glance_image",
"218",
"247",
"m... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/virt/xenapi/vm_utils.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 _fetch_disk_image(context, session, instance, name_label, image_id, image_type) :
'Fetch the image from Glance
NOTE:
Unlike _fetch_vhd_image, this method does not use the Glance
plugin; instead, it streams the disks through domU to the VDI
directly.
Returns: A single filename if image_typ... | No |
193 | [
"#NEWLINE#",
"def conv2d(",
"x",
",",
"W",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Create a convolution layer, given inputs x and\\n weights W (tf.Variable)'",
"#NEWLINE#",
"return",
"tf",
".",
"nn",
".",
"conv2d",
"(",
"x",
",",
"W",
",",
"strides",
"=",
"[",
"1",
... | false | 0 | [
"2",
"18",
"x",
"4",
"20",
"W"
] | 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": 19,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "longubu/datumio/examples/tensorflow/mnist_cnn.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 conv2d(x, W) :
'Create a convolution layer, given inputs x and
weights W (tf.Variable)'
return tf.nn.conv2d (x, W, strides = [1, 1, 1, 1], padding = 'SAME')
Is there a bug in the code above? | No |
194 | [
"#NEWLINE#",
"def PowX_PowY(",
"data",
"=",
"None",
",",
"args",
"=",
"None",
",",
"eqInstance",
"=",
"None",
",",
"NameOrValueFlag",
"=",
"0",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"NameOrValueFlag",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"(",
"(",
"(",... | false | 0 | [
"2",
"72",
"87",
"112",
"data",
"14",
"22",
"NameOrValueFlag",
"6",
"45",
"54",
"77",
"92",
"args",
"10",
"eqInstance"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "zunzun/pyeq2/DataCache/DataCacheFunctions.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 PowX_PowY(data = None, args = None, eqInstance = None, NameOrValueFlag = 0) :
if NameOrValueFlag :
return (((sys._getframe ().f_code.co_name + '_') + str (args [0])) + str (args [1]))
try :
return (numpy.power (data [0], args [0]) * numpy.power (data [1], args [1]))
except :
return... | No |
195 | [
"#NEWLINE#",
"def test_outputs(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"(",
"output_value",
",",
"expected_output",
")",
"in",
"get_items",
"(",
"self",
".",
"outputs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"assert",
"(",
"self",
".",
"field",
".",
... | false | 0 | [
"9",
"31",
"output_value",
"2",
"16",
"25",
"self",
"11",
"34",
"expected_output"
] | 0 | NONE | [] | [
[
{
"before_index": 7,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 7,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "tomchristie/django-rest-framework/tests/test_fields.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_outputs(self) :
for (output_value, expected_output) in get_items (self.outputs) :
assert (self.field.to_representation (output_value) == expected_output)
Is there a bug in the code above? | No |
196 | [
"#NEWLINE#",
"def to_python(",
"self",
",",
"value",
")",
":",
"#NEWLINE#",
"#INDENT#",
"raise",
"serializers",
".",
"ValidationError",
"(",
"self",
".",
"error_messages",
"[",
"'invalid_image'",
"]",
")"
] | false | 0 | [
"4",
"value",
"2",
"14",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 11... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "tomchristie/django-rest-framework/tests/test_fields.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 to_python(self, value) :
raise serializers.ValidationError (self.error_messages ['invalid_image'])
Is there a bug in the code above? | No |
197 | [
"#NEWLINE#",
"def fire_callback_on_node_update(",
"node",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"extension",
"in",
"get_all_extensions",
"(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"extension",
".",
"on_node_update",
"(",
"node",
")"
] | false | 0 | [
"2",
"20",
"node",
"8",
"16",
"extension"
] | 0 | NONE | [] | [
[
{
"before_index": 7,
"after_index": 8,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 7,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 10... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/fuel-web/nailgun/nailgun/extensions/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 fire_callback_on_node_update(node) :
for extension in get_all_extensions () :
extension.on_node_update (node)
Is there a bug in the code above? | No |
198 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"iterable",
"=",
"(",
")",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"super",
"(",
"LayerCollection",
",",
"self",
")",
".",
"__init__",
"(",
")",
"#NEWLINE#",
"self",
".",
"update",
"(",
"iterable",
","... | false | 0 | [
"4",
"29",
"iterable",
"32",
"kwargs",
"37",
"65",
"key",
"2",
"18",
"25",
"42",
"63",
"self",
"39",
"55",
"71",
"val"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "bkg/django-spillway/spillway/collections.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, iterable = (), **kwargs) :
super (LayerCollection, self).__init__ ()
self.update (iterable, ** kwargs)
for (key, val) in self.iteritems () :
if (not isinstance (val, FeatureCollection)) :
self [key] = FeatureCollection (** val)
Is there a bug in the code above? | No |
199 | [
"#NEWLINE#",
"@",
"bound_function",
"(",
"'list.extend'",
")",
"#NEWLINE#",
"def resolve_extend(",
"self",
",",
"list",
",",
"args",
",",
"kws",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"iterable",
",",
")",
"=",
"args",
"#NEWLINE#",
"assert",
"(",
"not",
"kw... | false | 0 | [
"82",
"93",
"107",
"sig",
"58",
"75",
"103",
"unified",
"20",
"37",
"52",
"90",
"iterable",
"12",
"24",
"args",
"14",
"29",
"kws",
"50",
"68",
"70",
"101",
"dtype",
"10",
"66",
"97",
"list",
"8",
"60",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "numba/numba/numba/typing/listdecl.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... | @ bound_function ('list.extend')
def resolve_extend(self, list, args, kws) :
(iterable,) = args
assert (not kws)
if (not isinstance (iterable, types.IterableType)) :
return
dtype = iterable.iterator_type.yield_type
unified = self.context.unify_pairs (list.dtype, dtype)
if (unified is... | No |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.