hunk
dict
file
stringlengths
0
11.8M
file_path
stringlengths
2
234
label
int64
0
1
commit_url
stringlengths
74
103
dependency_score
listlengths
5
5
{ "id": 2, "code_window": [ "\t// obviously correct. I believe that tree-based buckets would make\n", "\t// this easier to implement efficiently.\n", "\tclose := &nodesByDistance{target: target}\n", "\tfor _, b := range tab.buckets {\n", "\t\tfor _, n := range b.entries {\n", "\t\t\tclose.pu...
// Copyright 2014 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
trie/node.go
1
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.974898099899292, 0.08574464172124863, 0.00016319745918735862, 0.0001994164485950023, 0.26559728384017944 ]
{ "id": 2, "code_window": [ "\t// obviously correct. I believe that tree-based buckets would make\n", "\t// this easier to implement efficiently.\n", "\tclose := &nodesByDistance{target: target}\n", "\tfor _, b := range tab.buckets {\n", "\t\tfor _, n := range b.entries {\n", "\t\t\tclose.pu...
// +build !windows package oleutil import ole "github.com/go-ole/go-ole" // ConnectObject creates a connection point between two services for communication. func ConnectObject(disp *ole.IDispatch, iid *ole.GUID, idisp interface{}) (uint32, error) { return 0, ole.NewError(ole.E_NOTIMPL) }
vendor/github.com/go-ole/go-ole/oleutil/connection_func.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.00017747502715792507, 0.00017350736015941948, 0.00016953969316091388, 0.00017350736015941948, 0.000003967666998505592 ]
{ "id": 2, "code_window": [ "\t// obviously correct. I believe that tree-based buckets would make\n", "\t// this easier to implement efficiently.\n", "\tclose := &nodesByDistance{target: target}\n", "\tfor _, b := range tab.buckets {\n", "\t\tfor _, n := range b.entries {\n", "\t\t\tclose.pu...
// Copyright 2010 The Go Authors. All rights reserved. // Copyright 2011 ThePiachu. All rights reserved. // Copyright 2015 Jeffrey Wilcke, Felix Lange, Gustav Simonsson. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the followi...
crypto/secp256k1/curve.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.004182673059403896, 0.00043150249985046685, 0.00016300227434840053, 0.0001761589664965868, 0.0008311081910505891 ]
{ "id": 2, "code_window": [ "\t// obviously correct. I believe that tree-based buckets would make\n", "\t// this easier to implement efficiently.\n", "\tclose := &nodesByDistance{target: target}\n", "\tfor _, b := range tab.buckets {\n", "\t\tfor _, n := range b.entries {\n", "\t\t\tclose.pu...
// Copyright 2015 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
p2p/discover/database_test.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.013433454558253288, 0.0007267819601111114, 0.00016402272740378976, 0.00017334005679003894, 0.0021368630696088076 ]
{ "id": 3, "code_window": [ "}\n", "\n", "func (tab *Table) len() (n int) {\n", "\tfor _, b := range tab.buckets {\n", "\t\tn += len(b.entries)\n", "\t}\n", "\treturn n\n", "}\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep",...
// Copyright 2016 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
swarm/api/manifest.go
1
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.9984820485115051, 0.35167065262794495, 0.00016317443805746734, 0.00029512375476770103, 0.47376343607902527 ]
{ "id": 3, "code_window": [ "}\n", "\n", "func (tab *Table) len() (n int) {\n", "\tfor _, b := range tab.buckets {\n", "\t\tn += len(b.entries)\n", "\t}\n", "\treturn n\n", "}\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep",...
package metrics import ( "bytes" "encoding/json" "testing" ) func TestRegistryMarshallJSON(t *testing.T) { b := &bytes.Buffer{} enc := json.NewEncoder(b) r := NewRegistry() r.Register("counter", NewCounter()) enc.Encode(r) if s := b.String(); "{\"counter\":{\"count\":0}}\n" != s { t.Fatalf(s) } } func Te...
metrics/json_test.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.9746236205101013, 0.37896737456321716, 0.002776772016659379, 0.15950167179107666, 0.4260246157646179 ]
{ "id": 3, "code_window": [ "}\n", "\n", "func (tab *Table) len() (n int) {\n", "\tfor _, b := range tab.buckets {\n", "\t\tn += len(b.entries)\n", "\t}\n", "\treturn n\n", "}\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep",...
// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. package termui // Sparkline is like: ▅▆▂▂▅▇▂▂▃▆▆▆▅▃. The data points should be non-negative integers. /* data := []int{4, 2, 1, 6, 3, 9, 1, 4, 2, ...
vendor/github.com/gizak/termui/sparkline.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.9971022009849548, 0.11745044589042664, 0.00017039800877682865, 0.0001738134160405025, 0.3210150897502899 ]
{ "id": 3, "code_window": [ "}\n", "\n", "func (tab *Table) len() (n int) {\n", "\tfor _, b := range tab.buckets {\n", "\t\tn += len(b.entries)\n", "\t}\n", "\treturn n\n", "}\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep",...
/* * Haiku Backend for libusb * Copyright © 2014 Akshay Jaggi <akshay1994.leo@gmail.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (...
vendor/github.com/karalabe/hid/libusb/libusb/os/haiku_usb_backend.cpp
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.00017573418153915554, 0.0001694149395916611, 0.00016485217201989144, 0.0001688267511781305, 0.000002452286707921303 ]
{ "id": 4, "code_window": [ "\tfmt.Printf(\"\ttarget: %#v,\\n\", tn.target)\n", "\tfmt.Printf(\"\ttargetSha: %#v,\\n\", tn.targetSha)\n", "\tfmt.Printf(\"\tdists: [%d][]NodeID{\\n\", len(tn.dists))\n", "\tfor ld, ns := range tn.dists {\n", "\t\tif len(ns) == 0 {\n", "\t\t\tcontinue\n", "...
// Copyright 2014 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
trie/node.go
1
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.00669553317129612, 0.0007699302514083683, 0.00015892703959252685, 0.0001738072605803609, 0.001715565682388842 ]
{ "id": 4, "code_window": [ "\tfmt.Printf(\"\ttarget: %#v,\\n\", tn.target)\n", "\tfmt.Printf(\"\ttargetSha: %#v,\\n\", tn.targetSha)\n", "\tfmt.Printf(\"\tdists: [%d][]NodeID{\\n\", len(tn.dists))\n", "\tfor ld, ns := range tn.dists {\n", "\t\tif len(ns) == 0 {\n", "\t\t\tcontinue\n", "...
os: Visual Studio 2015 # Clone directly into GOPATH. clone_folder: C:\gopath\src\github.com\karalabe\hid clone_depth: 1 version: "{branch}.{build}" environment: global: GOPATH: C:\gopath CC: gcc.exe matrix: - GOARCH: amd64 MSYS2_ARCH: x86_64 MSYS2_BITS: 64 MSYSTEM: MINGW64 PATH:...
vendor/github.com/karalabe/hid/appveyor.yml
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.0001726219052216038, 0.00017127124010585248, 0.0001695474493317306, 0.0001714578247629106, 0.000001350010961687076 ]
{ "id": 4, "code_window": [ "\tfmt.Printf(\"\ttarget: %#v,\\n\", tn.target)\n", "\tfmt.Printf(\"\ttargetSha: %#v,\\n\", tn.targetSha)\n", "\tfmt.Printf(\"\tdists: [%d][]NodeID{\\n\", len(tn.dists))\n", "\tfor ld, ns := range tn.dists {\n", "\t\tif len(ns) == 0 {\n", "\t\t\tcontinue\n", "...
// Package escape contains utilities for escaping parts of InfluxQL // and InfluxDB line protocol. package escape // import "github.com/influxdata/influxdb/pkg/escape" import ( "bytes" "strings" ) // Codes is a map of bytes to be escaped. var Codes = map[byte][]byte{ ',': []byte(`\,`), '"': []byte(`\"`), ' ': []...
vendor/github.com/influxdata/influxdb/pkg/escape/bytes.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.00017547815514262766, 0.00017040122475009412, 0.0001640117698116228, 0.00016969619900919497, 0.000003818174263869878 ]
{ "id": 4, "code_window": [ "\tfmt.Printf(\"\ttarget: %#v,\\n\", tn.target)\n", "\tfmt.Printf(\"\ttargetSha: %#v,\\n\", tn.targetSha)\n", "\tfmt.Printf(\"\tdists: [%d][]NodeID{\\n\", len(tn.dists))\n", "\tfor ld, ns := range tn.dists {\n", "\t\tif len(ns) == 0 {\n", "\t\t\tcontinue\n", "...
// Copyright (c) 2014-2015 The Notify Authors. All rights reserved. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. // +build windows package notify import ( "errors" "runtime" "sync" "sync/atomic" "syscall" "unsafe" ) // readBufferSize defines the size of a...
vendor/github.com/rjeczalik/notify/watcher_readdcw.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.0019879520405083895, 0.0002594606194179505, 0.000164523022249341, 0.00017319417383987457, 0.0003580003685783595 ]
{ "id": 5, "code_window": [ "\tif printTable {\n", "\t\tfmt.Println()\n", "\t}\n", "\tfor i, b := range tab.buckets {\n", "\t\tentries += len(b.entries)\n", "\t\tif printTable {\n", "\t\t\tfor _, e := range b.entries {\n" ], "labels": [ "keep", "keep", "keep", "replac...
// Copyright 2014 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
trie/node.go
1
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.0007814278942532837, 0.00024336618662346154, 0.00016373346443288028, 0.00017447667778469622, 0.00014028706937097013 ]
{ "id": 5, "code_window": [ "\tif printTable {\n", "\t\tfmt.Println()\n", "\t}\n", "\tfor i, b := range tab.buckets {\n", "\t\tentries += len(b.entries)\n", "\t\tif printTable {\n", "\t\t\tfor _, e := range b.entries {\n" ], "labels": [ "keep", "keep", "keep", "replac...
// mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. // +build amd64,freebsd // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m64 _const.go package unix import "syscall" const ( AF_APPLETALK = 0x10 AF_ARP = 0x23 AF_ATM ...
vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.001964274561032653, 0.00023873800819274038, 0.00016146064444910735, 0.0001894555753096938, 0.00019338770653121173 ]
{ "id": 5, "code_window": [ "\tif printTable {\n", "\t\tfmt.Println()\n", "\t}\n", "\tfor i, b := range tab.buckets {\n", "\t\tentries += len(b.entries)\n", "\t\tif printTable {\n", "\t\t\tfor _, e := range b.entries {\n" ], "labels": [ "keep", "keep", "keep", "replac...
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This code was translated into a form compatible with 6a from the public // domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html #define REDMASK5...
vendor/golang.org/x/crypto/curve25519/const_amd64.h
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.0001772869291016832, 0.0001772869291016832, 0.0001772869291016832, 0.0001772869291016832, 0 ]
{ "id": 5, "code_window": [ "\tif printTable {\n", "\t\tfmt.Println()\n", "\t}\n", "\tfor i, b := range tab.buckets {\n", "\t\tentries += len(b.entries)\n", "\t\tif printTable {\n", "\t\t\tfor _, e := range b.entries {\n" ], "labels": [ "keep", "keep", "keep", "replac...
package reexec // import "github.com/docker/docker/pkg/reexec" import ( "os/exec" "syscall" "golang.org/x/sys/unix" ) // Self returns the path to the current process's binary. // Returns "/proc/self/exe". func Self() string { return "/proc/self/exe" } // Command returns *exec.Cmd which has Path as current binar...
vendor/github.com/docker/docker/pkg/reexec/command_linux.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.00017404193931724876, 0.0001722892775433138, 0.00016885130025912076, 0.00017397457850165665, 0.0000024311691504408373 ]
{ "id": 6, "code_window": [ "\n", "\tprefix := binary.BigEndian.Uint64(tab.self.sha[0:8])\n", "\tdist := ^uint64(0)\n", "\tentry := int(randUint(uint32(entries + 1)))\n", "\tfor _, b := range tab.buckets {\n", "\t\tif entry < len(b.entries) {\n", "\t\t\tn := b.entries[entry]\n", "\t\...
// Copyright 2016 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
p2p/discv5/net_test.go
1
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.005319622810930014, 0.0016767672495916486, 0.00016672859783284366, 0.0015239834319800138, 0.0015526984352618456 ]
{ "id": 6, "code_window": [ "\n", "\tprefix := binary.BigEndian.Uint64(tab.self.sha[0:8])\n", "\tdist := ^uint64(0)\n", "\tentry := int(randUint(uint32(entries + 1)))\n", "\tfor _, b := range tab.buckets {\n", "\t\tif entry < len(b.entries) {\n", "\t\t\tn := b.entries[entry]\n", "\t\...
package models // Helper time methods since parsing time can easily overflow and we only support a // specific time range. import ( "fmt" "math" "time" ) const ( // MinNanoTime is the minumum time that can be represented. // // 1677-09-21 00:12:43.145224194 +0000 UTC // // The two lowest minimum integers are...
vendor/github.com/influxdata/influxdb/models/time.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.0002654726558830589, 0.00017978384857997298, 0.0001610376639291644, 0.00016817872528918087, 0.000032624651794321835 ]
{ "id": 6, "code_window": [ "\n", "\tprefix := binary.BigEndian.Uint64(tab.self.sha[0:8])\n", "\tdist := ^uint64(0)\n", "\tentry := int(randUint(uint32(entries + 1)))\n", "\tfor _, b := range tab.buckets {\n", "\t\tif entry < len(b.entries) {\n", "\t\t\tn := b.entries[entry]\n", "\t\...
Copyright (c) 2013-2015 Tommi Virtanen. Copyright (c) 2009, 2011, 2012 The Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright...
vendor/bazil.org/fuse/LICENSE
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.00017834559548646212, 0.00017178055713884532, 0.0001600229588802904, 0.00017265306087210774, 0.000004864180027652765 ]
{ "id": 6, "code_window": [ "\n", "\tprefix := binary.BigEndian.Uint64(tab.self.sha[0:8])\n", "\tdist := ^uint64(0)\n", "\tentry := int(randUint(uint32(entries + 1)))\n", "\tfor _, b := range tab.buckets {\n", "\t\tif entry < len(b.entries) {\n", "\t\t\tn := b.entries[entry]\n", "\t\...
// Copyright 2014 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
rlp/doc.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.00017779327754396945, 0.00017129506159108132, 0.00015935482224449515, 0.00017401608056388795, 0.000007173797257564729 ]
{ "id": 7, "code_window": [ "func (tab *Table) readRandomNodes(buf []*Node) (n int) {\n", "\t// TODO: tree-based buckets would help here\n", "\t// Find all non-empty buckets and get a fresh slice of their entries.\n", "\tvar buckets [][]*Node\n", "\tfor _, b := range tab.buckets {\n", "\t\ti...
// Copyright 2016 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
p2p/discv5/table.go
1
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.9990807771682739, 0.7490931749343872, 0.00016921781934797764, 0.99345463514328, 0.4189280569553375 ]
{ "id": 7, "code_window": [ "func (tab *Table) readRandomNodes(buf []*Node) (n int) {\n", "\t// TODO: tree-based buckets would help here\n", "\t// Find all non-empty buckets and get a fresh slice of their entries.\n", "\tvar buckets [][]*Node\n", "\tfor _, b := range tab.buckets {\n", "\t\ti...
// Go support for Protocol Buffers - Google's data interchange format // // Copyright 2010 The Go Authors. All rights reserved. // https://github.com/golang/protobuf // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met...
vendor/github.com/golang/protobuf/proto/extensions.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.7213746905326843, 0.024298816919326782, 0.00016228113963734359, 0.00017050317546818405, 0.12383586168289185 ]
{ "id": 7, "code_window": [ "func (tab *Table) readRandomNodes(buf []*Node) (n int) {\n", "\t// TODO: tree-based buckets would help here\n", "\t// Find all non-empty buckets and get a fresh slice of their entries.\n", "\tvar buckets [][]*Node\n", "\tfor _, b := range tab.buckets {\n", "\t\ti...
// Copyright 2014 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
p2p/peer_error.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.0002732538850978017, 0.0001839229225879535, 0.00016550562577322125, 0.0001707265619188547, 0.000031465842766920105 ]
{ "id": 7, "code_window": [ "func (tab *Table) readRandomNodes(buf []*Node) (n int) {\n", "\t// TODO: tree-based buckets would help here\n", "\t// Find all non-empty buckets and get a fresh slice of their entries.\n", "\tvar buckets [][]*Node\n", "\tfor _, b := range tab.buckets {\n", "\t\ti...
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package unix import ( "syscall" "unsafe" ) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: int32(sec), Nsec: int32(nsec)} } func setTime...
vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.011797010898590088, 0.001832353649660945, 0.0001630360056878999, 0.00017445797857362777, 0.004068057052791119 ]
{ "id": 8, "code_window": [ "\t// This is a very wasteful way to find the closest nodes but\n", "\t// obviously correct. I believe that tree-based buckets would make\n", "\t// this easier to implement efficiently.\n", "\tclose := &nodesByDistance{target: target}\n", "\tfor _, b := range tab.buck...
// Copyright 2014 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
trie/trie.go
1
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.9063339233398438, 0.07295489311218262, 0.0001612211053725332, 0.00026212981902062893, 0.19896230101585388 ]
{ "id": 8, "code_window": [ "\t// This is a very wasteful way to find the closest nodes but\n", "\t// obviously correct. I believe that tree-based buckets would make\n", "\t// this easier to implement efficiently.\n", "\tclose := &nodesByDistance{target: target}\n", "\tfor _, b := range tab.buck...
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package language import ( "fmt" "sort" ) // The Coverage interface is used to define the level of coverage of an // internationalization service. Note that ...
vendor/golang.org/x/text/language/coverage.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.25119441747665405, 0.01305319182574749, 0.0001631688210181892, 0.00017402012599632144, 0.054639432579278946 ]
{ "id": 8, "code_window": [ "\t// This is a very wasteful way to find the closest nodes but\n", "\t// obviously correct. I believe that tree-based buckets would make\n", "\t// this easier to implement efficiently.\n", "\tclose := &nodesByDistance{target: target}\n", "\tfor _, b := range tab.buck...
// Copyright (c) 2014, Suryandaru Triandana <syndtr@gmail.com> // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package iterator import ( "github.com/syndtr/goleveldb/leveldb/util" ) // BasicArray is the interface that wraps basic Len...
vendor/github.com/syndtr/goleveldb/leveldb/iterator/array_iter.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.7447317838668823, 0.04873646795749664, 0.00016201876860577613, 0.00017138104885816574, 0.16863097250461578 ]
{ "id": 8, "code_window": [ "\t// This is a very wasteful way to find the closest nodes but\n", "\t// obviously correct. I believe that tree-based buckets would make\n", "\t// this easier to implement efficiently.\n", "\tclose := &nodesByDistance{target: target}\n", "\tfor _, b := range tab.buck...
{ "wikipage_test_vector_scrypt": { "json": { "crypto" : { "cipher" : "aes-128-ctr", "cipherparams" : { "iv" : "83dbcc02d8ccb40e466191a123791e0e" }, "ciphertext" : "d172bf743a674da9cdad04534d56926ef8358534d458fffc...
accounts/keystore/testdata/v3_test_vector.json
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.00017233066319022328, 0.00016906691598705947, 0.000164243538165465, 0.0001694111997494474, 0.000002400559878878994 ]
{ "id": 9, "code_window": [ "func (m *ManifestWalker) Walk(walkFn WalkFn) error {\n", "\treturn m.walk(m.trie, \"\", walkFn)\n", "}\n", "\n", "func (m *ManifestWalker) walk(trie *manifestTrie, prefix string, walkFn WalkFn) error {\n", "\tfor _, entry := range trie.entries {\n", "\t\tif e...
// Copyright 2016 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
p2p/discv5/table.go
1
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.9858917593955994, 0.030725209042429924, 0.00016541758668608963, 0.00017037396901287138, 0.16886040568351746 ]
{ "id": 9, "code_window": [ "func (m *ManifestWalker) Walk(walkFn WalkFn) error {\n", "\treturn m.walk(m.trie, \"\", walkFn)\n", "}\n", "\n", "func (m *ManifestWalker) walk(trie *manifestTrie, prefix string, walkFn WalkFn) error {\n", "\tfor _, entry := range trie.entries {\n", "\t\tif e...
// +build windows linux darwin openbsd freebsd netbsd package liner import ( "bufio" "container/ring" "errors" "fmt" "io" "os" "strings" "unicode" "unicode/utf8" ) type action int const ( left action = iota right up down home end insert del pageUp pageDown f1 f2 f3 f4 f5 f6 f7 f8 f9 f10...
vendor/github.com/peterh/liner/line.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.015201949514448643, 0.0005474272766150534, 0.00016663101268932223, 0.0001702399895293638, 0.001710374723188579 ]
{ "id": 9, "code_window": [ "func (m *ManifestWalker) Walk(walkFn WalkFn) error {\n", "\treturn m.walk(m.trie, \"\", walkFn)\n", "}\n", "\n", "func (m *ManifestWalker) walk(trie *manifestTrie, prefix string, walkFn WalkFn) error {\n", "\tfor _, entry := range trie.entries {\n", "\t\tif e...
// Copyright 2017 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
eth/tracers/tracers_test.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.004475176800042391, 0.0004007410316262394, 0.0001635989610804245, 0.00017022676183842123, 0.0009372112108394504 ]
{ "id": 9, "code_window": [ "func (m *ManifestWalker) Walk(walkFn WalkFn) error {\n", "\treturn m.walk(m.trie, \"\", walkFn)\n", "}\n", "\n", "func (m *ManifestWalker) walk(trie *manifestTrie, prefix string, walkFn WalkFn) error {\n", "\tfor _, entry := range trie.entries {\n", "\t\tif e...
// Copyright (c) 2012, Suryandaru Triandana <syndtr@gmail.com> // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package leveldb import ( "sync/atomic" "time" "github.com/syndtr/goleveldb/leveldb/memdb" "github.com/syndtr/goleveldb/...
vendor/github.com/syndtr/goleveldb/leveldb/db_write.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.0016871353145688772, 0.00025698571698740125, 0.00016326220065820962, 0.00017011813179124147, 0.0003113645943813026 ]
{ "id": 10, "code_window": [ "\t\tContentType: ManifestType,\n", "\t}, subtrie)\n", "}\n", "\n", "func (mt *manifestTrie) getCountLast() (cnt int, entry *manifestTrieEntry) {\n", "\tfor _, e := range mt.entries {\n", "\t\tif e != nil {\n", "\t\t\tcnt++\n", "\t\t\tentry = e\n", ...
// Copyright 2015 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
p2p/discover/table.go
1
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.030996503308415413, 0.0010590603342279792, 0.00016248181054834276, 0.00017063833365682513, 0.003862382611259818 ]
{ "id": 10, "code_window": [ "\t\tContentType: ManifestType,\n", "\t}, subtrie)\n", "}\n", "\n", "func (mt *manifestTrie) getCountLast() (cnt int, entry *manifestTrieEntry) {\n", "\tfor _, e := range mt.entries {\n", "\t\tif e != nil {\n", "\t\t\tcnt++\n", "\t\t\tentry = e\n", ...
// Copyright 2017 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
accounts/usbwallet/wallet.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.0010747736087068915, 0.00020154041703790426, 0.00016004356439225376, 0.00017114066577050835, 0.00014490066678263247 ]
{ "id": 10, "code_window": [ "\t\tContentType: ManifestType,\n", "\t}, subtrie)\n", "}\n", "\n", "func (mt *manifestTrie) getCountLast() (cnt int, entry *manifestTrieEntry) {\n", "\tfor _, e := range mt.entries {\n", "\t\tif e != nil {\n", "\t\t\tcnt++\n", "\t\t\tentry = e\n", ...
{"nodes":[{"node":{"info":{"id":"a9e0b763852706722dc904b494293f9399c0fa32255890aa720285b8160335bb618f36b68a81b875a805384179f600defef474d486b4ea04b003ef6477ab7907","name":"node_a9e0b763852706722dc904b494293f9399c0fa32255890aa720285b8160335bb618f36b68a81b875a805384179f600defef474d486b4ea04b003ef6477ab7907","enode":"enode...
swarm/network/stream/testing/snapshot_128.json
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.0001640419359318912, 0.0001640419359318912, 0.0001640419359318912, 0.0001640419359318912, 0 ]
{ "id": 10, "code_window": [ "\t\tContentType: ManifestType,\n", "\t}, subtrie)\n", "}\n", "\n", "func (mt *manifestTrie) getCountLast() (cnt int, entry *manifestTrieEntry) {\n", "\tfor _, e := range mt.entries {\n", "\t\tif e != nil {\n", "\t\t\tcnt++\n", "\t\t\tentry = e\n", ...
// Copyright 2018 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
swarm/network/simulation/connect_test.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.002116619609296322, 0.00023609069467056543, 0.00016883504576981068, 0.00017382252553943545, 0.00034334120573475957 ]
{ "id": 11, "code_window": [ "\tbuffer.WriteString(`{\"entries\":[`)\n", "\n", "\tlist := &Manifest{}\n", "\tfor _, entry := range mt.entries {\n", "\t\tif entry != nil {\n", "\t\t\tif entry.Hash == \"\" { // TODO: paralellize\n", "\t\t\t\terr := entry.subtrie.recalcAndStore()\n", "\...
// Copyright 2016 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
swarm/api/manifest.go
1
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.998783528804779, 0.5945087671279907, 0.00017099616525229067, 0.969105064868927, 0.47131913900375366 ]
{ "id": 11, "code_window": [ "\tbuffer.WriteString(`{\"entries\":[`)\n", "\n", "\tlist := &Manifest{}\n", "\tfor _, entry := range mt.entries {\n", "\t\tif entry != nil {\n", "\t\t\tif entry.Hash == \"\" { // TODO: paralellize\n", "\t\t\t\terr := entry.subtrie.recalcAndStore()\n", "\...
Copyright (c) 2010, Alan Ott, Signal 11 Software All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of condition...
vendor/github.com/karalabe/hid/hidapi/LICENSE-bsd.txt
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.0002128459163941443, 0.0001845598453655839, 0.0001676444080658257, 0.00017318922618869692, 0.000020128956748521887 ]
{ "id": 11, "code_window": [ "\tbuffer.WriteString(`{\"entries\":[`)\n", "\n", "\tlist := &Manifest{}\n", "\tfor _, entry := range mt.entries {\n", "\t\tif entry != nil {\n", "\t\t\tif entry.Hash == \"\" { // TODO: paralellize\n", "\t\t\t\terr := entry.subtrie.recalcAndStore()\n", "\...
// Copyright 2016 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
common/hexutil/json_test.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.007512998767197132, 0.0008606069604866207, 0.00016416666039731354, 0.0001717757259029895, 0.0016357619315385818 ]
{ "id": 11, "code_window": [ "\tbuffer.WriteString(`{\"entries\":[`)\n", "\n", "\tlist := &Manifest{}\n", "\tfor _, entry := range mt.entries {\n", "\t\tif entry != nil {\n", "\t\t\tif entry.Hash == \"\" { // TODO: paralellize\n", "\t\t\t\terr := entry.subtrie.recalcAndStore()\n", "\...
// Copyright 2018 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
swarm/storage/mru/timestampprovider.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.00017819924687501043, 0.0001710932410787791, 0.00016618671361356974, 0.0001699285494396463, 0.000004223472387820948 ]
{ "id": 12, "code_window": [ "func (n *fullNode) EncodeRLP(w io.Writer) error {\n", "\tvar nodes [17]node\n", "\n", "\tfor i, child := range n.Children {\n", "\t\tif child != nil {\n", "\t\t\tnodes[i] = child\n", "\t\t} else {\n", "\t\t\tnodes[i] = nilValueNode\n" ], "labels": [ ...
// Copyright 2015 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
p2p/discover/table.go
1
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.9905371069908142, 0.027057338505983353, 0.00016533937014173716, 0.00020326314552221447, 0.15390370786190033 ]
{ "id": 12, "code_window": [ "func (n *fullNode) EncodeRLP(w io.Writer) error {\n", "\tvar nodes [17]node\n", "\n", "\tfor i, child := range n.Children {\n", "\t\tif child != nil {\n", "\t\t\tnodes[i] = child\n", "\t\t} else {\n", "\t\t\tnodes[i] = nilValueNode\n" ], "labels": [ ...
// Go support for Protocol Buffers - Google's data interchange format // // Copyright 2012 The Go Authors. All rights reserved. // https://github.com/golang/protobuf // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met...
vendor/github.com/golang/protobuf/proto/pointer_unsafe.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.000676761323120445, 0.0002163613389711827, 0.00016553040768485516, 0.00018435457604937255, 0.00009728942677611485 ]
{ "id": 12, "code_window": [ "func (n *fullNode) EncodeRLP(w io.Writer) error {\n", "\tvar nodes [17]node\n", "\n", "\tfor i, child := range n.Children {\n", "\t\tif child != nil {\n", "\t\t\tnodes[i] = child\n", "\t\t} else {\n", "\t\t\tnodes[i] = nilValueNode\n" ], "labels": [ ...
// mksysctl_openbsd.pl // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT package unix type mibentry struct { ctlname string ctloid []_C_int } var sysctlMib = []mibentry{ {"ddb.console", []_C_int{9, 6}}, {"ddb.log", []_C_int{9, 7}}, {"ddb.max_line", []_C_int{9, 3}}, {"ddb.max_width", []_C_int{9, 2}}, {"d...
vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.00017431082960683852, 0.00016792853421065956, 0.0001630063052289188, 0.00016770546790212393, 0.0000028579979698406532 ]
{ "id": 12, "code_window": [ "func (n *fullNode) EncodeRLP(w io.Writer) error {\n", "\tvar nodes [17]node\n", "\n", "\tfor i, child := range n.Children {\n", "\t\tif child != nil {\n", "\t\t\tnodes[i] = child\n", "\t\t} else {\n", "\t\t\tnodes[i] = nilValueNode\n" ], "labels": [ ...
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package ssh import ( "bytes" "encoding/binary" "errors" "fmt" "io" "math/big" "reflect" "strconv" "strings" ) // These are SSH message type numbers. ...
vendor/golang.org/x/crypto/ssh/messages.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.9622288346290588, 0.049981292337179184, 0.000161838746862486, 0.0001728764909785241, 0.19655650854110718 ]
{ "id": 13, "code_window": [ "func (n hashNode) String() string { return n.fstring(\"\") }\n", "func (n valueNode) String() string { return n.fstring(\"\") }\n", "\n", "func (n *fullNode) fstring(ind string) string {\n", "\tresp := fmt.Sprintf(\"[\\n%s \", ind)\n", "\tfor i, node := rang...
// Copyright 2015 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
p2p/discover/table.go
1
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.004299849271774292, 0.0006188260158523917, 0.00016299248090945184, 0.00020018612849526107, 0.0008924081339500844 ]
{ "id": 13, "code_window": [ "func (n hashNode) String() string { return n.fstring(\"\") }\n", "func (n valueNode) String() string { return n.fstring(\"\") }\n", "\n", "func (n *fullNode) fstring(ind string) string {\n", "\tresp := fmt.Sprintf(\"[\\n%s \", ind)\n", "\tfor i, node := rang...
package parser import ( "regexp" "github.com/robertkrimen/otto/ast" "github.com/robertkrimen/otto/file" "github.com/robertkrimen/otto/token" ) func (self *_parser) parseIdentifier() *ast.Identifier { literal := self.literal idx := self.idx if self.mode&StoreComments != 0 { self.comments.MarkComments(ast.LEA...
vendor/github.com/robertkrimen/otto/parser/expression.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.004009664990007877, 0.0002316144818905741, 0.00016626469732727855, 0.00017016632773447782, 0.00038750102976337075 ]
{ "id": 13, "code_window": [ "func (n hashNode) String() string { return n.fstring(\"\") }\n", "func (n valueNode) String() string { return n.fstring(\"\") }\n", "\n", "func (n *fullNode) fstring(ind string) string {\n", "\tresp := fmt.Sprintf(\"[\\n%s \", ind)\n", "\tfor i, node := rang...
// Copyright 2018 The go-ethereum Authors // This file is part of go-ethereum. // // go-ethereum is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any la...
signer/core/stdioui.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.00017541274428367615, 0.00016992677410598844, 0.00016794232942629606, 0.00016961715300567448, 0.0000018757449424811057 ]
{ "id": 13, "code_window": [ "func (n hashNode) String() string { return n.fstring(\"\") }\n", "func (n valueNode) String() string { return n.fstring(\"\") }\n", "\n", "func (n *fullNode) fstring(ind string) string {\n", "\tresp := fmt.Sprintf(\"[\\n%s \", ind)\n", "\tfor i, node := rang...
package reexec // import "github.com/docker/docker/pkg/reexec" import ( "os/exec" ) // Self returns the path to the current process's binary. // Uses os.Args[0]. func Self() string { return naiveSelf() } // Command returns *exec.Cmd which has Path as current binary. // For example if current binary is "docker.exe"...
vendor/github.com/docker/docker/pkg/reexec/command_windows.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.00020288382074795663, 0.00018530571833252907, 0.00017589947674423456, 0.000177133857505396, 0.000012439806596376002 ]
{ "id": 14, "code_window": [ "\t\t// value that is left in n or -2 if n contains at least two\n", "\t\t// values.\n", "\t\tpos := -1\n", "\t\tfor i, cld := range n.Children {\n", "\t\t\tif cld != nil {\n", "\t\t\t\tif pos == -1 {\n", "\t\t\t\t\tpos = i\n" ], "labels": [ "keep", ...
// Copyright 2015 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License...
p2p/discover/table.go
1
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.9960666298866272, 0.07318399846553802, 0.00016393358237110078, 0.00017452071188017726, 0.24804820120334625 ]
{ "id": 14, "code_window": [ "\t\t// value that is left in n or -2 if n contains at least two\n", "\t\t// values.\n", "\t\tpos := -1\n", "\t\tfor i, cld := range n.Children {\n", "\t\t\tif cld != nil {\n", "\t\t\t\tif pos == -1 {\n", "\t\t\t\t\tpos = i\n" ], "labels": [ "keep", ...
// Copyright 2018 The go-ethereum Authors // This file is part of go-ethereum. // // go-ethereum is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any la...
signer/core/cliui.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.00019548169802874327, 0.00017164966266136616, 0.00016466333181597292, 0.00017126963939517736, 0.000005928466634941287 ]
{ "id": 14, "code_window": [ "\t\t// value that is left in n or -2 if n contains at least two\n", "\t\t// values.\n", "\t\tpos := -1\n", "\t\tfor i, cld := range n.Children {\n", "\t\t\tif cld != nil {\n", "\t\t\t\tif pos == -1 {\n", "\t\t\t\t\tpos = i\n" ], "labels": [ "keep", ...
// Copyright 2017 The go-ethereum Authors // This file is part of go-ethereum. // // go-ethereum is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any la...
cmd/swarm/manifest.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.00040175096364691854, 0.00017706380458548665, 0.0001654502411838621, 0.00017006162670440972, 0.000039217437006300315 ]
{ "id": 14, "code_window": [ "\t\t// value that is left in n or -2 if n contains at least two\n", "\t\t// values.\n", "\t\tpos := -1\n", "\t\tfor i, cld := range n.Children {\n", "\t\t\tif cld != nil {\n", "\t\t\t\tif pos == -1 {\n", "\t\t\t\t\tpos = i\n" ], "labels": [ "keep", ...
// Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package windows const ( MEM_COMMIT = 0x00001000 MEM_RESERVE = 0x00002000 MEM_DECOMMIT = 0x00004000 MEM_RELEASE = 0x00008000 MEM_RESET ...
vendor/golang.org/x/sys/windows/memory_windows.go
0
https://github.com/ethereum/go-ethereum/commit/cf05ef9106779da0df62c0c03312fc489171aaa5
[ 0.0001726225600577891, 0.00016804244660306722, 0.0001627630990697071, 0.00016874170978553593, 0.000004055363660881994 ]
{ "id": 0, "code_window": [ "\n", "\t\"github.com/pingcap/tidb/meta/autoid\"\n", ")\n", "\n", "var _ autoid.Allocator = &allocator{}\n", "\n", "var (\n", "\tstep = int64(5000)\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep",...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/kvencoder/kv_encoder_test.go
1
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.9943637847900391, 0.015589639544487, 0.00016572749882470816, 0.00017285332432948053, 0.12141991406679153 ]
{ "id": 0, "code_window": [ "\n", "\t\"github.com/pingcap/tidb/meta/autoid\"\n", ")\n", "\n", "var _ autoid.Allocator = &allocator{}\n", "\n", "var (\n", "\tstep = int64(5000)\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep",...
/* * * Copyright 2017 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
vendor/google.golang.org/grpc/grpclog/grpclog.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.0012028842465952039, 0.00033056133543141186, 0.00016583246178925037, 0.00018853068468160927, 0.00030973186949267983 ]
{ "id": 0, "code_window": [ "\n", "\t\"github.com/pingcap/tidb/meta/autoid\"\n", ")\n", "\n", "var _ autoid.Allocator = &allocator{}\n", "\n", "var (\n", "\tstep = int64(5000)\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep",...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/chunk/mutrow.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.0011847770074382424, 0.0002012519253185019, 0.00016708667681086808, 0.0001732019445626065, 0.00016870215767994523 ]
{ "id": 0, "code_window": [ "\n", "\t\"github.com/pingcap/tidb/meta/autoid\"\n", ")\n", "\n", "var _ autoid.Allocator = &allocator{}\n", "\n", "var (\n", "\tstep = int64(5000)\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep",...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
store/tikv/scan.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.00017889503214973956, 0.00017097120871767402, 0.00016274805238936096, 0.0001723623281577602, 0.000004198853730486007 ]
{ "id": 1, "code_window": [ "var (\n", "\tstep = int64(5000)\n", ")\n", "\n", "// NewAllocator new an allocator.\n", "func NewAllocator() autoid.Allocator {\n", "\treturn &allocator{}\n", "}\n", "\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace"...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/kvencoder/allocator.go
1
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.998088538646698, 0.3328920304775238, 0.00017357127217110246, 0.003745949361473322, 0.4680134356021881 ]
{ "id": 1, "code_window": [ "var (\n", "\tstep = int64(5000)\n", ")\n", "\n", "// NewAllocator new an allocator.\n", "func NewAllocator() autoid.Allocator {\n", "\treturn &allocator{}\n", "}\n", "\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace"...
// Copyright (c) 2012, Suryandaru Triandana <syndtr@gmail.com> // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package leveldb import ( "github.com/pingcap/goleveldb/leveldb/filter" "github.com/pingcap/goleveldb/leveldb/opt" ) func ...
vendor/github.com/pingcap/goleveldb/leveldb/options.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.0007821080507710576, 0.00023337699531111866, 0.00016873686399776489, 0.00017094366194214672, 0.0001746454363455996 ]
{ "id": 1, "code_window": [ "var (\n", "\tstep = int64(5000)\n", ")\n", "\n", "// NewAllocator new an allocator.\n", "func NewAllocator() autoid.Allocator {\n", "\treturn &allocator{}\n", "}\n", "\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace"...
// Copyright 2016 The etcd Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
vendor/github.com/coreos/etcd/clientv3/concurrency/session.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.0005088857724331319, 0.00024156086146831512, 0.00016616594803053886, 0.00017852491873782128, 0.00010602323891362175 ]
{ "id": 1, "code_window": [ "var (\n", "\tstep = int64(5000)\n", ")\n", "\n", "// NewAllocator new an allocator.\n", "func NewAllocator() autoid.Allocator {\n", "\treturn &allocator{}\n", "}\n", "\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace"...
// Copyright (c) 2014, Suryandaru Triandana <syndtr@gmail.com> // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package util import ( "fmt" "sync" "sync/atomic" "time" ) type buffer struct { b []byte miss int } // BufferPool ...
vendor/github.com/pingcap/goleveldb/leveldb/util/buffer_pool.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.003925164230167866, 0.0003466617490630597, 0.00016749709902796894, 0.00017599418060854077, 0.0007474555168300867 ]
{ "id": 2, "code_window": [ "}\n", "\n", "type allocator struct {\n", "\tbase int64\n", "}\n", "\n" ], "labels": [ "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ "// Allocator is an id allocator, it is only used in lightning.\n", ...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/kvencoder/allocator.go
1
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.9987636804580688, 0.6631495356559753, 0.00017485517309978604, 0.9910393953323364, 0.46881625056266785 ]
{ "id": 2, "code_window": [ "}\n", "\n", "type allocator struct {\n", "\tbase int64\n", "}\n", "\n" ], "labels": [ "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ "// Allocator is an id allocator, it is only used in lightning.\n", ...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
statistics/cmsketch.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.08423539251089096, 0.0052392869256436825, 0.000167884849361144, 0.0003762440464925021, 0.01777789369225502 ]
{ "id": 2, "code_window": [ "}\n", "\n", "type allocator struct {\n", "\tbase int64\n", "}\n", "\n" ], "labels": [ "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ "// Allocator is an id allocator, it is only used in lightning.\n", ...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
executor/simple_test.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.00017543014837428927, 0.00016823555051814765, 0.00016444554785266519, 0.00016780788428150117, 0.000002207825900768512 ]
{ "id": 2, "code_window": [ "}\n", "\n", "type allocator struct {\n", "\tbase int64\n", "}\n", "\n" ], "labels": [ "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ "// Allocator is an id allocator, it is only used in lightning.\n", ...
// Copyright 2013 The ql Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSES/QL-LICENSE file. // Copyright 2015 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in complia...
ddl/ddl.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.007172238547354937, 0.0004274052334949374, 0.00016534663154743612, 0.00017276190919801593, 0.0009911555098369718 ]
{ "id": 3, "code_window": [ "\tbase int64\n", "}\n", "\n", "func (alloc *allocator) Alloc(tableID int64) (int64, error) {\n", "\treturn atomic.AddInt64(&alloc.base, 1), nil\n", "}\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/kvencoder/kv_encoder_test.go
1
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.9989480376243591, 0.30259600281715393, 0.00017230880621355027, 0.006016240455210209, 0.4245355725288391 ]
{ "id": 3, "code_window": [ "\tbase int64\n", "}\n", "\n", "func (alloc *allocator) Alloc(tableID int64) (int64, error) {\n", "\treturn atomic.AddInt64(&alloc.base, 1), nil\n", "}\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "...
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build !gccgo #include "textflag.h" // // System call support for 386, Darwin // // Just jump to package syscall's implementation for all these functions....
vendor/golang.org/x/sys/unix/asm_darwin_386.s
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.00017351997666992247, 0.00017211468366440386, 0.000170276514836587, 0.00017254753038287163, 0.0000013590523622042383 ]
{ "id": 3, "code_window": [ "\tbase int64\n", "}\n", "\n", "func (alloc *allocator) Alloc(tableID int64) (int64, error) {\n", "\treturn atomic.AddInt64(&alloc.base, 1), nil\n", "}\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "...
// Copyright 2015 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/hack/hack_test.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.0004757422429975122, 0.00027913361554965377, 0.00017304957145825028, 0.00019474052533041686, 0.00012383698776829988 ]
{ "id": 3, "code_window": [ "\tbase int64\n", "}\n", "\n", "func (alloc *allocator) Alloc(tableID int64) (int64, error) {\n", "\treturn atomic.AddInt64(&alloc.base, 1), nil\n", "}\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "...
// Copyright (c) 2014, Suryandaru Triandana <syndtr@gmail.com> // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Package errors provides common error types used throughout leveldb. package errors import ( "errors" "fmt" "github.co...
vendor/github.com/pingcap/goleveldb/leveldb/errors/errors.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.006781875155866146, 0.003106820397078991, 0.00017406784172635525, 0.003145156428217888, 0.0023391463328152895 ]
{ "id": 4, "code_window": [ "\treturn atomic.AddInt64(&alloc.base, 1), nil\n", "}\n", "\n", "func (alloc *allocator) Rebase(tableID, newBase int64, allocIDs bool) error {\n", "\tatomic.StoreInt64(&alloc.base, newBase)\n" ], "labels": [ "keep", "keep", "keep", "replace", "...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/kvencoder/allocator.go
1
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.9835999011993408, 0.38389885425567627, 0.0001669896737439558, 0.231688991189003, 0.41317853331565857 ]
{ "id": 4, "code_window": [ "\treturn atomic.AddInt64(&alloc.base, 1), nil\n", "}\n", "\n", "func (alloc *allocator) Rebase(tableID, newBase int64, allocIDs bool) error {\n", "\tatomic.StoreInt64(&alloc.base, newBase)\n" ], "labels": [ "keep", "keep", "keep", "replace", "...
package uuid /**************** * Date: 31/01/14 * Time: 3:34 PM ***************/ import "net" // Struct is used for RFC4122 Version 1 UUIDs type Struct struct { timeLow uint32 timeMid uint16 timeHiAndVersion uint16 sequenceHiAndVariant byte sequenceLow byte node ...
vendor/github.com/twinj/uuid/struct.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.0006360072293318808, 0.00025396773708052933, 0.00016993250756058842, 0.0001920756185427308, 0.00014083669520914555 ]
{ "id": 4, "code_window": [ "\treturn atomic.AddInt64(&alloc.base, 1), nil\n", "}\n", "\n", "func (alloc *allocator) Rebase(tableID, newBase int64, allocIDs bool) error {\n", "\tatomic.StoreInt64(&alloc.base, newBase)\n" ], "labels": [ "keep", "keep", "keep", "replace", "...
package prometheus import ( "fmt" "runtime" "runtime/debug" "time" ) type goCollector struct { goroutines Gauge gcDesc *Desc // metrics to describe and collect metrics memStatsMetrics } // NewGoCollector returns a collector which exports metrics about the current // go process. func NewGoCollector() Col...
vendor/github.com/prometheus/client_golang/prometheus/go_collector.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.003983208443969488, 0.0008119195117615163, 0.00016927285469137132, 0.00021058929269202054, 0.0011708296369761229 ]
{ "id": 4, "code_window": [ "\treturn atomic.AddInt64(&alloc.base, 1), nil\n", "}\n", "\n", "func (alloc *allocator) Rebase(tableID, newBase int64, allocIDs bool) error {\n", "\tatomic.StoreInt64(&alloc.base, newBase)\n" ], "labels": [ "keep", "keep", "keep", "replace", "...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ma...
vendor/github.com/apache/thrift/lib/go/thrift/http_transport.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.0017669062362983823, 0.0005708927055820823, 0.00017001030209939927, 0.00017332707648165524, 0.0006905203917995095 ]
{ "id": 5, "code_window": [ "\tatomic.StoreInt64(&alloc.base, newBase)\n", "\treturn nil\n", "}\n", "\n" ], "labels": [ "add", "keep", "keep", "keep" ], "after_edit": [ "}\n", "\n", "// Rebase not allow newBase smaller than alloc.base, and will skip the smaller ne...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/kvencoder/allocator.go
1
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.015045116655528545, 0.005806857720017433, 0.0001743059983709827, 0.004359464626759291, 0.005946631543338299 ]
{ "id": 5, "code_window": [ "\tatomic.StoreInt64(&alloc.base, newBase)\n", "\treturn nil\n", "}\n", "\n" ], "labels": [ "add", "keep", "keep", "keep" ], "after_edit": [ "}\n", "\n", "// Rebase not allow newBase smaller than alloc.base, and will skip the smaller ne...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
executor/simple_test.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.00017643430328462273, 0.00017074444622267038, 0.00016506419342476875, 0.00017067785665858537, 0.0000023611271444679005 ]
{ "id": 5, "code_window": [ "\tatomic.StoreInt64(&alloc.base, newBase)\n", "\treturn nil\n", "}\n", "\n" ], "labels": [ "add", "keep", "keep", "keep" ], "after_edit": [ "}\n", "\n", "// Rebase not allow newBase smaller than alloc.base, and will skip the smaller ne...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
plan/cacheable_checker.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.00017673552792984992, 0.0001697165862424299, 0.00016400613822042942, 0.0001690755452727899, 0.000004368681857158663 ]
{ "id": 5, "code_window": [ "\tatomic.StoreInt64(&alloc.base, newBase)\n", "\treturn nil\n", "}\n", "\n" ], "labels": [ "add", "keep", "keep", "keep" ], "after_edit": [ "}\n", "\n", "// Rebase not allow newBase smaller than alloc.base, and will skip the smaller ne...
// Copyright (c) 2012, Suryandaru Triandana <syndtr@gmail.com> // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Package leveldb provides implementation of LevelDB key/value database. // // Create or open a database: // // // The retur...
vendor/github.com/pingcap/goleveldb/leveldb/doc.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.0001741050073178485, 0.00017126984312199056, 0.00016568861610721797, 0.00017192571249324828, 0.0000026044281185022555 ]
{ "id": 6, "code_window": [ "\treturn nil\n", "}\n", "\n", "func (alloc *allocator) Base() int64 {\n", "\treturn atomic.LoadInt64(&alloc.base)\n", "}\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ ...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/kvencoder/allocator.go
1
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.9980165958404541, 0.6634626984596252, 0.00017107150051742792, 0.9930073022842407, 0.4690217673778534 ]
{ "id": 6, "code_window": [ "\treturn nil\n", "}\n", "\n", "func (alloc *allocator) Base() int64 {\n", "\treturn atomic.LoadInt64(&alloc.base)\n", "}\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ ...
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Solaris system calls. // This file is compiled as ordinary Go code, // but it is also input to mksyscall, // which parses the //sys lines and generates syste...
vendor/golang.org/x/sys/unix/syscall_solaris.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.9755011200904846, 0.06893207132816315, 0.00016795929695945233, 0.00047354321577586234, 0.2404753565788269 ]
{ "id": 6, "code_window": [ "\treturn nil\n", "}\n", "\n", "func (alloc *allocator) Base() int64 {\n", "\treturn atomic.LoadInt64(&alloc.base)\n", "}\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ ...
// Copyright 2015 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
types/field_type.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.9893191456794739, 0.007426582742482424, 0.00016704684821888804, 0.00016919636982493103, 0.08240886777639389 ]
{ "id": 6, "code_window": [ "\treturn nil\n", "}\n", "\n", "func (alloc *allocator) Base() int64 {\n", "\treturn atomic.LoadInt64(&alloc.base)\n", "}\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ ...
// Copyright 2015 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
session/tidb_test.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.9429348707199097, 0.04642433300614357, 0.0001693572849035263, 0.0005995790124870837, 0.18193544447422028 ]
{ "id": 7, "code_window": [ "\treturn atomic.LoadInt64(&alloc.base)\n", "}\n", "\n", "func (alloc *allocator) End() int64 {\n", "\treturn alloc.Base() + step\n", "}\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "a...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/kvencoder/allocator.go
1
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.9865031242370605, 0.2843741178512573, 0.00017422041855752468, 0.04247773811221123, 0.3862271010875702 ]
{ "id": 7, "code_window": [ "\treturn atomic.LoadInt64(&alloc.base)\n", "}\n", "\n", "func (alloc *allocator) End() int64 {\n", "\treturn alloc.Base() + step\n", "}\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "a...
// Copyright 2010 Petar Maymounkov. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // A Left-Leaning Red-Black (LLRB) implementation of 2-3 balanced binary search trees, // based on the following work: // // http://www.cs.princeton.edu/~rs...
vendor/github.com/petar/GoLLRB/llrb/llrb.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.02677864395081997, 0.0009070141823031008, 0.0001662322029005736, 0.0001810540270525962, 0.003868005471304059 ]
{ "id": 7, "code_window": [ "\treturn atomic.LoadInt64(&alloc.base)\n", "}\n", "\n", "func (alloc *allocator) End() int64 {\n", "\treturn alloc.Base() + step\n", "}\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "a...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
executor/prepared_test.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.00017770683916751295, 0.00016982793749775738, 0.0001646527962293476, 0.00016966309340205044, 0.0000024245384793175617 ]
{ "id": 7, "code_window": [ "\treturn atomic.LoadInt64(&alloc.base)\n", "}\n", "\n", "func (alloc *allocator) End() int64 {\n", "\treturn alloc.Base() + step\n", "}\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "a...
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, ...
vendor/github.com/matttproud/golang_protobuf_extensions/LICENSE
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.00017863474204204977, 0.00017386760737281293, 0.00016851273539941758, 0.00017334616859443486, 0.0000028462504815252032 ]
{ "id": 8, "code_window": [ "\treturn alloc.Base() + step\n", "}\n", "\n", "func (alloc *allocator) NextGlobalAutoID(tableID int64) (int64, error) {\n", "\treturn alloc.End() + 1, nil\n", "}" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep" ], ...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/kvencoder/allocator.go
1
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.9964026212692261, 0.16774068772792816, 0.00017317502351943403, 0.002511011902242899, 0.3705922067165375 ]
{ "id": 8, "code_window": [ "\treturn alloc.Base() + step\n", "}\n", "\n", "func (alloc *allocator) NextGlobalAutoID(tableID int64) (int64, error) {\n", "\treturn alloc.End() + 1, nil\n", "}" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep" ], ...
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build linux // +build arm64 // +build !gccgo #include "textflag.h" // Just jump to package syscall's implementation for all these functions. // The runtim...
vendor/golang.org/x/sys/unix/asm_linux_arm64.s
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.00017563902656547725, 0.00017121613200288266, 0.00016825585043989122, 0.00016975354810710996, 0.0000031866604786046082 ]
{ "id": 8, "code_window": [ "\treturn alloc.Base() + step\n", "}\n", "\n", "func (alloc *allocator) NextGlobalAutoID(tableID int64) (int64, error) {\n", "\treturn alloc.End() + 1, nil\n", "}" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep" ], ...
// Copyright 2015 The Prometheus Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to...
vendor/github.com/prometheus/client_golang/prometheus/histogram.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.001995880389586091, 0.00029802904464304447, 0.00016604858683422208, 0.0001873208093456924, 0.00032516071223653853 ]
{ "id": 8, "code_window": [ "\treturn alloc.Base() + step\n", "}\n", "\n", "func (alloc *allocator) NextGlobalAutoID(tableID int64) (int64, error) {\n", "\treturn alloc.End() + 1, nil\n", "}" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep" ], ...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
expression/column.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.0010004086652770638, 0.0002710514236241579, 0.00016895921726245433, 0.0001912176958285272, 0.0001765488850651309 ]
{ "id": 9, "code_window": [ "\tkvPairsExpect, affectedRowsExpect, err := encoder.Encode(sql, tableID)\n", "\tc.Assert(err, IsNil, Commentf(comment))\n", "\n", "\tstmtID, err := encoder.PrepareStmt(prepareFormat)\n", "\tc.Assert(err, IsNil, Commentf(comment))\n", "\talloc.Rebase(tableID, base...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/kvencoder/kv_encoder_test.go
1
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.9987126588821411, 0.16585847735404968, 0.00016187407891266048, 0.001248686108738184, 0.36586204171180725 ]
{ "id": 9, "code_window": [ "\tkvPairsExpect, affectedRowsExpect, err := encoder.Encode(sql, tableID)\n", "\tc.Assert(err, IsNil, Commentf(comment))\n", "\n", "\tstmtID, err := encoder.PrepareStmt(prepareFormat)\n", "\tc.Assert(err, IsNil, Commentf(comment))\n", "\talloc.Rebase(tableID, base...
// Code generated by protoc-gen-go. // source: github.com/golang/protobuf/ptypes/any/any.proto // DO NOT EDIT! /* Package any is a generated protocol buffer package. It is generated from these files: github.com/golang/protobuf/ptypes/any/any.proto It has these top-level messages: Any */ package any import proto "...
vendor/github.com/golang/protobuf/ptypes/any/any.pb.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.00017595819372218102, 0.00017122889403253794, 0.0001621690025785938, 0.0001731240190565586, 0.000004403847924550064 ]
{ "id": 9, "code_window": [ "\tkvPairsExpect, affectedRowsExpect, err := encoder.Encode(sql, tableID)\n", "\tc.Assert(err, IsNil, Commentf(comment))\n", "\n", "\tstmtID, err := encoder.PrepareStmt(prepareFormat)\n", "\tc.Assert(err, IsNil, Commentf(comment))\n", "\talloc.Rebase(tableID, base...
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, ...
vendor/google.golang.org/genproto/LICENSE
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.00018046004697680473, 0.000178274538484402, 0.00017533716163598, 0.00017860544903669506, 0.000001301980773860123 ]
{ "id": 9, "code_window": [ "\tkvPairsExpect, affectedRowsExpect, err := encoder.Encode(sql, tableID)\n", "\tc.Assert(err, IsNil, Commentf(comment))\n", "\n", "\tstmtID, err := encoder.PrepareStmt(prepareFormat)\n", "\tc.Assert(err, IsNil, Commentf(comment))\n", "\talloc.Rebase(tableID, base...
// Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_netbsd.go // +build arm,netbsd package unix const ( sizeofPtr = 0x4 sizeofShort = 0x2 sizeofInt = 0x4 sizeofLong = 0x4 sizeofLongLong = 0x8 ) type ( _C_short int16 _C_int int32 _C_long int32 _C_long_long int64 ) t...
vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.00019495324522722512, 0.00016982607485260814, 0.00016030107508413494, 0.0001703361194813624, 0.000005625502126349602 ]
{ "id": 10, "code_window": [ "\t\tbaseID := alloc.Base()\n", "\t\tkvPairs, _, err1 := encoder.Encode(sql, tableID)\n", "\t\tc.Assert(err1, IsNil, Commentf(\"sql:%s\", sql))\n", "\t\talloc.Rebase(tableID, baseID, false)\n", "\t\tretryKvPairs, _, err1 := encoder.Encode(sql, tableID)\n", "\t\tc...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/kvencoder/allocator.go
1
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.0030201049521565437, 0.0011476165382191539, 0.00017542397836223245, 0.0010089947609230876, 0.0009671743609942496 ]
{ "id": 10, "code_window": [ "\t\tbaseID := alloc.Base()\n", "\t\tkvPairs, _, err1 := encoder.Encode(sql, tableID)\n", "\t\tc.Assert(err1, IsNil, Commentf(\"sql:%s\", sql))\n", "\t\talloc.Rebase(tableID, baseID, false)\n", "\t\tretryKvPairs, _, err1 := encoder.Encode(sql, tableID)\n", "\t\tc...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ma...
vendor/github.com/apache/thrift/lib/go/thrift/protocol_factory.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.00017579250561539084, 0.0001711854711174965, 0.00016321208386216313, 0.0001745518238749355, 0.000005660741862811847 ]
{ "id": 10, "code_window": [ "\t\tbaseID := alloc.Base()\n", "\t\tkvPairs, _, err1 := encoder.Encode(sql, tableID)\n", "\t\tc.Assert(err1, IsNil, Commentf(\"sql:%s\", sql))\n", "\t\talloc.Rebase(tableID, baseID, false)\n", "\t\tretryKvPairs, _, err1 := encoder.Encode(sql, tableID)\n", "\t\tc...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
expression/builtin_arithmetic_test.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.00042007933370769024, 0.00017671988462097943, 0.00016244292783085257, 0.0001707362971501425, 0.000034249947930220515 ]
{ "id": 10, "code_window": [ "\t\tbaseID := alloc.Base()\n", "\t\tkvPairs, _, err1 := encoder.Encode(sql, tableID)\n", "\t\tc.Assert(err1, IsNil, Commentf(\"sql:%s\", sql))\n", "\t\talloc.Rebase(tableID, baseID, false)\n", "\t\tretryKvPairs, _, err1 := encoder.Encode(sql, tableID)\n", "\t\tc...
// Copyright 2016 Michal Witkowski. All Rights Reserved. // See LICENSE for licensing terms. // gRPC Prometheus monitoring interceptors for server-side gRPC. package grpc_prometheus import ( "golang.org/x/net/context" "google.golang.org/grpc" ) // PreregisterServices takes a gRPC server and pre-initializes all co...
vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.000174992936081253, 0.0001673682127147913, 0.0001617329107830301, 0.00016792195674497634, 0.000004619093033397803 ]
{ "id": 11, "code_window": [ "\n", "\tfor _, sql := range sqls {\n", "\t\tbaseID := alloc.Base()\n", "\t\tkvPairs, _, err1 := encoder.Encode(sql, tableID)\n", "\t\tc.Assert(err1, IsNil, Commentf(\"sql:%s\", sql))\n", "\t\talloc.Rebase(tableID, baseID, false)\n", "\t\tretryKvPairs, _, err...
// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/kvencoder/kv_encoder_test.go
1
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.9979240894317627, 0.13105960190296173, 0.00016159570077434182, 0.0015008006012067199, 0.32242998480796814 ]
{ "id": 11, "code_window": [ "\n", "\tfor _, sql := range sqls {\n", "\t\tbaseID := alloc.Base()\n", "\t\tkvPairs, _, err1 := encoder.Encode(sql, tableID)\n", "\t\tc.Assert(err1, IsNil, Commentf(\"sql:%s\", sql))\n", "\t\talloc.Rebase(tableID, baseID, false)\n", "\t\tretryKvPairs, _, err...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
executor/set.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.0023154993541538715, 0.0002691542904358357, 0.00016798685828689486, 0.00017163046868517995, 0.0003983177011832595 ]
{ "id": 11, "code_window": [ "\n", "\tfor _, sql := range sqls {\n", "\t\tbaseID := alloc.Base()\n", "\t\tkvPairs, _, err1 := encoder.Encode(sql, tableID)\n", "\t\tc.Assert(err1, IsNil, Commentf(\"sql:%s\", sql))\n", "\t\talloc.Rebase(tableID, baseID, false)\n", "\t\tretryKvPairs, _, err...
// Copyright 2016 The etcd Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
vendor/github.com/coreos/etcd/clientv3/concurrency/session.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.0002749184495769441, 0.00017663305334281176, 0.00016163855616468936, 0.00017014748300425708, 0.00002664538442331832 ]
{ "id": 11, "code_window": [ "\n", "\tfor _, sql := range sqls {\n", "\t\tbaseID := alloc.Base()\n", "\t\tkvPairs, _, err1 := encoder.Encode(sql, tableID)\n", "\t\tc.Assert(err1, IsNil, Commentf(\"sql:%s\", sql))\n", "\t\talloc.Rebase(tableID, baseID, false)\n", "\t\tretryKvPairs, _, err...
// Copyright 2016 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
util/codec/bench_test.go
0
https://github.com/pingcap/tidb/commit/c6258e3aeb79a06753e9d013b78a6f6e0b4df708
[ 0.0014132908545434475, 0.00030865619191899896, 0.00016313226660713553, 0.0001727317285258323, 0.0003905793419107795 ]