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
0
[ "#NEWLINE#", "def __init__(", "self", ",", "key", ",", "value", ",", "flag", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Represents a base metric. This is not used directly,\\n and is instead invoked from sub-classes that are typed\\n by the metric.\\n\\n...
true
33
[ "2", "17", "23", "29", "33", "4", "19", "21", "6", "25", "27", "8", "31" ]
1
VARIABLE_MISUSE
[ 8, 31 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "kiip/statsite/statsite/metrics.py", "license": "bsd-3-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def __init__(self, key, value, flag = None) : ' Represents a base metric. This is not used directly, and is instead invoked from sub-classes that are typed by the metric. Each sub-class must implement a class method :meth:`fold()` which takes a list of objects of the same t...
Yes
1
[ "#NEWLINE#", "def test_get_params(", "self", ",", "layer", ")", ":", "#NEWLINE#", "#INDENT#", "assert", "(", "layer", ".", "get_params", "(", ")", "==", "[", "layer", ".", "W", ",", "layer", ".", "b", "]", ")", "#NEWLINE#", "assert", "(", "layer", ".", ...
true
76
[ "2", "76", "4", "11", "18", "22", "30", "40", "48", "58", "66", "80", "88", "103", "118", "128", "132" ]
1
VARIABLE_MISUSE
[ 4, 11, 18, 22, 30, 40, 48, 58, 66, 80, 88, 103, 118, 128, 132 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 28, "after_index": 38...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "Lasagne/Lasagne/lasagne/tests/layers/test_dense.py", "license": "mit", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_get_params(self, layer) : assert (layer.get_params () == [layer.W, layer.b]) assert (layer.get_params (regularizable = False) == [layer.b]) assert (layer.get_params (regularizable = True) == [layer.W]) assert (layer.get_params (trainable = True) == [self.W, layer.b]) assert (layer.get_...
Yes
2
[ "#NEWLINE#", "def add(", "self", ",", "ip", ",", "source", ",", "description", ",", "priority", "=", "1", ",", "reputation", "=", "1", ",", "latitude", "=", "0.0", ",", "longitude", "=", "0.0", ",", "city", "=", "''", ",", "country", "=", "''", ")", ...
true
130
[ "14", "130", "330", "71", "79", "199", "8", "320", "30", "113", "118", "122", "350", "4", "48", "62", "87", "294", "22", "166", "176", "180", "186", "193", "265", "274", "282", "340", "288", "310", "10", "325", "18", "140", "144", "150", "157",...
1
VARIABLE_MISUSE
[ 18, 140, 144, 150, 157, 240, 249, 257, 335 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 36, "after_index": 37, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 39, "after_index": 4...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "jpsenior/threataggregator/threataggregator.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def add(self, ip, source, description, priority = 1, reputation = 1, latitude = 0.0, longitude = 0.0, city = '', country = '') : ' :param string ip: IP is a dotted quad x.x.x.x or CIDR x.x.x.x/yy :param string source: Source for ThreatDB entry URL :param string description: Description of ...
Yes
3
[ "#NEWLINE#", "def buildcef(", "action", ",", "entry", ")", ":", "#NEWLINE#", "#INDENT#", "' Builds a CEF-formatted string based on reputation entry from RepDB\\n\\n :param string action: add remove or delete\\n :param entry: One RepDB entry to parse\\n :return: Returns a CEF-formatted st...
true
27
[ "39", "133", "25", "117", "4", "13", "20", "34", "41", "48", "55", "62", "69", "11", "119", "67", "129", "27", "32", "131", "60", "127", "2", "113", "115", "18", "121", "53", "125", "74", "99", "46", "123" ]
1
VARIABLE_MISUSE
[ 4, 13, 20, 34, 41, 48, 55, 62, 69 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 14,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "jpsenior/threataggregator/threataggregator.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def buildcef(action, entry) : ' Builds a CEF-formatted string based on reputation entry from RepDB :param string action: add remove or delete :param entry: One RepDB entry to parse :return: Returns a CEF-formatted string with timestamp ' ip = entry ['ip'] source = entry ['source'] ...
Yes
4
[ "#NEWLINE#", "@", "skipif", "(", "ON_TRAVIS_CI", ",", "reason", "=", "\"Don't know\"", ")", "#NEWLINE#", "def test_temp_ssh_files(", ")", ":", "#NEWLINE#", "#INDENT#", "with", "filetext", "(", "'name,balance\\nAlice,100\\nBob,200'", ",", "extension", "=", "'csv'", ")"...
true
65
[ "37", "72", "30", "49", "60", "65", "26", "34" ]
1
VARIABLE_MISUSE
[ 37, 72 ]
[ [ { "before_index": 5, "after_index": 2, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 25, "after_index": 20, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 25, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "blaze/odo/odo/backends/tests/test_ssh.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
@ skipif (ON_TRAVIS_CI, reason = "Don't know") def test_temp_ssh_files() : with filetext ('name,balance Alice,100 Bob,200', extension = 'csv') as fn : csv = CSV (fn) scsv = into (Temp (SSH (CSV)), csv, hostname = 'localhost') assert (discover (csv) == discover (csv)) assert isi...
Yes
5
[ "#NEWLINE#", "def test03_setitem(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "'Changing enumerated values using ``table.__setitem__()``.'", "#NEWLINE#", "tbl", "=", "self", ".", "h5file", ".", "create_table", "(", "'/'", ",", "'test'", ",", "self", ".", "_description"...
true
88
[ "2", "11", "21", "29", "42", "50", "69", "77", "119", "63", "112", "123", "9", "56", "83", "90", "98", "36", "60", "88", "96", "100", "114", "125" ]
1
VARIABLE_MISUSE
[ 63, 112, 123 ]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 18, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 35, "after_index": 38...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "PyTables/PyTables/tables/tests/test_enum.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test03_setitem(self) : 'Changing enumerated values using ``table.__setitem__()``.' tbl = self.h5file.create_table ('/', 'test', self._description (), title = self._getMethodName ()) appended = [(10, self.valueInEnum), (20, self.valueInEnum)] tbl.append (appended) written = [(10, self.valueI...
Yes
6
[ "#NEWLINE#", "def __init__(", "self", ",", "primary_key", "=", "None", ",", "secondary_key", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "primary_key", "=", "self", "#NEWLINE#", "self", ".", "secondary_key", "=", "secondary_key" ]
true
19
[ "2", "15", "19", "21", "4", "17", "8", "23", "25" ]
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": "Azure/azure-sdk-for-python/azure-mgmt-redis/azure/mgmt/redis/models/redis_access_keys.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def __init__(self, primary_key = None, secondary_key = None) : self.primary_key = self self.secondary_key = secondary_key Is there a bug in the code above?
Yes
7
[ "#NEWLINE#", "def test_defer_link_acquisition_blocking(", ")", ":", "#NEWLINE#", "#INDENT#", "class root", "(", "morepath", ".", "App", ")", ":", "#NEWLINE#", "#INDENT#", "pass", "#NEWLINE#", "#UNINDENT#", "class sub", "(", "morepath", ".", "App", ")", ":", "#NEWLIN...
true
194
[ "183", "174", "185", "194" ]
1
VARIABLE_MISUSE
[ 183 ]
[ [ { "before_index": 63, "after_index": 75, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 105, "after_index": 117, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 173, "after_inde...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "morepath/morepath/morepath/tests/test_defer_links.py", "license": "bsd-3-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_defer_link_acquisition_blocking() : class root (morepath.App) : pass class sub (morepath.App) : pass @ root.path (path = 'model/{id}') class Model (object) : def __init__(self, id) : self.id = id @ root.view (model = Model) def model_default(self, reque...
Yes
8
[ "#NEWLINE#", "def remove_artifact(", "self", ",", "artifact_name", ")", ":", "#NEWLINE#", "#INDENT#", "'Removes an artifact from the build state.'", "#NEWLINE#", "con", "=", "self", ".", "connect_to_database", "(", ")", "#NEWLINE#", "try", ":", "#NEWLINE#", "#INDENT#", ...
true
38
[ "2", "13", "4", "23", "31", "11", "25", "38", "42", "53" ]
1
VARIABLE_MISUSE
[ 4 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 16,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "lektor/lektor/lektor/builder.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def remove_artifact(self, artifact_name) : 'Removes an artifact from the build state.' con = self.connect_to_database () try : cur = con.cursor () cur.execute (' delete from artifacts where artifact = ? ', [con]) con.commit () finally : con...
Yes
9
[ "#NEWLINE#", "def check_artifact_is_current(", "self", ",", "artifact_name", ",", "sources", ",", "config_hash", ")", ":", "#NEWLINE#", "#INDENT#", "con", "=", "self", ".", "connect_to_database", "(", ")", "#NEWLINE#", "cur", "=", "con", ".", "cursor", "(", ")",...
true
60
[ "6", "84", "112", "130", "73", "91", "105", "118", "126", "148", "156", "4", "43", "60", "82", "71", "2", "15", "37", "54", "76", "114", "152", "21", "41", "58", "80", "13", "23", "179", "8", "35" ]
1
VARIABLE_MISUSE
[ 6, 84 ]
[ [ { "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": 20, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "lektor/lektor/lektor/builder.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def check_artifact_is_current(self, artifact_name, sources, config_hash) : con = self.connect_to_database () cur = con.cursor () try : if (config_hash != self._get_artifact_config_hash (cur, artifact_name)) : return False if self._any_sources_are_dirty (cur, artifact_name) : ...
Yes
10
[ "#NEWLINE#", "@", "contextmanager", "#NEWLINE#", "def update(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "'Opens the artifact for modifications. At the start the dirty\\n flag is cleared out and if the commit goes through without errors it\\n stays cleared. The setting of the d...
true
26
[ "5", "14", "42", "56", "26", "34", "38", "48", "12", "46", "60" ]
1
VARIABLE_MISUSE
[ 12, 46, 60 ]
[ [ { "before_index": 9, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "lektor/lektor/lektor/builder.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
@ contextmanager def update(self) : 'Opens the artifact for modifications. At the start the dirty flag is cleared out and if the commit goes through without errors it stays cleared. The setting of the dirty flag has to be done by the caller however based on the `exc_info` on the context....
Yes
11
[ "#NEWLINE#", "def key_str(", "self", ",", "match", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Return the specified public key or keys based on a glob\\n '", "#NEWLINE#", "ret", "=", "{", "#NEWLINE#", "#INDENT#", "#NEWLINE#", "#UNINDENT#", "}", "#NEWLINE#", "for", ...
true
72
[ "2", "31", "75", "4", "35", "54", "79", "11", "41", "67", "87", "22", "43", "69", "81", "24", "62", "72" ]
1
VARIABLE_MISUSE
[ 54, 79 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 13,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "saltstack/salt/salt/key.py", "license": "apache-2.0", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def key_str(self, match) : ' Return the specified public key or keys based on a glob ' ret = { } for (status, keys) in six.iteritems (self.name_match (match)) : ret [status] = { } for key in salt.utils.isorted (keys) : ret [status] [k...
Yes
12
[ "#NEWLINE#", "def __getattr__(", "self", ",", "attr", ")", ":", "#NEWLINE#", "#INDENT#", "value", "=", "self", ".", "_d", ".", "setdefault", "(", "attr", ",", "0", ")", "#NEWLINE#", "self", ".", "_d", "[", "attr", "]", "=", "(", "self", "+", "1", ")"...
true
30
[ "2", "11", "22", "30", "9", "38", "4", "17", "26" ]
1
VARIABLE_MISUSE
[ 9, 38 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 18, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 21, "after_index": 31...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "azoft-dev-team/imagrium/env/Lib/test/test_evalorder.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def __getattr__(self, attr) : value = self._d.setdefault (attr, 0) self._d [attr] = (self + 1) return Bucket (value) Is there a bug in the code above?
Yes
13
[ "#NEWLINE#", "def test_get_url_shortener(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "us_settings", ".", "URL_SHORTENER_BACKEND", "=", "'mymodule.myclass'", "#NEWLINE#", "with", "warnings", ".", "catch_warnings", "(", "record", "=", "True", ")", "as", "w", ":", "#...
true
46
[ "23", "66", "97", "120", "140", "2", "27", "40", "46", "60", "101", "114", "134", "161" ]
1
VARIABLE_MISUSE
[ 23, 66, 97, 120, 140 ]
[ [ { "before_index": 6, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 80, "after_index": 85, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 154, "after_index":...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "Fantomas42/django-blog-zinnia/zinnia/tests/test_url_shortener.py", "license": "bsd-3-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_get_url_shortener(self) : us_settings.URL_SHORTENER_BACKEND = 'mymodule.myclass' with warnings.catch_warnings (record = True) as w : self.assertEqual (get_url_shortener (), default.backend) self.assertTrue (issubclass (self [(- 1)].category, RuntimeWarning)) self.assertEqua...
Yes
14
[ "#NEWLINE#", "def patch_vary_headers(", "response", ",", "newheaders", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Adds (or updates) the \"Vary\" header in the given HttpResponse object.\\n newheaders is a list of header names that should be in \"Vary\". Existing\\n headers in \"Vary\" aren\...
true
57
[ "49", "55", "21", "38", "91", "2", "12", "27", "81", "64", "66", "71", "61", "93", "44", "57", "77", "4", "68" ]
1
VARIABLE_MISUSE
[ 21, 38, 91 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 15,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "adieu/django-nonrel/django/utils/cache.py", "license": "bsd-3-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def patch_vary_headers(response, newheaders) : ' Adds (or updates) the "Vary" header in the given HttpResponse object. newheaders is a list of header names that should be in "Vary". Existing headers in "Vary" aren\'t removed. ' if response.has_header ('Vary') : vary_headers = cc_delim...
Yes
15
[ "#NEWLINE#", "def get_permission(", "self", ",", "key", "=", "None", ",", "category", "=", "None", ",", "obj", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "\"\\n Get a permission from the database.\\n\\n Args:\\n key (str, optional): The permission'...
true
32
[ "2", "22", "12", "34", "36", "8", "30", "4", "26", "28", "32" ]
1
VARIABLE_MISUSE
[ 8, 30 ]
[ [ { "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": 21, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "evennia/evennia/evennia/typeclasses/managers.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def get_permission(self, key = None, category = None, obj = None) : " Get a permission from the database. Args: key (str, optional): The permission's identifier. category (str, optional): The permission's category. obj (object, optional): The object on which thi...
Yes
16
[ "#NEWLINE#", "def _upsample(", "self", ",", "method", ",", "limit", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "\"\\n method : string {'backfill', 'bfill', 'pad', 'ffill'}\\n method for upsampling\\n limit : int, default None\\n Maximum size gap to ...
true
46
[ "4", "36", "46", "117", "119", "6", "38", "40", "121", "123", "56", "68", "87", "115", "137", "92", "111", "44", "48", "94", "109", "135", "2", "17", "31", "52", "58", "77", "81", "98", "104", "127", "141", "50", "54", "133" ]
1
VARIABLE_MISUSE
[ 2, 17, 31, 52, 58, 77, 81, 98, 104, 127, 141 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 13, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "pydata/pandas/pandas/tseries/resample.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def _upsample(self, method, limit = None) : " method : string {'backfill', 'bfill', 'pad', 'ffill'} method for upsampling limit : int, default None Maximum size gap to fill when reindexing See also -------- .fillna " if (self.kind == 't...
Yes
17
[ "#NEWLINE#", "def _real_extract(", "self", ",", "url", ")", ":", "#NEWLINE#", "#INDENT#", "mobj", "=", "re", ".", "match", "(", "self", ".", "_VALID_URL", ",", "url", ")", "#NEWLINE#", "video_id", "=", "mobj", ".", "group", "(", "'id'", ")", "#NEWLINE#", ...
true
47
[ "144", "163", "168", "9", "24", "47", "68", "87", "92", "100", "317", "157", "327", "22", "36", "302", "50", "307", "31", "45", "186", "198", "213", "228", "244", "260", "273", "283", "39", "54", "72", "106", "123", "130", "322", "121", "134", ...
1
VARIABLE_MISUSE
[ 22, 36, 302 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 18, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 21, "after_index": 27...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "yasoob/youtube-dl-GUI/youtube_dl/extractor/videolecturesnet.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def _real_extract(self, url) : mobj = re.match (self._VALID_URL, url) video_id = mobj.group ('id') smil_url = ('http://videolectures.net/%s/video/1/smil.xml' % video_id) smil = self._download_xml (smil_url, description_el) title = find_xpath_attr (smil, './/meta', 'name', 'title').attrib ['cont...
Yes
18
[ "#NEWLINE#", "def __call__(", "self", ",", "request", ",", "*", "args", ",", "**kwargs", ")", ":", "#NEWLINE#", "#INDENT#", "view", "=", "copy", ".", "copy", "(", "self", ")", "#NEWLINE#", "view", ".", "request", "=", "request", "#NEWLINE#", "view", ".", ...
true
37
[ "4", "25", "27", "7", "34", "57", "64", "73", "88", "2", "20", "67", "69", "79", "60", "14", "23", "29", "42", "71", "77", "37", "40", "49", "54" ]
1
VARIABLE_MISUSE
[ 60 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 3, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 19,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "ofri/Open-Knesset/hashnav/base.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def __call__(self, request, * args, **kwargs) : view = copy.copy (self) view.request = request view.parse_params (* args, ** callback) callback = view.get_callback () if callback : return callback (* args, ** kwargs) allowed_methods = [m for m in view.allowed_methods if hasattr (view,...
Yes
19
[ "#NEWLINE#", "@", "reflection", ".", "cache", "#NEWLINE#", "@", "_db_plus_owner", "#NEWLINE#", "def get_pk_constraint(", "self", ",", "connection", ",", "tablename", ",", "dbname", ",", "owner", ",", "schema", ",", "**kw", ")", ":", "#NEWLINE#", "#INDENT#", "pke...
true
124
[ "20", "38", "56", "68", "86", "100", "108", "118", "124", "190", "14", "114", "27", "167", "208", "10", "58", "64", "70", "82", "88", "96", "102", "110", "120", "129", "145", "157", "192", "16", "18", "12", "131", "49", "135", "72", "84", "90...
1
VARIABLE_MISUSE
[ 18 ]
[ [ { "before_index": 1, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 26, "after_index": 29, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 31, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/dialects/mssql/base.py", "license": "mit", "note": "license: github_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
@ reflection.cache @ _db_plus_owner def get_pk_constraint(self, connection, tablename, dbname, owner, schema, **kw) : pkeys = [] TC = ischema.constraints C = ischema.key_constraints.alias ('C') s = sql.select ([C.c.column_name, TC.c.constraint_type, C.c.constraint_name], sql.and_ ((TC.c.constraint...
Yes
20
[ "#NEWLINE#", "def buildChildren(", "self", ",", "child_", ",", "node", ",", "nodeName_", ",", "fromsubclass_", "=", "False", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "nodeName_", "==", "'Authentication_Type'", ")", ":", "#NEWLINE#", "#INDENT#", "obj_", "=",...
false
0
[ "8", "19", "57", "95", "133", "nodeName_", "6", "node", "4", "40", "78", "116", "152", "child_", "2", "43", "81", "119", "155", "self", "26", "36", "47", "64", "74", "85", "102", "112", "123", "140", "148", "159", "obj_", "10", "fromsubclass_" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 20, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 20, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "CybOXProject/python-cybox/cybox/bindings/account_object.py", "license": "bsd-3-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def buildChildren(self, child_, node, nodeName_, fromsubclass_ = False) : if (nodeName_ == 'Authentication_Type') : obj_ = cybox_common.ControlledVocabularyStringType.factory () obj_.build (child_) self.set_Authentication_Type (obj_) else : if (nodeName_ == 'Authentication_Data...
No
21
[ "#NEWLINE#", "def _compose_url(", "self", ",", "path", ")", ":", "#NEWLINE#", "#INDENT#", "return", "'{0}/{1}'", ".", "format", "(", "self", ".", "base_url", ",", "path", ")" ]
false
0
[ "2", "14", "self", "4", "18", "path" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 11...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "adafruit/io-client-python/Adafruit_IO/client.py", "license": "mit", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def _compose_url(self, path) : return '{0}/{1}'.format (self.base_url, path) Is there a bug in the code above?
No
22
[ "#NEWLINE#", "def lookup(", "self", ",", "uri", "=", "None", ",", "uris", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Lookup the given URIs.\\n\\n If the URI expands to multiple tracks, the returned list will contain\\n them all.\\n\\n :param uri: ...
false
0
[ "239", "241", "245", "r", "133", "161", "167", "181", "200", "backend", "118", "233", "259", "266", "results", "23", "28", "o", "186", "207", "future", "8", "33", "52", "61", "102", "128", "142", "uris", "121", "126", "152", "163", "173", "183", ...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "mopidy/mopidy/mopidy/core/library.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def lookup(self, uri = None, uris = None) : ' Lookup the given URIs. If the URI expands to multiple tracks, the returned list will contain them all. :param uri: track URI :type uri: string or :class:`None` :param uris: track URIs :type uris: list of string ...
No
23
[ "#NEWLINE#", "def get_laboratories(", "self", ",", "**kwargs", ")", ":", "#NEWLINE#", "#INDENT#", "labs", "=", "HTTP_PLUGIN", ".", "rlms_cache", ".", "get", "(", "'labs'", ")", "#NEWLINE#", "if", "(", "labs", "is not", "None", ")", ":", "#NEWLINE#", "#INDENT#"...
false
0
[ "45", "94", "109", "112", "laboratories", "kwargs", "57", "98", "laboratory", "9", "22", "30", "33", "53", "labs", "51", "63", "70", "77", "86", "lab", "2", "35", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 20, "after_index": 23...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "gateway4labs/labmanager/labmanager/rlms/ext/rest.py", "license": "bsd-2-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def get_laboratories(self, **kwargs) : labs = HTTP_PLUGIN.rlms_cache.get ('labs') if (labs is not None) : return labs labs = self._request ('/labs') ['labs'] laboratories = [] for lab in labs : laboratory = Laboratory (name = lab ['name'], laboratory_id = lab ['laboratory_id'], de...
No
24
[ "#NEWLINE#", "def test_PKStateSelect(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "f", "=", "PKStateSelect", "(", ")", "#NEWLINE#", "out", "=", "'<select name=\"state\">\\n<option value=\"PK-JK\">Azad Jammu &amp; Kashmir</option>\\n<option value=\"PK-BA\" selected=\"selected\">Balochi...
false
0
[ "7", "21", "f", "2", "17", "self", "13", "30", "out" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "django/django-localflavor/tests/test_pk/tests.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_PKStateSelect(self) : f = PKStateSelect () out = '<select name="state"> <option value="PK-JK">Azad Jammu &amp; Kashmir</option> <option value="PK-BA" selected="selected">Balochistan</option> <option value="PK-TA">Federally Administered Tribal Areas</option> <option value="PK-GB">Gilgit-Baltistan</opt...
No
25
[ "#NEWLINE#", "def test_both(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "json", "=", "'[{\"FromPort\":8000,\"ToPort\":9000,\"IpProtocol\":\"tcp\",\"IpRanges\":[{\"CidrIp\":\"192.168.100.0/24\"}]}]'", "#NEWLINE#", "args", "=", "(", "self", ".", "prefix", "+", "(", "'--group-na...
false
0
[ "2", "14", "25", "self", "7", "21", "json", "11", "29", "args" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 24, "after_index": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "aws/aws-cli/tests/functional/ec2/test_security_group_operations.py", "license": "apache-2.0", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_both(self) : json = '[{"FromPort":8000,"ToPort":9000,"IpProtocol":"tcp","IpRanges":[{"CidrIp":"192.168.100.0/24"}]}]' args = (self.prefix + ('--group-name foobar --port 100 --ip-permissions %s' % json)) self.assert_params_for_cmd (args, expected_rc = 255) Is there a bug in the code above?
No
26
[ "#NEWLINE#", "def ticket_cc(", "request", ",", "ticket_id", ")", ":", "#NEWLINE#", "#INDENT#", "ticket", "=", "get_object_or_404", "(", "Ticket", ",", "id", "=", "ticket_id", ")", "#NEWLINE#", "if", "(", "not", "_has_access_to_queue", "(", "request", ".", "user"...
false
0
[ "4", "17", "ticket_id", "43", "67", "copies_to", "2", "25", "60", "request", "9", "29", "45", "72", "ticket" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 20, "after_index": 22...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "rossp/django-helpdesk/helpdesk/views/staff.py", "license": "bsd-3-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def ticket_cc(request, ticket_id) : ticket = get_object_or_404 (Ticket, id = ticket_id) if (not _has_access_to_queue (request.user, ticket.queue)) : raise PermissionDenied () copies_to = ticket.ticketcc_set.all () return render_to_response ('helpdesk/ticket_cc_list.html', RequestContext (reques...
No
27
[ "#NEWLINE#", "def error_if_missing_info(", "oo_cfg", ")", ":", "#NEWLINE#", "#INDENT#", "missing_info", "=", "False", "#NEWLINE#", "if", "(", "not", "oo_cfg", ".", "hosts", ")", ":", "#NEWLINE#", "#INDENT#", "missing_info", "=", "True", "#NEWLINE#", "click", ".", ...
false
0
[ "251", "265", "273", "host", "126", "148", "variant", "128", "140", "154", "215", "version", "2", "14", "32", "50", "75", "108", "117", "133", "164", "208", "221", "oo_cfg", "219", "231", "253", "271", "missing_facts", "162", "176", "182", "196", "er...
0
NONE
[]
[ [ { "before_index": 6, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 13, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 46, "after_index": 4...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openshift/openshift-ansible/utils/src/ooinstall/cli_installer.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def error_if_missing_info(oo_cfg) : missing_info = False if (not oo_cfg.hosts) : missing_info = True click.echo (('For unattended installs, hosts must be specified on the command line or in the config file: %s' % oo_cfg.config_path)) sys.exit (1) if ('ansible_ssh_user' not in oo_cf...
No
28
[ "#NEWLINE#", "def cleanup(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "cursor", "=", "self", ".", "connection_for_write", "(", ")", ".", "cursor", "(", ")", "#NEWLINE#", "try", ":", "#NEWLINE#", "#INDENT#", "cursor", ".", "execute", "(", "(", "'DELETE FROM %...
false
0
[ "2", "9", "31", "self", "7", "15", "23", "cursor" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "ask/django-kombu/djkombu/managers.py", "license": "bsd-3-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def cleanup(self) : cursor = self.connection_for_write ().cursor () try : cursor.execute (('DELETE FROM %s WHERE visible=%%s' % (self.model._meta.db_table,)), (False,)) except : transaction.rollback_unless_managed () else : transaction.commit_unless_managed () Is there a bug in ...
No
29
[ "#NEWLINE#", "def test_convert_to_pandas_series(", ")", ":", "#NEWLINE#", "#INDENT#", "x", "=", "pd", ".", "DataFrame", "(", "np", ".", "arange", "(", "50", ")", ".", "reshape", "(", "10", ",", "5", ")", ",", "columns", "=", "list", "(", "'abcde'", ")", ...
false
0
[ "34", "57", "d", "6", "42", "68", "x", "49", "59", "66", "70", "a" ]
0
NONE
[]
[ [ { "before_index": 5, "after_index": 25, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 33, "after_index": 41, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 48, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "blaze/odo/odo/backends/tests/test_dask_dataframe.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_convert_to_pandas_series() : x = pd.DataFrame (np.arange (50).reshape (10, 5), columns = list ('abcde')) d = convert (dd.DataFrame, x, npartitions = 2) a = convert (pd.Series, d.a) tm.assert_series_equal (a, x.a) Is there a bug in the code above?
No
30
[ "#NEWLINE#", "def using_bzr(", "cwd", ")", ":", "#NEWLINE#", "#INDENT#", "'Test whether the directory cwd is contained in a bazaar repository.'", "#NEWLINE#", "try", ":", "#NEWLINE#", "#INDENT#", "bzr_log", "=", "shell_out", "(", "[", "'bzr'", ",", "'log'", "]", ",", "c...
false
0
[ "2", "23", "25", "cwd", "13", "bzr_log" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 22, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 28, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "hayd/pep8radius/pep8radius/vcs.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def using_bzr(cwd) : 'Test whether the directory cwd is contained in a bazaar repository.' try : bzr_log = shell_out (['bzr', 'log'], cwd = cwd) return True except (CalledProcessError, OSError) : return False Is there a bug in the code above?
No
31
[ "#NEWLINE#", "def test_without_approximation(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "geo_elevation_data", "=", "mod_srtm", ".", "get_data", "(", ")", "#NEWLINE#", "self", ".", "assertEqual", "(", "geo_elevation_data", ".", "get_elevation", "(", "47.1", ",", "...
false
0
[ "2", "15", "53", "self", "42", "60", "63", "elevation", "7", "19", "32", "44", "geo_elevation_data" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 31, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 41, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "tkrajina/srtm.py/test.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_without_approximation(self) : geo_elevation_data = mod_srtm.get_data () self.assertEqual (geo_elevation_data.get_elevation (47.1, 13.1, approximate = False), geo_elevation_data.get_elevation (47.1, 13.1)) elevation = geo_elevation_data.get_elevation (47.1, 13.1) self.assertTrue ((int (eleva...
No
32
[ "#NEWLINE#", "@", "staticmethod", "#NEWLINE#", "def _make_model_var(", "value", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Pick an alphabetic character as identifier for an entity in the model.\\n\\n :param value: where to index into the list of characters\\n :type value: int\...
false
0
[ "5", "68", "74", "value", "12", "82", "96", "letter", "71", "86", "91", "num" ]
0
NONE
[]
[ [ { "before_index": 9, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 67, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 70, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "nltk/nltk/nltk/inference/mace.py", "license": "apache-2.0", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
@ staticmethod def _make_model_var(value) : ' Pick an alphabetic character as identifier for an entity in the model. :param value: where to index into the list of characters :type value: int ' letter = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o'...
No
33
[ "#NEWLINE#", "def __init__(", "self", ",", "*", "args", ")", ":", "#NEWLINE#", "#INDENT#", "TServer", ".", "__init__", "(", "self", ",", "*", "args", ")", "#NEWLINE#", "self", ".", "closed", "=", "False" ]
false
0
[ "2", "14", "20", "self", "5", "17", "args" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 3, "after_index": 5, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 15, ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "eleme/thriftpy/thriftpy/server.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def __init__(self, * args) : TServer.__init__ (self, * args) self.closed = False Is there a bug in the code above?
No
34
[ "#NEWLINE#", "def fix_missing_locations(", "node", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n When you compile a node tree with compile(), the compiler expects lineno and\\n col_offset attributes for every node that supports them. This is rather\\n tedious to fill in for generated nodes, so th...
false
0
[ "2", "10", "23", "35", "43", "56", "66", "78", "86", "99", "110", "128", "136", "node", "115", "126", "_fix" ]
0
NONE
[]
[ [ { "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": 125, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "eBay/restcommander/play-1.2.4/python/Lib/ast.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def fix_missing_locations(node) : ' When you compile a node tree with compile(), the compiler expects lineno and col_offset attributes for every node that supports them. This is rather tedious to fill in for generated nodes, so this helper adds these attributes recursively where not already set, b...
No
35
[ "#NEWLINE#", "def __init__(", "self", ",", "network_id", ",", "vlan_id", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "network_id", "=", "network_id", "#NEWLINE#", "self", ".", "vlan_id", "=", "vlan_id" ]
false
0
[ "2", "11", "17", "self", "6", "19", "21", "vlan_id", "4", "13", "15", "network_id" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack/neutron/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_tunnel.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def __init__(self, network_id, vlan_id) : self.network_id = network_id self.vlan_id = vlan_id Is there a bug in the code above?
No
36
[ "#NEWLINE#", "def _define_expected_calls(", "self", ",", "arp_responder", "=", "False", ")", ":", "#NEWLINE#", "#INDENT#", "super", "(", "TunnelTestWithMTU", ",", "self", ")", ".", "_define_expected_calls", "(", "arp_responder", ")", "#NEWLINE#", "self", ".", "inta_...
false
0
[ "4", "20", "arp_responder", "2", "15", "23", "37", "43", "57", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 19, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack/neutron/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_tunnel.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def _define_expected_calls(self, arp_responder = False) : super (TunnelTestWithMTU, self)._define_expected_calls (arp_responder) self.inta_expected.append (mock.call.link.set_mtu (self.VETH_MTU)) self.intb_expected.append (mock.call.link.set_mtu (self.VETH_MTU)) Is there a bug in the code above?
No
37
[ "#NEWLINE#", "def __truediv__(", "self", ",", "scalar", ")", ":", "#NEWLINE#", "#INDENT#", "return", "Coordinate", "(", "[", "(", "self", ".", "x", "/", "float", "(", "scalar", ")", ")", ",", "(", "self", ".", "y", "/", "float", "(", "scalar", ")", "...
false
0
[ "2", "14", "25", "36", "46", "self", "4", "20", "31", "42", "scalar" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 10...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "neuropoly/spinalcordtoolbox/scripts/msct_types.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def __truediv__(self, scalar) : return Coordinate ([(self.x / float (scalar)), (self.y / float (scalar)), (self.z / float (scalar)), self.value]) Is there a bug in the code above?
No
38
[ "#NEWLINE#", "def test_trigger_types_are_registered_on_start(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "timer", "=", "St2Timer", "(", ")", "#NEWLINE#", "timer", ".", "_scheduler", "=", "mock", ".", "Mock", "(", ")", "#NEWLINE#", "self", ".", "assertItemsEqual", ...
false
0
[ "2", "23", "51", "100", "self", "43", "57", "77", "trigger_type_dbs", "66", "107", "timer_trigger_type_refs", "7", "13", "37", "timer", "75", "87", "93", "trigger_type", "81", "98", "105", "ref" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 20, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "StackStorm/st2/st2reactor/tests/unit/test_timer.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_trigger_types_are_registered_on_start(self) : timer = St2Timer () timer._scheduler = mock.Mock () self.assertItemsEqual (TriggerType.get_all (), []) timer.start () trigger_type_dbs = TriggerType.get_all () self.assertEqual (len (trigger_type_dbs), len (TIMER_TRIGGER_TYPES)) t...
No
39
[ "#NEWLINE#", "def factory(", "*", "args_", ",", "**kwargs_", ")", ":", "#NEWLINE#", "#INDENT#", "if", "EmailRecipientsType", ".", "subclass", ":", "#NEWLINE#", "#INDENT#", "return", "EmailRecipientsType", ".", "subclass", "(", "*", "args_", ",", "**", "kwargs_", ...
false
0
[ "3", "23", "38", "args_", "26", "41", "kwargs_" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 2, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 2, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 12,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "CybOXProject/python-cybox/cybox/bindings/email_message_object.py", "license": "bsd-3-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def factory(* args_, **kwargs_) : if EmailRecipientsType.subclass : return EmailRecipientsType.subclass (* args_, ** kwargs_) else : return EmailRecipientsType (* args_, ** kwargs_) Is there a bug in the code above?
No
40
[ "#NEWLINE#", "def test_callable_default(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "'A lazy callable may be used for ForeignKey.default.'", "#NEWLINE#", "a", "=", "Foo", ".", "objects", ".", "create", "(", "id", "=", "1", ",", "a", "=", "'abc'", ",", "d", "=", ...
false
0
[ "2", "46", "self", "33", "41", "50", "b", "9", "21", "52", "54", "a" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 20, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 32, "after_index": 40...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "django/django/tests/model_fields/test_foreignkey.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_callable_default(self) : 'A lazy callable may be used for ForeignKey.default.' a = Foo.objects.create (id = 1, a = 'abc', d = Decimal ('12.34')) b = Bar.objects.create (b = 'bcd') self.assertEqual (b.a, a) Is there a bug in the code above?
No
41
[ "#NEWLINE#", "def load_suite(", ")", ":", "#NEWLINE#", "#INDENT#", "test_suite", "=", "unittest", ".", "TestSuite", "(", ")", "#NEWLINE#", "cases", "=", "[", "EnvTests", ",", "FileEnvTests", ",", "SubClassTests", ",", "SchemaEnvTests", ",", "PathTests", ",", "Da...
false
0
[ "37", "51", "case", "14", "39", "cases", "6", "43", "57", "test_suite" ]
0
NONE
[]
[ [ { "before_index": 5, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 36, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "joke2k/django-environ/environ/test.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def load_suite() : test_suite = unittest.TestSuite () cases = [EnvTests, FileEnvTests, SubClassTests, SchemaEnvTests, PathTests, DatabaseTestSuite, CacheTestSuite, EmailTests, SearchTestSuite] for case in cases : test_suite.addTest (unittest.makeSuite (case)) return test_suite Is there a bug ...
No
42
[ "#NEWLINE#", "def flatten_list(", "self", ",", "initial_list", ")", ":", "#NEWLINE#", "#INDENT#", "if", "isinstance", "(", "initial_list", ",", "list", ")", ":", "#NEWLINE#", "#INDENT#", "return", "[", "flattened", "for", "entry", "in", "initial_list", "for", "f...
false
0
[ "23", "33", "entry", "2", "29", "self", "4", "12", "25", "44", "initial_list", "21", "27", "flattened" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 13, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 10...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "skuroda/Sublime-AdvancedNewFile/advanced_new_file/commands/new_file_command.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def flatten_list(self, initial_list) : if isinstance (initial_list, list) : return [flattened for entry in initial_list for flattened in self.flatten_list (entry)] else : return [initial_list] Is there a bug in the code above?
No
43
[ "#NEWLINE#", "def fill_dhcp_udp_checksums(", "self", ",", "namespace", ")", ":", "#NEWLINE#", "#INDENT#", "'Ensure DHCP reply packets always have correct UDP checksums.'", "#NEWLINE#", "iptables_mgr", "=", "iptables_manager", ".", "IptablesManager", "(", "use_ipv6", "=", "False...
false
0
[ "11", "36", "50", "iptables_mgr", "26", "47", "ipv4_rule", "4", "21", "23", "namespace", "2", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 20,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack/neutron/neutron/agent/linux/dhcp.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def fill_dhcp_udp_checksums(self, namespace) : 'Ensure DHCP reply packets always have correct UDP checksums.' iptables_mgr = iptables_manager.IptablesManager (use_ipv6 = False, namespace = namespace) ipv4_rule = ('-p udp -m udp --dport %d -j CHECKSUM --checksum-fill' % constants.DHCP_RESPONSE_PORT) ...
No
44
[ "#NEWLINE#", "def update(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "'Get the latest data and updates the state.'", "#NEWLINE#", "self", ".", "data", ".", "update", "(", ")", "#NEWLINE#", "value", "=", "self", ".", "data", ".", "value", "#NEWLINE#", "if", "(", ...
false
0
[ "2", "9", "19", "27", "36", "44", "48", "62", "self", "17", "23", "52", "66", "value" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 22...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "home-assistant/home-assistant/homeassistant/components/sensor/command_line.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def update(self) : 'Get the latest data and updates the state.' self.data.update () value = self.data.value if (self._value_template is not None) : self._state = template.render_with_possible_json_value (self._hass, self._value_template, value, 'N/A') else : self._state = value ...
No
45
[ "#NEWLINE#", "def encode_object(", "obj", ")", ":", "#NEWLINE#", "#INDENT#", "if", "hasattr", "(", "obj", ",", "'__json__'", ")", ":", "#NEWLINE#", "#INDENT#", "data", "=", "obj", ".", "__json__", "(", ")", "#NEWLINE#", "if", "isinstance", "(", "data", ",", ...
false
0
[ "2", "10", "19", "59", "65", "133", "obj", "36", "48", "80", "85", "91", "95", "108", "decode", "17", "28", "38", "41", "52", "73", "113", "data" ]
0
NONE
[]
[ [ { "before_index": 7, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 8, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "Suor/handy/handy/models/fields.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def encode_object(obj) : if hasattr (obj, '__json__') : data = obj.__json__ () if isinstance (data, tuple) : (decode, data) = data else : decode = default_decode data = (('%s.%s' % (obj.__class__.__module__, obj.__class__.__name__)), data) if callable (dec...
No
46
[ "#NEWLINE#", "@", "mock_kms", "#NEWLINE#", "def test_enable_key_rotation(", ")", ":", "#NEWLINE#", "#INDENT#", "conn", "=", "boto", ".", "kms", ".", "connect_to_region", "(", "'us-west-2'", ")", "#NEWLINE#", "key", "=", "conn", ".", "create_key", "(", "policy", ...
false
0
[ "9", "22", "49", "56", "conn", "39", "53", "60", "key_id", "20", "41", "key" ]
0
NONE
[]
[ [ { "before_index": 8, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 19, "after_index": 29, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 38, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "spulec/moto/tests/test_kms/test_kms.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
@ mock_kms def test_enable_key_rotation() : conn = boto.kms.connect_to_region ('us-west-2') key = conn.create_key (policy = 'my policy', description = 'my key', key_usage = 'ENCRYPT_DECRYPT') key_id = key ['KeyMetadata'] ['KeyId'] conn.enable_key_rotation (key_id) conn.get_key_rotation_status ...
No
47
[ "#NEWLINE#", "def test_class_call_function(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "_args", "=", "(", "1", ",", "2", ")", "#NEWLINE#", "_kwargs", "=", "{", "#NEWLINE#", "#INDENT#", "'one'", ":", "1", ",", "#NEWLINE#", "'two'", ":", "2", ",", "#NEWLINE#...
false
0
[ "137", "163", "result", "141", "_function", "2", "50", "59", "68", "118", "159", "self", "15", "74", "156", "168", "_kwargs", "7", "65", "152", "166", "_args", "89", "115", "_decorator" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 33, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "GrahamDumpleton/wrapt/tests/test_instancemethod.py", "license": "bsd-2-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_class_call_function(self) : _args = (1, 2) _kwargs = { 'one' : 1, 'two' : 2, } @ wrapt.decorator def _decorator(wrapped, instance, args, kwargs) : self.assertNotEqual (instance, None) self.assertEqual (args, _args) self.assertEqual (kwargs, _kwa...
No
48
[ "#NEWLINE#", "def test_class_call_function(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "_args", "=", "(", "1", ",", "2", ")", "#NEWLINE#", "_kwargs", "=", "{", "#NEWLINE#", "#INDENT#", "'one'", ":", "1", ",", "#NEWLINE#", "'two'", ":", "2", ",", "#NEWLINE#...
false
0
[ "138", "159", "result", "142", "_function", "2", "50", "59", "68", "119", "155", "self", "15", "74", "152", "164", "_kwargs", "7", "65", "149", "162", "_args", "89", "116", "_decorator" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 33, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "GrahamDumpleton/wrapt/tests/test_instancemethod.py", "license": "bsd-2-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_class_call_function(self) : _args = (1, 2) _kwargs = { 'one' : 1, 'two' : 2, } @ wrapt.decorator def _decorator(wrapped, instance, args, kwargs) : self.assertNotEqual (instance, None) self.assertEqual (args, _args) self.assertEqual (kwargs, _kwa...
No
49
[ "#NEWLINE#", "def info(", "self", ",", "ddoc", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "\"Return information about the database or design document as a\\n dictionary.\\n\\n Without an argument, returns database information. With an argument,\\n return information f...
false
0
[ "4", "15", "36", "ddoc", "27", "55", "70", "77", "data", "23", "25", "51", "53", "_", "2", "30", "58", "66", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "djc/couchdb-python/couchdb/client.py", "license": "bsd-3-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def info(self, ddoc = None) : "Return information about the database or design document as a dictionary. Without an argument, returns database information. With an argument, return information for the given design document. The returned dictionary exactly corresponds to the JSON r...
No
50
[ "#NEWLINE#", "def __repr__(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "classname", "=", "self", ".", "__class__", ".", "__name__", "#NEWLINE#", "return", "'{0}({1!r})'", ".", "format", "(", "classname", ",", "list", "(", "self", ")", ")" ]
false
0
[ "7", "20", "classname", "2", "9", "24", "self" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 21, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "mikeorr/WebHelpers2/webhelpers2/html/tags.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def __repr__(self) : classname = self.__class__.__name__ return '{0}({1!r})'.format (classname, list (self)) Is there a bug in the code above?
No
51
[ "#NEWLINE#", "def _to_common_units(", "args", ")", ":", "#NEWLINE#", "#INDENT#", "common_unit", "=", "CONVERTER", ".", "get_common_unit", "(", "[", "x", ".", "unit", "for", "x", "in", "args", "]", ")", "#NEWLINE#", "return", "[", "x", ".", "to_unit", "(", ...
false
0
[ "14", "18", "26", "33", "x", "7", "30", "common_unit", "2", "20", "35", "args" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 24, "after_index": 25, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "cloudera/ibis/ibis/expr/temporal.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def _to_common_units(args) : common_unit = CONVERTER.get_common_unit ([x.unit for x in args]) return [x.to_unit (common_unit) for x in args] Is there a bug in the code above?
No
52
[ "#NEWLINE#", "def test_decorrelate(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "d", "=", "30", "#NEWLINE#", "dg", "=", "np", ".", "linspace", "(", "1", ",", "2", ",", "d", ")", "#NEWLINE#", "root", "=", "np", ".", "random", ".", "normal", "(", "size"...
false
0
[ "120", "166", "mat2", "78", "93", "idm", "142", "151", "157", "161", "168", "mat3", "7", "21", "35", "99", "114", "d", "2", "self", "11", "45", "dg", "58", "75", "rmat", "69", "84", "86", "dcr", "24", "47", "root", "103", "126", "138", "148", ...
0
NONE
[]
[ [ { "before_index": 6, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 18, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 23, "after_index": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "statsmodels/statsmodels/statsmodels/stats/tests/test_corrpsd.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_decorrelate(self) : d = 30 dg = np.linspace (1, 2, d) root = np.random.normal (size = (d, 4)) fac = FactoredPSDMatrix (dg, root) mat = fac.to_matrix () rmat = np.linalg.cholesky (mat) dcr = fac.decorrelate (rmat) idm = np.dot (dcr, dcr.T) assert_almost_equal (idm, n...
No
53
[ "#NEWLINE#", "def read_conf(", "self", ",", "extra_args", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "retval", "=", "{", "#NEWLINE#", "#INDENT#", "#NEWLINE#", "#UNINDENT#", "}", "#NEWLINE#", "self", ".", "parser", ".", "set_source_file", "(", "[", "PARSER_R...
false
0
[ "2", "20", "33", "45", "51", "72", "78", "86", "92", "98", "self", "11", "retval", "4", "extra_args", "31", "55", "conf_arr" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 13, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 19, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "karesansui/karesansui/karesansui/lib/parser/resolv.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def read_conf(self, extra_args = None) : retval = { } self.parser.set_source_file ([PARSER_RESOLV_CONF]) conf_arr = self.parser.read_conf () try : self.dop.addconf (self._module, conf_arr [PARSER_RESOLV_CONF] ['value']) except : pass self.dop.set (self._module, ['@BASE_...
No
54
[ "#NEWLINE#", "def vfs_construct_path(", "base_path", ",", "*", "path_components", ")", ":", "#NEWLINE#", "#INDENT#", "'Mimics behavior of os.path.join on Posix machines.'", "#NEWLINE#", "path", "=", "base_path", "#NEWLINE#", "for", "component", "in", "path_components", ":", ...
false
0
[ "5", "19", "path_components", "2", "14", "base_path", "12", "33", "45", "50", "60", "69", "81", "path", "17", "24", "35", "62", "74", "component" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 3, "after_index": 5, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 10, ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "oppia/oppia/utils.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def vfs_construct_path(base_path, * path_components) : 'Mimics behavior of os.path.join on Posix machines.' path = base_path for component in path_components : if component.startswith ('/') : path = component else : if ((path == '') or path.endswith ('/')) : ...
No
55
[ "#NEWLINE#", "def test_can_fetch_records_greater_than_1(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "expected", "=", "TestModel", ".", "objects", ".", "filter", "(", "foo__gt", "=", "1", ")", "#NEWLINE#", "actual", "=", "TestModel", ".", "objects", ".", "filter"...
false
0
[ "20", "43", "actual", "2", "37", "self", "7", "48", "expected" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 19, "after_index": 27, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 36, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "thedrow/django-natural-query/tests/functional/test_queries.py", "license": "bsd-3-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_can_fetch_records_greater_than_1(self) : expected = TestModel.objects.filter (foo__gt = 1) actual = TestModel.objects.filter ((TestModel.foo > 1)) self.assertEqual (list (actual), list (expected)) Is there a bug in the code above?
No
56
[ "#NEWLINE#", "def _set_human_times(", "results", ")", ":", "#NEWLINE#", "#INDENT#", "now", "=", "datetime", ".", "datetime", ".", "now", "(", ")", "#NEWLINE#", "for", "r", "in", "results", ":", "#NEWLINE#", "#INDENT#", "date_created", "=", "datetime", ".", "da...
false
0
[ "2", "20", "results", "18", "34", "51", "76", "85", "92", "102", "r", "24", "71", "109", "date_created", "7", "13", "61", "69", "now", "41", "63", "99", "date_modified", "58", "80", "since_modified", "66", "89", "since_created" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 18, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "bloomberg/phabricator-tools/py/aon/aoncmd_query.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def _set_human_times(results) : now = datetime.datetime.now () for r in results : date_created = datetime.datetime.fromtimestamp (float (r ['dateCreated'])) date_modified = datetime.datetime.fromtimestamp (float (r ['dateModified'])) since_modified = (now - date_modified) s...
No
57
[ "#NEWLINE#", "def getIpAddr(", ")", ":", "#NEWLINE#", "#INDENT#", "myname", "=", "socket", ".", "getfqdn", "(", "socket", ".", "gethostname", "(", ")", ")", "#NEWLINE#", "myaddr", "=", "socket", ".", "gethostbyname", "(", "myname", ")", "#NEWLINE#", "return", ...
false
0
[ "19", "29", "myaddr", "6", "25", "myname" ]
0
NONE
[]
[ [ { "before_index": 5, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": 24, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 28, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "harryliu/edwin/edwinAgent/common/os_helper.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def getIpAddr() : myname = socket.getfqdn (socket.gethostname ()) myaddr = socket.gethostbyname (myname) return myaddr Is there a bug in the code above?
No
58
[ "#NEWLINE#", "def test_binding_and_connecting(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "queues", "=", "dict", "(", "connect_and_bind", "=", "dict", "(", "type", "=", "'PUSH'", ",", "binds", "=", "[", "'inproc://socketname'", "]", ",", "connects", "=", "[", ...
false
0
[ "249", "268", "resource_dependency", "89", "107", "233", "264", "272", "socket_provider", "2", "76", "99", "125", "163", "225", "237", "278", "self", "173", "194", "bind_spec", "117", "149", "sockets", "123", "134", "141", "151", "177", "203", "243", "26...
0
NONE
[]
[ [ { "before_index": 6, "after_index": 31, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 75, "after_index": 85, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 88, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "foundit/Piped/contrib/zmq/piped_zmq/test/test_zeromq.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_binding_and_connecting(self) : queues = dict (connect_and_bind = dict (type = 'PUSH', binds = ['inproc://socketname'], connects = ['tcp://0.0.0.0:1234']), multiple_connects = dict (type = 'PUSH', connects = ['tcp://0.0.0.0:1234', 'tcp://0.0.0.0:1235']), multiple_binds = dict (type = 'PUSH', binds = ['tcp:...
No
59
[ "#NEWLINE#", "@", "decorator", "#NEWLINE#", "def with_txn(", "function", ",", "instance", ",", "args", ",", "kwargs", ")", ":", "#NEWLINE#", "#INDENT#", "with", "txn", "(", ")", "as", "session", ":", "#NEWLINE#", "#INDENT#", "return", "function", "(", "session...
false
0
[ "5", "26", "function", "7", "instance", "9", "31", "args", "11", "34", "kwargs", "21", "28", "session" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 6, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 20, "after_index": 18, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 20, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "IvanMalison/okcupyd/okcupyd/db/__init__.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
@ decorator def with_txn(function, instance, args, kwargs) : with txn () as session : return function (session, * args, ** kwargs) Is there a bug in the code above?
No
60
[ "#NEWLINE#", "def quit_handler(", "self", ",", "nick", ",", "message", ",", "channel", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "(", "channel", "==", "self", ".", "cmd_channel", ")", "and", "(", "nick", "in", "self", ".", "workers", ")", ")", ":", ...
false
0
[ "4", "24", "43", "51", "nick", "8", "16", "channel", "6", "message", "2", "18", "26", "34", "47", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 22, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 33, "after_index": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "coleifer/irc/botnet/boss.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def quit_handler(self, nick, message, channel) : if ((channel == self.cmd_channel) and (nick in self.workers)) : self.logger.info (('Worker %s left, unregistering' % nick)) self.unregister (nick) Is there a bug in the code above?
No
61
[ "#NEWLINE#", "def __eq__(", "self", ",", "other", ")", ":", "#NEWLINE#", "#INDENT#", "return", "(", "self", ".", "number", "==", "other", ".", "number", ")" ]
false
0
[ "4", "15", "other", "2", "11", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 12...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "GoogleCloudPlatform/DataflowPythonSDK/google/cloud/dataflow/coders/typecoders_test.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def __eq__(self, other) : return (self.number == other.number) Is there a bug in the code above?
No
62
[ "#NEWLINE#", "def download_google_images(", "*", "arg", ")", ":", "#NEWLINE#", "#INDENT#", "import", "urllib", "#NEWLINE#", "search_keyword", "=", "arg", "[", "0", "]", "#NEWLINE#", "result", "=", "str", "(", "type", "(", "search_keyword", ")", ")", "#NEWLINE#",...
false
0
[ "53", "133", "136", "151", "165", "228", "248", "299", "302", "317", "331", "368", "415", "423", "items", "184", "193", "236", "342", "351", "376", "info", "114", "130", "280", "296", "url", "421", "444", "468", "link", "432", "440", "file", "96", ...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 2, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 2, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 14,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "hardikvasa/webb/webb/webb.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def download_google_images(* arg) : import urllib search_keyword = arg [0] result = str (type (search_keyword)) if ('list' in result) : i = 0 while (i < len (search_keyword)) : items = [] iteration = (((('Item no.: ' + str ((i + 1))) + ' -->') + ' Item nam...
No
63
[ "#NEWLINE#", "def test_invite_email_reject_logged_in(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "r", "=", "self", ".", "login_and_get", "(", "'hermit'", ",", "(", "'/invite/email/%s'", "%", "self", ".", "actor_code", ")", ")", "#NEWLINE#", "r", "=", "self", "...
false
0
[ "7", "24", "76", "82", "91", "100", "107", "112", "129", "135", "r", "2", "9", "18", "26", "35", "55", "78", "87", "96", "103", "114", "123", "131", "self" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 23, "after_index": 39, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 75, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "CollabQ/CollabQ/invite/tests.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_invite_email_reject_logged_in(self) : r = self.login_and_get ('hermit', ('/invite/email/%s' % self.actor_code)) r = self.client.post (('/invite/email/%s' % self.actor_code), { 'invite_reject' : '', 'nick' : 'hermit', 'code' : self.actor_code, '_nonce' : util.create...
No
64
[ "#NEWLINE#", "def read_data(", "self", ",", "force_read_timestamp", "=", "False", ")", ":", "#NEWLINE#", "#INDENT#", "'Using the self.lines buffer, converts the data lines in numpy arrays.\\n - One array self.data for the data (one column/vector per station)\\n - One arra...
false
0
[ "13", "43", "156", "271", "converters_dict", "4", "233", "force_read_timestamp", "2", "35", "59", "65", "78", "86", "103", "116", "120", "138", "159", "170", "206", "211", "227", "235", "253", "274", "285", "319", "331", "356", "self", "132", "163", ...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "ericgibert/supersid/supersid/sidfile.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def read_data(self, force_read_timestamp = False) : 'Using the self.lines buffer, converts the data lines in numpy arrays. - One array self.data for the data (one column/vector per station) - One array self.timestamp for the timestamps (i.e. timestamp vector) Reading method differs ...
No
65
[ "#NEWLINE#", "@", "nochange", "#NEWLINE#", "@", "onlylib", "(", "'lxe'", ")", "#NEWLINE#", "@", "children", "#NEWLINE#", "def bench_xpath_method(", "self", ",", "children", ")", ":", "#NEWLINE#", "#INDENT#", "for", "child", "in", "children", ":", "#NEWLINE#", "#...
false
0
[ "14", "self", "11", "16", "24", "children", "22", "28", "child" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 21, "after_index": 22, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 21, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "cloudera/hue/desktop/core/ext-py/lxml-3.3.6/benchmark/bench_xpath.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
@ nochange @ onlylib ('lxe') @ children def bench_xpath_method(self, children) : for child in children : child.xpath ('./*[1]') Is there a bug in the code above?
No
66
[ "#NEWLINE#", "def equal(", "sd", ",", "security", ")", ":", "#NEWLINE#", "#INDENT#", "return", "(", "as_string", "(", "sd", ")", "==", "str", "(", "security", ")", ")" ]
false
0
[ "4", "18", "security", "2", "13", "sd" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 12...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "tjguk/winsys/winsys/tests/test_security.py", "license": "mit", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def equal(sd, security) : return (as_string (sd) == str (security)) Is there a bug in the code above?
No
67
[ "#NEWLINE#", "def productvariation_details(", "product", ",", "include_tax", ",", "user", ",", "create", "=", "False", ")", ":", "#NEWLINE#", "#INDENT#", "'Build the product variation details, for conversion to javascript.\\n\\n Returns variation detail dictionary built like so:\\n ...
true
476
[ "57", "432", "177", "185", "208", "231", "238", "278", "374", "381", "2", "30", "68", "96", "130", "139", "152", "8", "120", "4", "48", "326", "425", "6", "61", "63", "26", "36", "39", "417", "66", "436", "199", "217", "226", "285", "295", "3...
1
VARIABLE_MISUSE
[ 26, 36, 39, 417 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "dokterbob/satchmo/satchmo/apps/product/utils.py", "license": "bsd-3-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def productvariation_details(product, include_tax, user, create = False) : 'Build the product variation details, for conversion to javascript. Returns variation detail dictionary built like so: details = { "OPTION_KEY" : { "SLUG": "Variation Slug", "PRICE" : {"qty" : "$pric...
Yes
68
[ "#NEWLINE#", "def add_output(", "self", ",", "pipe", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "self", "not in", "self", ".", "outputs", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "outputs", ".", "append", "(", "pipe", ")", "#NEWLINE#", "#UNINDENT#"...
true
11
[ "4", "26", "40", "2", "11", "13", "20" ]
1
VARIABLE_MISUSE
[ 4, 26, 40 ]
[ [ { "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": 12, "after_index": 11...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "Stiivi/brewery/brewery/nodes/base.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def add_output(self, pipe) : if (self not in self.outputs) : self.outputs.append (pipe) else : raise Exception (('Output %s already connected' % pipe)) Is there a bug in the code above?
Yes
69
[ "#NEWLINE#", "def sign_file(", "self", ",", "file_input", ",", "key", "=", "None", ",", "destination", "=", "None", ",", "key_id", "=", "None", ",", "passphrase", "=", "None", ",", "clearsign", "=", "False", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Si...
true
76
[ "22", "45", "88", "120", "158", "102", "148", "169", "18", "85", "6", "61", "70", "76", "4", "94", "112", "129", "152", "185", "31", "40", "52", "65", "80", "123", "10", "98", "106", "144", "165", "179", "14", "48", "57", "72", "2", "114" ]
1
VARIABLE_MISUSE
[ 18, 85 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 28, "after_index": 29, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 30, "after_index": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "mayan-edms/mayan-edms/mayan/apps/django_gpg/api.py", "license": "apache-2.0", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def sign_file(self, file_input, key = None, destination = None, key_id = None, passphrase = None, clearsign = False) : ' Signs a filename, storing the signature and the original file in the destination filename provided (the destination file is overrided if it already exists), if no destina...
Yes
70
[ "#NEWLINE#", "def __repr__(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "cname", "=", "self", ".", "__class__", ".", "__name__", "#NEWLINE#", "if", "(", "cname", ".", "lower", "(", ")", "==", "self", ".", "name", ")", ":", "#NEWLINE#", "#INDENT#", "return...
true
50
[ "7", "17", "35", "48", "50", "2", "9", "23" ]
1
VARIABLE_MISUSE
[ 2, 9, 23 ]
[ [ { "before_index": 6, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 22, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "machinalis/quepy/quepy/parsing.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def __repr__(self) : cname = self.__class__.__name__ if (cname.lower () == self.name) : return '{}()'.format (cname) else : return "{}('{}')".format (cname, cname.name) Is there a bug in the code above?
Yes
71
[ "#NEWLINE#", "def populate_class_members(", "self", ",", "element_cls", ",", "prop_name", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Baseline behavior for adding the appropriate methods to\\n *element_cls*.\\n '", "#NEWLINE#", "self", ".", "_element_cls", "=", "p...
true
17
[ "6", "17", "23", "4", "2", "13", "19" ]
1
VARIABLE_MISUSE
[ 4 ]
[ [ { "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": "python-openxml/python-docx/docx/oxml/xmlchemy.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def populate_class_members(self, element_cls, prop_name) : ' Baseline behavior for adding the appropriate methods to *element_cls*. ' self._element_cls = prop_name self._prop_name = prop_name Is there a bug in the code above?
Yes
72
[ "#NEWLINE#", "def _add_getter(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Add a read-only ``{prop_name}`` property to the element class for\\n this child element.\\n '", "#NEWLINE#", "property_", "=", "property", "(", "self", ".", "_getter", ",", "None"...
true
28
[ "9", "28", "32", "2", "13", "24" ]
1
VARIABLE_MISUSE
[ 2, 13, 24 ]
[ [ { "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": 27...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "python-openxml/python-docx/docx/oxml/xmlchemy.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def _add_getter(self) : ' Add a read-only ``{prop_name}`` property to the element class for this child element. ' property_ = property (self._getter, None, None) setattr (self._element_cls, property_._prop_name, property_) Is there a bug in the code above?
Yes
73
[ "#NEWLINE#", "def test_is_degenerate(", ")", ":", "#NEWLINE#", "#INDENT#", "(", "x", ",", "y", ",", "z", ",", "h", ")", "=", "create_gate_sequence", "(", ")", "#NEWLINE#", "gate_id", "=", "GateIdentity", "(", "x", ",", "y", ",", "z", ")", "#NEWLINE#", "i...
true
53
[ "9", "26", "42", "11", "28", "40", "7", "24", "44", "13", "20", "34", "53", "31", "51", "37" ]
1
VARIABLE_MISUSE
[ 37 ]
[ [ { "before_index": 5, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 19, "after_index": 25, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 30, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "sympy/sympy/sympy/physics/quantum/tests/test_identitysearch.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_is_degenerate() : (x, y, z, h) = create_gate_sequence () gate_id = GateIdentity (x, y, z) ids = { gate_id } another_id = (z, y, x) assert (is_degenerate (ids, gate_id) is True) Is there a bug in the code above?
Yes
74
[ "#NEWLINE#", "def create(", "kernel", ")", ":", "#NEWLINE#", "#INDENT#", "result", "=", "Tangible", "(", ")", "#NEWLINE#", "result", ".", "template", "=", "'object/tangible/item/quest/force_sensitive/shared_fs_sculpture_1.iff'", "#NEWLINE#", "result", ".", "attribute_templa...
true
38
[ "2", "38", "7", "13", "19", "28" ]
1
VARIABLE_MISUSE
[ 7, 13, 19, 28 ]
[ [ { "before_index": 6, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "anhstudios/swganh/data/scripts/templates/object/tangible/item/quest/force_sensitive/shared_fs_sculpture_1.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def create(kernel) : result = Tangible () result.template = 'object/tangible/item/quest/force_sensitive/shared_fs_sculpture_1.iff' result.attribute_template_id = (- 1) result.stfName ('item_n', 'fs_sculpture_1') return kernel Is there a bug in the code above?
Yes
75
[ "#NEWLINE#", "def _Open(", "self", ",", "path_spec", "=", "None", ",", "mode", "=", "'rb'", ")", ":", "#NEWLINE#", "#INDENT#", "\"Opens the file-like object defined by path specification.\\n\\n Args:\\n path_spec: optional the path specification (instance of PathSpec).\\n ...
true
83
[ "4", "20", "40", "55", "49", "61", "101", "8", "83", "2", "44", "79", "85", "89", "97", "107", "32", "51", "66" ]
1
VARIABLE_MISUSE
[ 32, 51, 66 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "log2timeline/dfvfs/dfvfs/file_io/cpio_file_io.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def _Open(self, path_spec = None, mode = 'rb') : "Opens the file-like object defined by path specification. Args: path_spec: optional the path specification (instance of PathSpec). mode: optional file access mode. The default is 'rb' read-only binary. Raises: AccessError: if the access ...
Yes
76
[ "#NEWLINE#", "def __init__(", "self", ",", "id", "=", "None", ",", "location", "=", "None", ",", "tags", "=", "None", ",", "peering_locations", "=", "None", ",", "bandwidths_offered", "=", "None", ",", "provisioning_state", "=", "None", ")", ":", "#NEWLINE#"...
true
63
[ "16", "55", "57", "2", "35", "53", "59", "63", "65", "4", "40", "42", "20", "61", "12", "48", "50", "24", "67", "69", "8", "44", "46" ]
1
VARIABLE_MISUSE
[ 20, 61 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 30, "after_index": 43, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 52, "after_index": 5...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "Azure/azure-sdk-for-python/azure-mgmt-network/azure/mgmt/network/models/express_route_service_provider.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def __init__(self, id = None, location = None, tags = None, peering_locations = None, bandwidths_offered = None, provisioning_state = None) : super (ExpressRouteServiceProvider, self).__init__ (id = id, location = location, tags = tags) self.peering_locations = peering_locations self.bandwidths_offered =...
Yes
77
[ "#NEWLINE#", "def mask_secrets(", "self", ",", "value", ")", ":", "#NEWLINE#", "#INDENT#", "from", "st2common.util", "import", "action_db", "#NEWLINE#", "result", "=", "copy", ".", "deepcopy", "(", "value", ")", "#NEWLINE#", "execution_parameters", "=", "value", "...
true
61
[ "43", "63", "65", "14", "52", "69", "30", "47", "49", "59", "2", "38", "61", "23", "4", "20", "25" ]
1
VARIABLE_MISUSE
[ 23 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 19, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "StackStorm/st2/st2common/st2common/models/db/liveaction.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def mask_secrets(self, value) : from st2common.util import action_db result = copy.deepcopy (value) execution_parameters = value ['parameters'] parameters = action_db.get_action_parameters_specs (action_ref = self.action) secret_parameters = get_secret_parameters (parameters = parameters) ...
Yes
78
[ "#NEWLINE#", "def parse_accept_header(", "accept_header", ")", ":", "#NEWLINE#", "#INDENT#", "'Parse accept header.\\n\\n Args:\\n accept_header: Unparsed accept header. Does not include name of header.\\n\\n Returns:\\n List of AcceptItem instances sorted according to their priority.\\n '",...
true
41
[ "2", "23", "41", "18", "39", "16", "9", "33", "49" ]
1
VARIABLE_MISUSE
[ 16 ]
[ [ { "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": 14, "after_index": 17...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "AppScale/appscale/AppServer/lib/protorpc/protorpc/util.py", "license": "apache-2.0", "note": "license: github_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def parse_accept_header(accept_header) : 'Parse accept header. Args: accept_header: Unparsed accept header. Does not include name of header. Returns: List of AcceptItem instances sorted according to their priority. ' accept_items = [] for (index, header) in enumerate (accept_header.split...
Yes
79
[ "#NEWLINE#", "def test_cochranq(", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n library(CVST)\\n table1 = matrix(c(1, 0, 1, 1,\\n 0, 1, 1, 1,\\n 1, 1, 1, 0,\\n 0, 1, 0, 0,\\n 0, 1, 0, 0,\\n 1, 0, 1...
true
358
[ "302", "323", "330", "345", "358", "116", "139", "270", "297", "8", "102", "108", "123", "144", "256", "262", "277", "304", "352", "375", "386", "112", "132", "266", "286", "114", "268", "384", "388", "313", "339", "371", "382" ]
1
VARIABLE_MISUSE
[ 313 ]
[ [ { "before_index": 5, "after_index": 6, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 7, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 101, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "statsmodels/statsmodels/statsmodels/stats/tests/test_contingency_tables.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_cochranq() : ' library(CVST) table1 = matrix(c(1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, ...
Yes
80
[ "#NEWLINE#", "def __setitem__(", "self", ",", "key", ",", "value", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "key", "not in", "self", ")", ":", "#NEWLINE#", "#INDENT#", "raise", "KeyError", "(", "(", "'%r not permitted in this %s'", "%", "(", "key", ",", ...
true
52
[ "4", "13", "27", "49", "6", "2", "15", "29", "39", "52" ]
1
VARIABLE_MISUSE
[ 6 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 38, "after_index": 5...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "jek/flatland/flatland/out/generic.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def __setitem__(self, key, value) : if (key not in self) : raise KeyError (('%r not permitted in this %s' % (key, self.__class__.__name__))) self._frames [(- 1)] [key] = self Is there a bug in the code above?
Yes
81
[ "#NEWLINE#", "def proxy(", "self", ",", "reset_master_mock", "=", "False", ",", "**kwargs", ")", ":", "#NEWLINE#", "#INDENT#", "proxy_kwargs", "=", "dict", "(", "topic", "=", "self", ".", "topic", ",", "exchange", "=", "self", ".", "exchange", ",", "url", ...
true
63
[ "49", "4", "52", "75", "2", "19", "25", "31", "67", "13", "45", "59", "63" ]
1
VARIABLE_MISUSE
[ 4 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 22, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 44, "after_index": 4...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack/taskflow/taskflow/tests/unit/worker_based/test_proxy.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def proxy(self, reset_master_mock = False, **kwargs) : proxy_kwargs = dict (topic = self.topic, exchange = self.exchange, url = self.broker_url, type_handlers = { }) proxy_kwargs.update (kwargs) p = proxy.Proxy (** proxy_kwargs) if proxy_kwargs : self.resetMasterMock () return p ...
Yes
82
[ "#NEWLINE#", "def set_autolevels(", "self", ",", "x", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "has_autolevels_", "=", "1", "#NEWLINE#", "self", ".", "autolevels_", "=", "self" ]
true
19
[ "2", "9", "15", "19", "4" ]
1
VARIABLE_MISUSE
[ 4 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 13, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 19...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "CollabQ/CollabQ/.google_appengine/google/appengine/api/images/images_service_pb.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def set_autolevels(self, x) : self.has_autolevels_ = 1 self.autolevels_ = self Is there a bug in the code above?
Yes
83
[ "#NEWLINE#", "def Equals(", "self", ",", "x", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "x", "is", "self", ")", ":", "#NEWLINE#", "#INDENT#", "return", "1", "#NEWLINE#", "#UNINDENT#", "if", "(", "self", ".", "has_width_", "!=", "x", ".", "has_width_", ...
true
68
[ "2", "13", "24", "41", "46", "64", "68", "81", "86", "104", "121", "126", "144", "161", "166", "4", "11", "28", "50", "90", "108", "130", "148", "170" ]
1
VARIABLE_MISUSE
[ 4, 11, 28, 50, 90, 108, 130, 148, 170 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 27...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "CollabQ/CollabQ/.google_appengine/google/appengine/api/images/images_service_pb.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def Equals(self, x) : if (x is self) : return 1 if (self.has_width_ != x.has_width_) : return 0 if (self.has_width_ and (self.width_ != x.width_)) : return 0 if (self.has_height_ != self.has_height_) : return 0 if (self.has_height_ and (self.height_ != x.height_)) : ...
Yes
84
[ "#NEWLINE#", "def _BuildTagLookupTable(", "sparse", ",", "maxtag", ",", "default", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "return", "tuple", "(", "[", "sparse", ".", "get", "(", "i", ",", "sparse", ")", "for", "i", "in", "xrange", "(", "0", ",",...
true
23
[ "6", "4", "35", "21", "26", "2", "17", "23" ]
1
VARIABLE_MISUSE
[ 6 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "CollabQ/CollabQ/.google_appengine/google/appengine/api/images/images_service_pb.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def _BuildTagLookupTable(sparse, maxtag, default = None) : return tuple ([sparse.get (i, sparse) for i in xrange (0, (1 + maxtag))]) Is there a bug in the code above?
Yes
85
[ "#NEWLINE#", "def __init__(", "self", ",", "topic", "=", "None", ",", "*", "args", ",", "**kwargs", ")", ":", "#NEWLINE#", "#INDENT#", "super", "(", "TopicPollForm", ",", "self", ")", ".", "__init__", "(", "*", "args", ",", "**", "kwargs", ")", "#NEWLINE...
false
0
[ "29", "kwargs", "2", "20", "32", "self", "9", "26", "args", "4", "34", "36", "topic" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 3, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 27,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "nitely/Spirit/spirit/topic/poll/forms.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def __init__(self, topic = None, * args, **kwargs) : super (TopicPollForm, self).__init__ (* args, ** kwargs) self.topic = topic Is there a bug in the code above?
No
86
[ "#NEWLINE#", "def get_transaction_status_display(", "vendor", ",", "level", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "vendor", "==", "'postgresql'", ")", ":", "#NEWLINE#", "#INDENT#", "import", "psycopg2.extensions", "#NEWLINE#", "choices", "=", "{", "#NEWLINE#",...
false
0
[ "4", "106", "level", "2", "11", "97", "vendor", "21", "102", "choices" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 101, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "django-debug-toolbar/django-debug-toolbar/debug_toolbar/panels/sql/panel.py", "license": "bsd-3-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def get_transaction_status_display(vendor, level) : if (vendor == 'postgresql') : import psycopg2.extensions choices = { psycopg2.extensions.TRANSACTION_STATUS_IDLE : _ ('Idle'), psycopg2.extensions.TRANSACTION_STATUS_ACTIVE : _ ('Active'), psycopg2.extensio...
No
87
[ "#NEWLINE#", "def maybe_name_or_idx(", "idx", ",", "model", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Give a name or an integer and return the name and integer location of the\\n column in a design matrix.\\n '", "#NEWLINE#", "if", "(", "idx", "is", "None", ")", ":", "#NE...
false
0
[ "4", "24", "47", "104", "133", "model", "45", "77", "107", "127", "146", "exog_name", "97", "118", "exog_idx_item", "95", "111", "exog_name_item", "54", "82", "114", "131", "148", "exog_idx", "2", "13", "20", "38", "51", "56", "66", "90", "129", "139...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 14,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "statsmodels/statsmodels/statsmodels/graphics/utils.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def maybe_name_or_idx(idx, model) : ' Give a name or an integer and return the name and integer location of the column in a design matrix. ' if (idx is None) : idx = lrange (model.exog.shape [1]) if isinstance (idx, int) : exog_name = model.exog_names [idx] exog_idx = i...
No
88
[ "#NEWLINE#", "def test_find_component_id(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "cid", "=", "self", ".", "data", ".", "find_component_id", "(", "'Test Component'", ")", "#NEWLINE#", "assert", "(", "cid", "==", "self", ".", "comp_id", ")", "#NEWLINE#", "as...
false
0
[ "2", "9", "22", "29", "self", "7", "20", "cid" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": 21, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 27, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "glue-viz/glue/glue/core/tests/test_data.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_find_component_id(self) : cid = self.data.find_component_id ('Test Component') assert (cid == self.comp_id) assert (self.data.find_component_id ('does not exist') is None) Is there a bug in the code above?
No
89
[ "#NEWLINE#", "def load_mnist(", "path", "=", "'.'", ",", "normalize", "=", "True", ")", ":", "#NEWLINE#", "#INDENT#", "mnist_dataset", "=", "MNIST", "(", "path", "=", "path", ",", "normalize", "=", "normalize", ")", "#NEWLINE#", "return", "mnist_dataset", ".",...
false
0
[ "6", "21", "23", "normalize", "13", "27", "mnist_dataset", "2", "17", "19", "path" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 20, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 26, "after_index": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "NervanaSystems/neon/neon/data/dataloaders.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def load_mnist(path = '.', normalize = True) : mnist_dataset = MNIST (path = path, normalize = normalize) return mnist_dataset.load_data () Is there a bug in the code above?
No
90
[ "#NEWLINE#", "def test_logical_shapes(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "for", "stride", "in", "range", "(", "1", ",", "4", ")", ":", "#NEWLINE#", "#INDENT#", "kshp", "=", "(", "10", ",", "2", ",", "10", ",", "10", ")", "#NEWLINE#", "featshp"...
false
0
[ "19", "115", "120", "125", "130", "174", "kshp", "80", "166", "featshp_logical", "59", "150", "kernel_rotated", "51", "65", "A", "112", "162", "kshp_rotated", "2", "136", "self", "43", "148", "a", "8", "99", "108", "stride", "31", "83", "88", "94", "...
0
NONE
[]
[ [ { "before_index": 7, "after_index": 8, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 7, "after_index": 13, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 10...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "rizar/attention-lvcsr/libs/Theano/theano/sandbox/cuda/tests/test_conv_cuda_ndarray.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_logical_shapes(self) : for stride in range (1, 4) : kshp = (10, 2, 10, 10) featshp = (3, 10, 11, 11) a = tensor.ftensor4 () A = tensor.ftensor4 () kernel_rotated = tensor.transpose (A, axes = [1, 0, 2, 3]) featshp_logical = (featshp [0], featshp [1], (...
No
91
[ "#NEWLINE#", "def test_stack_rows_segfault_070312(", ")", ":", "#NEWLINE#", "#INDENT#", "seed_rng", "(", ")", "#NEWLINE#", "img", "=", "theano", ".", "shared", "(", "numpy", ".", "random", ".", "rand", "(", "1", ",", "80", ",", "96", ",", "96", ")", ".", ...
false
0
[ "64", "146", "out", "10", "150", "img", "130", "162", "f", "91", "148", "op", "37", "152", "kern" ]
0
NONE
[]
[ [ { "before_index": 5, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 36, "after_index": 42...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "rizar/attention-lvcsr/libs/Theano/theano/sandbox/cuda/tests/test_conv_cuda_ndarray.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_stack_rows_segfault_070312() : seed_rng () img = theano.shared (numpy.random.rand (1, 80, 96, 96).astype ('float32')) kern = theano.shared (numpy.random.rand (1, 80, 9, 9).astype ('float32')) out = theano.shared (numpy.random.rand (1, 2, 2, 3).astype ('float32')) op = theano.tensor.nne...
No
92
[ "#NEWLINE#", "def test_parallel_derivs_fwd(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "prob", "=", "self", ".", "prob", "#NEWLINE#", "prob", ".", "root", ".", "ln_solver", ".", "options", "[", "'mode'", "]", "=", "'fwd'", "#NEWLINE#", "prob", ".", "root", ...
false
0
[ "7", "11", "13", "26", "41", "58", "75", "88", "97", "107", "prob", "2", "9", "105", "self" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 24, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 25, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "OpenMDAO/OpenMDAO/mpitest/test_mpi_opt.py", "license": "apache-2.0", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_parallel_derivs_fwd(self) : prob = self.prob prob.root.ln_solver.options ['mode'] = 'fwd' prob.root.par.ln_solver.options ['mode'] = 'fwd' prob.root.par.ser1.ln_solver.options ['mode'] = 'fwd' prob.root.par.ser2.ln_solver.options ['mode'] = 'fwd' prob.driver.parallel_derivs (['par...
No
93
[ "#NEWLINE#", "@", "utils", ".", "arg", "(", "'id'", ",", "metavar", "=", "'<NODE>'", ",", "nargs", "=", "'+'", ",", "help", "=", "_", "(", "'ID of node(s) to check.'", ")", ")", "#NEWLINE#", "def do_node_check(", "service", ",", "args", ")", ":", "#NEWLINE...
false
0
[ "97", "109", "msg", "41", "73", "90", "failure_count", "25", "58", "service", "46", "62", "82", "nid", "27", "48", "args" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 26, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 31, "after_index": 32, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 33, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack/python-senlinclient/senlinclient/v1/shell.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
@ utils.arg ('id', metavar = '<NODE>', nargs = '+', help = _ ('ID of node(s) to check.')) def do_node_check(service, args) : 'Check the node(s).' show_deprecated ('senlin node-check', 'openstack cluster node check') failure_count = 0 for nid in args.id : try : service.check_no...
No
94
[ "#NEWLINE#", "def __repr__(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "not", "self", ")", ":", "#NEWLINE#", "#INDENT#", "return", "(", "'%s()'", "%", "(", "self", ".", "__class__", ".", "__name__", ",", ")", ")", "#NEWLINE#", "#UNINDENT#", "s...
false
0
[ "71", "86", "old_pattern", "30", "80", "82", "93", "s", "47", "76", "transformations", "73", "88", "new_pattern", "2", "10", "20", "36", "self" ]
0
NONE
[]
[ [ { "before_index": 7, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 29, "after_index": 37, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 46, "after_index": 4...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "yvesalexandre/bandicoot/bandicoot/helper/tools.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def __repr__(self) : if (not self) : return ('%s()' % (self.__class__.__name__,)) s = json.dumps (self, cls = CustomEncoder, indent = 4) transformations = [('"<', '<'), ('>"', '>'), ('null', 'None')] for (old_pattern, new_pattern) in transformations : s = s.replace (old_pattern, new_pa...
No
95
[ "#NEWLINE#", "def _get_deleted_expire_index(", "table", ")", ":", "#NEWLINE#", "#INDENT#", "members", "=", "sorted", "(", "[", "'deleted'", ",", "'expire'", "]", ")", "#NEWLINE#", "for", "idx", "in", "table", ".", "indexes", ":", "#NEWLINE#", "#INDENT#", "if", ...
false
0
[ "7", "40", "members", "2", "21", "table", "19", "31", "46", "idx" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": 19, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/db/sqlalchemy/migrate_repo/versions/234_add_expire_reservations_index.py", "license": "apache-2.0", "note": "license: github_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def _get_deleted_expire_index(table) : members = sorted (['deleted', 'expire']) for idx in table.indexes : if (sorted (idx.columns.keys ()) == members) : return idx Is there a bug in the code above?
No
96
[ "#NEWLINE#", "def ExecGlobalPostHooks(", "opcode", ",", "master_name", ",", "rpc_runner", ",", "log_fn", ",", "cluster_name", ",", "master_uuid", ",", "job_id", ",", "status", ")", ":", "#NEWLINE#", "#INDENT#", "' Build hooks manager and execute global post hooks just on th...
false
0
[ "23", "85", "hm", "4", "72", "74", "master_name", "6", "46", "rpc_runner", "10", "68", "70", "cluster_name", "14", "80", "82", "job_id", "16", "99", "status", "2", "27", "opcode", "8", "60", "62", "log_fn", "12", "40", "76", "78", "master_uuid" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 20, "after_index": 21, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "ganeti/ganeti/lib/hooksmaster.py", "license": "bsd-2-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def ExecGlobalPostHooks(opcode, master_name, rpc_runner, log_fn, cluster_name, master_uuid, job_id, status) : ' Build hooks manager and execute global post hooks just on the master ' hm = HooksMaster (opcode, hooks_path = None, nodes = ([], [master_uuid]), hooks_execution_fn = rpc_runner, hooks_results_ada...
No
97
[ "#NEWLINE#", "@", "app", ".", "after_request", "#NEWLINE#", "def after_request(", "response", ")", ":", "#NEWLINE#", "#INDENT#", "response", ".", "headers", ".", "add", "(", "'Access-Control-Allow-Methods'", ",", "'GET, POST'", ")", "#NEWLINE#", "response", ".", "he...
false
0
[ "7", "12", "23", "34", "45", "56", "87", "125", "137", "response", "104", "123", "131", "csrf_token" ]
0
NONE
[]
[ [ { "before_index": 11, "after_index": 19, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 30, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 33, "after_index":...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "EasyCTF/easyctf-2015/api/api/app.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
@ app.after_request def after_request(response) : response.headers.add ('Access-Control-Allow-Methods', 'GET, POST') response.headers.add ('Access-Control-Allow-Credentials', 'true') response.headers.add ('Access-Control-Allow-Headers', 'Content-Type, *') response.headers.add ('Cache-Control', 'no-...
No
98
[ "#NEWLINE#", "def main(", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "os", ".", "path", ".", "exists", "(", "DEST_PATH", ")", "and", "os", ".", "path", ".", "isfile", "(", "DEST_PATH", ")", "and", "os", ".", "access", "(", "DEST_PATH", ",", "os", ...
false
0
[ "71", "94", "contents", "121", "131", "dest_file", "97", "102", "tar", "109", "129", "src_file" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 48, "after_index": 54, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 59, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "pre-commit/pre-commit-hooks/get-git-lfs.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def main() : if (os.path.exists (DEST_PATH) and os.path.isfile (DEST_PATH) and os.access (DEST_PATH, os.X_OK)) : print ('Already installed!') return 0 shutil.rmtree (DEST_DIR, ignore_errors = True) os.makedirs (DEST_DIR, exist_ok = True) contents = io.BytesIO (urlopen (DOWNLOAD_PATH).r...
No
99
[ "#NEWLINE#", "def onRemoteError(", "self", ",", "code", ",", "message", ",", "request_info", ")", ":", "#NEWLINE#", "#INDENT#", "LOG", ".", "setHTML", "(", "str", "(", "message", ")", ")", "#NEWLINE#", "Timer", "(", "5000", ",", "(", "lambda", ":", "LOG", ...
false
0
[ "2", "self", "8", "request_info", "4", "code", "6", "19", "message" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "anandology/pyjamas/examples/minesweeper/minesweeper.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def onRemoteError(self, code, message, request_info) : LOG.setHTML (str (message)) Timer (5000, (lambda : LOG.setHTML (''))) Is there a bug in the code above?
No