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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | [
"#NEWLINE#",
"def notes(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"notes_text",
"=",
"'##\\n'",
"#NEWLINE#",
"if",
"(",
"self",
".",
"scope_options",
"[",
"'notes'",
"]",
"is not",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"line",
"i... | false | 0 | [
"28",
"52",
"line",
"2",
"7",
"15",
"30",
"44",
"59",
"70",
"78",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 77,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mozilla/inventory/dhcp/DHCP.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 notes(self) :
self.notes_text = '##
'
if (self.scope_options ['notes'] is not None) :
for line in self.scope_options ['notes'].split ('
') :
self.notes_text += (('## ' + line) + '
')
self.notes_text += '##
'
else :
self.notes_text = ''
return self.notes_text
Is there a ... | No |
201 | [
"#NEWLINE#",
"def _sync_step_from_active(",
"self",
",",
"step",
")",
":",
"#NEWLINE#",
"#INDENT#",
"item",
"=",
"self",
".",
"_get_jenkins_job",
"(",
"step",
")",
"#NEWLINE#",
"if",
"(",
"not",
"step",
".",
"data",
".",
"get",
"(",
"'uri'",
")",
")",
":",... | false | 0 | [
"4",
"15",
"21",
"33",
"52",
"65",
"71",
"97",
"110",
"118",
"130",
"158",
"173",
"186",
"197",
"step",
"2",
"11",
"48",
"169",
"self",
"9",
"40",
"59",
"80",
"90",
"124",
"140",
"145",
"175",
"item",
"46",
"67",
"69",
"node"
] | 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": 18,
"after_index": 20... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dropbox/changes/changes/backends/jenkins/builder.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 _sync_step_from_active(self, step) :
item = self._get_jenkins_job (step)
if (not step.data.get ('uri')) :
step.data ['uri'] = item ['url']
node = self._get_node (step.data ['master'], item ['builtOn'])
step.node = node
step.date_started = datetime.utcfromtimestamp ((item ['timestamp'] ... | No |
202 | [
"#NEWLINE#",
"@",
"test",
".",
"create_stubs",
"(",
"{",
"#NEWLINE#",
"#INDENT#",
"api",
".",
"keystone",
":",
"(",
"'domain_list'",
",",
"'domain_delete'",
")",
",",
"#NEWLINE#",
"#UNINDENT#",
"}",
")",
"#NEWLINE#",
"def test_delete_domain(",
"self",
")",
":",
... | false | 0 | [
"25",
"32",
"56",
"80",
"109",
"120",
"self",
"30",
"75",
"98",
"domain",
"88",
"117",
"formData",
"107",
"124",
"res"
] | 0 | NONE | [] | [
[
{
"before_index": 29,
"after_index": 37,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 42,
"after_index": 55,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 64,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Havate/havate-openstack/proto-build/gui/horizon/Horizon_GUI/openstack_dashboard/dashboards/admin/domains/tests.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ test.create_stubs ({
api.keystone : ('domain_list', 'domain_delete'),
})
def test_delete_domain(self) :
domain = self.domains.get (id = '2')
api.keystone.domain_list (IgnoreArg ()).AndReturn (self.domains.list ())
api.keystone.domain_delete (IgnoreArg (), domain.id)
self.mox.ReplayAll ()
... | No |
203 | [
"#NEWLINE#",
"def test_scalar_non_numeric(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"index",
"in",
"[",
"tm",
".",
"makeStringIndex",
",",
"tm",
".",
"makeUnicodeIndex",
",",
"tm",
".",
"makeCategoricalIndex",
",",
"tm",
".",
"makeDateIndex",
",",
"tm... | false | 0 | [
"99",
"150",
"366",
"396",
"idxr",
"173",
"182",
"191",
"229",
"238",
"247",
"error",
"335",
"343",
"356",
"388",
"398",
"410",
"s2",
"2",
"187",
"243",
"252",
"278",
"352",
"406",
"447",
"self",
"46",
"152",
"165",
"202",
"212",
"259",
"268",
"2... | 0 | NONE | [] | [
[
{
"before_index": 7,
"after_index": 8,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 7,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 37,
"after_index": 41... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pydata/pandas/pandas/tests/indexing/test_floats.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_scalar_non_numeric(self) :
for index in [tm.makeStringIndex, tm.makeUnicodeIndex, tm.makeCategoricalIndex, tm.makeDateIndex, tm.makeTimedeltaIndex, tm.makePeriodIndex] :
i = index (5)
for s in [Series (np.arange (len (i)), index = i), DataFrame (np.random.randn (len (i), len (i)), index ... | No |
204 | [
"#NEWLINE#",
"def register_defect(",
"self",
",",
"obj",
",",
"defect",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"Record 'defect' on 'obj'.\\n\\n Called by handle_defect if raise_on_defect is False. This method is\\n part of the Policy API so that Policy subclasses can implement cus... | false | 0 | [
"6",
"19",
"defect",
"2",
"self",
"4",
"13",
"obj"
] | 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": "OpenCobolIDE/OpenCobolIDE/open_cobol_ide/extlibs/future/backports/email/_policybase.py",
"license": "gpl-3.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_defect(self, obj, defect) :
"Record 'defect' on 'obj'.
Called by handle_defect if raise_on_defect is False. This method is
part of the Policy API so that Policy subclasses can implement custom
defect handling. The default implementation calls the append method of
the... | No |
205 | [
"#NEWLINE#",
"def test_get_clean_steps_custom_interface(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"with",
"task_manager",
".",
"acquire",
"(",
"self",
".",
"context",
",",
"self",
".",
"node",
".",
"uuid",
",",
"shared",
"=",
"False",
")",
"as",
"task",
":... | false | 0 | [
"2",
"12",
"16",
"44",
"58",
"62",
"self",
"27",
"37",
"task",
"31",
"48",
"69",
"response"
] | 0 | NONE | [] | [
[
{
"before_index": 26,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 27,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 30,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/ironic/ironic/tests/unit/drivers/modules/test_deploy_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... | def test_get_clean_steps_custom_interface(self) :
with task_manager.acquire (self.context, self.node.uuid, shared = False) as task :
response = utils.agent_get_clean_steps (task, interface = 'raid')
self.assertThat (response, matchers.HasLength (1))
self.assertEqual (self.clean_steps ['r... | No |
206 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"color",
",",
"*",
"args",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"logging",
".",
"Formatter",
".",
"__init__",
"(",
"self",
",",
"*",
"args",
",",
"**",
"kwargs",
")",
"#NEWLINE#",
"self",
".",
"_c... | false | 0 | [
"4",
"33",
"36",
"color",
"26",
"kwargs",
"2",
"20",
"29",
"95",
"189",
"self",
"7",
"23",
"args",
"40",
"83",
"89",
"114",
"135",
"156",
"177",
"fg_color"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 3,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 21,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "whtsky/WeRoBot/werobot/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 __init__(self, color, * args, **kwargs) :
logging.Formatter.__init__ (self, * args, ** kwargs)
self._color = color
if color :
fg_color = (curses.tigetstr ('setaf') or curses.tigetstr ('setf') or '')
if ((3, 0) < sys.version_info < (3, 2, 3)) :
fg_color = six.text_type (... | No |
207 | [
"#NEWLINE#",
"def set_focus(",
"self",
",",
"name",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"logger",
".",
"debug",
"(",
"(",
"\"Focusing plugin '%s'\"",
"%",
"name",
")",
")",
"#NEWLINE#",
"lname",
"=",
"name",
".",
"lower",
"(",
")",
"#NEWLINE#",
... | false | 0 | [
"22",
"36",
"208",
"lname",
"30",
"40",
"126",
"198",
"bnch",
"67",
"103",
"111",
"defocus",
"2",
"9",
"32",
"46",
"56",
"60",
"80",
"86",
"92",
"115",
"149",
"162",
"171",
"192",
"202",
"222",
"257",
"self",
"109",
"119",
"xname",
"124",
"128",
... | 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": 21,
"after_index": 27... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ejeschke/ginga/ginga/gw/PluginManager.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def set_focus(self, name) :
self.logger.debug (("Focusing plugin '%s'" % name))
lname = name.lower ()
bnch = self.active [lname]
if bnch.exclusive :
self.logger.debug (('focus=%s exclusive=%s' % (self.focus, self.exclusive)))
defocus = list (filter ((lambda x : (x in self.exclusive... | No |
208 | [
"#NEWLINE#",
"def test_similarity_lookup(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Test Similarity Lookup.\\n\\n Tests that a similarity lookup for a kindle returns 10 results.\\n '",
"#NEWLINE#",
"products",
"=",
"self",
".",
"amazon",
".",
"similarity_lookup",
"... | false | 0 | [
"2",
"11",
"self",
"9",
"27",
"products"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 23... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "yoavaviram/python-amazon-simple-product-api/tests.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_similarity_lookup(self) :
'Test Similarity Lookup.
Tests that a similarity lookup for a kindle returns 10 results.
'
products = self.amazon.similarity_lookup (ItemId = TEST_ASIN)
assert_true ((len (products) > 5))
Is there a bug in the code above? | No |
209 | [
"#NEWLINE#",
"def send(",
"self",
",",
"message",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Send the supplied *message* (xml string) to NETCONF server.'",
"#NEWLINE#",
"if",
"(",
"not",
"self",
".",
"connected",
")",
":",
"#NEWLINE#",
"#INDENT#",
"raise",
"TransportError",
"... | false | 0 | [
"4",
"35",
"45",
"message",
"2",
"14",
"39",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 13,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ncclient/ncclient/ncclient/transport/session.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 send(self, message) :
'Send the supplied *message* (xml string) to NETCONF server.'
if (not self.connected) :
raise TransportError ('Not connected to NETCONF server')
logger.debug (('queueing %s' % message))
self._q.put (message)
Is there a bug in the code above? | No |
210 | [
"#NEWLINE#",
"def test_parse_string_attributes(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"source",
"=",
"'\\n <multiple_attributes \"Multiple attributes\"\\n first: \"First attribute\"\\n second: \"Second attribute\">\\n '",
"#NEWLINE#",
"(",
"path",
",",
... | false | 0 | [
"7",
"21",
"source",
"12",
"path",
"2",
"17",
"35",
"71",
"107",
"self",
"14",
"26",
"62",
"98",
"resource"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mozilla/pontoon/pontoon/sync/tests/formats/test_l20n.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_parse_string_attributes(self) :
source = '
<multiple_attributes "Multiple attributes"
first: "First attribute"
second: "Second attribute">
'
(path, resource) = self.parse_string (source)
assert_attributes_equal (resource.translations [0], key = self.key ('multiple... | No |
211 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"**kw",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"prop",
"in",
"six",
".",
"iterkeys",
"(",
"self",
".",
"schema",
".",
"get",
"(",
"'properties'",
",",
"[",
"]",
")",
")",
":",
"#NEWLINE#",
"#INDENT#",
"value"... | false | 0 | [
"31",
"61",
"value",
"33",
"kw",
"10",
"37",
"42",
"48",
"59",
"prop",
"2",
"16",
"57",
"self"
] | 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": "StackStorm/st2/st2common/st2common/models/system/actionchain.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, **kw) :
for prop in six.iterkeys (self.schema.get ('properties', [])) :
value = kw.get (prop, None)
prop = string.replace (prop, '-', '_')
setattr (self, prop, value)
Is there a bug in the code above? | No |
212 | [
"#NEWLINE#",
"def _pager_help(",
"self",
",",
"text",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"\\n This function is used as a callback replacment to IPython help pager function\\n\\n It puts the 'text' value inside the self._help_text string that can be retrived via\\n get_help_t... | false | 0 | [
"2",
"13",
"22",
"33",
"self",
"4",
"26",
"37",
"text"
] | 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": 16,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ipython/ipython-py3k/IPython/deathrow/gui/wx/ipshell_nonblocking.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 _pager_help(self, text) :
"
This function is used as a callback replacment to IPython help pager function
It puts the 'text' value inside the self._help_text string that can be retrived via
get_help_text function.
"
if (self._help_text == None) :
self._help_text =... | No |
213 | [
"#NEWLINE#",
"def _add_methods(",
"klass",
",",
"method_table",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"(",
"k",
",",
"v",
")",
"in",
"method_table",
".",
"items",
"(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"setattr",
"(",
"klass",
",",
"k",
",",
"v",
")... | false | 0 | [
"4",
"16",
"method_table",
"2",
"26",
"klass",
"11",
"28",
"k",
"13",
"30",
"v"
] | 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": 9,
"after_index": 19,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudera/ibis/ibis/expr/api.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 _add_methods(klass, method_table) :
for (k, v) in method_table.items () :
setattr (klass, k, v)
Is there a bug in the code above? | No |
214 | [
"#NEWLINE#",
"def copy(",
"self",
",",
"target_placeholder",
",",
"source_language",
",",
"fieldname",
",",
"model",
",",
"target_language",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"from",
"cms.utils.copy_plugins",
"import",
"copy_plugins_to",
"#NEWLINE#",
... | false | 0 | [
"kwargs",
"4",
"38",
"96",
"target_placeholder",
"64",
"78",
"90",
"source_placeholder",
"24",
"55",
"trgt",
"8",
"36",
"70",
"fieldname",
"45",
"68",
"src",
"2",
"self",
"6",
"61",
"source_language",
"10",
"26",
"47",
"model",
"12",
"98",
"target_language... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 31,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 44,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "divio/django-cms/cms/utils/placeholder.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 copy(self, target_placeholder, source_language, fieldname, model, target_language, **kwargs) :
from cms.utils.copy_plugins import copy_plugins_to
trgt = model.objects.get (** {
fieldname : target_placeholder,
})
src = model.objects.get (master = trgt.master, language_code = source_language)... | No |
215 | [
"#NEWLINE#",
"def test_DEZipCodeField(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"error_format",
"=",
"[",
"'Enter a zip code in the format XXXXX.'",
"]",
"#NEWLINE#",
"valid",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'99423'",
":",
"'99423'",
",",
"#NEWLINE#",
"#UNINDENT... | false | 0 | [
"26",
"47",
"invalid",
"2",
"39",
"self",
"7",
"33",
"error_format",
"13",
"45",
"valid"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "AppScale/appscale/AppServer/lib/django-1.2/tests/regressiontests/forms/localflavor/de.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_DEZipCodeField(self) :
error_format = ['Enter a zip code in the format XXXXX.']
valid = {
'99423' : '99423',
}
invalid = {
' 99423' : error_format,
}
self.assertFieldOutput (DEZipCodeField, valid, invalid)
Is there a bug in the code above? | No |
216 | [
"#NEWLINE#",
"@",
"files",
"(",
"[",
"(",
"track",
",",
"(",
"'%s.%s.sets.annotator'",
"%",
"(",
"track",
"[",
":",
"(",
"-",
"len",
"(",
"'.gtf.gz'",
")",
")",
"]",
",",
"slice",
")",
")",
",",
"slice",
")",
"for",
"(",
"track",
",",
"slice",
")... | false | 0 | [
"101",
"111",
"141",
"190",
"infiles",
"66",
"89",
"109",
"129",
"infile",
"144",
"146",
"151",
"x",
"158",
"181",
"203",
"235",
"258",
"275",
"292",
"tmpdir",
"197",
"215",
"281",
"segments",
"6",
"12",
"32",
"87",
"207",
"track",
"173",
"192",
"2... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 67,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 74,
"after_index": 75,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 76,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CGATOxford/cgat/obsolete/pipeline_kamilah.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... | @ files ([(track, ('%s.%s.sets.annotator' % (track [: (- len ('.gtf.gz'))], slice)), slice) for (track, slice) in list (itertools.product ((EXPERIMENTAL_TRACKS + DERIVED_TRACKS), ('known', 'unknown', 'all', 'intronic', 'intergenic')))])
def makeAnnotatorGeneSets(infile, outfile, slice) :
'compute annotator overla... | No |
217 | [
"#NEWLINE#",
"def _get_vevent_file(",
"event_path",
")",
":",
"#NEWLINE#",
"#INDENT#",
"directory",
"=",
"(",
"'/'",
".",
"join",
"(",
"__file__",
".",
"split",
"(",
"'/'",
")",
"[",
":",
"(",
"-",
"1",
")",
"]",
")",
"+",
"'/ics/'",
")",
"#NEWLINE#",
... | false | 0 | [
"66",
"78",
"88",
"component",
"32",
"68",
"ical",
"2",
"51",
"event_path",
"7",
"48",
"directory"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 28,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 31,
"after_index": 39,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 65,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pimutils/khal/tests/aux.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_vevent_file(event_path) :
directory = ('/'.join (__file__.split ('/') [: (- 1)]) + '/ics/')
ical = icalendar.Calendar.from_ical (open (os.path.join (directory, (event_path + '.ics')), 'rb').read ())
for component in ical.walk () :
if (component.name == 'VEVENT') :
return co... | No |
218 | [
"#NEWLINE#",
"def value_to_bytes(",
"self",
",",
"obj",
",",
"value",
",",
"default_endianness",
"=",
"DEFAULT_ENDIANNESS",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"value",
"is not",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"value",
".",
"seria... | false | 0 | [
"4",
"obj",
"8",
"29",
"31",
"default_endianness",
"2",
"40",
"self",
"6",
"17",
"25",
"value"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pebble/libpebble2/libpebble2/protocol/base/types.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 value_to_bytes(self, obj, value, default_endianness = DEFAULT_ENDIANNESS) :
if (value is not None) :
return value.serialise (default_endianness = default_endianness)
else :
if self.accept_missing :
return b''
else :
raise Exception ('???')
Is there a bug in the c... | No |
219 | [
"#NEWLINE#",
"def replaceInStatus(",
"status",
")",
":",
"#NEWLINE#",
"#INDENT#",
"txt",
"=",
"gHtmlParser",
".",
"unescape",
"(",
"status",
")",
"#NEWLINE#",
"txt",
"=",
"re",
".",
"sub",
"(",
"hashtagRe",
",",
"reRepl",
",",
"txt",
")",
"#NEWLINE#",
"txt",... | false | 0 | [
"2",
"13",
"status",
"7",
"16",
"26",
"29",
"39",
"43",
"txt"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sixohsix/twitter/twitter/cmdline.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 replaceInStatus(status) :
txt = gHtmlParser.unescape (status)
txt = re.sub (hashtagRe, reRepl, txt)
txt = re.sub (profileRe, reRepl, txt)
return txt
Is there a bug in the code above? | No |
220 | [
"#NEWLINE#",
"def circuit_plot(",
"c",
",",
"nqubits",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Draw the circuit diagram for the circuit with nqubits.\\n\\n Parameters\\n ==========\\n\\n c : circuit\\n The circuit to plot. Should be a product of Ga... | false | 0 | [
"2",
"16",
"c",
"4",
"18",
"nqubits",
"21",
"kwargs"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sympy/sympy/sympy/physics/quantum/circuitplot.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 circuit_plot(c, nqubits, **kwargs) :
'Draw the circuit diagram for the circuit with nqubits.
Parameters
==========
c : circuit
The circuit to plot. Should be a product of Gate instances.
nqubits : int
The number of qubits to include in the circuit. Must... | No |
221 | [
"#NEWLINE#",
"def save_obj(",
"obj",
",",
"save_path",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Dumps a python data structure to a saved on-disk representation. We\\n currently support writing to the following file formats (expected filename\\n extension in brackets):\\n\\n * pyth... | false | 0 | [
"2",
"70",
"obj",
"4",
"14",
"22",
"34",
"48",
"58",
"63",
"74",
"save_path"
] | 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": 18,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "NervanaSystems/neon/neon/util/persist.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 save_obj(obj, save_path) :
'
Dumps a python data structure to a saved on-disk representation. We
currently support writing to the following file formats (expected filename
extension in brackets):
* python pickle (.pkl)
Arguments:
obj (object): the python object to be saved.
... | No |
222 | [
"#NEWLINE#",
"def build_context(",
"self",
",",
"context",
")",
":",
"#NEWLINE#",
"#INDENT#",
"context",
"=",
"copy",
".",
"deepcopy",
"(",
"context",
")",
"#NEWLINE#",
"c",
"=",
"self",
".",
"_context",
"(",
")",
"#NEWLINE#",
"context",
".",
"update",
"(",
... | false | 0 | [
"4",
"9",
"15",
"26",
"67",
"77",
"context",
"35",
"59",
"69",
"k",
"18",
"30",
"40",
"c",
"37",
"72",
"v",
"2",
"20",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 23... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudtools/nymms/nymms/resources.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 build_context(self, context) :
context = copy.deepcopy (context)
c = self._context ()
context.update (c)
for (k, v) in c.values () [0].iteritems () :
if (not (k == 'name')) :
context [k] = v
return context
Is there a bug in the code above? | No |
223 | [
"#NEWLINE#",
"def save_xfm(",
"self",
",",
"subject",
",",
"name",
",",
"xfm",
",",
"xfmtype",
"=",
"'magnet'",
",",
"reference",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"\\n Load a transform into the surface database. If the transform exists already, updat... | false | 0 | [
"351",
"368",
"files",
"196",
"223",
"out",
"14",
"116",
"149",
"reference",
"8",
"267",
"295",
"321",
"342",
"xfm",
"4",
"58",
"357",
"subject",
"90",
"228",
"262",
"273",
"316",
"327",
"402",
"jsdict",
"6",
"62",
"377",
"name",
"65",
"85",
"98",
... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "gallantlab/pycortex/cortex/database.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_xfm(self, subject, name, xfm, xfmtype = 'magnet', reference = None) :
"
Load a transform into the surface database. If the transform exists already, update it
If it does not exist, copy the reference epi into the filestore and insert.
Parameters
----------
subject ... | No |
224 | [
"#NEWLINE#",
"def prepare_query(",
"self",
",",
"data",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"Complete string preparation procedure for 'query' strings.\\n (without checks for unassigned codes)\\n\\n :Parameters:\\n - `data`: Unicode string to prepare.\\n\\n :return... | false | 0 | [
"2",
"13",
"21",
"29",
"39",
"47",
"55",
"self",
"4",
"11",
"17",
"27",
"33",
"37",
"43",
"53",
"59",
"66",
"73",
"79",
"84",
"data"
] | 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": "kuri65536/python-for-android/python3-alpha/python-libs/pyxmpp2/xmppstringprep.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 prepare_query(self, data) :
"Complete string preparation procedure for 'query' strings.
(without checks for unassigned codes)
:Parameters:
- `data`: Unicode string to prepare.
:return: prepared string
:raise StringprepError: if the preparation fails
"
... | No |
225 | [
"#NEWLINE#",
"def test_invalid_charset(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"HTML",
"=",
"'<head><meta http-equiv=\"Content-Type\"\\n content=\"text/html; charset=windows-874\">\\'\\n </head><body>test</body>'",
"#NEWLINE#",
"self",
".",
"serv... | false | 0 | [
"22",
"28",
"43",
"g",
"2",
"11",
"32",
"self",
"7",
"20",
"HTML"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lorien/grab/test/grab_charset_issue.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_invalid_charset(self) :
HTML = '<head><meta http-equiv="Content-Type"
content="text/html; charset=windows-874">\'
</head><body>test</body>'
self.server.response ['get.data'] = HTML
g = build_grab ()
g.go (self.server.get_url ())
print (g.doc.char... | No |
226 | [
"#NEWLINE#",
"def test_datastore_v4_api_call(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"begin_transaction_response",
"=",
"datastore_v4_pb",
".",
"BeginTransactionResponse",
"(",
")",
"#NEWLINE#",
"begin_transaction_response",
".",
"set_transaction",
"(",
"'whatever'",
")... | false | 0 | [
"41",
"55",
"begin_transaction_request",
"7",
"15",
"34",
"begin_transaction_response",
"2",
"49",
"self",
"22",
"30",
"53",
"expected_remote_response"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/tools/devappserver2/api_server_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_datastore_v4_api_call(self) :
begin_transaction_response = datastore_v4_pb.BeginTransactionResponse ()
begin_transaction_response.set_transaction ('whatever')
expected_remote_response = remote_api_pb.Response ()
expected_remote_response.set_response (begin_transaction_response.Encode ())
... | No |
227 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"channel",
",",
"level",
",",
"msg",
",",
"args",
"=",
"None",
",",
"kwargs",
"=",
"None",
",",
"exc_info",
"=",
"None",
",",
"extra",
"=",
"None",
",",
"frame",
"=",
"None",
",",
"dispatcher",
"=",
"None",
... | false | 0 | [
"30",
"144",
"151",
"155",
"163",
"dispatcher",
"18",
"88",
"93",
"100",
"102",
"exc_info",
"14",
"66",
"69",
"kwargs",
"4",
"43",
"45",
"channel",
"22",
"106",
"117",
"extra",
"8",
"49",
"51",
"msg",
"26",
"126",
"128",
"frame",
"34",
"132",
"134"... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 40,
"after_index": 45,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 46,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "getlogbook/logbook/logbook/base.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, channel, level, msg, args = None, kwargs = None, exc_info = None, extra = None, frame = None, dispatcher = None, frame_correction = 0) :
self.channel = channel
self.msg = msg
self.args = (args or ())
self.kwargs = (kwargs or {
})
self.level = level
if (not exc_... | No |
228 | [
"#NEWLINE#",
"def test_iterator(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"o",
"=",
"OptionValueContainer",
"(",
")",
"#NEWLINE#",
"o",
".",
"a",
"=",
"RankedValue",
"(",
"RankedValue",
".",
"FLAG",
",",
"3",
")",
"#NEWLINE#",
"o",
".",
"b",
"=",
"Rank... | false | 0 | [
"52",
"74",
"names",
"2",
"62",
"self",
"7",
"13",
"26",
"39",
"58",
"o"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pantsbuild/pants/tests/python/pants_test/option/test_option_value_container.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_iterator(self) :
o = OptionValueContainer ()
o.a = RankedValue (RankedValue.FLAG, 3)
o.b = RankedValue (RankedValue.FLAG, 2)
o.c = RankedValue (RankedValue.FLAG, 1)
names = list (iter (o))
self.assertListEqual (['a', 'b', 'c'], names)
Is there a bug in the code above? | No |
229 | [
"#NEWLINE#",
"def test_valid_logout(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Tests a valid logout and make sure the logout_time is updated\\n '",
"#NEWLINE#",
"response",
"=",
"self",
".",
"_login",
"(",
"is_valid",
"=",
"True",
")",
"#NEWLINE#",
"self",
".",
... | false | 0 | [
"9",
"38",
"74",
"response",
"2",
"11",
"20",
"40",
"52",
"70",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 34... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudera/hue/desktop/core/ext-py/django-axes-1.4.0/axes/tests.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_valid_logout(self) :
'Tests a valid logout and make sure the logout_time is updated
'
response = self._login (is_valid = True)
self.assertEquals (AccessLog.objects.latest ('id').logout_time, None)
response = self.client.get (reverse ('admin:logout'))
self.assertNotEquals (Acces... | No |
230 | [
"#NEWLINE#",
"@",
"trap_exit_fail",
"#NEWLINE#",
"def test_command_subcommands(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"with",
"patch",
".",
"object",
"(",
"ComplexCommandLine",
",",
"'_main'",
")",
"as",
"_main",
":",
"#NEWLINE#",
"#INDENT#",
"with",
"patch",
".",
... | false | 0 | [
"37",
"45",
"60",
"c",
"33",
"77",
"_sub",
"19",
"70",
"_main",
"43",
"64",
"args"
] | 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": 15,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "hyde/commando/commando/tests/test_commando.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... | @ trap_exit_fail
def test_command_subcommands() :
with patch.object (ComplexCommandLine, '_main') as _main :
with patch.object (ComplexCommandLine, '_sub') as _sub :
c = ComplexCommandLine ()
args = c.parse (['sub', '--launch', '--launch2', 'True'])
c.run (args)
... | No |
231 | [
"#NEWLINE#",
"def addClickListener(",
"self",
",",
"listener",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"clickListeners",
".",
"append",
"(",
"listener",
")"
] | false | 0 | [
"2",
"9",
"self",
"4",
"15",
"listener"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 12... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "anandology/pyjamas/pyjs/tests/test013.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 addClickListener(self, listener) :
self.clickListeners.append (listener)
Is there a bug in the code above? | No |
232 | [
"#NEWLINE#",
"@",
"classmethod",
"#NEWLINE#",
"def classify(",
"cls",
",",
"queue",
",",
"classifiers",
",",
"error",
",",
"threshold",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"Determine which category, if any, a signature belongs to.\\n\\n If it doesn't find a match, then it... | false | 0 | [
"48",
"86",
"95",
"matched",
"7",
"26",
"120",
"queue",
"42",
"60",
"classifier",
"13",
"68",
"threshold",
"107",
"122",
"cat_sig",
"5",
"22",
"116",
"cls",
"130",
"147",
"end",
"53",
"64",
"73",
"84",
"cat",
"9",
"44",
"classifiers",
"29",
"82",
"... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "gmcquillan/firetower/firetower/category.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 classify(cls, queue, classifiers, error, threshold) :
"Determine which category, if any, a signature belongs to.
If it doesn't find a match, then it'll save the error into a new
category, which subsequent errors are checked against.
Args:
queue: redis connec... | No |
233 | [
"#NEWLINE#",
"def __call__(",
"self",
",",
"mean",
"=",
"0",
",",
"std",
"=",
"0.1",
")",
":",
"#NEWLINE#",
"#INDENT#",
"W_values",
"=",
"np",
".",
"asarray",
"(",
"np",
".",
"random",
".",
"normal",
"(",
"loc",
"=",
"mean",
",",
"scale",
"=",
"std",... | false | 0 | [
"15",
"60",
"W_values",
"2",
"38",
"42",
"self",
"8",
"33",
"std",
"4",
"29",
"mean"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 47,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 53,
"after_index": 6... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "hycis/Pynet/pynet/weight_initialization.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 __call__(self, mean = 0, std = 0.1) :
W_values = np.asarray (np.random.normal (loc = mean, scale = std, size = (self.prev_dim, self.this_dim)), dtype = floatX)
return theano.shared (value = W_values, borrow = True)
Is there a bug in the code above? | No |
234 | [
"#NEWLINE#",
"def setup(",
"hass",
",",
"config",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Setup the Telldus Live component.'",
"#NEWLINE#",
"if",
"(",
"not",
"validate_config",
"(",
"config",
",",
"{",
"#NEWLINE#",
"#INDENT#",
"DOMAIN",
":",
"[",
"CONF_PUBLIC_KEY",
","... | false | 0 | [
"4",
"16",
"63",
"config",
"2",
"61",
"hass",
"55",
"57",
"69",
"89",
"NETWORK"
] | 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": 13,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "home-assistant/home-assistant/homeassistant/components/tellduslive.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 setup(hass, config) :
'Setup the Telldus Live component.'
if (not validate_config (config, {
DOMAIN : [CONF_PUBLIC_KEY, CONF_PRIVATE_KEY, CONF_TOKEN, CONF_TOKEN_SECRET],
}, _LOGGER)) :
_LOGGER.error ('Configuration Error: Please make sure you have configured your keys that can be aquire... | No |
235 | [
"#NEWLINE#",
"@",
"cache",
"#NEWLINE#",
"def pad_center(",
"data",
",",
"size",
",",
"axis",
"=",
"(",
"-",
"1",
")",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"Wrapper for np.pad to automatically center an array prior to padding.\\n This is analogous to `str... | false | 0 | [
"5",
"34",
"67",
"122",
"data",
"23",
"127",
"kwargs",
"56",
"72",
"124",
"lengths",
"41",
"78",
"89",
"96",
"lpad",
"9",
"38",
"74",
"axis",
"7",
"47",
"84",
"110",
"size",
"32",
"49",
"86",
"112",
"n"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 6,
"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": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "bmcfee/librosa/librosa/util/utils.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... | @ cache
def pad_center(data, size, axis = (- 1), **kwargs) :
"Wrapper for np.pad to automatically center an array prior to padding.
This is analogous to `str.center()`
Examples
--------
>>> # Generate a vector
>>> data = np.ones(5)
>>> librosa.util.pad_center(data, 10, mode='constant')
... | No |
236 | [
"#NEWLINE#",
"@",
"cache",
"#NEWLINE#",
"def fix_length(",
"data",
",",
"size",
",",
"axis",
"=",
"(",
"-",
"1",
")",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"Fix the length an array `data` to exactly `size`.\\n\\n If `data.shape[axis] < n`, pad according t... | false | 0 | [
"5",
"34",
"60",
"78",
"108",
"133",
"144",
"data",
"23",
"138",
"kwargs",
"97",
"113",
"135",
"lengths",
"50",
"65",
"80",
"slices",
"9",
"38",
"67",
"115",
"axis",
"7",
"45",
"74",
"92",
"122",
"size",
"32",
"43",
"90",
"124",
"n"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 6,
"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": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "bmcfee/librosa/librosa/util/utils.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... | @ cache
def fix_length(data, size, axis = (- 1), **kwargs) :
"Fix the length an array `data` to exactly `size`.
If `data.shape[axis] < n`, pad according to the provided kwargs.
By default, `data` is padded with trailing zeros.
Examples
--------
>>> y = np.arange(7)
>>> # Default: pad wit... | No |
237 | [
"#NEWLINE#",
"def _recv(",
"self",
",",
"*",
"expected_commands",
")",
":",
"#NEWLINE#",
"#INDENT#",
"line",
"=",
"SocketError",
".",
"wrap",
"(",
"self",
".",
"_readline",
")",
"#NEWLINE#",
"command",
"=",
"self",
".",
"_get_command",
"(",
"line",
")",
"#NE... | false | 0 | [
"10",
"27",
"42",
"52",
"76",
"line",
"46",
"62",
"84",
"result",
"21",
"32",
"48",
"72",
"82",
"command",
"2",
"16",
"23",
"self",
"5",
"34",
"expected_commands"
] | 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": 15,
... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mcuadros/pynats/pynats/connection.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 _recv(self, * expected_commands) :
line = SocketError.wrap (self._readline)
command = self._get_command (line)
if (command not in expected_commands) :
raise UnexpectedResponse (line)
result = command.match (line.encode ('utf-8'))
if (result is None) :
raise UnknownResponse (co... | No |
238 | [
"#NEWLINE#",
"def geomap(",
"self",
",",
"event",
",",
"key",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"ip",
"in",
"event",
".",
"values",
"(",
"key",
")",
":",
"#NEWLINE#",
"#INDENT#",
"result",
"=",
"self",
".",
"geoip",
"(",
"ip",
")",
"#NEWLINE#",
... | false | 0 | [
"12",
"29",
"58",
"ip",
"23",
"35",
"49",
"result",
"2",
"25",
"self",
"6",
"18",
"56",
"key",
"43",
"52",
"63",
"augmentation",
"4",
"14",
"event"
] | 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": 11,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "abusesa/abusehelper/abusehelper/bots/experts/geoipexpert.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 geomap(self, event, key) :
for ip in event.values (key) :
result = self.geoip (ip)
if (not result) :
continue
augmentation = events.Event (result)
augmentation.add (key, ip)
(yield augmentation)
Is there a bug in the code above? | No |
239 | [
"#NEWLINE#",
"def set_total_files(",
"self",
",",
"total_files",
")",
":",
"#NEWLINE#",
"#INDENT#",
"with",
"self",
".",
"_lock",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"_total_files",
"=",
"total_files"
] | false | 0 | [
"4",
"20",
"total_files",
"2",
"10",
"16",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "aws/aws-cli/awscli/customizations/s3/executor.py",
"license": "apache-2.0",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def set_total_files(self, total_files) :
with self._lock :
self._total_files = total_files
Is there a bug in the code above? | No |
240 | [
"#NEWLINE#",
"def instance_update_at_top(",
"self",
",",
"ctxt",
",",
"instance",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Update an instance at the top level cell.'",
"#NEWLINE#",
"self",
".",
"msg_runner",
".",
"instance_update_at_top",
"(",
"ctxt",
",",
"instance",
")"
] | false | 0 | [
"6",
"21",
"instance",
"4",
"19",
"ctxt",
"2",
"13",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/cells/manager.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def instance_update_at_top(self, ctxt, instance) :
'Update an instance at the top level cell.'
self.msg_runner.instance_update_at_top (ctxt, instance)
Is there a bug in the code above? | No |
241 | [
"#NEWLINE#",
"def get_progress(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'How much more time before the final materialization.'",
"#NEWLINE#",
"next",
"=",
"mktime",
"(",
"self",
".",
"nextMaterializedTime",
")",
"#NEWLINE#",
"start",
"=",
"mktime",
"(",
"self",
".... | true | 102 | [
"125",
"131",
"87",
"139",
"2",
"13",
"22",
"31",
"93",
"133",
"27",
"38",
"57",
"63",
"45",
"82",
"108",
"116",
"148",
"18",
"40",
"65",
"102",
"9",
"59"
] | 1 | VARIABLE_MISUSE | [
87,
139
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 21... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudera/hue/desktop/libs/liboozie/src/liboozie/types.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_progress(self) :
'How much more time before the final materialization.'
next = mktime (self.nextMaterializedTime)
start = mktime (self.startTime)
end = mktime (self.endTime)
if (end != start) :
progress = min (int (((1 - ((end - next) / (end - start))) * 100)), 100)
else :
... | Yes |
242 | [
"#NEWLINE#",
"def to_numeric(",
"arg",
",",
"errors",
"=",
"'raise'",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"\\n Convert argument to a numeric type.\\n\\n Parameters\\n ----------\\n arg : list, tuple, 1-d array, or Series\\n errors : {'ignore', 'raise', 'coerce'}, default 'raise... | true | 168 | [
"4",
"128",
"15",
"34",
"44",
"168",
"199",
"201",
"2",
"22",
"38",
"42",
"55",
"66",
"72",
"88",
"111",
"113",
"119",
"150",
"13",
"32",
"40",
"181",
"195",
"197",
"109",
"144",
"193",
"210",
"122",
"156",
"158"
] | 1 | VARIABLE_MISUSE | [
4,
128
] | [
[
{
"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": "pydata/pandas/pandas/tools/util.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def to_numeric(arg, errors = 'raise') :
"
Convert argument to a numeric type.
Parameters
----------
arg : list, tuple, 1-d array, or Series
errors : {'ignore', 'raise', 'coerce'}, default 'raise'
- If 'raise', then invalid parsing will raise an exception
- If 'coerce', then inv... | Yes |
243 | [
"#NEWLINE#",
"def tuple_for_index(",
"self",
",",
"index",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"index",
"<",
"0",
")",
":",
"#NEWLINE#",
"#INDENT#",
"index",
"=",
"(",
"self",
".",
"length",
"(",
")",
"+",
"index",
")",
"#NEWLINE#",
"#UNINDENT#",... | true | 121 | [
"70",
"116",
"84",
"89",
"123",
"2",
"21",
"35",
"50",
"64",
"87",
"97",
"110",
"62",
"72",
"121",
"108",
"125",
"4",
"11",
"18",
"27",
"42",
"54",
"58",
"77",
"92",
"103",
"31",
"44",
"60"
] | 1 | VARIABLE_MISUSE | [
70,
116
] | [
[
{
"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": 30,
"after_index": 34... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "richardkiss/pycoin/pycoin/blockchain/BlockChain.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 tuple_for_index(self, index) :
if (index < 0) :
index = (self.length () + index)
l = len (self._locked_chain)
if (index < l) :
return self._locked_chain [index]
index -= l
longest_chain = self._longest_local_block_chain ()
the_hash = longest_chain [((- index) - 1)]
paren... | Yes |
244 | [
"#NEWLINE#",
"def _find_K_cut(",
"self",
",",
"k",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Find the lowest level cut that has k connected components. If there are\\n no levels that have k components, then find the lowest level that has\\n at least k components. If no levels h... | true | 281 | [
"14",
"18",
"32",
"36",
"89",
"102",
"110",
"159",
"169",
"202",
"212",
"231",
"233",
"242",
"261",
"271",
"47",
"72",
"2",
"20",
"38",
"92",
"60",
"76",
"127",
"138",
"162",
"205",
"235",
"264",
"70",
"78",
"106",
"114",
"84",
"87",
"154",
"... | 1 | VARIABLE_MISUSE | [
147,
190,
249
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 13,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CoAxLab/DeBaCl/debacl/level_set_tree.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def _find_K_cut(self, k) :
'
Find the lowest level cut that has k connected components. If there are
no levels that have k components, then find the lowest level that has
at least k components. If no levels have > k components, find the
lowest level that has the maximum number of co... | Yes |
245 | [
"#NEWLINE#",
"def _links(",
"self",
",",
"req",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"dpid",
"=",
"None",
"#NEWLINE#",
"if",
"(",
"'dpid'",
"in",
"kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"dpid",
"=",
"dpid_lib",
".",
"str_to_dpid",
"(",
... | true | 76 | [
"19",
"30",
"76",
"37",
"63",
"4",
"2",
"41",
"55",
"61",
"48",
"74",
"11",
"24",
"45"
] | 1 | VARIABLE_MISUSE | [
48,
74
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "osrg/ryu/ryu/app/rest_topology.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 _links(self, req, **kwargs) :
dpid = None
if ('dpid' in kwargs) :
dpid = dpid_lib.str_to_dpid (kwargs ['dpid'])
links = get_link (self.topology_api_app, dpid)
body = json.dumps ([link.to_dict () for link in links])
return Response (content_type = 'application/json', body = kwargs)
Is... | Yes |
246 | [
"#NEWLINE#",
"def run(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"self",
".",
"distribution",
".",
"install_requires",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"distribution",
".",
"fetch_build_eggs",
"(",
"self",
".",
"distribution",
".",
"install_requ... | true | 72 | [
"2",
"8",
"16",
"22",
"31",
"39",
"45",
"54",
"66",
"78",
"94",
"105",
"109",
"60",
"72",
"85",
"101"
] | 1 | VARIABLE_MISUSE | [
2,
8,
16,
22,
31,
39,
45,
54,
66,
78,
94,
105,
109
] | [
[
{
"before_index": 7,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 30,
"after_index": 34,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 53,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "chalasr/Flask-P2P/venv/lib/python2.7/site-packages/setuptools/command/test.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 run(self) :
if self.distribution.install_requires :
self.distribution.fetch_build_eggs (self.distribution.install_requires)
if self.distribution.tests_require :
self.distribution.fetch_build_eggs (self.distribution.tests_require)
if self.test_suite :
cmd = ' '.join (self.test_args)... | Yes |
247 | [
"#NEWLINE#",
"def estimate_size(",
"self",
",",
"searcher",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"sum",
"(",
"(",
"q",
".",
"estimate_size",
"(",
"q",
")",
"for",
"q",
"in",
"self",
".",
"subqueries",
")",
")"
] | true | 17 | [
"4",
"2",
"22",
"13",
"17",
"20"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 10... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "tallstreet/Whoosh-AppEngine/src/whoosh/query.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 estimate_size(self, searcher) :
return sum ((q.estimate_size (q) for q in self.subqueries))
Is there a bug in the code above? | Yes |
248 | [
"#NEWLINE#",
"def _words(",
"self",
",",
"searcher",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"searcher",
".",
"expand_prefix",
"(",
"self",
".",
"fieldname",
",",
"searcher",
".",
"text",
")"
] | true | 18 | [
"4",
"10",
"18",
"2",
"14"
] | 1 | VARIABLE_MISUSE | [
2,
14
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 11... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "tallstreet/Whoosh-AppEngine/src/whoosh/query.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 _words(self, searcher) :
return searcher.expand_prefix (self.fieldname, searcher.text)
Is there a bug in the code above? | Yes |
249 | [
"#NEWLINE#",
"def setup(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Set up the parameters and initial values for this layer.'",
"#NEWLINE#",
"for",
"(",
"name",
",",
"layer",
")",
"in",
"self",
".",
"_resolved_inputs",
".",
"items",
"(",
")",
":",
"#NEWLINE#",
"... | true | 72 | [
"2",
"16",
"34",
"50",
"60",
"66",
"26",
"54",
"72",
"11",
"46",
"13",
"56"
] | 1 | VARIABLE_MISUSE | [
2,
16,
34,
50,
60,
66
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 21,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lmjohns3/theanets/theanets/layers/feedforward.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 setup(self) :
'Set up the parameters and initial values for this layer.'
for (name, layer) in self._resolved_inputs.items () :
label = ('w' if (len (self.inputs) == 1) else 'w_{}'.format (name))
self.add_weights (label, layer.size, self.size)
self.add_bias ('b', label.size)
Is there a... | Yes |
250 | [
"#NEWLINE#",
"@",
"test",
".",
"create_stubs",
"(",
"{",
"#NEWLINE#",
"#INDENT#",
"api",
".",
"neutron",
":",
"(",
"'network_get'",
",",
"'is_extension_supported'",
",",
"'subnetpool_list'",
")",
",",
"#NEWLINE#",
"#UNINDENT#",
"}",
")",
"#NEWLINE#",
"def test_sub... | true | 187 | [
"153",
"168",
"173",
"185",
"211",
"228",
"46",
"183",
"205",
"36",
"69",
"187",
"139",
"163",
"177",
"221",
"196",
"219",
"29",
"149",
"27",
"38",
"48",
"76",
"122",
"131",
"155",
"213",
"224"
] | 1 | VARIABLE_MISUSE | [
173,
185
] | [
[
{
"before_index": 1,
"after_index": 28,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 35,
"after_index": 43,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 45,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/horizon/openstack_dashboard/dashboards/project/networks/subnets/tests.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ test.create_stubs ({
api.neutron : ('network_get', 'is_extension_supported', 'subnetpool_list'),
})
def test_subnet_create_post_gw_inconsistent(self, test_with_subnetpool = False) :
network = self.networks.first ()
subnet = self.subnets.first ()
api.neutron.network_get (IsA (http.HttpRequest), n... | Yes |
251 | [
"#NEWLINE#",
"def list_subtitles(",
"self",
",",
"video",
",",
"languages",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"isinstance",
"(",
"video",
",",
"Episode",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"[",
"s",
"for",
"l",
"in",
"languages",
"for",
"s",... | true | 90 | [
"6",
"27",
"82",
"4",
"14",
"37",
"43",
"49",
"55",
"69",
"92",
"98",
"23",
"29",
"78",
"84",
"90",
"25",
"35",
"80",
"2",
"31",
"86"
] | 1 | VARIABLE_MISUSE | [
25,
35,
80
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Diaoul/subliminal/subliminal/providers/podnapisi.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 list_subtitles(self, video, languages) :
if isinstance (video, Episode) :
return [s for l in languages for s in self.query (l, video.series, season = video.season, episode = video.episode, year = video.year)]
else :
if isinstance (video, Movie) :
return [s for l in languages for... | Yes |
252 | [
"#NEWLINE#",
"def _create_include_macro(",
"package_template",
")",
":",
"#NEWLINE#",
"#INDENT#",
"result",
"=",
"'# include_directories(include)'",
"#NEWLINE#",
"includes",
"=",
"[",
"]",
"#NEWLINE#",
"if",
"package_template",
".",
"catkin_deps",
":",
"#NEWLINE#",
"#INDE... | true | 47 | [
"7",
"105",
"125",
"140",
"11",
"23",
"38",
"87",
"121",
"134",
"47",
"53",
"80",
"101",
"114",
"59",
"70",
"84",
"94",
"2",
"17",
"32",
"61"
] | 1 | VARIABLE_MISUSE | [
2,
17,
32,
61
] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ros-infrastructure/catkin_pkg/src/catkin_pkg/package_templates.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 _create_include_macro(package_template) :
result = '# include_directories(include)'
includes = []
if package_template.catkin_deps :
includes.append ('${catkin_INCLUDE_DIRS}')
if package_template.boost_comps :
includes.append ('${Boost_INCLUDE_DIRS}')
if deplist.system_deps :
... | Yes |
253 | [
"#NEWLINE#",
"def apply_matrix(",
"matrix",
",",
"triplet",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Apply a matrix on a value triplet\\n\\n Args:\\n matrix (3x3 numpy.matrix): matrix to apply (ex : RGB to XYZ matrix)\\n\\n triplet ([float, float, float]: ex. RGB or XYZ values\\n\\n ... | true | 17 | [
"2",
"15",
"25",
"4",
"11",
"17",
"27"
] | 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": 10,
"after_index": 16,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mikrosimage/ColorPipe-tools/utils/colors_helper.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 apply_matrix(matrix, triplet) :
'Apply a matrix on a value triplet
Args:
matrix (3x3 numpy.matrix): matrix to apply (ex : RGB to XYZ matrix)
triplet ([float, float, float]: ex. RGB or XYZ values
Returns:
.[float, float, float]
'
values = numpy.matrix (values)
r... | Yes |
254 | [
"#NEWLINE#",
"def __setattr__(",
"self",
",",
"key",
",",
"value",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"self",
".",
"__setitem__",
"(",
"key",
",",
"self",
")"
] | true | 18 | [
"6",
"4",
"16",
"2",
"12",
"18"
] | 1 | VARIABLE_MISUSE | [
6
] | [
[
{
"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": "memsql/memsql-loader/memsql_loader/util/attr_dict.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 __setattr__(self, key, value) :
return self.__setitem__ (key, self)
Is there a bug in the code above? | Yes |
255 | [
"#NEWLINE#",
"def visit_substring_func(",
"self",
",",
"func",
",",
"**kw",
")",
":",
"#NEWLINE#",
"#INDENT#",
"s",
"=",
"self",
".",
"process",
"(",
"func",
".",
"clauses",
".",
"clauses",
"[",
"0",
"]",
")",
"#NEWLINE#",
"start",
"=",
"self",
".",
"pro... | true | 82 | [
"11",
"80",
"98",
"27",
"100",
"4",
"17",
"33",
"47",
"65",
"59",
"84",
"2",
"13",
"29",
"61",
"82"
] | 1 | VARIABLE_MISUSE | [
27,
100
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/dialects/firebird/base.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 visit_substring_func(self, func, **kw) :
s = self.process (func.clauses.clauses [0])
start = self.process (func.clauses.clauses [1])
if (len (func.clauses.clauses) > 2) :
length = self.process (func.clauses.clauses [2])
return ('SUBSTRING(%s FROM %s FOR %s)' % (s, self, length))
el... | Yes |
256 | [
"#NEWLINE#",
"def main(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"delete",
"(",
"'build'",
",",
"'dist'",
",",
"'MANIFEST'",
",",
"(",
"local",
".",
"cwd",
"//",
"'*.egg-info'",
")",
")",
"#NEWLINE#",
"if",
"self",
".",
"publish",
":",
"#NEWLINE#",
"#I... | true | 127 | [
"131",
"2",
"25",
"127"
] | 1 | VARIABLE_MISUSE | [
131
] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 26,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 108,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "tomerfiliba/rpyc/build.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 main(self) :
delete ('build', 'dist', 'MANIFEST', (local.cwd // '*.egg-info'))
if self.publish :
print ('registering...')
local.python ('setup.py', 'register')
print ('uploading zip and tar.gz')
local.python ('setup.py', 'sdist', '--formats=zip,gztar', 'upload')
... | Yes |
257 | [
"#NEWLINE#",
"def fmatch_iter(",
"needle",
",",
"haystack",
",",
"min_ratio",
"=",
"0.6",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"key",
"in",
"haystack",
":",
"#NEWLINE#",
"#INDENT#",
"ratio",
"=",
"SequenceMatcher",
"(",
"None",
",",
"needle",
",",
"key",
... | true | 47 | [
"4",
"16",
"6",
"39",
"47",
"14",
"28",
"49",
"2",
"26",
"20",
"31",
"37"
] | 1 | VARIABLE_MISUSE | [
20,
31,
37
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "celery/kombu/kombu/utils/text.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 fmatch_iter(needle, haystack, min_ratio = 0.6) :
for key in haystack :
ratio = SequenceMatcher (None, needle, key).ratio ()
if (ratio >= min_ratio) :
(yield (min_ratio, key))
Is there a bug in the code above? | Yes |
258 | [
"#NEWLINE#",
"def _splitmicro(",
"micro",
",",
"releaselevel",
"=",
"''",
",",
"serial",
"=",
"''",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"(",
"index",
",",
"char",
")",
"in",
"enumerate",
"(",
"micro",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"... | true | 83 | [
"2",
"24",
"54",
"70",
"77",
"83",
"17",
"73",
"79",
"19",
"32",
"8",
"62",
"4",
"60"
] | 1 | VARIABLE_MISUSE | [
8,
62
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "celery/kombu/kombu/utils/text.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 _splitmicro(micro, releaselevel = '', serial = '') :
for (index, char) in enumerate (micro) :
if (not char.isdigit ()) :
break
else :
return (int ((micro or 0)), releaselevel, serial)
return (int (micro [: index]), micro [index :], micro)
Is there a bug in the code above? | Yes |
259 | [
"#NEWLINE#",
"def isdir(",
"self",
",",
"path",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"os",
".",
"path",
".",
"isdir",
"(",
"self",
")"
] | true | 16 | [
"4",
"12",
"2",
"16"
] | 1 | VARIABLE_MISUSE | [
4,
12
] | [
[
{
"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": 13... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "spotify/luigi/luigi/file.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 isdir(self, path) :
return os.path.isdir (self)
Is there a bug in the code above? | Yes |
260 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"path",
"=",
"None",
",",
"format",
"=",
"None",
",",
"is_tmp",
"=",
"False",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"format",
"is",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"format",
"=",
"get_default_fo... | true | 38 | [
"4",
"58",
"62",
"96",
"2",
"38",
"91",
"99",
"105",
"8",
"21",
"28",
"101",
"103",
"12",
"46",
"107",
"109"
] | 1 | VARIABLE_MISUSE | [
4,
58,
62,
96
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 35,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "spotify/luigi/luigi/file.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, path = None, format = None, is_tmp = False) :
if (format is None) :
format = get_default_format ()
if (not self) :
if (not is_tmp) :
raise Exception ('path or is_tmp must be set')
path = os.path.join (tempfile.gettempdir (), ('luigi-tmp-%09d' % random.randint (0,... | Yes |
261 | [
"#NEWLINE#",
"def test(",
"data_path",
")",
":",
"#NEWLINE#",
"#INDENT#",
"folder_data",
"=",
"[",
"'mt/'",
",",
"'t2/'",
",",
"'dmri/'",
"]",
"#NEWLINE#",
"file_data",
"=",
"[",
"'mtr.nii.gz'",
",",
"'t2.nii.gz'",
",",
"'dmri.nii.gz'",
"]",
"#NEWLINE#",
"output... | true | 738 | [
"31",
"101",
"160",
"229",
"288",
"422",
"525",
"691",
"776",
"788",
"7",
"52",
"120",
"189",
"248",
"342",
"468",
"732",
"667",
"683",
"752",
"768",
"39",
"82",
"98",
"109",
"141",
"157",
"178",
"210",
"226",
"237",
"269",
"285",
"385",
"403",
... | 1 | VARIABLE_MISUSE | [
17,
58,
126,
195,
254,
298,
474
] | [
[
{
"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": 26,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "neuropoly/spinalcordtoolbox/testing/test_sct_image.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(data_path) :
folder_data = ['mt/', 't2/', 'dmri/']
file_data = ['mtr.nii.gz', 't2.nii.gz', 'dmri.nii.gz']
output = ''
status = 0
pad = 2
cmd = (((((('sct_image -i ' + data_path) + folder_data [0]) + file_data [0]) + ' -o test.nii.gz') + ' -pad 0,0,') + str (pad))
output += ((... | Yes |
262 | [
"#NEWLINE#",
"def __contains__(",
"self",
",",
"name",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"f",
"in",
"self",
".",
"fields",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"f",
".",
"name",
"==",
"name",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"True",... | false | 0 | [
"4",
"22",
"24",
"name",
"2",
"12",
"self",
"10",
"20",
"f"
] | 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": 13,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "kuri65536/python-for-android/python3-alpha/python-libs/pyxmpp2/ext/dataforms.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 __contains__(self, name) :
for f in self.fields :
if (f.name == name) :
return True
return False
Is there a bug in the code above? | No |
263 | [
"#NEWLINE#",
"def complete_xml_element(",
"self",
",",
"xmlnode",
",",
"doc",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Complete the XML node with `self` content.\\n\\n :Parameters:\\n - `xmlnode`: XML node with the element being built. It has already\\n right name an... | false | 0 | [
"6",
"146",
"199",
"219",
"doc",
"132",
"140",
"185",
"193",
"field",
"4",
"42",
"69",
"86",
"114",
"144",
"173",
"217",
"xmlnode",
"2",
"15",
"19",
"33",
"48",
"55",
"77",
"96",
"105",
"124",
"134",
"152",
"165",
"187",
"207",
"self",
"205",
"... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "kuri65536/python-for-android/python3-alpha/python-libs/pyxmpp2/ext/dataforms.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 complete_xml_element(self, xmlnode, doc) :
'Complete the XML node with `self` content.
:Parameters:
- `xmlnode`: XML node with the element being built. It has already
right name and namespace, but no attributes or content.
- `doc`: document to which the element be... | No |
264 | [
"#NEWLINE#",
"def register_feature(",
"cls",
",",
"obj",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"hasattr",
"(",
"obj",
",",
"'fget'",
")",
":",
"#NEWLINE#",
"#INDENT#",
"name",
"=",
"obj",
".",
"fget",
".",
"__name__",
"#NEWLINE#",
"#UNINDENT#",
"else",
":... | false | 0 | [
"2",
"65",
"cls",
"19",
"42",
"55",
"70",
"name",
"4",
"12",
"21",
"35",
"44",
"57",
"obj"
] | 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": 62,
"after_index": 69... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "jumoconnect/openjumo/jumodjango/miner/classifiers/classifier.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def register_feature(cls, obj) :
if hasattr (obj, 'fget') :
name = obj.fget.__name__
else :
if hasattr (obj, '__func__') :
name = obj.__func__.__name__
else :
name = obj.__name__
features [cls].add (name)
Is there a bug in the code above? | No |
265 | [
"#NEWLINE#",
"def test_transform_geom(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"geom",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'type'",
":",
"'Polygon'",
",",
"#NEWLINE#",
"'coordinates'",
":",
"(",
"(",
"(",
"798842.3090855901",
",",
"6569056.500655151",
")",
",",
"(",
... | false | 0 | [
"213",
"226",
"238",
"247",
"264",
"276",
"285",
"306",
"318",
"327",
"347",
"result",
"6",
"221",
"255",
"293",
"335",
"geom"
] | 0 | NONE | [] | [
[
{
"before_index": 5,
"after_index": 8,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 212,
"after_index": 218,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 224,
"after_index"... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mapbox/rasterio/tests/test_warp.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_transform_geom() :
geom = {
'type' : 'Polygon',
'coordinates' : (((798842.3090855901, 6569056.500655151), (756688.2826828464, 6412397.888771972), (755571.0617232556, 6408461.009397383), (677605.2284582685, 6425600.39266733), (677605.2284582683, 6425600.392667332), (670873.3791649605, 642... | No |
266 | [
"#NEWLINE#",
"def get_flag_enums(",
"value",
")",
":",
"#NEWLINE#",
"#INDENT#",
"db",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"#NEWLINE#",
"#UNINDENT#",
"}",
"#NEWLINE#",
"db",
"[",
"'cfhdrPREV_CABINET'",
"]",
"=",
"(",
"True",
"if",
"(",
"value",
"==",
"1",
")",
... | false | 0 | [
"7",
"16",
"33",
"50",
"68",
"db",
"2",
"25",
"42",
"59",
"value"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 32,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "EmersonElectricCo/fsf/fsf-server/modules/EXTRACT_CAB.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_flag_enums(value) :
db = {
}
db ['cfhdrPREV_CABINET'] = (True if (value == 1) else False)
db ['cfhdrNEXT_CABINET'] = (True if (value == 2) else False)
db ['cfhdrRESERVE_PRESENT'] = (True if (value == 4) else False)
return db
Is there a bug in the code above? | No |
267 | [
"#NEWLINE#",
"def setup_method(",
"self",
",",
"method",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Setup method.\\n '",
"#NEWLINE#",
"for",
"i",
"in",
"range",
"(",
"5",
")",
":",
"#NEWLINE#",
"#INDENT#",
"key",
"=",
"(",
"'test'",
",",
"'demo'",
",... | false | 0 | [
"4",
"method",
"31",
"107",
"rec",
"21",
"105",
"key",
"12",
"28",
"44",
"57",
"64",
"69",
"i",
"2",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 12,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "aerospike/aerospike-client-python/test/old_tests/test_apply.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 setup_method(self, method) :
'
Setup method.
'
for i in range (5) :
key = ('test', 'demo', i)
rec = {
'name' : [('name%s' % str (i))],
'addr' : ('name%s' % str (i)),
'age' : i,
'no' : i,
'basic_map' : {
... | No |
268 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"query_or_model",
",",
"paginate_by",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"paginate_by",
"=",
"paginate_by",
"#NEWLINE#",
"if",
"isinstance",
"(",
"query_or_model",
",",
"SelectQuery",
")",
":",
"#NEWLINE#",
"... | false | 0 | [
"4",
"20",
"31",
"52",
"query_or_model",
"2",
"11",
"27",
"33",
"37",
"48",
"54",
"58",
"self",
"6",
"13",
"15",
"paginate_by"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "coleifer/flask-peewee/flask_peewee/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 __init__(self, query_or_model, paginate_by) :
self.paginate_by = paginate_by
if isinstance (query_or_model, SelectQuery) :
self.query = query_or_model
self.model = self.query.model_class
else :
self.model = query_or_model
self.query = self.model.select ()
Is there a ... | No |
269 | [
"#NEWLINE#",
"def find_version(",
"fname",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Attempts to find the version number in the file names fname.\\n Raises RuntimeError if not found.\\n '",
"#NEWLINE#",
"version",
"=",
"''",
"#NEWLINE#",
"with",
"open",
"(",
"fname",
",",
"'r'",... | false | 0 | [
"25",
"43",
"reg",
"21",
"37",
"fp",
"9",
"55",
"72",
"85",
"version",
"2",
"16",
"fname",
"35",
"47",
"line",
"41",
"51",
"57",
"m"
] | 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": 69,
"after_index": 71... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sloria/textblob-aptagger/setup.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_version(fname) :
'Attempts to find the version number in the file names fname.
Raises RuntimeError if not found.
'
version = ''
with open (fname, 'r') as fp :
reg = re.compile ('__version__ = [\\\'"]([^\\\'"]*)[\\\'"]')
for line in fp :
m = reg.match (line)... | No |
270 | [
"#NEWLINE#",
"def beginFileTransfer(",
"self",
",",
"file",
",",
"consumer",
",",
"transform",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Begin transferring a file\\n\\n @type file: Any file-like object\\n @param file: The file object to read data from\\... | false | 0 | [
"4",
"19",
"21",
"file",
"6",
"25",
"27",
"49",
"consumer",
"37",
"39",
"59",
"deferred",
"2",
"17",
"23",
"29",
"35",
"47",
"53",
"self",
"8",
"31",
"33",
"transform"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "kuri65536/python-for-android/python-modules/twisted/twisted/protocols/basic.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 beginFileTransfer(self, file, consumer, transform = None) :
'
Begin transferring a file
@type file: Any file-like object
@param file: The file object to read data from
@type consumer: Any implementor of IConsumer
@param consumer: The object to write data to
@p... | No |
271 | [
"#NEWLINE#",
"def of(",
"self",
",",
"klass",
",",
"name",
"=",
"'default'",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Create a builder for the given model.\\n\\n :param klass: The class\\n :type klass: class\\n\\n :param name: The type\\n :type name: str\... | false | 0 | [
"2",
"22",
"26",
"30",
"self",
"6",
"20",
"name",
"4",
"18",
"klass"
] | 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": "sdispater/orator/orator/orm/factory.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 of(self, klass, name = 'default') :
'
Create a builder for the given model.
:param klass: The class
:type klass: class
:param name: The type
:type name: str
:return: orator.orm.factory_builder.FactoryBuilder
'
return FactoryBuilder (klass, name, s... | No |
272 | [
"#NEWLINE#",
"def __setitem__(",
"self",
",",
"key",
",",
"value",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"self",
".",
"define",
"(",
"key",
",",
"value",
")"
] | false | 0 | [
"2",
"12",
"self",
"4",
"16",
"key",
"6",
"18",
"value"
] | 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": "sdispater/orator/orator/orm/factory.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 __setitem__(self, key, value) :
return self.define (key, value)
Is there a bug in the code above? | No |
273 | [
"#NEWLINE#",
"def feed(",
"self",
",",
"corr",
",",
"tot",
"=",
"1",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"tot",
"+=",
"tot",
"#NEWLINE#",
"self",
".",
"corr",
"+=",
"corr"
] | false | 0 | [
"2",
"13",
"19",
"self",
"4",
"21",
"23",
"corr",
"6",
"15",
"17",
"tot"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ppwwyyxx/tensorpack/tensorpack/utils/stat.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 feed(self, corr, tot = 1) :
self.tot += tot
self.corr += corr
Is there a bug in the code above? | No |
274 | [
"#NEWLINE#",
"def test_unwatch_log(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"stream_handler",
"=",
"logging",
".",
"StreamHandler",
"(",
")",
"#NEWLINE#",
"logger",
"=",
"logging",
".",
"Logger",
"(",
"'fake'",
")",
"#NEWLINE#",
"logger",
".",
"addHandler",
... | false | 0 | [
"2",
"63",
"95",
"109",
"self",
"86",
"105",
"115",
"observed",
"7",
"28",
"83",
"stream_handler",
"15",
"24",
"31",
"52",
"71",
"77",
"88",
"logger"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/neutron/neutron/tests/unit/agent/linux/test_daemon.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_unwatch_log(self) :
stream_handler = logging.StreamHandler ()
logger = logging.Logger ('fake')
logger.addHandler (stream_handler)
logger.addHandler (handlers.WatchedFileHandler ('/tmp/filename1'))
with mock.patch ('logging.getLogger', return_value = logger) :
daemon.unwatch_lo... | No |
275 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"keys",
"=",
"None",
",",
"source",
"=",
"''",
",",
"cache_time",
"=",
"300",
",",
"verify_ssl",
"=",
"True",
",",
"fileformat",
"=",
"'jwk'",
",",
"keytype",
"=",
"'RSA'",
",",
"keyusage",
"=",
"None",
")",
"... | false | 0 | [
"20",
"82",
"84",
"266",
"291",
"fileformat",
"12",
"58",
"60",
"cache_time",
"4",
"115",
"128",
"140",
"153",
"keys",
"8",
"76",
"121",
"163",
"174",
"176",
"189",
"196",
"208",
"210",
"225",
"245",
"279",
"304",
"source",
"2",
"37",
"44",
"50",
... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 34,
"after_index": 35,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 36,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "rohe/pyoidc/src/oic/utils/keyio.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, keys = None, source = '', cache_time = 300, verify_ssl = True, fileformat = 'jwk', keytype = 'RSA', keyusage = None) :
'
:param keys: A list of dictionaries
with the keys ["kty", "key", "alg", "use", "kid"]
:param source: Where the key set can be fetch from
:... | No |
276 | [
"#NEWLINE#",
"def get_pull_request_files(",
"project",
",",
"num",
",",
"auth",
"=",
"False",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'get list of files in a pull request'",
"#NEWLINE#",
"url",
"=",
"'https://api.github.com/repos/{project}/pulls/{num}/files'",
".",
"format",
"(",... | false | 0 | [
"4",
"25",
"27",
"num",
"15",
"54",
"url",
"6",
"31",
"auth",
"2",
"21",
"23",
"project",
"35",
"46",
"58",
"header"
] | 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": "arokem/python-matlab-bridge/tools/gh_api.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def get_pull_request_files(project, num, auth = False) :
'get list of files in a pull request'
url = 'https://api.github.com/repos/{project}/pulls/{num}/files'.format (project = project, num = num)
if auth :
header = make_auth_header ()
else :
header = None
return get_paged_request (u... | No |
277 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"schema",
",",
"session",
",",
"url",
",",
"link_schema",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"_schema",
"=",
"schema",
"#NEWLINE#",
"self",
".",
"_session",
"=",
"session",
"#NEWLINE#",
"self",
".",
"_u... | false | 0 | [
"2",
"15",
"21",
"27",
"33",
"39",
"self",
"4",
"19",
"schema",
"10",
"37",
"45",
"link_schema",
"6",
"25",
"session",
"8",
"31",
"url"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "jacobian/valor/valor/link.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, schema, session, url, link_schema) :
self._schema = schema
self._session = session
self._url = url
self._link = link_schema
self._name = python_attr (link_schema ['title'])
Is there a bug in the code above? | No |
278 | [
"#NEWLINE#",
"def set_border_format(",
"self",
",",
"border_format",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"_table",
".",
"get_style",
"(",
")",
".",
"set_border_format",
"(",
"border_format",
")",
"#NEWLINE#",
"return",
"self"
] | false | 0 | [
"4",
"19",
"border_format",
"2",
"9",
"23",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": 23... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sdispater/cleo/cleo/helpers/table_helper.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def set_border_format(self, border_format) :
self._table.get_style ().set_border_format (border_format)
return self
Is there a bug in the code above? | No |
279 | [
"#NEWLINE#",
"def test_redirect_after_limit(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Redirect to the Project Detail Page when attempting to add the 21st step'",
"#NEWLINE#",
"[",
"self",
".",
"create_project_step",
"(",
"project",
"=",
"self",
".",
"project",
")",
"for... | false | 0 | [
"49",
"80",
"status_code",
"59",
"90",
"99",
"expected_url",
"39",
"47",
"92",
"101",
"url",
"29",
"52",
"response",
"21",
"x",
"2",
"10",
"16",
"31",
"37",
"68",
"76",
"85",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": 40,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "python/raspberryio/raspberryio/project/tests/test_views.py",
"license": "apache-2.0",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_redirect_after_limit(self) :
'Redirect to the Project Detail Page when attempting to add the 21st step'
[self.create_project_step (project = self.project) for x in range (20)]
response = self.client.get (self.url, follow = True)
(url, status_code) = response.redirect_chain [0]
expected... | No |
280 | [
"#NEWLINE#",
"def test_find_return_first_result_by_id(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"builder",
"=",
"self",
".",
"get_builder",
"(",
")",
"#NEWLINE#",
"query",
"=",
"'SELECT * FROM \"users\" WHERE \"id\" = ? LIMIT 1'",
"#NEWLINE#",
"results",
"=",
"[",
"{"... | false | 0 | [
"15",
"94",
"query",
"70",
"122",
"result",
"7",
"34",
"46",
"72",
"84",
"103",
"113",
"builder",
"19",
"44",
"66",
"115",
"124",
"results",
"2",
"9",
"118",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sdispater/orator/tests/query/test_query_builder.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_find_return_first_result_by_id(self) :
builder = self.get_builder ()
query = 'SELECT * FROM "users" WHERE "id" = ? LIMIT 1'
results = [{
'foo' : 'bar',
}]
builder.get_connection ().select.return_value = results
builder.get_processor ().process_select = mock.MagicMock (side_ef... | No |
281 | [
"#NEWLINE#",
"def test_first_return_first_result(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"builder",
"=",
"self",
".",
"get_builder",
"(",
")",
"#NEWLINE#",
"query",
"=",
"'SELECT * FROM \"users\" WHERE \"id\" = ? LIMIT 1'",
"#NEWLINE#",
"results",
"=",
"[",
"{",
"... | false | 0 | [
"15",
"102",
"query",
"70",
"130",
"result",
"7",
"34",
"46",
"72",
"92",
"111",
"121",
"builder",
"19",
"44",
"66",
"123",
"132",
"results",
"2",
"9",
"126",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sdispater/orator/tests/query/test_query_builder.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_first_return_first_result(self) :
builder = self.get_builder ()
query = 'SELECT * FROM "users" WHERE "id" = ? LIMIT 1'
results = [{
'foo' : 'bar',
}]
builder.get_connection ().select.return_value = results
builder.get_processor ().process_select = mock.MagicMock (side_effect ... | No |
282 | [
"#NEWLINE#",
"def test_index(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"req",
"=",
"self",
".",
"_get_request",
"(",
"'cells'",
")",
"#NEWLINE#",
"res_dict",
"=",
"self",
".",
"controller",
".",
"index",
"(",
"req",
")",
"#NEWLINE#",
"self",
".",
"assert... | false | 0 | [
"46",
"63",
"85",
"94",
"cell",
"16",
"33",
"51",
"res_dict",
"7",
"24",
"req",
"44",
"72",
"i",
"2",
"9",
"18",
"27",
"59",
"68",
"79",
"88",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/api/openstack/compute/test_cells.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_index(self) :
req = self._get_request ('cells')
res_dict = self.controller.index (req)
self.assertEqual (len (res_dict ['cells']), 2)
for (i, cell) in enumerate (res_dict ['cells']) :
self.assertEqual (cell ['name'], self.fake_cells [i] ['name'])
self.assertNotIn ('capabil... | No |
283 | [
"#NEWLINE#",
"def test_bad_login(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"with",
"app",
".",
"test_request_context",
"(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"with",
"app",
".",
"test_client",
"(",
")",
"as",
"c",
":",
"#NEWLINE#",
"#INDENT#",
"rv",
"=",
... | false | 0 | [
"23",
"33",
"c",
"40",
"63",
"result",
"53",
"61",
"expect",
"2",
"29",
"57",
"self",
"27",
"rv"
] | 0 | NONE | [] | [
[
{
"before_index": 52,
"after_index": 55,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 56,
"after_index": 62,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 62,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ericmoritz/flask-auth/flaskext/auth/tests/workflow.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_bad_login(self) :
with app.test_request_context () :
with app.test_client () as c :
rv = self.login (c, 'superuser', 'not-password')
result = session.get ('auth_key', None)
expect = None
self.assertEqual (expect, result)
Is there a bug in the code above? | No |
284 | [
"#NEWLINE#",
"@",
"property",
"#NEWLINE#",
"@",
"cacheit",
"#NEWLINE#",
"def dict(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"N",
",",
"m",
",",
"n",
")",
"=",
"(",
"self",
".",
"N",
",",
"self",
".",
"m",
",",
"self",
".",
"n",
")",
"#NEWL... | false | 0 | [
"14",
"24",
"36",
"50",
"83",
"98",
"120",
"N",
"18",
"32",
"40",
"54",
"89",
"100",
"115",
"129",
"n",
"59",
"139",
"density",
"8",
"22",
"26",
"30",
"self",
"16",
"28",
"38",
"52",
"75",
"85",
"117",
"127",
"m",
"67",
"77",
"91",
"105",
"... | 0 | NONE | [] | [
[
{
"before_index": 12,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 34,
"after_index": 44,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 58,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sympy/sympy/sympy/stats/frv_types.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... | @ property
@ cacheit
def dict(self) :
(N, m, n) = (self.N, self.m, self.n)
(N, m, n) = list (map (sympify, (N, m, n)))
density = dict (((sympify (k), Rational ((binomial (m, k) * binomial ((N - m), (n - k))), binomial (N, n))) for k in range (max (0, ((n + m) - N)), (min (m, n) + 1))))
return dens... | No |
285 | [
"#NEWLINE#",
"def solveset(",
"f",
",",
"symbol",
"=",
"None",
",",
"domain",
"=",
"S",
".",
"Complexes",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"Solves a given inequality or equation with set as output\\n\\n Parameters\\n ==========\\n\\n f : Expr or a relational.\\n ... | false | 0 | [
"2",
"19",
"23",
"28",
"43",
"63",
"81",
"88",
"104",
"251",
"263",
"267",
"273",
"289",
"329",
"340",
"360",
"374",
"f",
"324",
"354",
"367",
"result",
"86",
"90",
"95",
"178",
"188",
"free_symbols",
"8",
"38",
"121",
"298",
"344",
"362",
"378",... | 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": "sympy/sympy/sympy/solvers/solveset.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def solveset(f, symbol = None, domain = S.Complexes) :
"Solves a given inequality or equation with set as output
Parameters
==========
f : Expr or a relational.
The target equation or inequality
symbol : Symbol
The variable for which the equation is solved
domain : Set
... | No |
286 | [
"#NEWLINE#",
"def test_dt_set(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"btype",
"=",
"self",
".",
"client",
".",
"bucket_type",
"(",
"'sets'",
")",
"#NEWLINE#",
"bucket",
"=",
"btype",
".",
"bucket",
"(",
"self",
".",
"bucket_name",
")",
"#NEWLINE#",
"m... | true | 37 | [
"2",
"9",
"24",
"68",
"73",
"82",
"120",
"129",
"138",
"7",
"20",
"29",
"37",
"42",
"49",
"56",
"114",
"126",
"135",
"144",
"62",
"79",
"88",
"91",
"98",
"105",
"18",
"22",
"35",
"64"
] | 1 | VARIABLE_MISUSE | [
2,
9,
24,
68,
73,
82,
120,
129,
138
] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "basho/riak-python-client/riak/tests/test_datatypes.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_dt_set(self) :
btype = self.client.bucket_type ('sets')
bucket = btype.bucket (self.bucket_name)
myset = datatypes.Set (bucket, myset.key_name)
myset.add ('Sean')
myset.add ('Brett')
myset.store ()
otherset = bucket.get (self.key_name)
self.assertIn ('Sean', otherset)
... | Yes |
287 | [
"#NEWLINE#",
"def test_dt_map_remove_set_update_same_op(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"btype",
"=",
"self",
".",
"client",
".",
"bucket_type",
"(",
"'maps'",
")",
"#NEWLINE#",
"bucket",
"=",
"btype",
".",
"bucket",
"(",
"self",
".",
"bucket_name",
... | true | 123 | [
"104",
"2",
"9",
"24",
"37",
"110",
"115",
"7",
"20",
"29",
"42",
"54",
"66",
"72",
"79",
"86",
"98",
"123",
"18",
"22",
"35",
"106"
] | 1 | VARIABLE_MISUSE | [
104
] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "basho/riak-python-client/riak/tests/test_datatypes.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_dt_map_remove_set_update_same_op(self) :
btype = self.client.bucket_type ('maps')
bucket = btype.bucket (self.bucket_name)
map = datatypes.Map (bucket, self.key_name)
map.sets ['set'].add ('X')
map.sets ['set'].add ('Y')
map.store ()
map.reload ()
del map.sets ['set']
... | Yes |
288 | [
"#NEWLINE#",
"def Run(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"with",
"test_lib",
".",
"FakeTime",
"(",
"42",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"CreateAdminUser",
"(",
"'approver'",
")",
"#NEWLINE#",
"hunt",
"=",
"hunts",
".",
"GRRHunt",
... | true | 66 | [
"24",
"66",
"74",
"117",
"2",
"17",
"38",
"84",
"100"
] | 1 | VARIABLE_MISUSE | [
2,
17,
38,
84,
100
] | [
[
{
"before_index": 16,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 35,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 53,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "google/grr/grr/gui/api_plugins/user_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 Run(self) :
with test_lib.FakeTime (42) :
self.CreateAdminUser ('approver')
hunt = hunts.GRRHunt.StartHunt (hunt_name = 'GenericHunt', token = self.token)
with test_lib.FakeTime (43) :
flow.GRRFlow.StartFlow (flow_name = 'RequestHuntApprovalFlow', reason = hunt.token.reason, subject... | Yes |
289 | [
"#NEWLINE#",
"def testRaisesOnDeletingMultipleNotifications(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"pending",
",",
"shown",
")",
"=",
"self",
".",
"_GetNotifications",
"(",
")",
"#NEWLINE#",
"self",
".",
"assertEqual",
"(",
"len",
"(",
"pending",
")",
... | true | 74 | [
"8",
"25",
"74",
"85",
"102",
"43",
"2",
"13",
"19",
"31",
"51",
"57",
"68",
"78",
"90",
"96",
"108",
"10",
"37",
"87",
"114"
] | 1 | VARIABLE_MISUSE | [
43
] | [
[
{
"before_index": 6,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 27,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 30,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "google/grr/grr/gui/api_plugins/user_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 testRaisesOnDeletingMultipleNotifications(self) :
(pending, shown) = self._GetNotifications ()
self.assertEqual (len (pending), 3)
self.assertEqual (len (shown), 0)
args = user_plugin.ApiDeletePendingUserNotificationArgs (timestamp = self.TIME_0)
with self.assertRaises (aff4_users.UniqueKey... | Yes |
290 | [
"#NEWLINE#",
"def sizeHint(",
"self",
",",
"option",
",",
"index",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"QSize",
"(",
"(",
"self",
".",
"width",
"+",
"16",
")",
",",
"(",
"option",
".",
"height",
"+",
"16",
")",
")"
] | true | 23 | [
"4",
"23",
"6",
"2",
"15"
] | 1 | VARIABLE_MISUSE | [
2,
15
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ShadowKyogre/mikidown/mikidown/attachment.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 sizeHint(self, option, index) :
return QSize ((self.width + 16), (option.height + 16))
Is there a bug in the code above? | Yes |
291 | [
"#NEWLINE#",
"def test_user_is_created_and_added_to_group(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"user",
"=",
"User",
".",
"objects",
".",
"get",
"(",
"username",
"=",
"'my_username'",
")",
"#NEWLINE#",
"group",
"=",
"Group",
".",
"objects",
".",
"get",
"... | true | 37 | [
"7",
"37",
"39",
"20",
"2",
"33"
] | 1 | VARIABLE_MISUSE | [
20
] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 27,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 32,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "AppScale/appscale/AppServer/lib/django-1.4/django/contrib/auth/tests/models.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_user_is_created_and_added_to_group(self) :
user = User.objects.get (username = 'my_username')
group = Group.objects.get (name = 'my_group')
self.assertEquals (user, user.groups.get ())
Is there a bug in the code above? | Yes |
292 | [
"#NEWLINE#",
"def __repr__(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"c",
"=",
"type",
"(",
"self",
")",
"#NEWLINE#",
"return",
"'<{0}.{1} {2}:{3}>'",
".",
"format",
"(",
"c",
".",
"__module__",
",",
"self",
".",
"__name__",
",",
"self",
".",
"app",
".... | true | 23 | [
"7",
"19",
"2",
"11",
"23",
"27",
"33"
] | 1 | VARIABLE_MISUSE | [
7,
19
] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "crosspop/asuka/asuka/commit.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 __repr__(self) :
c = type (self)
return '<{0}.{1} {2}:{3}>'.format (c.__module__, self.__name__, self.app.name, self.ref)
Is there a bug in the code above? | Yes |
293 | [
"#NEWLINE#",
"def test_long_wait_time(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"lil",
"=",
"Pool",
"(",
"workers",
"=",
"1",
")",
"#NEWLINE#",
"start",
"=",
"time",
".",
"time",
"(",
")",
"#NEWLINE#",
"lil",
".",
"run",
"(",
"[",
"'ls'",
"]",
")",
... | true | 47 | [
"7",
"24",
"56",
"77",
"33",
"86",
"100",
"16",
"47",
"49",
"69",
"102",
"2",
"41",
"94"
] | 1 | VARIABLE_MISUSE | [
33,
86,
100
] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "toastdriven/littleworkers/tests.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_long_wait_time(self) :
lil = Pool (workers = 1)
start = time.time ()
lil.run (['ls'])
end = time.time ()
self.assertTrue (((start - start) < 1.0))
lil = Pool (workers = 1, wait_time = 1.25)
start = time.time ()
lil.run (['ls'])
end = time.time ()
self.assertTru... | Yes |
294 | [
"#NEWLINE#",
"@",
"patch",
".",
"object",
"(",
"Collector",
",",
"'publish'",
")",
"#NEWLINE#",
"def test_url_with_port(",
"self",
",",
"publish_mock",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"setUp",
"(",
"config",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"... | true | 60 | [
"14",
"60",
"12",
"19",
"50",
"54",
"37"
] | 1 | VARIABLE_MISUSE | [
37
] | [
[
{
"before_index": 1,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 36,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "BrightcoveOS/Diamond/src/collectors/httpd/test/testhttpd.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ patch.object (Collector, 'publish')
def test_url_with_port(self, publish_mock) :
self.setUp (config = {
'urls' : 'localhost http://localhost:80/server-status?auto',
})
expected_urls = {
'localhost' : 'http://localhost:80/server-status?auto',
}
self.assertEqual (self.collector.urls,... | Yes |
295 | [
"#NEWLINE#",
"def test_initial(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"class _Form",
"(",
"Form",
")",
":",
"#NEWLINE#",
"#INDENT#",
"fields",
"=",
"[",
"FieldBlock",
"(",
"'field block'",
",",
"[",
"Field",
"(",
"'number'",
",",
"convs",
".",
"Int",
... | true | 89 | [
"45",
"69",
"109",
"2",
"65",
"85",
"89",
"105",
"37",
"49"
] | 1 | VARIABLE_MISUSE | [
45,
69,
109
] | [
[
{
"before_index": 36,
"after_index": 42,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 44,
"after_index": 50,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 64,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "SmartTeleMax/iktomi/tests/forms/fields.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_initial(self) :
class _Form (Form) :
fields = [FieldBlock ('field block', [Field ('number', convs.Int ())])]
env = AppEnvironment.create ()
form = _Form (env, initial = {
'number' : 3,
})
self.assertEqual (form.raw_data, MultiDict ([('number', '3')]))
self.assertEqual (s... | Yes |
296 | [
"#NEWLINE#",
"def _importer_callback_wrapper(",
"func",
")",
":",
"#NEWLINE#",
"#INDENT#",
"@",
"functools",
".",
"wraps",
"(",
"func",
")",
"#NEWLINE#",
"def inner(",
"path",
")",
":",
"#NEWLINE#",
"#INDENT#",
"ret",
"=",
"func",
"(",
"path",
".",
"decode",
"... | true | 41 | [
"2",
"12",
"23",
"41"
] | 1 | VARIABLE_MISUSE | [
15
] | [
[
{
"before_index": 40,
"after_index": 41,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 33,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dahlia/libsass-python/sass.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 _importer_callback_wrapper(func) :
@ functools.wraps (func)
def inner(path) :
ret = func (path.decode ('UTF-8'))
return _normalize_importer_return_value (ret)
return func
Is there a bug in the code above? | Yes |
297 | [
"#NEWLINE#",
"def Assign(",
"self",
",",
"node",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"isinstance",
"(",
"node",
".",
"left",
",",
"ast",
".",
"Tuple",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"n",
"in",
"node",
".",
"left",
".",
"values",
":",
"#... | true | 37 | [
"2",
"37",
"46",
"65",
"93",
"114",
"125",
"4",
"12",
"26",
"82",
"102",
"118",
"129",
"24",
"55",
"69"
] | 1 | VARIABLE_MISUSE | [
24,
55,
69
] | [
[
{
"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": 124,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "djc/runa/runac/liveness.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 Assign(self, node) :
if isinstance (node.left, ast.Tuple) :
for n in node.left.values :
if isinstance (self, ast.Name) :
self.vars [1].add (n.name)
else :
self.visit (n)
else :
if isinstance (node.left, ast.Name) :
self.vars [1].ad... | Yes |
298 | [
"#NEWLINE#",
"def patch(",
"self",
",",
"*",
"args",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"patcher",
"=",
"mock",
".",
"patch",
"(",
"*",
"args",
",",
"**",
"kwargs",
")",
"#NEWLINE#",
"m",
"=",
"patcher",
".",
"start",
"(",
")",
"#NEWLI... | true | 43 | [
"2",
"33",
"25",
"5",
"19",
"22",
"12",
"27",
"37",
"43"
] | 1 | VARIABLE_MISUSE | [
25
] | [
[
{
"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": 20,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/fuel-devops/devops/tests/models/node_ext/test_fuel_master51.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 patch(self, * args, **kwargs) :
patcher = mock.patch (* args, ** kwargs)
m = patcher.start ()
self.addCleanup (patcher.stop)
return patcher
Is there a bug in the code above? | Yes |
299 | [
"#NEWLINE#",
"def scan_bad(",
"scanner",
",",
"text",
")",
":",
"#NEWLINE#",
"#INDENT#",
"scanner",
".",
"produce",
"(",
"(",
"-",
"1",
")",
",",
"scanner",
")"
] | true | 18 | [
"4",
"2",
"9",
"18"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"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": 17,
"after_index": 10... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "probcomp/bayeslite/src/scan.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 scan_bad(scanner, text) :
scanner.produce ((- 1), scanner)
Is there a bug in the code above? | Yes |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.