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
500
[ "#NEWLINE#", "def update(", "self", ",", "feed", ",", "branch", "=", "None", ",", "name", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "' Update a toolchain given a feed\\n\\n ``feed`` can be:\\n\\n * a path\\n * a url\\n * a git url (in this case bra...
false
0
[ "76", "119", "140", "206", "230", "245", "266", "353", "remote_packages", "94", "178", "558", "583", "596", "to_add", "100", "212", "497", "522", "535", "to_remove", "133", "152", "other_packages", "334", "410", "441", "515", "531", "576", "592", "644", ...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "aldebaran/qibuild/python/qitoolchain/database.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(self, feed, branch = None, name = None) : ' Update a toolchain given a feed ``feed`` can be: * a path * a url * a git url (in this case branch and name cannot be None, and ``feeds/<name>.xml`` must exist on the given branch) ' ui.info (ui.green, ...
No
501
[ "#NEWLINE#", "def setUp(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "super", "(", "NonPythonDependenciesTest", ",", "self", ")", ".", "setUp", "(", ")", "#NEWLINE#", "third", "=", "self", ".", "make_target", "(", "'dependencies:third'", ",", "target_type", "="...
false
0
[ "50", "93", "110", "second", "31", "91", "first", "76", "112", "project", "2", "11", "20", "33", "52", "78", "97", "self", "18", "46", "third" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 25, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 30, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "pantsbuild/pants/tests/python/pants_test/backend/project_info/tasks/test_dependencies.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def setUp(self) : super (NonPythonDependenciesTest, self).setUp () third = self.make_target ('dependencies:third', target_type = JavaLibrary) first = self.make_target ('dependencies:first', target_type = JavaLibrary, dependencies = [third]) second = self.make_target ('dependencies:second', target_ty...
No
502
[ "#NEWLINE#", "@", "requires_multi_emails_mode", "#NEWLINE#", "@", "login_required", "#NEWLINE#", "def delete_email(", "request", ",", "email_id", ",", "template_name", "=", "'emailauth/delete_email.html'", ")", ":", "#NEWLINE#", "#INDENT#", "user_email", "=", "get_object_or...
false
0
[ "19", "73", "126", "user_email", "51", "65", "94", "121", "form", "8", "31", "42", "55", "59", "98", "108", "request", "12", "114", "template_name", "104", "134", "context", "10", "27", "email_id" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": 24, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 40, "after_index": 4...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "redvasily/django-emailauth/emailauth/views.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...
@ requires_multi_emails_mode @ login_required def delete_email(request, email_id, template_name = 'emailauth/delete_email.html') : user_email = get_object_or_404 (UserEmail, id = email_id, user = request.user, verified = True) if (request.method == 'POST') : form = DeleteEmailForm (request.user, re...
No
503
[ "#NEWLINE#", "def create(", "kernel", ")", ":", "#NEWLINE#", "#INDENT#", "result", "=", "Creature", "(", ")", "#NEWLINE#", "result", ".", "template", "=", "'object/mobile/shared_dressed_tatooine_pfilbee_jhorn.iff'", "#NEWLINE#", "result", ".", "attribute_template_id", "="...
false
0
[ "7", "13", "19", "25", "35", "result", "2", "kernel" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "anhstudios/swganh/data/scripts/templates/object/mobile/shared_dressed_tatooine_pfilbee_jhorn.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def create(kernel) : result = Creature () result.template = 'object/mobile/shared_dressed_tatooine_pfilbee_jhorn.iff' result.attribute_template_id = 9 result.stfName ('theme_park_name', 'pfilbee_jhorn') return result Is there a bug in the code above?
No
504
[ "#NEWLINE#", "def postings_highlight(", "self", ",", "fields", "=", "None", ",", "**kwargs", ")", ":", "#NEWLINE#", "#INDENT#", "newself", "=", "self", ".", "clone", "(", ")", "#NEWLINE#", "newself", ".", "postings_highlighter", ".", "update", "(", "fields", "...
false
0
[ "4", "27", "fields", "2", "15", "self", "13", "21", "34", "newself", "30", "kwargs" ]
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": 20, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "lugensa/scorched/scorched/search.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 postings_highlight(self, fields = None, **kwargs) : newself = self.clone () newself.postings_highlighter.update (fields, ** kwargs) return newself Is there a bug in the code above?
No
505
[ "#NEWLINE#", "def __init__(", "self", ",", "original", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "original", "is", "None", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "queries", "=", "[", "]", "#NEWLINE#", "#UNINDENT#", "else", ":", "#...
false
0
[ "2", "20", "32", "self", "4", "13", "45", "original", "37", "43", "q" ]
0
NONE
[]
[ [ { "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": "lugensa/scorched/scorched/search.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, original = None) : if (original is None) : self.queries = [] else : self.queries = [q.clone () for q in original.queries] Is there a bug in the code above?
No
506
[ "#NEWLINE#", "def read_manifest(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "\"Read the manifest file (named by 'self.manifest') and use it to\\n fill in 'self.filelist', the list of files to include in the source\\n distribution.\\n \"", "#NEWLINE#", "log", ".", "info",...
false
0
[ "32", "56", "58", "78", "86", "88", "96", "105", "120", "line", "17", "20", "26", "34", "124", "manifest", "2", "15", "24", "114", "self" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 19, "after_index": 27...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "balanced/status.balancedpayments.com/venv/lib/python2.7/site-packages/distribute-0.6.34-py2.7.egg/setuptools/command/sdist.py", "license": "mit", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def read_manifest(self) : "Read the manifest file (named by 'self.manifest') and use it to fill in 'self.filelist', the list of files to include in the source distribution. " log.info ("reading manifest file '%s'", self.manifest) manifest = open (self.manifest, 'rbU') for lin...
No
507
[ "#NEWLINE#", "def test_write_sheet_views8(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "'Test the _write_sheet_views() method with split panes'", "#NEWLINE#", "self", ".", "worksheet", ".", "select", "(", ")", "#NEWLINE#", "self", ".", "worksheet", ".", "split_panes", "(...
false
0
[ "40", "60", "exp", "44", "58", "got", "2", "9", "17", "32", "46", "54", "self" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 24...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "jmcnamara/XlsxWriter/xlsxwriter/test/worksheet/test_write_sheet_views4.py", "license": "bsd-2-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_write_sheet_views8(self) : 'Test the _write_sheet_views() method with split panes' self.worksheet.select () self.worksheet.split_panes (45, 54.14, 3, 6) self.worksheet._write_sheet_views () exp = '<sheetViews><sheetView tabSelected="1" workbookViewId="0"><pane xSplit="6150" ySplit="120...
No
508
[ "#NEWLINE#", "def test_can_concatenate_path_and_relationship(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "result", "=", "(", "Walkable", "(", "[", "alice", ",", "alice_knows_bob", ",", "bob", "]", ")", "+", "carol_dislikes_bob", ")", "#NEWLINE#", "assert", "(", ...
false
0
[ "2", "self", "7", "26", "result" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 20, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 24, "after_index": 27, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 20, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "nigelsmall/py2neo/test/test_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 test_can_concatenate_path_and_relationship(self) : result = (Walkable ([alice, alice_knows_bob, bob]) + carol_dislikes_bob) assert (result == Walkable ([alice, alice_knows_bob, bob, carol_dislikes_bob, carol])) Is there a bug in the code above?
No
509
[ "#NEWLINE#", "def test_graph_union(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "graph_1", "=", "(", "(", "alice_knows_bob", "|", "alice_likes_carol", ")", "|", "carol_dislikes_bob", ")", "#NEWLINE#", "graph_2", "=", "(", "(", "carol_dislikes_bob", "|", "carol_marr...
false
0
[ "31", "43", "53", "61", "graph", "7", "34", "graph_1", "19", "36", "graph_2", "2", "self" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": 27, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 30, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "nigelsmall/py2neo/test/test_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 test_graph_union(self) : graph_1 = ((alice_knows_bob | alice_likes_carol) | carol_dislikes_bob) graph_2 = ((carol_dislikes_bob | carol_married_to_dave) | dave_works_for_dave) graph = (graph_1 | graph_2) assert (order (graph) == 4) assert (size (graph) == 5) assert (graph.nodes () == ((...
No
510
[ "#NEWLINE#", "def __init__(", "self", ",", "**kwargs", ")", ":", "#NEWLINE#", "#INDENT#", "super", "(", "BatchAction", ",", "self", ")", ".", "__init__", "(", "**", "kwargs", ")", "#NEWLINE#", "action_present_method", "=", "False", "#NEWLINE#", "if", "hasattr", ...
false
0
[ "2", "13", "29", "39", "64", "82", "92", "117", "162", "198", "207", "218", "229", "238", "244", "257", "267", "272", "285", "294", "300", "306", "313", "323", "self", "19", "182", "211", "222", "248", "261", "276", "317", "kwargs", "75", "99", ...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 21, "after_index": 24...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack/horizon/horizon/tables/actions.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, **kwargs) : super (BatchAction, self).__init__ (** kwargs) action_present_method = False if hasattr (self, 'action_present') : if callable (self.action_present) : action_present_method = True else : warnings.warn (DeprecationWarning (('The %s BatchAc...
No
511
[ "#NEWLINE#", "def _get_media(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "\"\\n Mimic the MultiWidget '_get_media' method, adding other media\\n \"", "#NEWLINE#", "if", "(", "'FORCE_SCHEMA'", "in", "self", ".", "flags", ")", ":", "#NEWLINE#", "#INDENT#", "medi...
false
0
[ "42", "55", "w", "20", "31", "50", "53", "57", "62", "media", "2", "13", "44", "self" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 41, "after_index": 42...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "MongoEngine/django-mongoengine/django_mongoengine/forms/widgets.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_media(self) : " Mimic the MultiWidget '_get_media' method, adding other media " if ('FORCE_SCHEMA' in self.flags) : media = Media () else : media = Media (js = MEDIAS) for w in self.widgets : media = (media + w.media) return media Is there a bug in the ...
No
512
[ "#NEWLINE#", "def _GetBestOfferingId(", "self", ",", "disk_size", ")", ":", "#NEWLINE#", "#INDENT#", "' Given a disk_size (in GB), try to find a disk\\n offering that is atleast as big as the requested\\n one.\\n '", "#NEWLINE#", "disk_offerings", "=", "self", ".", "cs", "."...
false
0
[ "4", "57", "disk_size", "2", "13", "self", "11", "25", "disk_offerings", "41", "51", "63", "do", "21", "43", "sorted_do" ]
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": 18,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/providers/cloudstack/cloudstack_disk.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 _GetBestOfferingId(self, disk_size) : ' Given a disk_size (in GB), try to find a disk offering that is atleast as big as the requested one. ' disk_offerings = self.cs.list_disk_offerings () sorted_do = sorted (disk_offerings, key = (lambda x : x ['disksize'])) for do in sorted_do : ...
No
513
[ "#NEWLINE#", "def _assert_sudo(", "self", ",", "options", ",", "args", ",", "use_root_namespace", "=", "False", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "not", "self", ".", "check_dev_args", ")", ":", "#NEWLINE#", "#INDENT#", "args", "=", "self", ".", "...
false
0
[ "4", "44", "options", "8", "use_root_namespace", "6", "25", "31", "46", "args", "2", "18", "27", "39", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 34, "after_index": 4...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack/neutron/neutron/tests/unit/agent/linux/test_ip_lib.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 _assert_sudo(self, options, args, use_root_namespace = False) : if (not self.check_dev_args) : args = self._remove_dev_args (args) super (TestIPRoute, self)._assert_sudo (options, args) Is there a bug in the code above?
No
514
[ "#NEWLINE#", "def clear_feature(", "dev", ",", "feature", ",", "recipient", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "'Clear/disable a specific feature.\\n\\n dev is the Device object to which the request will be\\n sent to.\\n\\n feature is the feature you want to disable....
false
0
[ "6", "28", "44", "recipient", "37", "55", "57", "bmRequestType", "4", "17", "69", "feature", "2", "24", "51", "dev", "39", "63", "65", "wIndex" ]
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": "walac/pyusb/usb/control.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 clear_feature(dev, feature, recipient = None) : 'Clear/disable a specific feature. dev is the Device object to which the request will be sent to. feature is the feature you want to disable. The recipient can be None (on which the status will be queried from the device), an Interface or E...
No
515
[ "#NEWLINE#", "@", "staticmethod", "#NEWLINE#", "def compute_metavar(", "kwargs", ")", ":", "#NEWLINE#", "#INDENT#", "'Compute the metavar to display in help for an option registered with these kwargs.'", "#NEWLINE#", "metavar", "=", "kwargs", ".", "get", "(", "'metavar'", ")", ...
false
0
[ "12", "24", "70", "79", "93", "metavar", "5", "14", "31", "51", "kwargs", "29", "42", "49", "63", "85", "typ" ]
0
NONE
[]
[ [ { "before_index": 9, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 21, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "pantsbuild/pants/src/python/pants/help/help_info_extracter.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...
@ staticmethod def compute_metavar(kwargs) : 'Compute the metavar to display in help for an option registered with these kwargs.' metavar = kwargs.get ('metavar') if (not metavar) : typ = kwargs.get ('type', str) if (typ == list) : typ = kwargs.get ('member_type', str) if...
No
516
[ "#NEWLINE#", "def test_gather_lockable_models(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "from", "locking", "import", "utils", "#NEWLINE#", "from", "locking.tests", "import", "models", "#NEWLINE#", "lockable_models", "=", "utils", ".", "gather_lockable_models", "(", ...
false
0
[ "2", "25", "39", "self", "17", "32", "46", "lockable_models" ]
0
NONE
[]
[ [ { "before_index": 16, "after_index": 22, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 24, "after_index": 28, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 38, "after_index":...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "debrouwere/django-locking/locking/tests/tests.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_gather_lockable_models(self) : from locking import utils from locking.tests import models lockable_models = utils.gather_lockable_models () self.assertTrue (('story' in lockable_models ['tests'])) self.assertTrue (('unlockable' not in lockable_models ['tests'])) Is there a bug in the...
No
517
[ "#NEWLINE#", "def __init__(", "self", ",", "seq", ")", ":", "#NEWLINE#", "#INDENT#", "if", "isinstance", "(", "seq", ",", "ConstSequence", ")", ":", "#NEWLINE#", "#INDENT#", "seq", "=", "seq", ".", "_adaptee", "#NEWLINE#", "#UNINDENT#", "self", ".", "_adaptee"...
false
0
[ "4", "12", "19", "21", "30", "seq", "2", "26", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 13, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 25, "after_index": 30...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "tow/sunburnt/sunburnt/walktree.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, seq) : if isinstance (seq, ConstSequence) : seq = seq._adaptee self._adaptee = seq Is there a bug in the code above?
No
518
[ "#NEWLINE#", "def format_date(", "date", "=", "None", ",", "format", "=", "'medium'", ",", "locale", "=", "LC_TIME", ")", ":", "#NEWLINE#", "#INDENT#", "'Return a date formatted according to the given pattern.\\n \\n >>> d = date(2007, 04, 01)\\n >>> format_date(d, locale=...
false
0
[ "2", "21", "28", "44", "51", "53", "55", "111", "date", "99", "107", "pattern", "10", "61", "67", "93", "95", "113", "locale", "6", "72", "87", "91", "103", "format" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 19, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "cloudera/hue/desktop/core/ext-py/Babel-0.9.6/babel/dates.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 format_date(date = None, format = 'medium', locale = LC_TIME) : 'Return a date formatted according to the given pattern. >>> d = date(2007, 04, 01) >>> format_date(d, locale=\'en_US\') u\'Apr 1, 2007\' >>> format_date(d, format=\'full\', locale=\'de_DE\') u\'Sonntag, 1. April 2007\' ...
No
519
[ "#NEWLINE#", "def create_todos(", "content", ",", "protocol", ",", "ref_id", ")", ":", "#NEWLINE#", "#INDENT#", "content", "=", "re", ".", "sub", "(", "'\\\\[ \\\\](.*)'", ",", "(", "'<label><input type=\"checkbox\" class=\"todo-checkbox\" data-protocol=\"%s\" data-id=\"%s\">...
false
0
[ "4", "23", "44", "protocol", "6", "25", "46", "ref_id", "2", "11", "29", "32", "50", "54", "content" ]
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": 31, "after_index": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "tomashanacek/mock-server/mock_server/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 create_todos(content, protocol, ref_id) : content = re.sub ('\\[\\](.*)', ('<label><input type="checkbox" class="todo-checkbox" data-protocol="%s" data-id="%s">\\1</label>' % (protocol, ref_id)), content) content = re.sub ('\\[x\\](.*)', ('<label><input type="checkbox" class="todo-checkbox" data-protocol=...
No
520
[ "#NEWLINE#", "def callback_team_create(", "self", ",", "request", ",", "uri", ",", "headers", ",", "status_code", "=", "201", ",", "read_only", "=", "True", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Create a new team as requested\\n '", "#NEWLINE#", "self",...
false
0
[ "8", "29", "121", "headers", "44", "73", "91", "108", "json_body", "6", "uri", "2", "23", "38", "66", "87", "104", "self", "4", "27", "50", "request", "14", "83", "read_only", "56", "71", "item", "10", "119", "status_code" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 20, "after_index": 21, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "mitodl/orcoursetrion/orcoursetrion/tests/base.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 callback_team_create(self, request, uri, headers, status_code = 201, read_only = True) : ' Create a new team as requested ' self.assertEqual (request.headers ['Authorization'], 'token {0}'.format (self.OAUTH2_TOKEN)) json_body = json.loads (request.body) for item in ['name', 'per...
No
521
[ "#NEWLINE#", "def __init__(", "self", ",", "line_number", ",", "start", ")", ":", "#NEWLINE#", "#INDENT#", "super", "(", "LineToDraw", ",", "self", ")", ".", "__init__", "(", "line_number", ",", "start", ")" ]
false
0
[ "4", "20", "line_number", "6", "22", "start", "2", "15", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 21, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 21, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "zsong/diffy/diffy_lib/diffier.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, line_number, start) : super (LineToDraw, self).__init__ (line_number, start) Is there a bug in the code above?
No
522
[ "#NEWLINE#", "def __init__(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "try", ":", "#NEWLINE#", "#INDENT#", "settings_module", "=", "os", ".", "environ", "[", "ENVIRONMENT_VARIABLE", "]", "#NEWLINE#", "if", "(", "not", "settings_module", ")", ":", "#NEWLINE#", ...
false
0
[ "11", "23", "53", "63", "settings_module", "101", "123", "129", "module", "2", "49", "55", "59", "66", "73", "82", "90", "106", "self", "103", "131", "modfile" ]
0
NONE
[]
[ [ { "before_index": 48, "after_index": 53, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 54, "after_index": 62, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 65, "after_index":...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "hrbonz/django-flexisettings/flexisettings/settings.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) : try : settings_module = os.environ [ENVIRONMENT_VARIABLE] if (not settings_module) : raise KeyError except KeyError : raise ImportError (('Flexisettings cannot be imported, because environment variable %s is undefined.' % ENVIRONMENT_VARIABLE)) self._s...
No
523
[ "#NEWLINE#", "@", "rest_api", ".", "post", "(", "'/imagefactory/<image_collection>'", ")", "#NEWLINE#", "@", "rest_api", ".", "post", "(", "'/imagefactory/base_images/<base_image_id>/<image_collection>'", ")", "#NEWLINE#", "@", "rest_api", ".", "post", "(", "'/imagefactor...
false
0
[ "179", "365", "target_img_id", "497", "509", "522", "529", "key", "314", "336", "357", "397", "402", "422", "_credentials", "49", "186", "target_image_id", "45", "176", "base_image_id", "72", "87", "95", "101", "content_type", "107", "116", "129", "153", "...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 44, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 5, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 11...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "redhat-imaging/imagefactory/imgfac/rest/RESTv2.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...
@ rest_api.post ('/imagefactory/<image_collection>') @ rest_api.post ('/imagefactory/base_images/<base_image_id>/<image_collection>') @ rest_api.post ('/imagefactory/base_images/<base_image_id>/target_images/<target_image_id>/<image_collection>') @ rest_api.post ('/imagefactory/target_images/<target_image_id>/<image...
No
524
[ "#NEWLINE#", "def analyse_text(", "text", ")", ":", "#NEWLINE#", "#INDENT#", "rv", "=", "(", "DjangoLexer", ".", "analyse_text", "(", "text", ")", "-", "0.01", ")", "#NEWLINE#", "if", "looks_like_xml", "(", "text", ")", ":", "#NEWLINE#", "#INDENT#", "rv", "+...
false
0
[ "2", "14", "23", "text", "7", "28", "34", "rv" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 20, "after_index": 22, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 33, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "adieu/allbuttonspressed/pygments/lexers/templates.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 analyse_text(text) : rv = (DjangoLexer.analyse_text (text) - 0.01) if looks_like_xml (text) : rv += 0.4 return rv Is there a bug in the code above?
No
525
[ "#NEWLINE#", "@", "property", "#NEWLINE#", "def blocks(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "for", "blockaddr", "in", "self", ".", "block_addrs", ":", "#NEWLINE#", "#INDENT#", "try", ":", "#NEWLINE#", "#INDENT#", "(", "yield", "self", ".", "_get_block",...
false
0
[ "11", "29", "blockaddr", "5", "13", "25", "self" ]
0
NONE
[]
[ [ { "before_index": 10, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index":...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "angr/angr/angr/knowledge/function.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...
@ property def blocks(self) : for blockaddr in self.block_addrs : try : (yield self._get_block (blockaddr)) except AngrTranslationError : pass Is there a bug in the code above?
No
526
[ "#NEWLINE#", "def get_call_return(", "self", ",", "callsite_addr", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Get the hypothetical return address of a call.\\n\\n :param callsite_addr: The address of the basic block that ends in a call.\\n :return: The l...
false
0
[ "2", "15", "23", "self", "4", "13", "27", "callsite_addr" ]
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": "angr/angr/angr/knowledge/function.py", "license": "bsd-2-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def get_call_return(self, callsite_addr) : ' Get the hypothetical return address of a call. :param callsite_addr: The address of the basic block that ends in a call. :return: The likely return target of said call, or None if callsite_addr ...
No
527
[ "#NEWLINE#", "def test_function_argrouting_working(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "f", "=", "simpleEval", "(", "sym", "(", "'Function'", ")", ",", "sym", "(", "'Call'", ")", ",", "'fun(x,y) { x+y }'", ")", "#NEWLINE#", "f", "=", "simpleEval", "(",...
false
0
[ "2", "36", "self", "7", "24", "28", "42", "f" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 23, "after_index": 29, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 35, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "ufora/ufora/ufora/FORA/Axioms/TupleMatchStructureAxiom_test.py", "license": "apache-2.0", "note": "license: github_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_function_argrouting_working(self) : f = simpleEval (sym ('Function'), sym ('Call'), 'fun(x,y) { x+y }') f = simpleEval (f, sym ('Call')) self.assertEqual (simpleEval (f, sym ('Call'), 2, 3), 5) Is there a bug in the code above?
No
528
[ "#NEWLINE#", "def test_repo(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "repo", "=", "self", ".", "client", ".", "repos", ".", "show", "(", "'JNRowe/misc-overlay'", ")", "#NEWLINE#", "eq_", "(", "repo", ".", "name", ",", "'misc-overlay'", ")", "#NEWLINE#", ...
false
0
[ "2", "9", "self", "7", "22", "31", "40", "49", "58", "67", "repo" ]
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": 28, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "ask/python-github2/tests/test_repositories.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_repo(self) : repo = self.client.repos.show ('JNRowe/misc-overlay') eq_ (repo.name, 'misc-overlay') eq_ (repo.description, 'Gentoo overlay -- miscellaneous packages') eq_ (repo.url, 'https://github.com/JNRowe/misc-overlay') eq_ (repo.owner, 'JNRowe') eq_ (repo.homepage, 'http://jnr...
No
529
[ "#NEWLINE#", "@", "unittest", ".", "skipIf", "(", "(", "threading", "is", "None", ")", ",", "'Test requires threading'", ")", "#NEWLINE#", "def test_cache_backend(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "kv", "=", "KVStore", "(", ")", "#NEWLINE#", "cache_b...
false
0
[ "48", "x", "65", "thread_cache_backend", "57", "68", "74", "t", "21", "41", "kv", "16", "81", "self", "27", "37", "85", "90", "cache_backends" ]
0
NONE
[]
[ [ { "before_index": 20, "after_index": 24, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 26, "after_index": 29, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 47, "after_index":...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "mariocesar/sorl-thumbnail/tests/thumbnail_tests/test_kvstore.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...
@ unittest.skipIf ((threading is None), 'Test requires threading') def test_cache_backend(self) : kv = KVStore () cache_backends = [] def thread_cache_backend() : cache_backends.append (kv.cache) for x in range (2) : t = threading.Thread (target = thread_cache_backend) t.star...
No
530
[ "#NEWLINE#", "def test_delete_view(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "kwargs", "=", "self", ".", "admin_model", ".", "get_view_kwargs", "(", ")", "#NEWLINE#", "kwargs", "[", "'object'", "]", "=", "SimpleDocument", "(", ")", "#NEWLINE#", "view", "=", ...
false
0
[ "2", "9", "38", "51", "62", "75", "88", "99", "self", "7", "17", "33", "kwargs", "26", "57", "94", "view", "36", "47", "59", "73", "84", "96", "request", "55", "66", "92", "103", "response" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 23, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 25, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "zbyte64/django-dockit/dockit/tests/admin/views.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_delete_view(self) : kwargs = self.admin_model.get_view_kwargs () kwargs ['object'] = SimpleDocument () view = TestableDeleteView.as_view (** kwargs) request = self.factory.get ('/1/delete/') request.user = self.super_user response = view (request) self.assertEqual (response.s...
No
531
[ "#NEWLINE#", "def test_id_missing(", "client", ")", ":", "#NEWLINE#", "#INDENT#", "response", "=", "helpers", ".", "request", "(", "client", ",", "'PATCH'", ",", "'/widgets/1'", ",", "{", "#NEWLINE#", "#INDENT#", "'name'", ":", "'Bar'", ",", "#NEWLINE#", "#UNIND...
false
0
[ "2", "13", "client", "7", "33", "46", "response" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 31, "after_index": 36, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 40, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "4Catalyzer/flask-resty/tests/test_view_errors.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_id_missing(client) : response = helpers.request (client, 'PATCH', '/widgets/1', { 'name' : 'Bar', }) assert (response.status_code == 422) assert (helpers.get_errors (response) == [{ 'code' : 'invalid_id.missing', }]) Is there a bug in the code above?
No
532
[ "#NEWLINE#", "def test02_appendMD(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "'Appending multi-dimensional elements of enumerated values.'", "#NEWLINE#", "vlarr", "=", "self", ".", "h5file", ".", "create_vlarray", "(", "'/'", ",", "'test'", ",", "self", ".", "_atom",...
false
0
[ "46", "88", "98", "126", "137", "appended", "9", "40", "84", "94", "104", "112", "vlarr", "110", "114", "128", "139", "read", "2", "11", "21", "33", "51", "55", "63", "67", "73", "77", "133", "self" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 18, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 39, "after_index": 44...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "PyTables/PyTables/tables/tests/test_enum.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test02_appendMD(self) : 'Appending multi-dimensional elements of enumerated values.' vlarr = self.h5file.create_vlarray ('/', 'test', self._atom ((2,)), title = self._getMethodName ()) vlarr.flavor = 'python' appended = [[[self.valueInEnum, self.valueInEnum]], [[self.valueInEnum, self.valueOutOf...
No
533
[ "#NEWLINE#", "def testRandomAccessWorksCorrectlyForSmallUncompactedCollection(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "with", "aff4", ".", "FACTORY", ".", "Create", "(", "self", ".", "collection_urn", ",", "'PackedVersionedCollection'", ",", "mode", "=", "'w'", ",...
false
0
[ "31", "45", "fd", "36", "55", "i", "2", "14", "26", "61", "self" ]
0
NONE
[]
[ [ { "before_index": 60, "after_index": 64, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 30, "after_index": 17, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 30, "after_index":...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "google/grr/grr/lib/aff4_objects/collects_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 testRandomAccessWorksCorrectlyForSmallUncompactedCollection(self) : with aff4.FACTORY.Create (self.collection_urn, 'PackedVersionedCollection', mode = 'w', token = self.token) as fd : for i in range (5) : fd.Add (rdf_flows.GrrMessage (request_id = i)) self._testRandomAccessEqualsIterator...
No
534
[ "#NEWLINE#", "def reprovision(", "vm", ",", "image", ",", "key", "=", "'uuid'", ")", ":", "#NEWLINE#", "#INDENT#", "\"\\n Reprovision a vm\\n\\n vm : string\\n vm to be reprovisioned\\n image : string\\n uuid of new image\\n key : string [uuid|alias|hostname]\\n ...
false
0
[ "117", "160", "cmd", "15", "45", "53", "101", "114", "183", "207", "ret", "153", "169", "189", "197", "res", "6", "32", "64", "key", "4", "89", "110", "131", "144", "image", "167", "176", "202", "retcode", "24", "123", "125", "vmadm", "2", "56", ...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 13, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "saltstack/salt/salt/modules/smartos_vmadm.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 reprovision(vm, image, key = 'uuid') : " Reprovision a vm vm : string vm to be reprovisioned image : string uuid of new image key : string [uuid|alias|hostname] value type of 'vm' parameter CLI Example: .. code-block:: bash salt '*' vmadm.reprovision ...
No
535
[ "#NEWLINE#", "def receive(", "uuid", ",", "source", ")", ":", "#NEWLINE#", "#INDENT#", "\"\\n Receive a vm from a directory\\n\\n uuid : string\\n uuid of vm to be received\\n source : string\\n source directory\\n\\n CLI Example:\\n\\n .. code-block:: bash\\n\\n ...
false
0
[ "103", "139", "267", "309", "360", "382", "cmd", "11", "47", "55", "87", "100", "177", "201", "332", "356", "420", "444", "ret", "2", "79", "127", "208", "295", "370", "372", "uuid", "204", "215", "241", "vmobj", "26", "273", "275", "zfs", "248",...
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": 13,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "saltstack/salt/salt/modules/smartos_vmadm.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 receive(uuid, source) : " Receive a vm from a directory uuid : string uuid of vm to be received source : string source directory CLI Example: .. code-block:: bash salt '*' vmadm.receive 186da9ab-7392-4f55-91a5-b8f1fe770543 /opt/backups " ret = { ...
No
536
[ "#NEWLINE#", "def post(", "self", ",", "request", ",", "*", "args", ",", "**kwargs", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "object", "=", "None", "#NEWLINE#", "return", "super", "(", "BaseCreateView", ",", "self", ")", ".", "post", "(", "request"...
false
0
[ "4", "30", "request", "36", "kwargs", "2", "14", "25", "self", "7", "33", "args" ]
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": 18,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "AppScale/appscale/AppServer/lib/django-1.5/django/views/generic/edit.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 post(self, request, * args, **kwargs) : self.object = None return super (BaseCreateView, self).post (request, * args, ** kwargs) Is there a bug in the code above?
No
537
[ "#NEWLINE#", "def test_grid_search(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "maximizer", "=", "GridSearch", "(", "self", ".", "acquisition_func", ",", "self", ".", "X_lower", ",", "self", ".", "X_upper", ")", "#NEWLINE#", "x", "=", "maximizer", ".", "maxi...
false
0
[ "2", "11", "15", "19", "53", "71", "93", "110", "self", "24", "34", "46", "64", "86", "108", "x", "7", "26", "maximizer" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 23, "after_index": 29, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 32, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "automl/RoBO/robo/test/test_maximizers.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_grid_search(self) : maximizer = GridSearch (self.acquisition_func, self.X_lower, self.X_upper) x = maximizer.maximize () assert (x.shape [0] == 1) assert (x.shape [1] == self.dims) assert np.all ((x [:, 0] >= self.X_lower [0])) assert np.all ((x [:, 0] <= self.X_upper [0])) a...
No
538
[ "#NEWLINE#", "def get_virtual_source_info(", "self", ",", "virtual_source_path", ")", ":", "#NEWLINE#", "#INDENT#", "virtual_source", "=", "self", ".", "pad", ".", "get", "(", "virtual_source_path", ")", "#NEWLINE#", "if", "(", "not", "virtual_source", ")", ":", "...
false
0
[ "50", "68", "checksum", "39", "66", "mtime", "9", "23", "41", "52", "virtual_source", "2", "11", "45", "56", "self", "4", "17", "31", "64", "virtual_source_path" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 20, "after_index": 22...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "lektor/lektor/lektor/builder.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def get_virtual_source_info(self, virtual_source_path) : virtual_source = self.pad.get (virtual_source_path) if (not virtual_source) : return VirtualSourceInfo (virtual_source_path, None, None) mtime = virtual_source.get_mtime (self.path_cache) checksum = virtual_source.get_checksum (self.path_...
No
539
[ "#NEWLINE#", "@", "utils", ".", "arg", "(", "'containers'", ",", "metavar", "=", "'<container>'", ",", "nargs", "=", "'+'", ",", "help", "=", "'ID or name of the (container)s to stop.'", ")", "#NEWLINE#", "def do_container_stop(", "cs", ",", "args", ")", ":", "#...
false
0
[ "57", "76", "e", "24", "34", "args", "22", "44", "cs", "32", "50", "71", "container" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 23, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 28, "after_index": 29, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 31, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack/python-magnumclient/magnumclient/v1/containers_shell.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
@ utils.arg ('containers', metavar = '<container>', nargs = '+', help = 'ID or name of the (container)s to stop.') def do_container_stop(cs, args) : 'Stop specified containers.' for container in args.containers : try : cs.containers.stop (container) except Exception as e : ...
No
540
[ "#NEWLINE#", "def __deepcopy__(", "self", ",", "memo", ")", ":", "#NEWLINE#", "#INDENT#", "result", "=", "super", "(", "ChoiceField", ",", "self", ")", ".", "__deepcopy__", "(", "memo", ")", "#NEWLINE#", "result", ".", "queryset", "=", "result", ".", "querys...
false
0
[ "2", "15", "self", "9", "23", "27", "32", "result", "4", "20", "memo" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 19, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 28...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "zbyte64/django-dockit/dockit/forms/fields.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 __deepcopy__(self, memo) : result = super (ChoiceField, self).__deepcopy__ (memo) result.queryset = result.queryset return result Is there a bug in the code above?
No
541
[ "#NEWLINE#", "def test_get_docker_run_cmd_with_env_vars(", ")", ":", "#NEWLINE#", "#INDENT#", "memory", "=", "555", "#NEWLINE#", "random_port", "=", "666", "#NEWLINE#", "container_name", "=", "(", "(", "'Docker'", "*", "6", ")", "+", "'Doc'", ")", "#NEWLINE#", "vo...
false
0
[ "79", "105", "net", "26", "93", "volumes", "10", "89", "random_port", "63", "99", "docker_hash", "83", "112", "119", "126", "actual", "59", "97", "interactive", "71", "101", "command", "14", "91", "container_name", "6", "87", "memory", "75", "103", "host...
0
NONE
[]
[ [ { "before_index": 5, "after_index": 8, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 22...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "Yelp/paasta/tests/cli/test_cmds_local_run.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_get_docker_run_cmd_with_env_vars() : memory = 555 random_port = 666 container_name = (('Docker' * 6) + 'Doc') volumes = ['7_Brides_for_7_Brothers', '7-Up', '7-11'] env = { 'foo' : 'bar', 'baz' : 'qux', 'x' : ' with spaces', } interactive = False do...
No
542
[ "#NEWLINE#", "def send(", "self", ",", "*", "args", ",", "**kwargs", ")", ":", "#NEWLINE#", "#INDENT#", "'Writes the passed chunk and flushes it to the client.'", "#NEWLINE#", "self", ".", "write", "(", "*", "args", ",", "**", "kwargs", ")", "#NEWLINE#", "self", "...
false
0
[ "2", "14", "25", "self", "22", "kwargs", "5", "19", "args" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 3, "after_index": 5, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 12,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "armet/python-armet/armet/http/response.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 send(self, * args, **kwargs) : 'Writes the passed chunk and flushes it to the client.' self.write (* args, ** kwargs) self.flush () Is there a bug in the code above?
No
543
[ "#NEWLINE#", "def append(", "self", ",", "name", ",", "value", ")", ":", "#NEWLINE#", "#INDENT#", "'Add a value to the end of the list for the named header.'", "#NEWLINE#", "return", "self", ".", "headers", ".", "append", "(", "name", ",", "value", ")" ]
false
0
[ "2", "14", "self", "6", "22", "value", "4", "20", "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": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "armet/python-armet/armet/http/response.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 append(self, name, value) : 'Add a value to the end of the list for the named header.' return self.headers.append (name, value) Is there a bug in the code above?
No
544
[ "#NEWLINE#", "def _wrap_result(", "self", ",", "result", ")", ":", "#NEWLINE#", "#INDENT#", "' potentially wrap any results '", "#NEWLINE#", "if", "(", "isinstance", "(", "result", ",", "com", ".", "ABCSeries", ")", "and", "(", "self", ".", "_selection", "is not",...
false
0
[ "4", "15", "33", "43", "result", "2", "23", "37", "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": 21,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "pydata/pandas/pandas/tseries/resample.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def _wrap_result(self, result) : ' potentially wrap any results ' if (isinstance (result, com.ABCSeries) and (self._selection is not None)) : result.name = self._selection return result Is there a bug in the code above?
No
545
[ "#NEWLINE#", "@", "reflection", ".", "cache", "#NEWLINE#", "@", "_db_plus_owner", "#NEWLINE#", "def get_view_definition(", "self", ",", "connection", ",", "viewname", ",", "dbname", ",", "owner", ",", "schema", ",", "**kw", ")", ":", "#NEWLINE#", "#INDENT#", "rp...
false
0
[ "20", "schema", "27", "82", "88", "rp", "kw", "86", "95", "view_def", "10", "self", "16", "dbname", "18", "66", "owner", "12", "29", "connection", "14", "48", "viewname" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 26, "after_index": 32, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 81, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/dialects/mssql/base.py", "license": "mit", "note": "license: github_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
@ reflection.cache @ _db_plus_owner def get_view_definition(self, connection, viewname, dbname, owner, schema, **kw) : rp = connection.execute (sql.text ('select definition from sys.sql_modules as mod, sys.views as views, sys.schemas as sch where mod.object_id=views.object_id and views.schema_id=sch.schema_id an...
No
546
[ "#NEWLINE#", "def get_blocks_byte_array(", "self", ",", "buffer", "=", "False", ")", ":", "#NEWLINE#", "#INDENT#", "'Return a list of all blocks in this chunk.'", "#NEWLINE#", "if", "buffer", ":", "#NEWLINE#", "#INDENT#", "length", "=", "len", "(", "self", ".", "block...
false
0
[ "4", "14", "buffer", "18", "35", "length", "2", "22", "38", "58", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "twoolie/NBT/nbt/chunk.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_blocks_byte_array(self, buffer = False) : 'Return a list of all blocks in this chunk.' if buffer : length = len (self.blocksList) return BytesIO ((pack ('>i', length) + self.get_blocks_byte_array ())) else : return array.array ('B', self.blocksList).tostring () Is there a...
No
547
[ "#NEWLINE#", "def _install_component(", "self", ",", "component", ",", "destdir", ",", "release", "=", "True", ")", ":", "#NEWLINE#", "#INDENT#", "installed_files", "=", "list", "(", ")", "#NEWLINE#", "manifest_name", "=", "(", "'install_manifest_%s.txt'", "%", "c...
false
0
[ "8", "33", "112", "release", "15", "297", "307", "installed_files", "21", "48", "69", "manifest_name", "2", "65", "104", "120", "177", "208", "266", "self", "183", "185", "filter_fun", "235", "246", "lines", "258", "292", "src", "244", "250", "252", "2...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "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": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "aldebaran/qibuild/python/qitoolchain/qipackage.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 _install_component(self, component, destdir, release = True) : installed_files = list () manifest_name = ('install_manifest_%s.txt' % component) if ((not release) and sys.platform.startswith ('win')) : manifest_name = ('install_manifest_%s_debug.txt' % component) manifest_path = os.path.joi...
No
548
[ "#NEWLINE#", "def _read_install_mask(", "self", ",", "mask_name", ")", ":", "#NEWLINE#", "#INDENT#", "mask_path", "=", "os", ".", "path", ".", "join", "(", "self", ".", "path", ",", "(", "mask_name", "+", "'.mask'", ")", ")", "#NEWLINE#", "if", "(", "not",...
false
0
[ "143", "151", "159", "170", "mess", "2", "17", "self", "120", "129", "154", "line", "61", "69", "80", "83", "90", "99", "106", "122", "176", "mask", "72", "78", "86", "88", "93", "102", "104", "110", "x", "9", "37", "52", "148", "mask_path", "5...
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 20, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 28, "after_index": 30...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "aldebaran/qibuild/python/qitoolchain/qipackage.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_install_mask(self, mask_name) : mask_path = os.path.join (self.path, (mask_name + '.mask')) if (not os.path.exists (mask_path)) : return list () with open (mask_path, 'r') as fp : mask = fp.readlines () mask = [x.strip () for x in mask] mask = [x for x in mask if...
No
549
[ "#NEWLINE#", "def set_fill(", "self", ",", "fill", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "_attributes", "[", "'fill'", "]", "=", "fill" ]
false
0
[ "4", "16", "fill", "2", "9", "self" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 10...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "ofermend/medicare-demo/socialite/jython/Lib/site-packages/pysvg/animate.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def set_fill(self, fill) : self._attributes ['fill'] = fill Is there a bug in the code above?
No
550
[ "#NEWLINE#", "def authenticate(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "self", ".", "auth_strategy", "==", "'keystone'", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "_authenticate_keystone", "(", ")", "#NEWLINE#", "#UNINDENT#", "else", ":", ...
false
0
[ "51", "71", "err_msg", "2", "9", "18", "31", "40", "59", "self" ]
0
NONE
[]
[ [ { "before_index": 7, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 12, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack/python-neutronclient/neutronclient/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 authenticate(self) : if (self.auth_strategy == 'keystone') : self._authenticate_keystone () else : if (self.auth_strategy == 'noauth') : self._authenticate_noauth () else : err_msg = (_ ('Unknown auth strategy: %s') % self.auth_strategy) raise exceptio...
No
551
[ "#NEWLINE#", "def get_jids(", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Return a dict mapping all job ids to job information\\n '", "#NEWLINE#", "ret", "=", "{", "#NEWLINE#", "#INDENT#", "#NEWLINE#", "#UNINDENT#", "}", "#NEWLINE#", "for", "(", "jid", ",", "job", ",",...
false
0
[ "65", "73", "85", "endtime", "19", "39", "46", "50", "69", "79", "jid", "8", "37", "77", "91", "ret", "23", "25", "_", "21", "52", "job" ]
0
NONE
[]
[ [ { "before_index": 5, "after_index": 6, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 7, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 20...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "saltstack/salt/salt/returners/local_cache.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 get_jids() : ' Return a dict mapping all job ids to job information ' ret = { } for (jid, job, _, _) in _walk_through (_job_dir ()) : ret [jid] = salt.utils.jid.format_jid_instance (jid, job) if __opts__.get ('job_cache_store_endtime') : endtime = get_...
No
552
[ "#NEWLINE#", "def get_height(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "not", "self", ".", "parent", ".", "children", ")", ":", "#NEWLINE#", "#INDENT#", "return", "0", "#NEWLINE#", "#UNINDENT#", "self", ".", "_default_positions", "(", ")", "#NEW...
false
0
[ "2", "10", "23", "47", "self", "36", "40", "45", "c" ]
0
NONE
[]
[ [ { "before_index": 7, "after_index": 9, "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": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "ardekantur/pyglet/contrib/wydget/wydget/layouts.py", "license": "bsd-3-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def get_height(self) : if (not self.parent.children) : return 0 self._default_positions () return intceil (max (((c.y + c.min_height) for c in self.getChildren ()))) Is there a bug in the code above?
No
553
[ "#NEWLINE#", "def test_error(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n A script that raises an exception exits, logging the error as an\\n ``eliot` message.\\n '", "#NEWLINE#", "d", "=", "self", ".", "run_script", "(", "FailScript", ")", "#NEWLINE#", ...
false
0
[ "2", "11", "26", "50", "68", "self", "91", "got_messages", "9", "87", "95", "d" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 86, "after_index": 90...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "ClusterHQ/flocker/flocker/common/functional/test_script.py", "license": "apache-2.0", "note": "license: github_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_error(self) : ' A script that raises an exception exits, logging the error as an ``eliot` message. ' d = self.run_script (FailScript) def got_messages(messages) : assertContainsFields (self, messages [1], { 'message_type' : 'twisted:log', ...
No
554
[ "#NEWLINE#", "def reset_password(", "request", ")", ":", "#NEWLINE#", "#INDENT#", "response_data", "=", "{", "#NEWLINE#", "#INDENT#", "'status'", ":", "'failure'", ",", "#NEWLINE#", "'message'", ":", "'unknown error occured'", ",", "#NEWLINE#", "#UNINDENT#", "}", "#NE...
false
0
[ "2", "26", "36", "49", "65", "request", "72", "85", "new_password", "45", "55", "109", "form", "63", "76", "83", "email", "7", "79", "93", "128", "response_data" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 25, "after_index": 29, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 121, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "AcademicsToday/py-academicstoday/academicstoday_project/landpage/views/forgot_password.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 reset_password(request) : response_data = { 'status' : 'failure', 'message' : 'unknown error occured', } if request.is_ajax () : if (request.method == 'POST') : form = ForgotPasswordForm (request.POST) if form.is_valid () : email = req...
No
555
[ "#NEWLINE#", "def showRevolution(", "self", ",", "revId", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "reader", ".", "GetDataForRevolution", "(", "revId", ",", "self", ".", "revPolyData", ")", "#NEWLINE#", "self", ".", "displayedRevolution", "=", "revId", "#...
false
0
[ "2", "9", "17", "22", "29", "35", "44", "49", "64", "71", "79", "88", "99", "self", "4", "15", "26", "revId" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 16, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 21, "after_index": 26...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "RobotLocomotion/director/src/python/director/perception.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 showRevolution(self, revId) : self.reader.GetDataForRevolution (revId, self.revPolyData) self.displayedRevolution = revId if self.showRevolutionCallback : self.showRevolutionCallback () if (self.colorizeCallback and (self.polyDataObj.getPropertyEnumValue ('Color By') == 'rgb')) : s...
No
556
[ "#NEWLINE#", "def partition(", "self", ",", "sep", ",", "reverse", "=", "False", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Similar to split, but always creates a tuple with three items:\\n\\n 1. The part before the separator\\n 2. The separator itself.\\n 3. The ...
false
0
[ "71", "84", "112", "result", "78", "96", "107", "section", "39", "55", "80", "parent_result", "6", "35", "reverse", "67", "89", "92", "103", "current_index", "4", "18", "25", "27", "47", "63", "sep", "2", "41", "57", "87", "self" ]
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": "evennia/evennia/evennia/utils/ansi.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 partition(self, sep, reverse = False) : ' Similar to split, but always creates a tuple with three items: 1. The part before the separator 2. The separator itself. 3. The part after. We use the same techniques we used in split() to make sure each are colored. ...
No
557
[ "#NEWLINE#", "def __init__(", "self", ",", "email", "=", "None", ",", "password", "=", "None", ",", "source", "=", "None", ",", "server", "=", "'base.google.com'", ",", "api_key", "=", "None", ",", "additional_headers", "=", "None", ",", "handler", "=", "N...
false
0
[ "24", "65", "67", "additional_headers", "12", "57", "59", "source", "4", "45", "47", "email", "28", "69", "71", "handler", "16", "61", "63", "server", "2", "43", "74", "self", "8", "49", "51", "password", "20", "76", "78", "api_key" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 34, "after_index": 44, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 73, "after_index": 7...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "bradfitz/addressbooker/gdata/base/service.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, email = None, password = None, source = None, server = 'base.google.com', api_key = None, additional_headers = None, handler = None) : gdata.service.GDataService.__init__ (self, email = email, password = password, service = 'gbase', source = source, server = server, additional_headers = addition...
No
558
[ "#NEWLINE#", "def handle(", "self", ",", "request", ",", "context", ")", ":", "#NEWLINE#", "#INDENT#", "url", "=", "reverse", "(", "'horizon:project:network_services:index'", ")", "#NEWLINE#", "try", ":", "#NEWLINE#", "#INDENT#", "try", ":", "#NEWLINE#", "#INDENT#",...
false
0
[ "2", "self", "4", "124", "185", "request", "11", "149", "url", "130", "141", "160", "178", "187", "msg", "6", "27", "33", "39", "53", "62", "69", "78", "87", "95", "104", "113", "127", "context", "156", "170", "e" ]
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": 14, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack/group-based-policy-ui/gbpui/panels/network_services/forms.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 handle(self, request, context) : url = reverse ('horizon:project:network_services:index') try : try : del context ['template_string'] del context ['template_file'] del context ['config_type'] except KeyError : pass context ['config'] = json.du...
No
559
[ "#NEWLINE#", "def take_action(", "self", ",", "parsed_args", ")", ":", "#NEWLINE#", "#INDENT#", "for", "obj", "in", "parsed_args", ".", "objects", ":", "#NEWLINE#", "#INDENT#", "self", ".", "app", ".", "client_manager", ".", "object_store", ".", "object_delete", ...
false
0
[ "2", "18", "self", "4", "12", "30", "parsed_args", "10", "36", "obj" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 13,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "dtroyer/python-openstackclient/openstackclient/object/v1/object.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 take_action(self, parsed_args) : for obj in parsed_args.objects : self.app.client_manager.object_store.object_delete (container = parsed_args.container, object = obj) Is there a bug in the code above?
No
560
[ "#NEWLINE#", "@", "classmethod", "#NEWLINE#", "def find_one(", "cls", ",", "*", "args", ",", "**kwargs", ")", ":", "#NEWLINE#", "#INDENT#", "'Same as ``collection.find_one``, return model object instead of simple dict.'", "#NEWLINE#", "d", "=", "cls", ".", "collection", "...
false
0
[ "8", "26", "args", "17", "33", "41", "d", "29", "kwargs", "5", "19", "38", "cls" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 6, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 6, "after_index": 8, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 15,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "tevino/mongu/mongu.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 find_one(cls, * args, **kwargs) : 'Same as ``collection.find_one``, return model object instead of simple dict.' d = cls.collection.find_one (* args, ** kwargs) if d : return cls (** d) Is there a bug in the code above?
No
561
[ "#NEWLINE#", "def get_default_output(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "'Returns the first output option that is found in the list of options\\n that has a non-null value. If no output option is found, a\\n ``LookupError`` is raised\\n\\n :returns: the default output o...
false
0
[ "2", "12", "46", "self", "10", "23", "28", "39", "44", "56", "opt" ]
0
NONE
[]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 15,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "thasso/pyjip/jip/options.py", "license": "bsd-3-clause", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def get_default_output(self) : 'Returns the first output option that is found in the list of options that has a non-null value. If no output option is found, a ``LookupError`` is raised :returns: the default output option :rtype: :class:`Option` :raises LookupError: if no d...
No
562
[ "#NEWLINE#", "def __init__(", "self", ",", "cache_manager", ",", "options", ")", ":", "#NEWLINE#", "#INDENT#", "BaseStorage", ".", "__init__", "(", "self", ",", "cache_manager", ",", "options", ")", "#NEWLINE#", "self", ".", "url", "=", "options", ".", "get", ...
false
0
[ "6", "19", "26", "39", "52", "options", "2", "15", "22", "35", "48", "62", "66", "70", "77", "81", "85", "self", "4", "17", "cache_manager" ]
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": 21, "after_index": 3...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "limodou/uliweb/uliweb/lib/weto/backends/database_storage.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 __init__(self, cache_manager, options) : BaseStorage.__init__ (self, cache_manager, options) self.url = options.get ('url', 'sqlite:///') self.tablename = options.get ('table_name', 'session') self.auto_create = options.get ('auto_create', True) (self.db, self.meta, self.table) = create_tab...
No
563
[ "#NEWLINE#", "def getOperationByName(", "self", ",", "name", ")", ":", "#NEWLINE#", "#INDENT#", "'Return a named content item.'", "#NEWLINE#", "for", "item", "in", "self", ".", "operations", ":", "#NEWLINE#", "#INDENT#", "if", "(", "item", ".", "name", "==", "name...
false
0
[ "2", "14", "self", "12", "22", "32", "item", "4", "24", "26", "42", "name" ]
0
NONE
[]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 12,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "geopython/OWSLib/owslib/feature/wfs110.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 getOperationByName(self, name) : 'Return a named content item.' for item in self.operations : if (item.name == name) : return item raise KeyError (('No operation named %s' % name)) Is there a bug in the code above?
No
564
[ "#NEWLINE#", "@", "test", ".", "idempotent_id", "(", "'cd8afa5e-3f57-4e43-8185-beb83d3c9015'", ")", "#NEWLINE#", "def test_list_nodestates(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "(", "_", ",", "nodestates", ")", "=", "self", ".", "client", ".", "list_nodestat...
true
46
[ "10", "21", "27", "42", "51", "36", "46", "48", "55", "16", "18", "38" ]
1
VARIABLE_MISUSE
[ 18, 38 ]
[ [ { "before_index": 14, "after_index": 26, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 35, "after_index": 36, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 35, "after_index":...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack/ironic/ironic_tempest_plugin/tests/api/admin/test_nodestates.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
@ test.idempotent_id ('cd8afa5e-3f57-4e43-8185-beb83d3c9015') def test_list_nodestates(self) : (_, nodestates) = self.client.list_nodestates (self.node ['uuid']) for key in nodestates : self.assertEqual (key [key], self.node [key]) Is there a bug in the code above?
Yes
565
[ "#NEWLINE#", "@", "classmethod", "#NEWLINE#", "def resolve(", "self", ",", "accept", ",", "provide", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Resolves a list of accepted MediaTypes and available renderers to the preferred renderer.\\n\\n Call as MediaType.resolve([MediaType...
true
206
[ "145", "165", "9", "158", "206", "153", "177", "40", "86", "100", "118", "147", "7", "20", "33", "42", "48", "58", "69", "75", "5", "73", "82", "110", "123", "163", "181", "130", "187", "155", "172", "191", "198", "132", "174", "194" ]
1
VARIABLE_MISUSE
[ 130, 187 ]
[ [ { "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": 16, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "mollyproject/mollyproject/molly/utils/http.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...
@ classmethod def resolve(self, accept, provide) : ' Resolves a list of accepted MediaTypes and available renderers to the preferred renderer. Call as MediaType.resolve([MediaType], [(MediaType, renderer)]). ' if (len (accept) == 0) : return [] accept.sort () (eq_class...
Yes
566
[ "#NEWLINE#", "def setUp(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "super", "(", "TestServerRebuild", ",", "self", ")", ".", "setUp", "(", ")", "#NEWLINE#", "self", ".", "image", "=", "image_fakes", ".", "FakeImage", ".", "create_one_image", "(", ")", "#N...
true
38
[ "2", "11", "18", "30", "71", "113", "132", "140", "144", "152", "42", "59", "107", "52", "123", "125", "38", "100", "127", "129" ]
1
VARIABLE_MISUSE
[ 2, 11, 18, 30, 71, 113, 132, 140, 144, 152 ]
[ [ { "before_index": 6, "after_index": 15, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 27, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 29, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "dtroyer/python-openstackclient/openstackclient/tests/compute/v2/test_server.py", "license": "apache-2.0", "note": "license: bigquery_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def setUp(self) : super (TestServerRebuild, self).setUp () self.image = image_fakes.FakeImage.create_one_image () self.cimages_mock.get.return_value = methods.image new_server = compute_fakes.FakeServer.create_one_server () attrs = { 'id' : new_server.id, 'image' : { ...
Yes
567
[ "#NEWLINE#", "def it_provides_access_to_the_data_labels(", "self", ",", "data_labels_fixture", ")", ":", "#NEWLINE#", "#INDENT#", "(", "plot", ",", "data_labels_", ",", "DataLabels_", ",", "dLbls", ")", "=", "data_labels_fixture", "#NEWLINE#", "data_labels", "=", "plot"...
true
36
[ "2", "36", "12", "38", "21", "25", "4", "19", "16", "31", "14", "27", "10", "23" ]
1
VARIABLE_MISUSE
[ 21, 25 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 19, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 20, "after_index": 24...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "scanny/python-pptx/tests/chart/test_plot.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_provides_access_to_the_data_labels(self, data_labels_fixture) : (plot, data_labels_, DataLabels_, dLbls) = data_labels_fixture data_labels = plot.data_labels DataLabels_.assert_called_once_with (dLbls) assert (self is data_labels_) Is there a bug in the code above?
Yes
568
[ "#NEWLINE#", "@", "pytest", ".", "fixture", "(", "params", "=", "[", "(", "'c:barChart'", ",", "False", ")", ",", "(", "'c:barChart/c:dLbls'", ",", "True", ")", ",", "(", "'c:lineChart'", ",", "False", ")", ",", "(", "'c:lineChart/c:dLbls'", ",", "True", ...
true
79
[ "48", "56", "71", "79", "50", "61", "58", "81", "65" ]
1
VARIABLE_MISUSE
[ 65 ]
[ [ { "before_index": 1, "after_index": 49, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 54, "after_index": 62, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 64, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "scanny/python-pptx/tests/chart/test_plot.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 (params = [('c:barChart', False), ('c:barChart/c:dLbls', True), ('c:lineChart', False), ('c:lineChart/c:dLbls', True), ('c:pieChart', False), ('c:pieChart/c:dLbls', True)]) def has_data_labels_get_fixture(self, request) : (xChart_cxml, expected_value) = request.param plot = Plot (element (xC...
Yes
569
[ "#NEWLINE#", "def testFloatRange(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "script", "=", "Gaffer", ".", "ScriptNode", "(", ")", "#NEWLINE#", "script", "[", "'writer'", "]", "=", "GafferDispatchTest", ".", "TextWriter", "(", ")", "#NEWLINE#", "script", "[", ...
true
163
[ "7", "15", "26", "47", "60", "71", "84", "93", "115", "128", "141", "2", "37", "154", "163", "170", "181", "194", "204", "214", "224", "234", "245", "254", "268", "277", "291", "300", "314", "323", "337", "346" ]
1
VARIABLE_MISUSE
[ 7, 15, 26, 47, 60, 71, 84, 93, 115, 128, 141 ]
[ [ { "before_index": 6, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 23, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 25, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "ImageEngine/gaffer/python/GafferDispatchTest/WedgeTest.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 testFloatRange(self) : script = Gaffer.ScriptNode () script ['writer'] = GafferDispatchTest.TextWriter () script ['writer'] ['fileName'].setValue ((self.temporaryDirectory () + '/${wedge:index}.txt')) script ['writer'] ['text'].setValue ('${wedge:value}') script ['wedge'] = GafferDispatch.W...
Yes
570
[ "#NEWLINE#", "def test_pretty_enabled_by_default(", "self", ",", "httpbin", ")", ":", "#NEWLINE#", "#INDENT#", "env", "=", "TestEnvironment", "(", "colors", "=", "256", ")", "#NEWLINE#", "r", "=", "http", "(", "'GET'", ",", "(", "httpbin", ".", "url", "+", "...
true
41
[ "9", "32", "34", "18", "2", "4", "25", "41" ]
1
VARIABLE_MISUSE
[ 18 ]
[ [ { "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": 17, "after_index": 23...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "jkbrzt/httpie/tests/test_output.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_pretty_enabled_by_default(self, httpbin) : env = TestEnvironment (colors = 256) r = http ('GET', (httpbin.url + '/get'), env = env) assert (COLOR in httpbin) Is there a bug in the code above?
Yes
571
[ "#NEWLINE#", "def testDeleteAttribute(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "'Modify & commit should write the right data to the server.'", "#NEWLINE#", "client", "=", "LDAPClientTestDriver", "(", "[", "pureldap", ".", "LDAPModifyResponse", "(", "resultCode", "=", "0"...
true
134
[ "130", "134", "9", "39", "41", "96", "82", "126", "2", "33", "72", "84" ]
1
VARIABLE_MISUSE
[ 82, 126 ]
[ [ { "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": 32, "after_index": 42...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "twisted/ldaptor/ldaptor/test/test_ldapsyntax.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 testDeleteAttribute(self) : 'Modify & commit should write the right data to the server.' client = LDAPClientTestDriver ([pureldap.LDAPModifyResponse (resultCode = 0, matchedDN = '', errorMessage = '')]) o = ldapsyntax.LDAPEntry (client = client, dn = 'cn=foo,dc=example,dc=com', attributes = { ...
Yes
572
[ "#NEWLINE#", "def generate_collection(", "addon", ",", "app", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Generate a Collection, a CollectionAddon and a FeaturedCollection\\n for the given `addon` related to the optional `app`.\\n\\n '", "#NEWLINE#", "if", "(", "app"...
true
49
[ "22", "31", "42", "44", "82", "84", "38", "64", "88", "4", "15", "33", "69", "2", "49", "58", "60" ]
1
VARIABLE_MISUSE
[ 38, 64, 88 ]
[ [ { "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": "mozilla/addons-server/src/olympia/landfill/collection.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 generate_collection(addon, app = None) : ' Generate a Collection, a CollectionAddon and a FeaturedCollection for the given `addon` related to the optional `app`. ' if (app is None) : application = None else : application = app.id c = create_collection (application = applic...
Yes
573
[ "#NEWLINE#", "def get_as_elem(", "self", ",", "slice", "=", "None", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Get the PlanetLabNetwork as ElementTree element so it can be added\\n to the RSpec and dumped as XML.\\n \\n @keyword slice: Optional. Slice for which we are...
true
245
[ "13", "80", "91", "352", "128", "148", "66", "99", "305", "338", "55", "71", "75", "198", "206", "212", "64", "88", "303", "327", "40", "57", "136", "176", "224", "245", "288", "166", "200", "311", "188", "204", "229", "274", "297", "319", "330...
1
VARIABLE_MISUSE
[ 13, 80, 91, 352 ]
[ [ { "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": "fp7-ofelia/ocf/expedient/src/python/expedient_geni/planetlab/sfa-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 get_as_elem(self, slice = None) : ' Get the PlanetLabNetwork as ElementTree element so it can be added to the RSpec and dumped as XML. @keyword slice: Optional. Slice for which we are producing this RSpec. Specifying the slice will set the <sliver /> tag for PlanetL...
Yes
574
[ "#NEWLINE#", "def test_try_finally(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "x", "=", "1", "#NEWLINE#", "try", ":", "#NEWLINE#", "#INDENT#", "assert", "(", "self", "==", "0", ")", "#NEWLINE#", "#UNINDENT#", "finally", ":", "#NEWLINE#", "#INDENT#", "x", "=...
true
17
[ "7", "27", "2", "17" ]
1
VARIABLE_MISUSE
[ 7, 27 ]
[ [ { "before_index": 6, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 15, "after_index": 18, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 26, "after_index": 2...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "pytest-dev/pytest/doc/en/example/assertion/failure_demo.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_try_finally(self) : x = 1 try : assert (self == 0) finally : x = 0 Is there a bug in the code above?
Yes
575
[ "#NEWLINE#", "def _coerce_resource(", "self", ",", "data", ")", ":", "#NEWLINE#", "#INDENT#", "resource", "=", "Resource", "(", "**", "resource", ")", "#NEWLINE#", "return", "resource" ]
true
14
[ "2", "9", "14", "18", "4" ]
1
VARIABLE_MISUSE
[ 4 ]
[ [ { "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": 17, "after_index": 18...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "xively/xively-python/xively/managers.py", "license": "bsd-3-clause", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def _coerce_resource(self, data) : resource = Resource (** resource) return resource Is there a bug in the code above?
Yes
576
[ "#NEWLINE#", "@", "classmethod", "#NEWLINE#", "def create(", "cls", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n :API: public\\n '", "#NEWLINE#", "options", "=", "cls", ".", "global_instance", "(", ")", ".", "get_options", "(", ")", "#NEWLINE#", "return", "Bin...
true
35
[ "5", "14", "35", "12", "27", "31", "39" ]
1
VARIABLE_MISUSE
[ 12, 27, 31, 39 ]
[ [ { "before_index": 9, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 11, "after_index": 21, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 24, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "pantsbuild/pants/src/python/pants/binaries/binary_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...
@ classmethod def create(cls) : ' :API: public ' options = cls.global_instance ().get_options () return BinaryUtil (options.baseurls, options.fetch_timeout_secs, cls.pants_bootstrapdir, options.path_by_id) Is there a bug in the code above?
Yes
577
[ "#NEWLINE#", "def test_compat_allocation_ratios_default_values(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "compute_dict", "=", "fake_compute_node", ".", "copy", "(", ")", "#NEWLINE#", "compute_dict", "[", "'cpu_allocation_ratio'", "]", "=", "0.0", "#NEWLINE#", "compute...
true
87
[ "2", "48", "59", "70", "81", "36", "44", "52", "87", "42", "65", "76", "7", "15", "22", "29", "56" ]
1
VARIABLE_MISUSE
[ 42, 65, 76 ]
[ [ { "before_index": 6, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 14, "after_index": 20, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 21, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/objects/test_compute_node.py", "license": "apache-2.0", "note": "license: github_api" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def test_compat_allocation_ratios_default_values(self) : compute_dict = fake_compute_node.copy () compute_dict ['cpu_allocation_ratio'] = 0.0 compute_dict ['ram_allocation_ratio'] = 0.0 compute_dict ['disk_allocation_ratio'] = 0.0 cls = objects.ComputeNode compute = cls._from_db_object (se...
Yes
578
[ "#NEWLINE#", "def synchronizerUpdateTest(", "self", ",", "computedGraphTestHarness", ")", ":", "#NEWLINE#", "#INDENT#", "synchronizer", "=", "self", ".", "createSynchronizer", "(", ")", "#NEWLINE#", "def updateValueInSharedState(", "self", ",", "key", ",", "view", ")", ...
true
46
[ "50", "72", "4", "46", "74", "98", "9", "56", "91", "2", "11", "18", "36", "42", "77", "83", "87", "94", "103" ]
1
VARIABLE_MISUSE
[ 2, 11, 18, 36, 42, 77, 83, 87, 94, 103 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 19...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "ufora/ufora/ufora/distributed/SharedState/tests/ComputedGraphSharedState_test.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 synchronizerUpdateTest(self, computedGraphTestHarness) : synchronizer = self.createSynchronizer () def updateValueInSharedState(self, key, view) : view [key] = JsonPickle.toJson (self.keyValue) self.runInTransaction (computedGraphKey.keyName, updateValueInSharedState, False) with synchroniz...
Yes
579
[ "#NEWLINE#", "def __init__(", "self", ",", "signature", ")", ":", "#NEWLINE#", "#INDENT#", "super", "(", "self", ".", "__class__", ",", "self", ")", ".", "__init__", "(", "'Syntax error in type signature'", ")", "#NEWLINE#", "if", "(", "not", "isinstance", "(", ...
true
83
[ "2", "11", "15", "79", "83", "4", "28", "41", "59", "36", "47" ]
1
VARIABLE_MISUSE
[ 4, 28, 41, 59 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 19, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 23, "after_index": 25...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "billpmurphy/hask/hask/lang/syntax.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 __init__(self, signature) : super (self.__class__, self).__init__ ('Syntax error in type signature') if (not isinstance (signature, __signature__)) : msg = ('Signature expected in sig(); found %s' % signature) raise SyntaxError (msg) else : if (len (signature.sig.args) < 2) : ...
Yes
580
[ "#NEWLINE#", "def test_graph_dependencies(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "a", "=", "test_utils", ".", "ProvidesRequiresTask", "(", "'a'", ",", "provides", "=", "[", "'x'", "]", ",", "requires", "=", "[", "]", ")", "#NEWLINE#", "b", "=", "test_...
true
58
[ "7", "63", "87", "95", "171", "186", "2", "79", "91", "163", "178", "47", "58", "71", "27", "60" ]
1
VARIABLE_MISUSE
[ 7 ]
[ [ { "before_index": 6, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 26, "after_index": 34, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 46, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack/taskflow/taskflow/tests/unit/action_engine/test_compile.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_graph_dependencies(self) : a = test_utils.ProvidesRequiresTask ('a', provides = ['x'], requires = []) b = test_utils.ProvidesRequiresTask ('b', provides = [], requires = ['x']) flo = gf.Flow ('test').add (flo, b) g = _replicate_graph_with_names (compiler.PatternCompiler (flo).compile ()) ...
Yes
581
[ "#NEWLINE#", "def test_graph_nested_requires(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "a", "=", "test_utils", ".", "ProvidesRequiresTask", "(", "'a'", ",", "provides", "=", "[", "'x'", "]", ",", "requires", "=", "[", "]", ")", "#NEWLINE#", "b", "=", "te...
true
95
[ "7", "93", "98", "122", "130", "259", "277", "2", "114", "126", "249", "267", "66", "82", "106", "27", "77", "46", "79", "95" ]
1
VARIABLE_MISUSE
[ 66 ]
[ [ { "before_index": 6, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 26, "after_index": 34, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 45, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack/taskflow/taskflow/tests/unit/action_engine/test_compile.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_graph_nested_requires(self) : a = test_utils.ProvidesRequiresTask ('a', provides = ['x'], requires = []) b = test_utils.ProvidesRequiresTask ('b', provides = [], requires = []) c = test_utils.ProvidesRequiresTask ('c', provides = [], requires = ['x']) inner_flo = lf.Flow ('test2').add (b, c...
Yes
582
[ "#NEWLINE#", "def test_get_basic(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "set_text", "(", "self", ".", "text_javascript", "(", ")", ")", "#NEWLINE#", "self", ".", "set_settings", "(", "{", "#NEWLINE#", "#INDENT#", "'level_char'", ":", "'>'", ...
true
91
[ "2", "7", "11", "18", "36", "73", "84", "52", "66", "42", "68", "91", "34", "44" ]
1
VARIABLE_MISUSE
[ 52, 66 ]
[ [ { "before_index": 6, "after_index": 10, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 21, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 33, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "kizza/Table-of-comments/tests/test_get_comment_titles.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_get_basic(self) : self.set_text (self.text_javascript ()) self.set_settings ({ 'level_char' : '>', }) toc = self.get_plugin () titles = toc.get_comment_titles ('string') for title in ['Heading 1', '- Heading 2', '-- Heading 3'] : if (title in titles) : s...
Yes
583
[ "#NEWLINE#", "def __init__(", "self", ",", "**kw", ")", ":", "#NEWLINE#", "#INDENT#", "'Initialization method for instance.'", "#NEWLINE#", "super", "(", "FiatStart", ",", "self", ")", ".", "__init__", "(", "**", "self", ")" ]
true
21
[ "2", "15", "21" ]
1
VARIABLE_MISUSE
[]
[ [ { "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": 19,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "ioflo/ioflo/ioflo/base/fiating.py", "license": "apache-2.0", "note": "license: manual_eval" } } ]
bug detection
{% set indent = ' ' %} {% set ns = namespace(indent_size=0, result=[]) %} {% for token in source_tokens %} {% if token== '#INDENT#' %} {% set ns.indent_size = ns.indent_size + 1 %} {% set ns.result = ns.result + [indent * ns.indent_size] %} {% elif token == '#NEWLINE#' %} {% set ns.r...
def __init__(self, **kw) : 'Initialization method for instance.' super (FiatStart, self).__init__ (** self) Is there a bug in the code above?
Yes
584
[ "#NEWLINE#", "def test_upgrade_head(", "self", ",", "migration", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "migrate", ".", "upgrade", "(", "'head'", ")", "#NEWLINE#", "migration", ".", "db_sync", ".", "assert_called_once_with", "(", "migration", ".", "migrat...
true
24
[ "2", "9", "30", "4", "18", "24" ]
1
VARIABLE_MISUSE
[ 2, 9, 30 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 29...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack/oslo.db/oslo_db/tests/sqlalchemy/test_migrate_cli.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_upgrade_head(self, migration) : self.migrate.upgrade ('head') migration.db_sync.assert_called_once_with (migration.migrate.engine, self.migrate.repository, None, init_version = 0) Is there a bug in the code above?
Yes
585
[ "#NEWLINE#", "@", "jit", ".", "elidable", "#NEWLINE#", "def _lookup(", "self", ",", "sym", ",", "version", ")", ":", "#NEWLINE#", "#INDENT#", "try", ":", "#NEWLINE#", "#INDENT#", "return", "self", ".", "bindings", "[", "version", "]", "#NEWLINE#", "#UNINDENT#"...
true
25
[ "9", "40", "11", "25", "7", "21" ]
1
VARIABLE_MISUSE
[ 9, 40 ]
[ [ { "before_index": 1, "after_index": 8, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 3, "after_index": 2, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 20, "after_index": 24,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "samth/pycket/pycket/env.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...
@ jit.elidable def _lookup(self, sym, version) : try : return self.bindings [version] except KeyError : raise SchemeException (('toplevel variable %s not found' % sym.variable_name ())) Is there a bug in the code above?
Yes
586
[ "#NEWLINE#", "def test_streaming_hdu_write_file_like(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "'Test streaming an HDU to an open file-like object.'", "#NEWLINE#", "arr", "=", "np", ".", "zeros", "(", "(", "5", ",", "5", ")", ",", "dtype", "=", "np", ".", "int32...
true
51
[ "51", "71", "84", "92", "34", "43", "57", "28", "40", "64", "77", "9", "47", "99", "2", "36" ]
1
VARIABLE_MISUSE
[ 34, 43, 57 ]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 20, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 27, "after_index": 31...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "spacetelescope/PyFITS/pyfits/tests/test_core.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_streaming_hdu_write_file_like(self) : 'Test streaming an HDU to an open file-like object.' arr = np.zeros ((5, 5), dtype = np.int32) sf = BytesIO () shdu = self._make_streaming_hdu (sf) shdu.write (arr) assert hdul.writecomplete assert (shdu.size == 100) sf.seek (0) ...
Yes
587
[ "#NEWLINE#", "def __init__(", "self", ",", "tau1", ",", "tau0", ")", ":", "#NEWLINE#", "#INDENT#", "tau1", "=", "np", ".", "atleast_1d", "(", "tau0", ")", "#NEWLINE#", "tau0", "=", "np", ".", "atleast_1d", "(", "tau0", ")", "#NEWLINE#", "gamma", "=", "np...
true
17
[ "6", "17", "20", "26", "45", "4", "11", "36", "29", "72", "2", "67" ]
1
VARIABLE_MISUSE
[ 4, 11, 36 ]
[ [ { "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": "slinderman/pyhawkes/pyhawkes/internals/distributions.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, tau1, tau0) : tau1 = np.atleast_1d (tau0) tau0 = np.atleast_1d (tau0) gamma = np.concatenate ((tau1 [(..., None)], tau0 [(..., None)]), axis = (- 1)) super (Beta, self).__init__ (gamma) Is there a bug in the code above?
Yes
588
[ "#NEWLINE#", "def main(", ")", ":", "#NEWLINE#", "#INDENT#", "flock", "=", "FlockManager", "(", "match_found", ",", "config", "[", "'BLEET_TIMEOUT'", "]", ",", "config", "[", "'SERVICE_TIMEOUT'", "]", ")", "#NEWLINE#", "logger", ".", "info", "(", "'Shepherd star...
true
747
[ "186", "198", "228", "238", "262", "283", "315", "320", "111", "196", "219", "226", "253", "260", "306", "313", "333", "728", "795", "803", "125", "149", "716", "738", "831", "741", "756", "779", "788", "799", "329", "381", "414", "422", "428", "...
1
VARIABLE_MISUSE
[ 414, 422, 428, 439, 483, 524, 641, 659, 682, 706, 720, 853 ]
[ [ { "before_index": 5, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": 26, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 30, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "ucrcsedept/galah/galah/shepherd/shepherd.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 main() : flock = FlockManager (match_found, config ['BLEET_TIMEOUT'], config ['SERVICE_TIMEOUT']) logger.info ('Shepherd starting.') while True : zmq.select ([public, sheep], [], [], timeout = 5) while ((public.getsockopt (zmq.EVENTS) & zmq.POLLIN) != 0) : request = pub...
Yes
589
[ "#NEWLINE#", "def get_network_attach_config_spec(", "client_factory", ",", "vif_info", ",", "index", ")", ":", "#NEWLINE#", "#INDENT#", "'Builds the vif attach config spec.'", "#NEWLINE#", "config_spec", "=", "client_factory", ".", "create", "(", "'ns0:VirtualMachineConfigSpec'...
true
36
[ "6", "65", "2", "15", "26", "58", "13", "31", "36", "51", "71", "22", "4", "28", "41", "60" ]
1
VARIABLE_MISUSE
[ 22 ]
[ [ { "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": "openstack/nova/nova/virt/vmwareapi/vm_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 get_network_attach_config_spec(client_factory, vif_info, index) : 'Builds the vif attach config spec.' config_spec = client_factory.create ('ns0:VirtualMachineConfigSpec') vif_spec = _create_vif_spec (client_factory, vif_info) config_spec.deviceChange = [config_spec] if (vif_info ['iface_id...
Yes
590
[ "#NEWLINE#", "def testCompletion(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "\"Tests '[[]]' syntax replacement.\"", "#NEWLINE#", "indx", "=", "clitable", ".", "CliTable", "(", ")", "#NEWLINE#", "self", ".", "failUnlessEqual", "(", "'abc'", ",", "re", ".", "sub", ...
true
49
[ "2", "17", "37", "49", "57", "9", "29", "69" ]
1
VARIABLE_MISUSE
[ 9, 29, 69 ]
[ [ { "before_index": 6, "after_index": 7, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 14, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 16, "after_index": 22...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "google/textfsm/clitable_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 testCompletion(self) : "Tests '[[]]' syntax replacement." indx = clitable.CliTable () self.failUnlessEqual ('abc', re.sub ('(\\[\\[.+?\\]\\])', indx._Completion, 'abc')) self.failUnlessEqual ('a(b(c)?)?', re.sub ('(\\[\\[.+?\\]\\])', self._Completion, 'a[[bc]]')) self.failUnlessEqual ('a(b(...
Yes
591
[ "#NEWLINE#", "def testKeyValue(", "self", ")", ":", "#NEWLINE#", "#INDENT#", "'Tests retrieving row value that corresponds to the key.'", "#NEWLINE#", "self", ".", "clitable", ".", "_TemplateNamesToFiles", "=", "(", "lambda", "t", ":", "[", "self", ".", "template_file", ...
true
176
[ "144", "164", "176", "142", "2", "9", "20", "26", "32", "50", "54", "67", "75", "79", "92", "100", "111", "115", "130", "149", "160" ]
1
VARIABLE_MISUSE
[ 142 ]
[ [ { "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": 25, "after_index": 35...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "google/textfsm/clitable_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 testKeyValue(self) : 'Tests retrieving row value that corresponds to the key.' self.clitable._TemplateNamesToFiles = (lambda t : [self.template_file]) self.clitable.ParseCmd (self.input_data, attributes = { 'Command' : 'sh ver', }) self.failUnlessEqual (self.clitable.KeyValue (), ['a']...
Yes
592
[ "#NEWLINE#", "def create(", "self", ",", "**kwargs", ")", ":", "#NEWLINE#", "#INDENT#", "\"Create a resource.\\n\\n The default implementation is overridden so that the dictionary is\\n passed 'as is' without any wrapping.\\n \"", "#NEWLINE#", "kwargs", "=", "self", ...
true
30
[ "11", "17", "33", "2", "13", "21", "25", "30" ]
1
VARIABLE_MISUSE
[ 11, 17, 33 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 8, "after_index": 9, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 10, "after_index": 16,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack-infra/python-storyboardclient/storyboardclient/base.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 create(self, **kwargs) : "Create a resource. The default implementation is overridden so that the dictionary is passed 'as is' without any wrapping. " kwargs = self._filter_kwargs (kwargs) return self._post (self.build_url (** self), kwargs) Is there a bug in the code above...
Yes
593
[ "#NEWLINE#", "def _add_details(", "self", ",", "info", ")", ":", "#NEWLINE#", "#INDENT#", "for", "(", "field", ",", "value", ")", "in", "six", ".", "iteritems", "(", "info", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "not", "hasattr", "(", "self", ","...
true
32
[ "11", "45", "13", "32", "47", "2", "30", "43", "4", "20" ]
1
VARIABLE_MISUSE
[ 11, 45 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 12, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 19,...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "openstack-infra/python-storyboardclient/storyboardclient/base.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_details(self, info) : for (field, value) in six.iteritems (info) : if (not hasattr (self, value)) : continue setattr (self, field, value) Is there a bug in the code above?
Yes
594
[ "#NEWLINE#", "def _append_config(", "mappings", ",", "analysis", ",", "doc_type", ",", "type_mappings", ",", "type_analysis", ")", ":", "#NEWLINE#", "#INDENT#", "'\\n Append config for the named type to pre-existing config.\\n\\n This function takes a mappings dict and an analysi...
true
75
[ "35", "54", "75", "90", "6", "24", "8", "26", "10", "40", "4", "50", "48", "103", "65", "73", "92", "2", "17", "84", "98", "37", "42", "67", "107", "80", "86" ]
1
VARIABLE_MISUSE
[ 48, 103 ]
[ [ { "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": "hypothesis/h/h/api/search/config.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 _append_config(mappings, analysis, doc_type, type_mappings, type_analysis) : ' Append config for the named type to pre-existing config. This function takes a mappings dict and an analysis dict which may contain prior data, and attempts to update them with mappings and analysis settings for the...
Yes
595
[ "#NEWLINE#", "def xstr(", "s", ",", "encoding", "=", "'utf-8'", ")", ":", "#NEWLINE#", "#INDENT#", "' Convert argument to string type returned by __str__.\\n '", "#NEWLINE#", "return", "ustr", "(", "s", ",", "s", ")" ]
true
18
[ "4", "2", "16", "18" ]
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": 13, "after_index": 1...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "nigelsmall/httpstream/httpstream/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 xstr(s, encoding = 'utf-8') : ' Convert argument to string type returned by __str__. ' return ustr (s, s) Is there a bug in the code above?
Yes
596
[ "#NEWLINE#", "def test_group_disabled(", ")", ":", "#NEWLINE#", "#INDENT#", "group", "=", "logbook", ".", "LoggerGroup", "(", ")", "#NEWLINE#", "logger1", "=", "logbook", ".", "Logger", "(", "'testlogger1'", ")", "#NEWLINE#", "logger2", "=", "logbook", ".", "Log...
true
36
[ "6", "32", "39", "46", "86", "134", "191", "248", "299", "14", "63", "103", "140", "157", "211", "265", "319", "59", "81", "99", "119", "127", "153", "173", "183", "207", "229", "240", "261", "283", "292", "315", "335", "343", "23", "36", "43",...
1
VARIABLE_MISUSE
[ 14, 63, 103, 140, 157, 211, 265, 319 ]
[ [ { "before_index": 5, "after_index": 11, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 13, "after_index": 19, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 22, "after_index": ...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "getlogbook/logbook/tests/test_groups.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_group_disabled() : group = logbook.LoggerGroup () logger1 = logbook.Logger ('testlogger1') logger2 = logbook.Logger ('testlogger2') group.add_logger (logger2) group.add_logger (logger2) group.disable () with logbook.TestHandler () as handler : logger1.warn ('Warning ...
Yes
597
[ "#NEWLINE#", "def draw(", "self", ",", "equation", ")", ":", "#NEWLINE#", "#INDENT#", "if", "(", "not", "self", ".", "parent", ".", "x_data", ")", ":", "#NEWLINE#", "#INDENT#", "self", ".", "parent", ".", "x_data", "=", "equation", ".", "dataCache", ".", ...
true
89
[ "121", "193", "2", "12", "21", "43", "52", "74", "83", "112", "129", "138", "156", "165", "176", "182", "228", "234", "251", "279", "283", "294", "300", "306", "312", "341", "347", "353", "359", "366", "375", "384", "393", "148", "195", "89", "...
1
VARIABLE_MISUSE
[ 4, 27, 58, 200, 204, 214, 242, 248, 257, 261, 265, 272 ]
[ [ { "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": 40, "after_index": 42...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "zunzun/pyeq2/Examples/GUI/guifiles/CustomDialogs.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 draw(self, equation) : if (not self.parent.x_data) : self.parent.x_data = equation.dataCache.allDataCacheDictionary ['IndependentData'] [0] if (not self.parent.y_data) : self.parent.y_data = equation.dataCache.allDataCacheDictionary ['IndependentData'] [1] if (not self.parent.z_data) : ...
Yes
598
[ "#NEWLINE#", "def generateHeaderInstance(", "self", ",", "serializer", ")", ":", "#NEWLINE#", "#INDENT#", "assert", "isinstance", "(", "serializer", ",", "programSerializer", ".", "ProgramSerializer", ")", "#NEWLINE#", "serializer", ".", "emitIndent", "(", ")", "#NEWL...
true
31
[ "2", "35", "4", "12", "19", "25", "31" ]
1
VARIABLE_MISUSE
[ 2, 35 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 13, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 18, "after_index": 22...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "iovisor/bcc/src/cc/frontends/p4/compiler/ebpfProgram.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 generateHeaderInstance(self, serializer) : assert isinstance (serializer, programSerializer.ProgramSerializer) serializer.emitIndent () serializer.appendFormat ('struct {0} {1}', serializer.headersStructTypeName, self.headerStructName) Is there a bug in the code above?
Yes
599
[ "#NEWLINE#", "def getConditional(", "self", ",", "name", ")", ":", "#NEWLINE#", "#INDENT#", "assert", "isinstance", "(", "name", ",", "str", ")", "#NEWLINE#", "for", "c", "in", "self", ".", "conditionals", ":", "#NEWLINE#", "#INDENT#", "if", "(", "c", ".", ...
true
38
[ "4", "12", "30", "32", "38", "49", "2", "20", "18", "28" ]
1
VARIABLE_MISUSE
[ 18, 28 ]
[ [ { "before_index": 1, "after_index": 3, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 9, "after_index": 13, "edge_type": 7, "edge_type_name": "enum_FIELD" } ], [ { "before_index": 17, "after_index": 18...
[ { "datasetProvenance": { "datasetName": "ETHPy150Open", "filepath": "iovisor/bcc/src/cc/frontends/p4/compiler/ebpfProgram.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 getConditional(self, name) : assert isinstance (name, str) for c in self.conditionals : if (c.name == name) : return name raise CompilationException (True, 'Could not locate conditional named {0}', name) Is there a bug in the code above?
Yes