query_name
stringlengths
13
55
code_file_path
stringlengths
14
194
context_blocks
list
answer_spans
list
supporting_fact_spans
list
example_type
int8
0
1
single_hop
bool
2 classes
subtokenized_input_sequence
list
label_sequence
list
Unused local variable
CybOXProject/python-cybox/cybox/bindings/dns_cache_object.py
[ { "content": " def exportChildren(self, lwrite, level, namespace_='DNSCacheObj:', name_='DNSCacheEntryType', fromsubclass_=False, pretty_print=True):\n if pretty_print:\n eol_ = '\\n'\n else:\n eol_ = ''\n if self.DNS_Entry is not None:\n self.DNS_Entry.e...
[ { "span": "eol_ ", "start_line": 60, "start_column": 12, "end_line": 60, "end_column": 16 }, { "span": "eol_ ", "start_line": 62, "start_column": 12, "end_line": 62, "end_column": 16 }, { "span": "eol_ ", "start_line": 137, "start_column": 12, "end_lin...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "DNS", "Cache", "Entr", "y", "Type_", "(_", "Generate", "ds", "Super", "_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "export", "Children...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
stephenmuss/django-ios-notifications/ios_notifications/tests.py
[ { "content": " def test_create_with_invalid_passphrase(self):\n cert, key = generate_cert_and_pkey(as_string=True, passphrase='correct')\n form = APNServiceForm({'name': 'test', 'hostname': 'localhost', 'certificate': cert, 'private_key': key, 'passphrase': 'incorrect'})\n self.assertFal...
[ { "span": "self.assertTrue('passphrase' in form.errors)", "start_line": 92, "start_column": 8, "end_line": 92, "end_column": 52 }, { "span": "self.assertTrue(self.user in self.device.users.all())", "start_line": 162, "start_column": 8, "end_line": 162, "end_column": 61 ...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "AP", "NS", "ervice", "Test_", "(_", "Us", "e", "Moc", "k", "SS", "LS", "erver", "Mixin_", ",_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
grawity/hacks/hacks/Dead-projects/bash-parser.py
[ { "content": "\tdef feed(self, line, multiline=True):\n\t\ti = 0\n\t\tappend = False\n\t\tdone = True\n\t\tvariables = os.environ\n\n\t\twhile i <= len(line):\n\t\t\tchar = line[i] if i < len(line) else None\n\t\t\t#print(\"%r %r %r\" % (self.words, char, self.state))\n\t\t\tif self.state.last == \"raw\":\n\t\t...
[ { "span": "err ", "start_line": 193, "start_column": 3, "end_line": 193, "end_column": 6 }, { "span": "err ", "start_line": 195, "start_column": 3, "end_line": 195, "end_column": 6 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Parser_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "feed_", "(_", "self_", ",_", "line_", ",_", "multiline", "_", "=_", "...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
mrknow/filmkodi/plugin.video.specto/resources/lib/resolvers/mrfile.py
[ { "content": "# -*- coding: utf-8 -*-\n\n'''\n Specto Add-on\n Copyright (C) 2015 lambda\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License,...
[ { "span": "import re,urllib", "start_line": 21, "start_column": 0, "end_line": 21, "end_column": 16 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "'''", "\\", "10", ";", " ", " ", " ", " ",...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
ggventurini/python-deltasigma/deltasigma/tests/test_synthesizeNTF.py
[ { "content": " @raises(ValueError)\n def test_synthesizeNTF_12(self):\n \"\"\"Test function for synthesizeNTF() 12/15\"\"\"\n # f0 > 0.5 -> ValueError\n z, p, k = synthesizeNTF(order=2, osr=32, opt=0, H_inf=1.3, f0=0.7)", "metadata": "root.TestSynthesizeNTF.test_synthesizeNTF_12",...
[ { "span": "z,", "start_line": 168, "start_column": 8, "end_line": 168, "end_column": 9 }, { "span": "p,", "start_line": 168, "start_column": 11, "end_line": 168, "end_column": 12 }, { "span": "k ", "start_line": 168, "start_column": 14, "end_line": 168...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Test", "Synthe", "size", "NT", "F_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "raises_", "(_", "Va...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unreachable code
anandology/pyjamas/examples/libtest/BuiltinTest.py
[ { "content": "from UnitTest import UnitTest\n\ntry:\n builtin_value = builtin.value\nexcept:\n builtin_value = None\nif False:\n import builtin\nimport builtin\n\nfrom imports.cls import CLS\nfrom imports.cls1 import CLS as CLS1\n\n\n\n\n\n#from pyjamas import log\n\n\n\n\n", "metadata": "root", ...
[ { "span": "import builtin", "start_line": 7, "start_column": 4, "end_line": 7, "end_column": 18 } ]
[]
1
true
[ "[CLS]_", "Unrea", "chab", "le_", "code_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "Unit", "Test_", "import_", "Unit", "Test_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
SecurityInnovation/AuthMatrix/AuthMatrix.py
[ { "content": " def runMessagesThread(self, messageIndexes=None):\n self._db.lock.acquire()\n try:\n indexes = messageIndexes\n if not indexes:\n indexes = self._db.getActiveMessageIndexes()\n self.clearColorResults(indexes)\n for index ...
[ { "span": "except:", "start_line": 428, "start_column": 8, "end_line": 428, "end_column": 15 }, { "span": "except:", "start_line": 670, "start_column": 12, "end_line": 670, "end_column": 19 }, { "span": "except:", "start_line": 828, "start_column": 8, ...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Bur", "p", "Extend", "er_", "(_", "IB", "ur", "p", "Extend", "er_", ",_", "IT", "ab_", ",_", "IM", "essage", "Edit", "or", "Controller_", ",_", "IC"...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unreachable code
cournape/Bento/bento/private/_yaku/yaku/conftests/fconftests.py
[ { "content": "def _check_fortran_runtime_flags(conf):\n if not FC_VERBOSE_FLAG in conf.env:\n raise ValueError(\"\"\"\\\nYou need to call check_fortran_verbose_flag before getting runtime\nflags (or to define the %s variable)\"\"\" % FC_VERBOSE_FLAG)\n code = \"\"\"\\\n program main\n e...
[ { "span": "return False", "start_line": 104, "start_column": 4, "end_line": 104, "end_column": 16 } ]
[]
1
true
[ "[CLS]_", "Unrea", "chab", "le_", "code_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "check", "\\u", "fortran", "\\u", "runt", "ime", "\\u", "flags_", "(_", "conf_", "...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Module is imported with 'import' and 'import from'
ucb-sts/sts/sts/syncproto/pox_syncer.py
[ { "content": "# Copyright 2011-2013 Colin Scott\n# Copyright 2011-2013 Andreas Wundsam\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at:\n#\n# http://www.apache.org/licenses/...
[ { "span": "import logging", "start_line": 18, "start_column": 0, "end_line": 18, "end_column": 14 } ]
[]
1
true
[ "[CLS]_", "Module_", "is_", "imported_", "with_", "'", "import", "'_", "and_", "'", "import", " ", "from", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Copy", "right", " ", "2011", "-", "2013", " ", "Col", "in", " ", "Scot", "t_", "\\u...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unnecessary 'else' clause in loop
VisTrails/VisTrails/vistrails/gui/bundles/utils.py
[ { "content": " def guess_system(self):\n for (name, callable_) in self._callable_dict.iteritems():\n if callable_():\n return name\n else:\n return 'UNKNOWN'", "metadata": "root.System_guesser.guess_system", "header": "['class', 'System_guesser', '('...
[ { "span": "for (name, callable_) in self._callable_dict.iteritems():", "start_line": 106, "start_column": 8, "end_line": 106, "end_column": 65 } ]
[]
1
true
[ "[CLS]_", "Un", "necessar", "y_", "'", "else", "'_", "clause_", "in_", "loop_", "[SEP]_", "class_", "System", "\\u", "guess", "er_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "guess", "\\u", ...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
panagiks/RSPET/Server/RSPET_server.py
[ { "content": "def send_comm(command, cur_host_con):\n encode = bytearray(command)\n for i in range(len(encode)):\n encode[i] ^=0x41\n try:\n cur_host_con.send(encode)\n return 0\n except:\n return 1", "metadata": "root.send_comm", "header": "['module', '___EOS___'...
[ { "span": "except:", "start_line": 20, "start_column": 4, "end_line": 20, "end_column": 11 }, { "span": "except:", "start_line": 35, "start_column": 4, "end_line": 35, "end_column": 11 }, { "span": "except:", "start_line": 59, "start_column": 4, "end_l...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "send", "\\u", "comm_", "(_", "command_", ",_", "...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
callowayproject/django-supertagging/supertagging/markup.py
[ { "content": "def get_handler_module(module):\n if not module:\n return MarkupHandler\n \n mod, f, i, fn = None, None, None, None\n msplit = module.split(\".\")\n if len(msplit) == 1:\n mod = msplit[0]\n else:\n f = msplit[:-1]\n i = msplit[-1:]\n fn = \"...
[ { "span": "except:", "start_line": 81, "start_column": 8, "end_line": 81, "end_column": 15 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "handler", "\\u", "module_", "(_", "module_", ")_", ":_", "\...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unreachable code
lisa-lab/pylearn2/pylearn2/packaged_dependencies/theano_linear/unshared_conv/test_localdot.py
[ { "content": " def run_autoencoder(\n self,\n n_train_iter=10000, # -- make this small to be a good unit test\n rf_shape=(9, 9),\n n_filters=1024,\n dtype='float32',\n module_stride=2,\n lr=0.01,\n show_filters=True,\n ):\n if show_filte...
[ { "span": "plt.subplot(2, 2, 1);", "start_line": 105, "start_column": 12, "end_line": 105, "end_column": 32 }, { "span": "train_fn = theano.function([], [], updates=train_updates)", "start_line": 128, "start_column": 12, "end_line": 128, "end_column": 69 }, { "spa...
[]
1
true
[ "[CLS]_", "Unrea", "chab", "le_", "code_", "[SEP]_", "class_", "Test", "Local", "Dot", "Large", "Gra", "y_", "(_", "Test", "Local", "Dot", "32", "x3", "2_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "run", ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
Calysto/metakernel/metakernel/magics/tests/test_jigsaw_magic.py
[ { "content": "def teardown():\n for fname in ['workspace1.html']:\n try:\n os.remove(fname)\n except:\n pass", "metadata": "root.teardown", "header": "['module', '___EOS___']", "index": 11 } ]
[ { "span": "except:", "start_line": 15, "start_column": 8, "end_line": 15, "end_column": 15 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "teardown_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 2, 2, 2 ]
Unused import
rizumu/bootmachine/bootmachine/contrib/distros/attic/rackspace_arch_20139.py
[ { "content": "import time\nimport urllib2\n\nfrom fabric.api import env, run, sudo\nfrom fabric.colors import blue, cyan, green, magenta, red, white, yellow # noqa\nfrom fabric.context_managers import cd, settings as fabric_settings\nfrom fabric.contrib.files import append, contains, sed, uncomment\nfrom fabri...
[ { "span": "from fabric.contrib.files import append, contains, sed, uncomment", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 65 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "time_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "urllib2_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "fabric_", "._", "api_", "import_", "env_", ",_", "run...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
fp7-ofelia/ocf/expedient/src/python/plugins/openflow/tests/manual_test/manual.py
[ { "content": " def test_case1(self):\n from django.contrib.auth.models import User\n from openflow.optin_manager.opts.models import UserFlowSpace,Experiment, ExperimentFLowSpace\n\n # create a second experiemnt \n username = \"user\"\n password = \"password\"\n ...
[ { "span": "expfs ", "start_line": 133, "start_column": 8, "end_line": 133, "end_column": 13 }, { "span": "adm ", "start_line": 150, "start_column": 8, "end_line": 150, "end_column": 11 }, { "span": "expfs ", "start_line": 185, "start_column": 8, "end_l...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Manu", "al", "Tests_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "case", "1_", "...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Testing equality to None
hyperopt/hyperopt/hyperopt/mongoexp.py
[ { "content": " def run_one(self,\n host_id=None,\n reserve_timeout=None,\n erase_created_workdir=False,\n ):\n if host_id == None:\n host_id = '%s:%i'%(socket.gethostname(), os.getpid()),\n job = None\n start_time = time.time()\n mj = self.mj...
[ { "span": "host_id == None:", "start_line": 1001, "start_column": 11, "end_line": 1001, "end_column": 26 } ]
[]
1
true
[ "[CLS]_", "Test", "ing_", "equality", "_", "to_", "None_", "[SEP]_", "class_", "Mon", "go", "Worker_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "run", "\\u", "one_", "(_", "self_", ",_", "...
[ 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 2, 2, 2...
Except block handles 'BaseException'
SteveAbb/Vestigo/Vestigo Base/settings.py
[ { "content": "\tdef __init__(self):\n\t\t#Set defaults\n\t\tself.baseServer_Port=8080\n\t\tself.baseServer_ForwardData=None\n\t\tself.baseServer_Recache=60\n\t\tself.baseServer_ForwardTimeout=8\n\t\tself.baseServer_ForwardLocation=True\n\t\t\n\t\tself.logging_File=\"vestigo_base.log\"\n\t\tself.logging_MaxSize=...
[ { "span": "except: ", "start_line": 27, "start_column": 2, "end_line": 27, "end_column": 9 }, { "span": "except: ", "start_line": 29, "start_column": 2, "end_line": 29, "end_column": 9 }, { "span": "except: ", "start_line": 31, "start_column": 2, "end_...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Settings_", "(_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u\t", "_", "def_", "\\u\\u", "init\\u\\u_", "(_", "sel...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
CollabQ/CollabQ/common/views.py
[ { "content": "def common_confirm(request):\n message = request.REQUEST['message']\n redirect_to = request.REQUEST['redirect_to']\n\n try:\n validate.nonce(request, message + redirect_to)\n\n parts = urlparse.urlparse(redirect_to)\n action_url = parts[2]\n query_dict = cgi.parse_qs(parts[4], keep_...
[ { "span": "except:", "start_line": 43, "start_column": 2, "end_line": 43, "end_column": 9 }, { "span": "except:", "start_line": 78, "start_column": 2, "end_line": 78, "end_column": 9 }, { "span": "except:", "start_line": 109, "start_column": 4, "end_li...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "common", "\\u", "confirm_", "(_", "request_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
pybrain/pybrain/pybrain/rl/environments/cartpole/__init__.py
[ { "content": "# try importing the external dependencies\ntry:\n from matplotlib.mlab import rk4\nexcept ImportError:\n raise ImportError('This environment needs the matplotlib library installed.')\n\nfrom pybrain.rl.environments.cartpole.cartpole import CartPoleEnvironment, CartPoleLinEnvironment\nfrom py...
[ { "span": "from matplotlib.mlab import rk4", "start_line": 2, "start_column": 4, "end_line": 2, "end_column": 35 }, { "span": "from pybrain.rl.environments.cartpole.cartpole import CartPoleEnvironment, CartPoleLinEnvironment", "start_line": 6, "start_column": 0, "end_line": 6...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "try", " ", "import", "ing", " ", "the", " ", "external", " ", "dependencies_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ",...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
flags/Reactor-3/alife/camps.py
[ { "content": "from globals import *\n\nimport life as lfe\n\nimport references\nimport judgement\nimport language\nimport survival\nimport movement\nimport numbers\nimport speech\nimport chunks\nimport groups\nimport brain\nimport stats\nimport jobs\n\nimport logging\nimport random\n\n\n\n\n\n\n#def find_neares...
[ { "span": "import judgement", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 16 }, { "span": "import language", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 15 }, { "span": "import survival", "start_line": 7, "start_co...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "globals_", "import_", "*_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "life_", "as_", "lf", "e_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "impor...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 0, 1, 2, 0, 1, 1, 2, 0, 1, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
dpkp/kafka-python/kafka/protocol/legacy.py
[ { "content": "from __future__ import absolute_import\n\nimport logging\nimport struct\n\nimport six\n\nfrom six.moves import xrange\n\nimport kafka.protocol.commit\nimport kafka.protocol.fetch\nimport kafka.protocol.message\nimport kafka.protocol.metadata\nimport kafka.protocol.offset\nimport kafka.protocol.pro...
[ { "span": "from six.moves import xrange", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 28 }, { "span": "from kafka.codec import (\n gzip_encode, gzip_decode, snappy_encode, snappy_decode)", "start_line": 17, "start_column": 0, "end_line": 18, "end_c...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "\\u\\u", "future\\u\\u_", "import_", "abs", "olute", "\\u", "import_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "logging_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "imp...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
bbengfort/hadoop-fundamentals/describe/spark-app.py
[ { "content": "#!/usr/bin/env python\n# spark-app.py\n# A Spark application that computes the summary statistics of arrival delays.\n#\n# Author: Benjamin Bengfort <benjamin@bengfort.com>\n# Created: Tue Dec 01 15:13:56 2015 -0500\n\n\"\"\"\nA Spark application that computes the summary statistics of arrival ...
[ { "span": "import sys", "start_line": 16, "start_column": 0, "end_line": 16, "end_column": 10 }, { "span": "from functools import partial", "start_line": 20, "start_column": 0, "end_line": 20, "end_column": 29 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "spark", "-", "app", ".", "py_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "A", " ", "Spa...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
bshillingford/python-line/line/linethrift/constants.py
[ { "content": "#\n# Autogenerated by Thrift Compiler (0.9.1)\n#\n# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n#\n# options string: py:new_style\n#\n\nfrom thrift.Thrift import TType, TMessageType, TException, TApplicationException\nfrom ttypes import *\n\n", "metadata": "root", "h...
[ { "span": "from thrift.Thrift import TType, TMessageType, TException, TApplicationException", "start_line": 8, "start_column": 0, "end_line": 8, "end_column": 80 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Auto", "generat", "ed", " ", "by", " ", "Thri", "ft", " ", "Compil", "er", " ", "(", "0.", "9.1", ")_", "\\u\\u\\uNL\\u\\u\\u_", ...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
azoft-dev-team/imagrium/env/Lib/test/test_complex.py
[ { "content": " def assertCloseAbs(self, x, y, eps=1e-9):\n \"\"\"Return true iff floats x and y \"are close\\\"\"\"\"\n # put the one with larger magnitude second\n if abs(x) > abs(y):\n x, y = y, x\n if y == 0:\n return abs(x) < eps\n if x == 0:\n ...
[ { "span": "self.assertTrue(abs((x-y)/y) < eps)", "start_line": 37, "start_column": 8, "end_line": 37, "end_column": 43 }, { "span": "self.assertTrue(a < 2.0j)", "start_line": 128, "start_column": 8, "end_line": 128, "end_column": 33 }, { "span": "self.assertTrue(c...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Comple", "x", "Test_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
marionmari/pyGPs/pyGPs/Core/inf.py
[ { "content": " def evaluate(self, meanfunc, covfunc, likfunc, x, y, nargout=1):\n tol = 1e-6 # tolerance for when to stop the Newton iterations\n smax = 2; Nline = 20; thr = 1e-4 # line search parameters\n maxit = 20 # max number of...
[ { "span": "s ", "start_line": 501, "start_column": 12, "end_line": 501, "end_column": 13 }, { "span": "Nfun ", "start_line": 503, "start_column": 12, "end_line": 503, "end_column": 16 }, { "span": "s ", "start_line": 633, "start_column": 12, "end_line"...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Lap", "lace", "_", "(_", "Infer", "ence_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "evaluate_", "(_", "self_", ",_", "mean", "func_", ",_...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
xraypy/xraylarch/plugins/io/save_restore.py
[ { "content": " def add_data(self, group, name, data):\n if self.isgroup(data):\n g = self.add_h5group(group, name,\n attrs={'larchtype': 'group',\n 'class': data.__class__.__name__})\n for comp in dir(data):\n...
[ { "span": "d ", "start_line": 94, "start_column": 12, "end_line": 94, "end_column": 13 }, { "span": "symtable ", "start_line": 161, "start_column": 4, "end_line": 161, "end_column": 12 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "H", "5", "Py", "Save", "File_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "add", "\\u", "data_", "(_", "self_", ",_", "g...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
sarumont/py-trello/test/test_board.py
[ { "content": " def test70_all_members(self):\n self.assertTrue(len(self._board.all_members()) > 0)", "metadata": "root.TrelloBoardTestCase.test70_all_members", "header": "['class', 'TrelloBoardTestCase', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 115 }, { "...
[ { "span": "self.assertTrue(len(self._board.all_members()) > 0)", "start_line": 116, "start_column": 8, "end_line": 116, "end_column": 59 }, { "span": "self.assertTrue(len(self._board.normal_members()) >= 0)", "start_line": 119, "start_column": 8, "end_line": 119, "end_col...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Tre", "llo", "Boa", "rd", "Test", "Case_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test", "7", "0...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 2, 2, 2...
Unnecessary pass
hwaf/hwaf/py-hwaftools/find_python.py
[ { "content": "# -*- python -*-\n\n# stdlib imports ---\nimport os\nimport os.path as osp\nimport textwrap\nimport subprocess\ntry:\n subprocess.check_output\nexcept AttributeError:\n subprocess.check_output = check_output\n pass\n\n# waf imports ---\nimport waflib.Utils\nimport waflib.Logs as msg\nfrom...
[ { "span": "pass", "start_line": 42, "start_column": 4, "end_line": 42, "end_column": 8 }, { "span": "pass", "start_line": 75, "start_column": 8, "end_line": 75, "end_column": 12 }, { "span": "pass", "start_line": 79, "start_column": 8, "end_line": 79, ...
[]
1
true
[ "[CLS]_", "Un", "necessar", "y_", "pass_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "python", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "stdlib", " ", "import", "s", " ", "---", "_", "\\u\\u\\uNL\\u\...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
hydroshare/hydroshare2/ga_interactive/views.py
[ { "content": "def shared_notebook(request, *args, **kwargs):\n notebook_settings = list(settings.IPYTHON_SETTINGS)\n user_directory = os.path.join(settings.IPYTHON_BASE, '_shared')\n port = 8888\n hostname = settings.IPYTHON_HOST\n target_url='http://{hostname}:{port}/'.format(hostname=hostname, ...
[ { "span": "except:", "start_line": 38, "start_column": 4, "end_line": 38, "end_column": 11 }, { "span": "except:", "start_line": 47, "start_column": 8, "end_line": 47, "end_column": 15 }, { "span": "except:", "start_line": 78, "start_column": 4, "end_l...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "shared", "\\u", "notebook_", "(_", "request_", ",_", "*_", "args_", ",_", ...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
ppwwyyxx/tensorpack/examples/load-vgg16.py
[ { "content": " def _get_cost(self, inputs, is_training):\n is_training = bool(is_training)\n keep_prob = tf.constant(0.5 if is_training else 1.0)\n\n image, label = inputs\n\n with argscope(Conv2D, kernel_shape=3):\n # 224\n l = Conv2D('conv1_1', image, 64)\n...
[ { "span": "prob ", "start_line": 74, "start_column": 8, "end_line": 74, "end_column": 12 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Model_", "(_", "Model", "Desc_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "get", "\\u", "cost_", "(_", "self_", ",_", "inputs_", ",...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
dropbox/nsot/tests/fixtures.py
[ { "content": "\"\"\"\nMake dummy data and fixtures and stuff to use in benchmarking.\n\"\"\"\n\nimport collections\nimport faker\nimport json\nimport hashlib\nfrom hashlib import sha1\nimport ipaddress\nimport pytest\nimport random\nimport socket\nimport struct\nimport time\n\n\n# Constants and stuff\nfake = fa...
[ { "span": "import json", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 11 }, { "span": "import hashlib", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 14 }, { "span": "import ipaddress", "start_line": 9, "start_column"...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "Make", " ", "dummy", " ", "data", " ", "and", " ", "fixture", "s", " ", "and", " ", "stu", "ff", " ", "to", " ", "use", " ", "in", " ", "be...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 0, 1, 2, 0, 1...
Unused import
dhiana/pretty_tsne/pretty_tsne.py
[ { "content": "import argparse\n\n# That's an impressive list of imports.\nimport numpy as np\nfrom numpy import linalg\nfrom numpy.linalg import norm\nfrom scipy.spatial.distance import squareform, pdist\nimport pandas as pd\n\n# We import sklearn.\nimport sklearn\nfrom sklearn.manifold import TSNE\nfrom sklear...
[ { "span": "from numpy.linalg import norm", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 29 }, { "span": "from scipy.spatial.distance import squareform, pdist", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 52 }, { "span": "fr...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "argparse_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Tha", "t", "'", "s", " ", "an", " ", "impres", "sive", " ", "list", " ", "of", " ", "impo...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2...
Unused local variable
modflowpy/flopy/autotest/t018_test.py
[ { "content": "def test_tpl_constant():\n # Define the model dimensions\n nlay = 3\n nrow = 20\n ncol = 20\n\n # Create the flopy model object and add the dis and lpf packages\n m = flopy.modflow.Modflow(modelname='tpl1', model_ws='./temp')\n dis = flopy.modflow.ModflowDis(m, nlay, nrow, nco...
[ { "span": "dis ", "start_line": 14, "start_column": 4, "end_line": 14, "end_column": 7 }, { "span": "lpf ", "start_line": 15, "start_column": 4, "end_line": 15, "end_column": 7 }, { "span": "transform=", "start_line": 31, "start_column": 4, "end_line":...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "test\\u", "tpl", "\\u", "constant_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Define", " ", "the", " ", "model", " ", ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
awslabs/lambda-apigateway-twilio-tutorial/pytz/tests/test_tzinfo.py
[ { "content": " def testGMT(self):\n now = datetime.now(tz=GMT)\n self.assertTrue(now.utcoffset() == NOTIME)\n self.assertTrue(now.dst() == NOTIME)\n self.assertTrue(now.timetuple() == now.utctimetuple())\n self.assertTrue(now==now.replace(tzinfo=UTC))", "metadata": "roo...
[ { "span": "self.assertTrue(now.utcoffset() == NOTIME)", "start_line": 76, "start_column": 8, "end_line": 76, "end_column": 50 }, { "span": "self.assertTrue(now.dst() == NOTIME)", "start_line": 77, "start_column": 8, "end_line": 77, "end_column": 44 }, { "span": "s...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Basic", "Test_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test", "GM", "T_", "(_", "self_", ")_", ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1...
Module is imported with 'import' and 'import from'
danvk/ssi-server/ssi_server.py
[ { "content": "#!/usr/bin/env python\n'''\nUse this in the same way as Python's SimpleHTTPServer:\n\n ./ssi_server.py [port]\n\nThe only difference is that, for files ending in '.html', ssi_server will\ninline SSI (Server Side Includes) of the form:\n\n <!-- #include virtual=\"fragment.html\" -->\n\nRun ./ssi_...
[ { "span": "import http.server as SimpleHTTPServer", "start_line": 23, "start_column": 4, "end_line": 23, "end_column": 42 } ]
[]
1
true
[ "[CLS]_", "Module_", "is_", "imported_", "with_", "'", "import", "'_", "and_", "'", "import", " ", "from", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\u\\u\\uNL\\u\\u\\u_", "'''", "\\", "1...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
yhat/db.py/db/tests/tests.py
[ { "content": "import pandas as pd\nfrom db import DemoDB, DB, list_profiles, remove_profile\nimport unittest\n\n\n\nif __name__ == \"__main__\":\n unittest.main()\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class PandaSQLTest(unittest.TestCas...
[ { "span": "import pandas as pd", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 19 }, { "span": "from db import DemoDB, DB, list_profiles, remove_profile", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 56 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "pandas_", "as_", "pd_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "db_", "import_", "Demo", "DB_", ",_", "DB_", ",_", "list", "\\u", "profiles_", ",_", "remove", "\\u", "pr...
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
los-cocos/cocos/test/test_aspect_ratio_on_resize.py
[ { "content": " def __init__(self, w_ini, h_ini, color4):\n super(ProbeRect,self).__init__()\n self.color4 = color4\n w2 = int(w_ini//2)\n h2 = int(h_ini//2)\n self.vertexes = [(0,0,0),(0,h_ini,0), (w_ini,h_ini,0),(w_ini,0,0)]", "metadata": "root.ProbeRect.__init__", ...
[ { "span": "w2 ", "start_line": 24, "start_column": 8, "end_line": 24, "end_column": 10 }, { "span": "h2 ", "start_line": 25, "start_column": 8, "end_line": 25, "end_column": 10 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Probe", "Rect_", "(_", "coco", "s_", "._", "coco", "sno", "de_", "._", "Coc", "os", "Node_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _",...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
ODM2/ODMToolsPython/odmtools/lib/ObjectListView/ListCtrlPrinter.py
[ { "content": " @staticmethod\n def InsetBy(r, delta):\n if delta is None:\n return r\n try:\n delta[0] # is it indexable?\n return RectUtils.InsetRect(r, delta)\n except:\n return RectUtils.InsetRect(r, (delta, delta, delta, delta))", "m...
[ { "span": "except:", "start_line": 2708, "start_column": 8, "end_line": 2708, "end_column": 15 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Rect", "Utils_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "staticmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "Ins...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Testing equality to None
benbaptist/minecraft-wrapper/example-plugins/SmallBrother.py
[ { "content": "\tdef placeBlock(self, payload):\n\t\tif payload[\"item\"] == None: return\n\t\tplayer = payload[\"player\"]\n\t\tx, y, z = payload[\"position\"]\n\t\tuuid = player.uuid\n\t\tif player.name in self.toggled:\n\t\t\tactions = self.lookupBlock(x, y, z)\n\t\t\tfound = False\n\t\t\tfor action in action...
[ { "span": "payload[\"item\"] == None:", "start_line": 53, "start_column": 5, "end_line": 53, "end_column": 28 }, { "span": "playerName == None:", "start_line": 126, "start_column": 5, "end_line": 126, "end_column": 23 } ]
[]
1
true
[ "[CLS]_", "Test", "ing_", "equality", "_", "to_", "None_", "[SEP]_", "class_", "Main_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "place", "Block_", "(_", "self_", ",_", "payload_", ")_"...
[ 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
weblabdeusto/weblabdeusto/server/src/weblab/core/webclient/view_lab.py
[ { "content": "from __future__ import print_function, unicode_literals\nimport os\nfrom flask import render_template, url_for, request, flash, redirect, session, g\n\nfrom weblab.core.i18n import gettext, get_locale\nfrom weblab.core.exc import SessionNotFoundError\nfrom weblab.core.webclient.view_login import d...
[ { "span": "import os", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 9 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "\\u\\u", "future\\u\\u_", "import_", "print", "\\u", "function_", ",_", "unicode", "\\u", "literals_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", ...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
fp7-ofelia/ocf/expedient/src/python/expedient_geni/gopenflow/tests/rpc.py
[ { "content": "'''\nCreated on Oct 6, 2010\n\n@author: jnaous\n'''\nfrom expedient.common.rpc4django import rpcmethod\nimport xmlrpclib\nimport logging\nfrom geni import CredentialVerifier\nfrom django.conf import settings\nfrom decorator import decorator\nfrom openflow.plugin.gapi import gapi\nfrom expedient.cl...
[ { "span": "from expedient.clearinghouse.slice.models import Slice", "start_line": 12, "start_column": 0, "end_line": 12, "end_column": 54 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "'''", "\\", "10", ";", "Creat", "ed", " ", "on", " ", "Oct", " ", "6", ",", " ", "2010", "\\", "10", ";", "\\", "10", ";", "@", "author", ":", " ", "jn", "ao", "us"...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
anandology/pyjamas/examples/gcharttestapp/GChartTestApp.py
[ { "content": "import pyjd\n\nif __name__ == '__main__':\n # whoops, this has to be done before GChartConsts are imported...\n pyjd.setup(\"./public/GChartTestApp.html\")\n\nfrom pyjamas import DeferredCommand\nfrom pyjamas.ui.HTML import HTML\nfrom pyjamas.ui.RootPanel import RootPanel\nfrom pyjamas.chart...
[ { "span": "from TestGChart00 import TestGChart00 ", "start_line": 13, "start_column": 0, "end_line": 13, "end_column": 37 }, { "span": "from TestGChart01 import TestGChart01 ", "start_line": 14, "start_column": 0, "end_line": 14, "end_column": 37 }, { "span": "fro...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "pyj", "d_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "\\u\\u", "name\\u\\u_", "==_", "'\\u", "\\u", "main", "\\u\\u'_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", ...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
idlesign/django-sitegate/sitegate/tests.py
[ { "content": " def test_signin(self):\n # simple decoration\n response = signin_view(lambda req: req)(self.req_factory.get('/signin/'))\n self.assertTrue(hasattr(response, 'sitegate'))\n self.assertTrue('signin_forms' in response.sitegate)\n self.assertFalse('signup_forms' ...
[ { "span": "self.assertTrue('signin_forms' in response.sitegate)", "start_line": 203, "start_column": 8, "end_line": 203, "end_column": 60 }, { "span": "self.assertFalse('signup_forms' in response.sitegate)", "start_line": 204, "start_column": 8, "end_line": 204, "end_colu...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Decorat", "ors", "Test_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "signin", "_", "(_", "s...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
lsaffre/lino/lino/modlib/tinymce/fixtures/std.py
[ { "content": "# -*- coding: UTF-8 -*-\n# Copyright 2011-2015 Luc Saffre\n# License: BSD (see file COPYING for details)\n\nfrom django.conf import settings\nfrom lino.utils.instantiator import Instantiator\n\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "con...
[ { "span": "from django.conf import settings", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 32 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "UT", "F", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Copy", "right", " ", "2011", "-", "201", "5", " "...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0...
Except block handles 'BaseException'
CountZer0/PipelineConstructionSet/python/maya/site-packages/amTools/unity/blendShapes.py
[ { "content": "def exportBlendShapes():\n\t\"\"\"Exports sparse blendShape data from the scene for each mesh with a\n\tblendShape deformer in its history. This is accomplished by duplicating\n\tthe mesh and tagging vertices in the duplicate using vertex colors. The\n\tduplicate then stores all of the data as use...
[ { "span": "except: ", "start_line": 75, "start_column": 2, "end_line": 75, "end_column": 9 }, { "span": "except: ", "start_line": 106, "start_column": 4, "end_line": 106, "end_column": 11 }, { "span": "except: ", "start_line": 123, "start_column": 3, "...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "export", "Ble", "nd", "Shapes", "_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
aws/aws-cli/awscli/customizations/emr/emrutils.py
[ { "content": "# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#...
[ { "span": "from botocore.exceptions import WaiterError, NoCredentialsError", "start_line": 21, "start_column": 0, "end_line": 21, "end_column": 63 }, { "span": "from botocore import xform_name", "start_line": 22, "start_column": 0, "end_line": 22, "end_column": 31 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Copy", "right", " ", "2014", " ", "Ama", "zon", ".", "com", ",", " ", "Inc", ".", " ", "or", " ", "its", " ", "affi", "liat", "es", ".", " ", "All", " ", ...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
Yelp/fullerite/src/diamond/collectors/traceroute/test/testraceroute.py
[ { "content": "#!/usr/bin/python\n# coding=utf-8\n################################################################################\n\nfrom test import CollectorTestCase\nfrom test import get_collector_config\nfrom test import unittest\nfrom mock import Mock\nfrom mock import patch\n\nfrom diamond.collector impor...
[ { "span": "from mock import Mock", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 21 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "python_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "codi", "ng", "=", "utf", "-", "8_", "\\u\\u\\uNL\\u\\u\\u_", "###########", "###########", "#######...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 2, 2, 2, 2...
Unused import
hvandenb/splunk-elasticsearch/search-elasticsearch/bin/splunklib/modularinput/__init__.py
[ { "content": "\"\"\"The following imports allow these classes to be imported via\nthe splunklib.modularinput package like so:\n\nfrom splunklib.modularinput import *\n\"\"\"\nfrom argument import Argument\nfrom event import Event\nfrom event_writer import EventWriter\nfrom input_definition import InputDefinitio...
[ { "span": "from argument import Argument", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 29 }, { "span": "from event import Event", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 23 }, { "span": "from event_writer import EventW...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\"\"\"", "The", " ", "follow", "ing", " ", "import", "s", " ", "allow", " ", "these", " ", "classe", "s", " ", "to", " ", "be", " ", "import", "ed", " ", "via", "\\", "...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
quixey/python-aliyun/tests/functional/readonly.py
[ { "content": " def testClusters(self):\n clusters = self.c.get_all_clusters()\n self.assertTrue(len(clusters)>0)", "metadata": "root.EcsReadOnlyTest.testClusters", "header": "['class', 'EcsReadOnlyTest', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 35 }, {...
[ { "span": "self.assertTrue(len(clusters)>0)", "start_line": 37, "start_column": 8, "end_line": 37, "end_column": 40 }, { "span": "self.assertTrue(inst is not None)", "start_line": 44, "start_column": 8, "end_line": 44, "end_column": 41 }, { "span": "self.assertTru...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Ec", "s", "Read", "On", "ly", "Test_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test", "Cluster", ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 2, 2...
Imprecise assert
ImageEngine/gaffer/python/GafferUITest/BoxUITest.py
[ { "content": "\tdef testRenamingPlugs( self ) :\n\n\t\tbox = Gaffer.Box()\n\t\tbox[\"user\"][\"a\"] = Gaffer.IntPlug( flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic )\n\n\t\tui = GafferUI.NodeUI.create( box )\n\n\t\tw = ui.plugValueWidget( box[\"user\"][\"a\"], lazy=False )\n\t\tself.assertTrue( ...
[ { "span": "self.assertTrue( w is not None )", "start_line": 127, "start_column": 2, "end_line": 127, "end_column": 34 }, { "span": "self.assertTrue( w2 is not None )", "start_line": 132, "start_column": 2, "end_line": 132, "end_column": 35 }, { "span": "self.asser...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Box", "UI", "Test_", "(_", "Ga", "ffer", "UI", "Test_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test", "Ren", "amin"...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
CGATOxford/cgat/obsolete/pipeline_rnaseq_brawand.py
[ { "content": "@transform( \"*.txt\", regex(r\"(\\S+).txt\"), r\"\\1.gtf\" )\ndef convertTxtToGtf( infile, outfile ):\n '''Convert txt to Gtf'''\n track = P.snip( os.path.basename(infile), \".txt\" )\n statement = '''cat %(infile)s \n | awk 'OFS=\"\\\\t\" {print \"chr\"$3,\"rnaseq\",\...
[ { "span": "track ", "start_line": 145, "start_column": 4, "end_line": 145, "end_column": 9 }, { "span": "statement ", "start_line": 146, "start_column": 4, "end_line": 146, "end_column": 13 }, { "span": "track ", "start_line": 155, "start_column": 4, "...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "@_", "transform_", "(_", "\"*", ".", "txt", "\"_", ",_", "regex_", "(_", "r", "\"(", "\\\\", "S", "+)", ".", "txt", "\"_", ")_", ",_", "r...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
OpenMDAO/OpenMDAO/openmdao/core/test/test_problem.py
[ { "content": " def test_conflicting_connections(self):\n # verify we get an error if we have conflicting implicit and explicit connections\n root = Group()\n\n # promoting G1.x will create an implicit connection to G3.x\n # this is a conflict because G3.x (aka G3.C4.x) is already ...
[ { "span": "self.assertTrue(msg in str(error))", "start_line": 55, "start_column": 12, "end_line": 55, "end_column": 46 }, { "span": "self.assertTrue(expected in raised_error)", "start_line": 362, "start_column": 8, "end_line": 362, "end_column": 49 }, { "span": "s...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "Problem_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "test\\u", "conflicting", "\\u", "c...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
pydata/pandas/asv_bench/benchmarks/eval.py
[ { "content": " def time_add(self, engine, threads):\n df, df2, df3, df4 = self.df, self.df2, self.df3, self.df4\n pd.eval('df + df2 + df3 + df4', engine=engine)", "metadata": "root.eval_frame.time_add", "header": "['class', 'eval_frame', '(', 'object', ')', ':', '___EOS___']", "inde...
[ { "span": "df,", "start_line": 21, "start_column": 8, "end_line": 21, "end_column": 10 }, { "span": "df2,", "start_line": 21, "start_column": 12, "end_line": 21, "end_column": 15 }, { "span": "df3,", "start_line": 21, "start_column": 17, "end_line": 21...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "eval", "\\u", "frame_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "time", "\\u", "add_", "(_", "s...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 2, 0, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
fp7-ofelia/ocf/expedient/src/python/expedient/common/utils/plugins/plugincommunicator.py
[ { "content": " @staticmethod\n def get_objects(slice, plugin_type, klass, **kwargs):\n \"\"\"\n Retrieves the id of a model belonging to another plugin\n and which is contained in the same slice than the \n AM corresponding to the other plugin that invokes this.\n\n E.g....
[ { "span": "except: ", "start_line": 42, "start_column": 12, "end_line": 42, "end_column": 19 }, { "span": "except:", "start_line": 45, "start_column": 16, "end_line": 45, "end_column": 23 }, { "span": "except:", "start_line": 71, "start_column": 8, "en...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Plug", "in", "Communi", "cator", "_", "(_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "@_", "staticmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "d...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
aldebaran/qibuild/python/qitoolchain/actions/add_package.py
[ { "content": "def do(args):\n \"\"\" Add a package to a toolchain\n\n - Check that there is a current toolchain\n - Add the package to the cache\n - Add the package from cache to toolchain\n\n \"\"\"\n toolchain = qitoolchain.parsers.get_toolchain(args)\n name = args.name\n package_path ...
[ { "span": "name ", "start_line": 37, "start_column": 4, "end_line": 37, "end_column": 8 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "do_", "(_", "args_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", " ", "...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
breily/juno/doc/examples/models.py
[ { "content": "@route('/makeperson/*:name/')\ndef makeperson(web, name):\n exist = Person.find().filter(Person.name==name)\n if exist.count() != 0: return 'That person already exists'\n p = Person(name=name, views=0).save()\n return 'Person created'", "metadata": "root.makeperson", "header": ...
[ { "span": "p ", "start_line": 8, "start_column": 4, "end_line": 8, "end_column": 5 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "@_", "route_", "(_", "'/", "makep", "ers", "on", "/*", ":", "name", "/'_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "makep", "ers", "on_", "...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
twisted/txmongo/tests/test_queries.py
[ { "content": " @defer.inlineCallbacks\n def test_AsClass(self):\n yield self.coll.insert({'x': 42})\n\n doc = yield self.coll.find_one({})\n self.assertTrue(type(doc) is dict)\n\n class CustomDict(dict):\n pass\n\n doc = yield self.coll.find_one({}, as_class=C...
[ { "span": "self.assertTrue(type(doc) is dict)", "start_line": 237, "start_column": 8, "end_line": 237, "end_column": 42 }, { "span": "self.assertTrue(type(doc) is CustomDict)", "start_line": 243, "start_column": 8, "end_line": 243, "end_column": 48 }, { "span": "s...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "Mon", "go", "Querie", "s_", "(_", "\\u", "Sing", "le", "Collecti", "on", "Test_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "defer_", "....
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
hltbra/pycukes/pycukes/__init__.py
[ { "content": "from runner import StoryRunner\nfrom finder import (find_steps_modules,\n find_text_specs,\n find_before_all,\n find_after_all,\n find_before_each,\n find_after_each)\nfrom hooks import BeforeAll, AfterA...
[ { "span": "from runner import StoryRunner", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 30 }, { "span": "from finder import (find_steps_modules,\n find_text_specs,\n find_before_all,\n find_after_all,\n ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "runner_", "import_", "Stor", "y", "Runner_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "finder_", "import_", "(_", "find", "\\u", "step", "s", "\\u", "modules_", ",_", "\\u\\u\...
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0...
Unused local variable
jonathanslenders/pymux/pymux/darwin.py
[ { "content": "def get_proc_info(pid):\n \"\"\"\n Use sysctl to retrieve process info.\n \"\"\"\n # Ensure that we have the DLL loaded.\n _init()\n\n # Request the length of the process data.\n mib = (c_uint * 4)(CTL_KERN, KERN_PROC, KERN_PROC_PID, pid)\n oldlen = c_ulong()\n oldlenp =...
[ { "span": "oldp ", "start_line": 66, "start_column": 4, "end_line": 66, "end_column": 8 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "proc", "\\u", "info_", "(_", "pid_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Variable defined multiple times
programa-stic/barf-project/barf/tests/arch/x86/test_x86translator.py
[ { "content": " def test_idiv_3(self):\n asm = [\"idiv ebx\"]\n\n ctx_init = {\n 'rax' : 0xFFFFFFFFFFFFFFFE,\n 'rbx' : 0xFFFFFFFFFFFFFFFF,\n 'rdx' : 0xFFFFFFFFFFFFFFFF,\n 'rflags' : 0x202,\n }\n\n x86_ctx_out, reil_ctx_out = self...
[ { "span": "test_idiv_3(", "start_line": 454, "start_column": 8, "end_line": 454, "end_column": 19 } ]
[ { "span": "test_idiv_3(", "start_line": 481, "start_column": 8, "end_line": 481, "end_column": 19 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "class_", "X", "86", "Translat", "ion", "Tests_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u",...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
cloudera/hue/desktop/core/ext-py/Paste-2.0.1/paste/util/datetimeutil.py
[ { "content": "def _number(val):\n try:\n return int(val)\n except:\n return None", "metadata": "root._number", "header": "['module', '___EOS___']", "index": 62 } ]
[ { "span": "except:", "start_line": 65, "start_column": 4, "end_line": 65, "end_column": 11 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u", "number_", "(_", "val_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " ...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 2, 2, 2, 2, 2 ]
Unused import
fusionbox/django-widgy/widgy/contrib/widgy_i18n/south_migrations/0001_initial.py
[ { "content": "# -*- coding: utf-8 -*-\nimport datetime\nfrom south.db import db\nfrom south.v2 import SchemaMigration\nfrom django.db import models\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class Migration(SchemaMigration):\n\n\n\n\n\n mode...
[ { "span": "import datetime", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 15 }, { "span": "from django.db import models", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 28 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "datetime_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "south_", "...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
NotImplemented is not an Exception
chrisglass/django-rulez/rulez/rolez/base.py
[ { "content": " @classmethod\n def is_member(cls, user, obj): #pragma: nocover\n raise NotImplemented", "metadata": "root.AbstractRole.is_member", "header": "['class', 'AbstractRole', '(', 'object', ')', ':', '___EOS___']", "index": 6 } ]
[ { "span": "NotImplemented", "start_line": 8, "start_column": 14, "end_line": 8, "end_column": 28 } ]
[]
1
true
[ "[CLS]_", "Not", "Implemented_", "is_", "not_", "an_", "Exception_", "[SEP]_", "class_", "Abstract", "Role_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "@_", "classmethod_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "is", "\\u", "m...
[ 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1 ]
Unused import
open-cloud/xos/xos/synchronizers/monitoring_channel/steps/sync_sflowtenant.py
[ { "content": "import hashlib\nimport os\nimport socket\nimport socket\nimport sys\nimport base64\nimport time\nimport re\nimport json\nfrom django.db.models import F, Q\nfrom xos.config import Config\nfrom synchronizers.base.syncstep import SyncStep\nfrom synchronizers.base.ansible import run_template_ssh\nfrom...
[ { "span": "import hashlib", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 14 }, { "span": "import socket", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 13 }, { "span": "import socket", "start_line": 3, "start_column":...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "hashlib_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "socket_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "socket_", "\\u\\u\\uNEWLINE\\u\\...
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 2, 2, 2, 2, 0, 1, 2, 0, 1, 2, 2, 2, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Unused import
swordapp/python-client-sword2/tests/functional/test_error_document.py
[ { "content": "from . import TestController\n\nfrom sword2.error_document import Error_Document\nfrom sword2.utils import NS\n\nED = \"\"\"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<sword:error xmlns=\"http://www.w3.org/2005/Atom\"\n xmlns:sword=\"http://purl.org/net/sword/terms/\"\n xmlns:arxiv=\"...
[ { "span": "from sword2.utils import NS", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 27 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "._", "import_", "Test", "Controller_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "sword", "2_", "._", "error", "\\u", "document_", "import_", "Error", "\\u...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
spragunr/deep_q_rl/deep_q_rl/ale_data_set.py
[ { "content": "def speed_tests():\n\n dataset = DataSet(width=80, height=80,\n rng=np.random.RandomState(42),\n max_steps=20000, phi_length=4)\n\n img = np.random.randint(0, 256, size=(80, 80))\n action = np.random.randint(16)\n reward = np.random.random()\n ...
[ { "span": "a ", "start_line": 191, "start_column": 8, "end_line": 191, "end_column": 9 }, { "span": "states,", "start_line": 247, "start_column": 12, "end_line": 247, "end_column": 18 }, { "span": "actions,", "start_line": 247, "start_column": 20, "end...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "speed", "\\u", "tests_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
zzzeek/sqlalchemy/test/engine/test_pool.py
[ { "content": " def test_first_connect_event(self):\n p, canary = self._first_connect_event_fixture()\n\n c1 = p.connect()\n eq_(canary, ['first_connect'])", "metadata": "root.PoolEventsTest.test_first_connect_event", "header": "['class', 'PoolEventsTest', '(', 'PoolTestBase', ')'...
[ { "span": "c1 ", "start_line": 410, "start_column": 8, "end_line": 410, "end_column": 10 }, { "span": "c1 ", "start_line": 416, "start_column": 8, "end_line": 416, "end_column": 10 }, { "span": "c2 ", "start_line": 417, "start_column": 8, "end_line": 4...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Poo", "l", "Event", "s", "Test_", "(_", "Poo", "l", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "first", "\\u", ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2...
First parameter of a method is not named 'self'
correl/Transmission-XBMC/resources/lib/basictypes/pythoninterfaces.py
[ { "content": "\tdef __contains__( other ):\n\t\t\"\"\"Determine whether object contains other\"\"\"", "metadata": "root.IObjectContains.__contains__", "header": "['class', 'IObjectContains', '(', 'Interface', ')', ':', '___EOS___']", "index": 19 }, { "content": "\tdef __eq__( other ):\n\t\t\...
[ { "span": "def __contains__( other ):", "start_line": 19, "start_column": 1, "end_line": 19, "end_column": 27 }, { "span": "def __eq__( other ):", "start_line": 27, "start_column": 1, "end_line": 27, "end_column": 21 }, { "span": "def __ne__( other ):", "start...
[]
1
true
[ "[CLS]_", "First_", "parameter_", "of_", "a_", "method_", "is_", "not_", "named_", "'", "self", "'_", "[SEP]_", "class_", "IO", "bject", "Contains_", "(_", "Interface_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u\\u", "contains\...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1...
Unused import
hwaf/hwaf/py-hwaftools/find_clhep.py
[ { "content": "# -*- python -*-\n\n# stdlib imports ---\nimport os\nimport os.path as osp\n\n# waf imports ---\nimport waflib.Utils\nimport waflib.Logs as msg\nfrom waflib.Configure import conf\n\n#\n_heptooldir = osp.dirname(osp.abspath(__file__))\n\n\n\n\n## EOF ##\n", "metadata": "root", "header": "['...
[ { "span": "import os", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 9 }, { "span": "import waflib.Logs as msg", "start_line": 8, "start_column": 0, "end_line": 8, "end_column": 25 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "python", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "stdlib", " ", "import", "s", " ", "---", "_", "\\u\\u\\uNL\\u\\u\\u_", ...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2...
Testing equality to None
Microsoft/ivy/src/ivy/ivy_ast.py
[ { "content": " def rewrite_atom(self,atom):\n return compose_atoms(self.pref,atom) if self.pref and (self.to_pref == None or atom.rep in self.to_pref) else atom", "metadata": "root.AstRewriteSubstPrefix.rewrite_atom", "header": "['class', 'AstRewriteSubstPrefix', '(', 'object', ')', ':', '___E...
[ { "span": "self.to_pref == None ", "start_line": 689, "start_column": 63, "end_line": 689, "end_column": 83 }, { "span": "x.args[0] == None:", "start_line": 731, "start_column": 11, "end_line": 731, "end_column": 28 }, { "span": "atom == None:", "start_line": ...
[]
1
true
[ "[CLS]_", "Test", "ing_", "equality", "_", "to_", "None_", "[SEP]_", "class_", "Ast", "Rewrite", "Subst", "Prefix_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "rewrite", "\\u", "atom_", "(...
[ 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
amrdraz/kodr/app/brython/www/src/Lib/unittest/loader.py
[ { "content": " def _find_tests(self, start_dir, pattern):\n \"\"\"Used by discovery. Yields test suites it loads.\"\"\"\n paths = os.listdir(start_dir)\n\n for path in paths:\n full_path = os.path.join(start_dir, path)\n if os.path.isfile(full_path):\n ...
[ { "span": "except:", "start_line": 261, "start_column": 16, "end_line": 261, "end_column": 23 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Test", "Loader_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "find", "\\u", "test...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
morepath/morepath/morepath/tests/test_security.py
[ { "content": "def test_permission_directive_identity():\n class app(morepath.App):\n pass\n\n class Model(object):\n def __init__(self, id):\n self.id = id\n\n class Permission(object):\n pass\n\n @app.verify_identity()\n def verify_identity(identity):\n ret...
[ { "span": "response ", "start_line": 90, "start_column": 4, "end_line": 90, "end_column": 12 }, { "span": "response ", "start_line": 124, "start_column": 4, "end_line": 124, "end_column": 12 }, { "span": "response ", "start_line": 132, "start_column": 4, ...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "permissi", "on", "\\u", "directive", "\\u", "identity_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/test/test_derivatives.py
[ { "content": " def test_bad_list_deriv_vars(self):\n top = set_as_top(Assembly())\n top.add('comp1', BadListDerivsComp())\n top.driver.workflow.add(['comp1'])\n top.comp1.x = 1.0\n top.run()\n self.assertEqual(top.comp1.y, 2.0)\n try:\n J = top.driv...
[ { "span": "J ", "start_line": 607, "start_column": 12, "end_line": 607, "end_column": 13 }, { "span": "Jbase,", "start_line": 1074, "start_column": 8, "end_line": 1074, "end_column": 13 }, { "span": "J,", "start_line": 1074, "start_column": 15, "end_li...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Test", "case", "\\u", "derivatives", "_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "test\\u", "bad", "\\u", "list", "\\u", ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
unlimitedlabs/orchestra/orchestra/tests/test_task_lifecycle.py
[ { "content": " def test_get_new_task_assignment_reviewer(self):\n # Reviewer assignment\n self.assertEquals(Task.objects\n .filter(status=Task.Status.PENDING_REVIEW)\n .count(),\n 1)\n\n # assign a review task to ...
[ { "span": "assignment ", "start_line": 132, "start_column": 8, "end_line": 132, "end_column": 18 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Basic", "Task", "Life", "Cycle", "Test", "Case_", "(_", "Orc", "hes", "tra", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDED...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
ImageEngine/gaffer/python/GafferSceneTest/SetFilterTest.py
[ { "content": "##########################################################################\n#\n# Copyright (c) 2014, Image Engine Design Inc. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are\n...
[ { "span": "import Gaffer", "start_line": 40, "start_column": 0, "end_line": 40, "end_column": 13 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "###########", "######", "##", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", "...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
zunzun/pyeq2/Models_3D/Polynomial.py
[ { "content": " def CalculateModelPredictions(self, inCoeffs, inDataCacheDictionary):\n x_in = inDataCacheDictionary['X'] # only need to perform this dictionary look-up once\n y_in = inDataCacheDictionary['Y'] # only need to perform this dictionary look-up once\n PowX_2 = inDataCacheDicti...
[ { "span": "except:", "start_line": 100, "start_column": 8, "end_line": 100, "end_column": 15 }, { "span": "except:", "start_line": 176, "start_column": 8, "end_line": 176, "end_column": 15 }, { "span": "except:", "start_line": 234, "start_column": 8, "...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Full", "Cub", "ic_", "(_", "pye", "q2_", "._", "Model", "\\u", "3", "D", "\\u", "Base", "Class_", "._", "Model", "\\u", "3", "D", "\\u", "Base", "...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Deprecated slice method
CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.5/extras/completion/py/maya/api/OpenMaya.py
[ { "content": " def __delslice__(*args, **kwargs):\n \"\"\"\n x.__delslice__(i, j) <==> del x[i:j]\n \n Use of negative indices is not supported.\n \"\"\"\n \n pass", "metadata": "root.MDoubleArray.__delslice__", "header": "['class', 'MDoubleArray', '(', 'o...
[ { "span": "def __delslice__(*args, **kwargs):", "start_line": 544, "start_column": 4, "end_line": 544, "end_column": 38 }, { "span": "def __getslice__(*args, **kwargs):", "start_line": 562, "start_column": 4, "end_line": 562, "end_column": 38 }, { "span": "def __s...
[]
1
true
[ "[CLS]_", "Dep", "reca", "ted_", "slice_", "method_", "[SEP]_", "class_", "MD", "ou", "ble", "Array_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "dels", "lice", "\\u\\u_", "(_", "*_...
[ 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.3/pymel/tools/ipymel.py
[ { "content": "def buildRecentFileMenu():\n\n if \"RecentFilesList\" not in core.optionVar:\n return\n\n # get the list\n RecentFilesList = core.optionVar[\"RecentFilesList\"]\n nNumItems = len(RecentFilesList)\n RecentFilesMaxSize = core.optionVar[\"RecentFilesMaxSize\"]\n\n# # chec...
[ { "span": "RecentFilesMaxSize ", "start_line": 281, "start_column": 4, "end_line": 281, "end_column": 22 }, { "span": "RecentFilesTypeList ", "start_line": 305, "start_column": 8, "end_line": 305, "end_column": 27 }, { "span": "relpath ", "start_line": 312, ...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "build", "Rece", "nt", "File", "Menu_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
GluuFederation/community-edition-setup/setup.py
[ { "content": " def getPrompt(self, prompt, defaultValue=None):\n try:\n if defaultValue:\n user_input = raw_input(\"%s [%s] : \" % (prompt, defaultValue)).strip()\n if user_input == '':\n return defaultValue\n else:\n ...
[ { "span": "input ", "start_line": 1008, "start_column": 24, "end_line": 1008, "end_column": 29 }, { "span": "script_name ", "start_line": 1689, "start_column": 16, "end_line": 1689, "end_column": 27 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Setup_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "Prompt_", "(_", "self_", ",_", "prompt_", ",_", "default", "Value...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
openstack/horizon/openstack_dashboard/test/api_tests/base_tests.py
[ { "content": " def test_url_for(self):\n url = api_base.url_for(self.request, 'image')\n self.assertEqual('http://public.glance.example.com:9292/v1', url)\n\n url = api_base.url_for(self.request, 'image', endpoint_type='adminURL')\n self.assertEqual('http://admin.glance.example.co...
[ { "span": "url ", "start_line": 240, "start_column": 12, "end_line": 240, "end_column": 15 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Ap", "i", "Help", "er", "Tests_", "(_", "test_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "test\\u", "url", "\\u", "for_", "(_", "self_", ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
badges/pypipins/shields/shields.py
[ { "content": "try:\n from StringIO import StringIO as BytesIO\nexcept ImportError:\n from io import BytesIO\n\nimport gc\nimport hashlib\nimport json\nimport mimetypes\nimport os\nimport re\nimport time\n\ntry:\n from urllib import quote as urllib_quote\nexcept ImportError: # python3\n from urll...
[ { "span": "import json", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 11 }, { "span": "import re", "start_line": 10, "start_column": 0, "end_line": 10, "end_column": 9 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "from_", "String", "IO_", "import_", "String", "IO_", "as_", "Byte", "s", "IO_", "\\u\\u\\uNEWLINE\\u\\u\\u_...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
dropbox/emmer/tests/test_conversation_manager.py
[ { "content": " def test_add_get(self):\n table = ConversationTable()\n conversation = StubConversation()\n table.add_conversation(\"127.0.0.1\", \"3942\", conversation)\n self.assertEqual(table.get_conversation(\"127.0.0.1\", \"3942\"),\n conversation)\n ...
[ { "span": "self.assertTrue(table.lock._RLock__count == 0)", "start_line": 19, "start_column": 8, "end_line": 19, "end_column": 54 }, { "span": "self.assertTrue(table.lock._RLock__count == 0)", "start_line": 24, "start_column": 8, "end_line": 24, "end_column": 54 }, { ...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "Conversation", "Table_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "test\\u", "add", ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
`__eq__` not overridden when adding attributes
codeinn/vcs/vcs/backends/base.py
[ { "content": "class BaseChangeset(object):\n \"\"\"\n Each backend should implement it's changeset representation.\n\n **Attributes**\n\n ``repository``\n repository object within which changeset exists\n\n ``id``\n may be ``raw_id`` or i.e. for mercurial's tip just ...
[ { "span": "class EmptyChangeset(BaseChangeset):", "start_line": 943, "start_column": 0, "end_line": 943, "end_column": 36 } ]
[ { "span": "def __eq__(self, other):", "start_line": 370, "start_column": 4, "end_line": 370, "end_column": 28 }, { "span": "self._empty_cs ", "start_line": 951, "start_column": 8, "end_line": 951, "end_column": 22 }, { "span": "self.revision ", "start_line": 9...
1
false
[ "[CLS]_", "`_", "\\u\\u", "eq\\u\\u_", "`_", "not_", "overrid", "den_", "when_", "addin", "g_", "attributes_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Base", "Change", "set_...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
Damnever/pigar/pigar/tests/imports_example/example2.py
[ { "content": "# -*- coding: utf-8 -*-\n\ntry:\n import urlparse as parse # Py2\nexcept ImportError:\n from urllib import parse # Py3\ntry:\n import __builtin__ as builtins # Py2\nexcept ImportError:\n import builtins # Py3\n\nimport example1\n", "metadata": "root", "header": "['module', ...
[ { "span": "import urlparse as parse ", "start_line": 3, "start_column": 4, "end_line": 3, "end_column": 28 }, { "span": "from urllib import parse ", "start_line": 5, "start_column": 4, "end_line": 5, "end_column": 28 }, { "span": "import __builtin__ as builtins ",...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1...
Wrong number of arguments in a call
enthought/comtypes/comtypes/test/test_agilent.py
[ { "content": " def test(self):\n # The point of this test is the ReadWaveform method below,\n # which takes several [in, out] arguments.\n agDrvr = CreateObject(\"Agilent546XX.Agilent546XX\")\n\n # XXX XXX XXX The following call crashes hard with an accessviola...
[ { "span": "self._check_result(pMeasurement.ReadWaveform(20000))", "start_line": 65, "start_column": 12, "end_line": 65, "end_column": 64 }, { "span": "self._check_result(pMeasurement.ReadWaveform(20000, pInitialX=9.0))", "start_line": 66, "start_column": 12, "end_line": 66, ...
[ { "span": "def _check_result(self, (array, initial_x, x_increment)):", "start_line": 74, "start_column": 8, "end_line": 74, "end_column": 65 } ]
1
false
[ "[CLS]_", "Wro", "ng_", "number_", "of_", "arguments_", "in_", "a_", "call_", "[SEP]_", "class_", "Test_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "t...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
letsencrypt/letsencrypt/certbot-nginx/certbot_nginx/tests/obj_test.py
[ { "content": " def test_eq(self):\n from certbot_nginx.obj import Addr\n new_addr1 = Addr.fromstring(\"192.168.1.1 spdy\")\n self.assertEqual(self.addr1, new_addr1)\n self.assertNotEqual(self.addr1, self.addr2)\n self.assertFalse(self.addr1 == 3333)", "metadata": "root....
[ { "span": "self.assertFalse(self.addr1 == 3333)", "start_line": 62, "start_column": 8, "end_line": 62, "end_column": 44 }, { "span": "self.assertFalse(vhost1b == 1234)", "start_line": 94, "start_column": 8, "end_line": 94, "end_column": 41 } ]
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Add", "r", "Test_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "eq_", "(_", "self_", ")_", ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
hatRiot/shellme/shellme.py
[ { "content": "def get_output(inf,arch='elf'):\n\t\"\"\"format into a string of bytes\"\"\"\n\toutput = ''\n\tif '.nasm' in inf:\n\t\ttmp = getoutput(\"nasm -f %s %s\"%(arch,inf))\n\t\tif 'error' in tmp:\n\t\t\tprint '[-] Error in your asm: ', tmp\n\t\t\tsys.exit(1)\t\n\t\tinf = inf.replace(\".nasm\", \".o\")\n\...
[ { "span": "output ", "start_line": 19, "start_column": 1, "end_line": 19, "end_column": 7 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "output_", "(_", "inf_", ",_", "arch_", "=_", "'", "elf", "'_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
`__init__` method calls overridden method
sympy/sympy/sympy/logic/inference.py
[ { "content": "class KB(object):\n \"\"\"Base class for all knowledge bases\"\"\"\n\n\n\n", "metadata": "root.KB", "header": "['module', '___EOS___']", "index": 213 }, { "content": " def __init__(self, sentence=None):\n self.clauses_ = set()\n if sentence:\n sel...
[ { "span": "self.tell(sentence)", "start_line": 218, "start_column": 12, "end_line": 218, "end_column": 31 } ]
[ { "span": "def tell(self, sentence):", "start_line": 220, "start_column": 4, "end_line": 220, "end_column": 29 }, { "span": "def tell(self, sentence):", "start_line": 237, "start_column": 4, "end_line": 237, "end_column": 29 } ]
1
false
[ "[CLS]_", "`_", "\\u\\u", "init\\u\\u_", "`_", "method_", "calls_", "overrid", "den_", "method_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "KB", "_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
argoroots/Entu/app/update/s3.py
[ { "content": "import argparse\nimport os\nimport sys\nimport time\nimport torndb\nimport yaml\nimport mimetypes\nimport urllib\n\nfrom datetime import datetime\nfrom pymongo import MongoClient, ASCENDING, DESCENDING\nfrom operator import itemgetter\n\nfrom boto.s3.connection import S3Connection\nfrom boto.s3.ke...
[ { "span": "import os", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 9 }, { "span": "import time", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 11 }, { "span": "import mimetypes", "start_line": 6, "start_column": 0, ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "argparse_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "time_", "\\u\\u\\uNEWLINE\\u\\u\\u...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
ucrcsedept/galah/galah/sisyphus/tasks/create_gradebook_csv.py
[ { "content": "import shutil\nimport subprocess\nimport os\nimport datetime\nimport os.path\nfrom bson import ObjectId\n\nfrom galah.db.models import Assignment, Class, CSV, Submission, TestResult, User\n\ntry:\n from collections import OrderedDict\nexcept ImportError:\n from ordereddict import OrderedDict...
[ { "span": "import shutil", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 13 }, { "span": "import subprocess", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 17 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "shutil_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "subprocess_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "datetime_", "\\u\\u\\uNEWLINE...
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
EasyCTF/easyctf-2015/api/api/routes/group.py
[ { "content": "from flask import request, session\nfrom flask import Blueprint\n\nimport api\nimport json\nimport mimetypes\nimport os.path\nimport api.auth\n\nimport api.cache\n\nimport api.stats\n\nimport asyncio\nimport threading\n\nfrom api.annotations import *\nfrom api.common import flat_multi\nfrom api.ex...
[ { "span": "from flask import request, session", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 34 }, { "span": "import json", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 11 }, { "span": "import mimetypes", "start_line": 5...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "flask_", "import_", "request_", ",_", "session_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "flask_", "import_", "Blueprint_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "imp...
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 0, 1, 2, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
chinoogawa/fbht/mainFunc.py
[ { "content": "def set_dtsg():\n n = 0\n flag = False\n try:\n response = br.open('https://www.facebook.com/')\n ''' Old dtsg set module.. \n for form in br.forms():\n for control in form.controls: \n if control.name == 'fb_dtsg':\n flag ...
[ { "span": "except:", "start_line": 123, "start_column": 4, "end_line": 123, "end_column": 11 }, { "span": "except:", "start_line": 138, "start_column": 4, "end_line": 138, "end_column": 11 }, { "span": "except:", "start_line": 189, "start_column": 8, "...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "set\\u", "dt", "sg_", "(_", ")_", ":_", "\\u\\u\...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
CGATOxford/cgat/scripts/histograms2kl.py
[ { "content": "def main(argv=None):\n \"\"\"script main.\n\n parses command line options in sys.argv, unless *argv* is given.\n \"\"\"\n\n if argv is None:\n argv = sys.argv\n\n parser = E.OptionParser(\n version=\"%prog version: $Id\",\n usage=globals()[\"__doc__\"])\n\n p...
[ { "span": "argv ", "start_line": 46, "start_column": 8, "end_line": 46, "end_column": 12 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "main_", "(_", "argv_", "=_", "None_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "script", " ", ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Constant in conditional expression or statement
babble/babble/include/jython/Lib/test/test_types.py
[ { "content": "# Python test set -- part 6, built-in types\n\nfrom test.test_support import *\n\nprint '6. Built-in types'\n\nprint '6.1 Truth value testing'\nif None: raise TestFailed, 'None is true instead of false'\nif 0: raise TestFailed, '0 is true instead of false'\nif 0L: raise TestFailed, '0L is true ins...
[ { "span": "not 1:", "start_line": 12, "start_column": 3, "end_line": 12, "end_column": 8 }, { "span": "not 1L:", "start_line": 13, "start_column": 3, "end_line": 13, "end_column": 9 }, { "span": "not 1.0:", "start_line": 14, "start_column": 3, "end_lin...
[]
1
true
[ "[CLS]_", "Constant_", "in_", "conditional", "_", "expression_", "or_", "statement_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Pyth", "on", " ", "test", " ", "set", " ", "--", " ", "part", " ", "6", ",", " ", "bui", "lt", "-", "in", " ",...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
AppScale/appscale/AppServer/lib/django-1.5/tests/regressiontests/queries/tests.py
[ { "content": " def test_ticket2306(self):\n # Checking that no join types are \"left outer\" joins.\n query = Item.objects.filter(tags=self.t2).query\n self.assertTrue(query.LOUTER not in [x[2] for x in query.alias_map.values()])\n\n self.assertQuerysetEqual(\n Item.obj...
[ { "span": "self.assertTrue(query.LOUTER not in [x[2] for x in query.alias_map.values()])", "start_line": 111, "start_column": 8, "end_line": 111, "end_column": 85 }, { "span": "self.assertTrue(query.LOUTER not in [x[2] for x in query.alias_map.values()])", "start_line": 316, "sta...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Querie", "s1", "Tests_", "(_", "Base", "Query", "set", "Test_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "tick", "et", "230", "6_", ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
SublimeHaskell/SublimeHaskell/hsdev.py
[ { "content": "# -*- coding: UTF-8 -*-\n\nimport os\nimport os.path\nimport sys\nimport socket\nimport sublime\nimport sublime_plugin\nimport subprocess\nimport threading\nimport json\nimport time\nimport re\nfrom functools import reduce\n\nif int(sublime.version()) < 3000:\n import symbols\n from sublime_...
[ { "span": "import os", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 9 }, { "span": "import os.path", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 14 }, { "span": "import sys", "start_line": 4, "start_column": 0, ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "UT", "F", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_",...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 0, 1, 1, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
chdoig/scipy2015-blaze-bokeh/app/my_bokeh_app.py
[ { "content": "# -*- coding: utf-8 -*-\nimport math\nfrom collections import OrderedDict\n\nimport flask\n\nimport pandas as pd\nimport netCDF4\nimport numpy as np\n\nfrom bokeh.embed import components\nfrom bokeh.resources import INLINE\nfrom bokeh.templates import RESOURCES\nfrom bokeh.util.string import encod...
[ { "span": "import math", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 11 }, { "span": "from collections import OrderedDict", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 35 }, { "span": "import pandas as pd", "start_line...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "math_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "collections_", ...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 2, 0, 1, 1, 1, 2, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
Impactstory/total-impact-webapp/totalimpactwebapp/tweeter.py
[ { "content": "from totalimpactwebapp import json_sqlalchemy\nfrom util import commit\nfrom util import cached_property\nfrom util import dict_from_dir\nfrom totalimpactwebapp import db\nfrom birdy.twitter import AppClient, TwitterApiError, TwitterRateLimitError, TwitterClientError\n\nfrom collections import def...
[ { "span": "from totalimpactwebapp import json_sqlalchemy", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 45 }, { "span": "import re", "start_line": 9, "start_column": 0, "end_line": 9, "end_column": 9 }, { "span": "import dateutil.parser", "...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "total", "impact", "webapp_", "import_", "json", "\\u", "sqlalchemy_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "util_", "import_", "commit_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", ...
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
spulec/moto/docs/conf.py
[ { "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Moto documentation build configuration file, created by\n# sphinx-quickstart on Sun Jul 26 22:16:23 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration val...
[ { "span": "import sys", "start_line": 15, "start_column": 0, "end_line": 15, "end_column": 10 }, { "span": "import os", "start_line": 16, "start_column": 0, "end_line": 16, "end_column": 9 }, { "span": "import shlex", "start_line": 17, "start_column": 0, ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python", "3_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...