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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,580 | [
"#NEWLINE#",
"def test_create_instance_with_network_invalid_id(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"_create_inst",
"=",
"self",
".",
"_create_instance_with_networks_json",
"#NEWLINE#",
"(",
"request",
",",
"response",
",",
"networks",
")",
"=",
"_create_inst",
"... | true | 41 | [
"14",
"7",
"21",
"2",
"9",
"26",
"37",
"41",
"16",
"30",
"18"
] | 1 | VARIABLE_MISUSE | [
18
] | [
[
{
"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": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/api/openstack/compute/test_createserverext.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_create_instance_with_network_invalid_id(self) :
_create_inst = self._create_instance_with_networks_json
(request, response, networks) = _create_inst (INVALID_NETWORKS)
self.assertEqual (response.status_int, 400)
self.assertIsNone (<MASK>)
Given the code above, what is a proper rep... | networks |
5,581 | [
"#NEWLINE#",
"def serialize_message(",
"msg",
",",
"port_id",
",",
"seq",
")",
":",
"#NEWLINE#",
"#INDENT#",
"family",
"=",
"msg",
".",
"__class__",
".",
"family",
"#NEWLINE#",
"flags",
"=",
"port_id",
".",
"flags",
"#NEWLINE#",
"s",
"=",
"msg",
".",
"__clas... | true | 21 | [
"2",
"13",
"27",
"33",
"4",
"21",
"62",
"25",
"50",
"83",
"6",
"60",
"36",
"76",
"19",
"23",
"58",
"65",
"79",
"87",
"11",
"17",
"56"
] | 1 | VARIABLE_MISUSE | [
2,
13,
27,
33
] | [
[
{
"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": 18,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "facebook/gnlpy/netlink.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def serialize_message(msg, port_id, seq) :
family = msg.__class__.family
flags = <MASK>.flags
s = msg.__class__.pack (msg)
t = struct.pack (str ('=IHHII'), (len (s) + 16), family, flags, seq, port_id)
p = array.array (str ('B'), t)
p.extend (s)
return p
Given the code above,... | msg |
5,582 | [
"#NEWLINE#",
"def __enter__(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"db",
"=",
"self",
".",
"dbmgr",
".",
"_transaction_local",
".",
"rdb",
"#NEWLINE#",
"if",
"(",
"not",
"db",
")",
":",
"#NEWLINE#",
"#INDENT#",
"db",
"=",
"self",
".",
"dbmgr",
".",
... | true | 92 | [
"7",
"20",
"25",
"36",
"40",
"44",
"48",
"62",
"86",
"88",
"2",
"9",
"27",
"64",
"76",
"84",
"92"
] | 1 | VARIABLE_MISUSE | [
7,
20,
25,
36,
40,
44,
48,
62,
86,
88
] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 91,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "edgewall/trac/trac/db/api.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def __enter__(self) :
db = self.dbmgr._transaction_local.rdb
if (not db) :
db = self.dbmgr._transaction_local.wdb
if db :
db = ConnectionWrapper (db.cnx, db.log, readonly = True)
else :
db = self.dbmgr.get_connection (readonly = True)
self.dbmgr._transaction_local... | db |
5,583 | [
"#NEWLINE#",
"def update(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"' Updates a running instance of the component. Returns True on success and False\\n otherwise.\\n '",
"#NEWLINE#",
"self",
".",
"logger",
".",
"debug",
"(",
"'Updating component %s'",
",",
"self",
"... | true | 99 | [
"24",
"36",
"2",
"9",
"17",
"32",
"41",
"49",
"88",
"91",
"97",
"99",
"111",
"119",
"30",
"70",
"47",
"58",
"68",
"76",
"39",
"104",
"117"
] | 1 | VARIABLE_MISUSE | [
47,
58
] | [
[
{
"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": 23,
"after_index": 27... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "DevTable/gantryd/runtime/component.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def update(self) :
' Updates a running instance of the component. Returns True on success and False
otherwise.
'
self.logger.debug ('Updating component %s', self.getName ())
client = getDockerClient ()
existing_containers = self.getAllContainers (client)
existing_primary = self.getP... | container |
5,584 | [
"#NEWLINE#",
"def blockcut(",
"expr",
",",
"rowsizes",
",",
"colsizes",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\" Cut a matrix expression into Blocks\\n\\n >>> from sympy import ImmutableMatrix, blockcut\\n >>> M = ImmutableMatrix(4, 4, range(16))\\n >>> B = blockcut(M, (1, 3), (1, 3))\\... | true | 43 | [
"2",
"34",
"13",
"48",
"6",
"24",
"20",
"4",
"17",
"43",
"36",
"46",
"38",
"41"
] | 1 | VARIABLE_MISUSE | [
20
] | [
[
{
"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": "sympy/sympy/sympy/matrices/expressions/blockmatrix.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def blockcut(expr, rowsizes, colsizes) :
" Cut a matrix expression into Blocks
>>> from sympy import ImmutableMatrix, blockcut
>>> M = ImmutableMatrix(4, 4, range(16))
>>> B = blockcut(M, (1, 3), (1, 3))
>>> type(B).__name__
'BlockMatrix'
>>> ImmutableMatrix(B.blocks[0, 1])
Matrix([[1,... | colbounds |
5,585 | [
"#NEWLINE#",
"def testUnban(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"channel",
"=",
"'#supybot'",
"#NEWLINE#",
"ban",
"=",
"'foo!bar@baz'",
"#NEWLINE#",
"self",
".",
"assertEqual",
"(",
"str",
"(",
"ircmsgs",
".",
"unban",
"(",
"channel",
",",
"ban",
")"... | true | 37 | [
"11",
"27",
"2",
"15",
"7",
"25",
"35",
"37"
] | 1 | VARIABLE_MISUSE | [
11,
27
] | [
[
{
"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": 14,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ProgVal/Limnoria/test/test_ircmsgs.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def testUnban(self) :
channel = '#supybot'
ban = 'foo!bar@baz'
self.assertEqual (str (ircmsgs.unban (channel, ban)), ('MODE %s -b :%s\r
' % (channel, <MASK>)))
Given the code above, what is a proper replacement for <MASK>? Choose among: ban, self, channel | ban |
5,586 | [
"#NEWLINE#",
"@",
"mock",
".",
"patch",
"(",
"'nova.image.glance.LOG'",
")",
"#NEWLINE#",
"@",
"mock",
".",
"patch",
"(",
"'nova.image.glance.GlanceImageService.show'",
")",
"#NEWLINE#",
"@",
"mock",
".",
"patch",
"(",
"'nova.signature_utils.get_verifier'",
")",
"#NEW... | true | 88 | [
"30",
"47",
"26",
"41",
"51",
"57",
"80",
"84",
"88",
"55",
"32",
"106",
"28",
"37",
"91"
] | 1 | VARIABLE_MISUSE | [
55
] | [
[
{
"before_index": 1,
"after_index": 27,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 36,
"after_index": 44,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 46,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/image/test_glance.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ mock.patch ('nova.image.glance.LOG')
@ mock.patch ('nova.image.glance.GlanceImageService.show')
@ mock.patch ('nova.signature_utils.get_verifier')
def test_download_with_signature_verification(self, mock_get_verifier, mock_show, mock_log) :
mock_get_verifier.return_value = self.MockVerifier ()
mock_show.... | res |
5,587 | [
"#NEWLINE#",
"@",
"mock",
".",
"patch",
"(",
"'nova.image.glance._translate_from_glance'",
")",
"#NEWLINE#",
"@",
"mock",
".",
"patch",
"(",
"'nova.image.glance._translate_to_glance'",
")",
"#NEWLINE#",
"def test_create_success(",
"self",
",",
"trans_to_mock",
",",
"trans... | true | 116 | [
"20",
"44",
"119",
"71",
"79",
"105",
"126",
"171",
"194",
"18",
"116",
"158",
"60",
"123",
"183",
"91",
"97",
"114",
"132",
"181",
"200",
"89",
"108",
"155",
"168",
"22",
"50",
"147",
"27",
"48",
"99",
"110",
"177"
] | 1 | VARIABLE_MISUSE | [
60,
123,
183
] | [
[
{
"before_index": 1,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 29,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 43,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/image/test_glance.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ mock.patch ('nova.image.glance._translate_from_glance')
@ mock.patch ('nova.image.glance._translate_to_glance')
def test_create_success(self, trans_to_mock, trans_from_mock) :
translated = {
'image_id' : mock.sentinel.image_id,
}
trans_to_mock.return_value = translated
trans_from_mock.retur... | image_mock |
5,588 | [
"#NEWLINE#",
"@",
"h",
".",
"labeled",
"(",
"code",
"=",
"'M004'",
",",
"msg",
"=",
"'assigning to built-in'",
",",
"solution",
"=",
"'change symbol name to something else'",
")",
"#NEWLINE#",
"def find_assign_to_builtin(",
"node",
")",
":",
"#NEWLINE#",
"#INDENT#",
... | true | 42 | [
"27",
"42",
"53",
"20",
"61"
] | 1 | VARIABLE_MISUSE | [
20,
61
] | [
[
{
"before_index": 24,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 30,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 38,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "omaraboumrad/mastool/mastool/practices.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ h.labeled (code = 'M004', msg = 'assigning to built-in', solution = 'change symbol name to something else')
def find_assign_to_builtin(node) :
'Finds assigning to built-ins'
builtins = set (__builtins__.keys ())
return (isinstance (<MASK>, ast.Assign) and (len ((builtins & set (h.target_names (node.ta... | node |
5,589 | [
"#NEWLINE#",
"@",
"param",
".",
"parameterized",
".",
"bothmethod",
"#NEWLINE#",
"def shortened_character_name(",
"self_or_cls",
",",
"c",
",",
"eliminations",
"=",
"[",
"]",
",",
"substitutions",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"#NEWLINE#",
"#UNINDENT#",
"}",
... | true | 99 | [
"9",
"99",
"97",
"105",
"18",
"76",
"73",
"92",
"27",
"37",
"41",
"57",
"59",
"84",
"86",
"103",
"107",
"116",
"71",
"90",
"51",
"63",
"13",
"53",
"11",
"43"
] | 1 | VARIABLE_MISUSE | [
27
] | [
[
{
"before_index": 1,
"after_index": 10,
"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": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ioam/holoviews/holoviews/core/util.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ param.parameterized.bothmethod
def shortened_character_name(self_or_cls, c, eliminations = [], substitutions = {
}, transforms = []) :
'
Given a unicode character c, return the shortened unicode name
(as a list of tokens) by applying the eliminations,
substitutions and transforms.
... | transforms |
5,590 | [
"#NEWLINE#",
"def item_pubdate(",
"self",
",",
"item",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"self",
".",
"created"
] | true | 10 | [
"4",
"2",
"10"
] | 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": "Piratenfraktion-Berlin/OwnTube/videoportal/feeds.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def item_pubdate(self, item) :
return <MASK>.created
Given the code above, what is a proper replacement for <MASK>? Choose among: item, self | item |
5,591 | [
"#NEWLINE#",
"def linearize(",
"self",
",",
"x",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Calculates the jacobian of the Kriging surface at the requested point.\\n\\n Args\\n ----\\n x : array-like\\n Point at which the surrogate Jacobian is evaluated.\\n ... | true | 35 | [
"2",
"17",
"37",
"69",
"84",
"22",
"52",
"78",
"92",
"4",
"67",
"48",
"80",
"11",
"19",
"28",
"35",
"64"
] | 1 | VARIABLE_MISUSE | [
4,
67
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 16,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "OpenMDAO/OpenMDAO/openmdao/surrogate_models/kriging.py",
"license": "apache-2.0",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def linearize(self, x) :
'
Calculates the jacobian of the Kriging surface at the requested point.
Args
----
x : array-like
Point at which the surrogate Jacobian is evaluated.
'
thetas = power (10.0, self.thetas)
r = exp ((- thetas.dot (square ((<MASK> ... | x |
5,592 | [
"#NEWLINE#",
"def test_scalar_obj_remove_invalid(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"A",
",",
"B",
")",
"=",
"self",
".",
"_scalar_obj_fixture",
"(",
")",
"#NEWLINE#",
"a1",
"=",
"A",
"(",
")",
"#NEWLINE#",
"b1",
"=",
"B",
"(",
")",
"#NEWLI... | true | 59 | [
"2",
"13",
"8",
"21",
"37",
"79",
"10",
"27",
"33",
"59",
"31",
"101",
"25",
"70",
"19",
"49",
"56",
"66",
"91",
"98"
] | 1 | VARIABLE_MISUSE | [
25,
70
] | [
[
{
"before_index": 6,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "zzzeek/sqlalchemy/test/orm/test_attributes.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_scalar_obj_remove_invalid(self) :
(A, B) = self._scalar_obj_fixture ()
a1 = A ()
b1 = B ()
b2 = B ()
A.b.impl.append (attributes.instance_state (a1), attributes.instance_dict (a1), <MASK>, None)
assert (a1.b is b1)
assert_raises_message (ValueError, "Object <B at .*?> not ass... | b1 |
5,593 | [
"#NEWLINE#",
"def test_passive_ret_never_set_never_set(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"attr",
",",
"state",
",",
"dict_",
")",
"=",
"self",
".",
"_fixture",
"(",
"attributes",
".",
"NEVER_SET",
")",
"#NEWLINE#",
"eq_",
"(",
"attr",
".",
"ge... | true | 32 | [
"8",
"26",
"32",
"2",
"15",
"12",
"50",
"10",
"30"
] | 1 | VARIABLE_MISUSE | [
12,
50
] | [
[
{
"before_index": 6,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 40,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 46,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "zzzeek/sqlalchemy/test/orm/test_attributes.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_passive_ret_never_set_never_set(self) :
(attr, state, dict_) = self._fixture (attributes.NEVER_SET)
eq_ (attr.get (state, <MASK>, passive = attributes.PASSIVE_RETURN_NEVER_SET), attributes.NEVER_SET)
assert ('attr' not in dict_)
Given the code above, what is a proper replacement for <M... | dict_ |
5,594 | [
"#NEWLINE#",
"def _layer_as_pymaging(",
"self",
",",
"index",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"pymaging_support",
".",
"extract_layer_image",
"(",
"self",
".",
"decoded_data",
",",
"self",
")"
] | true | 18 | [
"2",
"14",
"18",
"4"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"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": "psd-tools/psd-tools/src/psd_tools/user_api/psd_image.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def _layer_as_pymaging(self, index) :
return pymaging_support.extract_layer_image (self.decoded_data, <MASK>)
Given the code above, what is a proper replacement for <MASK>? Choose among: self, index | index |
5,595 | [
"#NEWLINE#",
"def get_instances(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"instance_list",
"=",
"[",
"]",
"#NEWLINE#",
"[",
"instance_list",
".",
"extend",
"(",
"u",
".",
"server_usages",
")",
"for",
"u",
"in",
"self",
".",
"usage_list",
"]",
"#NEWLINE#",
... | true | 30 | [
"2",
"24",
"30",
"7",
"13",
"17",
"22"
] | 1 | VARIABLE_MISUSE | [
7,
13
] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 29,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/horizon/openstack_dashboard/usage/base.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def get_instances(self) :
instance_list = []
[instance_list.extend (u.server_usages) for u in self.usage_list]
return <MASK>
Given the code above, what is a proper replacement for <MASK>? Choose among: self, instance_list, u | instance_list |
5,596 | [
"#NEWLINE#",
"def read_requirement_files(",
"files",
")",
":",
"#NEWLINE#",
"#INDENT#",
"pip_requirements",
"=",
"[",
"]",
"#NEWLINE#",
"session",
"=",
"pip_download",
".",
"PipSession",
"(",
")",
"#NEWLINE#",
"for",
"filename",
"in",
"session",
":",
"#NEWLINE#",
... | true | 23 | [
"37",
"72",
"99",
"7",
"105",
"117",
"126",
"21",
"32",
"47",
"54",
"89",
"120",
"122",
"124",
"12",
"23",
"91",
"93",
"68",
"81",
"102",
"109",
"2"
] | 1 | VARIABLE_MISUSE | [
2
] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/anvil/anvil/packaging/helpers/pip_helper.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def read_requirement_files(files) :
pip_requirements = []
session = pip_download.PipSession ()
for filename in <MASK> :
if sh.isfile (filename) :
cache_key = ('f:%s:%s' % (sh.abspth (filename), sh.getsize (filename)))
with REQUIREMENT_FILE_CACHE_LOCK :
... | files |
5,597 | [
"#NEWLINE#",
"def pack(",
"self",
",",
"negotiated",
",",
"with_default",
"=",
"True",
")",
":",
"#NEWLINE#",
"#INDENT#",
"local_asn",
"=",
"peer_asn",
".",
"local_as",
"#NEWLINE#",
"peer_asn",
"=",
"negotiated",
".",
"peer_as",
"#NEWLINE#",
"message",
"=",
"''"... | true | 15 | [
"15",
"19",
"286",
"319",
"192",
"219",
"25",
"277",
"348",
"363",
"375",
"6",
"207",
"29",
"200",
"271",
"279",
"128",
"309",
"312",
"184",
"188",
"198",
"202",
"265",
"13",
"86",
"284",
"317",
"297",
"321",
"344",
"365",
"215",
"226",
"263",
... | 1 | VARIABLE_MISUSE | [
4,
21,
291,
354,
369
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Exa-Networks/exabgp/lib/exabgp/bgp/message/update/attribute/attributes.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def pack(self, negotiated, with_default = True) :
local_asn = <MASK>.local_as
peer_asn = negotiated.peer_as
message = ''
default = {
Attribute.CODE.ORIGIN : (lambda l, r : Origin (Origin.IGP)),
Attribute.CODE.AS_PATH : (lambda l, r : (ASPath ([], []) if (l == r) else ASPath ([local... | negotiated |
5,598 | [
"#NEWLINE#",
"def test_post(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Upon a POST, a new node is created and the URI returned.\\n '",
"#NEWLINE#",
"request",
"=",
"DummyRequest",
"(",
"[",
"b''",
"]",
")",
"#NEWLINE#",
"request",
".",
"method",
"=",
... | true | 120 | [
"9",
"18",
"38",
"61",
"72",
"88",
"2",
"30",
"84",
"94",
"92",
"105",
"112",
"116",
"120",
"109"
] | 1 | VARIABLE_MISUSE | [
92,
105,
112
] | [
[
{
"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": 22... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ralphm/idavoll/idavoll/test/test_gateway.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_post(self) :
'
Upon a POST, a new node is created and the URI returned.
'
request = DummyRequest ([b''])
request.method = b'POST'
def rendered(result) :
self.assertEqual (http.NO_CONTENT, request.responseCode)
def nodeCreated(nodeIdentifier) :
uri = gatewa... | d |
5,599 | [
"#NEWLINE#",
"def fetch_list(",
"self",
",",
"state_key",
",",
"request_token",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Get the list at given state tag.'",
"#NEWLINE#",
"request",
"=",
"windmill_pb2",
".",
"GetDataRequest",
"(",
")",
"#NEWLINE#",
"computation_... | true | 31 | [
"6",
"73",
"76",
"23",
"88",
"106",
"15",
"99",
"117",
"4",
"63",
"31",
"36",
"55",
"95",
"2",
"44",
"50",
"111"
] | 1 | VARIABLE_MISUSE | [
2,
44,
50,
111
] | [
[
{
"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": "GoogleCloudPlatform/DataflowPythonSDK/google/cloud/dataflow/worker/windmillstate.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def fetch_list(self, state_key, request_token = None) :
'Get the list at given state tag.'
request = windmill_pb2.GetDataRequest ()
computation_request = windmill_pb2.ComputationGetDataRequest (computation_id = <MASK>.computation_id)
keyed_request = windmill_pb2.KeyedGetDataRequest (key = self.key, ... | self |
5,600 | [
"#NEWLINE#",
"def spawn(",
"self",
",",
"context",
",",
"instance",
",",
"image_meta",
",",
"injected_files",
",",
"admin_password",
",",
"network_info",
"=",
"None",
",",
"block_device_info",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"uuid",
"=",
"instanc... | true | 85 | [
"14",
"25",
"29",
"78",
"31",
"76",
"68",
"88",
"10",
"85",
"6",
"27",
"39",
"72",
"37",
"41",
"51",
"57",
"63",
"8",
"4",
"12",
"18",
"2",
"43",
"81"
] | 1 | VARIABLE_MISUSE | [
25,
29,
78
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 28,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 30,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/virt/fake.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def spawn(self, context, instance, image_meta, injected_files, admin_password, network_info = None, block_device_info = None) :
uuid = instance.uuid
state = power_state.RUNNING
flavor = instance.flavor
self.resources.claim (vcpus = flavor.vcpus, mem = flavor.memory_mb, disk = flavor.root_gb)
fa... | uuid |
5,601 | [
"#NEWLINE#",
"def __array_finalize__(",
"self",
",",
"obj",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"obj",
"is",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"#NEWLINE#",
"#UNINDENT#",
"self",
".",
"sampleRate",
"=",
"getattr",
"(",
"obj",
",",
... | true | 40 | [
"4",
"11",
"27",
"53",
"2",
"21",
"34",
"40",
"47"
] | 1 | VARIABLE_MISUSE | [
4,
11,
27,
53
] | [
[
{
"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": 20,
"after_index": 28... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "jsawruk/pymir/pymir/AudioFile.py",
"license": "mit",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def __array_finalize__(self, obj) :
if (obj is None) :
return
self.sampleRate = getattr (obj, 'sampleRate', None)
self.channels = getattr (<MASK>, 'channels', None)
self.format = getattr (obj, 'format', None)
Given the code above, what is a proper replacement for <MASK>? Choose among:... | obj |
5,602 | [
"#NEWLINE#",
"def tearDown(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Clean up the Flowvisor rules/slices\\n Clear running stuff and so on...\\n '",
"#NEWLINE#",
"from",
"django.conf",
"import",
"settings",
"as djangosettings",
"#NEWLINE#",
"import",
"os... | true | 40 | [
"139",
"159",
"131",
"141",
"163",
"211",
"223",
"239",
"251",
"40",
"176",
"186",
"191",
"30",
"38",
"53",
"61",
"86",
"98",
"18",
"32",
"2",
"88",
"114",
"122",
"133",
"213",
"241"
] | 1 | VARIABLE_MISUSE | [
2,
88,
114,
122,
133,
213,
241
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 29,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "fp7-ofelia/ocf/expedient/src/python/plugins/openflow/tests/full/fulltests.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def tearDown(self) :
'
Clean up the Flowvisor rules/slices
Clear running stuff and so on...
'
from django.conf import settings as djangosettings
import os
after = os.listdir (djangosettings.XMLRPC_TRUSTED_CA_PATH)
for path in after :
if (path not in <MASK>.befor... | self |
5,603 | [
"#NEWLINE#",
"def has_vary_header(",
"response",
",",
"header_query",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Checks to see if the response has a given header name in its Vary header.\\n '",
"#NEWLINE#",
"if",
"(",
"not",
"response",
".",
"has_header",
"(",
"'Vary'",
")"... | true | 53 | [
"2",
"14",
"34",
"4",
"59",
"40",
"53",
"65",
"45",
"51",
"28"
] | 1 | VARIABLE_MISUSE | [
28
] | [
[
{
"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": "django/django/django/utils/cache.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def has_vary_header(response, header_query) :
'
Checks to see if the response has a given header name in its Vary header.
'
if (not response.has_header ('Vary')) :
return False
vary_headers = cc_delim_re.split (response ['Vary'])
existing_headers = set ((header.lower () for header in <M... | vary_headers |
5,604 | [
"#NEWLINE#",
"@",
"lib",
".",
"api_call",
"#NEWLINE#",
"def move_forward_strafe(",
"self",
",",
"forward",
",",
"strafe",
")",
":",
"#NEWLINE#",
"#INDENT#",
"speed",
"=",
"hypot",
"(",
"forward",
",",
"strafe",
")",
"#NEWLINE#",
"if",
"(",
"speed",
"<",
"Mec... | true | 88 | [
"11",
"22",
"73",
"7",
"82",
"66",
"9",
"20",
"75",
"16",
"27",
"36",
"49",
"58",
"86",
"88"
] | 1 | VARIABLE_MISUSE | [
66
] | [
[
{
"before_index": 1,
"after_index": 8,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "IEEERobotics/bot/bot/driver/mec_driver.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ lib.api_call
def move_forward_strafe(self, forward, strafe) :
speed = hypot (forward, strafe)
if (speed < MecDriver.min_speed) :
speed = MecDriver.min_speed
else :
if (speed > MecDriver.max_speed) :
speed = MecDriver.max_speed
angle = (degrees (atan2 (strafe, forward)) % 36... | angle |
5,605 | [
"#NEWLINE#",
"def job_status(",
"self",
",",
"job_id",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n TODO: add docstring\\n '",
"#NEWLINE#",
"with",
"self",
".",
"get",
"(",
"(",
"'/v3/job/status/%s'",
"%",
"urlquote",
"(",
"str",
"(",
"job_id",
")",
")",
... | true | 53 | [
"36",
"68",
"78",
"4",
"23",
"29",
"40",
"44",
"66",
"2",
"12",
"60",
"74",
"53",
"72",
"86",
"34"
] | 1 | VARIABLE_MISUSE | [
34
] | [
[
{
"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": 28,
"after_index": 15,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "treasure-data/td-client-python/tdclient/job_api.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def job_status(self, job_id) :
'
TODO: add docstring
'
with self.get (('/v3/job/status/%s' % urlquote (str (job_id)))) as res :
(code, body) = (res.status, res.read ())
if (<MASK> != 200) :
self.raise_error ('Get job status failed', res, body)
js = self.checked_... | code |
5,606 | [
"#NEWLINE#",
"def output(",
"req",
")",
":",
"#NEWLINE#",
"#INDENT#",
"click",
".",
"echo",
"(",
"'\\n'",
")",
"#NEWLINE#",
"click",
".",
"echo",
"(",
"(",
"'#'",
"*",
"80",
")",
")",
"#NEWLINE#",
"click",
".",
"echo",
"(",
"'# {}'",
".",
"format",
"("... | true | 33 | [
"33",
"89",
"125",
"152",
"165",
"186",
"2",
"59",
"104",
"167",
"51",
"92",
"87",
"102",
"120",
"147"
] | 1 | VARIABLE_MISUSE | [
2,
59,
104,
167
] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "hactar-is/olaf/olaf/cli.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def output(req) :
click.echo ('
')
click.echo (('#' * 80))
click.echo ('# {}'.format (<MASK> ['name']))
click.echo (('#' * 80))
packages = collections.OrderedDict (sorted (req ['packages'].items (), key = (lambda t : str (t [0]))))
for (k, v) in packages.items () :
if (k not in re... | req |
5,607 | [
"#NEWLINE#",
"def test_login_logout(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Test login and logout using helper functions'",
"#NEWLINE#",
"rv",
"=",
"self",
".",
"login",
"(",
"app",
".",
"config",
"[",
"'USERNAME'",
"]",
",",
"app",
".",
"config",
"[",
"'P... | true | 36 | [
"9",
"41",
"55",
"60",
"91",
"96",
"127",
"2",
"11",
"30",
"36",
"43",
"49",
"62",
"85",
"98",
"121"
] | 1 | VARIABLE_MISUSE | [
9,
41,
55,
60,
91,
96,
127
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 29,
"after_index": 35... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Akagi201/learning-python/flask/flaskr-tdd/app-test.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_login_logout(self) :
'Test login and logout using helper functions'
rv = self.login (app.config ['USERNAME'], app.config ['PASSWORD'])
self.assertIn (b'You were logged in', <MASK>.data)
rv = self.logout ()
self.assertIn (b'You were logged out', rv.data)
rv = self.login ((app.confi... | rv |
5,608 | [
"#NEWLINE#",
"def testParentBoundsWhenNoInstances(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"sphere",
"=",
"GafferScene",
".",
"Sphere",
"(",
")",
"#NEWLINE#",
"sphere",
"[",
"'type'",
"]",
".",
"setValue",
"(",
"sphere",
".",
"Type",
".",
"Primitive",
")",
... | true | 77 | [
"29",
"37",
"50",
"60",
"87",
"7",
"15",
"22",
"44",
"67",
"77",
"97",
"2",
"73",
"83"
] | 1 | VARIABLE_MISUSE | [
29,
37,
50,
60,
87
] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ImageEngine/gaffer/python/GafferSceneTest/InstancerTest.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def testParentBoundsWhenNoInstances(self) :
sphere = GafferScene.Sphere ()
sphere ['type'].setValue (sphere.Type.Primitive)
instancer = GafferScene.Instancer ()
instancer ['in'].setInput (sphere ['out'])
instancer ['parent'].setValue ('/sphere')
instancer ['instance'].setInput (sphere ['ou... | instancer |
5,609 | [
"#NEWLINE#",
"@",
"includes",
".",
"setter",
"#NEWLINE#",
"def includes(",
"self",
",",
"value",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"hasattr",
"(",
"self",
",",
"'_perms_cache'",
")",
":",
"#NEWLINE#",
"#INDENT#",
"del",
"value",
".",
"_perms_cache",
"#N... | true | 25 | [
"7",
"17",
"30",
"9",
"25",
"34"
] | 1 | VARIABLE_MISUSE | [
7,
17,
30
] | [
[
{
"before_index": 1,
"after_index": 8,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 29,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lambdalisue/django-permission/src/permission/handlers.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ includes.setter
def includes(self, value) :
if hasattr (self, '_perms_cache') :
del <MASK>._perms_cache
self._includes = value
Given the code above, what is a proper replacement for <MASK>? Choose among: self, value | self |
5,610 | [
"#NEWLINE#",
"def ByteSize(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"n",
"=",
"0",
"#NEWLINE#",
"n",
"+=",
"self",
".",
"lengthString",
"(",
"len",
"(",
"self",
".",
"package_",
")",
")",
"#NEWLINE#",
"n",
"+=",
"self",
".",
"lengthString",
"(",
"le... | true | 55 | [
"7",
"11",
"25",
"46",
"55",
"69",
"95",
"121",
"147",
"168",
"2",
"13",
"19",
"27",
"33",
"40",
"51",
"63",
"74",
"80",
"89",
"100",
"106",
"115",
"126",
"132",
"141",
"152",
"158"
] | 1 | VARIABLE_MISUSE | [
2,
13,
19,
27,
33,
40,
51,
63,
74,
80,
89,
100,
106,
115,
126,
132,
141,
152,
158
] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CollabQ/CollabQ/.google_appengine/google/appengine/base/capabilities_pb.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def ByteSize(self) :
n = 0
n += self.lengthString (len (self.package_))
n += self.lengthString (len (self.capability_))
if self.has_status_ :
n += (1 + self.lengthVarInt64 (<MASK>.status_))
if self.has_scheduled_time_ :
n += (1 + self.lengthString (len (self.scheduled_time_)))
if... | self |
5,611 | [
"#NEWLINE#",
"def __cmp__(",
"self",
",",
"other",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"self",
".",
"major",
"==",
"self",
".",
"major",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"(",
"self",
".",
"minor",
"-",
"other",
".",
"minor",
")",
... | true | 15 | [
"2",
"11",
"15",
"24",
"40",
"4",
"28",
"44"
] | 1 | VARIABLE_MISUSE | [
4,
28,
44
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 12... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "javgh/greenaddress-pos-tools/nfc/ndef/handover.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def __cmp__(self, other) :
if (self.major == <MASK>.major) :
return (self.minor - other.minor)
else :
return (self.major - other.major)
Given the code above, what is a proper replacement for <MASK>? Choose among: self, other | other |
5,612 | [
"#NEWLINE#",
"def read_octet_sequence(",
"f",
")",
":",
"#NEWLINE#",
"#INDENT#",
"length",
"=",
"ord",
"(",
"f",
".",
"read",
"(",
"1",
")",
")",
"#NEWLINE#",
"string",
"=",
"f",
".",
"read",
"(",
"length",
")",
"#NEWLINE#",
"if",
"(",
"len",
"(",
"len... | true | 32 | [
"2",
"11",
"21",
"40",
"48",
"19",
"56",
"69",
"7",
"25",
"32",
"35",
"52"
] | 1 | VARIABLE_MISUSE | [
19,
56,
69
] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "javgh/greenaddress-pos-tools/nfc/ndef/handover.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def read_octet_sequence(f) :
length = ord (f.read (1))
string = f.read (length)
if (len (<MASK>) < length) :
s = 'expected octet sequence of length {0} but got just {1}'
log.error (s.format (length, len (string)))
raise FormatError ('octet sequence length error')
return string... | string |
5,613 | [
"#NEWLINE#",
"@",
"property",
"#NEWLINE#",
"def child_0_3_months(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"len",
"(",
"[",
"c",
"for",
"c",
"in",
"c",
".",
"all_cases",
"if",
"(",
"c",
".",
"child_age",
"and",
"(",
"c",
".",
"child_age",
"... | true | 18 | [
"5",
"14",
"16",
"18",
"23",
"28"
] | 1 | VARIABLE_MISUSE | [
5
] | [
[
{
"before_index": 10,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dimagi/commcare-hq/custom/opm/health_status.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ property
def child_0_3_months(self) :
return len ([c for c in <MASK>.all_cases if (c.child_age and (c.child_age in range (0, 4)))])
Given the code above, what is a proper replacement for <MASK>? Choose among: self, c | self |
5,614 | [
"#NEWLINE#",
"def testAddBackendServers(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"params",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'Action'",
":",
"'AddBackendServers'",
",",
"#NEWLINE#",
"'LoadBalancerId'",
":",
"'lbid'",
",",
"#NEWLINE#",
"'BackendServers'",
":",
"... | true | 52 | [
"2",
"46",
"52",
"55",
"63",
"83",
"7"
] | 1 | VARIABLE_MISUSE | [
7
] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 45,
"after_index": 51,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 54,
"after_index": 6... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "quixey/python-aliyun/tests/unit/aliyun/slb/connection_test.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def testAddBackendServers(self) :
params = {
'Action' : 'AddBackendServers',
'LoadBalancerId' : 'lbid',
'BackendServers' : [{
'ServerId' : 'id1',
'Weight' : 1,
}],
}
self.conn.get (<MASK>)
self.mox.ReplayAll ()
self.conn.add_backend_servers ('lb... | params |
5,615 | [
"#NEWLINE#",
"def bind(",
"self",
",",
"name",
",",
"value",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\" Binds a name to a value in the interpreter's namespace. \"",
"#NEWLINE#",
"self",
".",
"shell",
".",
"bind",
"(",
"name",
",",
"name",
")",
"#NEWLINE#",
"return"
] | true | 21 | [
"4",
"19",
"21",
"6",
"2",
"13"
] | 1 | VARIABLE_MISUSE | [
6
] | [
[
{
"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": "enthought/envisage/envisage/plugins/python_shell/view/python_shell_view.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def bind(self, name, value) :
" Binds a name to a value in the interpreter's namespace. "
self.shell.bind (name, <MASK>)
return
Given the code above, what is a proper replacement for <MASK>? Choose among: name, value, self | value |
5,616 | [
"#NEWLINE#",
"@",
"factory",
".",
"post_generation",
"#NEWLINE#",
"def add_contributors(",
"self",
",",
"create",
",",
"extracted",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"not",
"extracted",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"#... | true | 21 | [
"9",
"11",
"21",
"30",
"38",
"7",
"46"
] | 1 | VARIABLE_MISUSE | [
9
] | [
[
{
"before_index": 1,
"after_index": 8,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 29,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ExCiteS/geokey/geokey/projects/tests/model_factories.py",
"license": "apache-2.0",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ factory.post_generation
def add_contributors(self, create, extracted, **kwargs) :
if (not <MASK>) :
return
if extracted :
UserGroupFactory (add_users = extracted, ** {
'project' : self,
'can_contribute' : True,
})
Given the code above, what is a proper rep... | create |
5,617 | [
"#NEWLINE#",
"def validate(",
"self",
",",
"types",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"(",
"self",
".",
"name",
"==",
"'_API_'",
")",
"or",
"(",
"self",
".",
"name",
"==",
"'_NONE_'",
")",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"#NEWLIN... | true | 61 | [
"34",
"42",
"2",
"12",
"20",
"44",
"4",
"36",
"61"
] | 1 | VARIABLE_MISUSE | [
2,
12,
20,
44
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 33,
"after_index": 34... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "hiranya911/rest-coder/python-lib/api.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def validate(self, types) :
if ((self.name == '_API_') or (self.name == '_NONE_')) :
return
for type in types :
if (type == self.name) :
return
raise APIDescriptionException (('Reference to unknown data type: ' + <MASK>.name))
Given the code above, what is a proper replac... | self |
5,618 | [
"#NEWLINE#",
"@",
"classmethod",
"#NEWLINE#",
"def register_options(",
"cls",
",",
"register",
")",
":",
"#NEWLINE#",
"#INDENT#",
"super",
"(",
"PythonRepos",
",",
"cls",
")",
".",
"register_options",
"(",
"cls",
")",
"#NEWLINE#",
"register",
"(",
"'--repos'",
"... | true | 21 | [
"5",
"16",
"21",
"7",
"24",
"46"
] | 1 | VARIABLE_MISUSE | [
7,
24,
46
] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pantsbuild/pants/src/python/pants/backend/python/python_setup.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ classmethod
def register_options(cls, register) :
super (PythonRepos, cls).register_options (<MASK>)
register ('--repos', advanced = True, type = list, default = [], help = 'URLs of code repositories.')
register ('--indexes', advanced = True, type = list, default = ['https://pypi.python.org/simple/'],... | register |
5,619 | [
"#NEWLINE#",
"def main(",
"args",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Run simulators.\\n '",
"#NEWLINE#",
"import",
"argparse",
"#NEWLINE#",
"parser",
"=",
"argparse",
".",
"ArgumentParser",
"(",
"description",
"=",
"'Run Lantz simulators.'",
")",
"#N... | true | 53 | [
"2",
"44",
"61",
"69",
"14",
"25",
"49",
"46",
"53",
"74"
] | 1 | VARIABLE_MISUSE | [
2,
44,
61,
69
] | [
[
{
"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": 13,
"after_index": 19,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "LabPy/lantz/lantz/simulators/__init__.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def main(args = None) :
'Run simulators.
'
import argparse
parser = argparse.ArgumentParser (description = 'Run Lantz simulators.')
parser.add_argument ('simulator', choices = list (SIMULATORS.keys ()))
(args, pending) = parser.parse_known_args (<MASK>)
print (('Dispatching ' + args.si... | args |
5,620 | [
"#NEWLINE#",
"def test_add_under_prefix(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"prefix",
"=",
"'/prefix'",
"#NEWLINE#",
"self",
".",
"application",
".",
"add_files",
"(",
"self",
".",
"files",
".",
"directory",
",",
"prefix",
"=",
"prefix",
")",
"#NEWLINE... | true | 37 | [
"2",
"11",
"17",
"30",
"37",
"39",
"47",
"55",
"28",
"51",
"7",
"23",
"25"
] | 1 | VARIABLE_MISUSE | [
7,
23,
25
] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 27,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "evansd/whitenoise/tests/test_whitenoise.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_add_under_prefix(self) :
prefix = '/prefix'
self.application.add_files (self.files.directory, prefix = prefix)
response = self.server.get ((<MASK> + self.files.js_url))
self.assertEqual (response.content, self.files.js_content)
Given the code above, what is a proper replacement fo... | prefix |
5,621 | [
"#NEWLINE#",
"def flush(",
"self",
",",
"timestamp",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"not",
"self",
".",
"count",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"[",
"]",
"#NEWLINE#",
"#UNINDENT#",
"metrics",
"=",
"[",
"(",
"timestamp",
",",
"s... | true | 116 | [
"152",
"203",
"39",
"63",
"87",
"113",
"175",
"183",
"205",
"2",
"12",
"30",
"37",
"42",
"46",
"54",
"61",
"66",
"70",
"78",
"85",
"90",
"94",
"102",
"111",
"120",
"130",
"135",
"146",
"154",
"181",
"207",
"211",
"24",
"196",
"219",
"4",
"28"... | 1 | VARIABLE_MISUSE | [
2,
12,
30,
37,
42,
46,
54,
61,
66,
70,
78,
85,
90,
94,
102,
111,
120,
130,
135,
146,
154,
181,
207,
211
] | [
[
{
"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": 23,
"after_index": 26... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "DataDog/datadogpy/datadog/threadstats/metrics.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def flush(self, timestamp) :
if (not self.count) :
return []
metrics = [(timestamp, self.min, ('%s.min' % self.name), self.tags, self.host), (timestamp, self.max, ('%s.max' % self.name), self.tags, self.host), (timestamp, self.count, ('%s.count' % self.name), self.tags, self.host), (timestamp, self.avera... | self |
5,622 | [
"#NEWLINE#",
"def _sanitize_column(",
"self",
",",
"key",
",",
"value",
")",
":",
"#NEWLINE#",
"#INDENT#",
"sp_maker",
"=",
"(",
"lambda",
"x",
",",
"index",
"=",
"None",
":",
"SparseArray",
"(",
"x",
",",
"index",
"=",
"index",
",",
"fill_value",
"=",
"... | true | 103 | [
"6",
"46",
"55",
"87",
"98",
"120",
"130",
"140",
"149",
"163",
"188",
"212",
"225",
"11",
"173",
"210",
"223",
"4",
"2",
"31",
"37",
"59",
"68",
"74",
"153",
"193",
"227",
"53",
"103",
"118",
"147",
"171",
"175",
"208",
"221",
"236"
] | 1 | VARIABLE_MISUSE | [
2,
31,
37,
59,
68,
74,
153,
193,
227
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 43,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pydata/pandas/pandas/sparse/frame.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def _sanitize_column(self, key, value) :
sp_maker = (lambda x, index = None : SparseArray (x, index = index, fill_value = self._default_fill_value, kind = self._default_kind))
if isinstance (value, SparseSeries) :
clean = value.reindex (self.index).as_sparse_array (fill_value = self._default_fill_val... | self |
5,623 | [
"#NEWLINE#",
"def test_client_create_snapshot_not_available(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"clt",
"=",
"self",
".",
"client",
"#NEWLINE#",
"vol",
"=",
"self",
".",
"volume",
"#NEWLINE#",
"name",
"=",
"utils",
".",
"random_unicode",
"(",
")",
"#NEWLI... | true | 60 | [
"46",
"90",
"35",
"19",
"77",
"79",
"27",
"81",
"83",
"2",
"9",
"15",
"63",
"7",
"60",
"71",
"13",
"75"
] | 1 | VARIABLE_MISUSE | [
35
] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "rackspace/pyrax/tests/unit/test_cloud_blockstorage.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_client_create_snapshot_not_available(self) :
clt = self.client
vol = self.volume
name = utils.random_unicode ()
description = utils.random_unicode ()
cli_exc = exc.ClientException (409, 'Request conflicts with in-progress')
sav = BaseManager.create
BaseManager.create = Mock (... | cli_exc |
5,624 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"work_id",
",",
"exception",
"=",
"None",
",",
"result",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"work_id",
"=",
"work_id",
"#NEWLINE#",
"self",
".",
"exception",
"=",
"result",
"#NEWLINE#",
"se... | true | 27 | [
"2",
"17",
"23",
"29",
"10",
"27",
"31",
"33",
"4",
"19",
"21",
"6",
"25"
] | 1 | VARIABLE_MISUSE | [
6,
25
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "SickRage/SickRage/lib/concurrent/futures/process.py",
"license": "gpl-3.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def __init__(self, work_id, exception = None, result = None) :
self.work_id = work_id
self.exception = <MASK>
self.result = result
Given the code above, what is a proper replacement for <MASK>? Choose among: self, result, work_id, exception | exception |
5,625 | [
"#NEWLINE#",
"def delete_message(",
"self",
",",
"queue_name",
",",
"message_id",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Delete a message.\\n\\n :param queue_name: Queue Name\\n :param message_id: Message id\\n '",
"#NEWLINE#",
"self",
".",
"_make_request",
"(",
... | true | 25 | [
"2",
"13",
"4",
"23",
"25",
"6"
] | 1 | VARIABLE_MISUSE | [
6
] | [
[
{
"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": "softlayer/softlayer-python/SoftLayer/managers/messaging.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def delete_message(self, queue_name, message_id) :
'Delete a message.
:param queue_name: Queue Name
:param message_id: Message id
'
self._make_request ('delete', ('queues/%s/messages/%s' % (queue_name, <MASK>)))
return True
Given the code above, what is a proper replace... | message_id |
5,626 | [
"#NEWLINE#",
"def __deepcopy__(",
"self",
",",
"memodict",
")",
":",
"#NEWLINE#",
"#INDENT#",
"obj",
"=",
"copy",
".",
"copy",
"(",
"obj",
")",
"#NEWLINE#",
"memodict",
"[",
"id",
"(",
"self",
")",
"]",
"=",
"obj",
"#NEWLINE#",
"return",
"obj"
] | true | 15 | [
"2",
"22",
"4",
"18",
"9",
"15",
"26",
"29"
] | 1 | VARIABLE_MISUSE | [
2,
22
] | [
[
{
"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": 26... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "fusionbox/django-widgy/widgy/models/links.py",
"license": "apache-2.0",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def __deepcopy__(self, memodict) :
obj = copy.copy (<MASK>)
memodict [id (self)] = obj
return obj
Given the code above, what is a proper replacement for <MASK>? Choose among: self, memodict, obj | self |
5,627 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"fLocksWithSheet",
"=",
"None",
",",
"fPrintsWithSheet",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"fLocksWithSheet",
"=",
"fLocksWithSheet",
"#NEWLINE#",
"self",
".",
"fPrintsWithSheet",
"=",
"self"
] | true | 25 | [
"8",
"23",
"4",
"17",
"19",
"2",
"15",
"21",
"25"
] | 1 | VARIABLE_MISUSE | [
8,
23
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudera/hue/desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/drawing/spreadsheet_drawing.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def __init__(self, fLocksWithSheet = None, fPrintsWithSheet = None) :
self.fLocksWithSheet = fLocksWithSheet
self.fPrintsWithSheet = <MASK>
Given the code above, what is a proper replacement for <MASK>? Choose among: fPrintsWithSheet, fLocksWithSheet, self | fPrintsWithSheet |
5,628 | [
"#NEWLINE#",
"def test_NotConditional_many_mixed(",
"always",
",",
"never",
",",
"member",
",",
"request",
")",
":",
"#NEWLINE#",
"#INDENT#",
"assert",
"Not",
"(",
"always",
",",
"never",
")",
"(",
"member",
",",
"always",
")"
] | true | 23 | [
"2",
"16",
"23",
"4",
"18",
"8",
"6",
"21"
] | 1 | VARIABLE_MISUSE | [
8
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "justanr/flask-allows/test/test_requirement.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_NotConditional_many_mixed(always, never, member, request) :
assert Not (always, never) (member, <MASK>)
Given the code above, what is a proper replacement for <MASK>? Choose among: always, never, request, member | request |
5,629 | [
"#NEWLINE#",
"def __exit__(",
"self",
",",
"*",
"_",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Cleanup.'",
"#NEWLINE#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"status",
"=",
"ctypes",
".",
"c_ulong",
"(",
"STILL_ACTIVE",
")",
"#NEWLINE#",
"while",
"(",
"status",
".",... | true | 68 | [
"5",
"68",
"16",
"27",
"63",
"73",
"43",
"2",
"53",
"94",
"110"
] | 1 | VARIABLE_MISUSE | [
43
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 3,
"after_index": 5,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 10,
... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Robpol86/colorclass/tests/screenshot.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def __exit__(self, * _) :
'Cleanup.'
try :
status = ctypes.c_ulong (STILL_ACTIVE)
while (status.value == STILL_ACTIVE) :
time.sleep (0.1)
res = ctypes.windll.kernel32.GetExitCodeProcess (self.process_info.hProcess, ctypes.byref (status))
assert <MASK>
... | res |
5,630 | [
"#NEWLINE#",
"@",
"mock",
".",
"patch",
"(",
"'tooz.drivers.pgsql.psycopg2.connect'",
")",
"#NEWLINE#",
"def test_failure_acquire_lock(",
"self",
",",
"psycopg2_connector",
")",
":",
"#NEWLINE#",
"#INDENT#",
"execute_mock",
"=",
"mock",
".",
"MagicMock",
"(",
")",
"#N... | true | 56 | [
"94",
"102",
"110",
"108",
"125",
"12",
"88",
"72",
"80",
"92",
"38",
"46",
"56",
"59",
"86",
"17",
"25",
"10",
"96",
"117"
] | 1 | VARIABLE_MISUSE | [
17,
25
] | [
[
{
"before_index": 1,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/tooz/tooz/tests/test_postgresql.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ mock.patch ('tooz.drivers.pgsql.psycopg2.connect')
def test_failure_acquire_lock(self, psycopg2_connector) :
execute_mock = mock.MagicMock ()
execute_mock.execute.side_effect = psycopg2.OperationalError ('Broken')
cursor_mock = mock.MagicMock ()
cursor_mock.__enter__ = mock.MagicMock (return_valu... | execute_mock |
5,631 | [
"#NEWLINE#",
"def _normalize(",
"table",
",",
"normalize",
",",
"margins",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"(",
"not",
"isinstance",
"(",
"normalize",
",",
"bool",
")",
")",
"and",
"(",
"not",
"isinstance",
"(",
"normalize",
",",
"compat",
".... | true | 504 | [
"90",
"170",
"175",
"186",
"6",
"83",
"227",
"294",
"184",
"206",
"2",
"204",
"208",
"211",
"213",
"236",
"252",
"266",
"268",
"284",
"288",
"320",
"325",
"335",
"337",
"370",
"372",
"379",
"381",
"443",
"448",
"458",
"460",
"467",
"469",
"234",
... | 1 | VARIABLE_MISUSE | [
2,
204,
208,
211,
213,
236,
252,
266,
268,
284,
288,
320,
325,
335,
337,
370,
372,
379,
381,
443,
448,
458,
460,
467,
469
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 81,
"after_index": 8... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pydata/pandas/pandas/tools/pivot.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def _normalize(table, normalize, margins) :
if ((not isinstance (normalize, bool)) and (not isinstance (normalize, compat.string_types))) :
axis_subs = {
0 : 'index',
1 : 'columns',
}
try :
normalize = axis_subs [normalize]
except KeyError :
r... | table |
5,632 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"session",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"__session",
"=",
"self"
] | true | 13 | [
"4",
"2",
"9",
"13"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 9,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "zynga/jasy/jasy/js/api/Writer.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def __init__(self, session) :
self.__session = <MASK>
Given the code above, what is a proper replacement for <MASK>? Choose among: session, self | session |
5,633 | [
"#NEWLINE#",
"def test_htmlstr(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"loader",
"=",
"loaders",
".",
"htmlstr",
"(",
"self",
".",
"doc",
")",
"#NEWLINE#",
"self",
".",
"assertEquals",
"(",
"id",
"(",
"loader",
".",
"load",
"(",
")",
")",
",",
"id"... | true | 100 | [
"7",
"24",
"33",
"41",
"62",
"71",
"100",
"2",
"13",
"18",
"47",
"56",
"85",
"109",
"138",
"153",
"162",
"79",
"115",
"132",
"168",
"94",
"124",
"147",
"177"
] | 1 | VARIABLE_MISUSE | [
2,
13,
18,
47,
56,
85,
109,
138,
153,
162
] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 30,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 40,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "twisted/nevow/nevow/test/test_loaders.py",
"license": "mit",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_htmlstr(self) :
loader = loaders.htmlstr (self.doc)
self.assertEquals (id (loader.load ()), id (loader.load ()))
loader = loaders.htmlstr (self.doc, pattern = '1')
self.assertEquals (id (loader.load ()), id (loader.load ()))
l1 = loaders.htmlstr (self.doc, pattern = '1')
l2 = load... | self |
5,634 | [
"#NEWLINE#",
"def get_publish_at(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"self",
".",
"cleaned_data",
"[",
"'publish_radio'",
"]",
"==",
"'now'",
")",
":",
"#NEWLINE#",
"#INDENT#",
"publish_at",
"=",
"timezone",
".",
"now",
"(",
")",
"#NEWLINE... | true | 36 | [
"2",
"9",
"21",
"34",
"36",
"45"
] | 1 | VARIABLE_MISUSE | [
2,
9
] | [
[
{
"before_index": 7,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 44,
"after_index": 45,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "fusionbox/django-widgy/widgy/views/versioning.py",
"license": "apache-2.0",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def get_publish_at(self) :
if (self.cleaned_data ['publish_radio'] == 'now') :
publish_at = timezone.now ()
else :
publish_at = <MASK>.cleaned_data ['publish_at']
return publish_at
Given the code above, what is a proper replacement for <MASK>? Choose among: self, publish_at | self |
5,635 | [
"#NEWLINE#",
"def _iterate_revisions(",
"self",
",",
"upper",
",",
"lower",
")",
":",
"#NEWLINE#",
"#INDENT#",
"lower",
"=",
"self",
".",
"get_revision",
"(",
"lower",
")",
"#NEWLINE#",
"upper",
"=",
"self",
".",
"get_revision",
"(",
"upper",
")",
"#NEWLINE#",... | true | 113 | [
"29",
"91",
"113",
"2",
"13",
"22",
"109",
"101",
"4",
"20",
"26",
"43",
"47",
"55",
"53",
"59",
"69",
"98",
"103",
"107",
"6",
"11",
"17",
"33",
"37",
"61",
"75"
] | 1 | VARIABLE_MISUSE | [
101
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "goFrendiAsgard/kokoropy/kokoropy/packages/alembic/script.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def _iterate_revisions(self, upper, lower) :
lower = self.get_revision (lower)
upper = self.get_revision (upper)
orig = ((lower.revision if lower else 'base'), (upper.revision if upper else 'base'))
script = upper
while (script != lower) :
if ((script is None) and (lower is not None)) ... | downrev |
5,636 | [
"#NEWLINE#",
"def test_sample_list(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"samples",
"=",
"self",
".",
"samples",
".",
"list",
"(",
")",
"#NEWLINE#",
"meter_name",
"=",
"'meter_name'",
"#NEWLINE#",
"ceilometerclient",
"=",
"self",
".",
"stub_ceilometerclient"... | true | 93 | [
"17",
"47",
"49",
"82",
"21",
"29",
"41",
"91",
"93",
"101",
"7",
"11",
"31",
"43",
"59",
"2",
"9",
"23",
"33",
"62",
"78",
"97",
"70"
] | 1 | VARIABLE_MISUSE | [
70
] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Havate/havate-openstack/proto-build/gui/horizon/Horizon_GUI/openstack_dashboard/test/api_tests/ceilometer_tests.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_sample_list(self) :
samples = self.samples.list ()
meter_name = 'meter_name'
ceilometerclient = self.stub_ceilometerclient ()
ceilometerclient.samples = self.mox.CreateMockAnything ()
ceilometerclient.samples.list (meter_name = meter_name, q = []).AndReturn (samples)
self.mox.Repl... | ret_list |
5,637 | [
"#NEWLINE#",
"def plot_2d_separator(",
"classifier",
",",
"X",
",",
"fill",
"=",
"False",
",",
"ax",
"=",
"None",
",",
"eps",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"eps",
"is",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"eps",
"=",
... | true | 140 | [
"14",
"23",
"30",
"62",
"77",
"100",
"115",
"132",
"157",
"4",
"33",
"51",
"66",
"89",
"104",
"6",
"274",
"82",
"138",
"353",
"84",
"355",
"2",
"187",
"226",
"119",
"155",
"46",
"127",
"346",
"148",
"173",
"284",
"319",
"44",
"125",
"140",
"3... | 1 | VARIABLE_MISUSE | [
84,
355
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 42,
"after_index": 6... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "amueller/nyu_ml_lectures/plots/plot_2d_separator.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def plot_2d_separator(classifier, X, fill = False, ax = None, eps = None) :
if (eps is None) :
eps = (X.std () / 2.0)
(x_min, x_max) = ((X [:, 0].min () - eps), (X [:, 0].max () + eps))
(y_min, y_max) = ((X [:, 1].min () - eps), (X [:, 1].max () + eps))
xx = np.linspace (x_min, x_max, 100)
... | y_max |
5,638 | [
"#NEWLINE#",
"def main(",
"client",
",",
"ad_group_id",
",",
"ad_id",
")",
":",
"#NEWLINE#",
"#INDENT#",
"ad_group_ad_service",
"=",
"client",
".",
"GetService",
"(",
"'AdGroupAdService'",
",",
"version",
"=",
"'v201603'",
")",
"#NEWLINE#",
"operations",
"=",
"[",... | true | 84 | [
"24",
"78",
"84",
"72",
"2",
"13",
"82",
"97",
"105",
"6",
"57",
"11",
"74",
"4",
"47"
] | 1 | VARIABLE_MISUSE | [
72
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "googleads/googleads-python-lib/examples/adwords/v201603/basic_operations/remove_ad.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def main(client, ad_group_id, ad_id) :
ad_group_ad_service = client.GetService ('AdGroupAdService', version = 'v201603')
operations = [{
'operator' : 'REMOVE',
'operand' : {
'xsi_type' : 'AdGroupAd',
'adGroupId' : ad_group_id,
'ad' : {
... | result |
5,639 | [
"#NEWLINE#",
"def append_use_flags(",
"atom",
",",
"uses",
"=",
"None",
",",
"overwrite",
"=",
"False",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Append a list of use flags for a given package or DEPEND atom\\n\\n CLI Example:\\n\\n .. code-block:: bash\\n\\n salt \\'*\\... | true | 75 | [
"4",
"20",
"25",
"41",
"8",
"77",
"79",
"2",
"33",
"52",
"54",
"57",
"69",
"71",
"75"
] | 1 | VARIABLE_MISUSE | [
4,
20,
25,
41
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "saltstack/salt/salt/modules/portage_config.py",
"license": "apache-2.0",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def append_use_flags(atom, uses = None, overwrite = False) :
'
Append a list of use flags for a given package or DEPEND atom
CLI Example:
.. code-block:: bash
salt \'*\' portage_config.append_use_flags "app-admin/salt[ldap, -libvirt]"
salt \'*\' portage_config.append_use_flags ">=app... | uses |
5,640 | [
"#NEWLINE#",
"def create(",
"kernel",
")",
":",
"#NEWLINE#",
"#INDENT#",
"result",
"=",
"Intangible",
"(",
")",
"#NEWLINE#",
"result",
".",
"template",
"=",
"'object/draft_schematic/scout/shared_item_camp_elite.iff'",
"#NEWLINE#",
"result",
".",
"attribute_template_id",
"... | true | 38 | [
"2",
"38",
"7",
"13",
"19",
"28"
] | 1 | VARIABLE_MISUSE | [
7,
13,
19,
28
] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "anhstudios/swganh/data/scripts/templates/object/draft_schematic/scout/shared_item_camp_elite.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def create(kernel) :
result = Intangible ()
result.template = 'object/draft_schematic/scout/shared_item_camp_elite.iff'
result.attribute_template_id = (- 1)
result.stfName ('string_id_table', '')
return <MASK>
Given the code above, what is a proper replacement for <MASK>? Choose among... | result |
5,641 | [
"#NEWLINE#",
"def query(",
"self",
",",
"x",
",",
"k",
"=",
"1",
",",
"eps",
"=",
"0",
",",
"p",
"=",
"2",
",",
"distance_upper_bound",
"=",
"np",
".",
"inf",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Query the kd-tree for nearest neighbors\\n\\n Pa... | true | 371 | [
"6",
"126",
"166",
"183",
"212",
"238",
"326",
"328",
"345",
"393",
"452",
"536",
"538",
"555",
"596",
"645",
"658",
"680",
"18",
"338",
"340",
"548",
"550",
"363",
"375",
"380",
"570",
"577",
"582",
"401",
"420",
"432",
"441",
"697",
"712",
"717... | 1 | VARIABLE_MISUSE | [
304,
323,
354,
417,
429,
474,
479,
495,
504
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 27,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "scipy/scipy/scipy/spatial/kdtree.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def query(self, x, k = 1, eps = 0, p = 2, distance_upper_bound = np.inf) :
'
Query the kd-tree for nearest neighbors
Parameters
----------
x : array_like, last dimension self.m
An array of points to query.
k : int, optional
The number of nearest neig... | c |
5,642 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"name",
",",
"url",
",",
"duration",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"self",
".",
"name",
",",
"self",
".",
"url",
",",
"self",
".",
"duration",
")",
"=",
"(",
"name",
",",
"self",
",",
"int",
"(",
... | true | 30 | [
"6",
"20",
"4",
"16",
"28",
"2",
"14",
"18",
"22",
"30",
"8",
"24",
"34"
] | 1 | VARIABLE_MISUSE | [
6,
20
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 29,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cn28h/mobilecloud-14-flask/week2/video/app.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def __init__(self, name, url, duration) :
(self.name, self.url, self.duration) = (name, <MASK>, int (duration))
Given the code above, what is a proper replacement for <MASK>? Choose among: url, name, self, duration | url |
5,643 | [
"#NEWLINE#",
"def test_multiple_children(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"xmlns",
"in",
"CHILDREN_FORMS",
":",
"#NEWLINE#",
"#INDENT#",
"form",
"=",
"make_child2_form",
"(",
"_child_form_with_vhnd_attendance",
"(",
"self",
".",
"report_datetime",
",... | true | 58 | [
"14",
"35",
"28",
"54",
"75",
"8",
"24",
"58",
"2",
"20",
"60",
"69"
] | 1 | VARIABLE_MISUSE | [
28
] | [
[
{
"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": 13,
"after_index": 17... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dimagi/commcare-hq/custom/opm/tests/test_vhnd.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_multiple_children(self) :
for xmlns in CHILDREN_FORMS :
form = make_child2_form (_child_form_with_vhnd_attendance (self.report_datetime, xmlns))
case = OPMCase (forms = [form], dod = date (2014, 3, 10), child_index = 2)
row = MockCaseRow (<MASK>, self.report, child_index = 2)
... | case |
5,644 | [
"#NEWLINE#",
"def run(",
"self",
",",
"*",
"args",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"i",
"in",
"range",
"(",
"10",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"threads",
"=",
"self",
"#NEWLINE#",
"super",
"(",
"TestScheduler",... | true | 26 | [
"5",
"38",
"13",
"41",
"2",
"22",
"26",
"32"
] | 1 | VARIABLE_MISUSE | [
13
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 3,
"after_index": 5,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 13,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "felix-lang/fbuild/tests/test_scheduler.py",
"license": "bsd-2-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def run(self, * args, **kwargs) :
for i in range (10) :
self.threads = <MASK>
super (TestScheduler, self).run (* args, ** kwargs)
Given the code above, what is a proper replacement for <MASK>? Choose among: args, i, kwargs, self | i |
5,645 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"*",
"args",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Create a new resource instance. The public attribute osid will hold the\\n Openstack id of the resource once provisioned.\\n '",
"#NEWLINE#",
"super",
... | true | 24 | [
"27",
"2",
"18",
"24",
"30",
"5"
] | 1 | VARIABLE_MISUSE | [
5
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 3,
"after_index": 5,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 12,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "haxsaw/actuator/src/actuator/provisioners/openstack/resources.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def __init__(self, * args, **kwargs) :
'
Create a new resource instance. The public attribute osid will hold the
Openstack id of the resource once provisioned.
'
super (_OpenstackProvisionableInfraResource, self).__init__ (* <MASK>, ** kwargs)
self.osid = None
Given the ... | args |
5,646 | [
"#NEWLINE#",
"def test_inc_2d_vector_map(",
"self",
",",
"backend",
",",
"node",
",",
"d2",
",",
"vd2",
",",
"node2ele",
")",
":",
"#NEWLINE#",
"#INDENT#",
"vd2",
".",
"data",
"[",
":",
",",
"0",
"]",
"=",
"3",
"#NEWLINE#",
"vd2",
".",
"data",
"[",
":"... | true | 269 | [
"10",
"17",
"28",
"92",
"108",
"247",
"66",
"78",
"102",
"113",
"122",
"131",
"159",
"187",
"215",
"256",
"278",
"12",
"98",
"6",
"83",
"269",
"4",
"8",
"39",
"59",
"85",
"2"
] | 1 | VARIABLE_MISUSE | [
10,
17,
28,
92,
108,
247
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 26,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 27,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "OP2/PyOP2/test/unit/test_vector_map.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_inc_2d_vector_map(self, backend, node, d2, vd2, node2ele) :
vd2.data [:, 0] = 3
vd2.data [:, 1] = 4
d2.data [:] = numpy.arange ((2 * nnodes)).reshape (d2.data.shape)
k = '
void k(int *d, int *vd[2]) {
vd[0][0] += d[0];
vd[0][1] += d[1];
}'
op2.par_loop (... | vd2 |
5,647 | [
"#NEWLINE#",
"@",
"pytest",
".",
"mark",
".",
"parametrize",
"(",
"'how'",
",",
"[",
"'inner'",
",",
"'left'",
",",
"'right'",
",",
"'outer'",
"]",
")",
"#NEWLINE#",
"def test_hash_join(",
"how",
")",
":",
"#NEWLINE#",
"#INDENT#",
"A",
"=",
"pd",
".",
"D... | true | 163 | [
"22",
"167",
"188",
"170",
"195",
"228",
"257",
"74",
"159",
"204",
"266",
"281",
"299",
"314",
"138",
"208",
"270",
"285",
"303",
"318",
"178",
"197",
"236",
"259",
"91",
"144",
"186",
"244",
"155",
"172",
"200",
"221",
"230",
"27",
"80",
"163",... | 1 | VARIABLE_MISUSE | [
138,
208,
270,
285,
303,
318
] | [
[
{
"before_index": 26,
"after_index": 32,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 73,
"after_index": 81,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 90,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dask/dask/dask/dataframe/tests/test_multi.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ pytest.mark.parametrize ('how', ['inner', 'left', 'right', 'outer'])
def test_hash_join(how) :
A = pd.DataFrame ({
'x' : [1, 2, 3, 4, 5, 6],
'y' : [1, 1, 2, 2, 3, 4],
})
a = dd.repartition (A, [0, 4, 5])
B = pd.DataFrame ({
'y' : [1, 3, 4, 4, 5, 6],
'z' : [6, 5, 4,... | b |
5,648 | [
"#NEWLINE#",
"def testBlobstore_FetchData(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"create_blobinfo",
"(",
"'xxx'",
")",
"#NEWLINE#",
"stub",
"=",
"self",
".",
"testbed",
".",
"get_stub",
"(",
"'blobstore'",
")",
"#NEWLINE#",
"storage",
"=",
"s... | true | 57 | [
"25",
"29",
"31",
"57",
"40",
"14",
"27",
"2",
"7",
"16",
"53"
] | 1 | VARIABLE_MISUSE | [
40
] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "GoogleCloudPlatform/datastore-ndb-python/ndb/blobstore_test.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def testBlobstore_FetchData(self) :
self.create_blobinfo ('xxx')
stub = self.testbed.get_stub ('blobstore')
storage = stub.storage
storage._blobs ['xxx'] = 'abcde'
result = blobstore.fetch_data ('xxx', 0, 3)
self.assertEqual (<MASK>, 'abcd')
Given the code above, what is a proper... | result |
5,649 | [
"#NEWLINE#",
"def sil_silk(",
"pins",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"_",
",",
"_",
",",
"_",
",",
"_",
",",
"sq",
")",
"=",
"draw_square",
"(",
"(",
"pins",
"*",
"2.54",
")",
",",
"2.54",
",",
"(",
"0",
",",
"0",
")",
",",
"'F.SilkS'",
... | true | 41 | [
"8",
"10",
"12",
"14",
"41",
"2",
"22",
"16"
] | 1 | VARIABLE_MISUSE | [
16
] | [
[
{
"before_index": 6,
"after_index": 26,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 40,
"after_index": 41,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "adamgreig/agg-kicad/scripts/build_mod_sil_dil.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def sil_silk(pins) :
(_, _, _, _, sq) = draw_square ((pins * 2.54), 2.54, (0, 0), 'F.SilkS', silk_width)
return <MASK>
Given the code above, what is a proper replacement for <MASK>? Choose among: _, pins, sq | sq |
5,650 | [
"#NEWLINE#",
"def allow_focus(",
"self",
",",
"timeout",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"self",
".",
"skype",
"is",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"attach",
"(",
"timeout",
")",
"#NEWLINE#",
"#UNINDENT#",
"process_id",
... | true | 51 | [
"28",
"46",
"61",
"4",
"24",
"2",
"11",
"20",
"40",
"51"
] | 1 | VARIABLE_MISUSE | [
28,
46,
61
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 27,
"after_index": 31... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Skype4Py/Skype4Py/Skype4Py/api/windows.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def allow_focus(self, timeout) :
if (self.skype is None) :
self.attach (timeout)
process_id = c_ulong ()
windll.user32.GetWindowThreadProcessId (self.skype, byref (process_id))
if <MASK> :
windll.user32.AllowSetForegroundWindow (process_id)
Given the code above, what is a pro... | process_id |
5,651 | [
"#NEWLINE#",
"def _call_test_func(",
"self",
",",
"test_fn",
")",
":",
"#NEWLINE#",
"#INDENT#",
"apps",
"=",
"None",
"#NEWLINE#",
"need_to_call_unset",
"=",
"False",
"#NEWLINE#",
"if",
"(",
"django",
".",
"get_version",
"(",
")",
">=",
"'1.7'",
")",
":",
"#NEW... | true | 72 | [
"13",
"60",
"84",
"4",
"70",
"9",
"33",
"38",
"48",
"72",
"82",
"89",
"2"
] | 1 | VARIABLE_MISUSE | [
2
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 15... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "appliedsec/djangular/djangular/tests/test_base.py",
"license": "apache-2.0",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def _call_test_func(self, test_fn) :
apps = None
need_to_call_unset = False
if (django.get_version () >= '1.7') :
from django.apps import apps
if (not apps.is_installed ('djangular.config.angularseed_template')) :
apps.set_installed_apps (tuple (['djangular.config.angularse... | self |
5,652 | [
"#NEWLINE#",
"def test_url(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"assertEqual",
"(",
"reverse",
"(",
"'admin:usergroup_data'",
",",
"kwargs",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'project_id'",
":",
"1",
",",
"#NEWLINE#",
"'usergroup_id'",
":",... | true | 76 | [
"37",
"48",
"62",
"2",
"7",
"44",
"58",
"72",
"76"
] | 1 | VARIABLE_MISUSE | [
37,
48,
62
] | [
[
{
"before_index": 6,
"after_index": 33,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 36,
"after_index": 40,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 43,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ExCiteS/geokey/geokey/users/tests/test_views.py",
"license": "apache-2.0",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_url(self) :
self.assertEqual (reverse ('admin:usergroup_data', kwargs = {
'project_id' : 1,
'usergroup_id' : 1,
}), '/admin/projects/1/usergroups/1/data/')
resolved = resolve ('/admin/projects/1/usergroups/1/data/')
self.assertEqual (resolved.kwargs ['project_id'], '1')
s... | resolved |
5,653 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"value",
",",
"message_template",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"message_template",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"message_template",
"=",
"message_template",
"#NEWLINE#",
"#UNINDENT#",
... | true | 32 | [
"2",
"18",
"28",
"39",
"4",
"6",
"14",
"20",
"22",
"30",
"32",
"25",
"44"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"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": 24,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/sahara/sahara/exceptions.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def __init__(self, value, message_template = None) :
if message_template :
self.message_template = message_template
formatted_message = (self.message_template % <MASK>)
super (UpdateFailedException, self).__init__ (formatted_message)
Given the code above, what is a proper replacement for <... | value |
5,654 | [
"#NEWLINE#",
"@",
"classmethod",
"#NEWLINE#",
"def _get_name_and_renderer(",
"cls",
",",
"name",
",",
"renderer",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"not",
"renderer",
")",
":",
"#NEWLINE#",
"#INDENT#",
"renderer",
"=",
"cls",
"#NEWLINE#",
"name",
"="... | true | 24 | [
"9",
"17",
"22",
"28",
"37",
"5",
"24",
"7",
"26",
"35"
] | 1 | VARIABLE_MISUSE | [
7,
26,
35
] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 33,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "vbmendes/django-meio-easytags/src/easytags/library.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ classmethod
def _get_name_and_renderer(cls, name, renderer) :
if (not renderer) :
renderer = <MASK>
name = renderer.__name__
return (name, renderer)
Given the code above, what is a proper replacement for <MASK>? Choose among: renderer, cls, name | name |
5,655 | [
"#NEWLINE#",
"@",
"classmethod",
"#NEWLINE#",
"def get_by_uid_excluding_deleted(",
"cls",
",",
"uid",
",",
"fail_if_not_found",
"=",
"False",
",",
"lock_for_update",
"=",
"False",
")",
":",
"#NEWLINE#",
"#INDENT#",
"q",
"=",
"db",
"(",
")",
".",
"query",
"(",
... | true | 83 | [
"7",
"37",
"97",
"68",
"80",
"83",
"103",
"13",
"45",
"9",
"20",
"49",
"51",
"58",
"60",
"70",
"5",
"28"
] | 1 | VARIABLE_MISUSE | [
9
] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 38,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 44,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/fuel-web/nailgun/nailgun/objects/task.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ classmethod
def get_by_uid_excluding_deleted(cls, uid, fail_if_not_found = False, lock_for_update = False) :
q = db ().query (cls.model).filter_by (id = uid, deleted_at = None)
if lock_for_update :
q = q.order_by ('id')
q = q.with_lockmode ('update')
res = q.first ()
if ((not res) a... | fail_if_not_found |
5,656 | [
"#NEWLINE#",
"def test_user_model_admin_custom_add_form(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"user_model_admin",
"=",
"UserAdmin",
"(",
"User",
",",
"self",
".",
"site",
")",
"#NEWLINE#",
"form",
"=",
"user_model_admin",
".",
"add_form",
"(",
")",
"#NEWLINE... | true | 32 | [
"18",
"7",
"20",
"32",
"2",
"13",
"26"
] | 1 | VARIABLE_MISUSE | [
18
] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "scieloorg/scielo-manager/scielomanager/journalmanager/tests/tests_admin.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_user_model_admin_custom_add_form(self) :
user_model_admin = UserAdmin (User, self.site)
form = user_model_admin.add_form ()
self.assertEqual (type (<MASK>), UserCreationForm)
Given the code above, what is a proper replacement for <MASK>? Choose among: form, user_model_admin, self | form |
5,657 | [
"#NEWLINE#",
"@",
"staticmethod",
"#NEWLINE#",
"def coerce(",
"a",
",",
"b",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"isinstance",
"(",
"a",
",",
"string_types",
")",
"and",
"isinstance",
"(",
"b",
",",
"string_types",
")",
")",
":",
"#NEWLINE#",
"#I... | true | 128 | [
"5",
"16",
"35",
"49",
"62",
"72",
"90",
"97",
"119",
"147",
"151",
"201",
"225",
"7",
"23",
"40",
"54",
"64",
"79",
"105",
"112",
"121",
"128",
"154",
"177",
"198",
"204",
"227"
] | 1 | VARIABLE_MISUSE | [
5,
16,
35,
49,
62,
72,
90,
97,
119,
147,
151,
201,
225
] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 45,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lektor/lektor/lektor/db.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ staticmethod
def coerce(a, b) :
if (isinstance (a, string_types) and isinstance (b, string_types)) :
return (sort_normalize_string (a), sort_normalize_string (b))
if (type (a) is type (b)) :
return (a, b)
if (isinstance (a, Undefined) or isinstance (b, Undefined)) :
if isinstance (a... | a |
5,692 | [
"#NEWLINE#",
"def get_approve_url(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"site",
"=",
"Site",
".",
"objects",
".",
"all",
"(",
")",
"[",
"0",
"]",
"#NEWLINE#",
"return",
"(",
"'http://%s%sintent/approve/%s'",
"%",
"(",
"self",
".",
"domain",
",",
"sel... | true | 25 | [
"7",
"2",
"25",
"29",
"37"
] | 1 | VARIABLE_MISUSE | [
7
] | [
[
{
"before_index": 6,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cidadania/ecidadania-ng/src/apps/spaces/models.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def get_approve_url(self) :
site = Site.objects.all () [0]
return ('http://%s%sintent/approve/%s' % (<MASK>.domain, self.space.get_absolute_url (), self.token))
Given the code above, what is a proper replacement for <MASK>? Choose among: site, self | site |
5,693 | [
"#NEWLINE#",
"def test_include_no_request_buttons(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"tree",
"=",
"self",
".",
"render_module_request_with_users",
"(",
"self",
".",
"basic_request",
",",
"'testuser'",
",",
"'testuser'",
",",
"**",
"tree",
".",
"basic_kwargs... | true | 22 | [
"28",
"45",
"59",
"7",
"22",
"30",
"2",
"9",
"13"
] | 1 | VARIABLE_MISUSE | [
2,
9,
13
] | [
[
{
"before_index": 6,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 27,
"after_index": 28,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 27,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "YelpArchive/pushmanager/pushmanager/tests/test_template_request.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_include_no_request_buttons(self) :
tree = self.render_module_request_with_users (self.basic_request, 'testuser', 'testuser', ** <MASK>.basic_kwargs)
for span in tree.iter ('span') :
T.assert_not_equal ('push-request-buttons', span.attrib ['class'])
T.assert_not_equal ('edit-request-... | self |
5,694 | [
"#NEWLINE#",
"@",
"method_decorator",
"(",
"login_required",
")",
"#NEWLINE#",
"def dispatch(",
"self",
",",
"*",
"args",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n checks permissions, requires a login and\\n because we are using a generic view approa... | true | 294 | [
"11",
"206",
"294",
"209",
"194",
"215",
"242",
"262",
"282",
"302",
"322",
"8",
"22",
"40",
"46",
"55",
"65",
"79",
"83",
"94",
"109",
"117",
"129",
"150",
"159",
"187",
"200",
"254",
"274",
"314"
] | 1 | VARIABLE_MISUSE | [
8,
22,
40,
46,
55,
65,
79,
83,
94,
109,
117,
129,
150,
159,
187,
200,
254,
274,
314
] | [
[
{
"before_index": 1,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 18... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "django-bmf/django-bmf/djangobmf/views/mixins.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ method_decorator (login_required)
def dispatch(self, * args, **kwargs) :
'
checks permissions, requires a login and
because we are using a generic view approach to the data-models
in django BMF, we can ditch a middleware (less configuration)
and add the functionality we need for ... | self |
5,695 | [
"#NEWLINE#",
"@",
"pytest",
".",
"mark",
".",
"parametrize",
"(",
"'units'",
",",
"[",
"'ergs/cm^2/s'",
",",
"'mJy'",
",",
"'Jy'",
",",
"'ergs/cm^2/s/Hz'",
",",
"'MJy/sr'",
"]",
")",
"#NEWLINE#",
"def test_sed_nodistance_units_invalid(",
"self",
",",
"units",
")... | true | 63 | [
"24",
"49",
"46",
"26",
"55",
"57",
"39",
"44",
"63"
] | 1 | VARIABLE_MISUSE | [
39
] | [
[
{
"before_index": 1,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 61,
"after_index": 71,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "hyperion-rt/hyperion/hyperion/model/tests/test_sed.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ pytest.mark.parametrize ('units', ['ergs/cm^2/s', 'mJy', 'Jy', 'ergs/cm^2/s/Hz', 'MJy/sr'])
def test_sed_nodistance_units_invalid(self, units) :
with pytest.raises (ValueError) as exc :
(wav, nufnu) = self.m.get_sed (units = units)
assert (<MASK>.value.args [0] == 'Since distance= is not specified, un... | exc |
5,696 | [
"#NEWLINE#",
"def update_db_objects(",
"session",
",",
"table",
",",
"updates",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"#NEWLINE#",
"#UNINDENT#",
"}",
",",
"**filters",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Update db objects.'",
"#NEWLINE#",
"if",
"(",
"not",
"session",
... | true | 103 | [
"69",
"93",
"130",
"134",
"91",
"112",
"4",
"64",
"77",
"80",
"103",
"6",
"105",
"115",
"2",
"25",
"40",
"59",
"75",
"110",
"127",
"62",
"83"
] | 1 | VARIABLE_MISUSE | [
91,
112
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/compass-core/compass/db/api/utils.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def update_db_objects(session, table, updates = {
}, **filters) :
'Update db objects.'
if (not session) :
raise exception.DatabaseException ('session param is None')
with session.begin (subtransactions = True) :
logging.debug ('session %s update db objects by filters %s in table %s', ... | db_object |
5,697 | [
"#NEWLINE#",
"def _maybe_cast_args(",
"self",
",",
"left",
",",
"right",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"(",
"self",
",",
"right",
")"
] | true | 13 | [
"6",
"15",
"4",
"2",
"13"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 1,
"after_index": 2,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudera/ibis/ibis/expr/operations.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def _maybe_cast_args(self, left, right) :
return (<MASK>, right)
Given the code above, what is a proper replacement for <MASK>? Choose among: right, left, self | left |
5,698 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"errors",
"=",
"'strict'",
",",
"mapping",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"codecs",
".",
"IncrementalEncoder",
".",
"__init__",
"(",
"mapping",
",",
"errors",
")",
"#NEWLINE#",
"self",
".",
"mapping",... | true | 21 | [
"4",
"23",
"2",
"26",
"8",
"21",
"28",
"30"
] | 1 | VARIABLE_MISUSE | [
2,
26
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Southpaw-TACTIC/TACTIC/src/context/client/tactic-api-python-4.0.api04/Lib/encodings/charmap.py",
"license": "epl-1.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def __init__(self, errors = 'strict', mapping = None) :
codecs.IncrementalEncoder.__init__ (<MASK>, errors)
self.mapping = mapping
Given the code above, what is a proper replacement for <MASK>? Choose among: errors, self, mapping | self |
5,699 | [
"#NEWLINE#",
"def render(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"' Renders template within the ``Flask-Admin`` system.\\n\\n Note\\n ----\\n Overrides: :py:meth:`flask_velox.mixins.template.TemplateMixin.render`\\n\\n '",
"#NEWLINE#",
"admin",
"=",
"self",
... | true | 42 | [
"17",
"42",
"47",
"2",
"11",
"21",
"9",
"38"
] | 1 | VARIABLE_MISUSE | [
2,
11,
21
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 22... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "thisissoon/Flask-Velox/flask_velox/admin/mixins/template.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def render(self) :
' Renders template within the ``Flask-Admin`` system.
Note
----
Overrides: :py:meth:`flask_velox.mixins.template.TemplateMixin.render`
'
admin = self.get_admin ()
get_context = getattr (self, 'get_context', (lambda : {
}))
return admin.r... | self |
5,700 | [
"#NEWLINE#",
"def _maybe_run_version(",
"self",
",",
"version",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"self",
".",
"has_python_version",
"(",
"version",
")",
":",
"#NEWLINE#",
"#INDENT#",
"print",
"(",
"'Found python {}. Testing running on it.'",
".",
"format",
"("... | true | 113 | [
"4",
"14",
"25",
"35",
"72",
"101",
"2",
"10",
"31",
"47",
"68",
"105",
"29",
"40",
"113",
"38",
"54",
"64",
"78",
"83"
] | 1 | VARIABLE_MISUSE | [
4,
14,
25,
35,
72,
101
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 11... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pantsbuild/pants/tests/python/pants_test/python/test_python_run_integration.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def _maybe_run_version(self, version) :
if self.has_python_version (version) :
print ('Found python {}. Testing running on it.'.format (version))
echo = self._run_echo_version (version)
v = echo.split ('.')
self.assertTrue ((len (v) > 2), 'Not a valid version string: {}'.format ... | version |
5,701 | [
"#NEWLINE#",
"def test_namespace(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"ns",
"=",
"blinker",
".",
"Namespace",
"(",
")",
"#NEWLINE#",
"assert",
"(",
"not",
"s1",
")",
"#NEWLINE#",
"s1",
"=",
"ns",
".",
"signal",
"(",
"'abc'",
")",
"#NEWLINE#",
"assert",
"(... | true | 17 | [
"6",
"22",
"33",
"45",
"57",
"71",
"78",
"17",
"20",
"31",
"43",
"61"
] | 1 | VARIABLE_MISUSE | [
6,
22,
33,
45,
57,
71,
78
] | [
[
{
"before_index": 5,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "jek/blinker/tests/test_signals.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_namespace() :
ns = blinker.Namespace ()
assert (not <MASK>)
s1 = ns.signal ('abc')
assert (s1 is ns.signal ('abc'))
assert (s1 is not ns.signal ('def'))
assert ('abc' in ns)
del s1
collect_acyclic_refs ()
assert ('def' in ns)
assert ('abc' in ns)
Give... | ns |
5,702 | [
"#NEWLINE#",
"def test_has_receivers(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"received",
"=",
"(",
"lambda",
"sender",
":",
"None",
")",
"#NEWLINE#",
"sig",
"=",
"blinker",
".",
"Signal",
"(",
")",
"#NEWLINE#",
"assert",
"(",
"not",
"sig",
".",
"has_receivers_fo... | true | 108 | [
"6",
"51",
"122",
"15",
"26",
"37",
"47",
"59",
"70",
"81",
"104",
"114",
"131",
"143",
"159",
"171",
"188",
"196",
"204",
"212",
"222",
"98",
"108",
"110",
"118",
"163",
"200"
] | 1 | VARIABLE_MISUSE | [
6,
51,
122
] | [
[
{
"before_index": 5,
"after_index": 9,
"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": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "jek/blinker/tests/test_signals.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_has_receivers() :
received = (lambda sender : None)
sig = blinker.Signal ()
assert (not sig.has_receivers_for (None))
assert (not sig.has_receivers_for (blinker.ANY))
sig.connect (received, 'xyz')
assert (not sig.has_receivers_for (None))
assert (not sig.has_receivers_for (bl... | received |
5,703 | [
"#NEWLINE#",
"def query_album(",
"self",
",",
"album",
",",
"artist",
"=",
"None",
",",
"year",
"=",
"None",
",",
"reltyp",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Query for album data.'",
"#NEWLINE#",
"qry",
"=",
"(",
"'releasegroup: %s'",
"%",
"qry... | true | 28 | [
"4",
"23",
"28",
"36",
"57",
"6",
"32",
"41",
"10",
"2",
"46",
"14"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "YetAnotherNerd/whatlastgenre/wlg/dataprovider.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def query_album(self, album, artist = None, year = None, reltyp = None) :
'Query for album data.'
qry = ('releasegroup: %s' % <MASK>)
if artist :
qry += (' AND artist: %s' % artist)
return self._query ('release-group', {
'query' : qry,
})
Given the code above, what is a prop... | album |
5,704 | [
"#NEWLINE#",
"def _query(",
"self",
",",
"params",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Query What.CD API.'",
"#NEWLINE#",
"self",
".",
"login",
"(",
")",
"#NEWLINE#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"result",
"=",
"self",
".",
"_request_json",
"(",
"'https... | true | 29 | [
"4",
"2",
"11",
"23",
"42",
"55",
"66",
"87",
"21",
"29",
"68"
] | 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": 14,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "YetAnotherNerd/whatlastgenre/wlg/dataprovider.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def _query(self, params) :
'Query What.CD API.'
self.login ()
try :
result = self._request_json ('https://what.cd/ajax.php', <MASK>)
except requests.exceptions.TooManyRedirects :
self.session.cookies.set ('session', None)
self.login ()
try :
response = result ['respo... | params |
5,705 | [
"#NEWLINE#",
"def test_minify_option(",
"self",
",",
"bundle_mock",
")",
":",
"#NEWLINE#",
"#INDENT#",
"bundle_mock",
".",
"side_effect",
"=",
"_bundle",
"#NEWLINE#",
"self",
".",
"assertEqual",
"(",
"_num_files",
"(",
"settings",
".",
"STATIC_ROOT",
")",
",",
"0"... | true | 77 | [
"2",
"15",
"37",
"43",
"48",
"62",
"73",
"77",
"4",
"9",
"66"
] | 1 | VARIABLE_MISUSE | [
4,
9,
66
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 25... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sergei-maertens/django-systemjs/tests/tests/test_management.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_minify_option(self, bundle_mock) :
bundle_mock.side_effect = _bundle
self.assertEqual (_num_files (settings.STATIC_ROOT), 0)
call_command ('systemjs_bundle', '--minify', stdout = self.out, stderr = self.err)
self.assertEqual (_num_files (settings.STATIC_ROOT), 1)
self.assertEqual (bund... | bundle_mock |
5,706 | [
"#NEWLINE#",
"@",
"extensions",
".",
"expected_errors",
"(",
"(",
"400",
",",
"403",
",",
"404",
")",
")",
"#NEWLINE#",
"@",
"wsgi",
".",
"action",
"(",
"'removeTenantAccess'",
")",
"#NEWLINE#",
"@",
"validation",
".",
"schema",
"(",
"flavor_access",
".",
... | true | 56 | [
"63",
"72",
"36",
"47",
"56",
"77",
"96",
"165",
"38",
"89",
"115",
"128",
"141",
"154",
"45",
"83",
"85",
"70",
"100",
"40",
"65",
"34"
] | 1 | VARIABLE_MISUSE | [
45,
83,
85
] | [
[
{
"before_index": 1,
"after_index": 35,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 44,
"after_index": 50,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 53,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/api/openstack/compute/flavor_access.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | @ extensions.expected_errors ((400, 403, 404))
@ wsgi.action ('removeTenantAccess')
@ validation.schema (flavor_access.remove_tenant_access)
def _remove_tenant_access(self, req, id, body) :
context = req.environ ['nova.context']
authorize (<MASK>, action = 'remove_tenant_access')
vals = body ['removeT... | context |
5,707 | [
"#NEWLINE#",
"def SetOption(",
"self",
",",
"key",
",",
"value",
")",
":",
"#NEWLINE#",
"#INDENT#",
"where",
"=",
"(",
"self",
".",
"db",
".",
"options",
".",
"key",
"==",
"key",
")",
"#NEWLINE#",
"if",
"(",
"self",
".",
"db",
"(",
"where",
")",
".",... | true | 72 | [
"11",
"31",
"47",
"72",
"4",
"20",
"22",
"70",
"6",
"52",
"54",
"74",
"76",
"2",
"14",
"27",
"43",
"62"
] | 1 | VARIABLE_MISUSE | [
4,
20,
22,
70
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "uwdata/termite-data-server/server_src/modules/db/MultipleLDA_DB.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def SetOption(self, key, value) :
where = (self.db.options.key == key)
if (self.db (where).count () > 0) :
self.db (where).update (value = value)
else :
self.db.options.insert (key = <MASK>, value = value)
Given the code above, what is a proper replacement for <MASK>? Choose among... | key |
5,708 | [
"#NEWLINE#",
"def test_before_string_freeze_notifications(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Check whether notifications are sent to the correct people whenever\\n the string freeze period approaches.\\n '",
"#NEWLINE#",
"timestamp",
"=",
"(",
"datetime"... | true | 107 | [
"50",
"67",
"77",
"91",
"9",
"36",
"2",
"30",
"38",
"61",
"73",
"87",
"103",
"107"
] | 1 | VARIABLE_MISUSE | [
50,
67,
77,
91
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 29,
"after_index": 36... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "rvanlaar/easy-transifex/src/transifex/transifex/releases/tests/notifications.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_before_string_freeze_notifications(self) :
'
Check whether notifications are sent to the correct people whenever
the string freeze period approaches.
'
timestamp = (datetime.datetime.now () + datetime.timedelta (hours = 47))
self.release.stringfreeze_date = timestamp
... | mails |
5,709 | [
"#NEWLINE#",
"def CreateEntity(",
"self",
",",
"values",
",",
"key_name",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\" Creates an entity from a list of property values.\\n\\n Args:\\n values: list/tuple of str\\n key_name: if provided, the name for the (single) resultin... | true | 145 | [
"139",
"150",
"162",
"174",
"177",
"184",
"223",
"69",
"77",
"130",
"6",
"71",
"79",
"99",
"133",
"59",
"128",
"182",
"193",
"210",
"212",
"82",
"105",
"123",
"135",
"145",
"2",
"35",
"47",
"65",
"87",
"141",
"4",
"17",
"30",
"54",
"91"
] | 1 | VARIABLE_MISUSE | [
59,
128,
182,
193,
210,
212
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CollabQ/CollabQ/.google_appengine/google/appengine/ext/bulkload/__init__.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def CreateEntity(self, values, key_name = None) :
" Creates an entity from a list of property values.
Args:
values: list/tuple of str
key_name: if provided, the name for the (single) resulting Entity
Returns:
list of datastore.Entity
The returned entities are populated with the p... | entity |
5,710 | [
"#NEWLINE#",
"def app_strings_parts(",
"self",
",",
"app",
",",
"lang",
",",
"for_default",
"=",
"False",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"yield",
"self",
".",
"create_custom_app_strings",
"(",
"app",
",",
"lang",
",",
"for_default",
"=",
"for_default",
... | true | 51 | [
"4",
"21",
"45",
"51",
"2",
"17",
"33",
"8",
"25",
"27",
"6",
"23",
"37"
] | 1 | VARIABLE_MISUSE | [
6,
23,
37
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 30,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dimagi/commcare-hq/corehq/apps/app_manager/app_strings.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def app_strings_parts(self, app, lang, for_default = False) :
(yield self.create_custom_app_strings (app, lang, for_default = for_default))
(yield self.get_default_translations (lang))
(yield non_empty_only (app.translations.get (<MASK>, {
})))
Given the code above, what is a proper r... | lang |
5,711 | [
"#NEWLINE#",
"def test_small_verbosedict(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"expected_string",
"=",
"\"You tried to access the key 'b' which does not exist. The extant keys are: ['a']\"",
"#NEWLINE#",
"dd",
"=",
"core",
".",
"verbosedict",
"(",
")",
"#NEWLINE#",
"dd",
"[",
... | true | 27 | [
"27",
"48",
"60",
"10",
"18",
"39",
"6",
"64"
] | 1 | VARIABLE_MISUSE | [
10,
18,
39
] | [
[
{
"before_index": 5,
"after_index": 8,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 23... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "scikit-beam/scikit-beam/skbeam/core/tests/test_utils.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def test_small_verbosedict() :
expected_string = "You tried to access the key 'b' which does not exist. The extant keys are: ['a']"
dd = core.verbosedict ()
dd ['a'] = 1
assert_equal (<MASK> ['a'], 1)
try :
dd ['b']
except KeyError as e :
assert_equal (eval (six.text_type (e... | dd |
5,712 | [
"#NEWLINE#",
"def pytest_report_header(",
"config",
")",
":",
"#NEWLINE#",
"#INDENT#",
"lines",
"=",
"[",
"]",
"#NEWLINE#",
"if",
"(",
"config",
".",
"option",
".",
"debug",
"or",
"config",
".",
"option",
".",
"traceconfig",
")",
":",
"#NEWLINE#",
"#INDENT#",
... | true | 109 | [
"99",
"118",
"131",
"97",
"143",
"48",
"56",
"64",
"109",
"116",
"127",
"145",
"85",
"102",
"7",
"29",
"60",
"78",
"135",
"153",
"2",
"14",
"20",
"52",
"70",
"87"
] | 1 | VARIABLE_MISUSE | [
99,
118,
131
] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 69,
"after_index": 7... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pytest-dev/pytest/_pytest/helpconfig.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def pytest_report_header(config) :
lines = []
if (config.option.debug or config.option.traceconfig) :
lines.append (('using: pytest-%s pylib-%s' % (pytest.__version__, py.__version__)))
verinfo = getpluginversioninfo (config)
if verinfo :
lines.extend (verinfo)
if conf... | plugin |
5,713 | [
"#NEWLINE#",
"def unchanged(",
"self",
",",
"_bytearray",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"self",
".",
"get_bytearray",
"(",
")",
"==",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"True",
"#NEWLINE#",
"#UNINDENT#",
"return",
"False"
] | true | 17 | [
"4",
"2",
"11",
"17"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 27... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "gijzelaerr/python-snap7/snap7/util.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | identifier prediction with choices | {% set mask = '<MASK>' %}
{% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% if has_bug %}
{% for token in source_tokens %}
{% if loop.index0 == error_location %}
{% set token = mask %}
{% endif%}
{% if token== '#INDENT#' %}
{% set ns... | def unchanged(self, _bytearray) :
if (self.get_bytearray () == <MASK>) :
return True
return False
Given the code above, what is a proper replacement for <MASK>? Choose among: _bytearray, self | _bytearray |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.