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
Except block handles 'BaseException'
aerospike/aerospike-admin/lib/logcontroller.py
[ { "content": " @CommandHelp(\n 'Displays network information for Aerospike.')\n def do_network(self, line):\n network_infos = self.logger.infoSummary(stanza='network')\n service_infos = self.logger.infoSummary(stanza='service')\n network_stats = self.logger.infoStatistics(stanz...
[ { "span": "except:", "start_line": 125, "start_column": 16, "end_line": 125, "end_column": 23 }, { "span": "except:", "start_line": 130, "start_column": 16, "end_line": 130, "end_column": 23 }, { "span": "except:", "start_line": 147, "start_column": 16, ...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Info", "Controller_", "(_", "Command", "Controller_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "Command", "...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
nextml/NEXT/next/api/tests/test_api_dueling_multiprocessing.py
[ { "content": "import numpy\nimport numpy.random\nimport random\nimport json\nimport time\nfrom datetime import datetime\nimport requests\nfrom scipy.linalg import norm\nimport time\nfrom multiprocessing import Pool\n\n\nimport os\nHOSTNAME = os.environ.get('NEXT_BACKEND_GLOBAL_HOST', 'localhost')+':'+os.environ...
[ { "span": "from scipy.linalg import norm", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 29 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "numpy_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "numpy_", "._", "random_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "random_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "json_", "\...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Testing equality to None
nlloyd/SubliminalCollaborator/libs/twisted/web/client.py
[ { "content": " def __init__(self, url, fileOrName,\n method='GET', postdata=None, headers=None,\n agent=\"Twisted client\", supportPartial=0,\n timeout=0, cookies=None, followRedirect=1,\n redirectLimit=20, afterFoundGet=False):\n self.re...
[ { "span": "headers == None:", "start_line": 438, "start_column": 23, "end_line": 438, "end_column": 38 } ]
[]
1
true
[ "[CLS]_", "Test", "ing_", "equality", "_", "to_", "None_", "[SEP]_", "class_", "HTTP", "Downloader_", "(_", "HTTP", "Client", "Factory_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "url_", "...
[ 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Testing equality to None
VisTrails/VisTrails/contrib/cdat/scripts/cdat_domain.py
[ { "content": " def __init__(self, tag=None, doc=None, instance=None, required=False):\n self._name = tag\n self._doc = doc\n self._instance = [i.strip(\" \\t\\n\") for i in instance.split('/')]\n self._valid_instances = []\n if required == None:\n self._required ...
[ { "span": "required == None:", "start_line": 226, "start_column": 11, "end_line": 226, "end_column": 27 }, { "span": "type == None ", "start_line": 241, "start_column": 15, "end_line": 241, "end_column": 27 }, { "span": "type == None:", "start_line": 243, ...
[]
1
true
[ "[CLS]_", "Test", "ing_", "equality", "_", "to_", "None_", "[SEP]_", "class_", "CD", "ATI", "tem_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "def_", "\\u\\u", "init\\u\\u_", "(_", "self_", ",_", "tag_", "=_", ...
[ 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...
Variable defined multiple times
django-bmf/django-bmf/djangobmf/core/site.py
[ { "content": " def get_urls(self):\n\n from djangobmf.urls import urlpatterns\n\n try:\n ct = ContentType.objects.get_for_model(Configuration)\n self.activate()\n except RuntimeError:\n # During the migrate command, contenttypes are not ready\n ...
[ { "span": "ct ", "start_line": 183, "start_column": 12, "end_line": 183, "end_column": 14 } ]
[ { "span": "ct ", "start_line": 193, "start_column": 12, "end_line": 193, "end_column": 14 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "class_", "Site_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "urls_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLIN...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
chinoogawa/fbht/mainFunc.py
[ { "content": "def set_dtsg():\n n = 0\n flag = False\n try:\n response = br.open('https://www.facebook.com/')\n ''' Old dtsg set module.. \n for form in br.forms():\n for control in form.controls: \n if control.name == 'fb_dtsg':\n flag ...
[ { "span": "n ", "start_line": 98, "start_column": 4, "end_line": 98, "end_column": 5 }, { "span": "flag ", "start_line": 99, "start_column": 4, "end_line": 99, "end_column": 8 }, { "span": "state ", "start_line": 1630, "start_column": 20, "end_line": 1...
[]
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_", "set\\u", "dt", "sg_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 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...
Imprecise assert
ganeti/ganeti/test/py/ganeti.rapi.testutils_unittest.py
[ { "content": " def testGetInfo(self):\n self.assertTrue(self.cl.GetInfo() is NotImplemented)", "metadata": "root.TestInputTestClient.testGetInfo", "header": "['class', 'TestInputTestClient', '(', 'unittest', '.', 'TestCase', ')', ':', '___EOS___']", "index": 135 }, { "content": " def te...
[ { "span": "self.assertTrue(self.cl.GetInfo() is NotImplemented)", "start_line": 136, "start_column": 4, "end_line": 136, "end_column": 56 }, { "span": "self.assertTrue(result is NotImplemented)", "start_line": 141, "start_column": 4, "end_line": 141, "end_column": 45 },...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "Inp", "ut", "Test", "Client_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test", "Get", "Info_...
[ 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Variable defined multiple times
benadida/helios-server/helios/views.py
[ { "content": "@election_view()\ndef one_election_view(request, election):\n user = get_user(request)\n admin_p = security.user_can_admin_election(user, election)\n can_feature_p = security.user_can_feature_election(user, election)\n \n notregistered = False\n eligible_p = True\n \n election_url = get_el...
[ { "span": "status_update_message ", "start_line": 316, "start_column": 6, "end_line": 316, "end_column": 27 }, { "span": "status_update_message ", "start_line": 318, "start_column": 6, "end_line": 318, "end_column": 27 } ]
[ { "span": "status_update_message ", "start_line": 322, "start_column": 4, "end_line": 322, "end_column": 25 } ]
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_", "@_", "election", "\\u", "view_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "one", "\\u", "election", "\\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
nims11/hostapd.py/HPS.py
[ { "content": "#!/usr/bin/env python2.7\nimport subprocess, config, sys, config_gen, shlex, os, errno\nfrom time import sleep\nfrom common_methods import exit_script, exit_error\nfrom config_hostapd import generate_confs\n\n\n\t\t\n\n\n", "metadata": "root", "header": "['module', '___EOS___']", "inde...
[ { "span": "import subprocess, config, sys, config_gen, shlex, os, errno", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 60 }, { "span": "from common_methods import exit_script, exit_error", "start_line": 3, "start_column": 0, "end_line": 3, "end_column"...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python", "2.7", "_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "subprocess_", ",_", "config_", ",_", "sys_", ",_", "config", "\\u", "ge...
[ 4, 4, 4, 4, 4, 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, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
tuturto/pyherc/src/pyherc/test/unit/test_pathfinding.py
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2010-2015 Tuukka Turto\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitat...
[ { "span": "from random import Random", "start_line": 25, "start_column": 0, "end_line": 25, "end_column": 25 }, { "span": "from mockito import mock", "start_line": 28, "start_column": 0, "end_line": 28, "end_column": 24 }, { "span": "from pyherc.config.dsl import ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "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...
Except block handles 'BaseException'
lg/murder/dist/BitTornado/zurllib.py
[ { "content": " def connect(self):\n HTTPConnection.connect(self)\n try:\n self.sock.settimeout(30)\n except:\n pass", "metadata": "root.btHTTPcon.connect", "header": "['class', 'btHTTPcon', '(', 'HTTPConnection', ')', ':', '# attempt to add automatic connect...
[ { "span": "except:", "start_line": 21, "start_column": 8, "end_line": 21, "end_column": 15 }, { "span": "except:", "start_line": 29, "start_column": 8, "end_line": 29, "end_column": 15 }, { "span": "except:", "start_line": 67, "start_column": 12, "end_...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "bt", "HTTP", "con_", "(_", "HTTP", "Connection_", ")_", ":_", "#", " ", "atte", "mpt", " ", "to", " ", "add", " ", "automati", "c", " ", "connecti",...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Variable defined multiple times
OpenMDAO/OpenMDAO/openmdao/core/problem.py
[ { "content": " def _check_input_diffs(self, connections, params_dict, unknowns_dict):\n \"\"\"For all sets of connected inputs, find any differences in units\n or initial value.\n \"\"\"\n # loop over all dangling inputs\n for tgt, connected_inputs in iteritems(self._input_...
[ { "span": "sname,", "start_line": 287, "start_column": 24, "end_line": 287, "end_column": 29 }, { "span": "s ", "start_line": 287, "start_column": 31, "end_line": 287, "end_column": 32 }, { "span": "tname,", "start_line": 288, "start_column": 24, "end_...
[]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "class_", "Problem_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "check", "\\u", "input", "\\u", "diffs_", "(_", "self_",...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
tanghaibao/jcvi/apps/ks.py
[ { "content": "def find_synonymous(input_file, work_dir):\n \"\"\"Run yn00 to find the synonymous subsitution rate for the alignment.\n \"\"\"\n # create the .ctl file\n ctl_file = op.join(work_dir, \"yn-input.ctl\")\n output_file = op.join(work_dir, \"nuc-subs.yn\")\n ctl_h = open(ctl_file, \"...
[ { "span": "r,", "start_line": 560, "start_column": 4, "end_line": 560, "end_column": 5 }, { "span": "e ", "start_line": 560, "start_column": 7, "end_line": 560, "end_column": 8 }, { "span": "stdout,", "start_line": 663, "start_column": 4, "end_line": 6...
[]
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_", "find", "\\u", "synonym", "ous_", "(_", "input", "\\u", "file_", ",_", "work", "\\u", "dir_", ")_", ":_", "\\...
[ 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
saltstack/salt/tests/integration/modules/disk.py
[ { "content": " def test_usage(self):\n '''\n disk.usage\n '''\n ret = self.run_function('disk.usage')\n self.assertTrue(isinstance(ret, dict))\n if not isinstance(ret, dict):\n return\n if salt.utils.is_darwin():\n for key, val in six.ite...
[ { "span": "self.assertTrue('filesystem' in val)", "start_line": 57, "start_column": 16, "end_line": 57, "end_column": 52 }, { "span": "self.assertTrue('512-blocks' in val)", "start_line": 58, "start_column": 16, "end_line": 58, "end_column": 52 }, { "span": "self....
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Disk", "Modul", "e", "Test_", "(_", "integration_", "._", "Modul", "e", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "test\\u", "usage_", "(_", "self_", ")_", ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
STIXProject/python-stix/stix/bindings/ttp.py
[ { "content": " def exportChildren(self, lwrite, level, nsmap, namespace_=XML_NS, name_='ToolsType', fromsubclass_=False, pretty_print=True):\n if pretty_print:\n eol_ = '\\n'\n else:\n eol_ = ''\n for Tool_ in self.Tool:\n Tool_.export(lwrite, level, nsma...
[ { "span": "eol_ ", "start_line": 625, "start_column": 12, "end_line": 625, "end_column": 16 }, { "span": "eol_ ", "start_line": 627, "start_column": 12, "end_line": 627, "end_column": 16 }, { "span": "eol_ ", "start_line": 690, "start_column": 12, "end...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Tool", "s", "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_", "(_", "self_...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
openstack/horizon/openstack_dashboard/api/keystone.py
[ { "content": "def user_update(request, user, **data):\n manager = keystoneclient(request, admin=True).users\n error = None\n\n if not keystone_can_edit_user():\n raise keystone_exceptions.ClientException(\n 405, _(\"Identity service does not allow editing user data.\"))\n\n # The v...
[ { "span": "user ", "start_line": 444, "start_column": 12, "end_line": 444, "end_column": 16 } ]
[]
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_", "user", "\\u", "update_", "(_", "request_", ",_", "user_", ",_", "**_", "data_", ")_", ":_", "\\u\\u\\uNEWLINE\\u...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
catap/namebench/cocoa/main.py
[ { "content": "# Copyright 2009 Google Inc. All Rights Reserved.\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# Unles...
[ { "span": "import objc", "start_line": 24, "start_column": 0, "end_line": 24, "end_column": 11 }, { "span": "import Foundation", "start_line": 25, "start_column": 0, "end_line": 25, "end_column": 17 }, { "span": "import AppKit", "start_line": 26, "start_co...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Copy", "right", " ", "200", "9", " ", "Goo", "gle", " ", "Inc", ".", " ", "All", " ", "Rig", "hts", " ", "Reserve", "d", "._", "\\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 import
open-cloud/xos/xos/api/tenant/cord/subscriber.py
[ { "content": "from rest_framework.decorators import api_view\nfrom rest_framework.response import Response\nfrom rest_framework.reverse import reverse\nfrom rest_framework import serializers\nfrom rest_framework import generics\nfrom rest_framework import viewsets\nfrom rest_framework import status\nfrom rest_f...
[ { "span": "from rest_framework.decorators import api_view", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 46 }, { "span": "from rest_framework.reverse import reverse", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 42 }, { "spa...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "rest", "\\u", "framework_", "._", "decorators_", "import_", "api", "\\u", "view_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "rest", "\\u", "framework_", "._", "response_", "impo...
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 0, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2...
Module is imported with 'import' and 'import from'
quantopian/zipline/tests/test_algorithm.py
[ { "content": "#\n# Copyright 2014 Quantopian, 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# Unless required by ...
[ { "span": "import datetime", "start_line": 15, "start_column": 0, "end_line": 15, "end_column": 15 } ]
[]
1
true
[ "[CLS]_", "Module_", "is_", "imported_", "with_", "'", "import", "'_", "and_", "'", "import", " ", "from", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Copy", "right", " ", "2014", " ", "Quant", "opi", "a...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
tvidas/a5/scripts/bin/control.py
[ { "content": "def kick_adb():\n\tname = multiprocessing.current_process().name\n\tADBKICK = \"%s/adb kill-server\"\n\t#whatever the next issue of adb is, it will automatically start the server again\n\tcmd = ADBKICK % ( ADBPATH )\n\tlogger.info( name + \":\" + cmd)\n\ttry:\n\t\targs = shlex.split(cmd)\n\t\tpKic...
[ { "span": "except:", "start_line": 195, "start_column": 1, "end_line": 195, "end_column": 8 }, { "span": "except:", "start_line": 313, "start_column": 2, "end_line": 313, "end_column": 9 }, { "span": "except:", "start_line": 327, "start_column": 2, "en...
[]
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_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "kick", "\\u", "adb_", "...
[ 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/pdf_file_object.py
[ { "content": " def exportChildren(self, lwrite, level, namespace_='PDFFileObj:', name_='PDFXRefTableListType', fromsubclass_=False, pretty_print=True):\n if pretty_print:\n eol_ = '\\n'\n else:\n eol_ = ''\n for Cross_Reference_Table_ in self.Cross_Reference_Table:\...
[ { "span": "eol_ ", "start_line": 58, "start_column": 12, "end_line": 58, "end_column": 16 }, { "span": "eol_ ", "start_line": 60, "start_column": 12, "end_line": 60, "end_column": 16 }, { "span": "eol_ ", "start_line": 133, "start_column": 12, "end_lin...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "PD", "FX", "Ref", "Table", "List", "Type_", "(_", "Generate", "ds", "Super", "_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "export", ...
[ 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
ReactiveX/RxPY/tests/test_observable/test_interval.py
[ { "content": "import unittest\nfrom datetime import datetime, timedelta\n\nfrom rx import Observable\nfrom rx.testing import TestScheduler, ReactiveTest, is_prime, MockDisposable\nfrom rx.disposables import Disposable, SerialDisposable\nfrom rx.subjects import Subject\n\non_next = ReactiveTest.on_next\non_compl...
[ { "span": "from rx.testing import TestScheduler, ReactiveTest, is_prime, MockDisposable", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 76 }, { "span": "from rx.disposables import Disposable, SerialDisposable", "start_line": 5, "start_column": 0, "end_line"...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "unittest_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "datetime_", "import_", "datetime_", ",_", "timedelta_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "rx_", "i...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1...
Imprecise assert
ufora/ufora/ufora/cumulus/test/TestBase.py
[ { "content": " @Teardown.Teardown\n def test_vectorOfPagedVectorApplyWithDropping(self):\n self.desirePublisher.desireNumberOfWorkers(3, blocking=True)\n expr = FORA.extractImplValContainer(\n FORA.eval(\n \"\"\"fun() {\n let v =\n ...
[ { "span": "self.assertTrue(response is not None)", "start_line": 278, "start_column": 8, "end_line": 278, "end_column": 45 }, { "span": "self.assertTrue(response is not None)", "start_line": 316, "start_column": 8, "end_line": 316, "end_column": 45 }, { "span": "s...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Cum", "ulus", "Test", "Cases_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "Tea", "rdo", "wn_", "._", "Tea", "rdo", "wn_", "\\u\...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Variable defined multiple times
nextml/NEXT/next/apps/PoolBasedTripletMDS/PoolBasedTripletMDS.py
[ { "content": " def daemonProcess(self,exp_uid,args_json,db,ell):\n try:\n\n app_id = self.app_id\n\n log_entry = { 'exp_uid':exp_uid,'task':'daemonProcess','json':args_json,'timestamp':utils.datetimeNow() } \n ell.log( app_id+':APP-CALL', log_entry )\n\n # convert args_json to args_dict...
[ { "span": "log_entry ", "start_line": 61, "start_column": 6, "end_line": 61, "end_column": 15 }, { "span": "didSucceed,", "start_line": 106, "start_column": 6, "end_line": 106, "end_column": 16 }, { "span": "message ", "start_line": 106, "start_column": 17...
[ { "span": "log_entry ", "start_line": 70, "start_column": 6, "end_line": 70, "end_column": 15 }, { "span": "log_entry ", "start_line": 77, "start_column": 6, "end_line": 77, "end_column": 15 }, { "span": "didSucceed,", "start_line": 150, "start_column": 6,...
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "class_", "Poo", "l", "Base", "d", "Triple", "t", "MD", "S_", "(_", "App", "Prototype", "_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "daem...
[ 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
openstack/tooz/tooz/tests/test_coordination.py
[ { "content": " def test_create_group(self):\n self._coord.create_group(self.group_id).get()\n all_group_ids = self._coord.get_groups().get()\n self.assertTrue(self.group_id in all_group_ids)", "metadata": "root.TestAPI.test_create_group", "header": "['class', 'TestAPI', '(', 'tes...
[ { "span": "self.assertTrue(self.group_id in all_group_ids)", "start_line": 105, "start_column": 8, "end_line": 105, "end_column": 55 }, { "span": "self.assertTrue(group_id in created_groups)", "start_line": 140, "start_column": 12, "end_line": 140, "end_column": 55 }, ...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "API_", "(_", "tests", "cen", "ario", "s_", "._", "Test", "With", "Scen", "ario", "s_", ",_", "\\u\\u\\uNL\\u\\u\\u_", "tests_", "._", "Test", "Case", "Ski", "p", "Not", "Implemented_", ...
[ 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
RobotWebTools/rosbridge_suite/rosbridge_server/src/tornado/test/simple_httpclient_test.py
[ { "content": " def test_singleton(self):\n # Class \"constructor\" reuses objects on the same IOLoop\n self.assertTrue(SimpleAsyncHTTPClient(self.io_loop) is\n SimpleAsyncHTTPClient(self.io_loop))\n # unless force_instance is used\n self.assertTrue(SimpleAsy...
[ { "span": "self.assertTrue(SimpleAsyncHTTPClient(self.io_loop) is\n SimpleAsyncHTTPClient(self.io_loop))", "start_line": 147, "start_column": 8, "end_line": 148, "end_column": 60 }, { "span": "self.assertTrue(SimpleAsyncHTTPClient(self.io_loop) is not\n ...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Simple", "HTTP", "Client", "Test", "Mixin_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "singleton_", "(_", "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, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Unused import
nitishsrivastava/deepnet/deepnet/examples/multimodal_dbn/merge_dataset_pb.py
[ { "content": "from deepnet import util\nfrom deepnet import deepnet_pb2\nimport sys, os\nfrom google.protobuf import text_format\n\nproto1 = sys.argv[1]\nproto2 = sys.argv[2]\noutput_pbtxt = sys.argv[3]\n\nout_dir = '/'.join(output_pbtxt.split('/')[:-1])\nif out_dir and not os.path.isdir(out_dir):\n os.makedir...
[ { "span": "from deepnet import deepnet_pb2", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 31 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "deep", "net_", "import_", "util_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "deep", "net_", "import_", "deep", "net", "\\u", "pb2_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "sys_...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/container.py
[ { "content": " @rbac(('owner', 'user'))\n def set(self, path, value):\n \"\"\"Set the value of the Variable specified by the given path, which\n may contain '.' characters. The Variable will be set to the given\n value, subject to validation and constraints.\n \"\"\"\n _...
[ { "span": "_local_setter_ ", "start_line": 1003, "start_column": 8, "end_line": 1003, "end_column": 22 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Container_", "(_", "Safe", "Has", "Trait", "s_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "@_", "rbac", "_", "(_", "(_", "'", "owner", "'_", ",_...
[ 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
RobotLocomotion/director/src/python/director/doordemo.py
[ { "content": "import os\nimport sys\nimport vtkAll as vtk\nimport math\nimport time\nimport types\nimport functools\nimport numpy as np\n\nfrom director import transformUtils\nfrom director import lcmUtils\nfrom director.timercallback import TimerCallback\nfrom director.asynctaskqueue import AsyncTaskQueue\nfro...
[ { "span": "import os", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 9 }, { "span": "import sys", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 10 }, { "span": "import time", "start_line": 4, "start_column": 0, "en...
[]
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_", "vtk", "All_", "as_", "vtk_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "math_", "\\...
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1...
Variable defined multiple times
statsmodels/statsmodels/statsmodels/nonparametric/smoothers_lowess_old.py
[ { "content": "def lowess(endog, exog, frac=2./3, it=3):\n \"\"\"\n LOWESS (Locally Weighted Scatterplot Smoothing)\n\n A lowess function that outs smoothed estimates of endog\n at the given exog values from points (exog, endog)\n\n Parameters\n ----------\n endog: 1-D numpy array\n T...
[ { "span": "fitted ", "start_line": 105, "start_column": 4, "end_line": 105, "end_column": 10 } ]
[ { "span": "fitted,", "start_line": 113, "start_column": 4, "end_line": 113, "end_column": 10 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "lowe", "ss_", "(_", "endo", "g_", ",_", "exo", "g_", ",_", "frac_", "=_", "2._", "/_", "3_", ",_", "it_", "=_", "3_", ")_...
[ 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
viewfinderco/viewfinder/backend/www/service.py
[ { "content": "# Copyright 2011 Viewfinder Inc. All Rights Reserved.\n\n\"\"\"Handler for Viewfinder service RPCs.\n\n - ServiceHandler: web request handler for REST API.\n\"\"\"\n\n__authors__ = ['spencer@emailscrubbed.com (Spencer Kimball)',\n 'andy@emailscrubbed.com (Andy Kimball)']\n\nimport b...
[ { "span": "import validictory", "start_line": 15, "start_column": 0, "end_line": 15, "end_column": 18 }, { "span": "from viewfinder.backend.base import constants, counters, handler, secrets, util", "start_line": 21, "start_column": 0, "end_line": 21, "end_column": 79 } ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Copy", "right", " ", "2011", " ", "View", "finde", "r", " ", "Inc", ".", " ", "All", " ", "Rig", "hts", " ", "Reserve", "d", "._", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
mozilla/inventory/mozdns/view/migrations/0001_initial.py
[ { "content": "# -*- coding: utf-8 -*-\nimport datetime\nfrom south.db import db\nfrom south.v2 import SchemaMigration\nfrom django.db import models\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class Migration(SchemaMigration):\n\n\n\n\n\n mode...
[ { "span": "import datetime", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 15 }, { "span": "from django.db import models", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 28 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "import_", "datetime_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "south_", "...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
dokterbob/satchmo/satchmo/apps/shipping/modules/canadapost/shipper.py
[ { "content": "'''\nCanada Post Shipping Module\nv0.1.1\n'''\n\n# Note, make sure you use decimal math everywhere!\nfrom decimal import Decimal\nfrom django.core.cache import cache\nfrom django.template import loader, Context\nfrom django.utils.safestring import mark_safe \nfrom django.utils.translation import u...
[ { "span": "from django.utils.safestring import mark_safe ", "start_line": 9, "start_column": 0, "end_line": 9, "end_column": 45 }, { "span": "from xml.etree.ElementTree import fromstring, tostring", "start_line": 18, "start_column": 4, "end_line": 18, "end_column": 58 }...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "'''", "\\", "10", ";", "Cana", "da", " ", "Post", " ", "Ship", "ping", " ", "Modul", "e", "\\", "10", ";", "v", "0.", "1.1", "\\", "10", ";'", "''_", "\\u\\u\\uNEWLINE\\u...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
dcramer/sentry-old/sentry/utils/compat.py
[ { "content": "\"\"\"\nsentry.utils.compat\n~~~~~~~~~~~~~~~~~~~\n\nContains compatibility imports (generally c-module replacements)\n\n:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n\ntry:\n import cPickle as pickle\nexcept ImportE...
[ { "span": "import cPickle as pickle", "start_line": 11, "start_column": 4, "end_line": 11, "end_column": 28 }, { "span": "import pickle", "start_line": 13, "start_column": 4, "end_line": 13, "end_column": 17 }, { "span": "import cmath as math", "start_line": 1...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "sentry", ".", "util", "s", ".", "compa", "t", "\\", "10", ";", "~~~~~~~~~~~", "~~~~~", "~~~", "\\", "10", ";", "\\", "10", ";", "Contain", "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...
Variable defined multiple times
AppScale/appscale/AppServer/lib/grizzled/grizzled/db/base.py
[ { "content": " def get_table_metadata(self, table, cursor):\n \"\"\"\n Get the metadata for a table. Returns a list of tuples, one for\n each column. Each tuple consists of the following::\n\n (column_name, type_string, max_char_size, precision, scale, nullable)\n\n The...
[ { "span": "stype ", "start_line": 898, "start_column": 20, "end_line": 898, "end_column": 25 }, { "span": "stype ", "start_line": 900, "start_column": 20, "end_line": 900, "end_column": 25 }, { "span": "stype ", "start_line": 902, "start_column": 20, "...
[ { "span": "stype ", "start_line": 921, "start_column": 16, "end_line": 921, "end_column": 21 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "class_", "DB", "Driver_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "table", "\\u", "metadata_", "(_", "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...
Imprecise assert
amrdraz/kodr/app/brython/www/src/Lib/test/test_richcmp.py
[ { "content": " def checkequal(self, opname, a, b, expres):\n for op in opmap[opname]:\n realres = op(a, b)\n # can't use assertEqual(realres, expres) here\n self.assertEqual(len(realres), len(expres))\n for i in range(len(realres)):\n # result...
[ { "span": "self.assertTrue(realres[i] is expres[i])", "start_line": 108, "start_column": 16, "end_line": 108, "end_column": 56 }, { "span": "self.assertTrue(realres is expres)", "start_line": 165, "start_column": 20, "end_line": 165, "end_column": 54 }, { "span": ...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Vector", "Test_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "checkequal_", "(_"...
[ 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...
Implicit string concatenation in a list
zzzeek/sqlalchemy/test/dialect/postgresql/test_reflection.py
[ { "content": " @classmethod\n def define_tables(cls, metadata):\n from sqlalchemy.testing import config\n dblink = config.file_config.get(\n 'sqla_testing', 'postgres_test_db_link')\n\n testtable = Table(\n 'testtable', metadata,\n Column('id', Integer...
[ { "span": "\"CREATE FOREIGN TABLE test_foreigntable ( \"\n \" id INT, \"\n \" data VARCHAR(30) \"\n \") SERVER test_server OPTIONS (table_name 'testtable')\",", "start_line": 41, "start_column": 12, "end_line": 44, "end_column": 67 }, { ...
[]
1
true
[ "[CLS]_", "Implicit", "_", "string_", "concate", "nation_", "in_", "a_", "list_", "[SEP]_", "class_", "Fore", "ign", "Table", "Reflect", "ion", "Test_", "(_", "fixtures_", "._", "Table", "s", "Test_", ",_", "Assert", "s", "Execut", "ion", "Results_", ")_", ...
[ 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
daeilkim/refinery/refinery/lib/sbd.py
[ { "content": "def get_features(frag, model):\n \"\"\"\n ... w1. (sb?) w2 ...\n Features, listed roughly in order of importance:\n\n (1) w1: word that includes a period\n (2) w2: the next word, if it exists\n (3) w1length: number of alphabetic characters in w1\n (4) w2cap: true if w2 is capi...
[ { "span": "words2 ", "start_line": 71, "start_column": 8, "end_line": 71, "end_column": 14 }, { "span": "lower_words,", "start_line": 120, "start_column": 4, "end_line": 120, "end_column": 15 }, { "span": "non_abbrs ", "start_line": 120, "start_column": 17...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "features_", "(_", "frag_", ",_", "model_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\...
[ 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
r4mos/youtube-dl-simple-server/installation/server-windows/setup.py
[ { "content": "#!/usr/bin/env python\n#-*- encoding:utf-8 -*-\n\nfrom distutils.core import setup\nimport py2exe\n\nsetup(console=['server-windows.py'])\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 } ]
[ { "span": "import py2exe", "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_", "#-", "*-", " ", "encoding", ":", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", ...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
Unused import
ImageEngine/gaffer/python/GafferUI/Layouts.py
[ { "content": "##########################################################################\n#\n# Copyright (c) 2011-2012, John Haddon. All rights reserved.\n# Copyright (c) 2013, Image Engine Design Inc. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modificat...
[ { "span": "import GafferUI", "start_line": 40, "start_column": 0, "end_line": 40, "end_column": 15 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "###########", "###########", "###########", "###########", "###########", "###########", "######", "##", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", " ", "...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
ofri/Open-Knesset/persons/managers.py
[ { "content": "from django.utils.encoding import smart_text\nfrom django.db.models import Q, Manager, Model\nfrom django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist\n\n", "metadata": "root", "header": "['module', '___EOS___']", "index": 0 }, { "content": "class PersonMa...
[ { "span": "from django.db.models import Q, Manager, Model", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 46 }, { "span": "from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist", "start_line": 2, "start_column": 0, "end_line": 2, ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "django_", "._", "utils_", "._", "encoding_", "import_", "smart", "\\u", "text_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "django_", "._", "db_", "._", "models_", "import_", "...
[ 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, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
kuri65536/python-for-android/python-build/python-libs/gdata/samples/oauth/oauth_on_appengine/appengine_utilities/paginator.py
[ { "content": "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice,...
[ { "span": "from google.appengine.ext import db", "start_line": 27, "start_column": 0, "end_line": 27, "end_column": 35 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "Copy", "right", " ", "(", "c", ")", " ", "2008", ",", " ", "appengine", "-", "util", "iti", "es", " ", "project", "\\", "10", ";", "All", " "...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Module is imported more than once
simpeg/simpeg/tests/mesh/test_interpolation.py
[ { "content": "import numpy as np\nimport unittest\nfrom SimPEG.Utils import mkvc\nfrom SimPEG import Mesh, Tests\nimport unittest\n\n\nMESHTYPES = ['uniformTensorMesh', 'randomTensorMesh']\nTOLERANCES = [0.9, 0.5, 0.5]\ncall1 = lambda fun, xyz: fun(xyz)\ncall2 = lambda fun, xyz: fun(xyz[:, 0], xyz[:, -1])\ncall...
[ { "span": "import unittest", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 15 } ]
[ { "span": "import unittest", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 15 } ]
1
true
[ "[CLS]_", "Module_", "is_", "imported_", "more_", "than_", "once_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "numpy_", "as_", "np_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "unittest_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "Sim", "PE", "G_", "._", "U...
[ 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 3, 1, 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...
Except block handles 'BaseException'
OrbitzWorldwide/droned/droned/services/application.py
[ { "content": " def startService(self):\n \"\"\"Start All AppManager Services\"\"\"\n if self.scanning.called: #need to pre-populate values\n self.scanning = defer.maybeDeferred(self._first_scan)\n self.first_run = True\n self._task = task.LoopingCall(self.scan_app_instances)\...
[ { "span": "except:", "start_line": 80, "start_column": 11, "end_line": 80, "end_column": 18 }, { "span": "except: ", "start_line": 88, "start_column": 19, "end_line": 88, "end_column": 26 }, { "span": "except: ", "start_line": 92, "start_column": 15, "...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Applica", "tion", "Loader_", "(_", "Service_", ")_", ":_", "\\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, 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
cigroup-ol/windml/windml/preprocessing/mreg_interpolation.py
[ { "content": " def multi_interpolate(self, timeseries, args):\n timestep = args['timestep']\n neighbor_series = args['neighbor_series']\n reg = args['reg']\n regargs = args['regargs']\n\n # order by damaged elements, ascending.\n mdf = MissingDataFinder()\n\n ...
[ { "span": "regressors ", "start_line": 77, "start_column": 12, "end_line": 77, "end_column": 22 }, { "span": "pattern_size ", "start_line": 78, "start_column": 12, "end_line": 78, "end_column": 24 }, { "span": "repairable ", "start_line": 80, "start_column...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "MR", "eg", "Interpolation", "_", "(_", "object_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#@", "todo", " ", "highl", "y", " ", "experimental_", "\\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
JoelBender/bacpypes/samples/ReadWriteFile.py
[ { "content": "#!/usr/bin/python\n\n\"\"\"\nReadWriteFile.py\n\nThis application presents a 'console' prompt to the user asking for commands.\n\nThe 'readrecord' and 'writerecord' commands are used with record oriented files,\nand the 'readstream' and 'writestream' commands are used with stream oriented \nfiles....
[ { "span": "from bacpypes.basetypes import ServicesSupported", "start_line": 34, "start_column": 0, "end_line": 34, "end_column": 48 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "python_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "Read", "Write", "File", ".", "py", "\\", "10", ";", "...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
statsmodels/statsmodels/statsmodels/tsa/vector_ar/tests/test_var.py
[ { "content": "def get_macrodata():\n data = sm.datasets.macrodata.load().data[['realgdp','realcons','realinv']]\n names = data.dtype.names\n nd = data.view((float,3), type=np.ndarray)\n nd = np.diff(np.log(nd), axis=0)\n return nd.ravel().view(data.dtype, type=np.ndarray)", "metadata": "root....
[ { "span": "names ", "start_line": 86, "start_column": 4, "end_line": 86, "end_column": 9 }, { "span": "res ", "start_line": 256, "start_column": 8, "end_line": 256, "end_column": 11 }, { "span": "foo ", "start_line": 278, "start_column": 8, "end_line":...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "macro", "data_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\u...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
JamesRitchie/django-rest-framework-expiring-tokens/tests/test_views.py
[ { "content": " def test_post_expired_token(self):\n \"\"\"Check that expired tokens are replaced.\"\"\"\n token = ExpiringToken.objects.create(user=self.user)\n key_1 = token.key\n\n # Make the first token expire.\n with self.settings(EXPIRING_TOKEN_LIFESPAN=timedelta(milli...
[ { "span": "self.assertTrue(key_1 != key_2)", "start_line": 115, "start_column": 8, "end_line": 115, "end_column": 39 } ]
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Obtain", "Expir", "ing", "Token", "View", "Test", "Case_", "(_", "API", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "p...
[ 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
XiaoMi/minos/owl/collector/management/commands/metrics_updater.py
[ { "content": "import Queue\nimport datetime\nimport json\nimport logging\nimport os\nimport socket\nimport time\nimport traceback\n\nfrom collect_utils import METRIC_TASK_TYPE, STATUS_TASK_TYPE, AGGREGATE_TASK_TYPE\nfrom collect_utils import QueueTask\nfrom django.db import connection\nfrom monitor import dbuti...
[ { "span": "import Queue", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 12 }, { "span": "from collect_utils import METRIC_TASK_TYPE, STATUS_TASK_TYPE, AGGREGATE_TASK_TYPE", "start_line": 9, "start_column": 0, "end_line": 9, "end_column": 81 }, { ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "Queue_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "datetime_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "json_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "logging_", "\\u\\u\\uNEWLINE\\...
[ 4, 4, 4, 4, 4, 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, 0, 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...
Imprecise assert
nitely/Spirit/spirit/comment/poll/tests.py
[ { "content": " def test_render_polls_template_form(self):\n \"\"\"\n Should display poll vote form\n \"\"\"\n out = Template(\n \"{% load spirit_tags %}\"\n \"{% post_render_comment comment=comment %}\"\n ).render(Context({'comment': self.user_comment_...
[ { "span": "self.assertTrue(\"<poll\" not in out)", "start_line": 434, "start_column": 8, "end_line": 434, "end_column": 43 }, { "span": "self.assertTrue(form_id in out)", "start_line": 436, "start_column": 8, "end_line": 436, "end_column": 39 }, { "span": "self.as...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Comme", "nt", "Poll", "Templa", "te", "Ta", "gs", "Test_", "(_", "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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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
rcos/Observatory/observatory/dashboard/fetch/fetch_single_blog.py
[ { "content": "#!/usr/bin/env python\n\n# Copyright (c) 2010, individual contributors (see AUTHORS file)\n#\n# Permission to use, copy, modify, and/or distribute this software for any\n# purpose with or without fee is hereby granted, provided that the above\n# copyright notice and this permission notice appear i...
[ { "span": "import os, subprocess", "start_line": 16, "start_column": 0, "end_line": 16, "end_column": 21 }, { "span": "from dashboard.models import Blog, Project", "start_line": 22, "start_column": 0, "end_line": 22, "end_column": 42 }, { "span": "from observatory...
[]
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", " ", "(", "c", ")", " ", "2010", ",", " ...
[ 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
glennyonemitsu/MarkupHiveSDK/pyjade/ext/django/compiler.py
[ { "content": "import logging\nimport os\n\nfrom pyjade import Compiler as _Compiler, Parser, register_filter\nfrom pyjade.runtime import attrs\nfrom pyjade.exceptions import CurrentlyNotSupported\nfrom pyjade.utils import process\n\nfrom django.conf import settings\n\n\n\nfrom django import template\ntemplate.a...
[ { "span": "import logging", "start_line": 0, "start_column": 0, "end_line": 0, "end_column": 14 }, { "span": "import os", "start_line": 1, "start_column": 0, "end_line": 1, "end_column": 9 }, { "span": "from pyjade import Compiler as _Compiler, Parser, register_fi...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "import_", "logging_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "import_", "os_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "pyj", "ade_", "import_", "Compiler_", "as_", "\\u", "Co...
[ 4, 4, 4, 4, 4, 2, 2, 0, 1, 2, 0, 1, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
google/simian/src/tests/simian/settings_medium_test.py
[ { "content": "#!/usr/bin/env python\n#\n# Copyright 2010 Google Inc. All Rights Reserved.\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/license...
[ { "span": "import mox", "start_line": 25, "start_column": 0, "end_line": 25, "end_column": 10 }, { "span": "import stubout", "start_line": 26, "start_column": 0, "end_line": 26, "end_column": 14 } ]
[]
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", " ", "2010", " ", "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...
Unreachable code
warner/petmail/petmail/scripts/runner.py
[ { "content": "\n# only import stdlib at the top level. Do not import anything from our\n# dependency set, or parts of petmail that require things from the dependency\n# set, until runtime, inside a command that specifically needs it.\n\nimport os, sys, pprint\n\ntry:\n # do not import anything from Twisted t...
[ { "span": "sys.exit(1)", "start_line": 15, "start_column": 4, "end_line": 15, "end_column": 15 }, { "span": "return 1", "start_line": 317, "start_column": 8, "end_line": 317, "end_column": 16 } ]
[]
1
true
[ "[CLS]_", "Unrea", "chab", "le_", "code_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "only", " ", "import", " ", "stdlib", " ", "at", " ", "the", " ", "top", " ", "level", ".", " ", "Do", " ", "not", " ", "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...
Variable defined multiple times
mozilla/addons-server/src/olympia/devhub/tests/test_feeds.py
[ { "content": " def test_rss(self):\n self.log_creates(5)\n # This will give us a new RssKey\n r = self.get_response()\n key = RssKey.objects.get()\n r = self.get_response(privaterss=key.key)\n assert r['content-type'] == 'application/rss+xml; charset=utf-8'\n ...
[ { "span": "r ", "start_line": 174, "start_column": 8, "end_line": 174, "end_column": 9 }, { "span": "r ", "start_line": 185, "start_column": 8, "end_line": 185, "end_column": 9 }, { "span": "res ", "start_line": 277, "start_column": 8, "end_line": 277,...
[ { "span": "res ", "start_line": 279, "start_column": 8, "end_line": 279, "end_column": 11 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "class_", "Test", "Activity_", "(_", "Hub", "Test_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "rss_", "(_", "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, 0, 2, 2, 2, 2, 2, 2, 2...
Variable defined multiple times
PublicMapping/DistrictBuilder/docs/loadcensus/configureCensus.py
[ { "content": "def gen_config(num_districts_congress,num_districts_senate,num_districts_house,sum_TOTPOP,has_election_data=0,has_vtds=0, conf_na=False , \ntarget_na_congress=0, target_hisp_congress = 0 , target_bl_congress = 0,\ntarget_na_house=0, target_hisp_house = 0 , target_bl_house = 0,\ntarget_na_senate =0...
[ { "span": "midlevel=", "start_line": 1671, "start_column": 8, "end_line": 1671, "end_column": 16 }, { "span": "midlevel_width=", "start_line": 1675, "start_column": 8, "end_line": 1675, "end_column": 22 }, { "span": "midlevel_var=", "start_line": 1676, "st...
[ { "span": "midlevel=", "start_line": 1681, "start_column": 2, "end_line": 1681, "end_column": 10 }, { "span": "midlevel_width=", "start_line": 1682, "start_column": 16, "end_line": 1682, "end_column": 30 }, { "span": "midlevel_var=", "start_line": 1683, "s...
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_", "gen", "\\u", "config_", "(_", "num", "\\u", "district", "s", "\\u", "congr", "ess_", ",_", "num", "\...
[ 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'
twisted/twisted/twisted/python/log.py
[ { "content": "def callWithLogger(logger, func, *args, **kw):\n \"\"\"\n Utility method which wraps a function in a try:/except:, logs a failure if\n one occurs, and uses the system's logPrefix.\n \"\"\"\n try:\n lp = logger.logPrefix()\n except KeyboardInterrupt:\n raise\n exc...
[ { "span": "except:", "start_line": 96, "start_column": 4, "end_line": 96, "end_column": 11 }, { "span": "except:", "start_line": 103, "start_column": 4, "end_line": 103, "end_column": 11 }, { "span": "except:", "start_line": 389, "start_column": 4, "en...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "call", "With", "Logger_", "(_", "logger_", ",_", "func_", ",_", "*_", "ar...
[ 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
JetBrains/youtrack-rest-python-library/python/pyactiveresource/activeresource.py
[ { "content": "#!/usr/bin/python2.4\n# Authors: Jared Kuolt <me@superjared.com>, Mark Roach <mrroach@google.com>\n\n\"\"\"Connect to and interact with a REST server and its objects.\"\"\"\n\n\nimport new\nimport re\nimport sys\nimport urllib\nimport urllib2\nimport urlparse\nfrom string import Template\nfrom pya...
[ { "span": "from pyactiveresource import element_containers", "start_line": 14, "start_column": 0, "end_line": 14, "end_column": 47 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "python", "2.4", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Author", "s", ":", " ", "Jar", "ed", " ", "Ku", "olt", " ", "<", "me", "@", ...
[ 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
kayhayen/Nuitka/nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/__init__.py
[ { "content": " def _tool_module(self):\n # TODO: Interchange zipimport with normal initilization for better error reporting\n oldpythonpath = sys.path\n sys.path = self.toolpath + sys.path\n\n try:\n try:\n file, path, desc = imp.find_module(self.name, se...
[ { "span": "except ImportError:", "start_line": 120, "start_column": 16, "end_line": 120, "end_column": 35 }, { "span": "print \"VersionShLibLinkNames: linkname = \",linkname", "start_line": 256, "start_column": 12, "end_line": 256, "end_column": 63 }, { "span": "p...
[]
1
true
[ "[CLS]_", "Unrea", "chab", "le_", "code_", "[SEP]_", "class_", "Tool_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "tool", "\\u", "module_", "(_", "self_", ")_"...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
daler/metaseq/metaseq/plotutils.py
[ { "content": "def prepare_logged(x, y):\n \"\"\"\n Transform `x` and `y` to a log scale while dealing with zeros.\n\n This function scales `x` and `y` such that the points that are zero in one\n array are set to the min of the other array.\n\n When plotting expression data, frequently one sample ...
[ { "span": "global_max ", "start_line": 506, "start_column": 4, "end_line": 506, "end_column": 14 }, { "span": "scores ", "start_line": 712, "start_column": 4, "end_line": 712, "end_column": 10 }, { "span": "gmin ", "start_line": 780, "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_", "prepar", "e\\u", "logged", "_", "(_", "x_", ",_", "y_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT...
[ 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
AcademicsToday/py-academicstoday/academicstoday_project/student/views/assignment.py
[ { "content": "@login_required()\ndef delete_assignment(request, course_id):\n response_data = {'status' : 'failed', 'message' : 'unknown error with deletion'}\n if request.is_ajax():\n if request.method == 'POST':\n assignment_id = int(request.POST['assignment_id'])\n course =...
[ { "span": "course ", "start_line": 179, "start_column": 12, "end_line": 179, "end_column": 18 }, { "span": "course ", "start_line": 238, "start_column": 12, "end_line": 238, "end_column": 18 }, { "span": "course ", "start_line": 284, "start_column": 12, ...
[]
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_", "@_", "login", "\\u", "required_", "(_", ")_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "def_", "delete", "\\u", "assignment_", "(_", ...
[ 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
datastax/python-driver/example_mapper.py
[ { "content": "def main():\n connection.default()\n\n # Management functions would normally be used in development, and possibly for deployments.\n # They are typically not part of a core application.\n log.info(\"### creating keyspace...\")\n management.create_keyspace_simple(KEYSPACE, 1)\n lo...
[ { "span": "sophie ", "start_line": 72, "start_column": 4, "end_line": 72, "end_column": 10 }, { "span": "kids ", "start_line": 109, "start_column": 4, "end_line": 109, "end_column": 8 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "main_", "(_", ")_", ":_", "\\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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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
grantbrown/laspy/laspytest/test_laspy.py
[ { "content": " def test_GPSTime(self):\n \"\"\"Fetch and test gps_time dimension\"\"\"\n self.assertTrue(self.p1.gps_time - 2*246504.221932 \n + self.gps_time[self.idx1] < 0.00001)\n self.assertTrue(self.p2.gps_time - 2*249774.658254 \n + self.gps_ti...
[ { "span": "self.assertTrue(self.p1.gps_time - 2*246504.221932 \n + self.gps_time[self.idx1] < 0.00001)", "start_line": 134, "start_column": 8, "end_line": 135, "end_column": 57 }, { "span": "self.assertTrue(self.p2.gps_time - 2*249774.658254 \n + sel...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Las", "Read", "er", "Test", "Case_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "GPS", "Time...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Unused local variable
jon-jacky/PyModel/samples/WebApplication/webapp.py
[ { "content": "def application(environ, start_response):\n global next_cookie\n\n # print environ_template % pprint.pformat(environ) # DEBUG, voluminous!\n\n response_headers = [] # add headers below\n cookie = environ.get('HTTP_COOKIE') # might be None\n\n # show login page\n if (environ['PATH...
[ { "span": "method ", "start_line": 52, "start_column": 8, "end_line": 52, "end_column": 14 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "application_", "(_", "environ_", ",_", "start", "\\u", "response_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _"...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unreachable code
dimagi/commcare-hq/custom/succeed/utils.py
[ { "content": "def get_app_build(app_dict):\n domain = Domain.get_by_name(app_dict['domain'])\n if domain.use_cloudcare_releases:\n return ApplicationBase.get(app_dict['_id']).get_latest_app()['_id']\n else:\n return get_latest_build_id(app_dict['domain'], app_dict['_id'])\n return None...
[ { "span": "return None", "start_line": 63, "start_column": 4, "end_line": 63, "end_column": 15 } ]
[]
1
true
[ "[CLS]_", "Unrea", "chab", "le_", "code_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "\\u", "app", "\\u", "build_", "(_", "app", "\\u", "dict_", ")_", ":_", "\\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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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
RobotLocomotion/director/src/python/director/doordemo.py
[ { "content": " def planChop(self, deltaZ=None, deltaY=None, deltaX=None):\n\n startPose = self.getPlanningStartPose()\n\n if deltaZ is None:\n deltaZ = self.chopDistance\n if deltaY is None:\n deltaY = self.chopSidewaysDistance\n if deltaX is None:\n ...
[ { "span": "endPose,", "start_line": 447, "start_column": 8, "end_line": 447, "end_column": 15 }, { "span": "info ", "start_line": 447, "start_column": 17, "end_line": 447, "end_column": 21 }, { "span": "jointSpeedLimit ", "start_line": 471, "start_column":...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Doo", "r", "Demo", "_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "plan", "Cho", "p_", "(_", "self_", ",_", "delta", "Z_...
[ 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
Exa-Networks/exabgp/lib/exabgp/bgp/message/update/attribute/community/extended/__init__.py
[ { "content": "# encoding: utf-8\n\"\"\"\ncommunity.py\n\nCreated by Thomas Mangin on 2009-11-05.\nCopyright (c) 2009-2015 Exa Networks. All rights reserved.\n\"\"\"\n\n# Every Extended Community should be imported from this file\n# as it makes sure that all the registering decorator are run\n\nfrom exabgp.bgp.m...
[ { "span": "from exabgp.bgp.message.update.attribute.community.extended.community import ExtendedCommunity", "start_line": 11, "start_column": 0, "end_line": 11, "end_column": 94 }, { "span": "from exabgp.bgp.message.update.attribute.community.extended.communities import ExtendedCommuniti...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "encoding", ":", " ", "utf", "-", "8_", "\\u\\u\\uNL\\u\\u\\u_", "\"\"\"", "\\", "10", ";", "communi", "ty", ".", "py", "\\", "10", ";", "\\", "10", ";", "Creat", ...
[ 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
andersbll/cudarray/examples/benchmark_conv.py
[ { "content": "def benchmark(n_imgs, n_channels, img_shape, n_filters, filter_shape, pad):\n print('\\nn_imgs: %i, n_channels: %i, img_shape: (%i, %i), '\n % ((n_imgs, n_channels) + img_shape)\n + 'n_filters: %i, filter_shape: (%i, %i), pad: %i'\n % ((n_filters,) + filter_shape + (p...
[ { "span": "imgs_bc01_shape ", "start_line": 45, "start_column": 4, "end_line": 45, "end_column": 19 }, { "span": "filters_bc01_shape ", "start_line": 46, "start_column": 4, "end_line": 46, "end_column": 22 }, { "span": "imgs_bc01_t ", "start_line": 55, "st...
[]
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_", "benchmark_", "(_", "n", "\\u", "imgs_", ",_", "n", "\\u", "channels_", ",_", "img", "\\u", "shape_", ",_", "...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Import of deprecated module
nicksergeant/snipt-old/django_authopenid/util.py
[ { "content": "# -*- coding: utf-8 -*-\nfrom openid.store.interface import OpenIDStore\nfrom openid.association import Association as OIDAssociation\nfrom openid.extensions import sreg\nimport openid.store\n\nfrom django.db.models.query import Q\nfrom django.conf import settings\nfrom django.http import str_to_u...
[ { "span": "md5,", "start_line": 17, "start_column": 21, "end_line": 17, "end_column": 24 } ]
[]
1
true
[ "[CLS]_", "Import_", "of_", "deprecated_", "module_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "openid", "_", "._", "store_", "._", "inter...
[ 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
ioflo/ioflo/ioflo/aio/http/test/test_clienting.py
[ { "content": " def testNonBlockingRequestStream(self):\n \"\"\"\n Test NonBlocking Http client with SSE streaming server\n \"\"\"\n console.terse(\"{0}\\n\".format(self.testNonBlockingRequestStream.__doc__))\n\n\n\n wireLogAlpha = wiring.WireLog(buffify=True, same=True)\n ...
[ { "span": "self.assertTrue(len(response.events) > 2)", "start_line": 329, "start_column": 8, "end_line": 329, "end_column": 49 }, { "span": "self.assertTrue(len(response.body) == 0)", "start_line": 336, "start_column": 8, "end_line": 336, "end_column": 48 }, { "sp...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Basic", "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", "Non", "Block", "ing", "Req...
[ 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
deanhiller/databus/webapp/play1.3.x/modules/docviewer/commands.py
[ { "content": "def execute(**kargs):\n command = kargs.get(\"command\")\n app = kargs.get(\"app\")\n args = kargs.get(\"args\")\n env = kargs.get(\"env\")\n\n if command == \"doc:export\":\n print \"~ Generating project documentation\"\n print \"~ \"\n java_cmd = app.java_cmd(...
[ { "span": "env ", "start_line": 16, "start_column": 4, "end_line": 16, "end_column": 7 }, { "span": "command ", "start_line": 31, "start_column": 4, "end_line": 31, "end_column": 11 }, { "span": "app ", "start_line": 32, "start_column": 4, "end_line": ...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "execute_", "(_", "**_", "kargs_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uINDENT\\u\\u\\u ", " _", "command_", "=_", "kargs_", "....
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
zunzun/pyeq2/Services/SolverService.py
[ { "content": "from __future__ import print_function\nfrom __future__ import unicode_literals\nfrom __future__ import absolute_import\n\n# pyeq2 is a collection of equations expressed as Python classes\n#\n# Copyright (C) 2013 James R. Phillips\n# 2548 Vera Cruz Drive\n# Birmingham, AL 35235 USA\n#\n...
[ { "span": "except:", "start_line": 17, "start_column": 0, "end_line": 17, "end_column": 7 }, { "span": "except:", "start_line": 128, "start_column": 8, "end_line": 128, "end_column": 15 }, { "span": "except:", "start_line": 139, "start_column": 8, "end...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "\\u\\u", "future\\u\\u_", "import_", "print", "\\u", "function_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "from_", "\\u\\u", "future\\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
apache/libcloud/libcloud/test/compute/test_openstack.py
[ { "content": " def test_list_nodes(self):\n OpenStackMockHttp.type = 'EMPTY'\n ret = self.driver.list_nodes()\n self.assertEqual(len(ret), 0)\n OpenStackMockHttp.type = None\n ret = self.driver.list_nodes()\n self.assertEqual(len(ret), 1)\n node = ret[0]\n ...
[ { "span": "self.assertTrue('10.176.168.218' in node.private_ips)", "start_line": 236, "start_column": 8, "end_line": 236, "end_column": 61 }, { "span": "self.assertTrue(ret is True)", "start_line": 318, "start_column": 8, "end_line": 318, "end_column": 36 }, { "sp...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Open", "Stack", "\\u", "1", "\\u", "0", "\\u", "Tests_", "(_", "unittest_", "._", "Test", "Case_", ",_", "Test", "Case", "Mixin_", ")_", ":_", "\\u\\u\\uEOS\\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
markuskiller/textblob-de/textblob_de/ext/_pattern/__init__.py
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n#### PATTERN #######################################################################################\n\n# Authors: Tom De Smedt <tom@organisms.be>, Walter Daelemans <walter.daelemans@ua.ac.be>\n# License: BSD License, see LICENSE.txt...
[ { "span": "import sys", "start_line": 64, "start_column": 0, "end_line": 64, "end_column": 10 }, { "span": "import _pattern.text", "start_line": 66, "start_column": 0, "end_line": 66, "end_column": 20 }, { "span": "from _pattern.text import de", "start_line": ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "\\u\\u", "future\\u\\u_", "import_", "abs", "olute", "\\u", ...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Imprecise assert
rizar/attention-lvcsr/libs/Theano/theano/tensor/tests/test_blas_c.py
[ { "content": " def test_eq(self):\n self.assertTrue(CGer(True) == CGer(True))\n self.assertTrue(CGer(False) == CGer(False))\n self.assertTrue(CGer(False) != CGer(True))\n\n self.assertTrue(CGer(True) != ScipyGer(True))\n self.assertTrue(CGer(False) != ScipyGer(False))\n ...
[ { "span": "self.assertTrue(CGer(True) == CGer(True))", "start_line": 58, "start_column": 8, "end_line": 58, "end_column": 49 }, { "span": "self.assertTrue(CGer(False) == CGer(False))", "start_line": 59, "start_column": 8, "end_line": 59, "end_column": 51 }, { "spa...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Test", "CG", "er_", "(_", "Test", "Case_", ",_", "Test", "Optim", "izatio", "n", "Mixin_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", ...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Unused import
dropbox/hermes/hermes/handlers/api.py
[ { "content": "from __future__ import division\n\n\nfrom datetime import datetime\nfrom dateutil import parser, tz\nimport json\nimport logging\nimport pytz\nimport random\nimport re\nimport sqlalchemy\nfrom sqlalchemy import desc, or_, and_\nfrom sqlalchemy.exc import IntegrityError\nimport string\nimport time\...
[ { "span": "from dateutil import parser, tz", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 31 }, { "span": "import pytz", "start_line": 7, "start_column": 0, "end_line": 7, "end_column": 11 }, { "span": "import string", "start_line": 13, ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "\\u\\u", "future\\u\\u_", "import_", "division_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "datetime_", "import_", "datetime_", "\\u\\u\\...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 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...
First parameter of a method is not named 'self'
amrdraz/kodr/app/brython/www/src/Lib/fractions.py
[ { "content": " def _add(a, b):\n \"\"\"a + b\"\"\"\n return Fraction(a.numerator * b.denominator +\n b.numerator * a.denominator,\n a.denominator * b.denominator)", "metadata": "root.Fraction._add", "header": "['class', 'Fraction', '(', 'num...
[ { "span": "def _add(a, b):", "start_line": 395, "start_column": 4, "end_line": 395, "end_column": 19 }, { "span": "def _sub(a, b):", "start_line": 403, "start_column": 4, "end_line": 403, "end_column": 19 }, { "span": "def _mul(a, b):", "start_line": 411, ...
[]
1
true
[ "[CLS]_", "First_", "parameter_", "of_", "a_", "method_", "is_", "not_", "named_", "'", "self", "'_", "[SEP]_", "class_", "Fraction_", "(_", "numbers_", "._", "Rational", "_", ")_", ":_", "\\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, 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, 2, 2, 2, 2, 2...
Unused import
azoft-dev-team/imagrium/src/pages/auth/auth_page.py
[ { "content": "'''\nCreated on 16.05.2013\n\n@author: Nosov Dmitriy\n'''\nfrom org.sikuli.script import FindFailed, Button\nfrom src.core.page import Page, ResourceLoader, AndroidPage\nfrom src.core.r import Resource\nfrom src.pages.fb_auth.fb_auth_page import FbAuthPage\nfrom unittest.util import strclass\nimpo...
[ { "span": "from org.sikuli.script import FindFailed, Button", "start_line": 5, "start_column": 0, "end_line": 5, "end_column": 48 }, { "span": "from src.core.page import Page, ResourceLoader, AndroidPage", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 5...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "'''", "\\", "10", ";", "Creat", "ed", " ", "on", " ", "16.", "05", ".2", "013", "\\", "10", ";", "\\", "10", ";", "@", "author", ":", " ", "No", "so", "v", " ", "Dm...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1...
Unused import
allegro/django-powerdns-dnssec/doc/conf.py
[ { "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# django-powerdns-dnssec documentation build configuration file, created by\n# sphinx-quickstart on Wed Jun 17 14:13:00 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible...
[ { "span": "import sys", "start_line": 15, "start_column": 0, "end_line": 15, "end_column": 10 }, { "span": "import os", "start_line": 16, "start_column": 0, "end_line": 16, "end_column": 9 }, { "span": "import shlex", "start_line": 17, "start_column": 0, ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python", "3_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
ardekantur/pyglet/tests/font/VALIGN.py
[ { "content": " def render(self):\n fnt = font.load('', self.font_size)\n\n h = fnt.ascent - fnt.descent\n w = self.window.width\n\n self.labels = []\n x = 0\n for align in 'top center baseline bottom'.split():\n label = align.upper() + 'y'\n sel...
[ { "span": "h ", "start_line": 24, "start_column": 8, "end_line": 24, "end_column": 9 }, { "span": "w ", "start_line": 25, "start_column": 8, "end_line": 25, "end_column": 9 } ]
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "TEST", "\\u", "VAL", "IGN", "_", "(_", "base", "\\u", "text_", "._", "Text", "Test", "Base_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "render_", "(_", "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, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused local variable
glue-viz/glue/glue/tests/test_qglue.py
[ { "content": " def test_glue_data(self):\n d = Data(x=[1, 2, 3])\n dc = qglue(x=d).data_collection\n assert d.label == 'x'", "metadata": "root.TestQGlue.test_glue_data", "header": "['class', 'TestQGlue', '(', 'object', ')', ':', '___EOS___']", "index": 107 }, { "conte...
[ { "span": "dc ", "start_line": 109, "start_column": 8, "end_line": 109, "end_column": 10 }, { "span": "links ", "start_line": 118, "start_column": 8, "end_line": 118, "end_column": 13 }, { "span": "dc ", "start_line": 172, "start_column": 12, "end_line...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Test", "QG", "lue_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "glue", "\\u", "data_", "(_", "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, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
caseywstark/colab/colab/apps/papers/models.py
[ { "content": "from datetime import datetime\n\nfrom django.core.urlresolvers import reverse\nfrom django.db import models\nfrom django.utils.translation import ugettext, ugettext_lazy as _\nfrom django.contrib.auth.models import User\nfrom django.db.models.query import QuerySet\nfrom django.contrib.contenttypes...
[ { "span": "from django.db.models.query import QuerySet", "start_line": 6, "start_column": 0, "end_line": 6, "end_column": 43 }, { "span": "from django.db.models.signals import pre_save, post_save", "start_line": 122, "start_column": 0, "end_line": 122, "end_column": 56 ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "datetime_", "import_", "datetime_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "django_", "._", "core_", "._", "urlresolvers_", "import_", "reverse_", "\\u\\u\\...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1...
Unused local variable
ytisf/PyExfil/pyexfil/http_exfiltration.py
[ { "content": "def listen(local_addr, local_port=80):\n\t\"\"\"\n\tThis function will initiate a web listener (NOT SERVER!) on default port 80.\n\tIt will then capture files and save them into a local file.\n\t:param local_addr: The ip address to bind to.\n\t:param local_port: The port. If not mentioned, 80 will...
[ { "span": "eth_addr(", "start_line": 108, "start_column": 5, "end_line": 108, "end_column": 13 }, { "span": "version ", "start_line": 144, "start_column": 3, "end_line": 144, "end_column": 10 }, { "span": "ttl ", "start_line": 147, "start_column": 3, "...
[]
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_", "listen_", "(_", "local", "\\u", "addr_", ",_", "local", "\\u", "port_", "=_", "80_", ")_", ":_", "\\u\\u\\uNEW...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Variable defined multiple times
ekzhu/datasketch/test/minhash_test.py
[ { "content": " def test_init(self):\n bm = bBitMinHash(self.m, 1)\n bm = bBitMinHash(self.m, 2)\n bm = bBitMinHash(self.m, 3)\n bm = bBitMinHash(self.m, 4)\n bm = bBitMinHash(self.m, 5)\n bm = bBitMinHash(self.m, 8)\n bm = bBitMinHash(self.m, 12)\n bm =...
[ { "span": "bm ", "start_line": 152, "start_column": 8, "end_line": 152, "end_column": 10 }, { "span": "bm ", "start_line": 153, "start_column": 8, "end_line": 153, "end_column": 10 }, { "span": "bm ", "start_line": 154, "start_column": 8, "end_line": 1...
[ { "span": "bm ", "start_line": 161, "start_column": 8, "end_line": 161, "end_column": 10 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "class_", "Test", "b", "Bit", "Min", "Hash_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test\\u", "...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 2, 2, 0, 2, 2, 2...
Imprecise assert
ImageEngine/gaffer/python/GafferTest/FileSystemPathTest.py
[ { "content": "\tdef testPropertyNames( self ) :\n\n\t\tp = Gaffer.FileSystemPath( self.temporaryDirectory() )\n\n\t\ta = p.propertyNames()\n\t\tself.assertTrue( isinstance( a, list ) )\n\n\t\tself.assertTrue( \"fileSystem:group\" in a )\n\t\tself.assertTrue( \"fileSystem:owner\" in a )\n\t\tself.assertTrue( \"f...
[ { "span": "self.assertTrue( \"fileSystem:group\" in a )", "start_line": 224, "start_column": 2, "end_line": 224, "end_column": 44 }, { "span": "self.assertTrue( \"fileSystem:owner\" in a )", "start_line": 225, "start_column": 2, "end_line": 225, "end_column": 44 }, { ...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "File", "System", "Path", "Test_", "(_", "Ga", "ffer", "Test_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "test", "Proper"...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Variable defined multiple times
statsmodels/statsmodels/statsmodels/sandbox/km_class.py
[ { "content": " def fit(self):\n #split the data into groups based on the predicting variable\n #get a set of all the groups\n groups = list(set(self.data[:,self.groupIn]))\n #create an empty list to store the data for different groups\n groupList = []\n #create an em...
[ { "span": "censoringCounter ", "start_line": 123, "start_column": 20, "end_line": 123, "end_column": 36 } ]
[ { "span": "censoringCounter ", "start_line": 107, "start_column": 16, "end_line": 107, "end_column": 32 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "class_", "KA", "PLAN", "\\u", "ME", "IER", "_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "fit_", "(_", "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...
Testing equality to None
QuantSoftware/QuantSoftwareToolkit/Legacy/epydoc-3.0.1/epydoc/docwriter/html_colorize.py
[ { "content": " def handle_line(self, line):\n \"\"\"\n Render a single logical line from the module, and write the\n generated HTML to C{self.out}.\n\n @param line: A single logical line, encoded as a list of\n C{(toktype,tokttext)} pairs corresponding to the tokens in\...
[ { "span": "line[i-1][0]==None ", "start_line": 661, "start_column": 28, "end_line": 661, "end_column": 46 } ]
[]
1
true
[ "[CLS]_", "Test", "ing_", "equality", "_", "to_", "None_", "[SEP]_", "class_", "Pyth", "on", "Sou", "rce", "Color", "izer_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "def_", "handle", "\\u", "line_", "(_", "self_", ",_", "line_", ")_", ":_", "\...
[ 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
c4all/c4all/admin/tests/thread.py
[ { "content": " def test_get_threads_filter_1_day_success(self):\n time_period = 1\n\n t1 = Thread.objects.create(site=self.site, url='test_url')\n t2 = Thread.objects.create(\n site=self.site,\n url='test_url_2',\n )\n t2.created = now() - timedelta(da...
[ { "span": "self.assertTrue(t1 in threads)", "start_line": 52, "start_column": 8, "end_line": 52, "end_column": 38 }, { "span": "self.assertTrue(t2 not in threads)", "start_line": 53, "start_column": 8, "end_line": 53, "end_column": 42 }, { "span": "self.assertTrue...
[]
1
true
[ "[CLS]_", "Imp", "reci", "se_", "assert_", "[SEP]_", "class_", "Admi", "n", "Thread", "Test", "Cases_", "(_", "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", "thread", "s",...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
cloudera/hue/desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/xml/functions.py
[ { "content": "from __future__ import absolute_import\n# Copyright (c) 2010-2015 openpyxl\n\n\"\"\"\nXML compatability functions\n\"\"\"\n\n# Python stdlib imports\nimport re\nfrom functools import partial\n# compatibility\n\n# package imports\nfrom openpyxl import LXML\n\nif LXML is True:\n from lxml.etree i...
[ { "span": "from lxml.etree import (\n Element,\n ElementTree,\n SubElement,\n fromstring,\n tostring,\n register_namespace,\n iterparse,\n QName,\n xmlfile\n )", "start_line": 16, "start_column": 4, "end_line": 26, "end_column": 5 }, { "span": "from xml.etre...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "from_", "\\u\\u", "future\\u\\u_", "import_", "abs", "olute", "\\u", "import_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "#", " ", "Copy", "right", " ", "(", "c", ")", " ", "2010", "-", "20...
[ 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
tgonzales/mingus/mingus/resources.py
[ { "content": " def getParams(self):\n \"\"\"\n Check the schematic object to see if arguments from Tornado can be lists or dictionaries\n \"\"\"\n types = [DictType, GeoPointType, ListType, ModelType]\n fieldkeys = self.fields.keys()\n\n j = JSONSerializer() \n ...
[ { "span": "j ", "start_line": 30, "start_column": 8, "end_line": 30, "end_column": 9 }, { "span": "result ", "start_line": 288, "start_column": 12, "end_line": 288, "end_column": 18 }, { "span": "result ", "start_line": 312, "start_column": 12, "end_li...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Model", "Params_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "get", "Params_", "(_", "self_", ")_", ":_", "\\u\\u\\uNEWLINE\\u...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
hycis/Pynet/hps/models/Laura_No_Transpose.py
[ { "content": "\n\nfrom jobman import DD, expand, flatten\n\nimport pynet.layer as layer\nfrom pynet.model import *\nfrom pynet.layer import *\nfrom pynet.datasets.mnist import Mnist, Mnist_Blocks\nimport pynet.datasets.spec as spec\nimport pynet.datasets.mnist as mnist\nimport pynet.datasets.transfactor as tf\n...
[ { "span": "from jobman import DD, expand, flatten", "start_line": 2, "start_column": 0, "end_line": 2, "end_column": 38 }, { "span": "import pynet.layer as layer", "start_line": 4, "start_column": 0, "end_line": 4, "end_column": 27 }, { "span": "from pynet.dataset...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "from_", "job", "man_", "import_", "DD", "_", ",_", "expand_", ",_", "flatten_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "impo...
[ 4, 4, 4, 4, 4, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1...
Variable defined multiple times
neuropoly/spinalcordtoolbox/dev/sct_segment_gray_matter_asman/sct_asman_old.py
[ { "content": "#!/usr/bin/env python\n########################################################################################################################\n#\n# Asman et al. groupwise multi-atlas segmentation method implementation\n#\n#\n# ---------------------------------------------------------------------...
[ { "span": "fname_input ", "start_line": 2184, "start_column": 8, "end_line": 2184, "end_column": 19 } ]
[ { "span": "fname_input ", "start_line": 2185, "start_column": 8, "end_line": 2185, "end_column": 19 } ]
1
true
[ "[CLS]_", "Variable_", "defined_", "multiple_", "times_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#!", "/", "usr", "/", "bin", "/", "env", " ", "python_", "\\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 local variable
tuxlinuxien/TwistedWebsocket/TwistedWebsocket/server.py
[ { "content": " def connectionLost(self, *args, **kwargs):\n _id = self.id\n if self.id in self.users:\n del self.users[self.id]\n self.onDisconnect()", "metadata": "root.Protocol.connectionLost", "header": "['class', 'Protocol', '(', 'BaseProtocol', ',', 'object', ')', ':', '___EOS___']",...
[ { "span": "_id ", "start_line": 84, "start_column": 4, "end_line": 84, "end_column": 7 }, { "span": "_id ", "start_line": 90, "start_column": 4, "end_line": 90, "end_column": 7 }, { "span": "_id ", "start_line": 97, "start_column": 4, "end_line": 97, ...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Protocol_", "(_", "Base", "Protocol_", ",_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
ctuning/ck/tests/test_python_unicode.py
[ { "content": "#\n# Collective Knowledge (CK)\n#\n# See CK LICENSE.txt for licensing details.\n# See CK COPYRIGHT.txt for copyright details.\n#\n# Developer: Grigori Fursin\n#\n\n# CK installation test\n\nimport ck.kernel as ck\nimport sys\nimport json\n\n\nprint ('Console encoding:', sys.stdin.encoding)\nprint ...
[ { "span": "import ck.kernel as ck", "start_line": 11, "start_column": 0, "end_line": 11, "end_column": 22 } ]
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Collecti", "ve", " ", "Knowledge", " ", "(", "CK", ")_", "\\u\\u\\uNL\\u\\u\\u_", "#", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "See", ...
[ 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
python-acoustics/python-acoustics/tests/test__signal.py
[ { "content": " def test_samples(self, signal):\n x = signal.samples", "metadata": "root.TestSignal.test_samples", "header": "['class', 'TestSignal', '(', ')', ':', '___NEWLINE___', '___NL___', '___NL___', '# (channels, samples, sample rate)', '___NL___', '___EOS___']", "index": 40 }, {...
[ { "span": "x ", "start_line": 41, "start_column": 8, "end_line": 41, "end_column": 9 }, { "span": "x ", "start_line": 72, "start_column": 8, "end_line": 72, "end_column": 9 }, { "span": "x ", "start_line": 75, "start_column": 8, "end_line": 75, "en...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Test", "Signal_", "(_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "(", "channel", "s", ",", " ", "samples", ",", " ", "sample", " ", ...
[ 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, 0, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Unused import
cenobites/flask-jsonrpc/flask_jsonrpc/__init__.py
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) 2009 Samuel Sutch, <sam@sutch.net>\n# Copyright (c) 2012-2015, Cenobit Technologies, Inc. http://cenobit.es/\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the fo...
[ { "span": "from functools import wraps", "start_line": 30, "start_column": 0, "end_line": 30, "end_column": 27 }, { "span": "from flask import current_app, request, jsonify", "start_line": 34, "start_column": 0, "end_line": 34, "end_column": 47 }, { "span": "from ...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "-*-", " ", "codi", "ng", ":", " ", "utf", "-", "8", " ", "-*-", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Copy", "right", " ", "(", "c", ")", " ", "200", "9", ...
[ 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
Miserlou/Zappa/tests/tests.py
[ { "content": " @placebo_session\n def test_create_lambda_function(self, session):\n bucket_name = 'lmbda'\n zip_path = 'Spheres-dev-1454694878.zip'\n\n z = Zappa(session)\n z.aws_region = 'us-east-1'\n z.load_credentials(session)\n z.credentials_arn = 'arn:aws:iam...
[ { "span": "arn ", "start_line": 118, "start_column": 8, "end_line": 118, "end_column": 11 }, { "span": "function_arn ", "start_line": 133, "start_column": 8, "end_line": 133, "end_column": 20 }, { "span": "response ", "start_line": 142, "start_column": 8, ...
[]
1
true
[ "[CLS]_", "Un", "used_", "local_", "variable_", "[SEP]_", "class_", "Test", "Za", "ppa", "_", "(_", "unittest_", "._", "Test", "Case_", ")_", ":_", "\\u\\u\\uNEWLINE\\u\\u\\u_", "##", "_", "\\u\\u\\uNL\\u\\u\\u_", "#", " ", "Sanit", "y", " ", "Tests_", "\\u\\u...
[ 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2...
Except block handles 'BaseException'
RoseOu/flasky/venv/lib/python2.7/site-packages/gunicorn/arbiter.py
[ { "content": " def spawn_worker(self):\n self.worker_age += 1\n worker = self.worker_class(self.worker_age, self.pid, self.LISTENERS,\n self.app, self.timeout / 2.0,\n self.cfg, self.log)\n self.cfg.pre_fork(self, worker...
[ { "span": "except:", "start_line": 524, "start_column": 8, "end_line": 524, "end_column": 15 }, { "span": "except:", "start_line": 535, "start_column": 12, "end_line": 535, "end_column": 19 } ]
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Arbit", "er_", "(_", "object_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "spaw...
[ 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'
NeuralEnsemble/python-neo/neo/io/hdf5io.py
[ { "content": " def _get_class_by_node(self, node):\n \"\"\"\n Returns the type of the object (string) depending on node.\n \"\"\"\n try:\n obj_type = node._f_getAttr(\"_type\")\n return class_by_name[obj_type]\n except:\n return None # that'...
[ { "span": "except:", "start_line": 343, "start_column": 8, "end_line": 343, "end_column": 15 }, { "span": "except:", "start_line": 416, "start_column": 20, "end_line": 416, "end_column": 27 }, { "span": "except:", "start_line": 821, "start_column": 12, ...
[]
1
true
[ "[CLS]_", "Except", "_", "block_", "handles_", "'", "Base", "Except", "ion", "'_", "[SEP]_", "class_", "Neo", "Hd", "f5", "IO_", "(_", "Base", "IO_", ")_", ":_", "\\u\\u\\uEOS\\u\\u\\u_", "\\u\\u\\uNL\\u\\u\\u_", "\\u\\u\\uDEDENT\\u\\u\\u_", "def_", "\\u", "get", ...
[ 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
foundit/Piped/contrib/database/piped_database/test/test_database.py
[ { "content": "# Copyright (c) 2010-2012, Found IT A/S and Piped Project Contributors.\n# See LICENSE for details.\n\n\"\"\" Test the database provider --- it should handle failures\ngracefully and notify its customers upon connection, disconnections,\netc. \"\"\"\nimport mock\nimport sqlalchemy as sa\nfrom twis...
[ { "span": "from twisted.application import service", "start_line": 8, "start_column": 0, "end_line": 8, "end_column": 39 }, { "span": "from twisted.python import util as twisted_util, failure", "start_line": 11, "start_column": 0, "end_line": 11, "end_column": 56 }, {...
[]
1
false
[ "[CLS]_", "Un", "used_", "import_", "[SEP]_", "module_", "\\u\\u\\uEOS\\u\\u\\u_", "#", " ", "Copy", "right", " ", "(", "c", ")", " ", "2010", "-", "2012", ",", " ", "Foun", "d", " ", "IT", " ", "A", "/", "S", " ", "and", " ", "Pipe", "d", " ", "...
[ 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...