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 import
lbryio/lbry/lbrynet/lbrynet_daemon/LBRYDaemon.py
[ { "content": "import locale\nimport os\nimport sys\nimport simplejson as json\nimport binascii\nimport subprocess\nimport logging\nimport logging.handlers\nimport requests\nimport base64\nimport base58\nimport platform\nimport json\n\nfrom twisted.web import server, resource, static\nfrom twisted.internet impor...
[ { "span": "import subprocess", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 17 }, { "span": "import base64", "start_line": 9, "start_column": 0, "end_line": 9, "end_column": 13 }, { "span": "from lbrynet.lbrynet_console.ControlHandlers import g...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "locale_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "simplejson_", "as_", "json_", "\...
[ 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, 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...
Unused import
PyHDI/Pyverilog/tests/dataflow_test/test_dat_case_in_func.py
[ { "content": "from __future__ import absolute_import\nfrom __future__ import print_function\nimport os\nimport sys\nfrom pyverilog.dataflow.dataflow_analyzer import VerilogDataflowAnalyzer\nfrom pyverilog.dataflow.optimizer import VerilogDataflowOptimizer\nfrom pyverilog.controlflow.controlflow_analyzer import ...
[ { "span": "import sys", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 10 } ]
[]
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_", "from_", "\\u\\u", "future\\u\\u_", "import_", "print", "\\u", "function_", ...
[ 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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
bslatkin/dpxdt/tests/workers_test.py
[ { "content": " def testMultiLevelWorkflow(self):\n \"\"\"Tests a multi-level workflow.\"\"\"\n work = RootWorkflow(5)\n work.root = True\n self.coordinator.input_queue.put(work)\n finished = self.coordinator.output_queue.get()\n\n self.assertTrue(work is finished)\n ...
[ { "span": "self.assertTrue(work is finished)", "start_line": 340, "start_column": 8, "end_line": 340, "end_column": 41 }, { "span": "self.assertTrue(work is finished)", "start_line": 351, "start_column": 8, "end_line": 351, "end_column": 41 }, { "span": "self.asse...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Work", "flow", "Thread", "Test_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test", "Multi", "Leve", "...
[ 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
miguelgrinberg/api-pycon2014/tests/test_api.py
[ { "content": " def test_password_auth(self):\n self.app.config['USE_TOKEN_AUTH'] = False\n good_client = TestClient(self.app, self.default_username,\n self.default_password)\n rv, json = good_client.get('/api/v1.0/students/')\n self.assertTrue(rv.st...
[ { "span": "self.assertTrue(rv.status_code == 200)", "start_line": 34, "start_column": 8, "end_line": 34, "end_column": 46 }, { "span": "self.assertTrue(rv.status_code == 200)", "start_line": 40, "start_column": 8, "end_line": 40, "end_column": 46 }, { "span": "sel...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "API_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "password", "\\u", "auth_", "(_", ...
[ 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...
Import of deprecated module
fogleman/FeedNotifier/patch/mf.py
[ { "content": "\"\"\"Find modules used by a script, using introspection.\"\"\"\n# This module should be kept compatible with Python 2.2, see PEP 291.\n\nfrom __future__ import generators\nimport dis\nimport imp\nimport marshal\nimport os\nimport sys\nimport types\nimport struct\n\nif hasattr(sys.__stdout__, \"ne...
[ { "span": "sets ", "start_line": 695, "start_column": 9, "end_line": 695, "end_column": 13 } ]
[]
1
true
[ "[CLS]_", "Import_", "of_", "deprecated_", "module_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\"\"\"", "Fin", "d", " ", "module", "s", " ", "used", " ", "by", " ", "a", " ", "script", ",", " ", "usi", "ng", " ", "introspect", "ion", ".\"\"\"_", "\\...
[ 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
coderanger/pychef/chef/tests/test_fabric.py
[ { "content": "import mock\n\nfrom chef.fabric import chef_roledefs\nfrom chef.tests import ChefTestCase, mockSearch\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class FabricTestCase(ChefTestCase):\n \n", "metadata": "root.FabricTestCas...
[ { "span": "from chef.fabric import chef_roledefs", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 37 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "mock_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "chef", "_", "._", "fabric_", "import_", "chef", "\\u", "role", "defs_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "f...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 0, 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, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2...
Variable defined multiple times
django-bmf/django-bmf/tests/workflow/tests.py
[ { "content": " def test_validation(self):\n\n # catch validations =======================================================\n\n msg = \"States-class no defined\"\n with self.assertRaises(ImproperlyConfigured, msg=msg):\n class TestWF(Workflow):\n class Transitions...
[ { "span": "TestWF(", "start_line": 47, "start_column": 18, "end_line": 47, "end_column": 24 }, { "span": "TestWF(", "start_line": 53, "start_column": 18, "end_line": 53, "end_column": 24 }, { "span": "TestWF(", "start_line": 59, "start_column": 18, "en...
[ { "span": "TestWF(", "start_line": 117, "start_column": 18, "end_line": 117, "end_column": 24 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "class_", "Class", "Tests_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "validation_", "(_", "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...
Variable defined multiple times
daeilkim/refinery/refinery/bnpy/bnpy-dev/tests/suffstats/TestParamBag.py
[ { "content": " def test_insertEmptyComps_K1_D1(self, K=1, D=1):\n A = ParamBag(K=K, D=D)\n s = 123\n N = np.zeros(K)\n x = np.zeros((K,D))\n xxT = np.zeros((K,D,D))\n W = np.zeros((K,K))\n A.setField('s', s)\n A.setField('N', N, dims='K')\n A.setField('x', x, dims=('K','D'))\n A.s...
[ { "span": "test_insertEmptyComps_K1_D1(", "start_line": 32, "start_column": 6, "end_line": 32, "end_column": 33 }, { "span": "x ", "start_line": 310, "start_column": 6, "end_line": 310, "end_column": 7 }, { "span": "x ", "start_line": 346, "start_column": ...
[ { "span": "test_insertEmptyComps_K1_D1(", "start_line": 51, "start_column": 6, "end_line": 51, "end_column": 33 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "class_", "Test", "Param", "Bag", "_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "insert", ...
[ 4, 4, 4, 4, 4, 4, 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, 2, 2, 2, 2, 2, 2, 2, 2, 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
osrg/ryu/ryu/tests/unit/ofproto/test_parser_ofpstats.py
[ { "content": "def _add_tests():\n import functools\n import itertools\n\n class Field(object):\n pass\n\n class Int1(Field):\n @staticmethod\n def generate():\n yield 0\n yield 0xff\n\n class Int2(Field):\n @staticmethod\n def generate():\n...
[ { "span": "Int1(", "start_line": 71, "start_column": 10, "end_line": 71, "end_column": 14 }, { "span": "Int2(", "start_line": 77, "start_column": 10, "end_line": 77, "end_column": 14 }, { "span": "Int3(", "start_line": 84, "start_column": 10, "end_line...
[]
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_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "add", "\\u", "tests_", "(_", ")_", ":_", "\\u\\u\\uNE...
[ 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, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
amrdraz/kodr/app/brython/www/src/Lib/test/test_tools.py
[ { "content": "\"\"\"Tests for scripts in the Tools directory.\n\nThis file contains regression tests for some of the scripts found in the\nTools directory of a Python checkout or tarball, such as reindent.py.\n\"\"\"\n\nimport os\nimport sys\nimport importlib.machinery\nimport unittest\nfrom unittest import moc...
[ { "span": "import shutil", "start_line": 11, "start_column": 0, "end_line": 11, "end_column": 13 }, { "span": "from test_unparse import UnparseTestCase", "start_line": 453, "start_column": 4, "end_line": 453, "end_column": 44 }, { "span": "from test_unparse import...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\"\"\"", "Test", "s", " ", "for", " ", "scripts", " ", "in", " ", "the", " ", "Tool", "s", " ", "director", "y", ".", "\\", "10", ";", "\\", "10", ";", "Thi", "s", " ...
[ 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
tangentlabs/django-fancypages/fancypages/south_migrations/0015_auto__del_field_pagenavigationblock_is_relative.py
[ { "content": "# -*- coding: utf-8 -*-\nfrom south.utils import datetime_utils as 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(Sc...
[ { "span": "from south.utils import datetime_utils as datetime", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 50 }, { "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_", "from_", "south_", "._", "utils_", "import_", "datetime", "\\u", "util...
[ 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, 1, 1, 1, 1, 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...
Unused import
django-bmf/django-bmf/djangobmf/contrib/timesheet/migrations/0004_remove_uuid.py
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class Migration(migrations.Migration):\n\n dependencies = [\n ('dj...
[ { "span": "from django.db import models, migrations", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 40 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "\\u\\u", "future\\u\\u_", "import_", "unicode", "\\u", "litera...
[ 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, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
sdispater/orator/tests/orm/relations/test_morph.py
[ { "content": "# -*- coding: utf-8 -*-\n\nimport arrow\nfrom flexmock import flexmock, flexmock_teardown\nfrom ... import OratorTestCase\n\nfrom orator.query.builder import QueryBuilder\nfrom orator.query.grammars import QueryGrammar\nfrom orator.query.expression import QueryExpression\nfrom orator.orm.builder i...
[ { "span": "import arrow", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 12 }, { "span": "from orator.query.expression import QueryExpression", "start_line": 8, "start_column": 0, "end_line": 8, "end_column": 51 }, { "span": "from orator.orm.coll...
[]
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_", "import_", "arrow_", "\\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, 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...
Imprecise assert
WGBH/django-versatileimagefield/tests/tests.py
[ { "content": " def test_placeholder_image(self):\n \"\"\"Ensure placeholder images work as intended.\"\"\"\n self.jpg.optional_image.create_on_demand = True\n self.assertEqual(\n self.jpg.optional_image.url,\n '/media/__placeholder__/placeholder.png'\n )\n ...
[ { "span": "self.assertFalse(\n self.jpg.optional_image.field.storage.size(\n self.jpg.optional_image.name\n ) is 0\n )", "start_line": 265, "start_column": 8, "end_line": 269, "end_column": 9 }, { "span": "self.assertTrue(\n 'crop' i...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Vers", "ati", "le", "Image", "Field", "Test", "Case_", "(_", "Vers", "ati", "le", "Image", "Field", "Base", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\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...
Testing equality to None
gkno/gkno_launcher/src/networkx/drawing/layout.py
[ { "content": "def shell_layout(G,nlist=None,dim=2,scale=1):\n \"\"\"Position nodes in concentric circles.\n\n Parameters\n ----------\n G : NetworkX graph\n\n nlist : list of lists\n List of node lists for each shell.\n\n dim : int\n Dimension of layout, currently only dim=2 is sup...
[ { "span": "nlist==None:", "start_line": 142, "start_column": 7, "end_line": 142, "end_column": 18 }, { "span": "pos==None:", "start_line": 268, "start_column": 7, "end_line": 268, "end_column": 16 }, { "span": "pos==None:", "start_line": 338, "start_column...
[]
1
true
[ "[CLS]_", "Test", "ing_", "equality", "_", "to_", "None_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "shell", "\\u", "layout_", "(_", "G_", ",_", "nli", "st_", "=_", "None_", ",_", "dim_", "=_", "2...
[ 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, 2...
Imprecise assert
packages/psutil/test/test_psutil.py
[ { "content": " def test_status_constants(self):\n # STATUS_* constants are supposed to be comparable also by\n # using their str representation\n self.assertTrue(psutil.STATUS_RUNNING == 0)\n self.assertTrue(psutil.STATUS_RUNNING == long(0))\n self.assertTrue(psutil.STATUS_...
[ { "span": "self.assertTrue(psutil.STATUS_RUNNING == 0)", "start_line": 1071, "start_column": 8, "end_line": 1071, "end_column": 51 }, { "span": "self.assertTrue(psutil.STATUS_RUNNING == long(0))", "start_line": 1072, "start_column": 8, "end_line": 1072, "end_column": 57 ...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "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\\u", "status", "\\u", "constants_", "(_"...
[ 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
sassoftware/conary/conary_test/queryreptest.py
[ { "content": " def testGetTrovesLatestByLabel(self):\n # test out the no trove queries that now use getTrovesLatestByLabel\n trv1 = self.addComponent('foo:run', '/localhost@rpl:branch//rpl:linux/1.0-1-1')\n trv2 = self.addComponent('foo:run', '1.0-1-2')\n trv3 = self.addComponent(...
[ { "span": "trv1 ", "start_line": 276, "start_column": 8, "end_line": 276, "end_column": 12 }, { "span": "v2 ", "start_line": 302, "start_column": 8, "end_line": 302, "end_column": 10 }, { "span": "repos ", "start_line": 547, "start_column": 8, "end_lin...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Rep", "Query", "Test_", "(_", "rep", "help_", "._", "Repos", "itor", "y", "Helper_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test", "Get...
[ 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
kobotoolbox/kobocat/onadata/apps/main/tests/test_form_metadata.py
[ { "content": " def test_shows_mapbox_layer_after_submit(self):\n self.post_data = {}\n self.post_data['map_name'] = 'test_mapbox_layer'\n self.post_data['link'] = 'http://0.0.0.0:8080'\n response = self.client.post(self.edit_url, self.post_data)\n response = self.client.get...
[ { "span": "response ", "start_line": 103, "start_column": 8, "end_line": 103, "end_column": 16 } ]
[ { "span": "response ", "start_line": 104, "start_column": 8, "end_line": 104, "end_column": 16 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "class_", "Test", "Form", "Metadata_", "(_", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "show", "s", "\\u", "map", ...
[ 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
nii-cloud/dodai-compute/nova/tests/api/openstack/__init__.py
[ { "content": " def exhaust(self, middleware, method, url, username, times):\n req = Request.blank(url, dict(REQUEST_METHOD=method),\n headers={'X-Auth-User': username})\n req.environ['nova.context'] = context.RequestContext(username,\n usern...
[ { "span": "self.assertTrue('Retry-After' in resp.headers)", "start_line": 66, "start_column": 8, "end_line": 66, "end_column": 54 }, { "span": "self.assertTrue(set(middleware.limiter._levels) == \\\n set(['usr1:POST', 'usr1:POST servers', 'usr2:POST']))", "star...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Rat", "e", "Limit", "ing", "Mid", "dle", "ware", "Test_", "(_", "test_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "exh...
[ 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
Shopify/shopify_python_api/test/order_test.py
[ { "content": "import shopify\nfrom test.test_helper import TestCase\nfrom pyactiveresource.activeresource import ActiveResource\nfrom pyactiveresource.util import xml_to_dict\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class OrderTest(TestCase):...
[ { "span": "from pyactiveresource.activeresource import ActiveResource", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 58 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "shop", "ify_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "test_", "._", "test\\u", "helper_", "import_", "Test", "Case_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "pya", "ctive", "...
[ 4, 4, 4, 4, 4, 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, 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...
Testing equality to None
open-cloud/xos/xos/core/views/hpc_config.py
[ { "content": "def HpcConfig(request):\n hpcSlice=None\n cmiSlice=None\n redirSlice=None\n demuxSlice=None\n\n node_slicename = request.GET.get(\"slicename\", None)\n if not node_slicename:\n return HttpResponseServerError(\"Error: no slicename passed in request\")\n\n # search for an...
[ { "span": "redirSlice==None)", "start_line": 68, "start_column": 8, "end_line": 68, "end_column": 24 }, { "span": "demuxSlice==None)", "start_line": 68, "start_column": 30, "end_line": 68, "end_column": 46 } ]
[]
1
true
[ "[CLS]_", "Test", "ing_", "equality", "_", "to_", "None_", "[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_", "Hp", "c", "Config_", "(_", "request_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\...
[ 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, 2...
Signature mismatch in overriding method
dssg/ushine-learning/dssg/classifier.py
[ { "content": "class DssgBinaryClassifier(object):\n\n \"\"\" This is meant to be an abstract class\n \"\"\"\n\n\n\n\n\n pass", "metadata": "root.DssgBinaryClassifier", "header": "['module', '___EOS___']", "index": 28 }, { "content": " def __init__(self):\n pass", "meta...
[ { "span": "def train(self, binaryLabeledMessageList):", "start_line": 63, "start_column": 4, "end_line": 63, "end_column": 46 }, { "span": "def train(self, messageList):", "start_line": 113, "start_column": 4, "end_line": 113, "end_column": 33 }, { "span": "def tr...
[ { "span": "def train(binaryLabeledMessageList):", "start_line": 36, "start_column": 4, "end_line": 36, "end_column": 40 } ]
1
false
[ "[CLS]_", "Signature_", "mismatch_", "in_", "overrid", "ing_", "method_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Ds", "sg", "Bin", "ary", "Classifier_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE...
[ 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, 2...
Unused import
hycis/Pynet/hps/deprecated/AE.py
[ { "content": "\nfrom jobman import DD, expand, flatten\n\nimport pynet.layer as layer\nfrom pynet.model import *\nfrom pynet.layer import *\nfrom pynet.datasets.mnist import Mnist, Mnist_Blocks\nimport pynet.datasets.spec as spec\nimport pynet.datasets.mnist as mnist\nimport pynet.datasets.transfactor as tf\nim...
[ { "span": "from jobman import DD, expand, flatten", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 38 }, { "span": "from pynet.datasets.mnist import Mnist, Mnist_Blocks", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 52 }, { "s...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "job", "man_", "import_", "DD", "_", ",_", "expand_", ",_", "flatten_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "pyn", "et_", "...
[ 4, 4, 4, 4, 4, 2, 2, 2, 0, 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, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2...
Unused import
cloudera/hue/desktop/core/ext-py/South-1.0.2/south/management/commands/datamigration.py
[ { "content": "\"\"\"\nData migration creation command\n\"\"\"\n\nfrom __future__ import print_function\n\nimport sys\nimport os\nimport re\nfrom optparse import make_option\n\ntry:\n set\nexcept NameError:\n from sets import Set as set\n\nfrom django.core.management.base import BaseCommand\nfrom django.co...
[ { "span": "from django.core.management.color import no_style", "start_line": 17, "start_column": 0, "end_line": 17, "end_column": 49 }, { "span": "from south.exceptions import NoMigrations", "start_line": 22, "start_column": 0, "end_line": 22, "end_column": 41 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "Data", " ", "migrati", "on", " ", "creati", "on", " ", "command", "\\", "10", ";\"\"\"_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", ...
[ 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
posborne/mlcollection/mlcollection/lib/reinforcement/simple_rl.py
[ { "content": "'''\nCreated on Mar 23, 2010\n@author: Zachary Varberg\n'''\n\nfrom numpy import *\nimport scipy as Sci\nimport scipy.linalg\nimport copy\nfrom matplotlib import pyplot \n\nimport abstract_rl\nimport lib.matplotlib_util as mpl_util\n\n\nif __name__==\"__main__\":\n rl = Simple_RL(.1,.95)\n r...
[ { "span": "import scipy as Sci", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 19 }, { "span": "import scipy.linalg", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 19 }, { "span": "import copy", "start_line": 8, "start...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "'''", "\\", "10", ";", "Creat", "ed", " ", "on", " ", "Mar", " ", "23", ",", " ", "2010", "\\", "10", ";", "@", "author", ":", " ", "Za", "char", "y", " ", "Var", "...
[ 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, 2, 0, 1, 1, 1, 2, 0, 1, 2, 2, 2, 2...
Unused import
sunlightlabs/clearspending/animation/views.py
[ { "content": "import settings\nfrom django.http import HttpResponse, HttpResponseRedirect\nfrom django.shortcuts import render_to_response, get_object_or_404\nfrom django.template import RequestContext\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": ...
[ { "span": "import settings", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 15 }, { "span": "from django.http import HttpResponse, HttpResponseRedirect", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 58 }, { "span": "from djang...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "settings_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "http_", "import_", "Http", "Response_", ",_", "Http", "Respons", "e", "Redirect_", "\\u\\u\\uNEWLINE\\u\\u\\...
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 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, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
circus-tent/circus/circus/tests/test_process.py
[ { "content": " def test_base(self):\n cmd = PYTHON\n args = \"-c 'import time; time.sleep(10)'\"\n process = Process('test', 1, cmd, args=args, shell=False,\n use_fds=USE_FDS)\n try:\n info = process.info()\n self.assertEqual(process....
[ { "span": "self.assertTrue(age > 0.)", "start_line": 66, "start_column": 12, "end_line": 66, "end_column": 37 }, { "span": "self.assertTrue(p1 < p2)", "start_line": 113, "start_column": 8, "end_line": 113, "end_column": 32 }, { "span": "self.assertFalse(p1 == p2)"...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "Process_", "(_", "Test", "Circ", "us_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "test\\u", "base_", "(_", "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...
Except block handles 'BaseException'
lsaffre/lino/lino/utils/html2text.py
[ { "content": "#!/usr/bin/env python\n\"\"\"html2text: Turn HTML into equivalent Markdown-structured text.\n\nThis is an almost unmodified copy of Aaron Swartz's \n`html2text <http://www.aaronsw.com/2002/html2text/>`.\n\nLino uses this in :mod:`lino_xl.lib.outbox`\nfor attaching a text version of a generated ema...
[ { "span": "except:", "start_line": 54, "start_column": 0, "end_line": 54, "end_column": 7 }, { "span": "except:", "start_line": 64, "start_column": 0, "end_line": 64, "end_column": 7 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\u\\u\\uNL\\u\\u\\u_", "\"\"\"", "html", "2te", "xt", ":", " ", "Tur...
[ 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...
Imprecise assert
girder/girder/tests/cases/model_test.py
[ { "content": " def testModelFiltering(self):\n users = ({\n 'email': 'good@email.com',\n 'login': 'goodlogin',\n 'firstName': 'First',\n 'lastName': 'Last',\n 'password': 'goodpassword'\n }, {\n 'email': 'regularuser@email.com',\...
[ { "span": "self.assertTrue('sa' in filtered)", "start_line": 97, "start_column": 8, "end_line": 97, "end_column": 41 }, { "span": "self.assertTrue('write' in filtered)", "start_line": 98, "start_column": 8, "end_line": 98, "end_column": 44 }, { "span": "self.asser...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Model", "Test", "Case_", "(_", "base_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test", "Model", "Filtering", "_", "(_"...
[ 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'
MLWave/kepler-mapper/km.py
[ { "content": " def fit_transform(self, X, projection=\"sum\", scaler=preprocessing.MinMaxScaler()):\n # Creates the projection/lens from X. \n #\n # Input: X. Input features as a numpy array.\n # Output: projected_X. original data transformed to a projection (lens).\n # \n # paramete...
[ { "span": "except:", "start_line": 60, "start_column": 8, "end_line": 60, "end_column": 15 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Ke", "ple", "r", "Mapper_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "With", " ", "this", " ", "class", " ", "you", " ", "...
[ 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
cocagne/paxos/test/test_external.py
[ { "content": "import sys\nimport os.path\nimport heapq\n\nimport unittest\n\nthis_dir = os.path.dirname(os.path.abspath(__file__))\nsys.path.append( os.path.dirname(this_dir) )\n\nfrom paxos import external\n\nimport test_practical\nfrom test_practical import PID\n\n\n \n\n\n \n \n\n\n ...
[ { "span": "import heapq", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 12 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", "._", "path_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "heapq_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import...
[ 4, 4, 4, 4, 4, 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, 2, 2, 2, 2...
Unused import
wrongwaycn/ssdb-py/ssdb/_compat.py
[ { "content": "#coding=utf-8\n\nimport sys\n\nif sys.version_info[0] < 3:\n #python2.x\n from urlparse import urlparse\n from itertools import imap, izip\n from string import letters as ascii_letters\n from Queue import Queue\n try:\n from cStringIO import StringIO as BytesIO\n except...
[ { "span": "from urllib.parse import urlparse", "start_line": 31, "start_column": 4, "end_line": 31, "end_column": 37 }, { "span": "from string import ascii_letters", "start_line": 32, "start_column": 4, "end_line": 32, "end_column": 36 }, { "span": "from io import...
[]
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_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "if_", "sys_", "._", ...
[ 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
appcelerator-archive/poc-nodejs-desktop/Resources/nodejs/builds/linux/node/lib/node/wafadmin/pproc.py
[ { "content": "# borrowed from python 2.5.2c1\n# Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se>\n# Licensed to PSF under a Contributor Agreement.\n\nimport sys\nmswindows = (sys.platform == \"win32\")\n\nimport os\nimport types\nimport traceback\nimport gc\n\n\nif mswindows:\n import thread...
[ { "span": "import errno", "start_line": 46, "start_column": 4, "end_line": 46, "end_column": 16 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "borrow", "ed", " ", "from", " ", "python", " ", "2.5", ".2", "c1_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Copy", "right", " ", "(", "c", ")", " ", "2003", "-", "2...
[ 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'
callowayproject/django-livevalidation/livevalidation/templatetags/live_validation.py
[ { "content": " def render(self, context):\n result = ['<script type=\"text/javascript\">']\n self.form = context[self.form]\n self.formcls = self.form.__class__\n try:\n # admin formset\n fields = self.form.form.fields\n prefix = '%s-'%self.form.pr...
[ { "span": "except:", "start_line": 36, "start_column": 8, "end_line": 36, "end_column": 15 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Validat", "ion", "Node_", "(_", "template_", "._", "Node_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDE...
[ 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...
Variable defined multiple times
pydata/pandas/pandas/tests/series/test_misc_api.py
[ { "content": " def test_ndarray_compat(self):\n\n # test numpy compat with Series as sub-class of NDFrame\n tsdf = DataFrame(np.random.randn(1000, 3), columns=['A', 'B', 'C'],\n index=date_range('1/1/2000', periods=1000))\n\n def f(x):\n return x[x.argm...
[ { "span": "result ", "start_line": 303, "start_column": 8, "end_line": 303, "end_column": 14 } ]
[ { "span": "result ", "start_line": 314, "start_column": 8, "end_line": 314, "end_column": 14 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "class_", "Test", "Serie", "s", "Mis", "c_", "(_", "Test", "Data_", ",_", "Share", "d", "With", "Spar", "se_", ",_", "tm_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\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 import
anandology/pyjamas/library/gwt/Canvas2D.py
[ { "content": "# Canvas wrapper component for Pyjamas\n# Ported by Willie Gollino from Canvas component for GWT - Originally by Alexei Sokolov http://gwt.components.googlepages.com/\n#\n# Canvas API reference:\n# http://developer.apple.com/documentation/AppleApplications/Reference/SafariJSRef/Classes/Canvas.html...
[ { "span": "from pyjamas.ui import Event", "start_line": 14, "start_column": 0, "end_line": 14, "end_column": 28 }, { "span": "from pyjamas.ui import MouseListener", "start_line": 15, "start_column": 0, "end_line": 15, "end_column": 36 }, { "span": "from pyjamas.ui...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Can", "vas", " ", "wrapp", "er", " ", "component", " ", "for", " ", "Py", "jam", "as_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Port", "ed", " ", "by", " ", "Willi", ...
[ 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
CGATOxford/cgat/scripts/snp2table.py
[ { "content": " def update(self, snp):\n '''update with snp.'''\n\n junctions = list(self.mJunctions.get(snp.chromosome,\n snp.pos,\n snp.pos + 1))\n\n self.mResults = []\n\n reference_base = sn...
[ { "span": "reference_base ", "start_line": 439, "start_column": 8, "end_line": 439, "end_column": 22 }, { "span": "lcontig ", "start_line": 570, "start_column": 8, "end_line": 570, "end_column": 15 }, { "span": "lcontig ", "start_line": 606, "start_column"...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Base", "Annot", "ator", "Spl", "ice", "Site", "s_", "(_", "Base", "Annot", "ator_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "update_", "(...
[ 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
letsencrypt/letsencrypt/certbot/tests/cli_test.py
[ { "content": " def test_help(self):\n self.assertRaises(SystemExit, self._call, ['--help'])\n self.assertRaises(SystemExit, self._call, ['--help', 'all'])\n plugins = disco.PluginsRegistry.find_all()\n out = self._help_output(['--help', 'all'])\n self.assertTrue(\"--configu...
[ { "span": "self.assertTrue(\"--configurator\" in out)", "start_line": 93, "start_column": 8, "end_line": 93, "end_column": 48 }, { "span": "self.assertTrue(\"how a cert is deployed\" in out)", "start_line": 94, "start_column": 8, "end_line": 94, "end_column": 56 }, { ...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "CLI", "Test_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "#", " ", "pylint", ":", " ", "disable", "=", "too", "-", "many", "-", "public", "-", "methods_", "\\u\\u\\uEOS\\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'
weblabdeusto/weblabdeusto/tools/wcloud/wcloud/test/test_wcloud_tasks.py
[ { "content": " def tearDown(self):\n\n # Delete the deployed directory.\n try:\n pass\n #shutil.rmtree(\"weblabtest\")\n except:\n pass\n\n # Remove running weblab instances.\n os.system(\"kill $(ps aux | grep 'python -OO.*wcloud' | awk '{pr...
[ { "span": "except:", "start_line": 190, "start_column": 8, "end_line": 190, "end_column": 15 }, { "span": "except:", "start_line": 204, "start_column": 8, "end_line": 204, "end_column": 15 }, { "span": "except:", "start_line": 212, "start_column": 8, "...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Test", "Wc", "loud", "Tasks_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\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, 2, 2, 2, 2, 2, 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
Jackeriss/Email_My_PC/shell/shellcon.py
[ { "content": "# Generated by h2py from \\mssdk\\include\\shlobj.h and shellapi.h\nWM_USER = 1024\nDROPEFFECT_NONE = 0\nDROPEFFECT_COPY = 1\nDROPEFFECT_MOVE = 2\nDROPEFFECT_LINK = 4\nDROPEFFECT_SCROLL = -2147483648\n\nFO_MOVE = 1\nFO_COPY = 2\nFO_DELETE = 3\nFO_RENAME = 4\n\n## File operation flags used with she...
[ { "span": "FO_MOVE ", "start_line": 8, "start_column": 0, "end_line": 8, "end_column": 7 }, { "span": "FO_COPY ", "start_line": 9, "start_column": 0, "end_line": 9, "end_column": 7 }, { "span": "FO_DELETE ", "start_line": 10, "start_column": 0, "end_li...
[ { "span": "SEE_MASK_CLASSNAME ", "start_line": 78, "start_column": 0, "end_line": 78, "end_column": 18 }, { "span": "SEE_MASK_CLASSKEY ", "start_line": 79, "start_column": 0, "end_line": 79, "end_column": 17 }, { "span": "SEE_MASK_IDLIST ", "start_line": 80, ...
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Generate", "d", " ", "by", " ", "h2", "py", " ", "from", " ", "\\\\", "mss", "dk", "\\\\", "include", "\\\\", "shl", "obj", ".", "h", " ", ...
[ 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
dtroyer/python-openstackclient/openstackclient/tests/image/v2/test_image.py
[ { "content": " def test_image_set_tag_merge(self):\n old_image = copy.copy(image_fakes.IMAGE)\n old_image['tags'] = ['old1', 'new2']\n self.images_mock.get.return_value = self.model(**old_image)\n arglist = [\n '--tag', 'test-tag',\n image_fakes.image_name,\n...
[ { "span": "self.assertTrue('tags' in k)", "start_line": 1104, "start_column": 8, "end_line": 1104, "end_column": 36 }, { "span": "self.assertTrue('tags' in k)", "start_line": 1130, "start_column": 8, "end_line": 1130, "end_column": 36 } ]
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "Image", "Set_", "(_", "Test", "Image_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "image", "\\u", "set\\u", "tag", "\\u", "me...
[ 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...
'import *' may pollute namespace
ardekantur/pyglet/experimental/mt_media/drivers/pulse/lib_pulseaudio.py
[ { "content": "'''Wrapper for pulse\n\nGenerated with:\ntools/genwrappers.py pulseaudio\n\nDo not modify this file.\n'''\n\n__docformat__ = 'restructuredtext'\n__version__ = '$Id: wrap.py 1694 2008-01-30 23:12:00Z Alex.Holkner $'\n\nimport ctypes\nfrom ctypes import *\n\nimport pyglet.lib\n\n_lib = pyglet.lib.l...
[ { "span": "from ctypes import *", "start_line": 12, "start_column": 0, "end_line": 12, "end_column": 20 } ]
[]
1
true
[ "[CLS]_", "'", "import", " ", "*'_", "may", "_", "poll", "ute", "_", "namespace_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "'''", "Wrapper", " ", "for", " ", "pulse", "\\", "10", ";", "\\", "10", ";", "Generate", "d", " ", "with", ":", "\\", "10...
[ 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, 2...
Unused import
zrong/wpcmd/wpcmd/__init__.py
[ { "content": "#########################################\n# __init__.py\n#\n# Author zrong(zengrong.net)\n# Creation 2014-11-18\n# Modification 2015-11-22\n#########################################\n\nimport sys\nimport os\nimport logging\nimport importlib\nimport argparse\n\n__all__ = ['util', 'new', 'show', 'u...
[ { "span": "import rookout", "start_line": 18, "start_column": 4, "end_line": 18, "end_column": 18 }, { "span": "from wpcmd.base import (Conf, TermCache)", "start_line": 23, "start_column": 0, "end_line": 23, "end_column": 40 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "###########", "###########", "###########", "######", "##", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "\\u\\u", "init", "\\u\\u", ".", "py_", "\\u\\u\\uNL\\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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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
zlorf/django-synchro/synchro/__init__.py
[ { "content": "# flake8: noqa\nfrom signals import DisableSynchroLog, disable_synchro_log\nfrom utility import NaturalManager, reset_synchro\nfrom management.commands.synchronize import call_synchronize\n\ndefault_app_config = 'synchro.apps.SynchroConfig'\n", "metadata": "root", "header": "['module', '__...
[ { "span": "from signals import DisableSynchroLog, disable_synchro_log", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 58 }, { "span": "from utility import NaturalManager, reset_synchro", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 4...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "flake", "8", ":", " ", "no", "qa_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "signals_", "import_", "Disa", "ble", "Synchro", "Log_", ",_", "disable", "\\u", "sync", "hro", ...
[ 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, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
openstack-infra/shade/shade/tests/functional/test_identity.py
[ { "content": " def test_list_role_assignments(self):\n if self.identity_version in ('2', '2.0'):\n self.skipTest(\"Identity service does not support role assignments\")\n assignments = self.cloud.list_role_assignments()\n self.assertIsInstance(assignments, list)\n self....
[ { "span": "self.assertTrue(len(assignments) > 0)", "start_line": 133, "start_column": 8, "end_line": 133, "end_column": 45 }, { "span": "self.assertTrue(len(assignments) > 0)", "start_line": 141, "start_column": 8, "end_line": 141, "end_column": 45 }, { "span": "s...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "Identity_", "(_", "base_", "._", "Base", "Function", "al", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "list", ...
[ 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'
mozilla/inventory/api_v2/keyvalue_handler.py
[ { "content": "from piston.handler import BaseHandler, rc\nfrom systems.models import System, SystemRack,SystemStatus,NetworkAdapter,KeyValue\nfrom truth.models import Truth, KeyValue as TruthKeyValue\nfrom dhcp.DHCP import DHCP as DHCPInterface\nfrom dhcp.models import DHCP\nfrom MacroExpansion import MacroExpa...
[ { "span": "except:", "start_line": 10, "start_column": 0, "end_line": 10, "end_column": 7 }, { "span": "except:", "start_line": 44, "start_column": 12, "end_line": 44, "end_column": 19 }, { "span": "except:", "start_line": 60, "start_column": 12, "end_...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "pis", "ton_", "._", "handler_", "import_", "Base", "Handler_", ",_", "rc_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "systems_",...
[ 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
kvh/ramp/ramp/folds.py
[ { "content": "import logging\nimport random\n\nimport numpy as np\nimport pandas as pd\n\nfrom ramp.builders import build_target_safe\n\n#TODO: how to repeat folds?\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nmake_default_folds = BasicFolds\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 ...
[ { "span": "import random", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 13 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "logging_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "random_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "numpy_", "as_", "np_", "\\u\\u\\uNEWLINE\\u\\u\\u_", ...
[ 4, 4, 4, 4, 4, 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, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
flashingpumpkin/django-socialregistration/socialregistration/contrib/openid/tests.py
[ { "content": " def test_tag_renders_correctly(self):\n render = lambda tpl: template.Template(\n tpl).render(template.Context({'request':None}))\n \n tpl = \"\"\"{% load openid %}{% openid_form %}\"\"\"\n \n rendered = render(tpl)\n\n self.assertTrue('form'...
[ { "span": "self.assertTrue('form' in rendered)", "start_line": 14, "start_column": 8, "end_line": 14, "end_column": 43 }, { "span": "self.assertTrue('https://www.google.com/accounts/o8/id' in rendered)", "start_line": 23, "start_column": 8, "end_line": 23, "end_column": 7...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "Templa", "te", "Tag_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "test\\u", "tag", "\\u", "render", ...
[ 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
SmokinCaterpillar/pypet/pypet/tests/integration/environment_test.py
[ { "content": " def test_full_store(self):\n filename = make_temp_dir('full_store.hdf5')\n with Environment(filename=filename,\n log_config=get_log_config()) as env:\n\n traj = env.v_trajectory\n\n traj.par.x = Parameter('x', 3, 'jj')\n\n ...
[ { "span": "self.assertTrue('hi' in traj)", "start_line": 77, "start_column": 12, "end_line": 77, "end_column": 41 }, { "span": "self.assertTrue(nchildren > 0)", "start_line": 307, "start_column": 12, "end_line": 307, "end_column": 42 }, { "span": "self.assertTrue(...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Full", "Stor", "age", "Test_", "(_", "Trajector", "y", "Compara", "tor_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "test\\u", "full", "\\u", "store_", "(_", "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...
Flask app is run in debug mode
flask-admin/flask-admin/examples/pymongo/app.py
[ { "content": "import pymongo\nfrom bson.objectid import ObjectId\n\nfrom flask import Flask\nimport flask_admin as admin\n\nfrom wtforms import form, fields\n\nfrom flask_admin.form import Select2Widget\nfrom flask_admin.contrib.pymongo import ModelView, filters\nfrom flask_admin.model.fields import InlineFormF...
[ { "span": "app.run(debug=True)", "start_line": 123, "start_column": 4, "end_line": 123, "end_column": 23 } ]
[]
1
false
[ "[CLS]_", "Flask_", "app_", "is_", "run_", "in_", "debug_", "mode_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "pymongo_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "bson_", "._", "objectid", "_", "import_", "Object", "Id_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\...
[ 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...
Unused local variable
benoitc/gaffer/gaffer/gafferd/http_handlers/keys.py
[ { "content": " def head(self, *args):\n if (not self.api_key.can_create_key() and\n self.api_key.api_key != args[0]):\n # only those who can create keys or the key owner can read the key\n # object\n raise HTTPError(403)\n\n try:\n key_...
[ { "span": "key_obj ", "start_line": 76, "start_column": 12, "end_line": 76, "end_column": 19 }, { "span": "key_obj ", "start_line": 109, "start_column": 12, "end_line": 109, "end_column": 19 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Key", "Handler_", "(_", "Cor", "s", "Handle", "r", "With", "Auth_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "head_", "(_", "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...
Variable defined multiple times
pystruct/pystruct/pystruct/models/latent_node_crf.py
[ { "content": " def joint_feature(self, x, y):\n \"\"\"Feature vector associated with instance (x, y).\n\n Feature representation joint_feature, such that the energy of the\n configuration (x, y) and a weight vector w is given by\n np.dot(w, joint_feature(x, y)).\n\n Paramet...
[ { "span": "gx ", "start_line": 300, "start_column": 12, "end_line": 300, "end_column": 14 }, { "span": "n_nodes ", "start_line": 592, "start_column": 8, "end_line": 592, "end_column": 15 }, { "span": "gx ", "start_line": 600, "start_column": 12, "end_l...
[ { "span": "gx ", "start_line": 304, "start_column": 12, "end_line": 304, "end_column": 14 }, { "span": "n_nodes ", "start_line": 599, "start_column": 12, "end_line": 599, "end_column": 19 }, { "span": "gx ", "start_line": 604, "start_column": 12, "end_...
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "class_", "Late", "nt", "Node", "CR", "F_", "(_", "Graph", "CR", "F_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "joint", "\\u", "feature_", ...
[ 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
heyaaron/openmesher/OpenMesher/plugins/makedebs/__init__.py
[ { "content": "import logging, os, datetime, sys\nimport glob, tempfile, subprocess\nfrom OpenMesher.lib import nested_dict_merge\nfrom OpenMesher.interfaces import IOpenMesherPackagePlugin\n\n\n\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def ...
[ { "span": "import logging, os, datetime, sys", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 33 }, { "span": "import glob, tempfile, subprocess", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 33 }, { "span": "from OpenMesher.l...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "logging_", ",_", "os_", ",_", "datetime_", ",_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "glob_", ",_", "tempfile_", ",_", "subprocess_", "\\u\\u\\uNEWLINE\\u\\u\\u_", ...
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 2, 0, 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, 4, 2...
Unused local variable
limodou/uliweb/uliweb/utils/generic.py
[ { "content": " def process_files(self, data, edit=True, obj=None):\n from uliweb.form import FileField\n \n file_fields = {}\n \n flag = False\n fields_list = self.get_fields()\n for name, f in self.form.fields_list:\n if isinstance(f, FileField):\n...
[ { "span": "file_fields ", "start_line": 847, "start_column": 8, "end_line": 847, "end_column": 19 }, { "span": "fields_list ", "start_line": 850, "start_column": 8, "end_line": 850, "end_column": 19 }, { "span": "files ", "start_line": 939, "start_column":...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Add", "View_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "process", "\\u", "files_", "(_", "self_", ",_", "data_", ",_", "...
[ 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, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 2...
Unreachable code
marcwebbie/passpie/passpie/importers/keepass_importer.py
[ { "content": " def match(self, filepath):\n expected_headers = ['Group', 'Title', 'Username', 'Password', 'URL', 'Notes']\n with open(filepath) as csv_file:\n reader = unicode_csv_reader(csv_file)\n try:\n headers = next(reader)\n except StopItera...
[ { "span": "return False", "start_line": 15, "start_column": 8, "end_line": 15, "end_column": 20 } ]
[]
1
true
[ "[CLS]_", "Unrea", "chab", "le_", "code_", "[SEP]_", "class_", "Keep", "ass", "Importer_", "(_", "Base", "Importer_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "match_", "(_", "self_", ",_", "filepath_"...
[ 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
akaihola/django-cairo-text/cairotext/templatetags/cairotext.py
[ { "content": "def get_png_size(filepath):\n pngfile = file(filepath, 'rb')\n signature = pngfile.read(8)\n if (signature != struct.pack(\"8B\", 137, 80, 78, 71, 13, 10, 26, 10)):\n raise ValueError(\"Invalid PNG signature\")\n while True:\n try:\n tag, data = read_png_chunk(...
[ { "span": "raise ValueError('PNG header not found')", "start_line": 109, "start_column": 4, "end_line": 109, "end_column": 44 } ]
[]
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_", "def_", "get", "\\u", "png", "\\u", "size_", "(_", "filepath_", ")_", ":_", "\\u\\u\\uNEWLINE\\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...
Illegal raise
AppScale/appscale/AppServer/google/appengine/ext/gql/__init__.py
[ { "content": " def __init__(self, query_string, _app=None, _auth_domain=None,\n namespace=None):\n \"\"\"Ctor.\n\n Parses the input query into the class as a pre-compiled query, allowing\n for a later call to Bind() to bind arguments as defined in the\n documentation.\n\n Args:\n ...
[ { "span": "raise initial_error", "start_line": 279, "start_column": 6, "end_line": 279, "end_column": 25 } ]
[]
1
true
[ "[CLS]_", "Il", "lega", "l_", "raise_", "[SEP]_", "class_", "GQ", "L_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "query", "\\u", "string_", ",_", "\\u", "app_", "=_", ...
[ 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'
ufora/ufora/test_scripts/bigbox_perf/data/testBigboxPerf.py
[ { "content": " def writeToS3Test(self, bytecount, pageSizeOverride=1024*1024, workers=1, memoryLimitMb=45 * 1024,threadCount=30):\n text = \"\"\"Vector.range(__bytecount__, {UInt8(_%100)}).paged\"\"\"\n\n s3 = ActualS3Interface.ActualS3InterfaceFactory()\n\n keyGuid = \"bigbox-test-key-\...
[ { "span": "except:", "start_line": 298, "start_column": 12, "end_line": 298, "end_column": 19 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Big", "box", "Perform", "anc", "e", "Test_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\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, 2, 2, 2, 2, 2, 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
viewfinderco/viewfinder/backend/db/test/user_test.py
[ { "content": "# Copyright 2011 Viewfinder Inc. All Rights Reserved.\n\n\"\"\"Tests for User data object.\n\"\"\"\n\n__author__ = 'spencer@emailscrubbed.com (Spencer Kimball)'\n\nimport logging\nimport sys\nimport time\nimport unittest\n\nfrom functools import partial\nfrom tornado import stack_context\nfrom vie...
[ { "span": "import logging", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 14 }, { "span": "import sys", "start_line": 8, "start_column": 0, "end_line": 8, "end_column": 10 }, { "span": "import time", "start_line": 9, "start_column": 0, ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Copy", "right", " ", "2011", " ", "View", "finde", "r", " ", "Inc", ".", " ", "All", " ", "Rig", "hts", " ", "Reserve", "d", "._", "\\u\\u\\uNL\\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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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
allisson/flask-example/accounts/tests/test_views.py
[ { "content": " def test_form(self):\n # test empty form\n with self.captured_templates(self.app) as templates:\n resp = self.client.post(self.url)\n self.assertStatus(resp, 200)\n template, context = templates[0]\n form = context['form']\n ...
[ { "span": "self.assertTrue(\n u'This field is required.' in form.errors['username']\n )", "start_line": 35, "start_column": 12, "end_line": 37, "end_column": 13 }, { "span": "self.assertTrue(\n u'This field is required.' in form.errors['password']...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Logi", "n", "View", "Test_", "(_", "Base", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "form_", "(_", "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
jeffknupp/flask_sandboy/docs/conf.py
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Flask-Sandboy documentation build configuration file, created by\n# sphinx-quickstart on Tue May 6 10:22:22 2014.\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 values are present...
[ { "span": "import sys", "start_line": 14, "start_column": 0, "end_line": 14, "end_column": 10 }, { "span": "import os", "start_line": 15, "start_column": 0, "end_line": 15, "end_column": 9 } ]
[]
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_", "#", " ", "Fla", "sk", "-", "Sand...
[ 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...
First argument to super() is not enclosing class
dimagi/commcare-hq/corehq/apps/reminders/views.py
[ { "content": " @method_decorator(requires_privilege_with_fallback(privileges.OUTBOUND_SMS))\n @method_decorator(reminders_framework_permission)\n @use_bootstrap3\n def dispatch(self, *args, **kwargs):\n return super(BaseMessagingSectionView, self).dispatch(*args, **kwargs)", "metadata": "...
[ { "span": "super(BaseMessagingSectionView, self).", "start_line": 109, "start_column": 15, "end_line": 109, "end_column": 52 }, { "span": "super(BaseMessagingSectionView, self).", "start_line": 516, "start_column": 15, "end_line": 516, "end_column": 52 }, { "span"...
[]
1
true
[ "[CLS]_", "First_", "argument_", "to_", "super_", "(_", ")_", "is_", "not_", "encl", "osin", "g_", "class_", "[SEP]_", "class_", "Schedule", "d", "Remi", "nder", "s", "Cal", "enda", "r", "View_", "(_", "Base", "Messag", "ing", "Sect", "ion", "View_", ")_...
[ 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, 2...
Except block handles 'BaseException'
timonwong/OmniMarkupPreviewer/OmniMarkupLib/Common.py
[ { "content": " def __call__(self):\n with self.__cond:\n try:\n self.__result = self.__func(*self.__args, **self.__kwargs)\n except:\n self.__result = None\n self.__except = sys.exc_info()\n self.__done = True\n s...
[ { "span": "except:", "start_line": 340, "start_column": 12, "end_line": 340, "end_column": 19 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Future_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "call\\u\\u_", "(_", "self_...
[ 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
jma127/pyltr/pyltr/models/__init__.py
[ { "content": "\"\"\"\n\nVarious model classes.\n\n\"\"\"\n\nfrom _models import *\nfrom lambdamart import LambdaMART\nimport monitors\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "from lambdamart import LambdaMART", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 33 }, { "span": "import monitors", "start_line": 8, "start_column": 0, "end_line": 8, "end_column": 15 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "\\", "10", ";", "Vari", "ous", " ", "model", " ", "classe", "s", ".", "\\", "10", ";", "\\", "10", ";\"\"\"_", "\\u\\u\\uNEWLINE\\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, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1 ]
Unused import
biocore/pyqi/pyqi/core/interfaces/optparse/__init__.py
[ { "content": "#!/usr/bin/env python\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, The BiPy Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distributed with this software...
[ { "span": "import os", "start_line": 14, "start_column": 0, "end_line": 14, "end_column": 9 }, { "span": "from pyqi.core.command import Parameter", "start_line": 24, "start_column": 0, "end_line": 24, "end_column": 39 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\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...
Imprecise assert
couchbase/couchbase-python-client/couchbase/tests/cases/get_t.py
[ { "content": " def test_multi_mixed(self):\n kv_missing = self.gen_kv_dict(amount=3, prefix='multi_missing_mixed')\n kv_existing = self.gen_kv_dict(amount=3, prefix='multi_existing_mixed')\n\n self.cb.remove_multi(list(kv_missing.keys()) + list(kv_existing.keys()),\n ...
[ { "span": "self.assertTrue(k in rvs)", "start_line": 85, "start_column": 12, "end_line": 85, "end_column": 37 }, { "span": "self.assertTrue(rvs[k].value is None)", "start_line": 87, "start_column": 12, "end_line": 87, "end_column": 49 }, { "span": "self.assertTrue...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Get", "Test_", "(_", "Connect", "ion", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "multi", "\\u", "mixed", "_", "(_",...
[ 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
StevenBlack/hosts/updateHostsFile.py
[ { "content": "#!/usr/bin/env python\n\n# Script by Ben Limmer\n# https://github.com/l1m5\n#\n# This Python script will combine all the host files you provide\n# as sources into one, unique host file to keep you internet browsing happy.\n\n# pylint: disable=invalid-name\n# pylint: disable=bad-whitespace\n\n# Mak...
[ { "span": "import string", "start_line": 18, "start_column": 0, "end_line": 18, "end_column": 13 }, { "span": "from urllib.parse import urlparse, urlencode", "start_line": 34, "start_column": 4, "end_line": 34, "end_column": 48 }, { "span": "from urllib.request im...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Script", " ", "by", " ", "Ben", " ", "Lim", "mer_", "\\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
numba/numba/numba/cuda/tests/cudadrv/test_cuda_memory.py
[ { "content": " def test_c_contiguous_array(self):\n ary = numpy.arange(100)\n arysz = ary.dtype.itemsize * ary.size\n s, e = driver.host_memory_extents(ary)\n self.assertTrue(ary.ctypes.data == s)\n self.assertTrue(arysz == driver.host_memory_size(ary))", "metadata": "r...
[ { "span": "self.assertTrue(ary.ctypes.data == s)", "start_line": 93, "start_column": 8, "end_line": 93, "end_column": 45 }, { "span": "self.assertTrue(arysz == driver.host_memory_size(ary))", "start_line": 94, "start_column": 8, "end_line": 94, "end_column": 62 }, { ...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "MV", "Extent_", "(_", "CU", "DAT", "est", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "test\\u", "c\\u", "contiguous",...
[ 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...
Flask app is run in debug mode
peterhudec/authomatic/examples/flask/flask_authomatic/main.py
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nCreated by Mark Steve Samson http://marksteve.com\n\"\"\"\n\nimport logging\n\nfrom authomatic.extras.flask import FlaskAuthomatic\nfrom authomatic.providers import oauth2\nfrom flask import Flask, jsonify\n\nlogger = logging.getLogger('authomatic.core')\nlogger.ad...
[ { "span": "app.run(debug=True)", "start_line": 47, "start_column": 4, "end_line": 47, "end_column": 23 } ]
[]
1
false
[ "[CLS]_", "Flask_", "app_", "is_", "run_", "in_", "debug_", "mode_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "Creat",...
[ 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
AcademicsToday/py-academicstoday/academicstoday_project/teacher/tests/test_policy.py
[ { "content": " def test_policy_page_with_pdf_file(self):\n kwargs = {'HTTP_X_REQUESTED_WITH':'XMLHttpRequest'}\n client = self.get_logged_in_client()\n file_path = settings.MEDIA_ROOT + '/sample.pdf'\n with open(file_path, 'rb') as fp:\n self.assertTrue(fp is not None)\...
[ { "span": "self.assertTrue(fp is not None)", "start_line": 106, "start_column": 12, "end_line": 106, "end_column": 43 }, { "span": "self.assertTrue(fp is not None)", "start_line": 135, "start_column": 12, "end_line": 135, "end_column": 43 }, { "span": "self.assert...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Polic", "y", "Test", "Case_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "policy", "\\u", "page", "\\u", "with"...
[ 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...
Illegal raise
open-cloud/xos/xos/synchronizers/monitoring_channel/steps/sync_sflowtenant.py
[ { "content": " def get_sflow_service(self, o):\n sflows = SFlowService.get_service_objects().filter(id=o.provider_service.id)\n if not sflows:\n raise \"No associated SFlow service\"\n\n return sflows[0]", "metadata": "root.SyncSFlowTenant.get_sflow_service", "header": ...
[ { "span": "raise \"No associated SFlow service\"", "start_line": 45, "start_column": 11, "end_line": 45, "end_column": 46 } ]
[]
1
true
[ "[CLS]_", "Il", "lega", "l_", "raise_", "[SEP]_", "class_", "Sync", "SF", "low", "Ten", "ant_", "(_", "Sync", "Insta", "nce", "Us", "ing", "Ans", "ible_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", ...
[ 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
argoroots/Entu/app/main/db.py
[ { "content": "from tornado import locale\n\nfrom datetime import datetime\nfrom decimal import Decimal\nfrom operator import itemgetter\n\nimport dateutil\nimport hashlib\nimport logging\nimport math\nimport os\nimport random\nimport re\nimport string\nimport time\n\nfrom helper import *\n\n\n\n\n", "metada...
[ { "span": "from tornado import locale", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 26 }, { "span": "from decimal import Decimal", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 27 }, { "span": "import dateutil", "start_l...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "tornado_", "import_", "locale_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "datetime_", "import_", "datetime_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "decimal_", ...
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 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, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Testing equality to None
acabin/docphp/docphp.py
[ { "content": "def getLanguageList(languageName=None, format='all', getAll=True):\n if not getAll:\n languageName = getSetting('languages')\n\n if languageName == None:\n dic = []\n elif isinstance(languageName, str):\n dic = [languageName]\n else:\n dic = languageName\n\n...
[ { "span": "languageName == None:", "start_line": 81, "start_column": 7, "end_line": 81, "end_column": 27 }, { "span": "languageName == None ", "start_line": 93, "start_column": 11, "end_line": 93, "end_column": 31 }, { "span": "symbol == None:", "start_line": ...
[]
1
true
[ "[CLS]_", "Test", "ing_", "equality", "_", "to_", "None_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "Lang", "ua", "ge", "List_", "(_", "language", "Name_", "=_", "None_", ",_", "format_", "=_...
[ 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, 0, 1...
Except block handles 'BaseException'
dimagi/commcare-hq/corehq/apps/sms/api.py
[ { "content": "def enqueue_directly(msg):\n try:\n from corehq.apps.sms.management.commands.run_sms_queue import SMSEnqueuingOperation\n SMSEnqueuingOperation().enqueue_directly(msg)\n except:\n # If this direct enqueue fails, no problem, it will get picked up\n # shortly.\n ...
[ { "span": "except:", "start_line": 198, "start_column": 4, "end_line": 198, "end_column": 11 }, { "span": "except:", "start_line": 211, "start_column": 8, "end_line": 211, "end_column": 15 }, { "span": "except:", "start_line": 531, "start_column": 16, ...
[]
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_", "enqueue", "\\u", "direct", "ly_", "(_", "msg_", ")_", ":_", "\\u\\u\\uNEWLI...
[ 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
missionpinball/mpf/tests/test_BallDeviceEventConfirmation.py
[ { "content": "import unittest\n\nfrom mpf.system.machine import MachineController\nfrom MpfTestCase import MpfTestCase\nfrom mock import MagicMock\nimport time\nimport tests.test_BallDeviceSwitchConfirmation\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "co...
[ { "span": "import unittest", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 15 }, { "span": "from mpf.system.machine import MachineController", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 48 }, { "span": "from MpfTestCase imp...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "unittest_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "mpf", "_", "._", "system_", "._", "machine_", "import_", "Machine", "Controller_", "\\u\\u\\uNEWLINE\\...
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2...
Unnecessary pass
cTn-dev/PyComms/PyComms/pycomms.py
[ { "content": "#!/usr/bin/python\n\n# Python Standard Library Imports\nimport smbus\n\n# External Imports\npass\n\n# Custom Imports\npass\n\n# ===========================================================================\n# PyComms I2C Base Class (an rewriten Adafruit_I2C pythone class clone)\n# ==================...
[ { "span": "pass", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 4 }, { "span": "pass", "start_line": 9, "start_column": 0, "end_line": 9, "end_column": 4 } ]
[]
1
true
[ "[CLS]_", "Un", "necessar", "y_", "pass_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "python_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Pyth", "on", " ", "Standard", " ", "Libr", "ary", " ", "Imports",...
[ 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, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unnecessary pass
bmcfee/librosa/tests/test_filters.py
[ { "content": "def test_hz_to_mel():\n def __test_to_mel(infile):\n DATA = load(infile)\n z = librosa.hz_to_mel(DATA['f'], DATA['htk'])\n\n assert np.allclose(z, DATA['result'])\n\n for infile in files('data/feature-hz_to_mel-*.mat'):\n yield (__test_to_mel, infile)\n\n pass"...
[ { "span": "pass", "start_line": 65, "start_column": 4, "end_line": 65, "end_column": 8 }, { "span": "pass", "start_line": 79, "start_column": 4, "end_line": 79, "end_column": 8 }, { "span": "pass", "start_line": 92, "start_column": 4, "end_line": 92, ...
[]
1
true
[ "[CLS]_", "Un", "necessar", "y_", "pass_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "hz", "\\u", "to", "\\u", "mel", "_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\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 import
udibr/sketch/sketch.py
[ { "content": "#!/usr/bin/env python\n\nfrom __future__ import division, print_function\n\nimport logging\nimport os\n\nFORMAT = '[%(asctime)s] %(name)-15s %(message)s'\nDATEFMT = \"%H:%M:%S\"\nlogging.basicConfig(format=FORMAT, datefmt=DATEFMT, level=logging.INFO)\n\n\nimport sys\nimport theano\n# Automatically...
[ { "span": "from blocks.extensions.saveload import Checkpoint, Load", "start_line": 53, "start_column": 0, "end_line": 53, "end_column": 55 }, { "span": "import math", "start_line": 68, "start_column": 0, "end_line": 68, "end_column": 11 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "\\u\\u", "future\\u\\u_", "import_", "division_", ",_", "print", ...
[ 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...
Unguarded next in generator
blaze/blaze/blaze/compute/tests/test_postgresql_compute.py
[ { "content": "@pytest.yield_fixture\ndef sql(url):\n ds = dshape('var * {A: string, B: int64}')\n try:\n t = data(url % next(names), dshape=ds)\n except sa.exc.OperationalError as e:\n pytest.skip(str(e))\n else:\n assert t.dshape == ds\n t = data(odo([('a', 1), ('b', 2)]...
[ { "span": "next(names),", "start_line": 55, "start_column": 23, "end_line": 55, "end_column": 34 }, { "span": "next(names),", "start_line": 87, "start_column": 23, "end_line": 87, "end_column": 34 }, { "span": "next(names),", "start_line": 101, "start_colu...
[]
1
true
[ "[CLS]_", "Un", "guard", "ed_", "next_", "in_", "generator_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "pytest_", "._", "yield", "\\u", "fixture_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "sql_", "(_", "url_"...
[ 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, 2...
Unused local variable
neuropoly/spinalcordtoolbox/dev/sct_register_graymatter/sct_register_graymatter.py
[ { "content": "def wm_registration(param, smooth=False, init=False):\n path, fixed_name, ext = sct.extract_fname(param.fname_fixed)\n path_moving, moving_name, ext = sct.extract_fname(param.fname_moving)\n path, fixed_seg_name, ext = sct.extract_fname(param.fname_seg_fixed)\n path_moving_seg, moving_...
[ { "span": "transfo_params ", "start_line": 141, "start_column": 8, "end_line": 141, "end_column": 22 }, { "span": "transfo_params ", "start_line": 143, "start_column": 8, "end_line": 143, "end_column": 22 }, { "span": "transfo_params ", "start_line": 145, ...
[]
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_", "wm", "\\u", "registration_", "(_", "param_", ",_", "smooth_", "=_", "False_", ",_", "init_", "=_", "False_", "...
[ 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
fp7-ofelia/ocf/vt_manager/src/python/vt_manager/models/XenServer.py
[ { "content": "from django.db import models\nfrom django.contrib import auth\nfrom threading import Lock\nimport inspect \nfrom vt_manager.models.VTServer import VTServer\nfrom vt_manager.models.Action import Action\nfrom vt_manager.models.VirtualMachine import VirtualMachine\nfrom vt_manager.models.XenVM import...
[ { "span": "from django.contrib import auth", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 31 }, { "span": "from threading import Lock", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 26 }, { "span": "import inspect ", "sta...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "django_", "._", "db_", "import_", "models_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "contrib_", "import_", "auth_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "thread...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 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, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Unused local variable
kuri65536/python-for-android/python-modules/twisted/twisted/test/test_reflector.py
[ { "content": " def _cbTestReflector(self, parent):\n # create some child rows\n test_values = {}\n inserts = []\n child_values = {}\n for i in range(0, self.num_iterations):\n row = ChildRow()\n row.assignKeyAttr(\"childId\", i)\n values = s...
[ { "span": "parent ", "start_line": 230, "start_column": 12, "end_line": 230, "end_column": 18 }, { "span": "values ", "start_line": 304, "start_column": 8, "end_line": 304, "end_column": 14 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Reflect", "or", "Test", "Base_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u", "cb", "Test", "Reflect", "or_", "(_", "self_", ",_", "parent_", ")_", ":_", "\\u\\u\\uNEWL...
[ 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/GafferUI/__init__.py
[ { "content": "##########################################################################\n#\n# Copyright (c) 2011-2012, John Haddon. All rights reserved.\n# Copyright (c) 2011-2015, Image Engine Design Inc. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modi...
[ { "span": "from Widget import Widget", "start_line": 133, "start_column": 0, "end_line": 133, "end_column": 25 }, { "span": "from LazyMethod import LazyMethod", "start_line": 134, "start_column": 0, "end_line": 134, "end_column": 33 }, { "span": "from Menu import ...
[]
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...
Unused local variable
Ivaylo-Popov/Theano-Lights/models/cnn.py
[ { "content": " def __init__(self, data, hp):\n super(CNN, self).__init__(self.__class__.__name__, data, hp)\n \n self.n_h = 400\n\n self.params = Parameters()\n n_x = self.data['n_x']\n n_y = self.data['n_y']\n n_h = self.n_h\n scale = hp.init_scale\n\n...
[ { "span": "n_x ", "start_line": 25, "start_column": 8, "end_line": 25, "end_column": 11 }, { "span": "n_h ", "start_line": 27, "start_column": 8, "end_line": 27, "end_column": 11 }, { "span": "w ", "start_line": 34, "start_column": 16, "end_line": 34, ...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "CNN", "_", "(_", "Model", "SL", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "\\u\\u", "init\\u\\u_", "(_", "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...
Except block handles 'BaseException'
garethr/django-test-extensions/src/test_extensions/testrunners/xmlunit/unittest.py
[ { "content": " def __call__(self, result=None):\n if result is not None: self.result = result\n result.startTest(self)\n testMethod = getattr(self, self.__testMethodName)\n try:\n try:\n self.setUp()\n except:\n result.addError(s...
[ { "span": "except:", "start_line": 231, "start_column": 12, "end_line": 231, "end_column": 19 }, { "span": "except:", "start_line": 241, "start_column": 12, "end_line": 241, "end_column": 19 }, { "span": "except:", "start_line": 246, "start_column": 12, ...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Test", "Case_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u\\u", "call\\u\\u_", "(_", "self_", ",_", "result_...
[ 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...
Modification of parameter with default
pandaproject/panda/api_examples/couchdb.py
[ { "content": "def panda_get(url, params={}):\n params.update(PANDA_AUTH_PARAMS)\n return requests.get(url, params=params)", "metadata": "root.panda_get", "header": "['module', '___EOS___']", "index": 32 }, { "content": "def panda_put(url, data, params={}):\n params.update(PANDA_AUTH...
[ { "span": "params.", "start_line": 33, "start_column": 4, "end_line": 33, "end_column": 10 }, { "span": "params.", "start_line": 37, "start_column": 4, "end_line": 37, "end_column": 10 } ]
[ { "span": "params=", "start_line": 32, "start_column": 19, "end_line": 32, "end_column": 25 }, { "span": "params=", "start_line": 36, "start_column": 25, "end_line": 36, "end_column": 31 } ]
1
true
[ "[CLS]_", "Modifica", "tion_", "of_", "parameter_", "with_", "default_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "panda", "\\u", "get_", "(_", "url_", ",_", "params_", "=_", "{_", "}_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", ...
[ 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 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, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
google/grr/grr/parsers/registry_init.py
[ { "content": "#!/usr/bin/env python\n\"\"\"Loads all the parsers so they are visible in the registry.\"\"\"\n\n# pylint: disable=g-import-not-at-top\n# pylint: disable=unused-import\nfrom grr.parsers import config_file\nfrom grr.parsers import cron_file_parser\nfrom grr.parsers import ie_history\nfrom grr.parse...
[ { "span": "from grr.parsers import config_file", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 35 }, { "span": "from grr.parsers import cron_file_parser", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 40 }, { "span": "from grr...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\u\\u\\uNL\\u\\u\\u_", "\"\"\"", "Load", "s", " ", "all", " ", "the", " ", "parser", "s", " ", "so", " ", "the", ...
[ 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...
Variable defined multiple times
OpenMDAO/OpenMDAO/openmdao/core/test/test_problem.py
[ { "content": " def test_check_promotes(self):\n # verify we get an error at setup time if we have promoted a var that doesn't exist\n\n # valid case, no error\n prob = Problem(Group())\n G = prob.root.add('G', Group())\n C = G.add('C', SimpleComp(), promotes=['x*', 'y'])\n ...
[ { "span": "C ", "start_line": 65, "start_column": 8, "end_line": 65, "end_column": 9 }, { "span": "test_src_idx_gt_src_size(", "start_line": 480, "start_column": 8, "end_line": 480, "end_column": 32 }, { "span": "mode ", "start_line": 814, "start_column": ...
[ { "span": "test_src_idx_gt_src_size(", "start_line": 528, "start_column": 8, "end_line": 528, "end_column": 32 }, { "span": "mode ", "start_line": 832, "start_column": 8, "end_line": 832, "end_column": 12 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "class_", "Test", "Problem_", "(_", "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_", "def_", "test...
[ 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
flags/Reactor-3/alife/alife_surrender.py
[ { "content": "from globals import *\n\nimport life as lfe\n\nimport judgement\nimport numbers\nimport speech\nimport brain\nimport stats\n\nimport logging\n\nSTATE = 'surrender'\nTIER = TIER_SUBMIT\n\nSTATE_ICONS[STATE] = chr(25)\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "inde...
[ { "span": "import numbers", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 14 }, { "span": "import stats", "start_line": 8, "start_column": 0, "end_line": 8, "end_column": 12 }, { "span": "import logging", "start_line": 10, "start_column"...
[]
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, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 0, 1, 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...
Module is imported more than once
codeupstudio/chipincode/modules/facebook.py
[ { "content": "#!/usr/bin/env python\n#\n# Copyright 2010 Facebook\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle...
[ { "span": "import logging", "start_line": 40, "start_column": 0, "end_line": 40, "end_column": 14 } ]
[ { "span": "import logging", "start_line": 39, "start_column": 0, "end_line": 39, "end_column": 14 } ]
1
true
[ "[CLS]_", "Module_", "is_", "imported_", "more_", "than_", "once_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Copy", "right", " ...
[ 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, 2...
Unused local variable
juliarizza/web2courses/controllers/payments.py
[ { "content": "@auth.requires_login()\ndef pay_courses():\n\n\t\"\"\"\n\tThis function is responsible to redirect the user\n\tto the payment method it chose and process if\n\tthe amount to be paid is free. In this case, it will\n\tenroll the student to the class. Other way, the user\n\twill be redirected to pay....
[ { "span": "confirmed ", "start_line": 98, "start_column": 2, "end_line": 98, "end_column": 11 }, { "span": "confirmed ", "start_line": 168, "start_column": 2, "end_line": 168, "end_column": 11 }, { "span": "confirmed ", "start_line": 233, "start_column": 2...
[]
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_", "@_", "auth_", "._", "require", "s", "\\u", "login_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "pay", "\\u", "co...
[ 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...
Comparison of identical values
amrdraz/kodr/app/brython/www/src/Lib/test/test_richcmp.py
[ { "content": " def test_coverage(self):\n # exercise all comparisons for lists\n x = [42]\n self.assertIs(x<x, False)\n self.assertIs(x<=x, True)\n self.assertIs(x==x, True)\n self.assertIs(x!=x, False)\n self.assertIs(x>x, False)\n self.assertIs(x>=x, ...
[ { "span": "x<x,", "start_line": 285, "start_column": 22, "end_line": 285, "end_column": 25 }, { "span": "x<=x,", "start_line": 286, "start_column": 22, "end_line": 286, "end_column": 26 }, { "span": "x==x,", "start_line": 287, "start_column": 22, "end_...
[]
1
true
[ "[CLS]_", "Compari", "son_", "of_", "identical_", "values_", "[SEP]_", "class_", "List", "Test_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "test\\u", "coverage_"...
[ 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, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2...
Unused import
dropbox/grouper/tests/test_requests.py
[ { "content": "from fixtures import graph, groups, permissions, session, standard_graph, users\n\nfrom grouper.model_soup import Group, Request, User\nfrom util import add_member\n\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "def test_basic_requ...
[ { "span": "from fixtures import graph, groups, permissions, session, standard_graph, users", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 79 }, { "span": "from grouper.model_soup import Group, Request, User", "start_line": 2, "start_column": 0, "end_line":...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "fixtures_", "import_", "graph_", ",_", "groups_", ",_", "permissions_", ",_", "session_", ",_", "standard", "\\u", "graph_", ",_", "users_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u...
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 0, 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, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
JasonGiedymin/Flask-Module-Scaffold/src/myapp/apps/dummy/__init__.py
[ { "content": "from myapp import utils\n\n## Required\nmodule_name = utils.getFinalName(__name__)\nmodule = utils.getModule(__name__, subdomain=module_name)\n\nimport views\nimport views.morepages", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "import views", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 12 }, { "span": "import views.morepages", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 22 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "myapp", "_", "import_", "utils_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "##", " ", "Required_", "\\u\\u\\uNL\\u\\u\\u_", "module", "\\u", "name_", "=_", "utils_",...
[ 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, 0, 1, 2, 0, 1, 1, 1, 1 ]
Unused local variable
grundprinzip/sublemacspro/jove.py
[ { "content": " def set_mark(self, regions=None, update_status=True, and_selection=True):\n view = self.view\n mark_ring = self.state.mark_ring\n if regions is None:\n regions = self.get_cursors()\n\n # update the mark ring\n mark_ring.set(regions)\n\n if s...
[ { "span": "view ", "start_line": 690, "start_column": 8, "end_line": 690, "end_column": 12 }, { "span": "view ", "start_line": 730, "start_column": 8, "end_line": 730, "end_column": 12 }, { "span": "cursor ", "start_line": 823, "start_column": 16, "end...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Cmd", "Util_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "set\\u", "mark_", "(_", "self_", ",_", "regions_", "=_", "None_", ",_", "update", "\\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, 0, 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
google/grr/grr/lib/flows/cron/system_test.py
[ { "content": " def testPurgeClientStats(self):\n max_age = system.PurgeClientStats.MAX_AGE\n\n for t in [1 * max_age, 1.5 * max_age, 2 * max_age]:\n with test_lib.FakeTime(t):\n urn = self.client_id.Add(\"stats\")\n\n stats_fd = aff4.FACTORY.Create(urn, \"ClientStats\", token=self.toke...
[ { "span": "self.assertTrue(max_age in [e.RSS_size for e in stat_entries])", "start_line": 180, "start_column": 4, "end_line": 180, "end_column": 66 }, { "span": "self.assertTrue(max_age not in [e.RSS_size for e in stat_entries])", "start_line": 191, "start_column": 4, "end_li...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "System", "Cro", "n", "Flow", "Test_", "(_", "test\\u", "lib_", "._", "Flow", "Test", "s", "Base", "class_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\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 import
UDST/urbansim/setup.py
[ { "content": "# Install setuptools if not installed.\ntry:\n import setuptools\nexcept ImportError:\n from ez_setup import use_setuptools\n use_setuptools()\n\nfrom setuptools import setup, find_packages\n\n\n# read README as the long description\nwith open('README.rst', 'r') as f:\n long_descriptio...
[ { "span": "import setuptools", "start_line": 2, "start_column": 4, "end_line": 2, "end_column": 21 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Install", " ", "setup", "tool", "s", " ", "if", " ", "not", " ", "install", "ed", "._", "\\u\\u\\uNL\\u\\u\\u_", "try_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uIND...
[ 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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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
rwl/muntjac/muntjac/ui/qtui2mj.py
[ { "content": " def __init__(self,parent,widget,mainUI=None,main=False):\n #when the initial widget is passed in main eq true so that A main object can be generated\n if mainUI==None:\n self.mainUI=MuntJacWindow()\n #when child widgets are created the original object reference ...
[ { "span": "mainUI==None:", "start_line": 127, "start_column": 11, "end_line": 127, "end_column": 23 }, { "span": "self.widget.layout==None:", "start_line": 175, "start_column": 21, "end_line": 175, "end_column": 45 }, { "span": "self.geometry==None:", "start_l...
[]
1
true
[ "[CLS]_", "Test", "ing_", "equality", "_", "to_", "None_", "[SEP]_", "class_", "a", "Widget_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "\\u\\u", "init\\u\\u_", "(_", "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, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
pydata/pandas/pandas/io/tests/test_ga.py
[ { "content": " @with_connectivity_check(\"http://www.google.com\")\n def test_getdata(self):\n try:\n end_date = datetime.now()\n start_date = end_date - pd.offsets.Day() * 5\n end_date = end_date.strftime('%Y-%m-%d')\n start_date = start_date.strftime('%...
[ { "span": "self.assertTrue('date' not in df)", "start_line": 64, "start_column": 12, "end_line": 64, "end_column": 45 }, { "span": "self.assertTrue('hour' not in df)", "start_line": 65, "start_column": 12, "end_line": 65, "end_column": 45 }, { "span": "self.assert...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "Goo", "gle_", "(_", "tm_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "with", "\\u", "connecti", "vity", "\\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
scottrice/Ice/ice/logs.py
[ { "content": "def is_running_in_test():\n current_stack = inspect.stack()\n return any(map(is_test_stack_frame, inspect.stack()))", "metadata": "root.is_running_in_test", "header": "['module', '___EOS___']", "index": 28 } ]
[ { "span": "current_stack ", "start_line": 29, "start_column": 2, "end_line": 29, "end_column": 15 } ]
[]
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_", "is", "\\u", "runn", "ing", "\\u", "in", "\\u", "test_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\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, 0, 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 ]