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
rcbops/glance-buildpackage/glance/tests/unit/test_db.py
[ { "content": "# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2010-2011 OpenStack, LLC\n# All Rights Reserved.\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 a...
[ { "span": "from glance.common import context", "start_line": 19, "start_column": 0, "end_line": 19, "end_column": 33 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "vim", ":", " ", "tabs", "top", "=", "4", " ", "shift", "widt", "h", "=", "4", " ", "soft", "tabs", "top", "=", "4_", "\\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
n9code/pylease/tests/test_ctxmgmt.py
[ { "content": " def test_caution_context_manager_must_rollback_everything_if_error_occurs(self):\n rb1 = MagicMock()\n rb2 = MagicMock()\n rb3 = MagicMock()\n\n with Caution() as caution:\n caution.add_rollback(rb1)\n caution.add_rollback(rb2)\n\n r...
[ { "span": "rb3 ", "start_line": 33, "start_column": 8, "end_line": 33, "end_column": 11 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Context", "Manager", "s", "Test_", "(_", "Py", "lease", "Test_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u"...
[ 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...
First parameter of a method is not named 'self'
edgewall/trac/trac/wiki/api.py
[ { "content": " def wiki_page_added(page):\n \"\"\"Called whenever a new Wiki page is added.\"\"\"", "metadata": "root.IWikiChangeListener.wiki_page_added", "header": "['class', 'IWikiChangeListener', '(', 'Interface', ')', ':', '___EOS___']", "index": 37 }, { "content": " def wi...
[ { "span": "def wiki_page_added(page):", "start_line": 37, "start_column": 4, "end_line": 37, "end_column": 30 }, { "span": "def wiki_page_changed(page, version, t, comment, author, ipnr):", "start_line": 40, "start_column": 4, "end_line": 40, "end_column": 67 }, { ...
[]
1
true
[ "[CLS]_", "First_", "parameter_", "of_", "a_", "method_", "is_", "not_", "named_", "'", "self", "'_", "[SEP]_", "class_", "IW", "iki", "Change", "Listener_", "(_", "Interface_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "wiki", "\\u", ...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2...
Comparison of constants
kayhayen/Nuitka/tests/benchmarks/pybench/Numbers.py
[ { "content": " def test(self):\n\n for i in xrange(self.rounds):\n\n 2 < 3\n 2 > 3\n 2 == 3\n 2 > 3\n 2 < 3\n\n 2 < 3\n 2 > 3\n 2 == 3\n 2 > 3\n 2 < 3\n\n 2 < 3\n 2 > 3\n...
[ { "span": "2 < 3", "start_line": 31, "start_column": 12, "end_line": 31, "end_column": 17 }, { "span": "2 > 3", "start_line": 32, "start_column": 12, "end_line": 32, "end_column": 17 }, { "span": "2 == 3", "start_line": 33, "start_column": 12, "end_lin...
[]
1
true
[ "[CLS]_", "Compari", "son_", "of_", "constants_", "[SEP]_", "class_", "Compare", "Integer", "s_", "(_", "Test_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "test_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\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, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 2, 0, 1, 1...
Except block handles 'BaseException'
XiaoMi/minos/supervisor/supervisor/supervisorctl.py
[ { "content": " def do_tail(self, arg):\n if not self.ctl.upcheck():\n return\n \n args = arg.strip().split()\n\n if len(args) < 1:\n self.ctl.output('Error: too few arguments')\n self.help_tail()\n return\n\n elif len(args) > 3:\n...
[ { "span": "except:", "start_line": 448, "start_column": 16, "end_line": 448, "end_column": 23 }, { "span": "except:", "start_line": 507, "start_column": 16, "end_line": 507, "end_column": 23 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Default", "Controlle", "r", "Plugin_", "(_", "Controlle", "r", "Plug", "in", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uD...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
inpho/topic-explorer/topicexplorer/extensions/htrc.py
[ { "content": "def label(doc):\n if context_type == 'book':\n try:\n md = metadata[doc]\n return md['title'][0]\n except:\n return doc\n elif context_type == 'page':\n context_md = ctx_md['page']\n where = np.squeeze(np.where(np.in1d(context_md['...
[ { "span": "except:", "start_line": 44, "start_column": 8, "end_line": 44, "end_column": 15 }, { "span": "except:", "start_line": 60, "start_column": 8, "end_line": 60, "end_column": 15 }, { "span": "except:", "start_line": 64, "start_column": 8, "end_l...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "label_", "(_", "doc_", ")_", ":_", "\\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, 0, 1, 1, 2...
Testing equality to None
denizalti/concoord/concoord/replica.py
[ { "content": " def send_replybatch_to_client(self, givenresult, command):\n if self.debug: self.logger.write(\"State\", \"Sending REPLY to CLIENT\")\n clientreply = create_message(MSG_CLIENTREPLY, self.me,\n {FLD_REPLY: givenresult,\n ...
[ { "span": "clientconn == None ", "start_line": 325, "start_column": 11, "end_line": 325, "end_column": 29 }, { "span": "clientconn.thesocket == None:", "start_line": 325, "start_column": 33, "end_line": 325, "end_column": 61 }, { "span": "clientconn == None ", ...
[]
1
true
[ "[CLS]_", "Test", "ing_", "equality", "_", "to_", "None_", "[SEP]_", "class_", "Replica", "_", "(_", "Node_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "send", "\\u", "repl", "yb", "atch", "\\u", "to", "\\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...
Imprecise assert
divio/django-cms/cms/tests/test_publisher.py
[ { "content": " def test_publish_works_with_descendants(self):\n \"\"\"\n For help understanding what this tests for, see:\n http://articles.sitepoint.com/print/hierarchical-data-database\n\n Creates this published structure:\n home\n ...
[ { "span": "self.assertTrue(public.parent in public.get_ancestors())", "start_line": 967, "start_column": 16, "end_line": 967, "end_column": 72 }, { "span": "self.assertTrue(public in public.parent.get_descendants())", "start_line": 968, "start_column": 16, "end_line": 968, ...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Publish", "ing", "Tests_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "publi", "sh", "\\u", "works", "\\u", "wi...
[ 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
bayespy/bayespy/bayespy/inference/vmp/nodes/tests/test_multinomial.py
[ { "content": "################################################################################\n# Copyright (C) 2014 Jaakko Luttinen\n#\n# This file is licensed under the MIT License.\n################################################################################\n\n\n\"\"\"\nUnit tests for `multinomial` modu...
[ { "span": "import scipy", "start_line": 12, "start_column": 0, "end_line": 12, "end_column": 12 }, { "span": "from bayespy.utils import random", "start_line": 18, "start_column": 0, "end_line": 18, "end_column": 32 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "###########", "###########", "###", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Copy", "right", " ", "(", "C", "...
[ 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
kaleidos/django-sampledatahelper/tests/tests.py
[ { "content": " def test_int(self):\n self.assertEqual(self.sd.int(min_value=5, max_value=5), 5)\n\n self.assertTrue(self.sd.int(min_value=1000000000) >= 1000000000)\n self.assertTrue(self.sd.int(max_value=3) <= 3)\n\n self.assertTrue(isinstance(self.sd.int(), int))\n\n val ...
[ { "span": "self.assertTrue(self.sd.int(min_value=1000000000) >= 1000000000)", "start_line": 34, "start_column": 8, "end_line": 34, "end_column": 72 }, { "span": "self.assertTrue(self.sd.int(max_value=3) <= 3)", "start_line": 35, "start_column": 8, "end_line": 35, "end_col...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "Number", "Helpers_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "int_", "(_", "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, 0, 1, 1, 1, 1, 1...
Unused local variable
saltstack/salt/salt/modules/lxc.py
[ { "content": "def _network_conf(conf_tuples=None, **kwargs):\n '''\n Network configuration defaults\n\n network_profile\n as for containers, we can either call this function\n either with a network_profile dict or network profile name\n in the kwargs\n nic_op...
[ { "span": "gateway_set ", "start_line": 838, "start_column": 8, "end_line": 838, "end_column": 19 }, { "span": "cret ", "start_line": 1535, "start_column": 20, "end_line": 1535, "end_column": 24 }, { "span": "now ", "start_line": 3362, "start_column": 4, ...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "network", "\\u", "conf_", "(_", "conf", "\\u", "tuples_", "=_", "None_", ",_", "**_", "kwargs_", ")_", ...
[ 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
jollychang/robotframework-appiumlibrary/tests/locators/test_elementfinder.py
[ { "content": " def test_should_have_strategies(self):\n \"\"\"Element Finder instance should contain expected strategies.\"\"\"\n self.assertTrue('android' in self.finder._strategies)\n self.assertTrue('ios' in self.finder._strategies)", "metadata": "root.ElementFinderTests.test_shou...
[ { "span": "self.assertTrue('android' in self.finder._strategies)", "start_line": 15, "start_column": 8, "end_line": 15, "end_column": 61 }, { "span": "self.assertTrue('ios' in self.finder._strategies)", "start_line": 16, "start_column": 8, "end_line": 16, "end_column": 57...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Element", "Fin", "der", "Tests_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "shou", "ld", "...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1...
Except block handles 'BaseException'
xraypy/xraylarch/plugins/epics/xrfcontrol.py
[ { "content": "#!/usr/bin/env python\n\"\"\"\nEpics XRF Display App\n\"\"\"\n\nimport sys\nimport os\n\nimport time\nimport copy\nfrom functools import partial\n\nimport wx\nimport wx.lib.mixins.inspection\nimport wx.lib.scrolledpanel as scrolled\ntry:\n from wx._core import PyDeadObjectError\nexcept:\n Py...
[ { "span": "except:", "start_line": 17, "start_column": 0, "end_line": 17, "end_column": 7 }, { "span": "except:", "start_line": 35, "start_column": 0, "end_line": 35, "end_column": 7 }, { "span": "except:", "start_line": 53, "start_column": 0, "end_lin...
[]
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_", "\"\"\"", "\\", "10", ";", "Epi", "cs", " ", ...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
CybOXProject/python-cybox/cybox/bindings/win_registry_key_object.py
[ { "content": " def exportChildren(self, lwrite, level, namespace_='WinRegistryKeyObj:', name_='RegistryValueType', fromsubclass_=False, pretty_print=True):\n if pretty_print:\n eol_ = '\\n'\n else:\n eol_ = ''\n if self.Name is not None:\n self.Name.expor...
[ { "span": "eol_ ", "start_line": 71, "start_column": 12, "end_line": 71, "end_column": 16 }, { "span": "eol_ ", "start_line": 73, "start_column": 12, "end_line": 73, "end_column": 16 }, { "span": "eol_ ", "start_line": 157, "start_column": 12, "end_lin...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Regi", "stry", "Value", "Type_", "(_", "Generate", "ds", "Super", "_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "export", "Children_", ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
Arelle/Arelle/arelle/plugin/streamingExtensions.py
[ { "content": "'''\nStreamingExtensions is a plug-in to both GUI menu and command line/web service\nthat provides an alternative approach to big instance documents without building a DOM, to save\nmemory footprint. lxml iterparse is used to parse the big instance. ModelObjects are specialized by features\nfor ...
[ { "span": "import io, os, time, sys, re, gc", "start_line": 17, "start_column": 0, "end_line": 17, "end_column": 32 }, { "span": "from arelle.ModelObjectFactory import parser", "start_line": 22, "start_column": 0, "end_line": 22, "end_column": 44 }, { "span": "fro...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "'''", "\\", "10", ";", "Stream", "ing", "Ext", "ensi", "ons", " ", "is", " ", "a", " ", "plug", "-", "in", " ", "to", " ", "bot", "h", " ", "GU", "I", " ", "menu", ...
[ 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
CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.5/extras/completion/py/pymel/internal/startup.py
[ { "content": "\"\"\"\nMaya-related functions, which are useful to both `api` and `core`, including `mayaInit` which ensures\nthat maya is initialized in standalone mode.\n\"\"\"\n\nfrom . import plogging\nimport pymel.util.picklezip as picklezip\nimport glob\nimport pymel.versions as versions\nimport os\nimport...
[ { "span": "import pymel.util.picklezip as picklezip", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 40 }, { "span": "import glob", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 11 }, { "span": "import pymel.versions as version...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "Maya", "-", "relate", "d", " ", "function", "s", ",", " ", "whi", "ch", " ", "are", " ", "usef", "ul", " ", "to", " ", "bot", "h", " ", "`"...
[ 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
pydata/pandas/pandas/stats/plm.py
[ { "content": " def _convert_x(self, x):\n # Converts non-numeric data in x to floats. x_converted is the\n # DataFrame with converted values, and x_conversion is a dict that\n # provides the reverse mapping. For example, if 'A' was converted to 0\n # for x named 'variety', then x...
[ { "span": "df ", "start_line": 193, "start_column": 20, "end_line": 193, "end_column": 22 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Pane", "l", "OL", "S_", "(_", "OL", "S_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "convert", "\\u", "x_", "(_", "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
dropbox/hermes/tests/api_tests/test_labors.py
[ { "content": "import json\nimport pytest\nimport requests\n\nfrom datetime import datetime, timedelta\n\nfrom .fixtures import tornado_server, tornado_app, sample_data1_server\nfrom .util import (\n assert_error, assert_success, assert_created, assert_deleted, Client\n)\n\n\n\n\n\n\n\n\n\n", "metadata": ...
[ { "span": "import json", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 11 }, { "span": "import pytest", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 13 }, { "span": "import requests", "start_line": 2, "start_column": ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "json_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "pytest_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "requests_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "dateti...
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
qe-team/marmot/marmot/features/alignment_feature_extractor.py
[ { "content": "from __future__ import print_function\n\nimport os\nimport sys\nimport errno\n\nfrom marmot.features.feature_extractor import FeatureExtractor\nfrom marmot.util.alignments import train_alignments, align_sentence\nfrom marmot.util.ngram_window_extractor import left_context, right_context\nfrom marm...
[ { "span": "from marmot.util.alignments import train_alignments, align_sentence", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 67 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "\\u\\u", "future\\u\\u_", "import_", "print", "\\u", "function_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "sy...
[ 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, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
AndrewIngram/django-extra-views/extra_views_tests/tests.py
[ { "content": " def test_create(self):\n res = self.client.get('/formset/simple/')\n self.assertEqual(res.status_code, 200)\n self.assertTrue('formset' in res.context)\n self.assertFalse('form' in res.context)\n self.assertTemplateUsed(res, 'extra_views/address_formset.html'...
[ { "span": "self.assertTrue('formset' in res.context)", "start_line": 28, "start_column": 8, "end_line": 28, "end_column": 49 }, { "span": "self.assertFalse('form' in res.context)", "start_line": 29, "start_column": 8, "end_line": 29, "end_column": 47 }, { "span": ...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Form", "Set", "View", "Tests_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "test\\u", "create_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1...
Unused import
AcademicsToday/py-academicstoday/academicstoday_project/publisher/views/my_publication.py
[ { "content": "from django.shortcuts import render\nfrom django.core import serializers\nimport json\nimport datetime\nimport os\nfrom django.http import HttpResponse\nfrom django.contrib.auth.models import User\nfrom django.contrib.auth import authenticate, login, logout\nfrom django.contrib.auth.decorators imp...
[ { "span": "from django.core import serializers", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 35 }, { "span": "import datetime", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 15 }, { "span": "from django.contrib.auth.models i...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "django_", "._", "shortcuts_", "import_", "render_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "core_", "import_", "serializers_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 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...
Unused import
RobotLocomotion/director/src/python/director/segmentation.py
[ { "content": "import os\nimport sys\nimport math\nimport vtk\nimport time\nimport functools\nimport traceback\nimport PythonQt\nfrom PythonQt import QtCore, QtGui\nimport director.applogic as app\nfrom director import objectmodel as om\nfrom director import perception\nfrom director import lcmUtils\nfrom direct...
[ { "span": "import sys", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 10 }, { "span": "import time", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 11 }, { "span": "import PythonQt", "start_line": 7, "start_column": 0, ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "sys_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "math_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "vtk_", "\\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, 0, 1, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 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...
Unused import
Cairnarvon/uptime/doc/conf.py
[ { "content": "# -*- coding: utf-8 -*-\n#\n# uptime documentation build configuration file, created by\n# sphinx-quickstart on Sun Jan 20 05:05:56 2013.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n...
[ { "span": "import sys, os", "start_line": 13, "start_column": 0, "end_line": 13, "end_column": 14 } ]
[]
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_", "#", " ", "upti", "me", " ", "doc...
[ 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
charanpald/APGL/apgl/graph/test/MatrixGraphTest.py
[ { "content": " def testSubgraph(self):\n numVertices = 10\n numFeatures = 3\n vList = VertexList(numVertices, numFeatures)\n vertices = numpy.random.rand(numVertices, numFeatures)\n vList.setVertices(vertices)\n\n graph = self.GraphType(vList)\n graph.addEdge(...
[ { "span": "self.assertTrue(subgraph.getEdge(0, 1) == 1)", "start_line": 629, "start_column": 8, "end_line": 629, "end_column": 52 }, { "span": "self.assertTrue(subgraph.getEdge(0, 2) == 1)", "start_line": 630, "start_column": 8, "end_line": 630, "end_column": 52 }, { ...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Matrix", "Graph", "Test_", "(_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test", "Sub", "graph_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\...
[ 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
VisTrails/VisTrails/vistrails/core/interpreter/cached.py
[ { "content": " def setup_pipeline(self, pipeline, **kwargs):\n \"\"\"setup_pipeline(controller, pipeline, locator, currentVersion,\n view, aliases, **kwargs)\n Matches a pipeline with the persistent pipeline and creates\n instances of modules that aren't in the c...
[ { "span": "locator ", "start_line": 288, "start_column": 8, "end_line": 288, "end_column": 15 }, { "span": "current_version ", "start_line": 289, "start_column": 8, "end_line": 289, "end_column": 23 }, { "span": "view ", "start_line": 290, "start_column": ...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Cache", "d", "Interpreter_", "(_", "vist", "rail", "s_", "._", "core_", "._", "interpreter_", "._", "base_", "._", "Base", "Interpreter_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\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
PaloAltoNetworks/SplunkforPaloAltoNetworks/bin/retrieveWildFireReport.py
[ { "content": "# ##########################################\n# Version 1.0\n# Author: Brian Torres-Gil\n#\n# About this script:\n# Triggered when a WildFire syslog indicates a file has been analyzed by WildFire.\n# This script retrieves the WildFire data relating to that syslog from the WildFire\n# cloud s...
[ { "span": "import splunk.entity as entity ", "start_line": 47, "start_column": 8, "end_line": 47, "end_column": 38 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "###########", "###########", "###########", "#########", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Version", " ", "1.0_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Author", ":", "...
[ 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
neurodata/ndstore/stats/imghist.py
[ { "content": "# Copyright 2015 Open Connectome Project (http://openconnecto.me)\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n# http://www.apache.org/licenses/LICENS...
[ { "span": "import argparse", "start_line": 14, "start_column": 0, "end_line": 14, "end_column": 15 }, { "span": "import urllib, urllib2", "start_line": 18, "start_column": 0, "end_line": 18, "end_column": 22 }, { "span": "import cStringIO", "start_line": 19, ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Copy", "right", " ", "201", "5", " ", "Open", " ", "Connect", "ome", " ", "Project", " ", "(", "http", "://", "openco", "nnect", "o", ".", "me", ")_", "\\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...
`__eq__` not overridden when adding attributes
eevee/sanpera/sanpera/color.py
[ { "content": "class BaseColor(object):\n \"\"\"Represents a color.\n\n Colors have some amount of color data (determined by the colorspace, but\n generally three channels' worth), an opacity, and an arbitrary number of\n other user-defined channels. Channels' values are floats ranging from 0.0\n ...
[ { "span": "class RGBColor(BaseColor):", "start_line": 231, "start_column": 0, "end_line": 231, "end_column": 26 }, { "span": "class CMYKColor(BaseColor):", "start_line": 319, "start_column": 0, "end_line": 319, "end_column": 27 }, { "span": "class HSLColor(BaseCol...
[ { "span": "def __eq__(self, other):", "start_line": 213, "start_column": 4, "end_line": 213, "end_column": 28 }, { "span": "self._red ", "start_line": 233, "start_column": 8, "end_line": 233, "end_column": 17 }, { "span": "self._green ", "start_line": 234, ...
1
false
[ "[CLS]_", "`_", "\\u\\u", "eq\\u\\u_", "`_", "not_", "overrid", "den_", "when_", "addin", "g_", "attributes_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Base", "Color_", "(_",...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/test/test_derivatives.py
[ { "content": " def test_nested_2Darray_gradient_sub(self):\n\n # This tests the\n top = Assembly()\n top.add('nest', Assembly())\n top.add('driver', SimpleDriver())\n top.nest.add('comp', ArrayComp2D())\n\n top.driver.workflow.add(['nest'])\n top.nest.driver.w...
[ { "span": "self.assertTrue('x[0][0]' in top.nest._system.vec['u']._info)", "start_line": 2127, "start_column": 8, "end_line": 2127, "end_column": 69 }, { "span": "self.assertTrue(len(comp_list) == 3)", "start_line": 2583, "start_column": 8, "end_line": 2583, "end_column":...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "case", "\\u", "derivatives", "_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "nest", ...
[ 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
wecatch/app-turbo/turbo/test/app_test.py
[ { "content": "from __future__ import absolute_import, division, print_function, with_statement\n\nimport socket\nimport os\nimport signal\nimport sys\nimport random\nimport time\nimport threading\nimport logging\nimport requests\nimport multiprocessing\nimport time\nfrom bson.objectid import ObjectId\n\nfrom tu...
[ { "span": "import sys", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 10 }, { "span": "import random", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 13 }, { "span": "import time", "start_line": 7, "start_column": 0, ...
[]
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_", ",_", "division_", ",_", "print", "\\u", "function_", ",_", "with", "\\u", "statement_", "\\u\\u\\uNEW...
[ 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, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2...
Unused import
kuri65536/python-for-android/python-modules/twisted/twisted/conch/checkers.py
[ { "content": "# -*- test-case-name: twisted.conch.test.test_checkers -*-\n# Copyright (c) 2001-2010 Twisted Matrix Laboratories.\n# See LICENSE for details.\n\n\"\"\"\nProvide L{ICredentialsChecker} implementations to be used in Conch protocols.\n\"\"\"\n\nimport os, base64, binascii, errno\ntry:\n import pw...
[ { "span": "from twisted.cred import pamauth", "start_line": 23, "start_column": 4, "end_line": 23, "end_column": 36 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "test", "-", "case", "-", "name", ":", " ", "twist", "ed", ".", "conc", "h", ".", "test", ".", "test\\u", "checkers", " ", "-*-", "_", "\\u\\u\\uNL\\...
[ 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...
Signature mismatch in overriding method
RobotLocomotion/director/src/python/director/affordanceitems.py
[ { "content": "class AffordanceItem(PolyDataItem):\n\n COPY_MODE_ALL = 0 # copies all properties from affordance descriptions\n COPY_MODE_SKIP_LOCAL = 1 # skips properties that should keep local values such as visibility\n LOCAL_PROPERTY_NAMES = ('Visible')\n\n\n\n\n\n\n\n\n\n", "metadata": "root.Af...
[ { "span": "def updateGeometryFromProperties(self):", "start_line": 98, "start_column": 4, "end_line": 98, "end_column": 43 }, { "span": "def updateGeometryFromProperties(self):", "start_line": 118, "start_column": 4, "end_line": 118, "end_column": 43 }, { "span": ...
[ { "span": "def updateGeometryFromProperties():", "start_line": 52, "start_column": 4, "end_line": 52, "end_column": 39 } ]
1
false
[ "[CLS]_", "Signature_", "mismatch_", "in_", "overrid", "ing_", "method_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "class_", "Aff", "orda", "nce", "Item_", "(_", "Poly", "Data", "Item_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\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...
Unused local variable
jonathanslenders/ptpython/ptpython/key_bindings.py
[ { "content": "def load_python_bindings(key_bindings_manager, python_input):\n \"\"\"\n Custom key bindings.\n \"\"\"\n sidebar_visible = Condition(lambda cli: python_input.show_sidebar)\n handle = key_bindings_manager.registry.add_binding\n has_selection = HasSelection()\n vi_mode_enabled =...
[ { "span": "vi_mode_enabled ", "start_line": 37, "start_column": 4, "end_line": 37, "end_column": 19 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "load", "\\u", "python", "\\u", "bindings_", "(_", "key", "\\u", "bindi", "ngs", "\\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
flags/Reactor-3/numbers.py
[ { "content": "from globals import *\nfrom math import *\nimport pathfinding\nimport render_los\nimport logging\nimport random\nimport numpy\nimport tiles\nimport time\nimport maps\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "conten...
[ { "span": "import pathfinding", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 18 }, { "span": "import render_los", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 17 }, { "span": "import tiles", "start_line": 7, "start_c...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "globals_", "import_", "*_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "math_", "import_", "*_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "path", "finding", "_", "\\u\\u\\uNEWLINE\\u\\u...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 2, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 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...
Implicit string concatenation in a list
perseas/Pyrseas/tests/dbobject/test_constraint.py
[ { "content": " def test_foreign_key_1(self):\n \"Map a table with a single-column foreign key on another table\"\n stmts = [\"CREATE TABLE t2 (pc1 INTEGER PRIMARY KEY, pc2 TEXT)\",\n \"CREATE TABLE t1 (c1 INTEGER, c2 INTEGER REFERENCES t2 (pc1) \"\n \"ON UPDATE C...
[ { "span": "\"CREATE TABLE t1 (c1 INTEGER, c2 INTEGER REFERENCES t2 (pc1) \"\n \"ON UPDATE CASCADE ON DELETE RESTRICT\"\n \", c3 TEXT)\"]", "start_line": 355, "start_column": 17, "end_line": 357, "end_column": 29 }, { "span": "\"CREATE TABLE t1 (c1 INTEGER,...
[]
1
true
[ "[CLS]_", "Implicit", "_", "string_", "concate", "nation_", "in_", "a_", "list_", "[SEP]_", "class_", "Fore", "ign", "Key", "To", "Map", "Test", "Case_", "(_", "Databa", "se", "To", "Map", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
Akagi201/learning-python/func/ref_equal.py
[ { "content": "def add_list(p):\n p = p + [1]", "metadata": "root.add_list", "header": "['module', '___EOS___']", "index": 3 } ]
[ { "span": "p ", "start_line": 4, "start_column": 4, "end_line": 4, "end_column": 5 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "add", "\\u", "list_", "(_", "p_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "p_", "=_", "p_", "+_", "[...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2 ]
Imprecise assert
google/encrypted-bigquery-client/src/paillier_test.py
[ { "content": " def testGetRandomFromZNStar(self):\n logging.debug('Running testGetRandomFromZNStar method.')\n # 8 bit values not relatively prime to 143 and less than 143.\n not_relatively_prime_to_143 = [130, 132, 143]\n for _ in xrange(20):\n r = _PAILLIER1._GetRandomFromZNStar(8, 143)\n ...
[ { "span": "self.assertFalse(r in not_relatively_prime_to_143)", "start_line": 130, "start_column": 6, "end_line": 130, "end_column": 56 }, { "span": "self.assertTrue(abs(decrypted - 1234567890.0123456) <= .0000003)", "start_line": 436, "start_column": 4, "end_line": 436, ...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Pai", "lli", "er", "Test_", "(_", "google", "test_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test", "Get", "Random", ...
[ 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
hzlf/openbroadcast/website/multilingual/admin.py
[ { "content": "\"\"\"Admin suppor for inlines\n\nPeter Cicman, Divio GmbH, 2008\n\"\"\"\nfrom django.utils.text import capfirst, get_text_list\nfrom django.contrib.admin.util import flatten_fieldsets\nfrom django.http import HttpResponseRedirect\nfrom django.utils.encoding import force_unicode\n\nimport re\nfrom...
[ { "span": "from django.contrib.admin.util import flatten_fieldsets", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 55 }, { "span": "from copy import deepcopy", "start_line": 10, "start_column": 0, "end_line": 10, "end_column": 25 }, { "span": "f...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\"\"\"", "Admi", "n", " ", "supp", "or", " ", "for", " ", "inline", "s", "\\", "10", ";", "\\", "10", ";", "Peter", " ", "Ci", "cma", "n", ",", " ", "Di", "vio", " ",...
[ 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, 0, 1, 1, 1...
Unused import
guillermooo/Vintageous/tests/commands/test__vi_big_j.py
[ { "content": "from collections import namedtuple\n\nfrom Vintageous.vi.utils import modes\n\nfrom Vintageous.tests import set_text\nfrom Vintageous.tests import add_sel\nfrom Vintageous.tests import get_sel\nfrom Vintageous.tests import first_sel\nfrom Vintageous.tests import ViewTest\n\n\ntest_data = namedtupl...
[ { "span": "from Vintageous.tests import set_text", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 37 }, { "span": "from Vintageous.tests import get_sel", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 36 }, { "span": "from Vinta...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "collections_", "import_", "namedtuple_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "Vin", "tage", "ous_", "._", "vi_", "._", "utils_", "import_", "modes_", ...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1...
Imprecise assert
lukaszb/django-projector/projector/tests/test_teams.py
[ { "content": " def test_wrong_user(self):\n data = {'user': 'not-existing-user-name'}\n form = DashboardAddMemberForm(self.group, data)\n self.assertFalse(form.is_valid())\n self.assertTrue('user' in form._errors)", "metadata": "root.DashboardAddMemberFormTest.test_wrong_user"...
[ { "span": "self.assertTrue('user' in form._errors)", "start_line": 20, "start_column": 8, "end_line": 20, "end_column": 47 }, { "span": "self.assertTrue('user' in form._errors)", "start_line": 28, "start_column": 12, "end_line": 28, "end_column": 51 }, { "span": "...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Dash", "board", "Add", "Mem", "ber", "Form", "Test_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "wrong", "\\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...
Unnecessary pass
open-cloud/xos/xos/core/admin.py
[ { "content": "class SliceRoleAdmin(XOSBaseAdmin):\n model = SliceRole\n pass", "metadata": "root.SliceRoleAdmin", "header": "['module', '___EOS___']", "index": 694 }, { "content": "class SiteRoleAdmin(XOSBaseAdmin):\n model = SiteRole\n pass", "metadata": "root.SiteRoleAdmin"...
[ { "span": "pass", "start_line": 696, "start_column": 4, "end_line": 696, "end_column": 8 }, { "span": "pass", "start_line": 701, "start_column": 4, "end_line": 701, "end_column": 8 } ]
[]
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_", "class_", "Slice", "Ro", "le", "Admin_", "(_", "XO", "SB", "ase", "Admin_", ")_", ":_", "\\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, 2, 2, 2, 2, 2, 0, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2 ]
Unused import
trapeze/transurlvania/tests/run_tests.py
[ { "content": "#!/usr/bin/env python\n\nimport os, os.path\nimport sys\nimport pprint\n\npath, scriptname = os.path.split(__file__)\n\nsys.path.append(os.path.abspath(path))\nsys.path.append(os.path.abspath(os.path.join(path, '..')))\n\nos.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'\n\nfrom django.core ...
[ { "span": "import pprint", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 13 } ]
[]
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_", "import_", "os_", ",_", "os_", "._", "path_", "\\u\\u\\uNEWLINE\\u\\u\\u_", ...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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...
Unused import
jayfk/fundingoss.com/fabfile.py
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nThis is a collection of useful utility functions when working with docker on different environments.\nIn order to use these functions, install fabric on your local machine with::\n pip install fabric\nPlease note: Fabric is a remote code execution tool, NOT a re...
[ { "span": "from fabric.operations import local as lrun, run, sudo, put", "start_line": 16, "start_column": 0, "end_line": 16, "end_column": 59 }, { "span": "from fabric.colors import green, red, yellow, blue", "start_line": 18, "start_column": 0, "end_line": 18, "end_colu...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "Thi", "s", " ", "is", " ", "a", " ",...
[ 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...
Unreachable code
fp7-ofelia/ocf/ofam/src/src/foam/api/legacyexpedientapi.py
[ { "content": " def priv_CreateSliver(self, slice_urn, credentials, rspec, users, force_approval=False, options=None):\t\n #user_info = {}\n user_info = users\n try:\n #if CredVerifier.checkValid(credentials, \"createsliver\"):\n if True:\n self.recordAction(\"createsliver\", credentia...
[ { "span": "return", "start_line": 194, "start_column": 6, "end_line": 194, "end_column": 12 }, { "span": "return self.errorResult(12, \"\") ", "start_line": 226, "start_column": 10, "end_line": 226, "end_column": 41 }, { "span": "return self.successResult(False)",...
[]
1
true
[ "[CLS]_", "Unrea", "chab", "le_", "code_", "[SEP]_", "class_", "AM", "Leg", "Exp", "API_", "(_", "foa", "m_", "._", "api_", "._", "xmlrpc", "_", "._", "Dispatcher_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\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...
Insecure temporary file
azoft-dev-team/imagrium/env/Lib/test/zxjdbc/zxtest.py
[ { "content": " def testInsertWithFile(self):\n \"\"\"testing insert with file\"\"\"\n assert self.has_table(\"texttable\"), \"missing attribute texttable\"\n fp = open(tempfile.mktemp(), \"w\")\n c = self.cursor()\n try:\n try:\n c.execute(self.tab...
[ { "span": "tempfile.mktemp(),", "start_line": 472, "start_column": 18, "end_line": 472, "end_column": 35 }, { "span": "tempfile.mktemp()", "start_line": 960, "start_column": 13, "end_line": 960, "end_column": 30 }, { "span": "tempfile.mktemp(),", "start_line":...
[]
1
true
[ "[CLS]_", "Inse", "cure", "_", "temporar", "y_", "file_", "[SEP]_", "class_", "zx", "API", "Test", "Case_", "(_", "zx", "JD", "BC", "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_"...
[ 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
meejah/txtorcon/test/test_addrmap.py
[ { "content": " def test_expires(self):\n \"\"\"\n Test simply expiry case\n \"\"\"\n\n clock = task.Clock()\n am = AddrMap()\n am.scheduler = IReactorTime(clock)\n\n now = datetime.datetime.now() + datetime.timedelta(seconds=10)\n nowutc = datetime.date...
[ { "span": "self.assertTrue('www.example.com' in am.addr)", "start_line": 58, "start_column": 8, "end_line": 58, "end_column": 53 }, { "span": "self.assertTrue('www.example.com' not in am.addr)", "start_line": 61, "start_column": 8, "end_line": 61, "end_column": 57 }, ...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Add", "r", "Map", "Tests_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "expires_", "(_", "se...
[ 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
beebotte/bbt_python/beebotte/__init__.py
[ { "content": " def __init__(self, akey = None, skey = None, token = None, hostname = \"api.beebotte.com\", port = \"80\", ssl = False):\n if akey and skey and token == None :\n self.akey = akey\n self.skey = skey\n elif akey == None and skey == None and token:\n self.token = tok...
[ { "span": "token == None ", "start_line": 42, "start_column": 25, "end_line": 42, "end_column": 38 }, { "span": "akey == None ", "start_line": 45, "start_column": 9, "end_line": 45, "end_column": 21 }, { "span": "skey == None ", "start_line": 45, "start_co...
[]
1
true
[ "[CLS]_", "Test", "ing_", "equality", "_", "to_", "None_", "[SEP]_", "class_", "BB", "T_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "ake", "y_", "=_", "None_", ",_", "skey", "_", "=_", ...
[ 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
menpo/menpo/menpo/transform/test/compose_chain_test.py
[ { "content": "def chain_compose_after_inplace_chain_test():\n a = PointCloud(np.random.random([10, 2]))\n b = PointCloud(np.random.random([10, 2]))\n\n t = Translation([3, 4])\n s = Scale([4, 2])\n chain_1 = TransformChain([t, s])\n chain_2 = TransformChain([s.pseudoinverse(), t.pseudoinverse(...
[ { "span": "a ", "start_line": 157, "start_column": 4, "end_line": 157, "end_column": 5 }, { "span": "b ", "start_line": 158, "start_column": 4, "end_line": 158, "end_column": 5 } ]
[]
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_", "chain", "\\u", "compose", "\\u", "after", "\\u", "inpla", "ce", "\\u", "chain", "\\u", "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, 0, 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...
Module is imported with 'import' and 'import from'
lord63/tldr.py/tests/basic.py
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\nimport os\nfrom os import path\nimport unittest\n\nfrom click.testing import CliRunner\nfrom tldr import cli\nimport mock\n\n\nROOT = path.dirname(path.realpath(__file__))\n\n\n", "metadata": "root", ...
[ { "span": "import os", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 9 } ]
[]
1
true
[ "[CLS]_", "Module_", "is_", "imported_", "with_", "'", "import", "'_", "and_", "'", "import", " ", "from", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "-*-"...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Testing equality to None
sippy/b2bua/sippy/SipRequest.py
[ { "content": " def __init__(self, buf = None, method = None, ruri = None, sipver = 'SIP/2.0', to = None, fr0m = None, via = None, cseq = None, \\\n callid = None, maxforwards = None, body = None, contact = None, routes = (), target = None, cguid = None,\n user_agent = None, ex...
[ { "span": "target == None:", "start_line": 49, "start_column": 11, "end_line": 49, "end_column": 25 }, { "span": "via == None:", "start_line": 58, "start_column": 11, "end_line": 58, "end_column": 22 }, { "span": "to == None:", "start_line": 63, "start_col...
[]
1
true
[ "[CLS]_", "Test", "ing_", "equality", "_", "to_", "None_", "[SEP]_", "class_", "Si", "p", "Request_", "(_", "Si", "p", "Msg_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "buf_", "=_", "N...
[ 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...
Except block handles 'BaseException'
appnexus/schema-tool/schematool/mysql/connector/constants.py
[ { "content": " @classmethod\n def get_desc(cls,name):\n try:\n return cls.desc[name][1]\n except:\n return None", "metadata": "root._constants.get_desc", "header": "['class', '_constants', '(', 'object', ')', ':', '___EOS___']", "index": 49 }, { "con...
[ { "span": "except:", "start_line": 53, "start_column": 8, "end_line": 53, "end_column": 15 }, { "span": "except:", "start_line": 720, "start_column": 10, "end_line": 720, "end_column": 17 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "\\u", "constants_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "classmethod_", "\\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, 0, 1, 1, 2, 2, 2, 2, 2, 2, 4, 2...
First parameter of a method is not named 'self'
RoseOu/flasky/venv/lib/python2.7/site-packages/pygments/lexers/math.py
[ { "content": " def analyse_text(text):\n return shebang_matches(text, r'julia')", "metadata": "root.JuliaLexer.analyse_text", "header": "['class', 'JuliaLexer', '(', 'RegexLexer', ')', ':', '___EOS___']", "index": 137 }, { "content": " def analyse_text(text):\n if re.matc...
[ { "span": "def analyse_text(text):", "start_line": 137, "start_column": 4, "end_line": 137, "end_column": 27 }, { "span": "def analyse_text(text):", "start_line": 370, "start_column": 4, "end_line": 370, "end_column": 27 }, { "span": "def analyse_text(text):", ...
[]
1
true
[ "[CLS]_", "First_", "parameter_", "of_", "a_", "method_", "is_", "not_", "named_", "'", "self", "'_", "[SEP]_", "class_", "Juli", "a", "Lexer_", "(_", "Rege", "x", "Lexer_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "analyse", "\\u",...
[ 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, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0...
Except block handles 'BaseException'
zunzun/pyeq2/Models_2D/Power.py
[ { "content": " def CalculateModelPredictions(self, inCoeffs, inDataCacheDictionary):\n x_in = inDataCacheDictionary['X'] # only need to perform this dictionary look-up once\n \n a = inCoeffs[0]\n b = inCoeffs[1]\n\n try:\n temp = a * numpy.power(x_in, (b/x_in))\n...
[ { "span": "except:", "start_line": 68, "start_column": 8, "end_line": 68, "end_column": 15 }, { "span": "except:", "start_line": 123, "start_column": 8, "end_line": 123, "end_column": 15 }, { "span": "except:", "start_line": 174, "start_column": 8, "en...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Geometr", "ic", "\\u", "Modified_", "(_", "pye", "q2_", "._", "Model", "\\u", "2", "D", "\\u", "Base", "Class_", "._", "Model", "\\u", "2", "D", "\\...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
walac/pyusb/usb/util.py
[ { "content": "# Copyright (C) 2009-2014 Wander Lairson Costa\n#\n# The following terms apply to all files associated\n# with the software unless explicitly disclaimed in individual files.\n#\n# The authors hereby grant permission to use, copy, modify, distribute,\n# and license this software and its documentati...
[ { "span": "import operator", "start_line": 47, "start_column": 0, "end_line": 47, "end_column": 15 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Copy", "right", " ", "(", "C", ")", " ", "200", "9", "-", "2014", " ", "Wan", "der", " ", "La", "irs", "on", " ", "Cost", "a_", "\\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
enthought/pyface/pyface/ui/wx/grid/tests/simple_grid_model_test_case.py
[ { "content": " def test_is_cell_empty(self):\n\n rows = self.model.get_row_count()\n columns = self.model.get_column_count()\n\n self.assertEqual(self.model.is_cell_empty(0,0), True,\n \"Cell containing None should be empty.\")\n self.assertEqual(self.model...
[ { "span": "rows ", "start_line": 64, "start_column": 8, "end_line": 64, "end_column": 12 }, { "span": "columns ", "start_line": 65, "start_column": 8, "end_line": 65, "end_column": 15 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Composit", "e", "Grid", "Model", "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\\...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 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...
Except block handles 'BaseException'
jvns/git-workflow/hello.py
[ { "content": "@app.route('/display/<num>')\ndef display_graph(num=None, sparse=False):\n cursor = g.conn.cursor()\n try:\n cursor.execute(\"SELECT logfile FROM log WHERE id = %s\", (num,));\n history = cursor.fetchone()[0]\n svg = create_svg(history, sparse=sparse)\n if svg is ...
[ { "span": "except:", "start_line": 31, "start_column": 4, "end_line": 31, "end_column": 11 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "app_", "._", "route_", "(_", "'/", "display", "/", "<", "num", ">'_", ")_...
[ 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
saga-project/BigJob/pilot/__init__.py
[ { "content": "''' B{BigJob Documentation}\n\nThis is the BigJob implementation of the Pilot API. Pilot-Jobs (also referred to as\nPilot Compute) decouple system level and application level job management. \n\nThe main concepts and classes exposed by the Compute part of the API are:\n\n - L{PilotCompute} (PC...
[ { "span": "from pilot.impl.pilotcompute_manager import PilotComputeService", "start_line": 111, "start_column": 0, "end_line": 111, "end_column": 63 }, { "span": "from pilot.impl.pilotcompute_manager import PilotCompute", "start_line": 112, "start_column": 0, "end_line": 112,...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "'''", " ", "B", "{", "Big", "Jo", "b", " ", "Document", "ation", "}", "\\", "10", ";", "\\", "10", ";", "Thi", "s", " ", "is", " ", "the", " ", "Big", "Jo", "b", " ...
[ 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'
mrknow/filmkodi/plugin.video.specto/resources/lib/libraries/f4mproxy/F4mProxy.py
[ { "content": " def answer_request(self, sendData):\n global g_stopEvent\n global g_downloader\n try:\n\n #Pull apart request path\n request_path=self.path[1:] \n request_path=re.sub(r\"\\?.*\",\"\",request_path)\n #If a request to stop is...
[ { "span": "except:", "start_line": 206, "start_column": 8, "end_line": 206, "end_column": 15 }, { "span": "except:", "start_line": 239, "start_column": 12, "end_line": 239, "end_column": 19 }, { "span": "except: ", "start_line": 256, "start_column": 8, ...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "My", "Handler_", "(_", "Base", "HTTP", "Request", "Handler_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", ...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
ilastik/ilastik-0.5/ilastik/modules/interactive_console/gui/shellWidget.py
[ { "content": "# -*- python -*-\n#\n# Copyright 2006-2009 - 2008 INRIA - CIRAD - INRA \n#\n# File author(s): Samuel Dufour-Kowalski <samuel.dufour@sophia.inria.fr>\n# Christophe Pradal <christophe.prada@cirad.fr>\n#\n# Distributed under the CeCILL v2 License.\n# See...
[ { "span": "except:", "start_line": 33, "start_column": 0, "end_line": 33, "end_column": 7 }, { "span": "except : ", "start_line": 752, "start_column": 8, "end_line": 752, "end_column": 16 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "python", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\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...
Implicit string concatenation in a list
openstack/stacktach/tests/unit/test_stacky_server.py
[ { "content": " def test_search_with_wrong_field_value_returns_400_error_and_a_message(self):\n fake_request = self.mox.CreateMockAnything()\n fake_request.GET = {'field': 'tenant', 'value': 'tenant'}\n models.RawData.objects.filter(tenant='tenant').AndRaise(FieldError)\n self.mox....
[ { "span": "u\"The requested field\"\n u\" 'tenant' does not exist for the corresponding object.\\nNote: \"\n u\"The field names of database are case-sensitive.\"]", "start_line": 1191, "start_column": 43, "end_line": 1193, "end_column": 58 }, { "span": "\"The requested fiel...
[]
1
true
[ "[CLS]_", "Implicit", "_", "string_", "concate", "nation_", "in_", "a_", "list_", "[SEP]_", "class_", "Stack", "y", "Server", "Test", "Case_", "(_", "Stack", "tach", "Base", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\u...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Variable defined multiple times
RobotLocomotion/director/src/python/director/segmentation.py
[ { "content": "def refitValveAffordance(aff, point1, origin, normal):\n\n xaxis = aff.params['xaxis']\n yaxis = aff.params['yaxis']\n zaxis = aff.params['zaxis']\n origin = aff.params['origin']\n\n zaxis = normal\n xaxis = [0, 0, 1]\n yaxis = np.cross(zaxis, xaxis)\n xaxis = np.cross(yaxi...
[ { "span": "xaxis ", "start_line": 1025, "start_column": 4, "end_line": 1025, "end_column": 9 }, { "span": "yaxis ", "start_line": 1026, "start_column": 4, "end_line": 1026, "end_column": 9 }, { "span": "zaxis ", "start_line": 1027, "start_column": 4, "...
[ { "span": "zaxis ", "start_line": 1030, "start_column": 4, "end_line": 1030, "end_column": 9 }, { "span": "xaxis ", "start_line": 1031, "start_column": 4, "end_line": 1031, "end_column": 9 }, { "span": "yaxis ", "start_line": 1032, "start_column": 4, "...
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "refi", "t", "Val", "ve", "Aff", "orda", "nce_", "(_", "aff", "_", ",_", "point1_", ",_", "origin_", ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2...
Imprecise assert
Demonware/jose/tests.py
[ { "content": " def test_jwe_compression(self):\n local_claims = copy(claims)\n\n for v in xrange(1000):\n local_claims['dummy_' + str(v)] = '0' * 100\n\n jwe = jose.serialize_compact(jose.encrypt(local_claims, rsa_pub_key))\n _, _, _, uncompressed_ciphertext, _ = jwe.sp...
[ { "span": "self.assertTrue(len(compressed_ciphertext) <\n len(uncompressed_ciphertext))", "start_line": 289, "start_column": 8, "end_line": 290, "end_column": 45 }, { "span": "self.assertTrue(len(compressed_ciphertext) <\n len(uncompressed_ciphertext))", ...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "JW", "E_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "jw", "e\\u", "compression_", ...
[ 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
datamade/dedupe/dedupe/training.py
[ { "content": " @staticmethod\n def coveredRecords(blocker, records) :\n CP = predicates.CompoundPredicate\n\n cover = {}\n\n for predicate in blocker.predicates :\n cover[predicate] = {}\n for id, record in viewitems(records) :\n blocks = predicate...
[ { "span": "CP ", "start_line": 199, "start_column": 8, "end_line": 199, "end_column": 10 }, { "span": "CP ", "start_line": 261, "start_column": 8, "end_line": 261, "end_column": 10 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Ded", "upe", "Block", "Learner", "_", "(_", "Block", "Learner", "_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "staticmethod_", "\\u\\u\\uNEWLINE...
[ 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, 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, 2, 2...
Except block handles 'BaseException'
xumiao/pymonk/monk/roles/monitor.py
[ { "content": " def act(self):\n key = self.name\n if not key:\n self.warning(logger, 'no valid tracking name set')\n return\n try:\n value = float(self.get('value'))\n except:\n self.warning(logger, 'no valid value set')\n ret...
[ { "span": "except:", "start_line": 123, "start_column": 8, "end_line": 123, "end_column": 15 }, { "span": "except:", "start_line": 128, "start_column": 8, "end_line": 128, "end_column": 15 }, { "span": "except:", "start_line": 169, "start_column": 8, "...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Track_", "(_", "Task_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "act_", "(_", "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...
Except block handles 'BaseException'
cjlee112/pygr/tests/annotation_dm2_megatest.py
[ { "content": " def test_collectionannot(self):\n 'Test building an AnnotationDB from file'\n from pygr import seqdb, cnestedlist, sqlgraph\n dm2 = pygr.Data.getResource('TEST.Seq.Genome.dm2')\n # BUILD ANNOTATION DATABASE FOR REFSEQ EXONS\n exon_slices = Collection(\n ...
[ { "span": "except:", "start_line": 341, "start_column": 12, "end_line": 341, "end_column": 19 }, { "span": "except:", "start_line": 598, "start_column": 12, "end_line": 598, "end_column": 19 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Build", "\\u", "Test_", "(_", "Pyg", "r", "Build", "NL", "MS", "AM", "ega", "base_", ")_", ":_", "\\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...
Imprecise assert
sahana/eden/modules/unit_tests/s3/s3xml.py
[ { "content": " def testIncludeMaxBounds(self):\n\n xml = current.xml\n\n tree = xml.tree(None, maxbounds=True)\n root = tree.getroot()\n\n attrib = root.attrib\n self.assertEqual(root.tag, xml.TAG.root)\n self.assertEqual(len(attrib), 5)\n self.assertEqual(att...
[ { "span": "self.assertTrue(\"latmin\" in attrib)", "start_line": 48, "start_column": 8, "end_line": 48, "end_column": 43 }, { "span": "self.assertTrue(\"latmax\" in attrib)", "start_line": 49, "start_column": 8, "end_line": 49, "end_column": 43 }, { "span": "self....
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Tree", "Build", "er", "Tests_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\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
lalinsky/acoustid-server/acoustid/data/track.py
[ { "content": "# Copyright (C) 2011 Lukas Lalinsky\n# Distributed under the MIT license, see the LICENSE file for details.\n\nimport logging\nimport uuid\nfrom sqlalchemy import sql\nfrom acoustid import tables as schema, const\nfrom acoustid.data.fingerprint import lookup_fingerprint, insert_fingerprint, inc_fi...
[ { "span": "from acoustid.data.fingerprint import lookup_fingerprint, insert_fingerprint, inc_fingerprint_submission_count, FingerprintSearcher", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 131 }, { "span": "from acoustid.data.musicbrainz import resolve_mbid_redirect"...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Copy", "right", " ", "(", "C", ")", " ", "2011", " ", "Lu", "kas", " ", "La", "lins", "ky_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Distribut", "ed", " ", "under", ...
[ 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
omab/django-social-auth/social_auth/backends/contrib/live.py
[ { "content": "from social.backends.live import LiveOAuth2 as LiveBackend\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "from social.backends.live import LiveOAuth2 as LiveBackend", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 58 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "social", "_", "._", "backends_", "._", "live_", "import_", "Live", "OA", "uth", "2_", "as_", "Live", "Backend_" ]
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
Unreachable code
bchew/dynamodump/dynamodump.py
[ { "content": "def delete_table(conn, sleep_interval, table_name):\n if not args.dataOnly:\n while True:\n # delete table if exists\n table_exist = True\n try:\n conn.delete_table(table_name)\n except boto.exception.JSONResponseError, e:\n if e.body[\"__type\"] == \"com.amaz...
[ { "span": "try:", "start_line": 98, "start_column": 6, "end_line": 98, "end_column": 10 } ]
[]
1
true
[ "[CLS]_", "Unrea", "chab", "le_", "code_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "delete", "\\u", "table_", "(_", "conn_", ",_", "sleep", "\\u", "interval_", ",_", "table",...
[ 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
gdanezis/petlib/petlib/cipher.py
[ { "content": "def test_errors():\n with pytest.raises(Exception) as excinfo:\n aes = Cipher(\"AES-128-XXF\")\n assert 'Unknown' in str(excinfo.value)", "metadata": "root.test_errors", "header": "['module', '___EOS___']", "index": 350 }, { "content": "def test_aes_gcm_encrypt():\...
[ { "span": "aes ", "start_line": 352, "start_column": 8, "end_line": 352, "end_column": 11 }, { "span": "ciphertext ", "start_line": 404, "start_column": 4, "end_line": 404, "end_column": 14 }, { "span": "ciphertext ", "start_line": 418, "start_column": 4, ...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "errors_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "with_", "py...
[ 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, 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...
Unused import
AppScale/appscale/AppServer/google/appengine/ext/preload/__init__.py
[ { "content": "#!/usr/bin/env python\n#\n# Copyright 2007 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U...
[ { "span": "import BaseHTTPServer", "start_line": 49, "start_column": 0, "end_line": 49, "end_column": 21 }, { "span": "import Bastion", "start_line": 50, "start_column": 0, "end_line": 50, "end_column": 14 }, { "span": "import CGIHTTPServer", "start_line": 51,...
[]
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_", "#", " ", "Copy", "right", " ", "2007", " ", "Goo", "gle", ...
[ 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
BD2KGenomics/toil/src/toil/test/src/resourceTest.py
[ { "content": " def _testExternal(self, moduleName, pyFiles):\n dirPath = self._createTempDir()\n pycFiles = set(pyFile + 'c' for pyFile in pyFiles)\n for relPath in pyFiles:\n path = os.path.join(dirPath, relPath)\n mkdir_p(os.path.dirname(path))\n with o...
[ { "span": "self.assertFalse(moduleName in sys.modules)", "start_line": 66, "start_column": 12, "end_line": 66, "end_column": 55 } ]
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Reso", "urc", "e", "Test_", "(_", "To", "il", "Test_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "test", "Exter", "nal_", "(_", "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'
albatrossandco/brubeck_cms/brubeck/blogs/search_indexes.py
[ { "content": " def\tprepare_byline(self, obj):\n try:\n \t return \"%s %s\" % (obj.byline.first_name, obj.byline.last_name)\n except:\n return None", "metadata": "root.EntryIndex.prepare_byline", "header": "['class', 'EntryIndex', '(', 'indexes', '.', 'SearchIndex', ...
[ { "span": "except:", "start_line": 32, "start_column": 8, "end_line": 32, "end_column": 15 }, { "span": "except:", "start_line": 38, "start_column": 8, "end_line": 38, "end_column": 15 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Entr", "y", "Index_", "(_", "indexes_", "._", "Sear", "ch", "Index_", ")_", ":_", "\\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...
Unused local variable
sassoftware/conary/conary_test/localtest/deptabletest.py
[ { "content": " def testGetLocalProvides(self):\n db = self.openDatabase()\n baz = self.addDbComponent(db, 'baz:run', '1', '',\n provides=parseDep('trove:foo:run'))\n foo2 = self.addDbComponent(db, 'foo:run', '2', '',\n provides=parseD...
[ { "span": "baz ", "start_line": 279, "start_column": 8, "end_line": 279, "end_column": 11 }, { "span": "foo2 ", "start_line": 281, "start_column": 8, "end_line": 281, "end_column": 12 }, { "span": "foo1 ", "start_line": 284, "start_column": 8, "end_lin...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Dep", "Table", "Test", "With", "Helper_", "(_", "rep", "help_", "._", "Repos", "itor", "y", "Helper_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ",...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
bndr/pipreqs/tests/test_pipreqs.py
[ { "content": " def test_get_all_imports(self):\n imports = pipreqs.get_all_imports(self.project)\n self.assertEqual(len(imports), 13)\n for item in imports:\n self.assertTrue(\n item.lower() in self.modules, \"Import is missing: \" + item)\n self.assertFa...
[ { "span": "self.assertFalse(\"time\" in imports)", "start_line": 39, "start_column": 8, "end_line": 39, "end_column": 43 }, { "span": "self.assertFalse(\"logging\" in imports)", "start_line": 40, "start_column": 8, "end_line": 40, "end_column": 46 }, { "span": "se...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "Pi", "pre", "qs_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "all", ...
[ 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
hcook/gmm/tests/em_convert_from_pickle_dump_to_csv.py
[ { "content": "import asp.jit.asp_module as asp_module\nimport numpy as np\nfrom em import *\nimport pickle\nimport sys\n\nparam_type_map = {\n 'num_blocks_estep': ('cardinal','variant'),\n 'num_threads_estep': ('cardinal','variant'),\n 'num_threads_mstep': ('cardinal','variant'),\n '...
[ { "span": "import asp.jit.asp_module as asp_module", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 39 }, { "span": "import numpy as np", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 18 }, { "span": "import pickle", "start...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "asp", "_", "._", "jit_", "._", "asp", "\\u", "module_", "as_", "asp", "\\u", "module_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "numpy_", "as_", "np_", "\\u\\u\\uNEWLINE\...
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 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...
Unused import
ustuehler/git-cvs/cvsgit/meta.py
[ { "content": "\"\"\"Metadata for CVSGit about a pair of CVS and Git repositories.\"\"\"\n\nimport os.path\nimport re\nimport sqlite3\n\nfrom cvsgit.changeset import Change, ChangeSet\nfrom cvsgit.i18n import _\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "co...
[ { "span": "import os.path", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 14 }, { "span": "import re", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 9 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\"\"\"", "Meta", "data", " ", "for", " ", "CV", "SG", "it", " ", "abo", "ut", " ", "a", " ", "pair", " ", "of", " ", "CV", "S", " ", "and", " ", "Git", " ", "repos", ...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
ipython/ipython-py3k/IPython/utils/cursesimport.py
[ { "content": "# encoding: utf-8\n\"\"\"\nSee if we have curses.\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (C) 2008-2009 The IPython Development Team\n#\n# Distributed under the terms of the BSD License. The full license is in\n# the file COPYING,...
[ { "span": "import termios", "start_line": 25, "start_column": 4, "end_line": 25, "end_column": 18 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "encoding", ":", " ", "utf", "-", "8_", "\\u\\u\\uNL\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "See", " ", "if", " ", "we", " ", "have", " ", "curse", "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
marcotcr/lime-experiments/load_datasets.py
[ { "content": "import random\nimport os\nimport re\nimport numpy as np\nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom sklearn import linear_model\nfrom sklearn import tree\nfrom sklearn import svm\n# PUT POLARITY DATASET PATH HERE\nPOLARITY_PATH = '/Users/marcotcr/phd/datasets/multi_domain_po...
[ { "span": "from sklearn.feature_extraction.text import CountVectorizer", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 59 }, { "span": "from sklearn import linear_model", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 32 }, { "...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "random_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "re_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "numpy_", "as_", "np_", "\\u\\u\\u...
[ 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, 1, 2, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 2, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
opps/opps/tests/core/permissions/test_models.py
[ { "content": " def test_get_by_user_with_user_permission(self):\n user = User.objects.create(username='john_doe')\n site = Site.objects.all()[0]\n channel = Channel.objects.create(\n name='Home',\n slug='home',\n site=site,\n user=user\n ...
[ { "span": "self.assertTrue(site.pk in result['all_sites_id'])", "start_line": 45, "start_column": 8, "end_line": 45, "end_column": 58 }, { "span": "self.assertTrue(channel.pk in result['channels_id'])", "start_line": 46, "start_column": 8, "end_line": 46, "end_column": 60...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Permi", "ssion", "Model", "Test_", "(_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "get", "\\u", "by", "\\u", "user"...
[ 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
RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/util/compat.py
[ { "content": "# util/compat.py\n# Copyright (C) 2005-2015 the SQLAlchemy authors and contributors\n# <see AUTHORS file>\n#\n# This module is part of SQLAlchemy and is released under\n# the MIT License: http://www.opensource.org/licenses/mit-license.php\n\n\"\"\"Handle Python version/platform incompatibilities.\...
[ { "span": "import threading", "start_line": 12, "start_column": 4, "end_line": 12, "end_column": 20 }, { "span": "import dummy_threading as threading", "start_line": 14, "start_column": 4, "end_line": 14, "end_column": 39 }, { "span": "import pickle", "start_l...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "util", "/", "compa", "t", ".", "py_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Copy", "right", " ", "(", "C", ")", " ", "2005", "-", "201", "5", " ", "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...
Except block handles 'BaseException'
zyrikby/BBoxTester/BBoxTester/main_intents_strategy.py
[ { "content": "'''\nCreated on Nov 26, 2014\n\n@author: Yury Zhauniarovich <y.zhalnerovich{at}gmail.com>\n'''\nimport os, time\n\nfrom interfaces.adb_interface import AdbInterface\nfrom bboxcoverage import BBoxCoverage\nfrom running_strategies import IntentInvocationStrategy\n\nimport smtplib\nimport email.utils...
[ { "span": "except:", "start_line": 114, "start_column": 12, "end_line": 114, "end_column": 19 }, { "span": "except:", "start_line": 119, "start_column": 12, "end_line": 119, "end_column": 19 }, { "span": "except:", "start_line": 124, "start_column": 16, ...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "'''", "\\", "10", ";", "Creat", "ed", " ", "on", " ", "Nov", " ", "2", "6", ",", " ", "2014", "\\", "10", ";", "\\", "1...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
ejeschke/ginga/ginga/misc/plugins/Thumbs.py
[ { "content": " def build_gui(self, container):\n width, height = 300, 300\n cm, im = self.fv.cm, self.fv.im\n\n tg = Viewers.ImageViewCanvas(logger=self.logger)\n tg.configure_window(200, 200)\n tg.enable_autozoom('on')\n tg.set_autocut_params('zscale')\n tg.e...
[ { "span": "width,", "start_line": 78, "start_column": 8, "end_line": 78, "end_column": 13 }, { "span": "height ", "start_line": 78, "start_column": 15, "end_line": 78, "end_column": 21 }, { "span": "cm,", "start_line": 79, "start_column": 8, "end_line"...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Thumb", "s_", "(_", "Gi", "nga", "Plugin_", "._", "Global", "Plugin_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "build", "\\u", "gui_", "(...
[ 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, 0, 2, 0, 2, 2, 2, 2, 2, 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
PyTables/PyTables/tables/tests/test_do_undo.py
[ { "content": " def test00_simple(self):\n \"\"\"Checking simple do/undo.\"\"\"\n\n if common.verbose:\n print('\\n', '-=' * 30)\n print(\"Running %s.test00_simple...\" % self.__class__.__name__)\n\n # open the do/undo\n self.h5file.enable_undo()\n\n # ...
[ { "span": "self.assertTrue(\"/otherarray\" not in self.h5file)", "start_line": 69, "start_column": 8, "end_line": 69, "end_column": 57 }, { "span": "self.assertTrue(\"/otherarray\" in self.h5file)", "start_line": 80, "start_column": 8, "end_line": 80, "end_column": 53 }...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Basic", "Test", "Case_", "(_", "common_", "._", "Temp", "File", "Mixin_", ",_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\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...
Unreachable code
SheffieldML/GPy/GPy/plotting/__init__.py
[ { "content": "def change_plotting_library(lib):\n try:\n #===========================================================================\n # Load in your plotting library here and\n # save it under the name plotting_library!\n # This is hooking the library in\n # for the usage...
[ { "span": "import warnings", "start_line": 32, "start_column": 8, "end_line": 32, "end_column": 23 } ]
[]
1
true
[ "[CLS]_", "Unrea", "chab", "le_", "code_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "change", "\\u", "plott", "ing", "\\u", "library_", "(_", "lib_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "t...
[ 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
VisTrails/VisTrails/contrib/titan/__init__.py
[ { "content": "def package_dependencies():\n import core.packagemanager\n manager = core.packagemanager.get_package_manager()\n\n ret = []\n #if manager.has_package('edu.utah.sci.vistrails.vtk'):\n ret.append('edu.utah.sci.vistrails.vtk')\n #if manager.has_package('edu.utah.sci.vistrails.spread...
[ { "span": "manager ", "start_line": 42, "start_column": 4, "end_line": 42, "end_column": 11 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "package", "\\u", "dependencies_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "import_", "core_", "._", ...
[ 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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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
VisTrails/VisTrails/contrib/cdat/cdat_cell.py
[ { "content": "from PyQt4 import QtCore, QtGui\nfrom core.modules.vistrails_module import Module, ModuleError, NotCacheable\nfrom core.modules.basic_modules import Constant\nfrom packages.spreadsheet.spreadsheet_controller import spreadsheetController\nfrom packages.spreadsheet.spreadsheet_cell import QCellWidge...
[ { "span": "from PyQt4 import QtCore, QtGui", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 31 }, { "span": "from core.modules.basic_modules import Constant", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 47 }, { "span": "from ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "Py", "Qt4_", "import_", "Qt", "Core_", ",_", "Qt", "Gui_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "core_", "._", "modules_", "._", "vist", "rail", "s", "\\u", "module_", ...
[ 4, 4, 4, 4, 4, 2, 2, 0, 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, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1...
Except block handles 'BaseException'
CountZer0/PipelineConstructionSet/python/common/diagnostic/pydevDebug/coverage.py
[ { "content": "#!/usr/bin/python\n#\n# Perforce Defect Tracking Integration Project\n# <http://www.ravenbrook.com/project/p4dti/>\n#\n# COVERAGE.PY -- COVERAGE TESTING\n#\n# Gareth Rees, Ravenbrook Limited, 2001-12-04\n# Ned Batchelder, 2...
[ { "span": "except:", "start_line": 79, "start_column": 0, "end_line": 79, "end_column": 7 }, { "span": "except:", "start_line": 503, "start_column": 8, "end_line": 503, "end_column": 15 }, { "span": "except:", "start_line": 630, "start_column": 8, "end...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "python_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\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...
Imprecise assert
mozilla/inventory/core/service/tests/test_api.py
[ { "content": " def test_import_remove_system(self):\n # export, add one system, assert the sytem was added, remove it, assert\n # it was removed\n sblob = self.get_service(self.s1.iql_stmt())\n\n # create\n s = create_fake_host(hostname='hihihi.mozilla.com')\n\n # ad...
[ { "span": "self.assertTrue(s.hostname in sblob['services'][0]['systems'])", "start_line": 249, "start_column": 8, "end_line": 249, "end_column": 70 }, { "span": "self.assertTrue(self.s1.pk in pk_list)", "start_line": 274, "start_column": 8, "end_line": 274, "end_column": ...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Service", "API", "Tests_", "(_", "Base", "Service", "Tests_", ",_", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "import"...
[ 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
SpriteLink/NIPAP/whoisd/nipap_whoisd.py
[ { "content": "def createDaemon():\n \"\"\"Detach a process from the controlling terminal and run it in the\n background as a daemon.\n \"\"\"\n\n try:\n # Fork a child process so the parent can exit. This returns control to\n # the command-line or shell. It also guarantees that the child wil...
[ { "span": "maxfd ", "start_line": 140, "start_column": 6, "end_line": 140, "end_column": 11 }, { "span": "old_umask ", "start_line": 184, "start_column": 4, "end_line": 184, "end_column": 13 } ]
[]
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_", "create", "Daemon_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "\"\"\"", "Det...
[ 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
Esri/ops-server-config/Publish/Portal/PortalContentPost.py
[ { "content": "#------------------------------------------------------------------------------\n# Copyright 2014 Esri\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://...
[ { "span": "import portalpy", "start_line": 29, "start_column": 0, "end_line": 29, "end_column": 15 }, { "span": "import types", "start_line": 32, "start_column": 0, "end_line": 32, "end_column": 12 }, { "span": "import shutil", "start_line": 33, "start_col...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#-", "--------------", "--------------", "--------------", "--------------", "--------------", "-------", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Copy", "right", " ", "2014", " ", "Es",...
[ 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
VisTrails/VisTrails/contrib/NumSciPy/ArrayPlot.py
[ { "content": " def compute(self):\n data = self.get_input(\"Data Array\")\n da_ar = data.get_array().squeeze()\n if da_ar.ndim != 2:\n raise ModuleError(\"Input Data Array must have dimension = 2\")\n\n aspect_ratio = self.force_get_input(\"Aspect Ratio\")\n colo...
[ { "span": "s ", "start_line": 90, "start_column": 8, "end_line": 90, "end_column": 9 }, { "span": "s ", "start_line": 181, "start_column": 8, "end_line": 181, "end_column": 9 }, { "span": "s ", "start_line": 423, "start_column": 8, "end_line": 423, ...
[]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "class_", "Array", "Image_", "(_", "Array", "Plot_", ",_", "Module_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "compute_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLI...
[ 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
yhat/ggplot/ggplot/tests/test_legend.py
[ { "content": "from __future__ import (absolute_import, division, print_function,\n unicode_literals)\n\nfrom . import get_assert_same_ggplot, cleanup, assert_same_elements\nassert_same_ggplot = get_assert_same_ggplot(__file__)\n\n\nfrom nose.tools import (assert_true, assert_raises, asser...
[ { "span": "from nose.tools import (assert_true, assert_raises, assert_is,\n assert_is_not, assert_equal)", "start_line": 7, "start_column": 0, "end_line": 8, "end_column": 52 }, { "span": "import six", "start_line": 12, "start_column": 0, "end_line": 12...
[]
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_", ",_", "division_", ",_", "print", "\\u", "function_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "unicode", ...
[ 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
ReactiveX/RxPY/tests/test_observable/test_singleordefault.py
[ { "content": "import unittest\n\nfrom rx.observable import Observable\nfrom rx.testing import TestScheduler, ReactiveTest\nfrom rx.disposables import Disposable, SerialDisposable\n\non_next = ReactiveTest.on_next\non_completed = ReactiveTest.on_completed\non_error = ReactiveTest.on_error\nsubscribe = ReactiveTe...
[ { "span": "from rx.observable import Observable", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 36 }, { "span": "from rx.disposables import Disposable, SerialDisposable", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 55 } ]
[]
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_", "rx_", "._", "observable_", "import_", "Observable_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "rx_", "._",...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
`__iter__` method returns a non-iterator
CGATOxford/cgat/CGAT/CSV.py
[ { "content": "class CommentStripper:\n \"\"\"Iterator for stripping comments from file.\n\n This iterator will skip any lines beginning with ``#``\n or any empty lines at the beginning of the output.\n \"\"\"\n\n\n", "metadata": "root.CommentStripper", "header": "['module', '___EOS___']", ...
[ { "span": "class CommentStripper:", "start_line": 68, "start_column": 0, "end_line": 68, "end_column": 22 }, { "span": "class UnicodeCsvReader(object):", "start_line": 104, "start_column": 0, "end_line": 104, "end_column": 31 }, { "span": "class DictReaderLarge:",...
[ { "span": "def __iter__(self):", "start_line": 78, "start_column": 4, "end_line": 78, "end_column": 23 }, { "span": "def __iter__(self):", "start_line": 110, "start_column": 4, "end_line": 110, "end_column": 23 }, { "span": "def __iter__(self):", "start_line":...
1
false
[ "[CLS]_", "`_", "\\u\\u", "iter\\u\\u_", "`_", "method_", "returns_", "a_", "non", "_", "-_", "iterator_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Comme", "nt", "Strip", "...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
gawel/panoramisk/panoramisk/utils.py
[ { "content": "def agi_code_check(code, response, line):\n \"\"\"\n Check the AGI code and return a dict to help on error handling.\n \"\"\"\n result = {'status_code': code, 'result': ('', ''), 'msg': ''}\n if code == 200:\n for key, value, data in re_kv.findall(response):\n resu...
[ { "span": "usage ", "start_line": 84, "start_column": 8, "end_line": 84, "end_column": 13 } ]
[]
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_", "agi", "\\u", "code", "\\u", "check_", "(_", "code_", ",_", "response_", ",_", "line_", ")_", ":_", "\\u\\u\\uN...
[ 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
AppScale/appscale/AppServer/lib/django-1.2/django/contrib/gis/tests/test_spatialrefsys.py
[ { "content": "import unittest\n\nfrom django.db import connection\nfrom django.contrib.gis.tests.utils import mysql, no_mysql, oracle, postgis, spatialite\n\ntest_srs = ({'srid' : 4326,\n 'auth_name' : ('EPSG', True),\n 'auth_srid' : 4326,\n 'srtext' : 'GEOGCS[\"WGS 84\",DATU...
[ { "span": "from django.contrib.gis.tests.utils import mysql, no_mysql, oracle, postgis, spatialite", "start_line": 3, "start_column": 0, "end_line": 3, "end_column": 87 } ]
[]
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_", "django_", "._", "db_", "import_", "connection_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._",...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Implicit string concatenation in a list
aws/aws-cli/tests/unit/customizations/emr/test_emrfs_utils.py
[ { "content": " def test_cse_kms(self):\n emrfs_option_value = 'Encryption=ClientSide,ProviderType=KMS,' \\\n 'KMSKeyId=my_key'\n expected_emrfs_ba_key_values = [\n 'fs.s3.cse.enabled=true', 'fs.s3.cse.encryptionMaterialsProvider='\n 'com.amazon.ws.emr.hadoop.fs....
[ { "span": "'fs.s3.cse.encryptionMaterialsProvider='\n 'com.amazon.ws.emr.hadoop.fs.cse.KMSEncryptionMaterialsProvider',", "start_line": 134, "start_column": 38, "end_line": 135, "end_column": 76 }, { "span": "'fs.s3.cse.encryptionMaterialsProvider='\n 'my_class'", ...
[]
1
true
[ "[CLS]_", "Implicit", "_", "string_", "concate", "nation_", "in_", "a_", "list_", "[SEP]_", "class_", "Test", "Em", "rf", "s", "Utils_", "(_", "Base", "AW", "SC", "ommand", "Param", "s", "Test_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
`__eq__` not overridden when adding attributes
AppScale/appscale/AppServer/lib/mox/mox.py
[ { "content": "class MockAnything:\n \"\"\"A mock that can be used to mock anything.\n\n This is helpful for mocking classes that do not provide a public interface.\n \"\"\"\n\n\n\n\n\n\n\n\n\n\n", "metadata": "root.MockAnything", "header": "['module', '___EOS___']", "index": 409 }, { "con...
[ { "span": "class _MockObjectFactory(MockObject):", "start_line": 771, "start_column": 0, "end_line": 771, "end_column": 37 }, { "span": "class IsA(Comparator):", "start_line": 1221, "start_column": 0, "end_line": 1221, "end_column": 22 }, { "span": "class IsAlmost...
[ { "span": "def __eq__(self, rhs):", "start_line": 607, "start_column": 2, "end_line": 607, "end_column": 24 }, { "span": "self._mox ", "start_line": 786, "start_column": 4, "end_line": 786, "end_column": 13 }, { "span": "self._instance_queue ", "start_line": 7...
1
false
[ "[CLS]_", "`_", "\\u\\u", "eq\\u\\u_", "`_", "not_", "overrid", "den_", "when_", "addin", "g_", "attributes_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "class_", "Moc", "k", "Any", "t...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unnecessary pass
cloudera/hue/desktop/core/ext-py/guppy-0.1.10/guppy/heapy/test/test_heapyc.py
[ { "content": " def test_1(self):\n\timport gc\n\tfrom sys import getrefcount as grc\n\n\tsupport.TestCase.setUp(self)\n\tsets = self.guppy.sets\n\theapdefs = getattr(sets.setsc, '_NyHeapDefs_'),\n\troot = []\n\theapyc = self.guppy.heapy.heapyc\n\tnodeset = sets.mutnodeset\n\tnodegraph = heapyc.NodeGraph\n\t\...
[ { "span": "pass", "start_line": 265, "start_column": 5, "end_line": 265, "end_column": 9 }, { "span": "pass", "start_line": 269, "start_column": 5, "end_line": 269, "end_column": 9 } ]
[]
1
true
[ "[CLS]_", "Un", "necessar", "y_", "pass_", "[SEP]_", "class_", "Test", "Leak", "_", "(_", "support_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "test\\u", "1_", "(_", "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...