Search is not available for this dataset
id int32 | source_tokens list | has_bug bool | error_location int32 | repair_candidates list | bug_kind int32 | bug_kind_name string | repair_targets list | edges list | provenances list | template_name string | template string | rendered_input string | rendered_output string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
900 | [
"#NEWLINE#",
"def perform(",
"self",
",",
"X",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n .. todo::\\n\\n WRITEME\\n '",
"#NEWLINE#",
"if",
"(",
"self",
".",
"fn",
"is",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"fn",
"=",
"sel... | false | 0 | [
"4",
"39",
"X",
"2",
"13",
"22",
"26",
"35",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 16,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "lisa-lab/pylearn2/pylearn2/blocks.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def perform(self, X) :
'
.. todo::
WRITEME
'
if (self.fn is None) :
self.fn = self.function ('perform')
return self.fn (X)
Is there a bug in the code above? | No |
901 | [
"#NEWLINE#",
"def createPDF(",
"self",
",",
"name",
"=",
"None",
",",
"size",
"=",
"'10kb'",
")",
":",
"#NEWLINE#",
"#INDENT#",
"from",
"PyPDF2",
"import",
"PdfFileReader",
",",
"PdfFileWriter",
"#NEWLINE#",
"from",
"fpdf",
"import",
"FPDF",
"#NEWLINE#",
"import... | false | 0 | [
"4",
"33",
"41",
"49",
"63",
"name",
"52",
"230",
"output_name",
"180",
"187",
"205",
"214",
"235",
"output",
"193",
"218",
"input1",
"44",
"182",
"199",
"tmp_name",
"2",
"56",
"self",
"8",
"68",
"93",
"118",
"size",
"139",
"145",
"151",
"162",
"17... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 32,
"after_index": 40,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 43,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "thinkst/opencanary/opencanary/modules/testpdf.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def createPDF(self, name = None, size = '10kb') :
from PyPDF2 import PdfFileReader, PdfFileWriter
from fpdf import FPDF
import os
import random
name = os.path.basename (name)
tmp_name = ('/tmp/' + name)
output_name = ((self.sharepath + '/') + name)
if (size == '10kb') :
... | No |
902 | [
"#NEWLINE#",
"def get_node(",
"self",
",",
"node_id",
",",
"cb",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Get node data from storage\\n '",
"#NEWLINE#",
"self",
".",
"get",
"(",
"prefix",
"=",
"'node-'",
",",
"key",
"=",
"node_id",
",",
... | false | 0 | [
"6",
"27",
"29",
"cb",
"4",
"25",
"node_id",
"2",
"15",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "EricssonResearch/calvin-base/calvin/runtime/north/storage.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def get_node(self, node_id, cb = None) :
'
Get node data from storage
'
self.get (prefix = 'node-', key = node_id, cb = cb)
Is there a bug in the code above? | No |
903 | [
"#NEWLINE#",
"def multipleOf(",
"validator",
",",
"dB",
",",
"instance",
",",
"schema",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"not",
"validator",
".",
"is_type",
"(",
"instance",
",",
"'number'",
")",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"#NE... | false | 0 | [
"6",
"20",
"44",
"68",
"87",
"instance",
"41",
"54",
"57",
"quotient",
"8",
"schema",
"2",
"16",
"validator",
"4",
"34",
"46",
"70",
"89",
"dB",
"49",
"65",
"75",
"failed"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 31,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Julian/jsonschema/jsonschema/_validators.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def multipleOf(validator, dB, instance, schema) :
if (not validator.is_type (instance, 'number')) :
return
if isinstance (dB, float) :
quotient = (instance / dB)
failed = (int (quotient) != quotient)
else :
failed = (instance % dB)
if failed :
(yield ValidationError ... | No |
904 | [
"#NEWLINE#",
"def test_drop_nones(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"orig",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'a'",
":",
"1",
",",
"#NEWLINE#",
"'b'",
":",
"None",
",",
"#NEWLINE#",
"'c'",
":",
"[",
"3",
",",
"None",
",",
"4",
",",
"None",
... | false | 0 | [
"2",
"self",
"60",
"85",
"111",
"drop_none",
"38",
"92",
"ref",
"77",
"90",
"105",
"117",
"remapped",
"7",
"81",
"95",
"109",
"orig"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 37,
"after_index": 40,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 59,
"after_index": 6... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mahmoud/boltons/tests/test_iterutils.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_drop_nones(self) :
orig = {
'a' : 1,
'b' : None,
'c' : [3, None, 4, None],
}
ref = {
'a' : 1,
'c' : [3, 4],
}
drop_none = (lambda p, k, v : (v is not None))
remapped = remap (orig, visit = drop_none)
assert (remapped == ref)
orig = ([... | No |
905 | [
"#NEWLINE#",
"def _is_web_user(",
"owner_id",
")",
":",
"#NEWLINE#",
"#INDENT#",
"from",
"corehq.apps.users.models",
"import",
"WebUser",
"#NEWLINE#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"document",
"=",
"WebUser",
".",
"get_db",
"(",
")",
".",
"get",
"(",
"owner... | false | 0 | [
"16",
"35",
"51",
"document",
"2",
"26",
"owner_id"
] | 0 | NONE | [] | [
[
{
"before_index": 49,
"after_index": 59,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 30,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dimagi/commcare-hq/corehq/ex-submodules/casexml/apps/phone/cleanliness.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def _is_web_user(owner_id) :
from corehq.apps.users.models import WebUser
try :
document = WebUser.get_db ().get (owner_id)
except ResourceNotFound :
document = {
'doc_type' : 'unknown',
}
return (document.get ('doc_type', None) == 'WebUser')
Is there a bug in the code abov... | No |
906 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"code",
",",
"name",
",",
"description",
",",
"unit",
",",
"category",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"code",
"=",
"code",
"#NEWLINE#",
"self",
".",
"name",
"=",
"name",
"#NEWLINE#",
"self",
".",
... | false | 0 | [
"10",
"37",
"39",
"unit",
"8",
"31",
"33",
"description",
"6",
"25",
"27",
"name",
"4",
"19",
"21",
"code",
"12",
"43",
"45",
"category",
"2",
"17",
"23",
"29",
"35",
"41",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dimagi/commcare-hq/custom/openlmis/api.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, code, name, description, unit, category) :
self.code = code
self.name = name
self.description = description
self.unit = unit
self.category = category
Is there a bug in the code above? | No |
907 | [
"#NEWLINE#",
"def test_formset_error_class(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"class CustomErrorList",
"(",
"ErrorList",
")",
":",
"#NEWLINE#",
"#INDENT#",
"pass",
"#NEWLINE#",
"#UNINDENT#",
"formset",
"=",
"FavoriteDrinksFormSet",
"(",
"error_class",
"=",
"C... | false | 0 | [
"17",
"30",
"formset",
"2",
"26",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 16,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": 38,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudera/hue/desktop/core/ext-py/Django-1.6.10/tests/forms_tests/tests/test_formsets.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_formset_error_class(self) :
class CustomErrorList (ErrorList) :
pass
formset = FavoriteDrinksFormSet (error_class = CustomErrorList)
self.assertEqual (formset.forms [0].error_class, CustomErrorList)
Is there a bug in the code above? | No |
908 | [
"#NEWLINE#",
"def test_givens(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"data",
"=",
"numpy",
".",
"float32",
"(",
"[",
"1",
",",
"2",
",",
"3",
",",
"4",
"]",
")",
"#NEWLINE#",
"x",
"=",
"f32sc",
"(",
"data",
")",
"#NEWLINE#",
"y",
"=",
"(",
"x",
"**"... | false | 0 | [
"30",
"47",
"y",
"23",
"33",
"54",
"57",
"x",
"38",
"67",
"f",
"6",
"27",
"data"
] | 0 | NONE | [] | [
[
{
"before_index": 5,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": 26,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 29,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "rizar/attention-lvcsr/libs/Theano/theano/sandbox/cuda/tests/test_var.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_givens() :
data = numpy.float32 ([1, 2, 3, 4])
x = f32sc (data)
y = (x ** 2)
f = theano.function ([], y, givens = {
x : (x + 1),
})
f ()
Is there a bug in the code above? | No |
909 | [
"#NEWLINE#",
"@",
"with_attributes",
"(",
"True",
",",
"False",
")",
"#NEWLINE#",
"@",
"with_text",
"(",
"text",
"=",
"True",
",",
"utext",
"=",
"True",
")",
"#NEWLINE#",
"@",
"serialized",
"#NEWLINE#",
"def bench_parse_bytesIO(",
"self",
",",
"root_xml",
")",... | false | 0 | [
"32",
"45",
"f",
"25",
"39",
"self",
"27",
"36",
"root_xml"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 26,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 31,
"after_index": 35,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 38,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudera/hue/desktop/core/ext-py/lxml-3.3.6/benchmark/bench_etree.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ with_attributes (True, False)
@ with_text (text = True, utext = True)
@ serialized
def bench_parse_bytesIO(self, root_xml) :
f = BytesIO (root_xml)
self.etree.parse (f)
Is there a bug in the code above? | No |
910 | [
"#NEWLINE#",
"@",
"nochange",
"#NEWLINE#",
"@",
"onlylib",
"(",
"'lxe'",
")",
"#NEWLINE#",
"def bench_xpath_single(",
"self",
",",
"root",
")",
":",
"#NEWLINE#",
"#INDENT#",
"xpath",
"=",
"self",
".",
"_bench_xpath_single_xpath",
"#NEWLINE#",
"if",
"(",
"xpath",
... | false | 0 | [
"13",
"87",
"root",
"34",
"77",
"ns",
"11",
"20",
"39",
"54",
"58",
"self",
"36",
"67",
"tag",
"18",
"26",
"52",
"85",
"xpath"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudera/hue/desktop/core/ext-py/lxml-3.3.6/benchmark/bench_etree.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ nochange
@ onlylib ('lxe')
def bench_xpath_single(self, root) :
xpath = self._bench_xpath_single_xpath
if (xpath is None) :
(ns, tag) = self.SEARCH_TAG [1 :].split ('}')
xpath = self._bench_xpath_single_xpath = self.etree.XPath (('.//p:%s[1]' % tag), namespaces = {
'p' : ns,... | No |
911 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"timeout",
"=",
"30",
",",
"client_request_id",
"=",
"None",
",",
"return_client_request_id",
"=",
"None",
",",
"ocp_date",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"timeout",
"=",
"timeout",
"#NEW... | false | 0 | [
"12",
"37",
"39",
"return_client_request_id",
"16",
"43",
"45",
"ocp_date",
"4",
"25",
"27",
"timeout",
"8",
"31",
"33",
"client_request_id",
"2",
"23",
"29",
"35",
"41",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": 27,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Azure/azure-sdk-for-python/azure-batch/azure/batch/models/compute_node_delete_user_options.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, timeout = 30, client_request_id = None, return_client_request_id = None, ocp_date = None) :
self.timeout = timeout
self.client_request_id = client_request_id
self.return_client_request_id = return_client_request_id
self.ocp_date = ocp_date
Is there a bug in the code above? | No |
912 | [
"#NEWLINE#",
"def get(",
"self",
",",
"if_modified_since",
"=",
"None",
",",
"headers",
"=",
"None",
",",
"redirect_limit",
"=",
"5",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"' Issue a ``GET`` request to this resource.\\n\\n :param headers: headers to be ... | false | 0 | [
"37",
"kwargs",
"4",
"30",
"if_modified_since",
"8",
"32",
"headers",
"2",
"24",
"self",
"12",
"34",
"redirect_limit"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "nigelsmall/httpstream/httpstream/http.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def get(self, if_modified_since = None, headers = None, redirect_limit = 5, **kwargs) :
' Issue a ``GET`` request to this resource.
:param headers: headers to be included in the request (optional)
:type headers: dict
:param redirect_limit: maximum number of redirects to be handled
... | No |
913 | [
"#NEWLINE#",
"def delete(",
"self",
",",
"headers",
"=",
"None",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"' Issue a ``DELETE`` request to this resource.\\n '",
"#NEWLINE#",
"rq",
"=",
"Request",
"(",
"'DELETE'",
",",
"self",
".",
"uri",
",",
"None... | false | 0 | [
"4",
"27",
"headers",
"2",
"21",
"self",
"36",
"kwargs",
"15",
"31",
"rq"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "nigelsmall/httpstream/httpstream/http.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def delete(self, headers = None, **kwargs) :
' Issue a ``DELETE`` request to this resource.
'
rq = Request ('DELETE', self.uri, None, headers)
return rq.submit (** kwargs)
Is there a bug in the code above? | No |
914 | [
"#NEWLINE#",
"def ikepolicy_update(",
"request",
",",
"ikepolicy_id",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"ikepolicy",
"=",
"neutronclient",
"(",
"request",
")",
".",
"update_ikepolicy",
"(",
"ikepolicy_id",
",",
"kwargs",
")",
".",
"get",
"(",
"... | false | 0 | [
"11",
"33",
"ikepolicy",
"22",
"kwargs",
"2",
"15",
"request",
"4",
"20",
"ikepolicy_id"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 26,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 30,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CiscoSystems/avos/openstack_dashboard/api/vpn.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def ikepolicy_update(request, ikepolicy_id, **kwargs) :
ikepolicy = neutronclient (request).update_ikepolicy (ikepolicy_id, kwargs).get ('ikepolicy')
return IKEPolicy (ikepolicy)
Is there a bug in the code above? | No |
915 | [
"#NEWLINE#",
"def test_toggle_unread(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"a",
"=",
"self",
".",
"ttr",
".",
"get_articles",
"(",
"self",
".",
"article",
".",
"id",
")",
"[",
"0",
"]",
"#NEWLINE#",
"unread",
"=",
"a",
".",
"unread",
"#NEWLINE#",
... | false | 0 | [
"2",
"9",
"15",
"31",
"48",
"self",
"25",
"29",
"55",
"57",
"unread",
"7",
"27",
"37",
"42",
"53",
"a"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 28,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 30,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Vassius/ttrss-python/tests/tests.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_toggle_unread(self) :
a = self.ttr.get_articles (self.article.id) [0]
unread = a.unread
self.ttr.toggle_unread (a.id)
a.refresh_status ()
self.assertFalse ((a.unread == unread))
Is there a bug in the code above? | No |
916 | [
"#NEWLINE#",
"def compose(",
"code",
",",
"game_program",
"=",
"game",
")",
":",
"#NEWLINE#",
"#INDENT#",
"global",
"game",
"#NEWLINE#",
"if",
"(",
"game_program",
"is",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"game",
"=",
"game_program",
"=",
"Game",
"(",
... | false | 0 | [
"41",
"47",
"builder",
"32",
"51",
"64",
"67",
"73",
"python_land",
"6",
"12",
"23",
"76",
"game",
"2",
"38",
"code",
"54",
"60",
"turist",
"4",
"16",
"25",
"81",
"game_program"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 31,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "gutomaia/pyNES/pynes/composer.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def compose(code, game_program = game) :
global game
if (game_program is None) :
game = game_program = Game ()
python_land = ast.parse (code)
builder = PyNesTransformer ()
builder.visit (python_land)
turist = PyNesVisitor ()
turist.visit (python_land)
python_land = ast.fix_m... | No |
917 | [
"#NEWLINE#",
"def _get_config_callback(",
"commands_to_run",
")",
":",
"#NEWLINE#",
"#INDENT#",
"config_callback",
"=",
"None",
"#NEWLINE#",
"if",
"(",
"len",
"(",
"commands_to_run",
")",
"!=",
"1",
")",
":",
"#NEWLINE#",
"#INDENT#",
"raise",
"Exception",
"(",
"'M... | false | 0 | [
"41",
"59",
"module",
"7",
"73",
"89",
"config_callback",
"2",
"15",
"32",
"commands_to_run",
"53",
"64",
"module_dict",
"30",
"46",
"c",
"43",
"66",
"command",
"62",
"75",
"command_callable"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 29,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "prestodb/presto-admin/prestoadmin/main.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def _get_config_callback(commands_to_run) :
config_callback = None
if (len (commands_to_run) != 1) :
raise Exception ('Multiple commands are not supported')
c = commands_to_run [0] [0]
(module, command) = c.split ('.')
module_dict = state.commands [module]
command_callable = module_di... | No |
918 | [
"#NEWLINE#",
"@",
"cli",
".",
"command",
"(",
")",
"#NEWLINE#",
"@",
"click",
".",
"option",
"(",
"'--dest'",
",",
"type",
"=",
"click",
".",
"Choice",
"(",
"[",
"'production'",
",",
"'staging'",
",",
"'localhost'",
",",
"'vagrant'",
",",
"'custom'",
"]"... | false | 0 | [
"118",
"246",
"271",
"286",
"298",
"314",
"338",
"354",
"inventory",
"142",
"146",
"152",
"170",
"208",
"227",
"environ",
"347",
"369",
"389",
"403",
"416",
"424",
"440",
"cmd",
"116",
"199",
"218",
"vagrant_machine",
"114",
"412",
"ask_sudo_pass",
"112"... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 111,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 122,
"after_index": 124,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 126,
"after_inde... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "getweber/weber-micro/manage.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ cli.command ()
@ click.option ('--dest', type = click.Choice (['production', 'staging', 'localhost', 'vagrant', 'custom']), help = 'Deployment target', required = True)
@ click.option ('-i', '--inventory', type = str, default = None, help = 'Path to an inventory file. Should be specified only when "--dest custom" i... | No |
919 | [
"#NEWLINE#",
"def removeWriter(",
"self",
",",
"writer",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Implement L{IReactorFDSet.removeWriter}.\\n '",
"#NEWLINE#",
"wasLost",
"=",
"False",
"#NEWLINE#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"fd",
"=",
"writer",
"."... | false | 0 | [
"2",
"59",
"98",
"105",
"118",
"126",
"146",
"self",
"4",
"21",
"71",
"writer",
"19",
"32",
"42",
"54",
"96",
"111",
"116",
"130",
"150",
"fd",
"56",
"73",
"fdes",
"11",
"78",
"137",
"wasLost"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 13,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "twisted/twisted/twisted/internet/kqreactor.py",
"license": "mit",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def removeWriter(self, writer) :
'
Implement L{IReactorFDSet.removeWriter}.
'
wasLost = False
try :
fd = writer.fileno ()
except :
fd = (- 1)
if (fd == (- 1)) :
for (fd, fdes) in self._selectables.items () :
if (writer is fdes) :
... | No |
920 | [
"#NEWLINE#",
"def test_register_exposed_object(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"_register_aliases",
"(",
"objects",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'jane'",
":",
"42",
",",
"#NEWLINE#",
"#UNINDENT#",
"}",
")",
"#NEWLINE#",
"aliases",
... | false | 0 | [
"107",
"119",
"build_file",
"25",
"46",
"62",
"78",
"94",
"aliases",
"2",
"7",
"27",
"35",
"51",
"67",
"83",
"100",
"113",
"122",
"136",
"150",
"self",
"111",
"130",
"144",
"156",
"parse_state"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 32,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 34,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pantsbuild/pants/tests/python/pants_test/build_graph/test_build_configuration.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_register_exposed_object(self) :
self._register_aliases (objects = {
'jane' : 42,
})
aliases = self.build_configuration.registered_aliases ()
self.assertEqual ({
}, aliases.target_types)
self.assertEqual ({
}, aliases.target_macro_factories)
self.assertEqua... | No |
921 | [
"#NEWLINE#",
"def _header(",
"parent",
",",
"label",
",",
"styles",
")",
":",
"#NEWLINE#",
"#INDENT#",
"text",
"=",
"wx",
".",
"StaticText",
"(",
"parent",
",",
"label",
"=",
"label",
")",
"#NEWLINE#",
"font_size",
"=",
"text",
".",
"GetFont",
"(",
")",
... | false | 0 | [
"24",
"43",
"font_size",
"11",
"26",
"52",
"60",
"text",
"36",
"56",
"font",
"2",
"17",
"parent",
"6",
"49",
"styles",
"4",
"19",
"21",
"label"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "chriskiehl/Gooey/gooey/gui/util/wx_util.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def _header(parent, label, styles) :
text = wx.StaticText (parent, label = label)
font_size = text.GetFont ().GetPointSize ()
font = wx.Font ((font_size * 1.2), * styles)
text.SetFont (font)
return text
Is there a bug in the code above? | No |
922 | [
"#NEWLINE#",
"@",
"register_bounce_method",
"(",
"'downthenup'",
")",
"#NEWLINE#",
"def downthenup_bounce(",
"new_config",
",",
"new_app_running",
",",
"happy_new_tasks",
",",
"old_app_live_happy_tasks",
",",
"old_app_live_unhappy_tasks",
")",
":",
"#NEWLINE#",
"#INDENT#",
... | false | 0 | [
"10",
"37",
"new_app_running",
"14",
"32",
"47",
"old_app_live_happy_tasks",
"16",
"52",
"old_app_live_unhappy_tasks",
"8",
"new_config",
"12",
"happy_new_tasks"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Yelp/paasta/paasta_tools/bounce_lib.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ register_bounce_method ('downthenup')
def downthenup_bounce(new_config, new_app_running, happy_new_tasks, old_app_live_happy_tasks, old_app_live_unhappy_tasks) :
'Stops any old apps and waits for them to die before starting a new one.
See the docstring for brutal_bounce() for parameters and return value.
... | No |
923 | [
"#NEWLINE#",
"def parse(",
"input_filename",
"=",
"'default.effect'",
",",
"output_filename",
"=",
"'default.json'",
",",
"asset_url",
"=",
"''",
",",
"asset_root",
"=",
"'.'",
",",
"infiles",
"=",
"None",
",",
"options",
"=",
"None",
")",
":",
"#NEWLINE#",
"#... | false | 0 | [
"6",
"169",
"193",
"output_filename",
"18",
"infiles",
"51",
"108",
"effects",
"138",
"161",
"meta",
"127",
"159",
"shader",
"95",
"149",
"167",
"175",
"json_asset",
"2",
"38",
"78",
"input_filename",
"68",
"87",
"183",
"202",
"e",
"10",
"asset_url",
"10... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": 29,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 180,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "turbulenz/turbulenz_tools/turbulenz_tools/tools/effect2json.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def parse(input_filename = 'default.effect', output_filename = 'default.json', asset_url = '', asset_root = '.', infiles = None, options = None) :
'
Untility function to convert a Effect Yaml (.effect) into a JSON file.
Known built-in textures are: default, quadratic, white, nofalloff, black, flat
'
... | No |
924 | [
"#NEWLINE#",
"def signal(",
"self",
",",
"type",
",",
"name",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"log",
".",
"append",
"(",
"(",
"'sg'",
",",
"type",
",",
"name",
")",
")"
] | false | 0 | [
"6",
"22",
"name",
"4",
"20",
"type",
"2",
"11",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Evgenus/protocyt/protocyt/tests/utils.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def signal(self, type, name) :
self.log.append (('sg', type, name))
Is there a bug in the code above? | No |
925 | [
"#NEWLINE#",
"def add_instruction(",
"self",
",",
"reil_instruction",
",",
"comment",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Add an instruction for analysis.\\n '",
"#NEWLINE#",
"if",
"(",
"reil_instruction",
".",
"mnemonic",
"==",
"ReilMnemonic",
".",
... | false | 0 | [
"2",
"30",
"44",
"69",
"83",
"95",
"127",
"143",
"self",
"4",
"17",
"36",
"56",
"75",
"101",
"reil_instruction",
"28",
"50",
"67",
"89",
"addr",
"93",
"113",
"smt_exprs",
"106",
"120",
"idx",
"6",
"135",
"comment",
"108",
"133",
"149",
"smt_expr"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "programa-stic/barf-project/barf/barf/analysis/codeanalyzer/codeanalyzer.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def add_instruction(self, reil_instruction, comment = None) :
'Add an instruction for analysis.
'
if (reil_instruction.mnemonic == ReilMnemonic.LDM) :
addr = self._translator.convert_to_bitvec (reil_instruction.operands [0])
self.read_addrs.append (addr)
if (reil_instruction.mnemoni... | No |
926 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"panel",
",",
"input",
",",
"*",
"attrs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"wx",
".",
"grid",
".",
"Grid",
".",
"__init__",
"(",
"self",
",",
"panel",
")",
"#NEWLINE#",
"fontsize",
"=",
"9",
"#NEWLINE#",
"self... | false | 0 | [
"2",
"22",
"31",
"37",
"43",
"53",
"57",
"64",
"77",
"83",
"89",
"96",
"104",
"109",
"119",
"124",
"134",
"139",
"149",
"154",
"164",
"169",
"179",
"184",
"194",
"199",
"207",
"self",
"9",
"50",
"attrs",
"27",
"47",
"fontsize",
"4",
"24",
"pane... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 3,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 23,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ipython/ipython-py3k/IPython/deathrow/igrid.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, panel, input, * attrs) :
wx.grid.Grid.__init__ (self, panel)
fontsize = 9
self.input = input
self.table = IGridTable (self.input, fontsize, * attrs)
self.SetTable (self.table, True)
self.SetSelectionMode (wx.grid.Grid.wxGridSelectRows)
self.SetDefaultRenderer (IGrid... | No |
927 | [
"#NEWLINE#",
"def pickinputattr(",
"self",
",",
"row",
",",
"col",
")",
":",
"#NEWLINE#",
"#INDENT#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"attr",
"=",
"self",
".",
"table",
".",
"_displayattrs",
"[",
"col",
"]",
"#NEWLINE#",
"value",
"=",
"attr",
".",
"va... | false | 0 | [
"2",
"17",
"32",
"50",
"83",
"self",
"65",
"73",
"api",
"4",
"38",
"row",
"6",
"23",
"col",
"46",
"56",
"exc",
"26",
"30",
"79",
"87",
"value",
"15",
"28",
"attr"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ipython/ipython-py3k/IPython/deathrow/igrid.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def pickinputattr(self, row, col) :
try :
attr = self.table._displayattrs [col]
value = attr.value (self.table.items [row])
except Exception as exc :
self.error_output (str (exc))
else :
api = ipapi.get ()
api.set_next_input (str (value))
self.quit (value)
... | No |
928 | [
"#NEWLINE#",
"def _do_home_key(",
"self",
",",
"event",
"=",
"None",
",",
"select",
"=",
"False",
")",
":",
"#NEWLINE#",
"#INDENT#",
"' Performs home key action '",
"#NEWLINE#",
"delta",
"=",
"(",
"self",
".",
"textCursor",
"(",
")",
".",
"positionInBlock",
"(",... | false | 0 | [
"8",
"57",
"select",
"2",
"20",
"32",
"42",
"113",
"self",
"17",
"72",
"91",
"delta",
"48",
"61",
"89",
"109",
"move",
"4",
"121",
"125",
"event",
"40",
"79",
"99",
"117",
"cursor"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "OpenCobolIDE/OpenCobolIDE/open_cobol_ide/extlibs/pyqode/core/api/code_edit.py",
"license": "gpl-3.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def _do_home_key(self, event = None, select = False) :
' Performs home key action '
delta = (self.textCursor ().positionInBlock () - TextHelper (self).line_indent ())
cursor = self.textCursor ()
move = QtGui.QTextCursor.MoveAnchor
if select :
move = QtGui.QTextCursor.KeepAnchor
if (de... | No |
929 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"request_validator",
",",
"supported_token_types",
"=",
"None",
",",
"enable_jsonp",
"=",
"False",
")",
":",
"#NEWLINE#",
"#INDENT#",
"BaseEndpoint",
".",
"__init__",
"(",
"self",
")",
"#NEWLINE#",
"self",
".",
"request_v... | false | 0 | [
"2",
"21",
"24",
"30",
"37",
"42",
"self",
"6",
"32",
"35",
"supported_token_types",
"10",
"44",
"46",
"enable_jsonp",
"4",
"26",
"28",
"request_validator"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "idan/oauthlib/oauthlib/oauth2/rfc6749/endpoints/revocation.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, request_validator, supported_token_types = None, enable_jsonp = False) :
BaseEndpoint.__init__ (self)
self.request_validator = request_validator
self.supported_token_types = (supported_token_types or self.valid_token_types)
self.enable_jsonp = enable_jsonp
Is there a bug in the ... | No |
930 | [
"#NEWLINE#",
"def test_events_ops(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"ctx",
",",
"cluster",
")",
"=",
"self",
".",
"_make_sample",
"(",
")",
"#NEWLINE#",
"st_name",
"=",
"'some_name'",
"#NEWLINE#",
"st_type",
"=",
"'some_type'",
"#NEWLINE#",
"st_... | false | 0 | [
"62",
"85",
"94",
"ncluster",
"23",
"55",
"118",
"st_type",
"8",
"39",
"70",
"146",
"188",
"255",
"278",
"ctx",
"2",
"13",
"33",
"64",
"77",
"102",
"114",
"126",
"140",
"184",
"197",
"209",
"223",
"235",
"249",
"274",
"self",
"19",
"50",
"106",
... | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/sahara/sahara/tests/unit/conductor/test_api.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_events_ops(self) :
(ctx, cluster) = self._make_sample ()
st_name = 'some_name'
st_type = 'some_type'
st_info = 'some_info'
step_id = self.api.cluster_provision_step_add (ctx, cluster.id, {
'step_name' : st_name,
'step_type' : st_type,
})
ncluster = self.api.clus... | No |
931 | [
"#NEWLINE#",
"def _get_requested_diff_file(",
"self",
",",
"diffset",
",",
"filediff",
",",
"interdiffset",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"Fetches information on the requested diff.\\n\\n This will look up information on the diff that's to be rendered\\n and return it,... | false | 0 | [
"15",
"33",
"41",
"49",
"files",
"6",
"21",
"filediff",
"2",
"27",
"58",
"78",
"self",
"47",
"71",
"101",
"file",
"8",
"23",
"interdiffset",
"4",
"19",
"diffset"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "reviewboard/reviewboard/reviewboard/diffviewer/views.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def _get_requested_diff_file(self, diffset, filediff, interdiffset) :
"Fetches information on the requested diff.
This will look up information on the diff that's to be rendered
and return it, if found. It may also augment it with additional
data.
The file will not contain chunk i... | No |
932 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"NetBEUI_Name",
"=",
"None",
",",
"Full_Name",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"NetBEUI_Name",
"=",
"NetBEUI_Name",
"#NEWLINE#",
"self",
".",
"Full_Name",
"=",
"Full_Name"
] | false | 0 | [
"8",
"23",
"25",
"Full_Name",
"2",
"15",
"21",
"self",
"4",
"17",
"19",
"NetBEUI_Name"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 19,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CybOXProject/python-cybox/cybox/bindings/win_computer_account_object.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, NetBEUI_Name = None, Full_Name = None) :
self.NetBEUI_Name = NetBEUI_Name
self.Full_Name = Full_Name
Is there a bug in the code above? | No |
933 | [
"#NEWLINE#",
"def exportChildren(",
"self",
",",
"lwrite",
",",
"level",
",",
"namespace_",
"=",
"'WinComputerAccountObj:'",
",",
"name_",
"=",
"'KerberosType'",
",",
"fromsubclass_",
"=",
"False",
",",
"pretty_print",
"=",
"True",
")",
":",
"#NEWLINE#",
"#INDENT#... | false | 0 | [
"20",
"28",
"73",
"75",
"106",
"108",
"pretty_print",
"16",
"fromsubclass_",
"12",
"69",
"102",
"name_",
"2",
"48",
"57",
"81",
"90",
"self",
"32",
"41",
"eol_",
"8",
"namespace_",
"4",
"63",
"96",
"lwrite",
"6",
"65",
"98",
"level"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 27,
"after_index": 28,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 46,
"after_index": 5... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CybOXProject/python-cybox/cybox/bindings/win_computer_account_object.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def exportChildren(self, lwrite, level, namespace_ = 'WinComputerAccountObj:', name_ = 'KerberosType', fromsubclass_ = False, pretty_print = True) :
if pretty_print :
eol_ = '
'
else :
eol_ = ''
if (self.Delegation is not None) :
self.Delegation.export (lwrite, level, 'WinComputerAccou... | No |
934 | [
"#NEWLINE#",
"def initial_context(",
"self",
",",
"request",
",",
"id",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"not",
"(",
"'feature_vote:votes'",
"in",
"request",
".",
"session",
")",
")",
":",
"#NEWLINE#",
"#INDENT#",
"request",
".",
"session",
"[",
... | false | 0 | [
"6",
"46",
"48",
"70",
"id",
"2",
"self",
"4",
"17",
"25",
"59",
"request",
"40",
"55",
"68",
"81",
"feature"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 39,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mollyproject/mollyproject/molly/apps/feature_vote/views.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def initial_context(self, request, id) :
if (not ('feature_vote:votes' in request.session)) :
request.session ['feature_vote:votes'] = {
}
feature = get_object_or_404 (Feature, id = id, is_public = True)
feature.vote = request.session ['feature_vote:votes'].get (feature.id, 0)
ret... | No |
935 | [
"#NEWLINE#",
"def get_header(",
"self",
",",
"lang",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"localize",
"(",
"self",
".",
"display",
",",
"lang",
")"
] | false | 0 | [
"4",
"16",
"lang",
"2",
"12",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 10... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dimagi/commcare-hq/corehq/apps/userreports/reports/specs.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def get_header(self, lang) :
return localize (self.display, lang)
Is there a bug in the code above? | No |
936 | [
"#NEWLINE#",
"@",
"classmethod",
"#NEWLINE#",
"def wrap(",
"cls",
",",
"obj",
")",
":",
"#NEWLINE#",
"#INDENT#",
"_add_column_id_if_missing",
"(",
"obj",
")",
"#NEWLINE#",
"if",
"(",
"obj",
".",
"get",
"(",
"'aggregation'",
")",
"==",
"'expand'",
")",
":",
"... | false | 0 | [
"5",
"58",
"cls",
"7",
"14",
"19",
"32",
"37",
"49",
"63",
"obj"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dimagi/commcare-hq/corehq/apps/userreports/reports/specs.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ classmethod
def wrap(cls, obj) :
_add_column_id_if_missing (obj)
if (obj.get ('aggregation') == 'expand') :
del obj ['aggregation']
obj ['type'] = 'expanded'
return ExpandedColumn.wrap (obj)
return super (FieldColumn, cls).wrap (obj)
Is there a bug in the code above? | No |
937 | [
"#NEWLINE#",
"def check_password(",
"raw_password",
",",
"enc_password",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Returns a boolean of whether the raw_password was correct. Handles\\n encryption formats behind the scenes.\\n '",
"#NEWLINE#",
"(",
"algo",
",",
"salt",
",",
"h... | true | 37 | [
"2",
"12",
"33",
"4",
"19",
"37",
"16",
"29",
"14",
"35"
] | 1 | VARIABLE_MISUSE | [
2
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 22,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "adieu/django-nonrel/django/contrib/auth/models.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def check_password(raw_password, enc_password) :
'
Returns a boolean of whether the raw_password was correct. Handles
encryption formats behind the scenes.
'
(algo, salt, hsh) = enc_password.split ('$')
return constant_time_compare (hsh, get_hexdigest (algo, salt, enc_password))
Is there a ... | Yes |
938 | [
"#NEWLINE#",
"def _get_result(",
"self",
",",
"mods1",
",",
"mods2",
",",
"metric_key",
")",
":",
"#NEWLINE#",
"#INDENT#",
"key",
"=",
"self",
".",
"_get_score_key",
"(",
"mods1",
",",
"mods2",
",",
"metric_key",
")",
"#NEWLINE#",
"return",
"self",
".",
"log... | true | 33 | [
"13",
"8",
"23",
"6",
"21",
"4",
"19",
"33",
"2",
"15",
"27"
] | 1 | VARIABLE_MISUSE | [
13
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "omangin/multimodal/multimodal/experiment.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def _get_result(self, mods1, mods2, metric_key) :
key = self._get_score_key (mods1, mods2, metric_key)
return self.logger.get_stats (mods1)
Is there a bug in the code above? | Yes |
939 | [
"#NEWLINE#",
"def _write_xdr_sp_pr(",
"self",
",",
"index",
",",
"col_absolute",
",",
"row_absolute",
",",
"width",
",",
"height",
",",
"shape",
")",
":",
"#NEWLINE#",
"#INDENT#",
"attributes",
"=",
"[",
"]",
"#NEWLINE#",
"self",
".",
"_xml_start_tag",
"(",
"'... | true | 114 | [
"8",
"39",
"6",
"37",
"2",
"24",
"33",
"48",
"75",
"98",
"121",
"147",
"157",
"166",
"19",
"30",
"4",
"12",
"43",
"10",
"41",
"114",
"14",
"45",
"52",
"56",
"65",
"91",
"127",
"141",
"151",
"161"
] | 1 | VARIABLE_MISUSE | [
14,
45,
52,
56,
65,
91,
127,
141,
151,
161
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "jmcnamara/XlsxWriter/xlsxwriter/drawing.py",
"license": "bsd-2-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def _write_xdr_sp_pr(self, index, col_absolute, row_absolute, width, height, shape) :
attributes = []
self._xml_start_tag ('xdr:spPr', attributes)
self._write_a_xfrm (col_absolute, row_absolute, width, height, shape)
self._write_a_prst_geom (shape)
if shape.fill :
if (not shape.fill ['... | Yes |
940 | [
"#NEWLINE#",
"def dispatch(",
"self",
",",
"request",
",",
"*",
"args",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"super",
"(",
"DynamicTemplateView",
",",
"self",
")",
".",
"dispatch",
"(",
"request",
",",
"*",
"request",
",",
"**",
"k... | true | 27 | [
"2",
"19",
"7",
"4",
"24",
"27",
"30"
] | 1 | VARIABLE_MISUSE | [
7
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 3,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 25,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "chhantyal/dj-dynamic-forms/dynamic_forms/views.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def dispatch(self, request, * args, **kwargs) :
return super (DynamicTemplateView, self).dispatch (request, * request, ** kwargs)
Is there a bug in the code above? | Yes |
941 | [
"#NEWLINE#",
"@",
"run_with_all_backends",
"#NEWLINE#",
"def test_form_extras(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"domain",
"=",
"uuid",
".",
"uuid4",
"(",
")",
".",
"hex",
"#NEWLINE#",
"LOOSE_SYNC_TOKEN_VALIDATION",
".",
"set",
"(",
"domain",
",",
"True... | true | 87 | [
"5",
"95",
"33",
"71",
"99",
"53",
"43",
"56",
"87",
"78",
"101",
"10",
"24",
"47",
"49",
"82"
] | 1 | VARIABLE_MISUSE | [
53
] | [
[
{
"before_index": 9,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index": 25,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 32,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dimagi/commcare-hq/corehq/ex-submodules/casexml/apps/case/tests/test_factory.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ run_with_all_backends
def test_form_extras(self) :
domain = uuid.uuid4 ().hex
LOOSE_SYNC_TOKEN_VALIDATION.set (domain, True, namespace = 'domain')
token_id = uuid.uuid4 ().hex
factory = CaseFactory (domain = domain)
[case] = factory.create_or_update_case (CaseStructure (), form_extras = {
... | Yes |
942 | [
"#NEWLINE#",
"def unbind(",
"self",
",",
"event",
",",
"callback",
")",
":",
"#NEWLINE#",
"#INDENT#",
"' unbind to a global event '",
"#NEWLINE#",
"self",
".",
"_emitter",
".",
"unsubscribe",
"(",
"event",
",",
"event",
")"
] | true | 21 | [
"2",
"13",
"4",
"19",
"21",
"6"
] | 1 | VARIABLE_MISUSE | [
6
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "benoitc/gaffer/gaffer/httpclient/websocket.py",
"license": "mit",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def unbind(self, event, callback) :
' unbind to a global event '
self._emitter.unsubscribe (event, event)
Is there a bug in the code above? | Yes |
943 | [
"#NEWLINE#",
"def jingo_view(",
"request",
")",
":",
"#NEWLINE#",
"#INDENT#",
"num",
"=",
"2",
"#NEWLINE#",
"return",
"render",
"(",
"request",
",",
"'base/jingo_page.html'",
",",
"{",
"#NEWLINE#",
"#INDENT#",
"'title'",
":",
"_",
"(",
"'This is a title'",
")",
... | true | 38 | [
"7",
"46",
"2",
"14",
"38"
] | 1 | VARIABLE_MISUSE | [
7,
46
] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mozilla/puente/test_project_jingo/test_project/base/views.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def jingo_view(request) :
num = 2
return render (request, 'base/jingo_page.html', {
'title' : _ ('This is a title'),
'nstring' : (ngettext ('%(num)s apple', '%(num)s apples', request) % {
'num' : num,
}),
'pstring' : pgettext ('sidebar', 'Click me'),
})
Is there a b... | Yes |
944 | [
"#NEWLINE#",
"def openRecent(",
"menu",
")",
":",
"#NEWLINE#",
"#INDENT#",
"scriptWindow",
"=",
"menu",
".",
"ancestor",
"(",
"GafferUI",
".",
"ScriptWindow",
")",
"#NEWLINE#",
"currentScript",
"=",
"scriptWindow",
".",
"scriptNode",
"(",
")",
"#NEWLINE#",
"applic... | true | 110 | [
"37",
"52",
"68",
"81",
"2",
"9",
"59",
"86",
"155",
"175",
"26",
"54",
"74",
"95",
"110",
"76",
"124",
"130",
"141",
"18",
"28",
"122",
"7",
"20"
] | 1 | VARIABLE_MISUSE | [
76,
124,
130,
141
] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 25,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ImageEngine/gaffer/python/GafferUI/FileMenu.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def openRecent(menu) :
scriptWindow = menu.ancestor (GafferUI.ScriptWindow)
currentScript = scriptWindow.scriptNode ()
applicationRoot = currentScript.ancestor (Gaffer.ApplicationRoot)
recentFiles = []
with IECore.IgnoredExceptions (AttributeError) :
recentFiles = applicationRoot.__rec... | Yes |
945 | [
"#NEWLINE#",
"def __pathAndBookmarks(",
"scriptWindow",
")",
":",
"#NEWLINE#",
"#INDENT#",
"bookmarks",
"=",
"GafferUI",
".",
"Bookmarks",
".",
"acquire",
"(",
"scriptWindow",
",",
"pathType",
"=",
"Gaffer",
".",
"FileSystemPath",
",",
"category",
"=",
"'script'",
... | true | 111 | [
"7",
"82",
"28",
"44",
"66",
"111",
"48",
"56",
"62",
"76",
"91",
"109",
"2",
"15",
"30",
"86"
] | 1 | VARIABLE_MISUSE | [
7,
82
] | [
[
{
"before_index": 6,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 27,
"after_index": 40,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 43,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ImageEngine/gaffer/python/GafferUI/FileMenu.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __pathAndBookmarks(scriptWindow) :
bookmarks = GafferUI.Bookmarks.acquire (scriptWindow, pathType = Gaffer.FileSystemPath, category = 'script')
currentFileName = scriptWindow.scriptNode () ['fileName'].getValue ()
if currentFileName :
path = Gaffer.FileSystemPath (os.path.dirname (os.path.ab... | Yes |
946 | [
"#NEWLINE#",
"def renew_from_kt(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"cmdv",
"=",
"[",
"CONF",
".",
"KINIT_PATH",
".",
"get",
"(",
")",
",",
"'-k'",
",",
"'-t'",
",",
"CONF",
".",
"HUE_KEYTAB",
".",
"get",
"(",
")",
",",
"'-c'",
",",
"CONF",
".",
"C... | true | 59 | [
"6",
"70",
"64",
"96",
"104",
"121",
"129",
"142",
"158",
"59",
"165",
"169",
"176",
"184"
] | 1 | VARIABLE_MISUSE | [
6,
70
] | [
[
{
"before_index": 5,
"after_index": 8,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 47,
"after_index": 51,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 63,
"after_index": 7... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "cloudera/hue/desktop/core/src/desktop/kt_renewer.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def renew_from_kt() :
cmdv = [CONF.KINIT_PATH.get (), '-k', '-t', CONF.HUE_KEYTAB.get (), '-c', CONF.CCACHE_PATH.get (), CONF.HUE_PRINCIPAL.get ()]
LOG.info (('Reinitting kerberos from keytab: ' + ' '.join (NEED_KRB181_WORKAROUND)))
subp = subprocess.Popen (cmdv, stdout = subprocess.PIPE, stderr = subpro... | Yes |
947 | [
"#NEWLINE#",
"def test_K5(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Katz centrality: K5'",
"#NEWLINE#",
"G",
"=",
"networkx",
".",
"complete_graph",
"(",
"5",
")",
"#NEWLINE#",
"alpha",
"=",
"0.1",
"#NEWLINE#",
"b",
"=",
"networkx",
".",
"katz_centrality",
... | true | 127 | [
"2",
"33",
"54",
"58",
"71",
"76",
"87",
"92",
"114",
"132",
"18",
"30",
"106",
"22",
"69",
"98",
"125",
"127",
"46",
"74",
"130",
"81",
"108",
"110",
"9",
"28",
"52",
"62",
"94",
"104",
"118"
] | 1 | VARIABLE_MISUSE | [
58,
71,
76,
87,
92,
114,
132
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 20... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "gkno/gkno_launcher/src/networkx/algorithms/centrality/tests/test_katz_centrality.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_K5(self) :
'Katz centrality: K5'
G = networkx.complete_graph (5)
alpha = 0.1
b = networkx.katz_centrality (G, alpha)
v = math.sqrt ((1 / 5.0))
b_answer = dict.fromkeys (G, v)
for n in sorted (G) :
assert_almost_equal (b [n], b_answer [n])
nstart = dict ([(n, 1) for ... | Yes |
948 | [
"#NEWLINE#",
"def test_K5(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Katz centrality: K5'",
"#NEWLINE#",
"G",
"=",
"networkx",
".",
"complete_graph",
"(",
"5",
")",
"#NEWLINE#",
"alpha",
"=",
"0.1",
"#NEWLINE#",
"b",
"=",
"networkx",
".",
"katz_centrality",
... | true | 94 | [
"2",
"33",
"54",
"58",
"71",
"76",
"87",
"92",
"114",
"127",
"132",
"18",
"30",
"106",
"22",
"69",
"98",
"125",
"46",
"74",
"130",
"81",
"94",
"108",
"110",
"9",
"28",
"52",
"62",
"104",
"118"
] | 1 | VARIABLE_MISUSE | [
9,
28,
52,
62,
104,
118
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 17,
"after_index": 20... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "gkno/gkno_launcher/src/networkx/algorithms/centrality/tests/test_katz_centrality.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_K5(self) :
'Katz centrality: K5'
G = networkx.complete_graph (5)
alpha = 0.1
b = networkx.katz_centrality (G, alpha)
v = math.sqrt ((1 / 5.0))
b_answer = dict.fromkeys (G, v)
for n in sorted (G) :
assert_almost_equal (b [n], b_answer [n])
nstart = dict ([(n, 1) for ... | Yes |
949 | [
"#NEWLINE#",
"def build_end_indexes(",
"self",
",",
"end_pk_match",
")",
":",
"#NEWLINE#",
"#INDENT#",
"keys",
"=",
"end_pk_match",
".",
"lstrip",
"(",
")",
".",
"split",
"(",
"' PRIMARY KEY: '",
")",
"#NEWLINE#",
"key",
"=",
"keys",
"[",
"1",
"]",
".",
"rep... | true | 72 | [
"2",
"64",
"72",
"22",
"45",
"9",
"24",
"54",
"4",
"11",
"52"
] | 1 | VARIABLE_MISUSE | [
52
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 39... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "neo4j-contrib/neo4j-cassandra-connector/connector/cypher_queries_generator.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def build_end_indexes(self, end_pk_match) :
keys = end_pk_match.lstrip ().split (' PRIMARY KEY: ')
key = keys [1].replace ('{', '').replace ('}', '')
if (key == 'u') :
info_hash = keys [0].split (' ')
self.node.constraints.append (self [0])
Is there a bug in the code above? | Yes |
950 | [
"#NEWLINE#",
"def set_cache_buster(",
"self",
",",
"path",
",",
"hash",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Sets the cache buster value for a given file path'",
"#NEWLINE#",
"oz",
".",
"aws_cdn",
".",
"set_cache_buster",
"(",
"self",
".",
"redis",
"(",
")",
",",
"h... | true | 25 | [
"2",
"19",
"6",
"25",
"27",
"4"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dailymuse/oz/oz/aws_cdn/middleware.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def set_cache_buster(self, path, hash) :
'Sets the cache buster value for a given file path'
oz.aws_cdn.set_cache_buster (self.redis (), hash, hash)
Is there a bug in the code above? | Yes |
951 | [
"#NEWLINE#",
"def createBinaryMsg(",
"oscAddress",
",",
"dataArray",
",",
"typehint",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'create and return general type binary OSC msg\\n '",
"#NEWLINE#",
"m",
"=",
"OSC",
".",
"OSCMessage",
"(",
")",
"#NEWLINE#",
"m",
... | true | 42 | [
"6",
"30",
"40",
"42",
"2",
"27",
"4",
"32",
"15",
"23",
"36",
"47"
] | 1 | VARIABLE_MISUSE | [
6
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "kivy/kivy/kivy/lib/osc/oscAPI.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def createBinaryMsg(oscAddress, dataArray, typehint = None) :
'create and return general type binary OSC msg
'
m = OSC.OSCMessage ()
m.address = oscAddress
for x in dataArray :
m.append (x, x)
return m.getBinary ()
Is there a bug in the code above? | Yes |
952 | [
"#NEWLINE#",
"def test_merge_annotations__func__dict(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"ann1",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'val0'",
":",
"'val0'",
",",
"#NEWLINE#",
"'val1'",
":",
"1",
",",
"#NEWLINE#",
"'val2'",
":",
"2.2",
",",
"#NEWLINE#",
... | true | 377 | [
"326",
"393",
"317",
"377",
"391",
"178",
"359",
"299",
"384",
"7",
"164",
"264",
"301",
"339",
"308",
"386",
"290",
"364",
"162",
"310",
"341",
"86",
"172",
"266",
"319",
"348",
"2",
"335",
"344",
"353",
"369",
"170",
"328",
"350",
"269",
"366",... | 1 | VARIABLE_MISUSE | [
299,
384
] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 85,
"after_index": 88,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 161,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "NeuralEnsemble/python-neo/neo/test/coretest/test_base.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_merge_annotations__func__dict(self) :
ann1 = {
'val0' : 'val0',
'val1' : 1,
'val2' : 2.2,
'val3' : 'test1',
'val4' : [0.4],
'val5' : {
0 : 0,
1 : {
0 : 0,
},
},
'val6' : np.array ([0, 1, 2]),
}
... | Yes |
953 | [
"#NEWLINE#",
"def test_numpy_array_floating(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'test to make sure floating type numpy arrays are accepted'",
"#NEWLINE#",
"value",
"=",
"np",
".",
"array",
"(",
"[",
"1",
",",
"2",
",",
"3",
",",
"4",
",",
"5",
"]",
",",... | true | 64 | [
"2",
"34",
"58",
"45",
"62",
"64",
"9",
"42",
"52"
] | 1 | VARIABLE_MISUSE | [
2,
34,
58
] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 26,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 33,
"after_index": 39... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "NeuralEnsemble/python-neo/neo/test/coretest/test_base.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_numpy_array_floating(self) :
'test to make sure floating type numpy arrays are accepted'
value = np.array ([1, 2, 3, 4, 5], dtype = np.floating)
self.base.annotate (data = value)
result = {
'data' : value,
}
self.assertDictEqual (result, result.base.annotations)
Is there a ... | Yes |
954 | [
"#NEWLINE#",
"def unregister(",
"self",
",",
"fd",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"self",
".",
"_poller",
".",
"unregister",
"(",
"self",
")"
] | true | 16 | [
"4",
"2",
"10",
"16"
] | 1 | VARIABLE_MISUSE | [
4
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 13... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "felipecruz/zmqpy/zmqpy/eventloop/ioloop.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def unregister(self, fd) :
return self._poller.unregister (self)
Is there a bug in the code above? | Yes |
955 | [
"#NEWLINE#",
"def build_command_line(",
"project",
")",
":",
"#NEWLINE#",
"#INDENT#",
"command_line",
"=",
"[",
"'pychecker'",
"]",
"#NEWLINE#",
"command_args",
"=",
"project",
".",
"get_property",
"(",
"'pychecker_args'",
")",
"#NEWLINE#",
"if",
"command_args",
":",
... | true | 42 | [
"13",
"23",
"29",
"7",
"27",
"36",
"2",
"15",
"42"
] | 1 | VARIABLE_MISUSE | [
7,
27,
36
] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "pybuilder/pybuilder/src/main/python/pybuilder/plugins/python/pychecker_plugin.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def build_command_line(project) :
command_line = ['pychecker']
command_args = project.get_property ('pychecker_args')
if command_args :
command_line += command_args
else :
command_line += DEFAULT_PYCHECKER_ARGUMENTS
return project
Is there a bug in the code above? | Yes |
956 | [
"#NEWLINE#",
"def get_caption(",
"self",
",",
"draft",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"(",
"draft",
"and",
"self",
".",
"obj",
".",
"draft_caption",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"draft",
".",
"obj",
".",
"draft_caption"... | true | 25 | [
"4",
"13",
"25",
"2",
"15",
"33"
] | 1 | VARIABLE_MISUSE | [
2,
15,
33
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 32,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "reviewboard/reviewboard/reviewboard/reviews/ui/base.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def get_caption(self, draft = None) :
if (draft and self.obj.draft_caption) :
return draft.obj.draft_caption
return self.obj.caption
Is there a bug in the code above? | Yes |
957 | [
"#NEWLINE#",
"def count_discussions_handler(",
"sender",
",",
"**kwargs",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Update the count of each type of discussion on an entry.\\n '",
"#NEWLINE#",
"if",
"(",
"kwargs",
".",
"get",
"(",
"'instance'",
")",
"and",
"kwargs",
".... | true | 64 | [
"55",
"71",
"75",
"83",
"87",
"95",
"99",
"107",
"33",
"57",
"64",
"13",
"20",
"40",
"43",
"49",
"2"
] | 1 | VARIABLE_MISUSE | [
55,
71,
75,
83,
87,
95,
99,
107
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 19,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Fantomas42/django-blog-zinnia/zinnia/signals.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def count_discussions_handler(sender, **kwargs) :
'
Update the count of each type of discussion on an entry.
'
if (kwargs.get ('instance') and kwargs.get ('created')) :
return
comment = ((('comment' in kwargs) and kwargs ['comment']) or kwargs ['instance'])
entry = comment.content_objec... | Yes |
958 | [
"#NEWLINE#",
"def authenticate_user(",
"request",
")",
":",
"#NEWLINE#",
"#INDENT#",
"(",
"key",
",",
"secret",
")",
"=",
"get_basic_auth_data",
"(",
"request",
")",
"#NEWLINE#",
"if",
"(",
"key",
"and",
"secret",
")",
":",
"#NEWLINE#",
"#INDENT#",
"try",
":",... | true | 73 | [
"2",
"15",
"10",
"22",
"41",
"77",
"31",
"54",
"62",
"67",
"73",
"82",
"8",
"20",
"37"
] | 1 | VARIABLE_MISUSE | [
8,
20,
37
] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mvantellingen/localshop/localshop/apps/permissions/utils.py",
"license": "mit",
"note": "license: github_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def authenticate_user(request) :
(key, secret) = get_basic_auth_data (request)
if (key and secret) :
try :
user = authenticate (access_key = key, secret_key = secret)
except (DatabaseError, DataError) :
user = None
if (not user) :
user = authenticate (username... | Yes |
959 | [
"#NEWLINE#",
"def get_inbox_entries(",
"request",
",",
"inbox",
",",
"hide_comments",
"=",
"False",
",",
"entries_per_page",
"=",
"20",
",",
"filter",
"=",
"False",
",",
"view",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"entries",
"=",
"api",
".",
"ent... | true | 37 | [
"25",
"53",
"63",
"84",
"96",
"14",
"42",
"6",
"4",
"35",
"37",
"79",
"2",
"31",
"59",
"94",
"18",
"45",
"65",
"71",
"98",
"10",
"74"
] | 1 | VARIABLE_MISUSE | [
6
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": 34,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 40,
"after_index": 4... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CollabQ/CollabQ/common/helper.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def get_inbox_entries(request, inbox, hide_comments = False, entries_per_page = 20, filter = False, view = None) :
entries = api.entry_get_entries (request.user, inbox, inbox)
if (filter and (view is not None)) :
entries = api.filter_entries (request.user, entries, view.nick)
per_page = (entries_per... | Yes |
960 | [
"#NEWLINE#",
"def top(",
"self",
",",
"args",
")",
":",
"#NEWLINE#",
"#INDENT#",
"screen",
"=",
"Screen",
"(",
"endpoint",
"=",
"args",
".",
"endpoint",
",",
"key",
"=",
"self",
".",
"key",
")",
"#NEWLINE#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"screen",
... | true | 21 | [
"2",
"21",
"4",
"15",
"40",
"52",
"9",
"30",
"44",
"72",
"80"
] | 1 | VARIABLE_MISUSE | [
4,
15
] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 11... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "alerta/python-alerta/alerta/shell.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def top(self, args) :
screen = Screen (endpoint = args.endpoint, key = self.key)
try :
screen.run ()
except RuntimeError as e :
screen._reset ()
print (e)
sys.exit (1)
except (KeyboardInterrupt, SystemExit) :
screen.w.running = False
screen._reset ()
... | Yes |
961 | [
"#NEWLINE#",
"@",
"grouping",
"(",
"interaction",
"=",
"'callandtext'",
")",
"#NEWLINE#",
"def response_rate_text(",
"records",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"\\n The response rate of the user (between 0 and 1).\\n\\n Considers text-conversations which began with an incomi... | false | 0 | [
"58",
"123",
"159",
"179",
"201",
"205",
"received",
"24",
"38",
"169",
"interactions",
"60",
"147",
"157",
"177",
"198",
"responded",
"32",
"40",
"47",
"r",
"10",
"17",
"21",
"34",
"records",
"163",
"189",
"all_couples",
"167",
"_response_rate"
] | 0 | NONE | [] | [
[
{
"before_index": 14,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 20,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "yvesalexandre/bandicoot/bandicoot/individual.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ grouping (interaction = 'callandtext')
def response_rate_text(records) :
"
The response rate of the user (between 0 and 1).
Considers text-conversations which began with an incoming text. Response rate
is the fraction of such conversations in which the user sent a text (a response).
The fo... | No |
962 | [
"#NEWLINE#",
"def test_remove_remindmes(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"remindmes",
"=",
"self",
".",
"repository",
".",
"get_remindmes",
"(",
")",
"#NEWLINE#",
"status",
"=",
"self",
".",
"repository",
".",
"remove_remindmes",
"(",
")",
"#NEWLINE#"... | false | 0 | [
"2",
"9",
"19",
"29",
"37",
"48",
"64",
"self",
"7",
"60",
"remindmes",
"27",
"43",
"num_remindmes",
"17",
"52",
"status",
"58",
"70",
"r"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "GochoMugo/remindme/test/test_RemindmeRepository.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_remove_remindmes(self) :
remindmes = self.repository.get_remindmes ()
status = self.repository.remove_remindmes ()
num_remindmes = self.repository.count ()
self.assertEqual (0, num_remindmes, 'RemindmeRepository#remove_remindmes fails to remove all
remindmes')
self.assertTr... | No |
963 | [
"#NEWLINE#",
"def autodiscover(",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Goes and imports the permissions submodule of every app in INSTALLED_APPS\\n to make sure the permission set classes are registered correctly.\\n '",
"#NEWLINE#",
"global",
"LOADING",
"#NEWLINE#",
"if",
"LOAD... | false | 0 | [
"49",
"79",
"100",
"app_path",
"9",
"12",
"19",
"114",
"LOADING",
"32",
"46",
"55",
"96",
"109",
"app"
] | 0 | NONE | [] | [
[
{
"before_index": 5,
"after_index": 6,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "jazzband/django-authority/authority/__init__.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def autodiscover() :
'
Goes and imports the permissions submodule of every app in INSTALLED_APPS
to make sure the permission set classes are registered correctly.
'
global LOADING
if LOADING :
return
LOADING = True
import imp
from django.conf import settings
for app i... | No |
964 | [
"#NEWLINE#",
"def test_path_from_options(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"paths",
"=",
"[",
"'one.yml'",
",",
"'two.yml'",
"]",
"#NEWLINE#",
"opts",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'--file'",
":",
"paths",
",",
"#NEWLINE#",
"#UNINDENT#",
"}",
"... | false | 0 | [
"28",
"45",
"environment",
"2",
"self",
"7",
"22",
"48",
"paths",
"15",
"43",
"opts"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 27,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "docker/compose/tests/unit/cli/command_test.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_path_from_options(self) :
paths = ['one.yml', 'two.yml']
opts = {
'--file' : paths,
}
environment = Environment.from_env_file ('.')
assert (get_config_path_from_options ('.', opts, environment) == paths)
Is there a bug in the code above? | No |
965 | [
"#NEWLINE#",
"@",
"patch",
"(",
"'paramiko.Channel.exec_command'",
")",
"#NEWLINE#",
"@",
"patch",
"(",
"'paramiko.Transport.__init__'",
")",
"#NEWLINE#",
"@",
"patch",
"(",
"'paramiko.Transport.open_channel'",
")",
"#NEWLINE#",
"def test_handle_connection_exceptions(",
"self... | false | 0 | [
"31",
"44",
"56",
"87",
"session",
"24",
"50",
"mock_init",
"26",
"105",
"mock_channel",
"22",
"75",
"mock_open",
"66",
"79",
"94",
"channel",
"20",
"39",
"81",
"90",
"101",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 30,
"after_index": 38,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 43,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ncclient/ncclient/test/unit/devices/test_junos.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ patch ('paramiko.Channel.exec_command')
@ patch ('paramiko.Transport.__init__')
@ patch ('paramiko.Transport.open_channel')
def test_handle_connection_exceptions(self, mock_open, mock_init, mock_channel) :
session = ncclient.transport.SSHSession (self.obj)
session._channel_id = 100
mock_init.return_... | No |
966 | [
"#NEWLINE#",
"def test_natural_logarithm(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"phys",
"[",
"'pore.item1'",
"]",
"=",
"1.6e-15",
"#NEWLINE#",
"self",
".",
"phys",
"[",
"'pore.item2'",
"]",
"=",
"4",
"#NEWLINE#",
"self",
".",
"phys",
"[",
... | false | 0 | [
"286",
"341",
"346",
"r2",
"231",
"263",
"X",
"2",
"7",
"16",
"25",
"34",
"43",
"55",
"108",
"161",
"173",
"182",
"201",
"209",
"220",
"233",
"265",
"296",
"303",
"318",
"326",
"self",
"312",
"350",
"r3",
"240",
"339",
"r1"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 23,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 24,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "PMEAL/OpenPNM/test/unit/Physics/models/GenericSourceTerm.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_natural_logarithm(self) :
self.phys ['pore.item1'] = 1.6e-15
self.phys ['pore.item2'] = 4
self.phys ['pore.item3'] = 1.4
self.phys ['pore.item4'] = 0.133
self.phys ['pore.item5'] = (- 5.1e-14)
self.phys.models.add (propname = 'pore.source1', model = pm.generic_source_term.natural_... | No |
967 | [
"#NEWLINE#",
"def default(",
"self",
",",
"obj",
")",
":",
"#NEWLINE#",
"#INDENT#",
"if",
"is_lazy_string",
"(",
"obj",
")",
":",
"#NEWLINE#",
"#INDENT#",
"try",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"unicode",
"(",
"obj",
")",
"#NEWLINE#",
"#UNINDENT#",
"ex... | false | 0 | [
"2",
"46",
"self",
"4",
"12",
"24",
"36",
"51",
"obj"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 41,
"after_index": 50... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "weblabdeusto/weblabdeusto/server/src/weblab/admin/web/app.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def default(self, obj) :
if is_lazy_string (obj) :
try :
return unicode (obj)
except NameError :
return str (obj)
return super (CustomJSONEncoder, self).default (obj)
Is there a bug in the code above? | No |
968 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"yaml",
",",
"parameters",
",",
"train_config",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"yaml",
"=",
"yaml",
"#NEWLINE#",
"self",
".",
"parameters",
"=",
"parameters",
"#NEWLINE#",
"self",
".",
"train_config",
... | false | 0 | [
"6",
"21",
"23",
"parameters",
"8",
"27",
"29",
"train_config",
"2",
"13",
"19",
"25",
"self",
"4",
"15",
"17",
"yaml"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "maxpumperla/elephas/elephas/spark_model.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, yaml, parameters, train_config) :
self.yaml = yaml
self.parameters = parameters
self.train_config = train_config
Is there a bug in the code above? | No |
969 | [
"#NEWLINE#",
"def test_schema_setter(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"from",
"gcloud.bigquery.table",
"import",
"SchemaField",
"#NEWLINE#",
"client",
"=",
"_Client",
"(",
"self",
".",
"PROJECT",
")",
"#NEWLINE#",
"table",
"=",
"_Table",
"(",
")",
"#N... | false | 0 | [
"21",
"37",
"table",
"27",
"74",
"88",
"job",
"2",
"16",
"29",
"33",
"40",
"84",
"self",
"48",
"79",
"93",
"full_name",
"12",
"45",
"client",
"61",
"81",
"95",
"age"
] | 0 | NONE | [] | [
[
{
"before_index": 11,
"after_index": 15,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 26,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "GoogleCloudPlatform/gcloud-python/gcloud/bigquery/test_job.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_schema_setter(self) :
from gcloud.bigquery.table import SchemaField
client = _Client (self.PROJECT)
table = _Table ()
job = self._makeOne (self.JOB_NAME, table, [self.SOURCE1], client)
full_name = SchemaField ('full_name', 'STRING', mode = 'REQUIRED')
age = SchemaField ('age', 'IN... | No |
970 | [
"#NEWLINE#",
"def test_deletion(",
"site",
",",
"client",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Test deletion of Interfaces.'",
"#NEWLINE#",
"ifc_uri",
"=",
"site",
".",
"list_uri",
"(",
"'interface'",
")",
"#NEWLINE#",
"dev_uri",
"=",
"site",
".",
"list_uri",
"(",
... | false | 0 | [
"11",
"55",
"98",
"ifc_uri",
"92",
"123",
"dev1_eth1_resp",
"4",
"31",
"51",
"94",
"144",
"156",
"165",
"client",
"69",
"86",
"113",
"dev1_eth0",
"42",
"59",
"102",
"dev1",
"126",
"160",
"dev1_eth1_uri",
"49",
"73",
"dev1_eth0_resp",
"29",
"46",
"dev1_re... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 16,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "dropbox/nsot/tests/api_tests/test_interfaces.py",
"license": "apache-2.0",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_deletion(site, client) :
'Test deletion of Interfaces.'
ifc_uri = site.list_uri ('interface')
dev_uri = site.list_uri ('device')
dev1_resp = client.create (dev_uri, hostname = 'foo-bar1')
dev1 = get_result (dev1_resp)
dev1_eth0_resp = client.create (ifc_uri, device = dev1 ['id'], ... | No |
971 | [
"#NEWLINE#",
"def mutable_config(",
"self",
",",
"i",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"self",
".",
"config_",
"[",
"i",
"]"
] | false | 0 | [
"4",
"14",
"i",
"2",
"10",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 11... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "CollabQ/CollabQ/.google_appengine/google/appengine/base/capabilities_pb.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def mutable_config(self, i) :
return self.config_ [i]
Is there a bug in the code above? | No |
972 | [
"#NEWLINE#",
"def test_is_registered(",
"self",
",",
"site",
")",
":",
"#NEWLINE#",
"#INDENT#",
"assert",
"site",
".",
"is_registered",
"(",
"ModelAdmin",
"(",
"Product",
",",
"site",
")",
")",
"#NEWLINE#",
"site",
".",
"register",
"(",
"Product",
")",
"#NEWLI... | false | 0 | [
"29",
"43",
"product",
"2",
"self",
"4",
"10",
"18",
"22",
"31",
"39",
"site"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 25... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "avelino/bottle-admin/tests/test_site.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_is_registered(self, site) :
assert site.is_registered (ModelAdmin (Product, site))
site.register (Product)
product = site._registry [0]
assert site.is_registered (product)
Is there a bug in the code above? | No |
973 | [
"#NEWLINE#",
"def reverse(",
"viewname",
",",
"urlconf",
"=",
"None",
",",
"args",
"=",
"None",
",",
"kwargs",
"=",
"None",
",",
"prefix",
"=",
"None",
",",
"force_locale",
"=",
"False",
",",
"locale",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"\"W... | false | 0 | [
"8",
"100",
"args",
"38",
"52",
"62",
"70",
"79",
"108",
"113",
"prefixer",
"92",
"117",
"126",
"url",
"2",
"96",
"viewname",
"24",
"34",
"42",
"44",
"locale",
"12",
"102",
"kwargs",
"16",
"83",
"86",
"104",
"prefix",
"4",
"98",
"urlconf",
"20",
... | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 30,
"after_index": 31,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 33,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "mozilla/kitsune/kitsune/sumo/urlresolvers.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def reverse(viewname, urlconf = None, args = None, kwargs = None, prefix = None, force_locale = False, locale = None) :
"Wraps Django's reverse to prepend the correct locale.
force_locale -- Ordinarily, if get_url_prefixer() returns None, we return
an unlocalized URL, which will be localized via redir... | No |
974 | [
"#NEWLINE#",
"def test_TSO_set_keywords_OR(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\" Tests TwitterSearchOrder.set_keywords(or_operator) '",
"#NEWLINE#",
"tso",
"=",
"self",
".",
"getCopy",
"(",
")",
"#NEWLINE#",
"keywords",
"=",
"(",
"'bob'",
",",
"'alice'",
")... | false | 0 | [
"17",
"29",
"45",
"keywords",
"2",
"11",
"36",
"self",
"9",
"25",
"48",
"tso"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 21... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ckoepp/TwitterSearch/tests/test_tso.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_TSO_set_keywords_OR(self) :
'" Tests TwitterSearchOrder.set_keywords(or_operator) '
tso = self.getCopy ()
keywords = ('bob', 'alice')
tso.set_keywords (keywords, or_operator = True)
self.assertTrue (('+or+'.join (keywords) in tso.create_search_url ().lower ()))
Is there a bug in the ... | No |
975 | [
"#NEWLINE#",
"def testEqual(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"response",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"'BackendServerPort'",
":",
"1",
",",
"#NEWLINE#",
"'Cookie'",
":",
"''",
",",
"#NEWLINE#",
"'Domain'",
":",
"''",
",",
"#NEWLINE#",
"'Health... | false | 0 | [
"124",
"145",
"expected",
"2",
"70",
"103",
"113",
"139",
"148",
"self",
"7",
"100",
"response",
"111",
"143",
"listener1"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 69,
"after_index": 99,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 102,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "quixey/python-aliyun/tests/unit/aliyun/slb/connection_test.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def testEqual(self) :
response = {
'BackendServerPort' : 1,
'Cookie' : '',
'Domain' : '',
'HealthCheck' : 'off',
'ListenerPort' : 1,
'Scheduler' : 'wrr',
'Status' : 'stopped',
'StickySession' : 'off',
'StickySessionapiType' : '',
... | No |
976 | [
"#NEWLINE#",
"def PlusConst(",
"self",
",",
"const",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Add a constant to all values of this Solution.'",
"#NEWLINE#",
"return",
"self",
".",
"__class__",
"(",
"self",
".",
"knots",
",",
"self",
".",
"spans",
",",
"[",
"(",
"a",
... | false | 0 | [
"4",
"28",
"const",
"26",
"31",
"a",
"2",
"12",
"16",
"20",
"33",
"38",
"42",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 19,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "google/rfmt/formatter/support.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def PlusConst(self, const) :
'Add a constant to all values of this Solution.'
return self.__class__ (self.knots, self.spans, [(a + const) for a in self.intercepts], self.gradients, self.layouts)
Is there a bug in the code above? | No |
977 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"program",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"_program",
"=",
"program",
"#NEWLINE#",
"self",
".",
"_attributes",
"=",
"dict",
"(",
"(",
"(",
"x",
".",
"name",
",",
"x",
")",
"for",
"x",
"in",
"p... | false | 0 | [
"23",
"27",
"30",
"48",
"52",
"55",
"x",
"2",
"9",
"15",
"40",
"65",
"76",
"87",
"93",
"self",
"4",
"13",
"32",
"57",
"program"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 20... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "fogleman/pg/pg/core.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, program) :
self._program = program
self._attributes = dict (((x.name, x) for x in program.get_attributes ()))
self._uniforms = dict (((x.name, x) for x in program.get_uniforms ()))
self._attribute_values = {
}
self._uniform_values = {
}
self._program.... | No |
978 | [
"#NEWLINE#",
"def render(",
"self",
",",
"context",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"kwargs",
"=",
"{",
"k",
":",
"v",
".",
"resolve",
"(",
"context",
")",
"for",
"(",
"k",
",",
"v",
")",
"in",
"self",
".",
"kwargs",
".",
"items",
"... | false | 0 | [
"16",
"26",
"v",
"14",
"24",
"k",
"2",
"9",
"29",
"self",
"4",
"20",
"context"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 38,
"after_index": 39... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "nalourie/django-macros/build/lib/macros/templatetags/macros.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def render(self, context) :
self.kwargs = { k : v.resolve (context) for (k, v) in self.kwargs.items () }
return ''
Is there a bug in the code above? | No |
979 | [
"#NEWLINE#",
"def __init__(",
"self",
",",
"text",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"text",
"=",
"text"
] | false | 0 | [
"4",
"11",
"13",
"text",
"2",
"9",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 13,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 9,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "nucleic/enaml/docs/source/_sphinxext/enamldoc.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __init__(self, text) :
self.text = text
Is there a bug in the code above? | No |
980 | [
"#NEWLINE#",
"@",
"mock",
".",
"patch",
"(",
"'nova.db.instance_tag_exists'",
")",
"#NEWLINE#",
"def test_show(",
"self",
",",
"mock_exists",
")",
":",
"#NEWLINE#",
"#INDENT#",
"mock_exists",
".",
"return_value",
"=",
"True",
"#NEWLINE#",
"req",
"=",
"self",
".",
... | false | 0 | [
"42",
"68",
"context",
"12",
"17",
"64",
"mock_exists",
"23",
"44",
"57",
"req",
"10",
"25",
"51",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 22,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/nova/nova/tests/unit/api/openstack/compute/test_server_tags.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ mock.patch ('nova.db.instance_tag_exists')
def test_show(self, mock_exists) :
mock_exists.return_value = True
req = self._get_request (('/v2/fake/servers/%s/tags/%s' % (UUID, TAG1)), 'GET')
context = req.environ ['nova.context']
self.controller.show (req, UUID, TAG1)
mock_exists.assert_calle... | No |
981 | [
"#NEWLINE#",
"@",
"register",
".",
"filter",
"#NEWLINE#",
"def date(",
"value",
",",
"arg",
"=",
"None",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Formats a date according to the given format.'",
"#NEWLINE#",
"if",
"(",
"not",
"value",
")",
":",
"#NEWLINE#",
"#INDENT#",
... | false | 0 | [
"9",
"32",
"39",
"57",
"75",
"arg",
"7",
"21",
"55",
"73",
"value"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 8,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 18,
"after_index": 2... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "crate-archive/crate-site/crateweb/apps/core/helpers.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ register.filter
def date(value, arg = None) :
'Formats a date according to the given format.'
if (not value) :
return ''
if (arg is None) :
arg = settings.DATE_FORMAT
try :
return formats.date_format (value, arg)
except AttributeError :
try :
return forma... | No |
982 | [
"#NEWLINE#",
"def handle_label(",
"self",
",",
"app_name",
",",
"**options",
")",
":",
"#NEWLINE#",
"#INDENT#",
"super",
"(",
"ProjectCommand",
",",
"self",
")",
".",
"handle_label",
"(",
"app_name",
",",
"self",
".",
"project_directory",
",",
"**",
"options",
... | false | 0 | [
"27",
"options",
"4",
"20",
"app_name",
"2",
"15",
"22",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 21,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "AppScale/appscale/AppServer/google/appengine/_internal/django/core/management/commands/startapp.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def handle_label(self, app_name, **options) :
super (ProjectCommand, self).handle_label (app_name, self.project_directory, ** options)
Is there a bug in the code above? | No |
983 | [
"#NEWLINE#",
"def sample_request(",
"self",
",",
"command",
",",
"sample",
",",
"async",
")",
":",
"#NEWLINE#",
"#INDENT#",
"url",
"=",
"(",
"'http://%s:%d'",
"%",
"(",
"self",
".",
"host",
",",
"self",
".",
"port",
")",
")",
"#NEWLINE#",
"files",
"=",
"... | false | 0 | [
"8",
"85",
"async",
"47",
"93",
"100",
"response",
"2",
"19",
"23",
"self",
"4",
"66",
"command",
"13",
"53",
"url",
"6",
"38",
"77",
"sample",
"29",
"55",
"57",
"files"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 12,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 28,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "F-Secure/see/plugins/commands.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def sample_request(self, command, sample, async) :
url = ('http://%s:%d' % (self.host, self.port))
files = {
'file' : open (sample, 'rb'),
}
response = requests.post (url, files = files, params = {
'command' : command,
'sample' : os.path.basename (sample),
'async' : i... | No |
984 | [
"#NEWLINE#",
"def test_option_defaults(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"args",
"=",
"parse_arg_list",
"(",
"[",
"'req-value'",
"]",
",",
"**",
"self",
".",
"EVERYTHING",
")",
"#NEWLINE#",
"self",
".",
"assertFalse",
"(",
"args",
".",
"optionFlag",
... | false | 0 | [
"7",
"25",
"35",
"50",
"61",
"71",
"args",
"2",
"16",
"21",
"30",
"43",
"55",
"66",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 20,
"after_index": 24,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 29,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Backblaze/B2_Command_Line_Tool/test/test_parse_args.py",
"license": "mit",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_option_defaults(self) :
args = parse_arg_list (['req-value'], ** self.EVERYTHING)
self.assertFalse (args.optionFlag)
self.assertTrue ((args.optionArg is None))
self.assertEqual ([], args.list)
self.assertEqual ('req-value', args.required)
self.assertTrue ((args.optional is None)) ... | No |
985 | [
"#NEWLINE#",
"def test_autospec_keywords(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"@",
"patch",
"(",
"(",
"'%s.function'",
"%",
"__name__",
")",
",",
"autospec",
"=",
"True",
",",
"return_value",
"=",
"3",
")",
"#NEWLINE#",
"def test(",
"mock_function",
")"... | false | 0 | [
"40",
"50",
"result",
"42",
"test",
"2",
"46",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 39,
"after_index": 43,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 45,
"after_index": 51,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 31,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "calvinchengx/python-mock/tests/testpatch.py",
"license": "bsd-2-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_autospec_keywords(self) :
@ patch (('%s.function' % __name__), autospec = True, return_value = 3)
def test(mock_function) :
return function (1, 2)
result = test ()
self.assertEqual (result, 3)
Is there a bug in the code above? | No |
986 | [
"#NEWLINE#",
"def __gt__(",
"self",
",",
"other",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"(",
"not",
"self",
".",
"__lt__",
"(",
"other",
")",
")"
] | false | 0 | [
"4",
"16",
"other",
"2",
"12",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 15... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "sympy/sympy/sympy/physics/optics/medium.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def __gt__(self, other) :
return (not self.__lt__ (other))
Is there a bug in the code above? | No |
987 | [
"#NEWLINE#",
"def create(",
"self",
",",
"params",
"=",
"{",
"#NEWLINE#",
"#INDENT#",
"#NEWLINE#",
"#UNINDENT#",
"}",
")",
":",
"#NEWLINE#",
"#INDENT#",
"Resource",
".",
"verify_keys",
"(",
"params",
",",
"PaymentMethod",
".",
"create_signature",
"(",
")",
")",
... | false | 0 | [
"2",
"30",
"self",
"4",
"20",
"41",
"params"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 15,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 29,
"after_index": 3... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "braintree/braintree_python/braintree/payment_method_gateway.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def create(self, params = {
}) :
Resource.verify_keys (params, PaymentMethod.create_signature ())
return self._post ('/payment_methods', {
'payment_method' : params,
})
Is there a bug in the code above? | No |
988 | [
"#NEWLINE#",
"def update(",
"self",
",",
"payment_method_token",
",",
"params",
")",
":",
"#NEWLINE#",
"#INDENT#",
"Resource",
".",
"verify_keys",
"(",
"params",
",",
"PaymentMethod",
".",
"update_signature",
"(",
")",
")",
"#NEWLINE#",
"try",
":",
"#NEWLINE#",
... | false | 0 | [
"2",
"56",
"self",
"4",
"31",
"37",
"63",
"93",
"payment_method_token",
"6",
"15",
"71",
"params"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 16,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 16,
"after_index": 1... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "braintree/braintree_python/braintree/payment_method_gateway.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def update(self, payment_method_token, params) :
Resource.verify_keys (params, PaymentMethod.update_signature ())
try :
if ((payment_method_token is None) or (payment_method_token.strip () == '')) :
raise NotFoundError ()
return self._put (('/payment_methods/any/' + payment_method_token... | No |
989 | [
"#NEWLINE#",
"def delete(",
"self",
",",
"app",
")",
":",
"#NEWLINE#",
"#INDENT#",
"migration_dir",
"=",
"os",
".",
"path",
".",
"join",
"(",
"ROOT",
",",
"app",
",",
"'migrations'",
")",
"#NEWLINE#",
"print",
"(",
"migration_dir",
")",
"#NEWLINE#",
"shutil"... | false | 0 | [
"2",
"self",
"4",
"19",
"app",
"9",
"26",
"33",
"migration_dir"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 25... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "hellpain/django-mymigrate/mymigrate/management/commands/mymigrate.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def delete(self, app) :
migration_dir = os.path.join (ROOT, app, 'migrations')
print (migration_dir)
shutil.rmtree (migration_dir, ignore_errors = True, onerror = None)
Is there a bug in the code above? | No |
990 | [
"#NEWLINE#",
"def _should_use_token(",
"self",
",",
"view_func",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Given a view function, determine whether or not we should deliver a\\n CSRF token to this view through the response and validate CSRF tokens\\n upon requests to this view.... | false | 0 | [
"2",
"20",
"56",
"66",
"81",
"91",
"123",
"self",
"4",
"14",
"44",
"48",
"view_func",
"103",
"119",
"url",
"38",
"64",
"89",
"view"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 9,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 11,
"after_index": 18,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "maxcountryman/flask-seasurf/flask_seasurf.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def _should_use_token(self, view_func) :
'
Given a view function, determine whether or not we should deliver a
CSRF token to this view through the response and validate CSRF tokens
upon requests to this view.
:param view_func: A view function.
'
if ((view_func is None)... | No |
991 | [
"#NEWLINE#",
"@",
"patch",
"(",
"'ramses.models.resource_schema'",
")",
"#NEWLINE#",
"@",
"patch",
"(",
"'ramses.models.generate_model_cls'",
")",
"#NEWLINE#",
"@",
"patch",
"(",
"'ramses.models.get_existing_model'",
")",
"#NEWLINE#",
"def test_setup_data_model_success(",
"se... | false | 0 | [
"22",
"36",
"76",
"mock_get",
"63",
"120",
"model",
"57",
"69",
"94",
"config",
"20",
"self",
"24",
"90",
"122",
"mock_gen",
"26",
"42",
"83",
"mock_schema"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 21,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 35,
"after_index": 40,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 41,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ramses-tech/ramses/tests/test_models.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ patch ('ramses.models.resource_schema')
@ patch ('ramses.models.generate_model_cls')
@ patch ('ramses.models.get_existing_model')
def test_setup_data_model_success(self, mock_get, mock_gen, mock_schema) :
from ramses import models
mock_get.return_value = None
mock_schema.return_value = {
'f... | No |
992 | [
"#NEWLINE#",
"def get_more_nodes(",
"self",
",",
"*",
"args",
")",
":",
"#NEWLINE#",
"#INDENT#",
"return",
"(",
"d",
"for",
"d",
"in",
"self",
".",
"devs",
")"
] | false | 0 | [
"12",
"14",
"d",
"2",
"16",
"self",
"5",
"args"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 3,
"after_index": 5,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 10,
"after_index": 11,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "openstack/swift/test/unit/common/test_db_replicator.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def get_more_nodes(self, * args) :
return (d for d in self.devs)
Is there a bug in the code above? | No |
993 | [
"#NEWLINE#",
"def get_or_create_connection(",
"self",
",",
"producer",
")",
":",
"#NEWLINE#",
"#INDENT#",
"client",
"=",
"self",
".",
"connection_factory",
"(",
"self",
".",
"address",
",",
"1",
",",
"0",
",",
"producer",
".",
"consumer_factory",
",",
"producer"... | false | 0 | [
"30",
"61",
"65",
"server",
"2",
"11",
"15",
"32",
"self",
"9",
"53",
"73",
"78",
"client",
"4",
"23",
"27",
"46",
"50",
"59",
"71",
"producer"
] | 0 | NONE | [] | [
[
{
"before_index": 1,
"after_index": 3,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 18,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 29,
"after_index": 41... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "quantmind/pulsar/pulsar/apps/test/wsgi.py",
"license": "bsd-3-clause",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def get_or_create_connection(self, producer) :
client = self.connection_factory (self.address, 1, 0, producer.consumer_factory, producer)
server = self.connection_factory (('127.0.0.1', 46387), 1, 0, producer.server_consumer, producer)
client.connection_made (DummyTransport (producer, server))
serve... | No |
994 | [
"#NEWLINE#",
"@",
"unittest",
".",
"skipIf",
"(",
"(",
"geos_version",
"<",
"(",
"3",
",",
"3",
",",
"0",
")",
")",
",",
"'GEOS 3.3.0 required'",
")",
"#NEWLINE#",
"def test_unary_union_multi(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"patches",
"=",
"Mul... | false | 0 | [
"34",
"42",
"xy",
"27",
"56",
"71",
"73",
"patches",
"22",
"44",
"50",
"64",
"self"
] | 0 | NONE | [] | [
[
{
"before_index": 26,
"after_index": 30,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 49,
"after_index": 60,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 63,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "Toblerity/Shapely/tests/test_union.py",
"license": "bsd-3-clause",
"note": "license: manual_eval"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ unittest.skipIf ((geos_version < (3, 3, 0)), 'GEOS 3.3.0 required')
def test_unary_union_multi(self) :
patches = MultiPolygon ([Point (xy).buffer (0.05) for xy in self.coords])
self.assertAlmostEqual (unary_union (patches).area, 0.71857254056)
self.assertAlmostEqual (unary_union ([patches, patches]).a... | No |
995 | [
"#NEWLINE#",
"def main(",
"request",
")",
":",
"#NEWLINE#",
"#INDENT#",
"resp",
"=",
"core",
".",
"ResponseDocument",
"(",
"request",
",",
"title",
"=",
"TITLE",
",",
"stylesheet",
"=",
"'base.css'",
")",
"#NEWLINE#",
"resp",
".",
"header",
".",
"add_header",
... | false | 0 | [
"7",
"24",
"35",
"39",
"47",
"resp",
"2",
"13",
"request"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 14,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 23,
"after_index": 31,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 34,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "kdart/pycopia/WWW/pycopia/nmsapps/base/views.py",
"license": "apache-2.0",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def main(request) :
resp = core.ResponseDocument (request, title = TITLE, stylesheet = 'base.css')
resp.header.add_header (1, TITLE)
resp.fill_nav (resp.config.DEFAULTNAV)
return resp.finalize ()
Is there a bug in the code above? | No |
996 | [
"#NEWLINE#",
"def unsubscribe(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Unregister this object as a listener on the bus.'",
"#NEWLINE#",
"for",
"channel",
"in",
"self",
".",
"bus",
".",
"listeners",
":",
"#NEWLINE#",
"#INDENT#",
"method",
"=",
"getattr",
"(",
"s... | false | 0 | [
"2",
"12",
"24",
"40",
"self",
"20",
"33",
"48",
"method",
"10",
"26",
"46",
"channel"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 10,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 9,
"after_index": 15,... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "AppScale/appscale/AppServer/lib/cherrypy/cherrypy/process/plugins.py",
"license": "apache-2.0",
"note": "license: github_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def unsubscribe(self) :
'Unregister this object as a listener on the bus.'
for channel in self.bus.listeners :
method = getattr (self, channel, None)
if (method is not None) :
self.bus.unsubscribe (channel, method)
Is there a bug in the code above? | No |
997 | [
"#NEWLINE#",
"@",
"base",
".",
"apimethod",
"#NEWLINE#",
"def mark_failed(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'\\n Mark an invoice as failed collection\\n '",
"#NEWLINE#",
"self",
".",
"require_item",
"(",
")",
"#NEWLINE#",
"url",
"=",
"'{0}/mark_... | false | 0 | [
"7",
"14",
"26",
"self",
"33",
"46",
"request",
"20",
"41",
"url"
] | 0 | NONE | [] | [
[
{
"before_index": 11,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 17,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 19,
"after_index":... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "ducksboard/libsaas/libsaas/services/recurly/invoices.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | @ base.apimethod
def mark_failed(self) :
'
Mark an invoice as failed collection
'
self.require_item ()
url = '{0}/mark_failed'.format (self.get_url ())
request = http.Request ('PUT', url)
return (request, parsers.parse_empty)
Is there a bug in the code above? | No |
998 | [
"#NEWLINE#",
"def test_servers_created(",
"self",
")",
":",
"#NEWLINE#",
"#INDENT#",
"self",
".",
"runtime_environment",
".",
"configure",
"(",
")",
"#NEWLINE#",
"self",
".",
"cm",
".",
"set",
"(",
"'smtp'",
",",
"dict",
"(",
"one",
"=",
"dict",
"(",
"listen... | false | 0 | [
"2",
"7",
"15",
"65",
"70",
"111",
"self",
"53",
"61",
"76",
"93",
"107",
"provider",
"91",
"103",
"service",
"84",
"99",
"117",
"requested_pipelines"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 12,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 14,
"after_index": 22,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 52,
"after_index": ... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "foundit/Piped/piped/providers/test/test_smtp_provider.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def test_servers_created(self) :
self.runtime_environment.configure ()
self.cm.set ('smtp', dict (one = dict (listen = 'tcp:0', processor = 'pipeline.one'), two = dict (listen = 'tcp:0', processor = 'pipeline.two')))
provider = smtp_provider.SMTPProvider ()
provider.configure (self.runtime_environme... | No |
999 | [
"#NEWLINE#",
"def disassemble(",
"script",
")",
":",
"#NEWLINE#",
"#INDENT#",
"'Disassemble the given script. Returns a string.'",
"#NEWLINE#",
"opcodes",
"=",
"[",
"]",
"#NEWLINE#",
"pc",
"=",
"0",
"#NEWLINE#",
"while",
"(",
"pc",
"<",
"len",
"(",
"script",
")",
... | false | 0 | [
"9",
"57",
"101",
"117",
"opcodes",
"33",
"49",
"65",
"data",
"14",
"20",
"35",
"42",
"pc",
"2",
"24",
"40",
"script",
"31",
"81",
"95",
"107",
"opcode"
] | 0 | NONE | [] | [
[
{
"before_index": 6,
"after_index": 7,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 8,
"after_index": 11,
"edge_type": 7,
"edge_type_name": "enum_FIELD"
}
],
[
{
"before_index": 13,
"after_index": 16... | [
{
"datasetProvenance": {
"datasetName": "ETHPy150Open",
"filepath": "maraoz/proofofexistence/pycoin/tx/script/tools.py",
"license": "mit",
"note": "license: bigquery_api"
}
}
] | bug detection | {% set indent = ' ' %}
{% set ns = namespace(indent_size=0, result=[]) %}
{% for token in source_tokens %}
{% if token== '#INDENT#' %}
{% set ns.indent_size = ns.indent_size + 1 %}
{% set ns.result = ns.result + [indent * ns.indent_size] %}
{% elif token == '#NEWLINE#' %}
{% set ns.r... | def disassemble(script) :
'Disassemble the given script. Returns a string.'
opcodes = []
pc = 0
while (pc < len (script)) :
(opcode, data, pc) = get_opcode (script, pc)
if (len (data) > 0) :
opcodes.append (binascii.hexlify (data).decode ('utf8'))
continue... | No |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.