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,714 | [
"#NEWLINE#",
"def cancel_upload(",
"self",
",",
"canceller",
"=",
"None",
",",
"args",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Cancel the upload.\\n\\n If the upload is not unstarted and not complete you can provide a\\n ``can... | true | 57 | [
"2",
"22",
"31",
"36",
"40",
"91",
"103",
"107",
"4",
"47",
"57",
"89",
"12",
"72",
"79",
"99",
"8",
"64",
"96"
] | 1 | VARIABLE_MISUSE | [
8,
64,
96
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "aws/aws-cli/awscli/customizations/s3/tasks.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 cancel_upload(self, canceller = None, args = None, kwargs = None) :
'Cancel the upload.
If the upload is not unstarted and not complete you can provide a
``canceller`` argument that can be used to cancel the multipart upload
request (typically this would call something like AbortMultip... | args |
5,715 | [
"#NEWLINE#",
"def test_middleware(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"app",
"=",
"self",
".",
"app",
"#NEWLINE#",
"wsgi",
"=",
"app",
".",
"handler",
"#NEWLINE#",
"self",
".",
"assertIsInstance",
"(",
"self",
",",
"WsgiHandler",
")",
"#NEWLINE#",
"s... | true | 23 | [
"7",
"11",
"15",
"2",
"9",
"19",
"23",
"28",
"13",
"34"
] | 1 | VARIABLE_MISUSE | [
13,
34
] | [
[
{
"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": "quantmind/lux/tests/staticsite/docs.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 test_middleware(self) :
app = self.app
wsgi = app.handler
self.assertIsInstance (<MASK>, WsgiHandler)
self.assertEqual (len (wsgi.middleware), 7)
Given the code above, what is a proper replacement for <MASK>? Choose among: app, self, wsgi | wsgi |
5,716 | [
"#NEWLINE#",
"@",
"staticmethod",
"#NEWLINE#",
"def _clip(",
"inout",
",",
"selection",
")",
":",
"#NEWLINE#",
"#INDENT#",
"pipe",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"(",
"'std'",
"+",
"inout",
")",
":",
"subprocess",
".",
"PIPE",
",",
"#NEWLINE#",
"#UNINDENT#... | true | 42 | [
"12",
"51",
"5",
"20",
"7",
"42",
"47"
] | 1 | VARIABLE_MISUSE | [
5,
20
] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 31,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "kivy/kivy/kivy/core/clipboard/clipboard_xclip.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... | @ staticmethod
def _clip(inout, selection) :
pipe = {
('std' + inout) : subprocess.PIPE,
}
return subprocess.Popen (['xclip', ('-' + <MASK>), '-selection', selection], ** pipe)
Given the code above, what is a proper replacement for <MASK>? Choose among: pipe, inout, selection | inout |
5,717 | [
"#NEWLINE#",
"def build(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"self",
".",
"build_per_ratio",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"ratio",
"in",
"ratio",
".",
"sprite",
".",
"config",
"[",
"'ratios'",
"]",
":",
"#NEWLINE#",
"#INDENT#",
"self",
... | true | 17 | [
"15",
"17",
"32",
"34",
"2",
"8",
"28",
"43"
] | 1 | VARIABLE_MISUSE | [
2,
8,
28,
43
] | [
[
{
"before_index": 7,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 8,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 15,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "jorgebastida/glue/glue/formats/base.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 build(self) :
if self.build_per_ratio :
for ratio in <MASK>.sprite.config ['ratios'] :
self.save (ratio = ratio)
else :
self.save ()
Given the code above, what is a proper replacement for <MASK>? Choose among: ratio, self | self |
5,718 | [
"#NEWLINE#",
"def connectid(",
"self",
",",
"connection",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"src_actor",
",",
"src_port",
",",
"dst_actor",
",",
"dst_port",
")",
"=",
"connection",
"#NEWLINE#",
"dst_actor_id",
"=",
"self",
".",
"actor_map",
"[",
"dst_actor... | true | 32 | [
"14",
"27",
"2",
"23",
"41",
"49",
"12",
"77",
"21",
"57",
"47",
"85",
"39",
"69",
"30",
"73",
"4",
"19",
"32",
"10",
"36",
"16",
"61"
] | 1 | VARIABLE_MISUSE | [
2,
23,
41,
49
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 26... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "EricssonResearch/calvin-base/calvin/runtime/north/appmanager.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 connectid(self, connection) :
(src_actor, src_port, dst_actor, dst_port) = connection
dst_actor_id = self.actor_map [dst_actor]
src_actor_id = <MASK>.actor_map [src_actor]
src_node = self.node.id
result = self.node.connect (actor_id = dst_actor_id, port_name = dst_port, port_dir = 'in', pee... | self |
5,719 | [
"#NEWLINE#",
"def test_hort_without_port(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"kwargs",
"=",
"parse_dsn",
"(",
"'mysql://localhost'",
")",
"[",
"2",
"]",
"#NEWLINE#",
"self",
".",
"assertEqual",
"(",
"kwargs",
"[",
"'host'",
"]",
",",
"'localhost'",
")"... | true | 52 | [
"7",
"21",
"35",
"38",
"66",
"2",
"17",
"29",
"48",
"52",
"60"
] | 1 | VARIABLE_MISUSE | [
7,
21,
35,
38,
66
] | [
[
{
"before_index": 6,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "chriso/gauged/test/test_dsn.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_hort_without_port(self) :
kwargs = parse_dsn ('mysql://localhost') [2]
self.assertEqual (kwargs ['host'], 'localhost')
self.assertNotIn ('port', kwargs)
kwargs = parse_dsn ('postgresql://localhost') [2]
self.assertEqual (<MASK> ['host'], 'localhost')
self.assertNotIn ('port', kwar... | kwargs |
5,720 | [
"#NEWLINE#",
"def get_queryset(",
"self",
",",
"**db_hints",
")",
":",
"#NEWLINE#",
"#INDENT#",
"db",
"=",
"router",
".",
"db_for_read",
"(",
"self",
".",
"related",
".",
"model",
",",
"**",
"db",
")",
"#NEWLINE#",
"return",
"self",
".",
"related",
".",
"m... | true | 22 | [
"9",
"22",
"36",
"2",
"15",
"26"
] | 1 | VARIABLE_MISUSE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": 35... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/db/models/fields/related.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_queryset(self, **db_hints) :
db = router.db_for_read (self.related.model, ** <MASK>)
return self.related.model._base_manager.using (db)
Given the code above, what is a proper replacement for <MASK>? Choose among: db, self | |
5,721 | [
"#NEWLINE#",
"def autoping(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"now",
"=",
"int",
"(",
"time",
".",
"time",
"(",
")",
")",
"#NEWLINE#",
"if",
"(",
"self",
">",
"(",
"self",
".",
"last_ping",
"+",
"30",
")",
")",
":",
"#NEWLINE#",
"#INDENT#",
... | true | 20 | [
"2",
"20",
"23",
"33",
"42",
"7",
"46"
] | 1 | VARIABLE_MISUSE | [
7,
46
] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "youknowone/slairck/ircbot.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 autoping(self) :
now = int (time.time ())
if (<MASK> > (self.last_ping + 30)) :
self.irc_client.send_line ('ping :dontkillme')
self.last_ping = now
Given the code above, what is a proper replacement for <MASK>? Choose among: self, now | now |
5,722 | [
"#NEWLINE#",
"def firstWillWin(",
"self",
",",
"values",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n\\n :param values: a list of integers\\n :return: a boolean which equals to True if the first player will win\\n '",
"#NEWLINE#",
"n",
"=",
"len",
"(",
"values",
")",... | true | 22 | [
"11",
"2",
"22",
"30",
"45",
"4",
"15",
"34",
"49"
] | 1 | VARIABLE_MISUSE | [
11
] | [
[
{
"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": "algorhythms/LintCode/Coins in a Line III.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 firstWillWin(self, values) :
'
:param values: a list of integers
:return: a boolean which equals to True if the first player will win
'
n = len (values)
if (((<MASK> % 2) == 0) and self.firstWillWinEven (values)) :
return True
return self.firstWillWinNormalCase (val... | n |
5,723 | [
"#NEWLINE#",
"def test_rc_show_by_name(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"rc",
"=",
"self",
".",
"mgr",
".",
"get",
"(",
"RC1",
"[",
"'name'",
"]",
",",
"RC1",
"[",
"'bay_uuid'",
"]",
")",
"#NEWLINE#",
"expect",
"=",
"[",
"(",
"'GET'",
",",
... | true | 81 | [
"26",
"63",
"7",
"95",
"109",
"2",
"9",
"59",
"65",
"72",
"81",
"86",
"100"
] | 1 | VARIABLE_MISUSE | [
7,
95,
109
] | [
[
{
"before_index": 6,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": 28,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 58,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/python-magnumclient/magnumclient/tests/v1/test_replicationcontrollers.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_rc_show_by_name(self) :
rc = self.mgr.get (RC1 ['name'], RC1 ['bay_uuid'])
expect = [('GET', ('/v1/rcs/%s/?bay_ident=%s' % (RC1 ['name'], RC1 ['bay_uuid'])), {
}, None)]
self.assertEqual (expect, self.api.calls)
self.assertEqual (RC1 ['name'], <MASK>.name)
self.assertEqual (R... | rc |
5,724 | [
"#NEWLINE#",
"@",
"cli",
".",
"command",
"(",
"'generate-config'",
")",
"#NEWLINE#",
"@",
"click",
".",
"pass_context",
"#NEWLINE#",
"def generate_config(",
"ctx",
")",
":",
"#NEWLINE#",
"#INDENT#",
"' Generates a sample gitlint config file. '",
"#NEWLINE#",
"path",
"="... | true | 141 | [
"15",
"88",
"128",
"141",
"156",
"46",
"66",
"80",
"22",
"35",
"39",
"43",
"50",
"54",
"62",
"103",
"107",
"120",
"152"
] | 1 | VARIABLE_MISUSE | [
22,
35,
39,
43,
50,
54,
62,
103,
107,
120,
152
] | [
[
{
"before_index": 19,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 29,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 34,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "jorisroovers/gitlint/gitlint/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... | @ cli.command ('generate-config')
@ click.pass_context
def generate_config(ctx) :
' Generates a sample gitlint config file. '
path = click.prompt ('Please specify a location for the sample gitlint config file', default = DEFAULT_CONFIG_FILE)
path = os.path.abspath (path)
dir_name = os.path.dirname... | path |
5,725 | [
"#NEWLINE#",
"def _check_contents(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"self",
".",
"_actual_md5",
"and",
"self",
".",
"_expected_etag",
")",
":",
"#NEWLINE#",
"#INDENT#",
"etag",
"=",
"self",
".",
"_actual_md5",
".",
"hexdigest",
"(",
")",... | true | 73 | [
"2",
"9",
"13",
"22",
"34",
"48",
"54",
"65",
"77",
"92",
"96",
"100",
"20",
"32",
"52",
"73"
] | 1 | VARIABLE_MISUSE | [
2,
9,
13,
22,
34,
48,
54,
65,
77,
92,
96,
100
] | [
[
{
"before_index": 7,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 62,
"after_index": 71,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/python-swiftclient/swiftclient/service.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 _check_contents(self) :
if (self._actual_md5 and self._expected_etag) :
etag = self._actual_md5.hexdigest ()
if (etag != self._expected_etag) :
raise SwiftError ('Error downloading {0}: md5sum != etag, {1} != {2}'.format (self._path, etag, self._expected_etag))
if ((self._conten... | self |
5,726 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"leader",
")",
":",
"#NEWLINE#",
"#INDENT#",
"leader",
".",
"group",
"=",
"leader",
"#NEWLINE#",
"self",
".",
"leader",
"=",
"leader",
"#NEWLINE#",
"self",
".",
"members",
"=",
"[",
"]",
"#NEWLINE#",
"self",
".",
... | true | 13 | [
"4",
"9",
"13",
"17",
"19",
"2",
"15",
"21",
"28",
"36",
"42",
"73"
] | 1 | VARIABLE_MISUSE | [
2,
15,
21,
28,
36,
42,
73
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 19... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "genzgd/Lampost-Mud/lampost/mud/group.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, leader) :
leader.group = <MASK>
self.leader = leader
self.members = []
self.invites = set ()
self.instance = None
self.channel = Channel ('gchat', 'next', aliases = ('g', 'gc', 'gt', 'gtell', 'gsay', 'gs'))
register ('player_connect', self._player_connect)
... | self |
5,727 | [
"#NEWLINE#",
"def fake_service_update(",
"context",
",",
"service_id",
",",
"values",
")",
":",
"#NEWLINE#",
"#INDENT#",
"fake",
"=",
"fake_db_service_update",
"(",
"fake_services_list",
")",
"#NEWLINE#",
"return",
"fake",
"(",
"fake",
",",
"service_id",
",",
"value... | true | 21 | [
"2",
"4",
"23",
"6",
"25",
"11",
"19",
"21"
] | 1 | VARIABLE_MISUSE | [
2
] | [
[
{
"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": 18,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/api/openstack/compute/test_services.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 fake_service_update(context, service_id, values) :
fake = fake_db_service_update (fake_services_list)
return fake (<MASK>, service_id, values)
Given the code above, what is a proper replacement for <MASK>? Choose among: context, service_id, values, fake | context |
5,728 | [
"#NEWLINE#",
"@",
"assert_logs",
"(",
"NodeLog",
".",
"EDITED_TITLE",
",",
"'collection'",
")",
"#NEWLINE#",
"def test_partial_update_collection_updates_project_correctly_and_sanitizes_html(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"new_title",
"=",
"'An <script>alert(\"eve... | true | 87 | [
"17",
"62",
"87",
"121",
"12",
"23",
"29",
"43",
"78",
"103",
"113",
"21",
"96"
] | 1 | VARIABLE_MISUSE | [
21,
96
] | [
[
{
"before_index": 16,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 32,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 84,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CenterForOpenScience/osf.io/api_tests/collections/test_views.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... | @ assert_logs (NodeLog.EDITED_TITLE, 'collection')
def test_partial_update_collection_updates_project_correctly_and_sanitizes_html(self) :
new_title = 'An <script>alert("even cooler")</script> project'
res = self.app.patch_json_api (self.url, {
'data' : {
'id' : self.collection._id,
... | res |
5,729 | [
"#NEWLINE#",
"def test_fake_collection_pointing_to_valid_node(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"res",
"=",
"self",
".",
"app",
".",
"post_json_api",
"(",
"self",
".",
"fake_url",
",",
"self",
".",
"post_payload",
"(",
"self",
".",
"project",
".",
"_... | true | 105 | [
"2",
"9",
"15",
"19",
"23",
"32",
"69",
"75",
"79",
"83",
"92",
"105",
"7",
"45",
"56",
"67",
"116"
] | 1 | VARIABLE_MISUSE | [
7,
45,
56,
67,
116
] | [
[
{
"before_index": 6,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 42,
"after_index": 48,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 51,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CenterForOpenScience/osf.io/api_tests/collections/test_views.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_fake_collection_pointing_to_valid_node(self) :
res = self.app.post_json_api (self.fake_url, self.post_payload (self.project._id), auth = self.user_one.auth, expect_errors = True)
assert_equal (res.status_code, 404)
assert_in ('detail', res.json ['errors'] [0])
res = self.app.post_json_api (... | res |
5,730 | [
"#NEWLINE#",
"def test_bulk_delete_pointers_no_type(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"payload",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'data'",
":",
"[",
"{",
"#NEWLINE#",
"#INDENT#",
"'id'",
":",
"self",
".",
"collection_two_pointer",
".",
"_id",
",",
"... | true | 66 | [
"50",
"83",
"92",
"2",
"20",
"35",
"52",
"58",
"7",
"62",
"66"
] | 1 | VARIABLE_MISUSE | [
2,
20,
35,
52,
58
] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 49,
"after_index": 61,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 80,
"after_index": 8... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CenterForOpenScience/osf.io/api_tests/collections/test_views.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_bulk_delete_pointers_no_type(self) :
payload = {
'data' : [{
'id' : self.collection_two_pointer._id,
}, {
'id' : self.collection_two_pointer_two._id,
}],
}
res = self.app.delete_json_api (self.collection_two_url, payload, auth = <MASK>.user.auth, expect_errors = ... | self |
5,731 | [
"#NEWLINE#",
"def test_node_links_and_relationship_represent_same_nodes(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"collection",
".",
"add_pointer",
"(",
"self",
".",
"admin_node",
",",
"auth",
"=",
"self",
".",
"auth",
")",
"#NEWLINE#",
"self",
".",... | true | 55 | [
"119",
"146",
"55",
"92",
"141",
"41",
"129",
"2",
"7",
"13",
"19",
"24",
"30",
"36",
"43",
"49",
"64",
"76",
"85",
"62",
"111",
"95",
"109",
"122",
"127"
] | 1 | VARIABLE_MISUSE | [
2,
7,
13,
19,
24,
30,
36,
43,
49,
64,
76,
85
] | [
[
{
"before_index": 6,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 33,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 40,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CenterForOpenScience/osf.io/api_tests/collections/test_views.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_node_links_and_relationship_represent_same_nodes(self) :
self.collection.add_pointer (self.admin_node, auth = self.auth)
self.collection.add_pointer (self.contributor_node, auth = self.auth)
res_relationship = self.app.get (self.url, auth = <MASK>.user.auth)
res_node_links = self.app.get ('... | self |
5,732 | [
"#NEWLINE#",
"def _submit(",
"self",
",",
"params",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n topology consists of several steps, defining one source stream or more, combining and transformations\\n '",
"#NEWLINE#",
"main_stream",
"=",
"self",
".",
"query_engine",
".",
... | true | 51 | [
"41",
"74",
"11",
"49",
"24",
"4",
"21",
"34",
"51",
"66",
"101",
"107",
"112",
"116",
"123",
"2",
"13",
"26",
"43",
"68"
] | 1 | VARIABLE_MISUSE | [
24
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 20,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Convertro/Hydro/src/sample/geo_queries/geo_widget_topology.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 _submit(self, params) :
'
topology consists of several steps, defining one source stream or more, combining and transformations
'
main_stream = self.query_engine.get ('geo_widget', params)
lookup_stream = self.query_engine.get ('geo_lookup', params, cache_ttl = 1)
combined = self... | lookup_stream |
5,733 | [
"#NEWLINE#",
"def make_ubuntu_sources_task(",
"uids",
",",
"repo",
")",
":",
"#NEWLINE#",
"#INDENT#",
"sources_content",
"=",
"'deb {uri} {suite} {section}'",
".",
"format",
"(",
"**",
"repo",
")",
"#NEWLINE#",
"sources_path",
"=",
"'/etc/apt/sources.list.d/{name}.list'",
... | true | 27 | [
"19",
"40",
"4",
"16",
"2",
"27",
"36",
"9",
"38"
] | 1 | VARIABLE_MISUSE | [
4,
16
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 24... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/fuel-web/nailgun/nailgun/orchestrator/tasks_templates.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 make_ubuntu_sources_task(uids, repo) :
sources_content = 'deb {uri} {suite} {section}'.format (** repo)
sources_path = '/etc/apt/sources.list.d/{name}.list'.format (name = <MASK> ['name'])
return make_upload_task (uids, sources_content, sources_path)
Given the code above, what is a proper r... | repo |
5,734 | [
"#NEWLINE#",
"@",
"patch",
".",
"object",
"(",
"settings",
".",
"_wrapped",
",",
"'CC_ALLOW_REMOVE'",
",",
"False",
")",
"#NEWLINE#",
"def test_hide_tweets_disabled(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Do not allow hiding tweets if feature is disabled.'",
"#NEW... | true | 72 | [
"39",
"23",
"61",
"72",
"16",
"41"
] | 1 | VARIABLE_MISUSE | [
39
] | [
[
{
"before_index": 20,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": 35,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 38,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mozilla/kitsune/kitsune/customercare/tests/test_views.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... | @ patch.object (settings._wrapped, 'CC_ALLOW_REMOVE', False)
def test_hide_tweets_disabled(self) :
'Do not allow hiding tweets if feature is disabled.'
tw = Tweet.objects.filter (reply_to = None) [0]
r = self.client.post (reverse ('customercare.hide_tweet', locale = 'en-US'), {
'id' : tw.tweet_... | r |
5,735 | [
"#NEWLINE#",
"def testGetStorageUnits(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"sts_non_reporting",
"=",
"storage",
".",
"GetDiskTemplatesOfStorageTypes",
"(",
"constants",
".",
"ST_GLUSTER",
",",
"constants",
".",
"ST_SHARED_FILE",
")",
"#NEWLINE#",
"disk_templates"... | true | 54 | [
"35",
"7",
"31",
"2",
"41",
"48",
"54",
"22",
"45",
"59"
] | 1 | VARIABLE_MISUSE | [
35
] | [
[
{
"before_index": 6,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 28,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 34,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ganeti/ganeti/test/py/ganeti.utils.storage_unittest.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 testGetStorageUnits(self) :
sts_non_reporting = storage.GetDiskTemplatesOfStorageTypes (constants.ST_GLUSTER, constants.ST_SHARED_FILE)
disk_templates = (constants.DTS_FILEBASED - frozenset (sts_non_reporting))
storage_units = storage.GetStorageUnits (self._cfg, disk_templates)
self.assertEqual ... | storage_units |
5,736 | [
"#NEWLINE#",
"def store_recommendations(",
"self",
",",
"recommendations",
")",
":",
"#NEWLINE#",
"#INDENT#",
"r",
"=",
"self",
".",
"redis",
"#NEWLINE#",
"logger",
".",
"info",
"(",
"'saving recommendation'",
")",
"#NEWLINE#",
"count",
"=",
"0",
"#NEWLINE#",
"for... | true | 123 | [
"71",
"85",
"22",
"126",
"129",
"137",
"154",
"169",
"41",
"56",
"61",
"87",
"106",
"9",
"81",
"100",
"117",
"28",
"76",
"108",
"30",
"44",
"4",
"33",
"92",
"104",
"123",
"113",
"121",
"2",
"11",
"63",
"39",
"89",
"97"
] | 1 | VARIABLE_MISUSE | [
39,
89,
97
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 18... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "fcurella/django-recommends/recommends/storages/redis/storage.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 store_recommendations(self, recommendations) :
r = self.redis
logger.info ('saving recommendation')
count = 0
for (user, rankings) in recommendations :
for (object_id, score) in rankings :
if ((not math.isnan (score)) and (score > self.threshold_recommendations)) :
... | object_id |
5,737 | [
"#NEWLINE#",
"def insert_row(",
"insert_dict",
")",
":",
"#NEWLINE#",
"#INDENT#",
"command",
"=",
"(",
"(",
"'wget -qO- https://news.ycombinator.com/ | html2text | grep -i '",
"+",
"insert_dict",
"[",
"'command'",
"]",
")",
"+",
"' | wc -l'",
")",
"#NEWLINE#",
"email_addr... | true | 31 | [
"40",
"109",
"36",
"115",
"86",
"94",
"137",
"52",
"131",
"63",
"133",
"173",
"92",
"96",
"100",
"143",
"22",
"31",
"111",
"166",
"44",
"117",
"2",
"13",
"24",
"57",
"48",
"124",
"7",
"107",
"29",
"113",
"77"
] | 1 | VARIABLE_MISUSE | [
2,
13,
24,
57
] | [
[
{
"before_index": 6,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ianmiell/alert-on-change/context/forms/hn_insert.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 insert_row(insert_dict) :
command = (('wget -qO- https://news.ycombinator.com/ | html2text | grep -i ' + insert_dict ['command']) + ' | wc -l')
email_address = insert_dict ['email_address']
description = <MASK> ['description']
cadence = 600
common_threshold = 100
ignore_output = ''
... | insert_dict |
5,738 | [
"#NEWLINE#",
"def set_user_settings(",
"self",
",",
"settings",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"external_account",
"=",
"self",
".",
"ExternalAccountFactory",
"(",
")",
"#NEWLINE#",
"self",
".",
"external_account",
".",
"save",
"(",
")",
"#NEWLINE... | true | 35 | [
"2",
"9",
"13",
"19",
"27",
"40",
"48",
"54",
"4",
"35"
] | 1 | VARIABLE_MISUSE | [
2,
9,
13,
19,
27,
40,
48,
54
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 24... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CenterForOpenScience/osf.io/website/addons/base/testing/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 set_user_settings(self, settings) :
self.external_account = self.ExternalAccountFactory ()
self.external_account.save ()
self.user.external_accounts.append (<MASK>.external_account)
self.user.save ()
self.auth = Auth (self.user)
Given the code above, what is a proper replacement f... | self |
5,739 | [
"#NEWLINE#",
"def test_hessian_vector_product(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"fun",
"=",
"(",
"lambda",
"a",
":",
"np",
".",
"sum",
"(",
"np",
".",
"sin",
"(",
"a",
")",
")",
")",
"#NEWLINE#",
"a",
"=",
"npr",
".",
"randn",
"(",
"5",
")",
"#NE... | true | 50 | [
"34",
"61",
"71",
"10",
"20",
"25",
"69",
"43",
"50",
"59",
"6",
"47",
"66"
] | 1 | VARIABLE_MISUSE | [
10,
20,
25,
69
] | [
[
{
"before_index": 5,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 30,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 33,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "HIPS/autograd/tests/test_wrappers.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_hessian_vector_product() :
fun = (lambda a : np.sum (np.sin (a)))
a = npr.randn (5)
v = npr.randn (5)
H = hessian (fun) (<MASK>)
check_equivalent (np.dot (H, v), hessian_vector_product (fun) (a, v))
Given the code above, what is a proper replacement for <MASK>? Choose among: ... | a |
5,740 | [
"#NEWLINE#",
"@",
"classmethod",
"#NEWLINE#",
"def get_cases(",
"self",
",",
"case_displays",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"disp",
"in",
"case_displays",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"yield",
"[",
"disp",
".",
"chw_name",
",",
"disp",
".",
"... | true | 122 | [
"7",
"15",
"13",
"22",
"26",
"30",
"34",
"38",
"42",
"46",
"50",
"54",
"58",
"62",
"66",
"70",
"74",
"78",
"82",
"86",
"90",
"94",
"98",
"102",
"106",
"110",
"114",
"118",
"126",
"130",
"134",
"138",
"142",
"146",
"150",
"154",
"158",
"162",
... | 1 | VARIABLE_MISUSE | [
13,
22,
26,
30,
34,
38,
42,
46,
50,
54,
58,
62,
66,
70,
74,
78,
82,
86,
90,
94,
98,
102,
106,
110,
114,
118,
126,
130,
134,
138,
142,
146,
150,
154,
158,
162,
166
] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dimagi/commcare-hq/custom/bihar/reports/mch_reports.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... | @ classmethod
def get_cases(self, case_displays) :
for disp in case_displays :
(yield [disp.chw_name, disp.child_name, disp.father_mother_name, disp.mcts_id, disp.gender, disp.ward_number, disp.village, disp.mobile_number, disp.mobile_number_whose, disp.dob_age, disp.home_sba_assist, disp.caste, disp.ash... | disp |
5,741 | [
"#NEWLINE#",
"@",
"set_ev_cls",
"(",
"stplib",
".",
"EventTopologyChange",
",",
"MAIN_DISPATCHER",
")",
"#NEWLINE#",
"def _topology_change_handler(",
"self",
",",
"ev",
")",
":",
"#NEWLINE#",
"#INDENT#",
"dp",
"=",
"dp",
".",
"dp",
"#NEWLINE#",
"dpid_str",
"=",
... | true | 21 | [
"36",
"50",
"14",
"12",
"40",
"59",
"67",
"77",
"25",
"48",
"19",
"21",
"23",
"31",
"55",
"71",
"81"
] | 1 | VARIABLE_MISUSE | [
14
] | [
[
{
"before_index": 1,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "osrg/ryu/ryu/app/simple_switch_stp.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... | @ set_ev_cls (stplib.EventTopologyChange, MAIN_DISPATCHER)
def _topology_change_handler(self, ev) :
dp = <MASK>.dp
dpid_str = dpid_lib.dpid_to_str (dp.id)
msg = 'Receive topology change event. Flush MAC table.'
self.logger.debug ('[dpid=%s] %s', dpid_str, msg)
if (dp.id in self.mac_to_port) : ... | ev |
5,742 | [
"#NEWLINE#",
"def open_url(",
"self",
",",
"url",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"load_preferences",
"(",
")",
"#NEWLINE#",
"if",
"self",
".",
"debug",
":",
"#NEWLINE#",
"#INDENT#",
"print",
"(",
"(",
"(",
"(",
"'Opening url: \"'",
"+",
"url... | true | 51 | [
"4",
"29",
"51",
"61",
"2",
"9",
"16",
"35",
"45"
] | 1 | VARIABLE_MISUSE | [
2,
9,
16,
35,
45
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 17... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "markjones112358/dmenu-extended/dmenu_extended.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 open_url(self, url) :
self.load_preferences ()
if self.debug :
print (((('Opening url: "' + url) + '" with ') + self.prefs ['webbrowser']))
self.execute (((<MASK>.prefs ['webbrowser'] + ' ') + url.replace (' ', '%20')))
Given the code above, what is a proper replacement for <MASK>? Cho... | self |
5,743 | [
"#NEWLINE#",
"def plugins_available(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"load_preferences",
"(",
")",
"#NEWLINE#",
"if",
"self",
".",
"debug",
":",
"#NEWLINE#",
"#INDENT#",
"print",
"(",
"'Loading available plugins...'",
")",
"#NEWLINE#",
"#UN... | true | 103 | [
"35",
"69",
"99",
"137",
"151",
"171",
"26",
"43",
"103",
"2",
"7",
"14",
"28",
"75",
"114",
"167",
"174",
"165",
"178",
"184",
"41",
"51",
"59",
"85"
] | 1 | VARIABLE_MISUSE | [
41,
51,
59,
85
] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "markjones112358/dmenu-extended/dmenu_extended.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 plugins_available(self) :
self.load_preferences ()
if self.debug :
print ('Loading available plugins...')
plugins = self.get_plugins (True)
plugin_titles = []
for plugin in plugins :
if (hasattr (plugin ['plugin'], 'is_submenu') and plugin ['plugin'].is_submenu) :
... | plugin |
5,744 | [
"#NEWLINE#",
"def _copy_interfaces_info(",
"interfaces",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Return a dictionary with a copy of each interface attributes in ATTRS\\n '",
"#NEWLINE#",
"ret",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"#NEWLINE#",
"#UNINDENT#",
"}",
"#NEWLINE#",
... | true | 64 | [
"38",
"44",
"32",
"46",
"56",
"25",
"60",
"73",
"2",
"21",
"51",
"19",
"53",
"64",
"70",
"9",
"68",
"77"
] | 1 | VARIABLE_MISUSE | [
38,
44
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 19... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "saltstack/salt/salt/beacons/network_settings.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 _copy_interfaces_info(interfaces) :
'
Return a dictionary with a copy of each interface attributes in ATTRS
'
ret = {
}
for interface in interfaces :
_interface_attrs_cpy = set ()
for attr in ATTRS :
attr_dict = Hashabledict ()
attr_dict [... | attr_dict |
5,745 | [
"#NEWLINE#",
"def test_messytables_source_six(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"data",
"=",
"os",
".",
"path",
".",
"join",
"(",
"self",
".",
"data_dir",
",",
"'jungle'",
",",
"'messytables-excel_properties.xls'",
")",
"#NEWLINE#",
"pipeline",
"=",
"P... | true | 28 | [
"38",
"7",
"53",
"28",
"36",
"24",
"41",
"51",
"2",
"15",
"47"
] | 1 | VARIABLE_MISUSE | [
7,
53
] | [
[
{
"before_index": 6,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 29,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 34,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "frictionlessdata/goodtables/tests/test_jungle.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_messytables_source_six(self) :
data = os.path.join (self.data_dir, 'jungle', 'messytables-excel_properties.xls')
pipeline = Pipeline (<MASK>, format = 'excel')
(result, report) = pipeline.run ()
self.assertTrue (pipeline.data)
Given the code above, what is a proper replacement for... | data |
5,746 | [
"#NEWLINE#",
"def remove_dependency(",
"self",
",",
"obj",
",",
"depending_on",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"g",
".",
"remove_edge",
"(",
"obj",
",",
"self",
")"
] | true | 19 | [
"4",
"17",
"6",
"2",
"11",
"19"
] | 1 | VARIABLE_MISUSE | [
6
] | [
[
{
"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": 18,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mbr/unleash/unleash/depgraph.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 remove_dependency(self, obj, depending_on) :
self.g.remove_edge (obj, <MASK>)
Given the code above, what is a proper replacement for <MASK>? Choose among: obj, depending_on, self | depending_on |
5,747 | [
"#NEWLINE#",
"def test_select_gt(",
"self",
",",
"model_context",
")",
":",
"#NEWLINE#",
"#INDENT#",
"User",
"=",
"model_context",
"[",
"'User'",
"]",
"#NEWLINE#",
"session",
"=",
"model_context",
"[",
"'session'",
"]",
"#NEWLINE#",
"self",
".",
"users",
"(",
"U... | true | 29 | [
"16",
"32",
"40",
"38",
"60",
"78",
"4",
"11",
"18",
"29",
"72",
"76",
"9",
"27",
"44",
"50",
"2",
"23"
] | 1 | VARIABLE_MISUSE | [
16,
32,
40
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 19... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mozillazg/bustard/tests/test_orm.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_select_gt(self, model_context) :
User = model_context ['User']
session = model_context ['session']
self.users (User, <MASK>)
session.commit ()
queryset = session.query (User).filter ((User.id > 2))
assert (queryset.count () == 2)
assert ([us.id for us in queryset] == [3, 4]) ... | session |
5,748 | [
"#NEWLINE#",
"def setupParser(",
"parser",
")",
":",
"#NEWLINE#",
"#INDENT#",
"priority_name_list",
"=",
"phlcon_maniphest",
".",
"PRIORITIES",
".",
"keys",
"(",
")",
"#NEWLINE#",
"priority_name_list",
".",
"sort",
"(",
"key",
"=",
"(",
"lambda",
"x",
":",
"phlc... | true | 335 | [
"70",
"286",
"301",
"316",
"59",
"72",
"335",
"78",
"162",
"187",
"208",
"233",
"261",
"7",
"17",
"53",
"99",
"2",
"38",
"61",
"80",
"118",
"137",
"36",
"89"
] | 1 | VARIABLE_MISUSE | [
2,
38,
61,
80,
118,
137
] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 35,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "bloomberg/phabricator-tools/py/aon/aoncmd_taskupdate.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 setupParser(parser) :
priority_name_list = phlcon_maniphest.PRIORITIES.keys ()
priority_name_list.sort (key = (lambda x : phlcon_maniphest.PRIORITIES [x]))
priorities = parser.add_argument_group ('optional priority arguments', ('use any of ' + textwrap.fill (str (priority_name_list))))
output_gr... | parser |
5,749 | [
"#NEWLINE#",
"def _get_ordering(",
"son",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Helper function to extract formatted ordering from dict.\\n '",
"#NEWLINE#",
"def fmt(",
"field",
",",
"direction",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"'{0}{1}'",
".",
"format",
"(",... | true | 52 | [
"63",
"52",
"65",
"71",
"67",
"73",
"2",
"76"
] | 1 | VARIABLE_MISUSE | [
2,
76
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 48,
"after_index": 51... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "MongoEngine/flask-mongoengine/flask_mongoengine/operation_tracker.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 _get_ordering(son) :
'Helper function to extract formatted ordering from dict.
'
def fmt(field, direction) :
return '{0}{1}'.format ({
(- 1) : '-',
1 : '+',
} [direction], field)
if ('$orderby' in <MASK>) :
return ', '.join ((fmt (f, d) for (f, d) in son [... | son |
5,750 | [
"#NEWLINE#",
"@",
"contextmanager",
"#NEWLINE#",
"def get_reader(",
"self",
",",
"csv_data",
",",
"**reader_kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"reader",
"=",
"csv",
".",
"reader",
"(",
"StringIO",
"(",
"reader",
")",
",",
"**",
"reader_kwargs",
")",
"... | true | 22 | [
"14",
"18",
"22",
"31",
"5",
"7",
"26"
] | 1 | VARIABLE_MISUSE | [
7
] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "coleifer/peewee/playhouse/tests/test_csv_utils.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... | @ contextmanager
def get_reader(self, csv_data, **reader_kwargs) :
reader = csv.reader (StringIO (<MASK>), ** reader_kwargs)
(yield reader)
Given the code above, what is a proper replacement for <MASK>? Choose among: reader, self, csv_data, reader_kwargs | csv_data |
5,751 | [
"#NEWLINE#",
"def test_dump_functions(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"query",
"=",
"User",
".",
"select",
"(",
"User",
".",
"username",
",",
"fn",
".",
"COUNT",
"(",
"Note",
".",
"id",
")",
")",
".",
"join",
"(",
"Note",
",",
"JOIN",
"."... | true | 112 | [
"2",
"62",
"108",
"112",
"7",
"66",
"71",
"73",
"50",
"68",
"101",
"114"
] | 1 | VARIABLE_MISUSE | [
7,
66,
71,
73
] | [
[
{
"before_index": 6,
"after_index": 44,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 49,
"after_index": 52,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 61,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "coleifer/peewee/playhouse/tests/test_csv_utils.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_dump_functions(self) :
query = User.select (User.username, fn.COUNT (Note.id)).join (Note, JOIN.LEFT_OUTER).group_by (User.username).order_by (User.id)
expected = ['username,COUNT', 'user-0,0', 'user-1,3', 'user-2,6']
self.assertCSV (query, expected)
query = query.select (User.username.alia... | query |
5,752 | [
"#NEWLINE#",
"def cast_out(",
"self",
",",
"klass",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Interpret the content as a particular class.'",
"#NEWLINE#",
"if",
"_debug",
":",
"#NEWLINE#",
"#INDENT#",
"Any",
".",
"_debug",
"(",
"'cast_out %r'",
",",
"klass",
")",
"#NEWLINE... | true | 223 | [
"35",
"53",
"80",
"98",
"116",
"143",
"227",
"240",
"41",
"57",
"64",
"104",
"120",
"127",
"270",
"286",
"293",
"4",
"22",
"28",
"37",
"91",
"100",
"159",
"229",
"260",
"266",
"82",
"145",
"223",
"242",
"264",
"282",
"309",
"2",
"45",
"108",
... | 1 | VARIABLE_MISUSE | [
4,
22,
28,
37,
91,
100,
159,
229,
260,
266
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 12,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "JoelBender/bacpypes/py27/bacpypes/constructeddata.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 cast_out(self, klass) :
'Interpret the content as a particular class.'
if _debug :
Any._debug ('cast_out %r', klass)
if (klass in _sequence_of_classes) :
helper = klass ()
t = TagList (self.tagList [:])
helper.decode (t)
if (len (t) != 0) :
raise ... | klass |
5,753 | [
"#NEWLINE#",
"@",
"pytest",
".",
"mark",
".",
"parametrize",
"(",
"'source_type'",
",",
"list",
"(",
"(",
"set",
"(",
"ALL_SOURCES",
")",
"-",
"set",
"(",
"[",
"PointSourceCollection",
"]",
")",
")",
")",
")",
"#NEWLINE#",
"def test_luminosity_scalar_invalid2(... | true | 72 | [
"48",
"29",
"36",
"34",
"52",
"72"
] | 1 | VARIABLE_MISUSE | [
48
] | [
[
{
"before_index": 33,
"after_index": 37,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 70,
"after_index": 80,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "hyperion-rt/hyperion/hyperion/sources/tests/test_source.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 ('source_type', list ((set (ALL_SOURCES) - set ([PointSourceCollection]))))
def test_luminosity_scalar_invalid2(source_type) :
s = source_type ()
with pytest.raises (ValueError) as exc :
s.luminosity = np.array ([1, 2, 3])
assert (<MASK>.value.args [0] == 'luminosity shoul... | exc |
5,754 | [
"#NEWLINE#",
"def get_tenant_quota_data(",
"request",
",",
"disabled_quotas",
"=",
"None",
",",
"tenant_id",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"qs",
"=",
"_get_quota_data",
"(",
"request",
",",
"'tenant_quota_get'",
",",
"disabled_quotas",
"=",
"disabl... | true | 484 | [
"290",
"314",
"370",
"394",
"8",
"27",
"29",
"57",
"60",
"66",
"77",
"69",
"130",
"211",
"292",
"372",
"452",
"15",
"41",
"99",
"139",
"180",
"220",
"255",
"272",
"301",
"335",
"352",
"381",
"415",
"432",
"461",
"450",
"474",
"2",
"19",
"62",
... | 1 | VARIABLE_MISUSE | [
15,
41,
99,
139,
180,
220,
255,
272,
301,
335,
352,
381,
415,
432,
461
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 32,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CiscoSystems/avos/openstack_dashboard/usage/quotas.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_tenant_quota_data(request, disabled_quotas = None, tenant_id = None) :
qs = _get_quota_data (request, 'tenant_quota_get', disabled_quotas = disabled_quotas, tenant_id = tenant_id)
if (not disabled_quotas) :
return qs
if ('network' and ('router' not in disabled_quotas)) :
tenant_id =... | qs |
5,755 | [
"#NEWLINE#",
"@",
"mock",
".",
"patch",
".",
"object",
"(",
"driver_utils",
",",
"'get_node_mac_addresses'",
",",
"autospec",
"=",
"True",
")",
"#NEWLINE#",
"@",
"mock",
".",
"patch",
".",
"object",
"(",
"ssh",
",",
"'_get_connection'",
",",
"autospec",
"=",... | true | 143 | [
"124",
"128",
"168",
"52",
"100",
"195",
"61",
"72",
"87",
"132",
"203",
"50",
"67",
"96",
"139",
"199",
"56",
"83",
"177",
"143",
"153",
"157",
"165",
"172",
"190",
"54",
"92",
"186"
] | 1 | VARIABLE_MISUSE | [
61,
72,
87,
132,
203
] | [
[
{
"before_index": 1,
"after_index": 51,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 60,
"after_index": 66,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 71,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/ironic/ironic/tests/unit/drivers/modules/test_ssh.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.object (driver_utils, 'get_node_mac_addresses', autospec = True)
@ mock.patch.object (ssh, '_get_connection', autospec = True)
@ mock.patch.object (ssh, '_power_on', autospec = True)
def test_reboot_good(self, power_on_mock, get_conn_mock, get_mac_addr_mock) :
info = ssh._parse_driver_info (self.no... | info |
5,756 | [
"#NEWLINE#",
"@",
"pytest",
".",
"mark",
".",
"django_db",
"#NEWLINE#",
"def test_serialization_does_backwards_conversion_v3_to_v1(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"data",
"=",
"self",
".",
"serializer",
".",
"to_representation",
"(",
"instance",
"=",
"da... | true | 24 | [
"14",
"24",
"36",
"44",
"59",
"9",
"16",
"29",
"40",
"52"
] | 1 | VARIABLE_MISUSE | [
9,
16,
29,
40,
52
] | [
[
{
"before_index": 13,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": 32,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 39,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mrhwick/django-rest-framework-version-transforms/tests/actual_tests.py",
"license": "isc",
"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.django_db
def test_serialization_does_backwards_conversion_v3_to_v1(self) :
data = self.serializer.to_representation (instance = <MASK>.instance)
self.assertTrue (('test_field_one' in data))
self.assertEqual (data ['test_field_one'], 'SOME TEST VALUE')
self.assertFalse (('new_related_... | self |
5,757 | [
"#NEWLINE#",
"def decodeLight(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Takes self.light (a list of strings) and applies a decoder to it,\\n returning a list of strings that are human-readable.'",
"#NEWLINE#",
"decoder1",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'B'",
":",
"'... | true | 84 | [
"42",
"82",
"84",
"2",
"74",
"9",
"72"
] | 1 | VARIABLE_MISUSE | [
2,
74
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 41,
"after_index": 44... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "alpha-beta-soup/national-crash-statistics/source/nzta2geojson.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 decodeLight(self) :
'Takes self.light (a list of strings) and applies a decoder to it,
returning a list of strings that are human-readable.'
decoder1 = {
'B' : 'Bright sun',
'O' : 'Overcast',
'T' : 'Twilight',
'D' : 'Dark',
' ' : None,
}
decoder2 ... | self |
5,758 | [
"#NEWLINE#",
"def rigidGroupObject(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"self",
".",
"__rigid_grp",
"is",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"i",
"in",
"filter",
"(",
"(",
"lambda",
"x",
":",
"(",
"x",
".",
"mmd_type",
... | true | 108 | [
"19",
"49",
"108",
"65",
"84",
"90",
"115",
"2",
"9",
"36",
"45",
"56",
"94",
"111",
"120"
] | 1 | VARIABLE_MISUSE | [
65,
84,
90,
115
] | [
[
{
"before_index": 7,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 119,
"after_index": 121,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index"... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sugiany/blender_mmd_tools/mmd_tools/core/model.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 rigidGroupObject(self) :
if (self.__rigid_grp is None) :
for i in filter ((lambda x : (x.mmd_type == 'RIGID_GRP_OBJ')), self.__root.children) :
self.__rigid_grp = i
break
if (self.__rigid_grp is None) :
rigids = bpy.data.objects.new (name = 'rigidbodies', object... | rigids |
5,759 | [
"#NEWLINE#",
"def __createNonCollisionConstraint(",
"self",
",",
"nonCollisionJointTable",
")",
":",
"#NEWLINE#",
"#INDENT#",
"total_len",
"=",
"len",
"(",
"nonCollisionJointTable",
")",
"#NEWLINE#",
"if",
"(",
"total_len",
"<",
"1",
")",
":",
"#NEWLINE#",
"#INDENT#",... | true | 181 | [
"171",
"241",
"262",
"288",
"295",
"306",
"4",
"13",
"356",
"166",
"199",
"218",
"323",
"339",
"28",
"181",
"375",
"56",
"81",
"84",
"96",
"102",
"108",
"114",
"120",
"135",
"156",
"174",
"2",
"124",
"210",
"234",
"256",
"284",
"250",
"264",
"2... | 1 | VARIABLE_MISUSE | [
166,
199,
218,
323,
339
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 19... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sugiany/blender_mmd_tools/mmd_tools/core/model.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 __createNonCollisionConstraint(self, nonCollisionJointTable) :
total_len = len (nonCollisionJointTable)
if (total_len < 1) :
return
start_time = time.time ()
logging.debug (('-' * 60))
logging.debug (' creating ncc, counts: %d', total_len)
ncc_obj = bpy.data.objects.new ('ncc', No... | ncc_objs |
5,792 | [
"#NEWLINE#",
"def test_get_with_filter_outer_joins(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Test that the API does not return duplicate results\\n when the underlying SQL query would return dupes.\\n '",
"#NEWLINE#",
"user",
"=",
"User",
".",
"objects",
".... | true | 53 | [
"2",
"60",
"85",
"22",
"9",
"48",
"53",
"35",
"55",
"58",
"75",
"69",
"77",
"93",
"99"
] | 1 | VARIABLE_MISUSE | [
22
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 29... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "AltSchool/dynamic-rest/tests/test_api.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_get_with_filter_outer_joins(self) :
'
Test that the API does not return duplicate results
when the underlying SQL query would return dupes.
'
user = User.objects.create (name = 'test')
group_a = Group.objects.create (name = 'A')
group_b = Group.objects.create (name =... | group_a |
5,793 | [
"#NEWLINE#",
"def test_flattener_layer_state_separation_for_conv(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Creates a CompositeLayer wrapping two Conv layers\\n and ensures that state gets correctly picked apart.\\n '",
"#NEWLINE#",
"conv1",
"=",
"ConvElemwise",
"(",
"8",
",",
... | true | 64 | [
"116",
"146",
"148",
"29",
"66",
"138",
"155",
"169",
"50",
"64",
"157",
"151",
"173",
"184",
"8",
"90",
"142",
"144"
] | 1 | VARIABLE_MISUSE | [
8
] | [
[
{
"before_index": 5,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 7,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": 34... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lisa-lab/pylearn2/pylearn2/models/tests/test_mlp.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 test_flattener_layer_state_separation_for_conv() :
'
Creates a CompositeLayer wrapping two Conv layers
and ensures that state gets correctly picked apart.
'
conv1 = ConvElemwise (8, [2, 2], 'sf1', SigmoidConvNonlinearity (), 0.1)
conv2 = ConvElemwise (8, [2, 2], 'sf2', SigmoidConvNonlinea... | conv1 |
5,794 | [
"#NEWLINE#",
"def subdict_match(",
"data",
",",
"expr",
",",
"delimiter",
"=",
"DEFAULT_TARGET_DELIM",
",",
"regex_match",
"=",
"False",
",",
"exact_match",
"=",
"False",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"\\n Check for a match in a dictionary using a delimiter charac... | true | 609 | [
"2",
"456",
"609",
"262",
"350",
"575",
"601",
"381",
"419",
"431",
"51",
"452",
"474",
"492",
"502",
"527",
"537",
"603",
"10",
"28",
"40",
"153",
"228",
"230",
"268",
"270",
"306",
"308",
"356",
"358",
"506",
"508",
"558",
"560",
"581",
"583",
... | 1 | VARIABLE_MISUSE | [
10,
28,
40,
153,
228,
230,
268,
270,
306,
308,
356,
358,
506,
508,
558,
560,
581,
583,
607
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "saltstack/salt/salt/utils/__init__.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 subdict_match(data, expr, delimiter = DEFAULT_TARGET_DELIM, regex_match = False, exact_match = False) :
"
Check for a match in a dictionary using a delimiter character to denote
levels of subdicts, and also allowing the delimiter character to be
matched. Thus, 'foo:bar:baz' will match data['foo'] =... | regex_match |
5,795 | [
"#NEWLINE#",
"def test_assemblies_post_no_content_type(",
"self",
",",
"PlanHandler",
",",
"AssemblyHandler",
",",
"resp_mock",
",",
"request_mock",
")",
":",
"#NEWLINE#",
"#INDENT#",
"request_mock",
".",
"content_type",
"=",
"None",
"#NEWLINE#",
"assemblies",
".",
"Ass... | true | 37 | [
"4",
"2",
"31",
"10",
"15",
"37",
"6",
"8"
] | 1 | VARIABLE_MISUSE | [
8
] | [
[
{
"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": "openstack/solum/solum/tests/api/camp/v1_1/test_assemblies.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_assemblies_post_no_content_type(self, PlanHandler, AssemblyHandler, resp_mock, request_mock) :
request_mock.content_type = None
assemblies.AssembliesController ().post ()
self.assertEqual (415, <MASK>.status)
Given the code above, what is a proper replacement for <MASK>? Choose among: ... | resp_mock |
5,796 | [
"#NEWLINE#",
"def bplogsmooth(",
"X",
",",
"tbin",
",",
"f0",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Smooth the FFT and convert it to dB.\\n\\n Use 8 bins from the bin corresponding to ``f0`` to ``tbin`` and again as far.\\n Thereafter increase bin sizes by a factor of 1.1, staying less th... | true | 563 | [
"419",
"456",
"270",
"491",
"518",
"544",
"603",
"530",
"546",
"559",
"565",
"579",
"584",
"4",
"79",
"83",
"106",
"116",
"149",
"162",
"169",
"6",
"97",
"515",
"111",
"130",
"146",
"310",
"314",
"182",
"199",
"231",
"258",
"261",
"335",
"352",
... | 1 | VARIABLE_MISUSE | [
473,
506,
577
] | [
[
{
"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": "ggventurini/python-deltasigma/deltasigma/_bplogsmooth.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 bplogsmooth(X, tbin, f0) :
'Smooth the FFT and convert it to dB.
Use 8 bins from the bin corresponding to ``f0`` to ``tbin`` and again as far.
Thereafter increase bin sizes by a factor of 1.1, staying less than 2^10.
For ``tbin``, group the bins together.
Use this for nice double-sided log-lo... | stopbin |
5,797 | [
"#NEWLINE#",
"def load(",
"self",
",",
"name",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"name",
"in",
"self",
".",
"impls",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"self",
".",
"impls",
"[",
"name",
"]",
"(",
")",
"#NEWLINE#",
"#UNINDENT#",
"if... | true | 111 | [
"4",
"11",
"25",
"44",
"56",
"99",
"108",
"111",
"137",
"38",
"48",
"59",
"62",
"2",
"13",
"21",
"32",
"40",
"52",
"95",
"104",
"133",
"89",
"116"
] | 1 | VARIABLE_MISUSE | [
89,
116
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 31,
"after_index": 33... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "goFrendiAsgard/kokoropy/kokoropy/packages/sqlalchemy/util/langhelpers.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 load(self, name) :
if (name in self.impls) :
return self.impls [name] ()
if self.auto_fn :
loader = self.auto_fn (name)
if loader :
self.impls [name] = loader
return loader ()
try :
import pkg_resources
except ImportError :
pass
else : ... | impl |
5,798 | [
"#NEWLINE#",
"def take_action(",
"self",
",",
"parsed_args",
")",
":",
"#NEWLINE#",
"#INDENT#",
"options",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'trials'",
":",
"parsed_args",
".",
"trials",
",",
"#NEWLINE#",
"'workers'",
":",
"parsed_args",
".",
"workers",
",",
"... | true | 165 | [
"2",
"54",
"62",
"52",
"89",
"136",
"188",
"192",
"4",
"16",
"23",
"30",
"37",
"44",
"72",
"78",
"87",
"93",
"100",
"107",
"116",
"125",
"149",
"9",
"84",
"142",
"175",
"201",
"185",
"203",
"134",
"158",
"196",
"144",
"165",
"171"
] | 1 | VARIABLE_MISUSE | [
142
] | [
[
{
"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": 51,
"after_index": 65... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/python-rackclient/rackclient/v1/command/montecarlo.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 take_action(self, parsed_args) :
options = {
'trials' : parsed_args.trials,
'workers' : parsed_args.workers,
'stdout' : parsed_args.stdout,
'msg_limit_time' : parsed_args.msg_limit_time,
'noterm' : parsed_args.noterm,
}
process = self.client.processes.create (... | k |
5,799 | [
"#NEWLINE#",
"def __call__(",
"self",
",",
"form",
",",
"field",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"not",
"self",
".",
"active",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"#NEWLINE#",
"#UNINDENT#",
"if",
"self",
".",
"ignorecase",
":",
"#NEWLI... | true | 117 | [
"2",
"14",
"25",
"39",
"59",
"94",
"102",
"4",
"31",
"65",
"68",
"117",
"6",
"41",
"44",
"86",
"104",
"56",
"83",
"110"
] | 1 | VARIABLE_MISUSE | [
2,
14,
25,
39,
59,
94,
102
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "shaunduncan/breezeminder/breezeminder/forms/validators.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 __call__(self, form, field) :
if (not self.active) :
return
if self.ignorecase :
filter = {
('%s__iexact' % self.field) : field.data.strip (),
}
check = (self.klass.objects.filter (** filter).count () > 0)
else :
check = (field.data.strip () in self.klass.obj... | self |
5,800 | [
"#NEWLINE#",
"def possible_author(",
"self",
",",
"node",
")",
":",
"#NEWLINE#",
"#INDENT#",
"goods",
"=",
"[",
"'author'",
",",
"'by'",
",",
"'publi'",
",",
"'write'",
",",
"'written'",
",",
"'info'",
"]",
"#NEWLINE#",
"attr_values",
"=",
"node",
".",
"attr... | true | 51 | [
"40",
"49",
"61",
"75",
"4",
"27",
"51",
"65",
"9",
"42",
"45",
"2",
"25",
"47"
] | 1 | VARIABLE_MISUSE | [
9
] | [
[
{
"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": 24,
"after_index": 32... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "kootenpv/sky/sky/remove_boilerplate.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 possible_author(self, node) :
goods = ['author', 'by', 'publi', 'write', 'written', 'info']
attr_values = node.attrib.values ()
if any ([(g in a) for a in attr_values for g in <MASK>]) :
return True
txt = get_text_and_tail (node)
if re.search ('\\b(author|by)[:]', txt) :
retur... | goods |
5,801 | [
"#NEWLINE#",
"@",
"wsgi",
".",
"extends",
"#NEWLINE#",
"def detail(",
"self",
",",
"req",
",",
"resp_obj",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"not",
"authorize",
"(",
"req",
".",
"environ",
"[",
"'nova.context'",
"]",
")",
")",
":",
"#NEWLINE#",... | true | 39 | [
"11",
"43",
"9",
"21",
"7",
"35",
"39"
] | 1 | VARIABLE_MISUSE | [
9,
21
] | [
[
{
"before_index": 1,
"after_index": 8,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 34,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/api/openstack/compute/legacy_v2/contrib/flavorextradata.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... | @ wsgi.extends
def detail(self, req, resp_obj) :
if (not authorize (req.environ ['nova.context'])) :
return
self._extend_flavors (<MASK>, list (resp_obj.obj ['flavors']))
Given the code above, what is a proper replacement for <MASK>? Choose among: resp_obj, req, self | req |
5,802 | [
"#NEWLINE#",
"def static_lib_prefix(",
"ctx",
",",
"platform",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"platform",
"=",
"(",
"ctx",
"if",
"platform",
"else",
"guess_platform",
"(",
"ctx",
")",
")",
"#NEWLINE#",
"if",
"(",
"(",
"'windows'",
"in",
"pla... | true | 14 | [
"2",
"14",
"20",
"4",
"11",
"16",
"29",
"35"
] | 1 | VARIABLE_MISUSE | [
4,
11,
16,
29,
35
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "felix-lang/fbuild/lib/fbuild/builders/platform.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 static_lib_prefix(ctx, platform = None) :
platform = (<MASK> if platform else guess_platform (ctx))
if (('windows' in platform) and ('mingw' not in platform)) :
return ''
else :
return 'lib'
Given the code above, what is a proper replacement for <MASK>? Choose among: ctx, plat... | platform |
5,803 | [
"#NEWLINE#",
"def on_put(",
"self",
",",
"req",
",",
"resp",
",",
"id",
",",
"sid",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"called",
"=",
"True",
"#NEWLINE#",
"(",
"self",
".",
"req",
",",
"self",
".",
"resp",
")",
"=",
"(",
"req",
",",
"i... | true | 34 | [
"6",
"28",
"37",
"4",
"24",
"32",
"8",
"34",
"10",
"2",
"15",
"22",
"26"
] | 1 | VARIABLE_MISUSE | [
6,
28,
37
] | [
[
{
"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": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "falconry/falcon/tests/test_http_method_routing.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 on_put(self, req, resp, id, sid) :
self.called = True
(self.req, self.resp) = (req, <MASK>)
resp.status = falcon.HTTP_201
Given the code above, what is a proper replacement for <MASK>? Choose among: resp, req, id, sid, self | resp |
5,804 | [
"#NEWLINE#",
"def ex_get_balancer_error_page(",
"self",
",",
"balancer",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n List error page configured for the specified load balancer.\\n\\n :param balancer: Balancer which should be used\\n :type balancer: :class:`LoadBalancer`\\n\\n ... | true | 16 | [
"2",
"23",
"11",
"16",
"29",
"21",
"33",
"4"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 15,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "apache/libcloud/libcloud/loadbalancer/drivers/rackspace.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 ex_get_balancer_error_page(self, balancer) :
'
List error page configured for the specified load balancer.
:param balancer: Balancer which should be used
:type balancer: :class:`LoadBalancer`
:rtype: ``str``
'
uri = ('/loadbalancers/%s/errorpage' % <MASK>.id)
... | balancer |
5,805 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"conn",
",",
"login",
",",
"password",
")",
":",
"#NEWLINE#",
"#INDENT#",
"body",
"=",
"urllib",
".",
"urlencode",
"(",
"{",
"#NEWLINE#",
"#INDENT#",
"'user'",
":",
"self",
",",
"#NEWLINE#",
"'password'",
":",
"pass... | true | 24 | [
"4",
"42",
"6",
"8",
"29",
"39",
"2",
"24",
"53",
"37",
"57",
"13",
"50"
] | 1 | VARIABLE_MISUSE | [
6
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 35,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "fastly/fastly-py/fastly/auth.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, conn, login, password) :
body = urllib.urlencode ({
'user' : <MASK>,
'password' : password,
})
(resp, data) = conn.request ('POST', '/login', body)
self.session_key = resp.getheader ('Set-Cookie')
Given the code above, what is a proper replacement for <MASK... | login |
5,806 | [
"#NEWLINE#",
"@",
"mock",
".",
"patch",
"(",
"'validator.validate.validate'",
")",
"#NEWLINE#",
"def test_upload_listed_addon(",
"self",
",",
"validate_mock",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Listed addons are not validated as \"self-hosted\" addons.'",
"#NEWLINE#",
"valida... | true | 76 | [
"10",
"32",
"53",
"59",
"76",
"41",
"68",
"12",
"19"
] | 1 | VARIABLE_MISUSE | [
12,
19
] | [
[
{
"before_index": 1,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mozilla/addons-server/src/olympia/devhub/tests/test_views_validation.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... | @ mock.patch ('validator.validate.validate')
def test_upload_listed_addon(self, validate_mock) :
'Listed addons are not validated as "self-hosted" addons.'
validate_mock.return_value = json.dumps (amo.VALIDATOR_SKELETON_RESULTS)
self.url = reverse ('devhub.upload')
data = open (get_image_path ('ani... | validate_mock |
5,807 | [
"#NEWLINE#",
"def test_messageExistsLocationExists(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"\\n If a C{message} argument is passed to the L{InfiniteRedirection}\\n constructor, the C{message} isn't affected by the value of C{status}.\\n \"",
"#NEWLINE#",
"e",
"=",
... | true | 28 | [
"9",
"2",
"24",
"28"
] | 1 | VARIABLE_MISUSE | [
9
] | [
[
{
"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": 31... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "nlloyd/SubliminalCollaborator/libs/twisted/web/test/test_error.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_messageExistsLocationExists(self) :
"
If a C{message} argument is passed to the L{InfiniteRedirection}
constructor, the C{message} isn't affected by the value of C{status}.
"
e = error.InfiniteRedirection ('200', 'My own message', location = '/foo')
self.assertEqual (<MAS... | e |
5,808 | [
"#NEWLINE#",
"def _format_list_str(",
"values",
",",
"sep",
"=",
"','",
",",
"item_format",
"=",
"str",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Convert a list to a string.\\n\\n Each item in the list `values` is converted to a string with the\\n function `item_format`, and these are... | true | 19 | [
"26",
"35",
"46",
"44",
"63",
"4",
"38",
"53",
"56",
"8",
"19",
"51",
"2",
"58"
] | 1 | VARIABLE_MISUSE | [
4,
38
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "enthought/traitsui/traitsui/editors/csv_list_editor.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 _format_list_str(values, sep = ',', item_format = str) :
'Convert a list to a string.
Each item in the list `values` is converted to a string with the
function `item_format`, and these are joined with `sep` plus a space.
If `sep` is None, a single space is used to join the items.
Parameters
... | sep |
5,809 | [
"#NEWLINE#",
"def culaDeviceCgemv(",
"trans",
",",
"m",
",",
"n",
",",
"alpha",
",",
"A",
",",
"lda",
",",
"x",
",",
"incx",
",",
"beta",
",",
"y",
",",
"incy",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Matrix-vector product for complex general matrix.\\n\\n ... | true | 100 | [
"38",
"8",
"54",
"58",
"12",
"68",
"6",
"48",
"10",
"65",
"20",
"92",
"16",
"75",
"4",
"46",
"100",
"14",
"72",
"2",
"29",
"31",
"44",
"22",
"95",
"18",
"81",
"85"
] | 1 | VARIABLE_MISUSE | [
38
] | [
[
{
"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": "lebedov/scikit-cuda/skcuda/cula.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 culaDeviceCgemv(trans, m, n, alpha, A, lda, x, incx, beta, y, incy) :
'
Matrix-vector product for complex general matrix.
'
trans = trans.encode ('ascii')
status = _libcula.culaDeviceCgemv (trans, m, n, cuda.cuFloatComplex (alpha.real, alpha.imag), int (A), lda, int (x), incx, cuda.cuFloatCo... | status |
5,810 | [
"#NEWLINE#",
"def create_or_update(",
"self",
",",
"resource_group_name",
",",
"vm_name",
",",
"parameters",
",",
"custom_headers",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"#NEWLINE#",
"#UNINDENT#",
"}",
",",
"raw",
"=",
"False",
",",
"**operation_config",
")",
":",
"#... | true | 471 | [
"6",
"65",
"452",
"481",
"10",
"180",
"188",
"485",
"329",
"336",
"353",
"360",
"379",
"396",
"402",
"419",
"434",
"450",
"459",
"34",
"105",
"19",
"424",
"446",
"108",
"117",
"256",
"273",
"324",
"465",
"228",
"270",
"471",
"139",
"148",
"164",
... | 1 | VARIABLE_MISUSE | [
2,
41,
57,
73,
81,
96,
122,
130,
156,
194,
210,
218,
230,
248,
260,
294,
313,
390,
413
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 27,
"after_index": 28,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 29,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Azure/azure-sdk-for-python/azure-mgmt-compute/azure/mgmt/compute/operations/virtual_machines_operations.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_or_update(self, resource_group_name, vm_name, parameters, custom_headers = {
}, raw = False, **operation_config) :
'
The operation to create or update a virtual machine.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:par... | self |
5,811 | [
"#NEWLINE#",
"def get(",
"self",
",",
"resource_group_name",
",",
"vm_name",
",",
"expand",
"=",
"None",
",",
"custom_headers",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"#NEWLINE#",
"#UNINDENT#",
"}",
",",
"raw",
"=",
"False",
",",
"**operation_config",
")",
":",
"#... | true | 160 | [
"6",
"67",
"12",
"210",
"218",
"271",
"289",
"304",
"311",
"330",
"347",
"362",
"36",
"107",
"21",
"352",
"8",
"121",
"141",
"284",
"110",
"128",
"147",
"268",
"169",
"178",
"194",
"214",
"235",
"281",
"160",
"324",
"339",
"360",
"370",
"356",
... | 1 | VARIABLE_MISUSE | [
2,
43,
59,
75,
83,
98,
133,
152,
186,
224,
240,
248,
260,
273,
341
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 29,
"after_index": 30,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 31,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Azure/azure-sdk-for-python/azure-mgmt-compute/azure/mgmt/compute/operations/virtual_machines_operations.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 get(self, resource_group_name, vm_name, expand = None, custom_headers = {
}, raw = False, **operation_config) :
"
The operation to get a virtual machine.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param vm_name: The name of... | self |
5,812 | [
"#NEWLINE#",
"def __getattribute__(",
"self",
",",
"name",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Get an attribute on the wrapped module object.\\n\\n If the specified name has been deprecated then a warning is issued.\\n '",
"#NEWLINE#",
"_module",
"=",
"object",
... | true | 28 | [
"2",
"17",
"4",
"39",
"70",
"11",
"68",
"22",
"28",
"35",
"33",
"44",
"53",
"51",
"64",
"75"
] | 1 | VARIABLE_MISUSE | [
2,
17
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 18,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "bokeh/bokeh/bokeh/util/deprecate.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 __getattribute__(self, name) :
'
Get an attribute on the wrapped module object.
If the specified name has been deprecated then a warning is issued.
'
_module = object.__getattribute__ (self, '_module')
_deprecatedAttributes = object.__getattribute__ (<MASK>, '_deprecatedAttri... | self |
5,813 | [
"#NEWLINE#",
"def capture(",
"self",
",",
"money",
",",
"authorization",
",",
"options",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"options",
"=",
"(",
"options",
"or",
"{",
"#NEWLINE#",
"#INDENT#",
"#NEWLINE#",
"#UNINDENT#",
"}",
")",
"#NEWLINE#",
"resp... | true | 129 | [
"2",
"30",
"86",
"6",
"45",
"8",
"15",
"18",
"55",
"4",
"50",
"129",
"28",
"71",
"94",
"112",
"137",
"155"
] | 1 | VARIABLE_MISUSE | [
2,
30,
86
] | [
[
{
"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": 27,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "agiliq/merchant/billing/gateways/chargebee_gateway.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 capture(self, money, authorization, options = None) :
options = (options or {
})
resp = self._chargebee_request ('post', '/invoices/charge', data = {
'subscription_id' : authorization,
'amount' : money,
'description' : options.get ('description'),
})
if (200 <= r... | self |
5,814 | [
"#NEWLINE#",
"def safe_get_config_value(",
"group",
",",
"name",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Safely get Oslo config opts from Tempest, using old and new names.'",
"#NEWLINE#",
"conf_group",
"=",
"getattr",
"(",
"CONF",
",",
"name",
")",
"#NEWLINE#",
"try",
":",
"... | true | 17 | [
"11",
"27",
"43",
"4",
"17",
"29",
"47",
"2"
] | 1 | VARIABLE_MISUSE | [
2
] | [
[
{
"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": "openstack/neutron/neutron/tests/tempest/config.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 safe_get_config_value(group, name) :
'Safely get Oslo config opts from Tempest, using old and new names.'
conf_group = getattr (CONF, <MASK>)
try :
return getattr (conf_group, name)
except cfg.NoSuchOptError :
return getattr (conf_group, config_opts_translator [name])
Giv... | group |
5,815 | [
"#NEWLINE#",
"def test_power_reset_off_snmp_get_failure(",
"self",
",",
"mock_get_client",
")",
":",
"#NEWLINE#",
"#INDENT#",
"mock_client",
"=",
"mock_get_client",
".",
"return_value",
"#NEWLINE#",
"driver",
"=",
"snmp",
".",
"_get_driver",
"(",
"mock_get_client",
".",
... | true | 21 | [
"2",
"32",
"38",
"15",
"46",
"57",
"63",
"74",
"9",
"26",
"51",
"68",
"4",
"11",
"21"
] | 1 | VARIABLE_MISUSE | [
2,
32,
38
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 20... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/ironic/ironic/tests/unit/drivers/modules/test_snmp.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_power_reset_off_snmp_get_failure(self, mock_get_client) :
mock_client = mock_get_client.return_value
driver = snmp._get_driver (<MASK>.node)
mock_client.get.side_effect = self._get_snmp_failure ()
self.assertRaises (exception.SNMPFailure, driver.power_reset)
mock_client.set.assert_call... | self |
5,816 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"address",
"=",
"None",
",",
"authkey",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"address",
"=",
"authkey",
"#NEWLINE#",
"self",
".",
"authkey",
"=",
"authkey",
"#NEWLINE#",
"self",
".",
"manager... | true | 19 | [
"4",
"17",
"8",
"19",
"23",
"25",
"2",
"15",
"21",
"27"
] | 1 | VARIABLE_MISUSE | [
4,
17
] | [
[
{
"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": "w3c/wptserve/wptserve/stash.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 __init__(self, address = None, authkey = None) :
self.address = <MASK>
self.authkey = authkey
self.manager = None
Given the code above, what is a proper replacement for <MASK>? Choose among: address, authkey, self | address |
5,817 | [
"#NEWLINE#",
"@",
"test",
".",
"idempotent_id",
"(",
"'67ee6efd-7b33-4a68-927d-275b4f8ba958'",
")",
"#NEWLINE#",
"def test_rule_delete(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"policy",
"=",
"self",
".",
"create_qos_policy",
"(",
"name",
"=",
"'test-policy'",
","... | true | 90 | [
"34",
"68",
"85",
"107",
"132",
"55",
"74",
"76",
"15",
"42",
"63",
"102",
"127",
"10",
"17",
"36",
"47",
"57",
"81",
"90",
"96",
"113",
"121"
] | 1 | VARIABLE_MISUSE | [
55,
74,
76
] | [
[
{
"before_index": 14,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 33,
"after_index": 51,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 54,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/neutron/neutron/tests/tempest/api/test_qos.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... | @ test.idempotent_id ('67ee6efd-7b33-4a68-927d-275b4f8ba958')
def test_rule_delete(self) :
policy = self.create_qos_policy (name = 'test-policy', description = 'test policy', shared = False)
rule = self.admin_client.create_dscp_marking_rule (policy ['id'], self.VALID_DSCP_MARK1) ['dscp_marking_rule']
re... | retrieved_policy |
5,818 | [
"#NEWLINE#",
"def add_labels(",
"self",
",",
"label_fname",
")",
":",
"#NEWLINE#",
"#INDENT#",
"assert",
"isfile",
"(",
"label_fname",
")",
",",
"(",
"'File not found [%s]'",
"%",
"label_fname",
")",
"#NEWLINE#",
"flines",
"=",
"open",
"(",
"label_fname",
",",
"... | true | 245 | [
"80",
"116",
"157",
"176",
"258",
"358",
"2",
"254",
"280",
"389",
"407",
"424",
"159",
"164",
"166",
"205",
"220",
"247",
"324",
"362",
"109",
"233",
"243",
"37",
"43",
"51",
"64",
"83",
"90",
"97",
"145",
"151",
"298",
"311",
"120",
"346",
"3... | 1 | VARIABLE_MISUSE | [
157,
176,
258,
358
] | [
[
{
"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": 9,
"after_index": 17,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "IQSS/redmine2github/scripts/label_updates/add_update_labels.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 add_labels(self, label_fname) :
assert isfile (label_fname), ('File not found [%s]' % label_fname)
flines = open (label_fname, 'rU').readlines ()
flines = [x.strip () for x in flines if ((len (x.strip ()) > 0) and (not (x.strip () [: 1] == '#')))]
info_lines = [x.split ('|') for x in flines if (... | label_name |
5,819 | [
"#NEWLINE#",
"def visit_ExprList(",
"self",
",",
"n",
")",
":",
"#NEWLINE#",
"#INDENT#",
"visited_subexprs",
"=",
"[",
"]",
"#NEWLINE#",
"for",
"expr",
"in",
"n",
".",
"exprs",
":",
"#NEWLINE#",
"#INDENT#",
"visited_subexprs",
".",
"append",
"(",
"self",
".",
... | true | 31 | [
"4",
"17",
"15",
"9",
"23",
"41",
"2",
"27",
"31"
] | 1 | VARIABLE_MISUSE | [
15
] | [
[
{
"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": 14,
"after_index": 15... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "eliben/pycparser/pycparser/c_generator.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 visit_ExprList(self, n) :
visited_subexprs = []
for expr in n.exprs :
visited_subexprs.append (self._visit_expr (<MASK>))
return ', '.join (visited_subexprs)
Given the code above, what is a proper replacement for <MASK>? Choose among: n, expr, visited_subexprs, self | expr |
5,820 | [
"#NEWLINE#",
"@",
"testing",
".",
"for_all_dtypes",
"(",
")",
"#NEWLINE#",
"@",
"testing",
".",
"numpy_cupy_array_equal",
"(",
")",
"#NEWLINE#",
"def test_setitem_partial_copy(",
"self",
",",
"xp",
",",
"dtype",
")",
":",
"#NEWLINE#",
"#INDENT#",
"a",
"=",
"xp",... | true | 41 | [
"25",
"61",
"82",
"18",
"27",
"56",
"16",
"41",
"44",
"79",
"20",
"39",
"58"
] | 1 | VARIABLE_MISUSE | [
20,
39,
58
] | [
[
{
"before_index": 1,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 38,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 43,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pfnet/chainer/tests/cupy_tests/core_tests/test_ndarray_indexing.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... | @ testing.for_all_dtypes ()
@ testing.numpy_cupy_array_equal ()
def test_setitem_partial_copy(self, xp, dtype) :
a = xp.zeros ((2, 3, 4), dtype = <MASK>)
b = testing.shaped_arange ((3, 2), xp, dtype)
a [1, : : (- 1), 1 : 4 : 2] = b
return a
Given the code above, what is a proper replacem... | dtype |
5,821 | [
"#NEWLINE#",
"@",
"classmethod",
"#NEWLINE#",
"def http(",
"cls",
",",
"status_code",
",",
"msg",
"=",
"''",
",",
"err_list",
"=",
"None",
",",
"headers",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Raise an HTTP status code.\\n\\n Useful for returning st... | true | 243 | [
"189",
"207",
"217",
"223",
"234",
"279",
"67",
"191",
"209",
"255",
"272",
"9",
"198",
"221",
"5",
"13",
"225",
"228",
"243",
"257",
"274",
"7",
"193",
"211",
"236",
"238",
"17",
"240",
"260"
] | 1 | VARIABLE_MISUSE | [
17,
240,
260
] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 66,
"after_index": 6... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/fuel-web/nailgun/nailgun/api/v1/handlers/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... | @ classmethod
def http(cls, status_code, msg = '', err_list = None, headers = None) :
'Raise an HTTP status code.
Useful for returning status
codes like 401 Unauthorized or 403 Forbidden.
:param status_code: the HTTP status code as an integer
:param msg: the message to send along... | headers |
5,822 | [
"#NEWLINE#",
"def test_returned_dtype(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"dtypes",
"=",
"[",
"np",
".",
"int16",
",",
"np",
".",
"int32",
",",
"np",
".",
"int64",
",",
"np",
".",
"float32",
",",
"np",
".",
"float64",
"]",
"#NEWLINE#",
"if",
... | true | 184 | [
"95",
"111",
"124",
"150",
"180",
"72",
"98",
"126",
"7",
"41",
"54",
"2",
"132",
"164",
"184",
"86",
"100",
"52",
"67",
"69",
"120",
"139",
"154",
"171",
"173",
"182",
"186",
"105",
"137",
"152",
"169",
"58",
"109"
] | 1 | VARIABLE_MISUSE | [
105,
137,
152,
169
] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 31,
"after_index": 35,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 51,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pydata/pandas/pandas/tests/test_nanops.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_returned_dtype(self) :
dtypes = [np.int16, np.int32, np.int64, np.float32, np.float64]
if hasattr (np, 'float128') :
dtypes.append (np.float128)
for dtype in dtypes :
s = Series (range (10), dtype = dtype)
group_a = ['mean', 'std', 'var', 'skew', 'kurt']
group_b =... | result |
5,823 | [
"#NEWLINE#",
"def confirmation(",
"self",
",",
"pdu",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Decode upstream PDUs and pass them up to the service access point.'",
"#NEWLINE#",
"if",
"_debug",
":",
"#NEWLINE#",
"#INDENT#",
"NetworkAdapter",
".",
"_debug",
"(",
"'confirmation %r ... | true | 56 | [
"4",
"22",
"36",
"45",
"56",
"30",
"41",
"2",
"24",
"48",
"54"
] | 1 | VARIABLE_MISUSE | [
30,
41
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 12,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "JoelBender/bacpypes/py25/bacpypes/netservice.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 confirmation(self, pdu) :
'Decode upstream PDUs and pass them up to the service access point.'
if _debug :
NetworkAdapter._debug ('confirmation %r (net=%r)', pdu, self.adapterNet)
npdu = NPDU (user_data = pdu.pduUserData)
npdu.decode (pdu)
self.adapterSAP.process_npdu (self, <MASK>)
... | npdu |
5,824 | [
"#NEWLINE#",
"def find_high_level_links_msg(",
"pname",
",",
"bname",
",",
"release",
",",
"pk_resource_src",
",",
"pk_resource_dst",
",",
"msg_level",
",",
"no_snippet",
",",
"size",
")",
":",
"#NEWLINE#",
"#INDENT#",
"prelease",
"=",
"ProjectRelease",
".",
"object... | true | 232 | [
"91",
"140",
"217",
"307",
"72",
"121",
"309",
"12",
"68",
"248",
"261",
"44",
"200",
"193",
"255",
"14",
"167",
"298",
"319",
"16",
"267",
"269",
"300",
"324",
"273",
"277",
"281",
"292",
"6",
"36",
"38",
"171",
"184",
"237",
"296",
"314",
"21... | 1 | VARIABLE_MISUSE | [
72,
121,
309
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 40,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 43,
"after_index": 6... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "bartdag/recodoc2/recodoc2/apps/recommender/actions.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 find_high_level_links_msg(pname, bname, release, pk_resource_src, pk_resource_dst, msg_level, no_snippet, size) :
prelease = ProjectRelease.objects.filter (project__dir_name = pname).filter (release = release) [0]
codebase = CodeBase.objects.filter (project_release = prelease).filter (name = bname) [0]
... | dst_type |
5,825 | [
"#NEWLINE#",
"@",
"skipif",
"(",
"_no_statsmodels",
")",
"#NEWLINE#",
"def test_statsmodels_univariate_kde(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Test the univariate KDE estimation with statsmodels.'",
"#NEWLINE#",
"(",
"grid",
",",
"y",
")",
"=",
"dist",
".",
... | true | 37 | [
"18",
"70",
"35",
"37",
"79",
"101",
"8",
"25",
"29",
"33",
"41",
"45",
"59",
"73",
"93",
"97",
"103",
"107",
"111",
"16",
"56"
] | 1 | VARIABLE_MISUSE | [
8,
25,
29,
33,
41,
45,
59,
73,
93,
97,
103,
107,
111
] | [
[
{
"before_index": 12,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 28,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 49,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mwaskom/seaborn/seaborn/tests/test_distributions.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... | @ skipif (_no_statsmodels)
def test_statsmodels_univariate_kde(self) :
'Test the univariate KDE estimation with statsmodels.'
(grid, y) = dist._statsmodels_univariate_kde (self.x, self.kernel, self.bw, <MASK>.gridsize, self.cut, self.clip)
nt.assert_equal (len (grid), self.gridsize)
nt.assert_equal... | self |
5,826 | [
"#NEWLINE#",
"def deserialize(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"request",
"=",
"self",
".",
"get_django_request",
"(",
")",
"#NEWLINE#",
"return",
"{",
"#NEWLINE#",
"#INDENT#",
"'data'",
":",
"self",
".",
"POST",
",",
"#NEWLINE#",
"'files'",
":",
... | true | 21 | [
"7",
"28",
"2",
"9",
"21"
] | 1 | VARIABLE_MISUSE | [
7,
28
] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "zbyte64/django-hyperadmin/hyperadmin/mediatypes/passthrough.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 deserialize(self) :
request = self.get_django_request ()
return {
'data' : <MASK>.POST,
'files' : request.FILES,
}
Given the code above, what is a proper replacement for <MASK>? Choose among: request, self | request |
5,827 | [
"#NEWLINE#",
"def _read(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Reads and returns a buffer reversely from current file-pointer position.\\n\\n :rtype : str\\n '",
"#NEWLINE#",
"filepos",
"=",
"self",
".",
"_fp",
".",
"tell",
"(",
")",
"#NEWLINE#",... | true | 53 | [
"9",
"21",
"37",
"65",
"2",
"11",
"39",
"47",
"58",
"71",
"53",
"56",
"81",
"32",
"67",
"77"
] | 1 | VARIABLE_MISUSE | [
32,
67,
77
] | [
[
{
"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": 19,
"after_index": 22... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Jahaja/psdash/psdash/log.py",
"license": "cc0-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 _read(self) :
'
Reads and returns a buffer reversely from current file-pointer position.
:rtype : str
'
filepos = self._fp.tell ()
if (filepos < 1) :
return ''
destpos = max ((filepos - self._chunk_size), 0)
self._fp.seek (<MASK>)
buf = self._fp.read ((fil... | destpos |
5,828 | [
"#NEWLINE#",
"def total_messages(",
"self",
",",
"realm",
",",
"days_ago",
")",
":",
"#NEWLINE#",
"#INDENT#",
"sent_time_cutoff",
"=",
"(",
"datetime",
".",
"datetime",
".",
"now",
"(",
"tz",
"=",
"pytz",
".",
"utc",
")",
"-",
"datetime",
".",
"timedelta",
... | true | 33 | [
"4",
"33",
"46",
"11",
"50",
"2",
"6"
] | 1 | VARIABLE_MISUSE | [
6
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 26,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 37,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "zulip/zulip/analytics/management/commands/realm_stats.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 total_messages(self, realm, days_ago) :
sent_time_cutoff = (datetime.datetime.now (tz = pytz.utc) - datetime.timedelta (days = <MASK>))
return Message.objects.filter (sender__realm = realm, pub_date__gt = sent_time_cutoff).count ()
Given the code above, what is a proper replacement for <MASK>? C... | days_ago |
5,829 | [
"#NEWLINE#",
"def test_userinfo_request(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"aresp",
"=",
"AuthorizationResponse",
"(",
"code",
"=",
"'code'",
",",
"state",
"=",
"'state000'",
")",
"#NEWLINE#",
"tresp",
"=",
"AccessTokenResponse",
"(",
"access_token",
"=",... | true | 133 | [
"92",
"126",
"94",
"119",
"133",
"7",
"55",
"2",
"47",
"70",
"99",
"90",
"112",
"20",
"78",
"96"
] | 1 | VARIABLE_MISUSE | [
96
] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 27,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 46,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "rohe/pyoidc/tests/test_oic.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_userinfo_request(self) :
aresp = AuthorizationResponse (code = 'code', state = 'state000')
tresp = AccessTokenResponse (access_token = 'access_token', token_type = 'Bearer', expires_in = 600, refresh_token = 'refresh', scope = ['openid'])
self.client.parse_response (AuthorizationResponse, aresp.... | h_args |
5,830 | [
"#NEWLINE#",
"def assertException(",
"self",
",",
"known_exception",
",",
"document",
",",
"schema",
"=",
"None",
",",
"validator",
"=",
"None",
",",
"msg",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"document",
"is",
"None",
")",
":",
"#NE... | true | 25 | [
"12",
"32",
"36",
"43",
"2",
"34",
"61",
"77",
"93",
"6",
"25",
"47",
"16",
"66",
"75",
"56",
"70",
"89",
"4",
"54",
"100",
"8",
"49"
] | 1 | VARIABLE_MISUSE | [
12,
32,
36,
43
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 26,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "MarSoft/PebbleNotes/gae/cerberus/tests/__init__.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 assertException(self, known_exception, document, schema = None, validator = None, msg = None) :
if (<MASK> is None) :
validator = self.validator
try :
validator.validate (document, schema)
except known_exception as e :
(self.assertTrue ((msg == str (e))) if msg else self.assertTrue... | validator |
5,831 | [
"#NEWLINE#",
"@",
"validator",
"#NEWLINE#",
"def length(",
"value",
",",
"min",
"=",
"None",
",",
"max",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"\\n Return whether or not the length of given string is within a specified\\n range.\\n\\n Examples::\\n\\n ... | true | 65 | [
"5",
"11",
"38",
"44",
"65",
"72",
"74",
"7",
"24",
"30",
"68",
"70"
] | 1 | VARIABLE_MISUSE | [
5
] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "SickRage/SickRage/lib/validators/length.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... | @ validator
def length(value, min = None, max = None) :
"
Return whether or not the length of given string is within a specified
range.
Examples::
>>> length('something', min=2)
True
>>> length('something', min=9, max=9)
True
>>> length('something', max=5)
... | value |
5,832 | [
"#NEWLINE#",
"def windows_init(",
"options",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Create an instance of WindowsSetup and catch version errors.\\n\\n Args:\\n options: All command line flags.\\n Returns:\\n WindowsSetup: The object needed for setting up Windows if successful, or\\n nothing... | true | 103 | [
"13",
"25",
"103",
"2",
"21",
"35",
"47",
"57",
"69",
"79",
"89",
"111",
"121"
] | 1 | VARIABLE_MISUSE | [
35,
47,
57,
69,
79,
89,
111,
121
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 124,
"after_index": 125,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "google/fplutil/bin/setup_all_prereqs.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 windows_init(options) :
'Create an instance of WindowsSetup and catch version errors.
Args:
options: All command line flags.
Returns:
WindowsSetup: The object needed for setting up Windows if successful, or
nothing if setup fails.
Raises:
VersionUnsupportedError: If the system version ... | e |
5,833 | [
"#NEWLINE#",
"def sigcheck(",
"a_key",
",",
"a_hash_for_sig",
",",
"a_sig",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Returns True if a_key was used to generate a_sig from a_hash_for_sig;\\n False otherwise.\\n '",
"#NEWLINE#",
"(",
"r",
",",
"s",
")",
"=",
"sigdecode_d... | true | 40 | [
"4",
"35",
"40",
"2",
"29",
"6",
"21",
"14",
"38",
"16"
] | 1 | VARIABLE_MISUSE | [
16
] | [
[
{
"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": "richardkiss/pycoin/tests/sighash_single_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 sigcheck(a_key, a_hash_for_sig, a_sig) :
'
Returns True if a_key was used to generate a_sig from a_hash_for_sig;
False otherwise.
'
(r, s) = sigdecode_der (a_sig)
return ecdsa_verify (generator_secp256k1, a_key.public_pair (), a_hash_for_sig, (r, <MASK>))
Given the code above, w... | s |
5,875 | [
"#NEWLINE#",
"def handle_blob(",
"self",
",",
"blob",
",",
"blob_info",
")",
":",
"#NEWLINE#",
"#INDENT#",
"blob_decryptor",
"=",
"StreamBlobDecryptor",
"(",
"blob_decryptor",
",",
"self",
".",
"key",
",",
"binascii",
".",
"unhexlify",
"(",
"blob_info",
".",
"iv... | true | 15 | [
"11",
"15",
"37",
"2",
"17",
"41",
"6",
"25",
"30",
"4",
"35",
"47"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"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": 34,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lbryio/lbry/lbrynet/cryptstream/client/CryptBlobHandler.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 handle_blob(self, blob, blob_info) :
blob_decryptor = StreamBlobDecryptor (<MASK>, self.key, binascii.unhexlify (blob_info.iv), blob_info.length)
d = blob_decryptor.decrypt (self.write_func)
return d
Given the code above, what is a proper replacement for <MASK>? Choose among: blob_decryptor... | blob |
5,876 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"ip",
",",
"serial",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n :param ip: IP address of the controller.\\n :param serial: Serial number written on the controller, also\\n \"Device NO\" on the web interface\\'s configuration page.\\... | true | 85 | [
"4",
"21",
"6",
"44",
"69",
"85",
"2",
"59",
"77",
"81",
"88",
"94"
] | 1 | VARIABLE_MISUSE | [
4,
21
] | [
[
{
"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": 39,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pawl/Chinese-RFID-Access-Control-Library/rfid.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, ip, serial) :
'
:param ip: IP address of the controller.
:param serial: Serial number written on the controller, also
"Device NO" on the web interface\'s configuration page.
'
try :
socket.inet_aton (ip)
except socket.error :
raise TypeErro... | ip |
5,877 | [
"#NEWLINE#",
"def find_message(",
"self",
",",
"room",
",",
"num_id",
")",
":",
"#NEWLINE#",
"#INDENT#",
"r",
"=",
"self",
".",
"db",
".",
"request",
"(",
"'POST'",
",",
"(",
"(",
"'/%s_room_%s_messages/_design/'",
"+",
"'highlight/_view/user_by_message/'",
")",
... | true | 50 | [
"52",
"60",
"6",
"65",
"2",
"13",
"29",
"50",
"11",
"42",
"47",
"54",
"71",
"79",
"4",
"33"
] | 1 | VARIABLE_MISUSE | [
52,
60
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 38,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sfstpala/Victory-Chat/modules/chat.py",
"license": "isc",
"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 find_message(self, room, num_id) :
r = self.db.request ('POST', (('/%s_room_%s_messages/_design/' + 'highlight/_view/user_by_message/') % (self.couchdb_prefix, room)))
if ('rows' in r) :
r = [<MASK> for i in r ['rows'] if (i ['key'] == num_id)]
return (r [0] ['value'] if r else None)
... | i |
5,878 | [
"#NEWLINE#",
"def _fixed_ips_changed(",
"self",
",",
"context",
",",
"orig",
",",
"port",
",",
"diff_ips",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"orig_ips",
",",
"port_ips",
")",
"=",
"diff_ips",
"#NEWLINE#",
"if",
"(",
"port",
"[",
"'device_owner'",
"]",
... | true | 142 | [
"6",
"66",
"169",
"4",
"39",
"50",
"97",
"100",
"121",
"124",
"37",
"48",
"58",
"78",
"105",
"186",
"195",
"159",
"177",
"190",
"2",
"198",
"204",
"81",
"173",
"182",
"129",
"161",
"213",
"16",
"102",
"18",
"126",
"10",
"21",
"142",
"8",
"25"... | 1 | VARIABLE_MISUSE | [
66,
169
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/neutron/neutron/plugins/ml2/drivers/l2pop/mech_driver.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 _fixed_ips_changed(self, context, orig, port, diff_ips) :
(orig_ips, port_ips) = diff_ips
if (port ['device_owner'] == const.DEVICE_OWNER_DVR_INTERFACE) :
agent_host = context.host
else :
agent_host = context.original_host
if (not agent_host) :
return
agent_ip = l2pop_db.get_... | agent_ip |
5,879 | [
"#NEWLINE#",
"def _update_port_up(",
"self",
",",
"context",
")",
":",
"#NEWLINE#",
"#INDENT#",
"port",
"=",
"context",
".",
"current",
"#NEWLINE#",
"agent_host",
"=",
"context",
".",
"host",
"#NEWLINE#",
"session",
"=",
"db_api",
".",
"get_session",
"(",
")",
... | true | 136 | [
"83",
"129",
"189",
"247",
"21",
"35",
"76",
"178",
"70",
"147",
"4",
"11",
"17",
"94",
"92",
"105",
"127",
"182",
"15",
"37",
"57",
"78",
"226",
"121",
"268",
"134",
"187",
"245",
"172",
"200",
"224",
"2",
"101",
"123",
"174",
"214",
"220",
... | 1 | VARIABLE_MISUSE | [
121,
268
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 18... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/neutron/neutron/plugins/ml2/drivers/l2pop/mech_driver.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_port_up(self, context) :
port = context.current
agent_host = context.host
session = db_api.get_session ()
agent = l2pop_db.get_agent_by_host (session, agent_host)
if (not agent) :
LOG.warning (_LW ('Unable to retrieve active L2 agent on host %s'), agent_host)
retur... | other_fdb_entries |
5,880 | [
"#NEWLINE#",
"def test_post_form_invalid_form(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"response",
"=",
"self",
".",
"client",
".",
"post",
"(",
"'/form/'",
",",
"{",
"#NEWLINE#",
"#INDENT#",
"'field-for-boolean'",
":",
"'foo'",
",",
"#NEWLINE#",
"'date-and-tim... | true | 38 | [
"7",
"49",
"66",
"2",
"9",
"34",
"38",
"45",
"62",
"79",
"90"
] | 1 | VARIABLE_MISUSE | [
7,
49,
66
] | [
[
{
"before_index": 6,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 33,
"after_index": 41,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 44,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "MarkusH/django-dynamic-forms/tests/test_views.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_post_form_invalid_form(self) :
response = self.client.post ('/form/', {
'field-for-boolean' : 'foo',
'date-and-time' : 'Hello world',
})
self.assertEqual (<MASK>.status_code, 200)
self.assertContains (response, '<li>This field is required.</li>', count = 1, html = True)
s... | response |
5,881 | [
"#NEWLINE#",
"def test_hive_step_with_all_fields(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"test_step_config",
"=",
"(",
"'Type=Hive,ActionOnFailure=CANCEL_AND_WAIT,Name=HiveBasicStep,'",
"+",
"HIVE_BASIC_ARGS",
")",
"#NEWLINE#",
"cmd",
"=",
"(",
"DEFAULT_CMD",
"+",
"(",
... | true | 23 | [
"23",
"36",
"51",
"15",
"60",
"27",
"45",
"62",
"7",
"2",
"56"
] | 1 | VARIABLE_MISUSE | [
7
] | [
[
{
"before_index": 6,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "aws/aws-cli/tests/unit/customizations/emr/test_create_cluster_ami_version.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_hive_step_with_all_fields(self) :
test_step_config = ('Type=Hive,ActionOnFailure=CANCEL_AND_WAIT,Name=HiveBasicStep,' + HIVE_BASIC_ARGS)
cmd = (DEFAULT_CMD + ('--applications Name=Hive --steps ' + <MASK>))
result = copy.deepcopy (DEFAULT_RESULT)
install_step = copy.deepcopy (INSTALL_HIVE_ST... | test_step_config |
5,882 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"iterable",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"end",
"=",
"end",
"=",
"[",
"]",
"#NEWLINE#",
"end",
"+=",
"[",
"None",
",",
"self",
",",
"end",
"]",
"#NEWLINE#",
"self",
".",
"map",
... | true | 25 | [
"13",
"15",
"20",
"27",
"4",
"43",
"52",
"2",
"11",
"25",
"30",
"50"
] | 1 | VARIABLE_MISUSE | [
13,
15,
20,
27
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "tomchristie/webdriverplus/webdriverplus/orderedset.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 __init__(self, iterable = None) :
self.end = end = []
end += [None, <MASK>, end]
self.map = {
}
if (iterable is not None) :
self |= iterable
Given the code above, what is a proper replacement for <MASK>? Choose among: end, iterable, self | end |
5,883 | [
"#NEWLINE#",
"def serialize_customized(",
"self",
",",
"cluster",
",",
"nodes",
")",
":",
"#NEWLINE#",
"#INDENT#",
"for",
"node",
"in",
"nodes",
":",
"#NEWLINE#",
"#INDENT#",
"data",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"#NEWLINE#",
"#UNINDENT#",
"}",
"#NEWLINE#",
... | true | 35 | [
"27",
"50",
"76",
"85",
"4",
"35",
"2",
"18",
"63",
"69",
"80",
"90",
"33",
"45",
"54",
"71",
"12",
"6",
"14"
] | 1 | VARIABLE_MISUSE | [
12
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/fuel-web/nailgun/nailgun/orchestrator/deployment_serializers.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 serialize_customized(self, cluster, nodes) :
for node in nodes :
data = {
}
roles = []
for role_data in <MASK>.replaced_deployment_info :
if ('role' in role_data) :
roles.append (role_data.pop ('role'))
data = utils.dict_merge (data, role_... | node |
5,884 | [
"#NEWLINE#",
"def load_value(",
"self",
",",
"session",
",",
"key",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'How to load the value from the given Redis ``key``.\\n Subclasses have to implement it. By default it raises\\n :exc:`~exceptions.NotImplementedError`.\\n\\n :param se... | true | 17 | [
"13",
"27",
"31",
"6",
"4",
"17",
"2"
] | 1 | VARIABLE_MISUSE | [
2
] | [
[
{
"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": "dahlia/sider/sider/types.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 load_value(self, session, key) :
'How to load the value from the given Redis ``key``.
Subclasses have to implement it. By default it raises
:exc:`~exceptions.NotImplementedError`.
:param session: the session object that stores the given ``key``
:type session: :class:`sider.ses... | self |
5,885 | [
"#NEWLINE#",
"def load_value(",
"self",
",",
"session",
",",
"key",
")",
":",
"#NEWLINE#",
"#INDENT#",
"bulk",
"=",
"session",
".",
"client",
".",
"get",
"(",
"key",
")",
"#NEWLINE#",
"return",
"self",
".",
"decode",
"(",
"session",
")"
] | true | 27 | [
"11",
"6",
"19",
"4",
"13",
"27",
"2",
"23"
] | 1 | VARIABLE_MISUSE | [
11
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dahlia/sider/sider/types.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 load_value(self, session, key) :
bulk = session.client.get (key)
return self.decode (<MASK>)
Given the code above, what is a proper replacement for <MASK>? Choose among: bulk, key, session, self | bulk |
5,886 | [
"#NEWLINE#",
"def addhooks(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"' Add hook script XML elements to the metadata tag.\\n '",
"#NEWLINE#",
"hooks",
"=",
"self",
".",
"createElement",
"(",
"'Hooks'",
")",
"#NEWLINE#",
"for",
"state",
"in",
"sorted",
"(",
"s... | true | 49 | [
"38",
"69",
"54",
"63",
"72",
"93",
"104",
"84",
"97",
"9",
"49",
"100",
"110",
"124",
"19",
"80",
"40",
"90",
"2",
"11",
"23",
"43",
"56",
"86",
"118"
] | 1 | VARIABLE_MISUSE | [
19,
80
] | [
[
{
"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": 18,
"after_index": 19... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "coreemu/core/daemon/core/misc/xmlwriter0.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 addhooks(self) :
' Add hook script XML elements to the metadata tag.
'
hooks = self.createElement ('Hooks')
for state in sorted (self.session._hooks.keys ()) :
for (filename, data) in self.session._hooks [<MASK>] :
hook = self.createElement ('Hook')
hook.set... | state |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.