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
1,000
[ "#NEWLINE#", "def ByteSize(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "n", "=", "0", "#NEWLINE#", "n", "+=", "self", ".", "lengthString", "(", "len", "(", "self", ".", "key_", ")", ")", "#NEWLINE#", "if", "self", ".", "has_delete_time_", ":", "#NEWLINE#...
false
0
[ "7", "11", "32", "39", "n", "2", "13", "19", "26", "self" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "CollabQ/CollabQ/.google_appengine/google/appengine/api/memcache/memcache_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 ByteSize(self) : n = 0 n += self.lengthString (len (self.key_)) if self.has_delete_time_ : n += 5 return (n + 1) Is there a bug in the code above?
No
1,001
[ "#NEWLINE#", "def _BuildTagLookupTable(", "sparse", ",", "maxtag", ",", "default", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "return", "tuple", "(", "[", "sparse", ".", "get", "(", "i", ",", "default", ")", "for", "i", "in", "xrange", "(", "0", ","...
false
0
[ "2", "17", "sparse", "4", "35", "maxtag", "6", "23", "default", "21", "26", "i" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "CollabQ/CollabQ/.google_appengine/google/appengine/api/memcache/memcache_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, default) for i in xrange (0, (1 + maxtag))]) Is there a bug in the code above?
No
1,002
[ "#NEWLINE#", "def __call__(", "self", ",", "source", ",", "command", ",", "**_", ")", ":", "#NEWLINE#", "#INDENT#", "space_ix", "=", "command", ".", "find", "(", "' '", ")", "#NEWLINE#", "if", "(", "space_ix", "==", "(", "-", "1", ")", ")", ":", "#NEWL...
false
0
[ "6", "15", "56", "command", "4", "35", "49", "source", "_", "13", "24", "58", "space_ix", "2", "43", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 18, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "genzgd/Lampost-Mud/lampost/comm/channel.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 __call__(self, source, command, **_) : space_ix = command.find (' ') if (space_ix == (- 1)) : return source.display_line ('Say what?') self.send_msg (((source.name + ':') + command [space_ix :])) Is there a bug in the code above?
No
1,003
[ "#NEWLINE#", "def run(", "self", ",", "cluster_id", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "not", "cluster_id", ")", ":", "#NEWLINE#", "#INDENT#", "cluster_id", "=", "self", ".", "cluster_id", "#NEWLINE#", "#UNINDENT#", "url", "=", "self", ...
false
0
[ "4", "14", "19", "23", "33", "cluster_id", "26", "44", "url", "2", "21", "28", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 13, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 25, "after_index": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "StackStorm/st2contrib/packs/opscenter/actions/get_storage_capacity.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def run(self, cluster_id = None) : if (not cluster_id) : cluster_id = self.cluster_id url = self._get_full_url ([cluster_id, 'storage-capacity']) return requests.get (url).json () Is there a bug in the code above?
No
1,004
[ "#NEWLINE#", "def run(", "cmd", ",", "**kwargs", ")", ":", "#NEWLINE#", "#INDENT#", "'wrapper around invoke.run that accepts a Popen list'", "#NEWLINE#", "if", "isinstance", "(", "cmd", ",", "list", ")", ":", "#NEWLINE#", "#INDENT#", "cmd", "=", "' '", ".", "join", ...
false
0
[ "2", "14", "21", "37", "54", "cmd", "32", "35", "s", "42", "57", "kwargs" ]
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": 15,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "jupyterhub/jupyterhub/tools/tasks.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 run(cmd, **kwargs) : 'wrapper around invoke.run that accepts a Popen list' if isinstance (cmd, list) : cmd = ' '.join ((pipes.quote (s) for s in cmd)) kwargs.setdefault ('echo', True) return invoke_run (cmd, ** kwargs) Is there a bug in the code above?
No
1,005
[ "#NEWLINE#", "def test_just_applicative_1(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "a", "=", "Just", ".", "pure", "(", "(", "lambda", "x", ",", "y", ":", "(", "x", "+", "y", ")", ")", ")", ".", "apply", "(", "Just", "(", "2", ")", ")", ".", ...
false
0
[ "2", "43", "54", "self", "7", "47", "58", "a" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 36, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 42, "after_index": 48, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 53, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "dbrattli/OSlash/tests/test_maybe.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_just_applicative_1(self) : a = Just.pure ((lambda x, y : (x + y))).apply (Just (2)).apply (Just (40)) self.assertNotEquals (a, Nothing ()) self.assertEquals (a, Just (42)) Is there a bug in the code above?
No
1,006
[ "#NEWLINE#", "def test_single_top_level_menu_with_no_group(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "' single top level menu with no group '", "#NEWLINE#", "action_sets", "=", "[", "ActionSet", "(", "menus", "=", "[", "Menu", "(", "name", "=", "'&File'", ",", "path...
false
0
[ "40", "57", "65", "menu_bar_manager", "9", "35", "37", "action_sets", "75", "79", "item", "2", "49", "86", "self", "63", "81", "group", "31", "42", "builder", "72", "94", "ids" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 30, "after_index": 34...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "enthought/envisage/envisage/ui/action/tests/action_manager_builder_test_case.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_single_top_level_menu_with_no_group(self) : ' single top level menu with no group ' action_sets = [ActionSet (menus = [Menu (name = '&File', path = 'MenuBar')])] builder = DummyActionManagerBuilder (action_sets = action_sets) menu_bar_manager = builder.create_menu_bar_manager ('MenuBar') ...
No
1,007
[ "#NEWLINE#", "def items(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "return", "[", "(", "k", ",", "self", ".", "_data", "[", "k", "]", ")", "for", "k", "in", "self", ".", "keys", "(", ")", "]" ]
false
0
[ "2", "12", "22", "self", "10", "16", "20", "k" ]
0
NONE
[]
[ [ { "before_index": 7, "after_index": 8, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 19, "after_index": 20...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "schematics/schematics/schematics/models.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 items(self) : return [(k, self._data [k]) for k in self.keys ()] Is there a bug in the code above?
No
1,008
[ "#NEWLINE#", "def relative_path_to_class_name(", "self", ",", "partition_folder", ",", "relative_path", ",", "suffix", ")", ":", "#NEWLINE#", "#INDENT#", "return", "relative_path", ".", "rpartition", "(", "(", "partition_folder", "+", "'/'", ")", ")", "[", "2", "]...
false
0
[ "2", "self", "6", "14", "relative_path", "4", "19", "partition_folder", "8", "37", "suffix" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 38, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 38, "after_index": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "patgannon/sublimetext-scalatest/run_scala_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 relative_path_to_class_name(self, partition_folder, relative_path, suffix) : return relative_path.rpartition ((partition_folder + '/')) [2].replace ('/', '.').replace (suffix, '') Is there a bug in the code above?
No
1,009
[ "#NEWLINE#", "def reorder(", "self", ",", "interface", ",", "percent", ",", "delay", "=", "10", ",", "correlation", "=", "0", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "clear", "(", "interface", ")", "#NEWLINE#", "cmd", "=", "'tc qdisc add dev {0} root n...
false
0
[ "4", "23", "32", "interface", "2", "19", "61", "self", "6", "42", "percent", "8", "34", "delay", "12", "51", "54", "correlation", "26", "65", "cmd" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": 22, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 25, "after_index": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "kdart/pycopia/net/pycopia/router.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 reorder(self, interface, percent, delay = 10, correlation = 0) : self.clear (interface) cmd = 'tc qdisc add dev {0} root netem delay {1:3.0d}ms reorder {2} {3}'.format (interface, delay, '{0:2.1f}%'.format (float (percent)), ('{0:2.1f}%'.format (correlation) if correlation else '')) return self._perf...
No
1,010
[ "#NEWLINE#", "@", "celery", ".", "task", "(", ")", "#NEWLINE#", "def run_topic_modeling(", "username", ",", "folder_id", ",", "ex_id", ")", ":", "#NEWLINE#", "#INDENT#", "d", "=", "Folder", ".", "query", ".", "get", "(", "folder_id", ")", "#NEWLINE#", "ex", ...
false
0
[ "9", "42", "348", "425", "username", "29", "46", "61", "429", "ex", "99", "105", "137", "148", "x", "116", "127", "v", "75", "109", "vocabfile", "59", "376", "404", "exinfo", "331", "398", "a", "228", "252", "259", "289", "dID", "184", "240", "25...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 25, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 28, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "daeilkim/refinery/refinery/refinery/webapp/topicmodel.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...
@ celery.task () def run_topic_modeling(username, folder_id, ex_id) : d = Folder.query.get (folder_id) ex = Experiment.query.get (ex_id) set_tm_status (username, folder_id, ex, 'inprogress') db.session.commit () exinfo = ex.getExInfo () datafile = d.wordcount_path () vocabfile = d.vo...
No
1,011
[ "#NEWLINE#", "def test_invalid_arguments(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "template", "=", "'{% lazy_paginate objects %}{% get_pages foo bar %}'", "#NEWLINE#", "request", "=", "self", ".", "request", "(", ")", "#NEWLINE#", "with", "self", ".", "assertRaises",...
false
0
[ "11", "15", "33", "request", "2", "13", "20", "29", "self", "7", "35", "template" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "shtalinberg/django-el-pagination/el_pagination/tests/templatetags/test_el_pagination_tags.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_invalid_arguments(self) : template = '{% lazy_paginate objects %}{% get_pages foo bar %}' request = self.request () with self.assertRaises (TemplateSyntaxError) : self.render (request, template) Is there a bug in the code above?
No
1,012
[ "#NEWLINE#", "@", "event", ".", "prop", "#NEWLINE#", "def C(", "self", ",", "t", "=", "0", ")", ":", "#NEWLINE#", "#INDENT#", "t", "=", "float", "(", "t", ")", "#NEWLINE#", "self", ".", "F", "=", "(", "(", "t", "*", "1.8", ")", "+", "32", ")", ...
false
0
[ "7", "23", "self", "9", "16", "20", "29", "38", "t" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 8, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 19, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "zoofIO/flexx/examples/event/temperature.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...
@ event.prop def C(self, t = 0) : t = float (t) self.F = ((t * 1.8) + 32) return t Is there a bug in the code above?
No
1,013
[ "#NEWLINE#", "def predict(", "self", ",", "X", ")", ":", "#NEWLINE#", "#INDENT#", "'Predict values using the model\\n\\n Parameters\\n ----------\\n X : {array-like, sparse matrix} of shape [n_samples, n_features]\\n\\n Returns\\n -------\\n C : numpy arra...
false
0
[ "11", "28", "raw_predictions", "20", "32", "class_predictions", "2", "13", "22", "self", "4", "17", "X" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 16,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "dclambert/Python-ELM/elm.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 predict(self, X) : 'Predict values using the model Parameters ---------- X : {array-like, sparse matrix} of shape [n_samples, n_features] Returns ------- C : numpy array of shape [n_samples, n_outputs] Predicted values. ' raw_prediction...
No
1,014
[ "#NEWLINE#", "@", "classmethod", "#NEWLINE#", "def _reals_index(", "cls", ",", "reals", ",", "index", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Map initial real root index to an index in a factor where\\n the root belongs.\\n '", "#NEWLINE#", "i", "=", "0", ...
false
0
[ "7", "35", "74", "reals", "29", "47", "111", "k", "54", "86", "99", "poly", "16", "45", "109", "i", "22", "77", "j", "25", "67", "71", "_", "9", "42", "56", "91", "101", "index", "27", "60", "69", "84", "factor", "5", "cls" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 6, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "sympy/sympy/sympy/polys/rootoftools.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...
@ classmethod def _reals_index(cls, reals, index) : ' Map initial real root index to an index in a factor where the root belongs. ' i = 0 for (j, (_, factor, k)) in enumerate (reals) : if (index < (i + k)) : (poly, index) = (factor, 0) for (_, f...
No
1,015
[ "#NEWLINE#", "def _get_module(", "self", ",", "node", ")", ":", "#NEWLINE#", "#INDENT#", "include_paths", "=", "(", "[", "os", ".", "path", ".", "dirname", "(", "self", ".", "filename", ")", "]", "+", "self", ".", "include_paths", ")", "#NEWLINE#", "(", ...
false
0
[ "65", "78", "msg", "120", "145", "217", "ast_list", "148", "150", "158", "_f", "9", "27", "44", "include_paths", "128", "152", "builder", "31", "49", "134", "source", "21", "33", "42", "60", "71", "90", "105", "136", "197", "215", "224", "filename", ...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 24, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 29, "after_index": 43...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "myint/cppclean/cpp/find_warnings.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def _get_module(self, node) : include_paths = ([os.path.dirname (self.filename)] + self.include_paths) (source, filename) = headers.read_source (node.filename, include_paths) if (source is None) : module = Module (filename, None) msg = "unable to find '{}'".format (filename) se...
No
1,016
[ "#NEWLINE#", "def delete(", "self", ",", "request", ",", "obj_id", ")", ":", "#NEWLINE#", "#INDENT#", "api", ".", "nova", ".", "flavor_delete", "(", "request", ",", "obj_id", ")" ]
false
0
[ "6", "19", "obj_id", "2", "self", "4", "17", "request" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 18, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "CiscoSystems/avos/openstack_dashboard/dashboards/admin/flavors/tables.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 delete(self, request, obj_id) : api.nova.flavor_delete (request, obj_id) Is there a bug in the code above?
No
1,017
[ "#NEWLINE#", "def _do_list(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "print_table", "(", "[", "(", "title", ",", "int", "(", "edits", ")", ",", "format_datetime", "(", "from_utimestamp", "(", "modified", ")", ",", "console_datetime_format", ")", ")", "for"...
false
0
[ "11", "30", "title", "22", "34", "modified", "2", "37", "self", "15", "32", "edits" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 46, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 46, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 12...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "edgewall/trac/trac/wiki/admin.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 _do_list(self) : print_table ([(title, int (edits), format_datetime (from_utimestamp (modified), console_datetime_format)) for (title, edits, modified) in self.env.db_query (' SELECT name, max(version), max(time) FROM wiki GROUP BY name ORDER BY name')], [_ ('Title'), _ ...
No
1,018
[ "#NEWLINE#", "def setText(", "dom", ",", "node", ",", "text", ")", ":", "#NEWLINE#", "#INDENT#", "for", "currNode", "in", "node", ".", "childNodes", ":", "#NEWLINE#", "#INDENT#", "if", "(", "currNode", ".", "nodeType", "==", "currNode", ".", "TEXT_NODE", ")"...
false
0
[ "43", "56", "textNode", "2", "45", "dom", "12", "22", "26", "33", "currNode", "4", "14", "52", "node", "6", "37", "49", "text" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "jiaweihli/manga_downloader/src/util.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 setText(dom, node, text) : for currNode in node.childNodes : if (currNode.nodeType == currNode.TEXT_NODE) : currNode.data = text return textNode = dom.createTextNode (text) node.appendChild (textNode) Is there a bug in the code above?
No
1,019
[ "#NEWLINE#", "def test_complete_bipartite_graph(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "G", "=", "complete_bipartite_graph", "(", "0", ",", "0", ")", "#NEWLINE#", "assert_true", "(", "is_isomorphic", "(", "G", ",", "null_graph", "(", ")", ")", ")", "#NEWL...
false
0
[ "7", "20", "39", "52", "61", "74", "84", "97", "106", "119", "128", "141", "173", "186", "200", "260", "268", "290", "299", "309", "319", "336", "G", "152", "177", "190", "204", "m1", "232", "251", "mG", "285", "331", "has_edges", "29", "43", "...
0
NONE
[]
[ [ { "before_index": 6, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 28, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "networkx/networkx/networkx/algorithms/bipartite/tests/test_generators.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_complete_bipartite_graph(self) : G = complete_bipartite_graph (0, 0) assert_true (is_isomorphic (G, null_graph ())) for i in [1, 5] : G = complete_bipartite_graph (i, 0) assert_true (is_isomorphic (G, empty_graph (i))) G = complete_bipartite_graph (0, i) asser...
No
1,020
[ "#NEWLINE#", "def list(", "self", ",", "request", ",", "*", "args", ",", "**kwargs", ")", ":", "#NEWLINE#", "#INDENT#", "' Returns authenticated user profile'", "#NEWLINE#", "if", "(", "request", "and", "(", "not", "request", ".", "user", ".", "is_anonymous", "(...
false
0
[ "kwargs", "7", "args", "2", "self", "62", "101", "serializer", "4", "18", "22", "38", "76", "91", "request", "34", "46", "53", "session" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 3, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 14,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "kobotoolbox/kobocat/onadata/apps/api/viewsets/connect_viewset.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 list(self, request, * args, **kwargs) : ' Returns authenticated user profile' if (request and (not request.user.is_anonymous ())) : session = getattr (request, 'session') if (not session.session_key) : session.set_expiry (DEFAULT_SESSION_EXPIRY_TIME) serializer = UserProfil...
No
1,021
[ "#NEWLINE#", "def connectionQualityMonitor(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "\"Checks to see if the connection for this factory appears to\\n be delivering stats at a speed close to what we're receiving\\n them at.\\n\\n This is open to other measures of connection quality.\\n\\n...
false
0
[ "9", "72", "destination_sent", "27", "56", "74", "total_received", "2", "19", "47", "self" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 26, "after_index": 30...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "graphite-project/carbon/lib/carbon/client.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 connectionQualityMonitor(self) : "Checks to see if the connection for this factory appears to be delivering stats at a speed close to what we're receiving them at. This is open to other measures of connection quality. Returns a Bool True means that quality is good, OR True means that...
No
1,022
[ "#NEWLINE#", "def read(", "self", ",", "directory", ")", ":", "#NEWLINE#", "#INDENT#", "content", "=", "sorted", "(", "os", ".", "listdir", "(", "directory", ")", ")", "#NEWLINE#", "directories", "=", "[", "]", "#NEWLINE#", "files", "=", "[", "]", "#NEWLIN...
false
0
[ "26", "71", "146", "files", "4", "17", "51", "112", "directory", "9", "34", "content", "21", "59", "127", "directories", "125", "138", "d", "80", "85", "92", "99", "117", "131", "150", "168", "result", "32", "53", "63", "75", "144", "157", "f", "...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 20, "after_index": 23...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "jonathanslenders/pyvim/pyvim/io/backends.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 read(self, directory) : content = sorted (os.listdir (directory)) directories = [] files = [] for f in content : if os.path.isdir (os.path.join (directory, f)) : directories.append (f) else : files.append (f) result = [] result.append ('" ===============...
No
1,023
[ "#NEWLINE#", "def on_regexradio(", "self", ",", "checked", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "fileops", ".", "regex", "=", "checked", "#NEWLINE#", "if", "(", "self", ".", "fileops", ".", "matchfiltercheck", "or", "self", ".", "fileops", ".", "m...
false
0
[ "2", "9", "19", "25", "34", "42", "self", "4", "15", "checked" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 24...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "mikar/demimove/demimove/gui.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 on_regexradio(self, checked) : self.fileops.regex = checked if (self.fileops.matchfiltercheck or self.fileops.matchexcludecheck) : self.update (0) self.update () Is there a bug in the code above?
No
1,024
[ "#NEWLINE#", "def on_deletecheck(", "self", ",", "checked", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "fileops", ".", "deletecheck", "=", "checked", "#NEWLINE#", "self", ".", "update", "(", ")" ]
false
0
[ "2", "9", "17", "self", "4", "15", "checked" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 20...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "mikar/demimove/demimove/gui.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 on_deletecheck(self, checked) : self.fileops.deletecheck = checked self.update () Is there a bug in the code above?
No
1,025
[ "#NEWLINE#", "def __init__(", "self", ",", "html", ",", "**ka", ")", ":", "#NEWLINE#", "#INDENT#", "if", "html", ":", "#NEWLINE#", "#INDENT#", "ka", "[", "'HTML'", "]", "=", "html", "#NEWLINE#", "#UNINDENT#", "element", "=", "(", "ka", ".", "pop", "(", "...
false
0
[ "16", "27", "57", "ka", "24", "47", "element", "2", "43", "54", "self", "4", "12", "21", "html" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 23, "after_index": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "anandology/pyjamas/library/gwt/ui/HTMLPanel.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, html, **ka) : if html : ka ['HTML'] = html element = (ka.pop ('Element', None) or DOM.createDiv ()) self.setElement (element) ComplexPanel.__init__ (self, ** ka) Is there a bug in the code above?
No
1,026
[ "#NEWLINE#", "def test_HALNavigator__identity_map(", ")", ":", "#NEWLINE#", "#INDENT#", "with", "httprettify", "(", ")", ":", "#NEWLINE#", "#INDENT#", "index_uri", "=", "'http://www.example.com/'", "#NEWLINE#", "page1_uri", "=", "(", "index_uri", "+", "'1'", ")", "#NE...
false
0
[ "63", "140", "page1_links", "17", "53", "119", "138", "page1_uri", "175", "223", "page2", "25", "75", "145", "page2_uri", "198", "218", "225", "235", "page4", "157", "170", "177", "187", "200", "N", "41", "133", "index_links", "107", "154", "page3_links"...
0
NONE
[]
[ [ { "before_index": 12, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 21, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 24, "after_index":...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "deontologician/restnavigator/tests/test_hal_nav.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_HALNavigator__identity_map() : with httprettify () : index_uri = 'http://www.example.com/' page1_uri = (index_uri + '1') page2_uri = (index_uri + '2') page3_uri = (index_uri + '3') index_links = { 'first' : { 'href' : page1_uri, }...
No
1,027
[ "#NEWLINE#", "def _insert(", "self", ",", "key", ",", "value", ")", ":", "#NEWLINE#", "#INDENT#", "flat_key", "=", "self", ".", "_serialize_key", "(", "key", ")", "#NEWLINE#", "i", "=", "self", ".", "_index", ".", "get", "(", "flat_key", ",", "(", "-", ...
false
0
[ "11", "28", "80", "flat_key", "2", "13", "22", "45", "63", "76", "86", "self", "6", "55", "72", "value", "20", "38", "49", "i", "4", "17", "53", "70", "key" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 19, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "datastax/python-driver/cassandra/util.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def _insert(self, key, value) : flat_key = self._serialize_key (key) i = self._index.get (flat_key, (- 1)) if (i >= 0) : self._items [i] = (key, value) else : self._items.append ((key, value)) self._index [flat_key] = (len (self._items) - 1) Is there a bug in the code above?
No
1,028
[ "#NEWLINE#", "def __init__(", "self", ",", "attribute", "=", "None", ",", "default", "=", "NOT_PROVIDED", ",", "null", "=", "False", ",", "blank", "=", "False", ",", "readonly", "=", "False", ",", "unique", "=", "False", ",", "help_text", "=", "None", ",...
false
0
[ "8", "100", "default", "24", "122", "124", "unique", "20", "116", "118", "readonly", "12", "104", "106", "null", "36", "163", "165", "verbose_name", "28", "168", "174", "176", "help_text", "4", "59", "61", "68", "77", "84", "attribute", "2", "45", "5...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 42, "after_index": 43, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 44, "after_index": 4...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "django-tastypie/django-tastypie/tastypie/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 __init__(self, attribute = None, default = NOT_PROVIDED, null = False, blank = False, readonly = False, unique = False, help_text = None, use_in = 'all', verbose_name = None) : ' Sets up the field. This is generally called when the containing ``Resource`` is initialized. Optionally acc...
No
1,029
[ "#NEWLINE#", "def __init__(", "self", ",", "attribute", "=", "None", ",", "default", "=", "NOT_PROVIDED", ",", "null", "=", "False", ",", "blank", "=", "False", ",", "readonly", "=", "False", ",", "unique", "=", "False", ",", "help_text", "=", "None", ",...
false
0
[ "8", "100", "default", "24", "122", "124", "unique", "20", "116", "118", "readonly", "12", "104", "106", "null", "36", "163", "165", "verbose_name", "28", "168", "174", "176", "help_text", "4", "59", "61", "68", "77", "84", "attribute", "2", "45", "5...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 42, "after_index": 43, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 44, "after_index": 4...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "django-tastypie/django-tastypie/tastypie/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 __init__(self, attribute = None, default = NOT_PROVIDED, null = False, blank = False, readonly = False, unique = False, help_text = None, use_in = 'all', verbose_name = None) : ' Sets up the field. This is generally called when the containing ``Resource`` is initialized. Optionally acc...
No
1,030
[ "#NEWLINE#", "def get_project_name(", "working_dir", ",", "project_name", "=", "None", ",", "environment", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "def normalize_name(", "name", ")", ":", "#NEWLINE#", "#INDENT#", "return", "re", ".", "sub", "(", "'[^a-z0-9...
false
0
[ "8", "41", "46", "61", "environment", "75", "105", "normalize_name", "2", "52", "95", "working_dir", "4", "56", "59", "70", "77", "project_name", "81", "100", "107", "project" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 38, "after_index": 40, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 55, "after_index": 6...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "docker/compose/compose/cli/command.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def get_project_name(working_dir, project_name = None, environment = None) : def normalize_name(name) : return re.sub ('[^a-z0-9]', '', name.lower ()) if (not environment) : environment = Environment.from_env_file (working_dir) project_name = (project_name or environment.get ('COMPOSE_PROJECT_N...
No
1,031
[ "#NEWLINE#", "def _partition_list(", "item", ")", ":", "#NEWLINE#", "#INDENT#", "scalars", "=", "[", "]", "#NEWLINE#", "non_scalars", "=", "[", "]", "#NEWLINE#", "for", "element", "in", "item", ":", "#NEWLINE#", "#INDENT#", "if", "isinstance", "(", "element", ...
false
0
[ "18", "27", "42", "54", "element", "7", "50", "61", "scalars", "2", "20", "item", "12", "38", "63", "non_scalars" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "aws/aws-cli/awscli/text.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 _partition_list(item) : scalars = [] non_scalars = [] for element in item : if isinstance (element, (list, dict)) : non_scalars.append (element) else : scalars.append (element) return (scalars, non_scalars) Is there a bug in the code above?
No
1,032
[ "#NEWLINE#", "def test_update_db_unapprove_existing(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "\"\\n Any existing translations that don't match anything in VCS get\\n unapproved, unless they were created after self.now.\\n \"", "#NEWLINE#", "self", ".", "main_db_transl...
false
0
[ "2", "9", "17", "32", "44", "52", "71", "91", "97", "107", "self", "63", "124", "132", "created_after_translation" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 26...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "mozilla/pontoon/pontoon/sync/tests/test_changeset.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_update_db_unapprove_existing(self) : " Any existing translations that don't match anything in VCS get unapproved, unless they were created after self.now. " self.main_db_translation.approved = True self.main_db_translation.approved_date = aware_datetime (1970, 1, 1) ...
No
1,033
[ "#NEWLINE#", "def complete(", "self", ",", "field_name", ",", "query", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Returns a list of close values for auto-completion\\n '", "#NEWLINE#", "if", "(", "field_name", "not in", "(", "self", ".", "model", ".", "Elastic...
false
0
[ "2", "18", "55", "self", "4", "15", "40", "51", "field_name", "6", "63", "query", "45", "61", "complete_name" ]
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": "liberation/django-elasticsearch/django_elasticsearch/managers.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 complete(self, field_name, query) : ' Returns a list of close values for auto-completion ' if (field_name not in (self.model.Elasticsearch.completion_fields or [])) : raise ValueError ('{0} is not in the completion_fields list, it is required to have a specific mapping.'.format (f...
No
1,034
[ "#NEWLINE#", "def test_document_type_edit_view_no_permission(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "login", "(", "username", "=", "TEST_USER_USERNAME", ",", "password", "=", "TEST_USER_PASSWORD", ")", "#NEWLINE#", "response", "=", "self", ".", "po...
false
0
[ "20", "67", "response", "2", "7", "22", "31", "63", "74", "86", "self" ]
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": 62, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "mayan-edms/mayan-edms/mayan/apps/documents/tests/test_views.py", "license": "apache-2.0", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_document_type_edit_view_no_permission(self) : self.login (username = TEST_USER_USERNAME, password = TEST_USER_PASSWORD) response = self.post ('documents:document_type_edit', args = (self.document_type.pk,), data = { 'label' : TEST_DOCUMENT_TYPE_EDITED_LABEL, 'delete_time_period' : D...
No
1,035
[ "#NEWLINE#", "def set_ResourceOwnerId(", "self", ",", "ResourceOwnerId", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "add_query_param", "(", "'ResourceOwnerId'", ",", "ResourceOwnerId", ")" ]
false
0
[ "4", "15", "ResourceOwnerId", "2", "9", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 10...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "aliyun/aliyun-openapi-python-sdk/aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/DescribeZonesRequest.py", "license": "apache-2.0", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def set_ResourceOwnerId(self, ResourceOwnerId) : self.add_query_param ('ResourceOwnerId', ResourceOwnerId) Is there a bug in the code above?
No
1,036
[ "#NEWLINE#", "def test_isin(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "sparse_df", "=", "DataFrame", "(", "{", "#NEWLINE#", "#INDENT#", "'flag'", ":", "[", "1.0", ",", "0.0", ",", "1.0", "]", ",", "#NEWLINE#", "#UNINDENT#", "}", ")", ".", "to_sparse", ...
false
0
[ "49", "71", "rs", "36", "69", "xp", "7", "38", "41", "51", "53", "sparse_df", "2", "self" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 30, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 35, "after_index": 39, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 48, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "pydata/pandas/pandas/sparse/tests/test_frame.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_isin(self) : sparse_df = DataFrame ({ 'flag' : [1.0, 0.0, 1.0], }).to_sparse (fill_value = 0.0) xp = sparse_df [(sparse_df.flag == 1.0)] rs = sparse_df [sparse_df.flag.isin ([1.0])] tm.assert_frame_equal (xp, rs) Is there a bug in the code above?
No
1,037
[ "#NEWLINE#", "def normalize_width(", "width", ",", "err", ")", ":", "#NEWLINE#", "#INDENT#", "\"\\n Split width into (width_type, width_amount). Raise exception err\\n if width doesn't match a valid alignment.\\n \"", "#NEWLINE#", "if", "(", "width", "in", "(", "CLIP", ",...
false
0
[ "2", "13", "26", "40", "52", "65", "74", "81", "93", "105", "width", "4", "99", "err" ]
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": "AnyMesh/anyMesh-Python/example/urwid/decoration.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 normalize_width(width, err) : " Split width into (width_type, width_amount). Raise exception err if width doesn't match a valid alignment. " if (width in (CLIP, PACK)) : return (width, None) else : if (type (width) == int) : return (GIVEN, width) else : ...
No
1,038
[ "#NEWLINE#", "@", "staticmethod", "#NEWLINE#", "def rawmessage_to_message(", "rawmsg", ")", ":", "#NEWLINE#", "#INDENT#", "rawmsg", "=", "[", "ord", "(", "b", ")", "for", "b", "in", "rawmsg", "]", "#NEWLINE#", "message", "=", "ControlMessage", "(", "cdc", "=",...
false
0
[ "15", "18", "b", "23", "97", "message", "5", "10", "20", "29", "36", "43", "52", "67", "81", "87", "rawmsg" ]
0
NONE
[]
[ [ { "before_index": 9, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 33, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 96, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "smartanthill/smartanthill1_0/smartanthill/network/protocol.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...
@ staticmethod def rawmessage_to_message(rawmsg) : rawmsg = [ord (b) for b in rawmsg] message = ControlMessage (cdc = rawmsg [0], source = rawmsg [1], destination = rawmsg [2], ack = ((rawmsg [3] & 128) > 0), ttl = ((rawmsg [3] & 120) >> 3), data = (rawmsg [5 :] if rawmsg [4] else None)) return message ...
No
1,039
[ "#NEWLINE#", "def __init__(", "self", ",", "climessage_callback", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "climesage_callback", "=", "climessage_callback" ]
false
0
[ "4", "13", "climessage_callback", "2", "9", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 13, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 9,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "smartanthill/smartanthill1_0/smartanthill/network/protocol.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, climessage_callback) : self.climesage_callback = climessage_callback Is there a bug in the code above?
No
1,040
[ "#NEWLINE#", "def visit__Variable(", "self", ",", "node", ")", ":", "#NEWLINE#", "#INDENT#", "mine", "=", "(", "set", "(", "[", "node", "]", ")", "if", "node", ".", "_has_output", "(", ")", "else", "set", "(", ")", ")", "#NEWLINE#", "return", "mine" ]
false
0
[ "9", "31", "mine", "4", "15", "19", "node", "2", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 18, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 30, "after_index": 31...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "PyHDI/veriloggen/veriloggen/dataflow/visitor.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 visit__Variable(self, node) : mine = (set ([node]) if node._has_output () else set ()) return mine Is there a bug in the code above?
No
1,041
[ "#NEWLINE#", "def to_python(", "self", ",", "value", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "value", "==", "'{}'", ")", ":", "#NEWLINE#", "#INDENT#", "return", "[", "]", "#NEWLINE#", "#UNINDENT#", "if", "isinstance", "(", "self", ",", "(", "str", ",...
true
26
[ "2", "26", "39", "43", "46", "4", "11", "48", "66" ]
1
VARIABLE_MISUSE
[ 4, 11, 48, 66 ]
[ [ { "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": 23, "after_index": 27...
[ { "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 to_python(self, value) : if (value == '{}') : return [] if isinstance (self, (str, unicode)) : return [self.coerce (v) for v in value [1 : (- 1)].split (',')] return value Is there a bug in the code above?
Yes
1,042
[ "#NEWLINE#", "def tapImage(", "self", ",", "imageUri", ",", "pos", "=", "(", "0.5", ",", "0.5", ")", ",", "duration", "=", "0.0", ",", "locateTimeout", "=", "None", ",", "**kwargs", ")", ":", "#NEWLINE#", "#INDENT#", "locations", "=", "self", ".", "locat...
true
35
[ "18", "6", "4", "33", "35", "49", "27", "41", "60", "2", "29", "54", "14", "69" ]
1
VARIABLE_MISUSE
[ 18 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 26, "after_index": 34, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 38, "after_index": 4...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "teroc/Otero/opentestrobot/userinteraction.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 tapImage(self, imageUri, pos = (0.5, 0.5), duration = 0.0, locateTimeout = None, **kwargs) : locations = self.locateImage (imageUri, imageUri) if (not locations) : raise ImageNotRecognizedError (imageUri) return self._gesture.tap (locations [0].getPos (), duration) Is there a bug in the code a...
Yes
1,043
[ "#NEWLINE#", "def should_fire(", "self", ",", "watermark", ",", "window", ",", "context", ")", ":", "#NEWLINE#", "#INDENT#", "return", "(", "context", ".", "get_state", "(", "context", ".", "COUNT_TAG", ")", ">=", "self", ".", "count", ")" ]
true
19
[ "8", "15", "19", "6", "2", "24", "4" ]
1
VARIABLE_MISUSE
[ 2, 24 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 23, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 23, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "GoogleCloudPlatform/DataflowPythonSDK/google/cloud/dataflow/transforms/trigger.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 should_fire(self, watermark, window, context) : return (context.get_state (context.COUNT_TAG) >= self.count) Is there a bug in the code above?
Yes
1,044
[ "#NEWLINE#", "def add_state(", "self", ",", "window", ",", "tag", ",", "value", ")", ":", "#NEWLINE#", "#INDENT#", "if", "isinstance", "(", "tag", ",", "ValueStateTag", ")", ":", "#NEWLINE#", "#INDENT#", "raise", "ValueError", "(", "(", "'Merging requested for n...
true
47
[ "6", "16", "29", "2", "34", "40", "8", "47", "49", "4", "44" ]
1
VARIABLE_MISUSE
[ 6, 16, 29 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 33, "after_index": 4...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "GoogleCloudPlatform/DataflowPythonSDK/google/cloud/dataflow/transforms/trigger.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def add_state(self, window, tag, value) : if isinstance (tag, ValueStateTag) : raise ValueError (('Merging requested for non-mergeable state tag: %r.' % tag)) self.raw_state.add_state (self._get_id (window), value, value) Is there a bug in the code above?
Yes
1,045
[ "#NEWLINE#", "def __init__(", "self", ",", "document", "=", "None", ",", "cache", "=", "True", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "cache", "=", "cache", "#NEWLINE#", "self", ".", "_waypoints", "=", "{", "#NEWLINE#", "#INDENT#", "#NEWLINE#", "#UN...
true
157
[ "8", "17", "19", "157", "4", "174", "185", "2", "15", "21", "32", "43", "54", "87", "94", "101", "108", "115", "122", "129", "136", "143", "150", "164", "181" ]
1
VARIABLE_MISUSE
[ 2, 15, 21, 32, 43, 54, 87, 94, 101, 108, 115, 122, 129, 136, 143, 150, 164, 181 ]
[ [ { "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": "golismero/golismero/thirdparty_libs/geopy/parsers/gpx.py", "license": "gpl-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, document = None, cache = True) : self.cache = cache self._waypoints = { } self._routes = { } self._tracks = { } self.type_handlers = { 'string' : (lambda e : e.text), 'uri' : (lambda e : e.text), 'datetime' : self._pars...
Yes
1,046
[ "#NEWLINE#", "def _process_punctuation(", "self", ",", "token", ",", "content", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "content", "==", "'('", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "parens", "+=", "1", "#NEWLINE#", "#UNINDENT#", "else", ":", ...
true
53
[ "6", "13", "33", "4", "53", "2", "20", "40", "60", "71" ]
1
VARIABLE_MISUSE
[ 6, 13, 33 ]
[ [ { "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": 14, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "wakatime/komodo-wakatime/components/wakatime/dependencies/go.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 _process_punctuation(self, token, content) : if (content == '(') : self.parens += 1 else : if (content == ')') : self.parens -= 1 else : if (token == '.') : self.aliases += 1 else : self.state = None Is there a bug in the code a...
Yes
1,047
[ "#NEWLINE#", "def test_length_validator(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "with", "pytest", ".", "raises", "(", "ValueError", ")", ":", "#NEWLINE#", "#INDENT#", "Length", "(", "(", "-", "1", ")", ")", "#NEWLINE#", "#UNINDENT#", "with", "pytest", "....
true
165
[ "2", "132", "178", "42", "163", "87", "165", "176" ]
1
VARIABLE_MISUSE
[ 132, 178 ]
[ [ { "before_index": 41, "after_index": 44, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 86, "after_index": 89, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 131, "after_index"...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "mansam/validator.py/tests/test_validator.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_length_validator(self) : with pytest.raises (ValueError) : Length ((- 1)) with pytest.raises (ValueError) : Length (0) passes = { 'foo' : [Required, Length (5), Length (1, maximum = 5)], 'bar' : [Required, Length (0, maximum = 10)], } fails = { 'foo' : ...
Yes
1,048
[ "#NEWLINE#", "def testGe(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "a", "=", "util", ".", "MathString", "(", "'2'", ")", "#NEWLINE#", "b", "=", "util", ".", "MathString", "(", "'1.5'", ")", "#NEWLINE#", "self", ".", "assertEquals", "(", "(", "a", ">=...
true
71
[ "7", "30", "43", "56", "84", "97", "2", "25", "38", "51", "64", "71", "77", "90", "16", "58", "95" ]
1
VARIABLE_MISUSE
[ 7, 30, 43, 56, 84, 97 ]
[ [ { "before_index": 6, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 21, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 24, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "marineam/nagcat/python/nagcat/unittests/test_util.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def testGe(self) : a = util.MathString ('2') b = util.MathString ('1.5') self.assertEquals ((a >= 1), True) self.assertEquals ((a >= 2), True) self.assertEquals ((a >= b), True) self.assertEquals ((1 >= self), False) self.assertEquals ((2 >= a), True) self.assertEquals ((b >= a),...
Yes
1,049
[ "#NEWLINE#", "def __init__(", "self", ",", "id", ",", "runner", ",", "arguments", "=", "{", "#NEWLINE#", "#INDENT#", "#NEWLINE#", "#UNINDENT#", "}", ",", "validationExpression", "=", "'VAL_TRUE'", ",", "taskName", "=", "''", ",", "relativePathToLogDir", "=", "''...
true
117
[ "2", "55", "61", "67", "73", "83", "89", "95", "101", "107", "113", "119", "125", "137", "146", "152", "6", "85", "87", "25", "115", "17", "91", "93", "29", "121", "123", "4", "63", "65", "46", "154", "156", "42", "148", "150", "21", "109", ...
1
VARIABLE_MISUSE
[ 25, 115 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 52, "after_index": 53, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 54, "after_index": 5...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "mikrosimage/OpenRenderManagement/src/octopus/worker/model/command.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, id, runner, arguments = { }, validationExpression = 'VAL_TRUE', taskName = '', relativePathToLogDir = '', message = '', environment = { }, runnerPackages = None, watcherPackages = None) : ' :param id: command id :param arguments: command arguments as a dict :p...
Yes
1,050
[ "#NEWLINE#", "def test_converted_blacklist_import_test(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "profiles", "=", "self", ".", "config", ".", "get_option", "(", "'profiles'", ")", "#NEWLINE#", "test", "=", "self", "[", "'test_3'", "]", "#NEWLINE#", "self", "."...
true
20
[ "18", "36", "2", "9", "20", "25", "7" ]
1
VARIABLE_MISUSE
[ 7 ]
[ [ { "before_index": 6, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 21, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 24, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack/bandit/tests/unit/core/test_config.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_converted_blacklist_import_test(self) : profiles = self.config.get_option ('profiles') test = self ['test_3'] self.assertEqual (set (['B001']), test ['include']) Is there a bug in the code above?
Yes
1,051
[ "#NEWLINE#", "def test_ball_left_and_return_failure(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "_requesting", "=", "0", "#NEWLINE#", "coil2", "=", "self", ".", "machine", ".", "coils", "[", "'eject_coil2'", "]", "#NEWLINE#", "device2", "=", "self",...
true
221
[ "2", "7", "15", "26", "37", "54", "60", "70", "75", "85", "90", "100", "105", "118", "133", "139", "152", "167", "180", "195", "202", "215", "226", "239", "246", "252", "257", "263", "268", "274", "24", "13", "46", "125", "159", "187", "208", ...
1
VARIABLE_MISUSE
[ 2, 7, 15, 26, 37, 54, 60, 70, 75, 85, 90, 100, 105, 118, 133, 139, 152, 167, 180, 195, 202, 215, 226, 239, 246, 252, 257, 263, 268, 274 ]
[ [ { "before_index": 6, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 20, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 23, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "missionpinball/mpf/tests/test_BallDevice.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_ball_left_and_return_failure(self) : self._requesting = 0 coil2 = self.machine.coils ['eject_coil2'] device2 = self.machine.ball_devices ['test_launcher'] playfield = self.machine.ball_devices ['playfield'] coil2.pulse = MagicMock () self._missing = 0 self.machine.events.add_...
Yes
1,052
[ "#NEWLINE#", "def make_int_list(", "option", ",", "opt", ",", "value", ",", "parser", ")", ":", "#NEWLINE#", "#INDENT#", "try", ":", "#NEWLINE#", "#INDENT#", "values", "=", "[", "int", "(", "i", ")", "for", "i", "in", "value", ".", "split", "(", "','", ...
true
62
[ "22", "25", "62", "17", "60", "66", "2", "4", "48", "6", "27", "50", "8", "40", "58" ]
1
VARIABLE_MISUSE
[ 2 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 55, "after_index": 61, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "springmeyer/nik2img/nik2img.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 make_int_list(option, opt, value, parser) : try : values = [int (i) for i in value.split (',')] except : parser.error (("option %s: invalid integer values: '%s'" % (opt, value))) setattr (parser.values, i.dest, values) Is there a bug in the code above?
Yes
1,053
[ "#NEWLINE#", "def test_token_request(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "request_body", "=", "{", "#NEWLINE#", "#INDENT#", "'code'", ":", "'asdf'", ",", "#NEWLINE#", "'client_id'", ":", "self", ".", "conn", ".", "user_id", ",", "#NEWLINE#", "'client_sec...
true
107
[ "78", "2", "19", "28", "37", "54", "63", "96", "107", "7", "60", "52", "67", "100" ]
1
VARIABLE_MISUSE
[ 78 ]
[ [ { "before_index": 6, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 51, "after_index": 59, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 62, "after_index": 7...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "apache/libcloud/libcloud/test/common/test_google.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_token_request(self) : request_body = { 'code' : 'asdf', 'client_id' : self.conn.user_id, 'client_secret' : self.conn.key, 'redirect_uri' : self.conn.redirect_uri, 'grant_type' : 'authorization_code', } new_token = self.conn._token_request (request_body) ...
Yes
1,054
[ "#NEWLINE#", "def clean(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "'Performs validation on the form.\\n\\n This will check the form fields for errors, calling out to the\\n various clean_* methods.\\n\\n It will check the repository path to see if it represents\\n a val...
true
13
[ "2", "18", "29", "33", "41", "47", "51", "77", "83", "91", "96", "103", "110", "118", "129", "136", "143", "155", "13", "64", "72" ]
1
VARIABLE_MISUSE
[ 2, 18, 29, 33, 41, 47, 51, 77, 83, 91, 96, 103, 110, 118, 129, 136, 143, 155 ]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 150, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "reviewboard/reviewboard/reviewboard/scmtools/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 clean(self) : 'Performs validation on the form. This will check the form fields for errors, calling out to the various clean_* methods. It will check the repository path to see if it represents a valid repository and if an SSH key or HTTPS certificate needs to be verif...
Yes
1,055
[ "#NEWLINE#", "def add_reader(", "self", ",", "fd", ",", "callback", ")", ":", "#NEWLINE#", "#INDENT#", "' Start watching the file descriptor for read availability. '", "#NEWLINE#", "self", ".", "loop", ".", "add_reader", "(", "callback", ",", "callback", ")" ]
true
19
[ "2", "13", "4", "6", "19", "21" ]
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": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "jonathanslenders/python-prompt-toolkit/prompt_toolkit/eventloop/asyncio_posix.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 add_reader(self, fd, callback) : ' Start watching the file descriptor for read availability. ' self.loop.add_reader (callback, callback) Is there a bug in the code above?
Yes
1,056
[ "#NEWLINE#", "def _get_stats(", "self", ",", "task", ",", "start_date", ")", ":", "#NEWLINE#", "#INDENT#", "' Fetches statistic information for given task and start range.\\n '", "#NEWLINE#", "stats", "=", "[", "]", "#NEWLINE#", "stats_dir", "=", "self", ".", "...
true
31
[ "72", "97", "109", "33", "58", "114", "124", "31", "118", "141", "2", "20", "29", "37", "56", "65", "137", "182", "43", "184", "4", "24", "13", "132", "188", "63", "86", "18", "80", "6" ]
1
VARIABLE_MISUSE
[ 6 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "xtrementl/focus/focus/plugin/modules/stats.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def _get_stats(self, task, start_date) : ' Fetches statistic information for given task and start range. ' stats = [] stats_dir = self._sdir (task.base_dir) date = data end_date = datetime.date.today () delta = datetime.timedelta (days = 1) while (date <= end_date) : ...
Yes
1,057
[ "#NEWLINE#", "def test_create_and_parse(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "(", "nA", ",", "nB", ",", "entA", ",", "entB", ")", "=", "self", ".", "make_connected_nodes", "(", ")", "#NEWLINE#", "cidAB", "=", "entA", "[", "'id'", "]", "#NEWLINE#", ...
true
217
[ "2", "17", "65", "121", "213", "194", "223", "105", "192", "92", "116", "10", "82", "129", "174", "78", "14", "94", "141", "181", "207", "165", "203", "23", "40", "56", "69", "89", "137", "156", "30", "58", "217", "163", "179", "205", "109", ...
1
VARIABLE_MISUSE
[ 43, 62 ]
[ [ { "before_index": 6, "after_index": 20, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 26, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 29, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "warner/petmail/petmail/test/test_channel.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_create_and_parse(self) : (nA, nB, entA, entB) = self.make_connected_nodes () cidAB = entA ['id'] c = channel.OutboundChannel (nA.db, cidAB) payload = { 'hi' : 'there', } msgC = c.createMsgC (payload) self.failUnless (msgC.startswith ('c0:')) (CIDToken, CIDBox, msgD)...
Yes
1,058
[ "#NEWLINE#", "def test_pickle(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "msg", "=", "Message", "(", "(", "'some body'", "*", "200000", ")", ",", "content_type", "=", "'text/plain'", ",", "content_encoding", "=", "'utf-8'", ",", "application_headers", "=", "{...
true
97
[ "7", "84", "95", "97", "74", "2" ]
1
VARIABLE_MISUSE
[ 74 ]
[ [ { "before_index": 6, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 73, "after_index": 79, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 93, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "veegee/amqpy/amqpy/tests/test_basic_message.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_pickle(self) : msg = Message (('some body' * 200000), content_type = 'text/plain', content_encoding = 'utf-8', application_headers = { 'foo' : 7, 'bar' : 'baz', 'd2' : { 'foo2' : 'xxx', 'foo3' : (- 1), }, }, delivery_mode = 1, priority = 7) msg2 ...
Yes
1,059
[ "#NEWLINE#", "def test_infrastructure_field_view_out(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "'Testing /infrastructure/field/view/<field_id>'", "#NEWLINE#", "response", "=", "self", ".", "client", ".", "get", "(", "reverse", "(", "'infrastructure_field_view'", ",", "a...
false
0
[ "9", "37", "response", "2", "11", "24", "33", "self" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 32, "after_index": 38...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "treeio/treeio/treeio/infrastructure/tests.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_infrastructure_field_view_out(self) : 'Testing /infrastructure/field/view/<field_id>' response = self.client.get (reverse ('infrastructure_field_view', args = [self.field.id])) self.assertRedirects (response, reverse ('user_login')) Is there a bug in the code above?
No
1,060
[ "#NEWLINE#", "def __query(", "self", ",", "query_string", ",", "instance", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "with", "self", ".", "mysqldb", "(", "instance", "=", "instance", ")", "as", "client", ":", "#NEWLINE#", "#INDENT#", "try", ":", "#NEWL...
false
0
[ "4", "38", "46", "query_string", "6", "18", "20", "instance", "49", "59", "67", "r", "23", "42", "51", "client", "87", "98", "104", "119", "135", "147", "158", "164", "179", "194", "209", "224", "239", "255", "267", "273", "e", "2", "14", "self" ...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "globocom/database-as-a-service/dbaas/drivers/mysqldb.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 __query(self, query_string, instance = None) : with self.mysqldb (instance = instance) as client : try : LOG.debug (('query_string: %s' % query_string)) client.query (query_string) r = client.store_result () if (r is not None) : retu...
No
1,061
[ "#NEWLINE#", "@", "property", "#NEWLINE#", "def selected(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "'Currently selected rows.'", "#NEWLINE#", "return", "[", "int", "(", "_", ")", "for", "_", "in", "self", ".", "eval_js", "(", "'table.selected'", ")", "]" ]
false
0
[ "5", "21", "self", "16", "19", "_" ]
0
NONE
[]
[ [ { "before_index": 9, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 13, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "kwikteam/phy/phy/gui/widgets.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...
@ property def selected(self) : 'Currently selected rows.' return [int (_) for _ in self.eval_js ('table.selected')] Is there a bug in the code above?
No
1,062
[ "#NEWLINE#", "def test_query_cancel(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "f", "=", "self", ".", "resolver", ".", "query", "(", "'google.com'", ",", "'A'", ")", "#NEWLINE#", "self", ".", "resolver", ".", "cancel", "(", ")", "#NEWLINE#", "try", ":", ...
false
0
[ "49", "57", "e", "2", "9", "20", "32", "53", "self", "7", "38", "f" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 19, "after_index": 25, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "saghul/aiodns/tests.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_query_cancel(self) : f = self.resolver.query ('google.com', 'A') self.resolver.cancel () try : self.loop.run_until_complete (f) except aiodns.error.DNSError as e : self.assertEqual (e.args [0], aiodns.error.ARES_ECANCELLED) Is there a bug in the code above?
No
1,063
[ "#NEWLINE#", "def get_google_public_cert_key(", ")", ":", "#NEWLINE#", "#INDENT#", "r", "=", "requests", ".", "get", "(", "GOOGLE_PUBLIC_CERT_URL", ")", "#NEWLINE#", "r", ".", "raise_for_status", "(", ")", "#NEWLINE#", "certificate", "=", "x509", ".", "load_pem_x509...
false
0
[ "6", "15", "27", "r", "21", "43", "certificate", "41", "45", "50", "public_key" ]
0
NONE
[]
[ [ { "before_index": 5, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 18, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 20, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "GoogleCloudPlatform/python-docs-samples/compute/encryption/generate_wrapped_rsa_key.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def get_google_public_cert_key() : r = requests.get (GOOGLE_PUBLIC_CERT_URL) r.raise_for_status () certificate = x509.load_pem_x509_certificate (r.text.encode ('utf-8'), default_backend ()) public_key = certificate.public_key () return public_key Is there a bug in the code above?
No
1,064
[ "#NEWLINE#", "def rename_sentry_privilege(", "self", ",", "oldAuthorizable", ",", "newAuthorizable", ")", ":", "#NEWLINE#", "#INDENT#", "oldAuthorizable", "=", "TSentryAuthorizable", "(", "**", "oldAuthorizable", ")", "#NEWLINE#", "newAuthorizable", "=", "TSentryAuthorizabl...
false
0
[ "4", "11", "16", "37", "39", "oldAuthorizable", "27", "53", "request", "6", "19", "24", "41", "43", "newAuthorizable", "2", "33", "47", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "cloudera/hue/desktop/libs/libsentry/src/libsentry/client.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 rename_sentry_privilege(self, oldAuthorizable, newAuthorizable) : oldAuthorizable = TSentryAuthorizable (** oldAuthorizable) newAuthorizable = TSentryAuthorizable (** newAuthorizable) request = TRenamePrivilegesRequest (requestorUserName = self.username, oldAuthorizable = oldAuthorizable, newAuthoriz...
No
1,065
[ "#NEWLINE#", "def testGenerateArchiveButtonGetsDisabledAfterClick(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "pathspec", "=", "rdf_paths", ".", "PathSpec", "(", "path", "=", "os", ".", "path", ".", "join", "(", "self", ".", "base_path", ",", "'test.plist'", ")"...
false
0
[ "2", "21", "40", "57", "63", "73", "84", "91", "98", "105", "112", "119", "123", "130", "134", "self", "7", "67", "69", "pathspec", "49", "_" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 27, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 83, "after_index": 87, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 90, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "google/grr/grr/gui/plugins/flow_management_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 testGenerateArchiveButtonGetsDisabledAfterClick(self) : pathspec = rdf_paths.PathSpec (path = os.path.join (self.base_path, 'test.plist'), pathtype = rdf_paths.PathSpec.PathType.OS) with self.ACLChecksDisabled () : for _ in test_lib.TestFlowHelper ('GetFile', self.action_mock, client_id = self.cl...
No
1,066
[ "#NEWLINE#", "def d_db(", "arg", ",", "cart", ")", ":", "#NEWLINE#", "#INDENT#", "l", "=", "[", "]", "#NEWLINE#", "for", "token", "in", "arg", ":", "#NEWLINE#", "#INDENT#", "if", "(", "token", "[", "'type'", "]", "==", "'T_ADDRESS'", ")", ":", "#NEWLINE#...
false
0
[ "4", "54", "cart", "15", "23", "39", "token", "2", "17", "arg", "9", "33", "58", "l" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 15...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "gutomaia/pyNES/pynes/directives.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 d_db(arg, cart) : l = [] for token in arg : if (token ['type'] == 'T_ADDRESS') : l.append (int (token ['value'] [1 :], 16)) cart.append_code (l) Is there a bug in the code above?
No
1,067
[ "#NEWLINE#", "def __init__(", "self", ",", "name", "=", "None", ",", "resource_path", "=", "None", ",", "type", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "name", "=", "name", "#NEWLINE#", "self", ".", "resource_path", "=", "resource_path",...
false
0
[ "12", "33", "35", "type", "2", "19", "25", "31", "self", "8", "27", "29", "resource_path", "4", "21", "23", "name" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": 23, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 24, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "Azure/azure-sdk-for-python/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/job/models/job_resource.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, name = None, resource_path = None, type = None) : self.name = name self.resource_path = resource_path self.type = type Is there a bug in the code above?
No
1,068
[ "#NEWLINE#", "def set_stemmer_language(", "language", ")", ":", "#NEWLINE#", "#INDENT#", "global", "STEMMER", "#NEWLINE#", "if", "(", "not", "(", "language", "in", "LANGUAGES", ")", ")", ":", "#NEWLINE#", "#INDENT#", "raise", "ValueError", "(", "(", "(", "'Valid...
false
0
[ "8", "37", "STEMMER", "2", "14", "41", "language" ]
0
NONE
[]
[ [ { "before_index": 10, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 36, "after_index": 40, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index":...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "summanlp/textrank/summa/preprocessing/textcleaner.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def set_stemmer_language(language) : global STEMMER if (not (language in LANGUAGES)) : raise ValueError ((('Valid languages are danish, dutch, english, finnish,' + ' french, german, hungarian, italian, norwegian, porter, portuguese,') + 'romanian, russian, spanish, swedish')) STEMMER = SnowballStemm...
No
1,069
[ "#NEWLINE#", "def _MergeMessage(", "node", ",", "source", ",", "destination", ",", "replace_message", ",", "replace_repeated", ")", ":", "#NEWLINE#", "#INDENT#", "'Merge all fields specified by a sub-tree from source to destination.'", "#NEWLINE#", "source_descriptor", "=", "so...
false
0
[ "8", "135", "254", "replace_message", "10", "137", "157", "replace_repeated", "6", "130", "161", "185", "258", "281", "304", "destination", "181", "210", "227", "repeated_destination", "204", "218", "item", "2", "26", "32", "node", "172", "206", "231", "re...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/net/proto2/python/internal/well_known_types.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def _MergeMessage(node, source, destination, replace_message, replace_repeated) : 'Merge all fields specified by a sub-tree from source to destination.' source_descriptor = source.DESCRIPTOR for name in node : child = node [name] field = source_descriptor.fields_by_name [name] ...
No
1,070
[ "#NEWLINE#", "def check(", "self", ",", "a_in", ",", "a_out", ",", "a_mask", ",", "act", "=", "'Softmax'", ")", ":", "#NEWLINE#", "#INDENT#", "nn", "=", "MLPC", "(", "layers", "=", "[", "L", "(", "act", ")", "]", ",", "learning_rule", "=", "'adam'", ...
false
0
[ "4", "51", "63", "a_in", "2", "self", "10", "26", "act", "6", "53", "a_out", "8", "55", "a_mask", "17", "47", "59", "nn" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 29, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 46, "after_index": 5...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "aigamedev/scikit-neuralnetwork/sknn/tests/test_data.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 check(self, a_in, a_out, a_mask, act = 'Softmax') : nn = MLPC (layers = [L (act)], learning_rule = 'adam', learning_rate = 0.05, n_iter = 250, n_stable = 25) nn.fit (a_in, a_out, a_mask) return nn.predict_proba (a_in) Is there a bug in the code above?
No
1,071
[ "#NEWLINE#", "def on_btnReport_clicked(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "fileName", "=", "QtGui", ".", "QFileDialog", ".", "getSaveFileName", "(", "self", ",", "'Save Report'", ",", "ilastik", ".", "gui", ".", "LAST_DIRECTORY", ",", "'Reports (*.html)'"...
false
0
[ "7", "38", "fileName", "28", "52", "82", "fn", "2", "15", "59", "67", "self" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 27, "after_index": 31, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 41, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "ilastik/ilastik-0.5/ilastik/modules/object_picking/gui/objectPickingRibbon.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 on_btnReport_clicked(self) : fileName = QtGui.QFileDialog.getSaveFileName (self, 'Save Report', ilastik.gui.LAST_DIRECTORY, 'Reports (*.html)') fn = str (QtCore.QDir.convertSeparators (fileName)) ilastik.gui.LAST_DIRECTORY = QtCore.QFileInfo (fn).path () self.parent.project.dataMgr [self.parent....
No
1,072
[ "#NEWLINE#", "def get_method_name(", "self", ",", "raw_post_data", ",", "request_format", "=", "'xml'", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Gets the name of the method to be called given the post data\\n and the format of the data\\n '", "#NEWLINE#", "if", "...
false
0
[ "6", "17", "request_format", "2", "self", "4", "38", "69", "raw_post_data", "63", "78", "87", "102", "jsondict", "31", "42", "method", "29", "params" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 13, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "fp7-ofelia/ocf/optin_manager/src/python/openflow/common/rpc4django/rpcdispatcher.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_method_name(self, raw_post_data, request_format = 'xml') : ' Gets the name of the method to be called given the post data and the format of the data ' if (request_format == 'xml') : try : (params, method) = xmlrpclib.loads (raw_post_data) retu...
No
1,073
[ "#NEWLINE#", "def run(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "_shutdown_event", ".", "wait", "(", "self", ".", "_interval", ")", "#NEWLINE#", "while", "(", "not", "self", ".", "_shutdown_event", ".", "is_set", "(", ")", ")", ":", "#NEWL...
false
0
[ "56", "86", "connections", "139", "168", "262", "295", "e", "2", "7", "13", "21", "74", "90", "199", "213", "233", "314", "337", "375", "384", "self", "307", "324", "exc", "32", "372", "start_time", "58", "131", "166", "190", "293", "305", "327", ...
0
NONE
[]
[ [ { "before_index": 6, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": 20, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "datastax/python-driver/cassandra/connection.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def run(self) : self._shutdown_event.wait (self._interval) while (not self._shutdown_event.is_set ()) : start_time = time.time () futures = [] failed_connections = [] try : for (connections, owner) in [(o.get_connections (), o) for o in self._get_connection_hol...
No
1,074
[ "#NEWLINE#", "def finish(", "self", ",", "time_now", ")", ":", "#NEWLINE#", "#INDENT#", "if", "self", ".", "canceled", ":", "#NEWLINE#", "#INDENT#", "return", "True", "#NEWLINE#", "#UNINDENT#", "if", "(", "time_now", ">=", "self", ".", "end", ")", ":", "#NEW...
false
0
[ "2", "10", "24", "31", "self", "4", "22", "time_now" ]
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": 20, "after_index": 23...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "datastax/python-driver/cassandra/connection.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 finish(self, time_now) : if self.canceled : return True if (time_now >= self.end) : self.callback () return True return False Is there a bug in the code above?
No
1,075
[ "#NEWLINE#", "@", "contextmanager", "#NEWLINE#", "def setup_rest_cache(", "self", ",", "local", "=", "None", ",", "return_failed", "=", "False", ")", ":", "#NEWLINE#", "#INDENT#", "with", "temporary_dir", "(", ")", "as", "artifact_root", ":", "#NEWLINE#", "#INDENT...
false
0
[ "23", "34", "58", "artifact_root", "50", "63", "base_url", "5", "41", "self", "11", "45", "47", "return_failed", "7", "27", "30", "67", "local" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 6, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 20, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "pantsbuild/pants/tests/python/pants_test/cache/test_artifact_cache.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
@ contextmanager def setup_rest_cache(self, local = None, return_failed = False) : with temporary_dir () as artifact_root : local = (local or TempLocalArtifactCache (artifact_root, 0)) with self.setup_server (return_failed = return_failed) as base_url : (yield RESTfulArtifactCache (...
No
1,076
[ "#NEWLINE#", "def testInverse(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "i", "=", "np", ".", "abs", "(", "self", ".", "v", ".", "dot", "(", "self", ".", "w", ")", ")", "#NEWLINE#", "self", ".", "assertTrue", "(", "(", "(", "np", ".", "abs", "("...
false
0
[ "15", "86", "110", "v", "2", "13", "19", "25", "54", "91", "118", "147", "self", "21", "84", "114", "w", "7", "39", "68", "71", "104", "132", "161", "164", "i" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 24, "after_index": 28, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 53, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "scot-dev/scot/scot/tests/test_pca.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 testInverse(self) : i = np.abs (self.v.dot (self.w)) self.assertTrue (((np.abs (np.mean (i.diagonal ())) - 1) < epsilon)) self.assertTrue ((np.abs ((np.sum (i) - i.trace ())) < epsilon)) (w, v) = pca (self.x, subtract_mean = True, normalize = True) i = np.abs (v.dot (w)) self.assertTru...
No
1,077
[ "#NEWLINE#", "def gcd(", "self", ",", "other", ")", ":", "#NEWLINE#", "#INDENT#", "'Greatest common divisor of monomials. '", "#NEWLINE#", "if", "isinstance", "(", "other", ",", "Monomial", ")", ":", "#NEWLINE#", "#INDENT#", "exponents", "=", "other", ".", "exponent...
false
0
[ "4", "14", "23", "35", "48", "61", "other", "21", "25", "46", "76", "78", "exponents", "2", "68", "74", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 15,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "sympy/sympy/sympy/polys/monomials.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 gcd(self, other) : 'Greatest common divisor of monomials. ' if isinstance (other, Monomial) : exponents = other.exponents else : if isinstance (other, (tuple, Tuple)) : exponents = other else : raise TypeError (('an instance of Monomial class expected, got %s'...
No
1,078
[ "#NEWLINE#", "def it_knows_its_partname(", "self", ",", "partname_get_fixture", ")", ":", "#NEWLINE#", "#INDENT#", "(", "part", ",", "expected_partname", ")", "=", "partname_get_fixture", "#NEWLINE#", "assert", "(", "part", ".", "partname", "==", "expected_partname", ...
false
0
[ "2", "self", "4", "15", "partname_get_fixture", "12", "23", "expected_partname", "10", "19", "part" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 22...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "python-openxml/python-docx/tests/opc/test_part.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 it_knows_its_partname(self, partname_get_fixture) : (part, expected_partname) = partname_get_fixture assert (part.partname == expected_partname) Is there a bug in the code above?
No
1,079
[ "#NEWLINE#", "@", "pytest", ".", "fixture", "#NEWLINE#", "def content_type_fixture(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "content_type", "=", "'content/type'", "#NEWLINE#", "part", "=", "Part", "(", "None", ",", "content_type", ",", "None", ",", "None", ...
false
0
[ "7", "self", "12", "22", "33", "content_type", "16", "31", "part" ]
0
NONE
[]
[ [ { "before_index": 11, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 21, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 29, "after_index":...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "python-openxml/python-docx/tests/opc/test_part.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...
@ pytest.fixture def content_type_fixture(self) : content_type = 'content/type' part = Part (None, content_type, None, None) return (part, content_type) Is there a bug in the code above?
No
1,080
[ "#NEWLINE#", "def upload_distribution(", "self", ",", "upload_file", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Upload distribution file and update redis data.\\n '", "#NEWLINE#", "filename", "=", "secure_filename", "(", "upload_file", ".", "filename", ")", "#NEWLIN...
false
0
[ "96", "148", "153", "165", "metadata", "2", "20", "35", "46", "68", "87", "98", "112", "126", "142", "159", "self", "4", "15", "76", "upload_file", "11", "17", "30", "41", "56", "74", "104", "122", "132", "filename", "66", "102", "path" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 14,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "jessemyers/cheddar/cheddar/index/local.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def upload_distribution(self, upload_file) : ' Upload distribution file and update redis data. ' filename = secure_filename (upload_file.filename) self.logger.info ('Uploading distribution: {}'.format (filename)) if self.storage.exists (filename) : self.logger.warn ('Abortin...
No
1,081
[ "#NEWLINE#", "def test_at_fill_value(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "orig", "=", "pd", ".", "DataFrame", "(", "[", "[", "1", ",", "np", ".", "nan", ",", "0", "]", ",", "[", "2", ",", "3", ",", "np", ".", "nan", "]", ",", "[", "0", ...
false
0
[ "7", "72", "96", "165", "orig", "2", "81", "108", "129", "150", "self", "70", "85", "116", "137", "154", "sparse" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 54, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 69, "after_index": 75, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 80, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "pydata/pandas/pandas/sparse/tests/test_indexing.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_at_fill_value(self) : orig = pd.DataFrame ([[1, np.nan, 0], [2, 3, np.nan], [0, np.nan, 4], [0, np.nan, 5]], index = list ('ABCD'), columns = list ('xyz')) sparse = orig.to_sparse (fill_value = 0) self.assertEqual (sparse.at [('A', 'x')], orig.at [('A', 'x')]) self.assertTrue (np.isnan (spa...
No
1,082
[ "#NEWLINE#", "def encode(", "self", ",", "profiles", "=", "[", "]", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Encode and upload media using asynchronous Celery tasks. If\\n ``profiles`` are specified, encode with that list of\\n ``EncodeProfile`` primary keys; otherwise, ...
false
0
[ "50", "65", "76", "profile_id", "4", "25", "30", "36", "52", "profiles", "2", "34", "61", "72", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "jbittel/django-multimedia/multimedia/models.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 encode(self, profiles = []) : ' Encode and upload media using asynchronous Celery tasks. If ``profiles`` are specified, encode with that list of ``EncodeProfile`` primary keys; otherwise, encode with all associated ``EncodeProfile``s. ' from.tasks import encode_medi...
No
1,083
[ "#NEWLINE#", "def test_enable_file(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "with", "temporary_filename", "(", ")", "as", "filename", ":", "#NEWLINE#", "#INDENT#", "self", ".", "check_fatal_error", "(", "\"\\nimport faulthandler\\noutput = open({filename}, 'wb')\\nfaulth...
false
0
[ "2", "16", "self", "12", "28", "32", "40", "42", "filename" ]
0
NONE
[]
[ [ { "before_index": 11, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "amrdraz/kodr/app/brython/www/src/Lib/test/test_faulthandler.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_enable_file(self) : with temporary_filename () as filename : self.check_fatal_error (" import faulthandler output = open({filename}, 'wb') faulthandler.enable(output) faulthandler._sigsegv() ".strip ().format (filename = repr (filename)), 4, 'Segmentation fault', filename = filename) Is there a...
No
1,084
[ "#NEWLINE#", "def get_by_project(", "self", ",", "context", ",", "project_id", ",", "resource", ")", ":", "#NEWLINE#", "#INDENT#", "'Get a specific quota by project.'", "#NEWLINE#", "return", "self", ".", "_driver", ".", "get_by_project", "(", "context", ",", "project...
false
0
[ "6", "24", "project_id", "8", "26", "resource", "2", "16", "self", "4", "22", "context" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 13, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack/nova/nova/quota.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def get_by_project(self, context, project_id, resource) : 'Get a specific quota by project.' return self._driver.get_by_project (context, project_id, resource) Is there a bug in the code above?
No
1,085
[ "#NEWLINE#", "def getissuewallnotes(", "self", ",", "project_id", ",", "issue_id", ",", "page", "=", "1", ",", "per_page", "=", "20", ")", ":", "#NEWLINE#", "#INDENT#", "'Get the notes from the wall of a issue\\n\\n '", "#NEWLINE#", "data", "=", "{", "#NEWLINE#...
false
0
[ "6", "55", "issue_id", "2", "49", "64", "70", "76", "82", "self", "21", "60", "data", "39", "89", "99", "request", "4", "53", "project_id", "8", "28", "page", "12", "33", "per_page" ]
0
NONE
[]
[ [ { "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": 20, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "pyapi-gitlab/pyapi-gitlab/gitlab/__init__.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def getissuewallnotes(self, project_id, issue_id, page = 1, per_page = 20) : 'Get the notes from the wall of a issue ' data = { 'page' : page, 'per_page' : per_page, } request = requests.get ('{0}/{1}/issues/{2}/notes'.format (self.projects_url, project_id, issue_id), params =...
No
1,086
[ "#NEWLINE#", "def test_service_bridge_hidden_in_env(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "response", "=", "self", ".", "client", ".", "get", "(", "'/env'", ",", "headers", "=", "{", "#NEWLINE#", "#INDENT#", "'X_APPENGINE_HTTPS'", ":", "'on'", ",", "#NEWLI...
false
0
[ "7", "37", "response", "2", "9", "42", "self", "31", "46", "env" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 30, "after_index": 36, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 41, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "GoogleCloudPlatform/python-compat-runtime/appengine-vmruntime/vmruntime/tests/wsgi_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_service_bridge_hidden_in_env(self) : response = self.client.get ('/env', headers = { 'X_APPENGINE_HTTPS' : 'on', }) env = json.loads (response.data) self.assertEqual (env ['SERVER_PORT'], '443') Is there a bug in the code above?
No
1,087
[ "#NEWLINE#", "def psi2n(", "self", ",", "Z", ",", "variational_posterior", ")", ":", "#NEWLINE#", "#INDENT#", "ret", "=", "np", ".", "empty", "(", "(", "variational_posterior", ".", "mean", ".", "shape", "[", "0", "]", ",", "Z", ".", "shape", "[", "0", ...
false
0
[ "2", "55", "59", "self", "4", "27", "34", "Z", "11", "49", "65", "ret", "6", "18", "variational_posterior" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 41, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 48, "after_index": 5...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "SheffieldML/GPy/GPy/kern/src/static.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 psi2n(self, Z, variational_posterior) : ret = np.empty ((variational_posterior.mean.shape [0], Z.shape [0], Z.shape [0]), dtype = np.float64) ret [:] = (self.variance * self.variance) return ret Is there a bug in the code above?
No
1,088
[ "#NEWLINE#", "def update_gradients_full(", "self", ",", "dL_dK", ",", "X", ",", "X2", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "X2", "is", "None", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "variance", ".", "gradient", "=", "np", "...
false
0
[ "2", "24", "38", "76", "90", "self", "6", "42", "57", "94", "X", "4", "36", "88", "dL_dK", "8", "17", "109", "X2" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 18, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "SheffieldML/GPy/GPy/kern/src/static.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 update_gradients_full(self, dL_dK, X, X2 = None) : if (X2 is None) : self.variance.gradient = np.einsum ('ij,ij', dL_dK, self.fixed_K [X [:, 0].astype ('int')] [:, X [:, 0].astype ('int')]) else : self.variance.gradient = np.einsum ('ij,ij', dL_dK, self.fixed_K [X [:, 0].astype ('int')] [:, ...
No
1,089
[ "#NEWLINE#", "@", "property", "#NEWLINE#", "def registered_voters(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "h2_chars", "=", "within_bbox", "(", "self", ".", "chars", ",", "self", ".", "bboxes", "[", "'h2'", "]", ")", "#NEWLINE#", "txt", "=", "h2_chars", ...
false
0
[ "26", "54", "txt", "5", "14", "18", "self", "10", "28", "h2_chars" ]
0
NONE
[]
[ [ { "before_index": 9, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 25, "after_index": 41, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 45, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "jsvine/pdfplumber/tests/test-la-precinct-bulletin-2014-p1.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...
@ property def registered_voters(self) : h2_chars = within_bbox (self.chars, self.bboxes ['h2']) txt = h2_chars.groupby ('top').apply (_collate_chars).iloc [1] return int (re.match ('(\\d+) REGISTERED VOTERS', txt).group (1)) Is there a bug in the code above?
No
1,090
[ "#NEWLINE#", "def status(", "name", ",", "sig", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "\"\\n Return the status for a service, returns a bool whether the service is\\n running.\\n\\n CLI Example:\\n\\n .. code-block:: bash\\n\\n salt '*' service.status <service name...
false
0
[ "2", "37", "name", "31", "48", "cmd", "4", "14", "26", "sig" ]
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": "saltstack/salt/salt/modules/netbsdservice.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 status(name, sig = None) : " Return the status for a service, returns a bool whether the service is running. CLI Example: .. code-block:: bash salt '*' service.status <service name> " if sig : return bool (__salt__ ['status.pid'] (sig)) cmd = '/etc/rc.d/{0} onestat...
No
1,091
[ "#NEWLINE#", "def _register(", "self", ",", "username", ",", "email", ",", "password", ")", ":", "#NEWLINE#", "#INDENT#", "user", "=", "User", "(", "username", "=", "username", ",", "email", "=", "email", ",", "password", "=", "password", ")", "#NEWLINE#", ...
false
0
[ "2", "30", "47", "64", "78", "95", "116", "126", "self", "74", "92", "message", "41", "55", "60", "62", "activation", "4", "17", "19", "username", "13", "38", "58", "82", "130", "user", "6", "21", "23", "email", "8", "25", "27", "password" ]
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": 29, "after_index": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "hypothesis/h/h/accounts/views.py", "license": "bsd-2-clause", "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 _register(self, username, email, password) : user = User (username = username, email = email, password = password) self.request.db.add (user) activation = Activation () self.request.db.add (activation) user.activation = activation self.request.db.flush () message = activation_emai...
No
1,092
[ "#NEWLINE#", "def main(", "args", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n The main entry point of Pylease utility. Called when Pylease is launched from command line. May also be called from another python\\n package by just supplying command line arguments as a list.\\n\\n :...
false
0
[ "151", "168", "175", "208", "lizy", "201", "212", "command_name", "11", "17", "34", "61", "157", "180", "parser", "59", "159", "sub_parsers", "2", "178", "184", "188", "203", "214", "args", "74", "126", "144", "161", "info" ]
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": 14,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "n9code/pylease/pylease/main.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def main(args = None) : ' The main entry point of Pylease utility. Called when Pylease is launched from command line. May also be called from another python package by just supplying command line arguments as a list. :param args: List of command line arguments :return: Error code indicating comple...
No
1,093
[ "#NEWLINE#", "def test_post_message(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Test to send a message to a Slack channel.\\n '", "#NEWLINE#", "name", "=", "'slack-message'", "#NEWLINE#", "channel", "=", "'#general'", "#NEWLINE#", "from_name", "=", "'Super...
false
0
[ "21", "87", "120", "189", "234", "356", "message", "17", "118", "187", "277", "354", "from_name", "13", "116", "230", "275", "352", "channel", "9", "32", "114", "183", "228", "273", "350", "name", "81", "99", "150", "163", "195", "208", "240", "253...
0
NONE
[]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 15...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "saltstack/salt/tests/unit/states/slack_test.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_post_message(self) : ' Test to send a message to a Slack channel. ' name = 'slack-message' channel = '#general' from_name = 'SuperAdmin' message = 'This state was executed successfully.' ret = { 'name' : name, 'changes' : { }, ...
No
1,094
[ "#NEWLINE#", "def summarizePerformance(", "self", ",", "test_data_set", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n This function is called at every PERIOD_BTW_SUMMARY_PERFS.\\n Arguments:\\n test_data_set\\n '", "#NEWLINE#", "print", "(", "'Summary Perf'", "...
false
0
[ "167", "245", "p2", "24", "46", "60", "140", "prices", "38", "175", "steps", "16", "20", "26", "33", "observations", "50", "134", "steps_long", "31", "177", "invest", "126", "227", "p1", "2", "self", "4", "18", "test_data_set", "96", "118", "171", "2...
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": 12,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "VinF/deer/examples/toy_env/Toy_env.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 summarizePerformance(self, test_data_set) : ' This function is called at every PERIOD_BTW_SUMMARY_PERFS. Arguments: test_data_set ' print ('Summary Perf') observations = test_data_set.observations () prices = observations [0] invest = observations [1] ...
No
1,095
[ "#NEWLINE#", "@", "classmethod", "#NEWLINE#", "def geo_coordinate(", "cls", ",", "center", "=", "None", ",", "radius", "=", "0.001", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Optionally center the coord and pick a point within radius.\\n '", "#NEWLINE#", "if", ...
false
0
[ "5", "cls", "7", "22", "65", "69", "86", "92", "center", "79", "103", "geo", "11", "72", "76", "88", "94", "radius" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 6, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 18, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 20, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "joke2k/faker/faker/providers/address/__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...
@ classmethod def geo_coordinate(cls, center = None, radius = 0.001) : ' Optionally center the coord and pick a point within radius. ' if (center is None) : return Decimal (str ((random.randint ((- 180000000), 180000000) / 1000000.0))).quantize (Decimal ('.000001')) else : ...
No
1,096
[ "#NEWLINE#", "def _reallyLoad(", "self", ",", "path", ",", "ctx", ")", ":", "#NEWLINE#", "#INDENT#", "doc", "=", "microdom", ".", "parse", "(", "path", ",", "beExtremelyLenient", "=", "self", ".", "beExtremelyLenient", ")", "#NEWLINE#", "doc", "=", "flat", "...
true
32
[ "11", "26", "48", "54", "66", "2", "21", "39", "59", "6", "32", "34", "4", "17" ]
1
VARIABLE_MISUSE
[ 11, 26, 48, 54, 66 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 18, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 25, "after_index": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "twisted/nevow/nevow/loaders.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 _reallyLoad(self, path, ctx) : doc = microdom.parse (path, beExtremelyLenient = self.beExtremelyLenient) doc = flat.precompile (ctx, ctx) if (self.pattern is not None) : doc = inevow.IQ (doc).onePattern (self.pattern) return doc Is there a bug in the code above?
Yes
1,097
[ "#NEWLINE#", "def test_multi_output_classification(", ")", ":", "#NEWLINE#", "#INDENT#", "forest", "=", "RandomForestClassifier", "(", "n_estimators", "=", "10", ",", "random_state", "=", "1", ")", "#NEWLINE#", "multi_target_forest", "=", "MultiOutputClassifier", "(", "...
true
124
[ "98", "146", "171", "6", "23", "111", "57", "61", "76", "87", "124", "157", "165", "107", "114", "132", "155", "19", "26", "37", "59", "35", "52", "94", "142" ]
1
VARIABLE_MISUSE
[ 98, 146, 171 ]
[ [ { "before_index": 5, "after_index": 13, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": 22, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 25, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "scikit-learn/scikit-learn/sklearn/tests/test_multioutput.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_multi_output_classification() : forest = RandomForestClassifier (n_estimators = 10, random_state = 1) multi_target_forest = MultiOutputClassifier (forest) multi_target_forest.fit (X, y) predictions = multi_target_forest.predict (X) assert_equal ((n_samples, n_outputs), predictions.shap...
Yes
1,098
[ "#NEWLINE#", "def ping_pong_pyobj(", "self", ",", "s1", ",", "s2", ",", "o", ")", ":", "#NEWLINE#", "#INDENT#", "s1", ".", "send_pyobj", "(", "o", ")", "#NEWLINE#", "o2", "=", "s2", ".", "recv_pyobj", "(", ")", "#NEWLINE#", "s2", ".", "send_pyobj", "(", ...
true
32
[ "8", "17", "35", "44", "20", "2", "6", "22", "28", "32", "4", "13", "37" ]
1
VARIABLE_MISUSE
[ 20 ]
[ [ { "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": 19, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "felipecruz/zmqpy/zmqpy/tests/pyzmq_tests/__init__.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 ping_pong_pyobj(self, s1, s2, o) : s1.send_pyobj (o) o2 = s2.recv_pyobj () s2.send_pyobj (s2) o3 = s1.recv_pyobj () return o3 Is there a bug in the code above?
Yes
1,099
[ "#NEWLINE#", "def row_height(", "self", ",", "row", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "self", "in", "self", ".", "__rows", ")", ":", "#NEWLINE#", "#INDENT#", "return", "self", ".", "__rows", "[", "row", "]", ".", "get_height_in_pixels", "(", ")...
true
11
[ "4", "25", "2", "11", "13", "21" ]
1
VARIABLE_MISUSE
[ 4, 25 ]
[ [ { "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": "kennethreitz/tablib/tablib/packages/xlwt3/Worksheet.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 row_height(self, row) : if (self in self.__rows) : return self.__rows [row].get_height_in_pixels () else : return 17 Is there a bug in the code above?
Yes