text stringlengths 93 16.4k | id stringlengths 20 40 | metadata dict | input_ids listlengths 45 2.05k | attention_mask listlengths 45 2.05k | complexity int64 1 9 |
|---|---|---|---|---|---|
func TestGetFileContentTypeZIP(t *testing.T) {
file := `../testdata/ziputils/test1.zip`
fileType, err := GetFileContentType(file)
if err != nil {
t.Log("Error -> ", err)
t.Fail()
}
if fileType != "application/zip" {
t.Log(fileType)
t.Fail()
}
} | explode_data.jsonl/24007 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
1949,
1703,
29504,
61585,
1155,
353,
8840,
836,
8,
341,
17661,
1669,
1565,
1244,
92425,
14,
9964,
6031,
12697,
16,
20991,
3989,
17661,
929,
11,
1848,
1669,
2126,
1703,
29504,
4866,
692,
743,
1848,
961,
2092,
341,
197,
3244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRequestConnectionReuse(t *testing.T) {
ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "OK")
}))
// an amount of iterations
var iter = 10000
// connections tracks an amount of connections made
var connections int64
ts.Config.ConnState... | explode_data.jsonl/5894 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 270
} | [
2830,
3393,
1900,
4526,
38081,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
1806,
46723,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
11009,
991,
33655,
3622,
11,
330,
3925,
1138... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSubsetSlice_Simple(t *testing.T) {
super := []interface{}{
"1", "2", "3",
}
sub := []interface{}{
"3",
}
if !testutil.ContainSubsetSlice(super, sub) {
t.Fatalf("expected slice to be subset of super, got false")
}
} | explode_data.jsonl/79695 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 99
} | [
2830,
3393,
70584,
33236,
1098,
6456,
1155,
353,
8840,
836,
8,
1476,
12468,
1669,
3056,
4970,
67066,
197,
197,
1,
16,
497,
330,
17,
497,
330,
18,
756,
197,
532,
28624,
1669,
3056,
4970,
67066,
197,
197,
1,
18,
756,
197,
532,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPrepareOverMaxPreparedStmtCount(t *testing.T) {
t.Skip("unstable, skip it and fix it before 20210705")
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
// test prepare and deallocate.
prePrepared := readGaugeInt(metrics.PreparedStmtGaug... | explode_data.jsonl/5501 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 664
} | [
2830,
3393,
50590,
1918,
5974,
4703,
7212,
31063,
2507,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
445,
359,
27992,
11,
10706,
432,
323,
5046,
432,
1573,
220,
17,
15,
17,
16,
15,
22,
15,
20,
1138,
57279,
11,
4240,
1669,
1273,
8226,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRuntimeRTBeforeHook(t *testing.T) {
modules := map[string]string{
"test": `
local nakama = require("nakama")
function before_match_create(ctx, payload)
nakama.wallet_update(ctx.user_id, {gem = 20})
return payload
end
nakama.register_rt_before(before_match_create, "MatchCreate")`,
}
runtime, err := runt... | explode_data.jsonl/59799 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 441
} | [
2830,
3393,
15123,
5350,
10227,
31679,
1155,
353,
8840,
836,
8,
341,
42228,
2425,
1669,
2415,
14032,
30953,
515,
197,
197,
1,
1944,
788,
22074,
2438,
40886,
3029,
284,
1373,
445,
42874,
3029,
1138,
1688,
1573,
10708,
8657,
7502,
11,
772... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestConvertToVersion(t *testing.T) {
s := GetTestScheme()
tt := &TestType1{A: "I'm not a pointer object"}
other, err := s.ConvertToVersion(tt, "v1")
if err != nil {
t.Fatalf("Failure: %v", err)
}
converted, ok := other.(*ExternalTestType1)
if !ok {
t.Fatalf("Got wrong type")
}
if tt.A != converted.A {... | explode_data.jsonl/29645 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 160
} | [
2830,
3393,
12012,
1249,
5637,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
2126,
2271,
28906,
741,
3244,
83,
1669,
609,
2271,
929,
16,
90,
32,
25,
330,
40,
2776,
537,
264,
7445,
1633,
16707,
197,
1575,
11,
1848,
1669,
274,
36179,
1249... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func Test_VolumeExists_Positive_VolumeDoesntExistNodeExists(t *testing.T) {
// Arrange
volumePluginMgr, _ := controllervolumetesting.GetTestVolumePluginMgr((t))
dsw := NewDesiredStateOfWorld(volumePluginMgr)
nodeName := "node-name"
dsw.AddNode(nodeName)
podName := "pod-name"
volume1Name := api.UniqueDeviceName("... | explode_data.jsonl/40751 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 417
} | [
2830,
3393,
2334,
4661,
15575,
44246,
3404,
2334,
4661,
21468,
406,
25613,
1955,
15575,
1155,
353,
8840,
836,
8,
341,
197,
322,
40580,
198,
5195,
4661,
11546,
25567,
11,
716,
1669,
683,
1100,
648,
1132,
57824,
287,
2234,
2271,
18902,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestConfigMinimumLargerThanMaximum(t *testing.T) {
defer func() {
err := recover()
assert.NotNil(t, err)
}()
def := time.Duration(15) * time.Second
min := time.Duration(20) * time.Second
max := time.Duration(10) * time.Second
c := NewConfig(def, min, max, defaultNamespaceCapacity, nil, nil, "", "", ""... | explode_data.jsonl/39970 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 143
} | [
2830,
3393,
2648,
28695,
43,
41776,
26067,
27309,
1155,
353,
8840,
836,
8,
1476,
16867,
2915,
368,
341,
197,
9859,
1669,
11731,
741,
197,
6948,
93882,
1155,
11,
1848,
340,
197,
66816,
7452,
1669,
882,
33795,
7,
16,
20,
8,
353,
882,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWaitChan(t *testing.T) {
l := New()
ch := l.WaitChan()
// 1) add one element to an empty list
go l.PushBack(1)
<-ch
// 2) and remove it
el := l.Front()
v := l.Remove(el)
if v != 1 {
t.Fatal("where is 1 coming from?")
}
// 3) test iterating forward and waiting for Next (NextWaitCh... | explode_data.jsonl/12514 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 656
} | [
2830,
3393,
14190,
46019,
1155,
353,
8840,
836,
8,
972,
8810,
1669,
1532,
3568,
23049,
1669,
326,
28384,
46019,
18005,
197,
322,
220,
16,
8,
912,
825,
2392,
311,
458,
4287,
1140,
319,
30680,
326,
34981,
3707,
7,
16,
1218,
197,
45342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMultipleInstance(t *testing.T) {
Convey("Negative test zot multiple instance", t, func() {
port := test.GetFreePort()
baseURL := test.GetBaseURL(port)
conf := config.New()
conf.HTTP.Port = port
htpasswdPath := test.MakeHtpasswdFile()
defer os.Remove(htpasswdPath)
conf.HTTP.Auth = &config.AuthCo... | explode_data.jsonl/77686 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 935
} | [
2830,
3393,
32089,
2523,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
38489,
1273,
1147,
354,
5248,
2867,
497,
259,
11,
2915,
368,
341,
197,
52257,
1669,
1273,
2234,
10940,
7084,
741,
197,
24195,
3144,
1669,
1273,
2234,
3978,
3144,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDeleteVMSS(t *testing.T) {
const (
resourceGroup = "my-rg"
name = "my-vmss"
)
testcases := []struct {
name string
expectedError string
expect func(s *mock_scalesets.MockScaleSetScopeMockRecorder, m *mock_scalesets.MockClientMockRecorder)
}{
{
name: "success... | explode_data.jsonl/17833 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1248
} | [
2830,
3393,
6435,
11187,
1220,
1155,
353,
8840,
836,
8,
341,
4777,
2399,
197,
50346,
2808,
284,
330,
2408,
12,
1984,
698,
197,
11609,
688,
284,
330,
2408,
12,
7338,
778,
698,
197,
692,
18185,
23910,
1669,
3056,
1235,
341,
197,
11609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGenericReceiver(t *testing.T) {
const files = `
-- go.mod --
module mod.com
go 1.18
-- main.go --
package main
type SyncMap[K any, V comparable] struct {}
func (s *SyncMap[K,V]) f() {}
type XX[T any] struct {}
type UU[T any] struct {}
func (s SyncMap[XX,string]) g(v UU) {}
`
tests := []struct {
pat stri... | explode_data.jsonl/36448 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 458
} | [
2830,
3393,
19964,
25436,
1155,
353,
8840,
836,
8,
341,
4777,
3542,
284,
22074,
313,
728,
10929,
39514,
4352,
1463,
905,
271,
3346,
220,
16,
13,
16,
23,
198,
313,
1887,
18002,
39514,
1722,
1887,
198,
1313,
28937,
2227,
53277,
894,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestDownloadFile(t *testing.T) {
dl, fr := getDownloader()
fr.content = "test file content"
temp, _ := ioutil.TempFile("", "testdownload")
u, _ := url.Parse("http://www.test.url/a/file")
temp.Close()
err := dl.DownloadFile(u, temp.Name())
if err != nil {
t.Errorf("Unexpected error: %v", err)
}
content, ... | explode_data.jsonl/20556 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 177
} | [
2830,
3393,
11377,
1703,
1155,
353,
8840,
836,
8,
341,
2698,
75,
11,
1422,
1669,
633,
92698,
741,
97714,
5406,
284,
330,
1944,
1034,
2213,
698,
16280,
11,
716,
1669,
43144,
65009,
1703,
19814,
330,
1944,
12885,
1138,
10676,
11,
716,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestTaintPressureNodeDaemonLaunchesPod(t *testing.T) {
for _, strategy := range updateStrategies() {
ds := newDaemonSet("critical")
ds.Spec.UpdateStrategy = *strategy
setDaemonSetCritical(ds)
manager, podControl, _, err := newTestController(ds)
if err != nil {
t.Fatalf("error creating DaemonSets cont... | explode_data.jsonl/50345 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 411
} | [
2830,
3393,
51,
1641,
68269,
1955,
89177,
32067,
288,
23527,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
8282,
1669,
2088,
2647,
2580,
69388,
368,
341,
197,
83336,
1669,
501,
89177,
1649,
445,
41541,
1138,
197,
83336,
36473,
16689,
19816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestValidateMsgDelegateKeys(t *testing.T) {
var (
ethAddress = "0xb462864E395d88d6bc7C5dd5F3F5eb4cc2599255"
cosmosAddress sdk.AccAddress = bytes.Repeat([]byte{0x1}, sdk.AddrLen)
valAddress sdk.ValAddress = bytes.Repeat([]byte{0x1}, sdk.AddrLen)
)
specs := map[string]struct {
srcCosm... | explode_data.jsonl/53814 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 801
} | [
2830,
3393,
17926,
6611,
9381,
8850,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
197,
769,
4286,
4293,
284,
330,
15,
7929,
19,
21,
17,
23,
21,
19,
36,
18,
24,
20,
67,
23,
23,
67,
21,
8904,
22,
34,
20,
631,
20,
37,
18,
37,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestErrorsInAccountCreation(t *testing.T) {
t.Run("Should give erro on wrong account name", func(t *testing.T) {
_, err := NewTestingEmulator().Config("fixtures/invalid_account_in_deployment.json").StartE()
assert.Error(t, err)
assert.Contains(t, err.Error(), "deployment contains nonexisting account emulat... | explode_data.jsonl/24249 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 117
} | [
2830,
3393,
13877,
641,
7365,
32701,
1155,
353,
8840,
836,
8,
1476,
3244,
16708,
445,
14996,
2968,
36310,
389,
4969,
2692,
829,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
6878,
1848,
1669,
1532,
16451,
2269,
10511,
1005,
2648,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestArgv_Quote(t *testing.T) {
tests := []struct {
Name, Input, Output string
}{
{
Name: "empty string",
Input: "",
Output: `""`,
},
{
Name: "special char escaping #1",
Input: `\"\`,
Output: `"\\\"\\"`,
},
{
Name: "special char escaping #2",
Input: `a\\b\\\c\\""`,
... | explode_data.jsonl/58695 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 346
} | [
2830,
3393,
2735,
85,
62,
19466,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
21297,
11,
5571,
11,
9258,
914,
198,
197,
59403,
197,
197,
515,
298,
21297,
25,
256,
330,
3194,
914,
756,
298,
66588,
25,
220,
8324,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestIntegrationAvatar(t *testing.T) {
_, teardown := prepService(t)
defer teardown()
// login
jar, err := cookiejar.New(nil)
require.Nil(t, err)
client := &http.Client{Jar: jar, Timeout: 5 * time.Second}
resp, err := client.Get("http://127.0.0.1:8089/auth/dev/login?site=my-test-site")
require.Nil(t, err)... | explode_data.jsonl/34042 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 290
} | [
2830,
3393,
52464,
24845,
1155,
353,
8840,
836,
8,
1476,
197,
6878,
49304,
1669,
21327,
1860,
1155,
340,
16867,
49304,
2822,
197,
322,
5858,
198,
12428,
277,
11,
1848,
1669,
12544,
19033,
7121,
27907,
340,
17957,
59678,
1155,
11,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestStopper(t *testing.T) {
r := routine{}
require.False(t, r.Running)
require.NoError(t, r.StartRoutine())
assert.True(t, r.Running)
r.Shutdown()
assert.Eventually(t, func() bool {
return r.Running == false
}, time.Second, time.Millisecond)
// after shutdown, we can start it again
require.NoError(t, r... | explode_data.jsonl/15541 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
10674,
712,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
14021,
16094,
17957,
50757,
1155,
11,
435,
2013,
11216,
340,
17957,
35699,
1155,
11,
435,
12101,
73018,
2398,
6948,
32443,
1155,
11,
435,
2013,
11216,
340,
7000,
10849,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOauthRequestsWithBaseURI(t *testing.T) {
cfg := newFakeKeycloakConfig()
cfg.BaseURI = "/base-uri"
requests := []fakeRequest{
{
URI: "/base-uri/oauth/authorize",
Redirects: true,
ExpectedCode: http.StatusSeeOther,
},
{
URI: "/base-uri/oauth/callback",
Redirects: t... | explode_data.jsonl/14748 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 413
} | [
2830,
3393,
46,
3242,
1900,
16056,
3978,
10301,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
501,
52317,
1592,
88751,
2648,
741,
50286,
13018,
10301,
284,
3521,
3152,
87232,
698,
23555,
82,
1669,
3056,
30570,
1900,
515,
197,
197,
515,
298... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPrexistingExpiredRecord(t *testing.T) {
dstore := dssync.MutexWrap(ds.NewMapDatastore())
d := mockrouting.NewServer().ClientWithDatastore(context.Background(), testutil.RandIdentityOrFatal(t), dstore)
resolver := NewIpnsResolver(d)
publisher := NewIpnsPublisher(d, dstore)
privk, pubk, err := test.RandTe... | explode_data.jsonl/69712 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 450
} | [
2830,
3393,
4703,
87,
11083,
54349,
6471,
1155,
353,
8840,
836,
8,
341,
2698,
4314,
1669,
294,
778,
1721,
99014,
26787,
33783,
7121,
2227,
1043,
4314,
2398,
2698,
1669,
7860,
73320,
7121,
5475,
1005,
2959,
80356,
4314,
5378,
19047,
1507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestGetChildren(t *testing.T) {
cluster := newCluster(testPod, testRS, testDeploy)
err := cluster.ensureSynced()
assert.Nil(t, err)
rsChildren := cluster.getChildren(testRS)
assert.Equal(t, []appv1.ResourceNode{{
Kind: "Pod",
Namespace: "default",
Name: "helm-guestbook-pod",... | explode_data.jsonl/75180 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 441
} | [
2830,
3393,
1949,
11539,
1155,
353,
8840,
836,
8,
341,
197,
18855,
1669,
501,
28678,
8623,
23527,
11,
1273,
11451,
11,
1273,
69464,
340,
9859,
1669,
10652,
63065,
12154,
291,
741,
6948,
59678,
1155,
11,
1848,
692,
41231,
11539,
1669,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReceiveWithLongLivedCtx(t *testing.T) {
sr := new(oteltest.SpanRecorder)
tp := oteltest.NewTracerProvider(oteltest.WithSpanRecorder(sr))
otel.SetTracerProvider(tp)
defer otel.SetTracerProvider(trace.NewNoopTracerProvider())
longLivedCtx, parentSpan := tp.Tracer("test").Start(context.Background(), t.Name(... | explode_data.jsonl/9551 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 788
} | [
2830,
3393,
14742,
2354,
6583,
43,
2221,
23684,
1155,
353,
8840,
836,
8,
341,
1903,
81,
1669,
501,
7,
40785,
1944,
85309,
47023,
340,
73423,
1669,
14147,
301,
1944,
7121,
1282,
9584,
5179,
7,
40785,
1944,
26124,
12485,
47023,
67650,
117... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestWSAuthTimeout(t *testing.T) {
for _, test := range []struct {
name string
at float64
wat float64
err string
}{
{"use top-level auth timeout", 10.0, 0.0, ""},
{"use websocket auth timeout", 10.0, 0.05, "-ERR 'Authentication Timeout'"},
} {
t.Run(test.name, func(t *testing.T) {
o := testW... | explode_data.jsonl/42728 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 704
} | [
2830,
3393,
7433,
5087,
7636,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
3056,
1235,
341,
197,
11609,
914,
198,
197,
35447,
256,
2224,
21,
19,
198,
197,
6692,
266,
220,
2224,
21,
19,
198,
197,
9859,
220,
914,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestGetDimensionsReturnsOk(t *testing.T) {
t.Parallel()
Convey("Given a dataset API with a successful store mock and auth", t, func() {
mockedDataStore, isLocked := storeMockWithLock(false)
mockedDataStore.GetDimensionsFromInstanceFunc = func(ctx context.Context, id string, offset, limit int) ([]*models.Dim... | explode_data.jsonl/20839 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1145
} | [
2830,
3393,
1949,
21351,
16446,
11578,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
93070,
5617,
445,
22043,
264,
10337,
5333,
448,
264,
6849,
3553,
7860,
323,
4166,
497,
259,
11,
2915,
368,
341,
197,
2109,
67385,
1043,
6093,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBackupNonExistingFile(t *testing.T) {
env, cleanup := withTestEnvironment(t)
defer cleanup()
testSetupBackupData(t, env)
globalOptions.stderr = ioutil.Discard
defer func() {
globalOptions.stderr = os.Stderr
}()
p := filepath.Join(env.testdata, "0", "0", "9")
dirs := []string{
filepath.Join(p, "0"... | explode_data.jsonl/43543 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 209
} | [
2830,
3393,
56245,
8121,
53067,
1703,
1155,
353,
8840,
836,
8,
341,
57538,
11,
21290,
1669,
448,
2271,
12723,
1155,
340,
16867,
21290,
2822,
18185,
21821,
56245,
1043,
1155,
11,
6105,
340,
18842,
3798,
34742,
284,
43144,
909,
47560,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestResponse_MarshalJSON_jsonrpc(t *testing.T) {
null := json.RawMessage("null")
b, err := json.Marshal(&jsonrpc2.Response{Result: &null})
if err != nil {
t.Fatal(err)
}
if want := `{"id":0,"result":null,"jsonrpc":"2.0"}`; string(b) != want {
t.Errorf("got %q, want %q", b, want)
}
} | explode_data.jsonl/50178 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
2582,
1245,
28423,
5370,
9455,
29414,
1155,
353,
8840,
836,
8,
341,
60274,
1669,
2951,
50575,
2052,
445,
2921,
1138,
2233,
11,
1848,
1669,
2951,
37271,
2099,
2236,
29414,
17,
12574,
90,
2077,
25,
609,
2921,
3518,
743,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestPgRepository_ExistsByExternalTenant(t *testing.T) {
t.Run("Success", func(t *testing.T) {
// GIVEN
db, dbMock := testdb.MockDatabase(t)
defer dbMock.AssertExpectations(t)
dbMock.ExpectQuery(regexp.QuoteMeta(`SELECT 1 FROM public.business_tenant_mappings WHERE external_tenant = $1`)).
WithArgs(testE... | explode_data.jsonl/23363 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 509
} | [
2830,
3393,
82540,
4624,
62,
15575,
1359,
25913,
71252,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
7188,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
322,
89836,
198,
197,
20939,
11,
2927,
11571,
1669,
1273,
1999,
24664,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEmbeddedReader(t *testing.T) {
m := NewMessage()
m.SetHeader("From", "from@example.com")
m.SetHeader("To", "to@example.com")
var b bytes.Buffer
b.Write([]byte("Test file"))
m.EmbedReader("file.txt", &b)
want := &message{
from: "from@example.com",
to: []string{"to@example.com"},
content: "From:... | explode_data.jsonl/31583 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 307
} | [
2830,
3393,
83466,
5062,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1532,
2052,
741,
2109,
4202,
4047,
445,
3830,
497,
330,
1499,
35487,
905,
1138,
2109,
4202,
4047,
445,
1249,
497,
330,
983,
35487,
905,
5130,
2405,
293,
5820,
22622,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParseIntoFile(t *testing.T) {
got := map[string]interface{}{}
input := "name1=path1"
expect := map[string]interface{}{
"name1": "value1",
}
rs2v := func(rs []rune) (interface{}, error) {
v := string(rs)
if v != "path1" {
t.Errorf("%s: runesToVal: Expected value path1, got %s", input, v)
return... | explode_data.jsonl/2416 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 327
} | [
2830,
3393,
14463,
26591,
1703,
1155,
353,
8840,
836,
8,
341,
3174,
354,
1669,
2415,
14032,
31344,
6257,
16094,
22427,
1669,
330,
606,
16,
81940,
16,
698,
24952,
1669,
2415,
14032,
31344,
67066,
197,
197,
31486,
16,
788,
330,
957,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLabelsAndAnnotationsRoundTrip(t *testing.T) {
expectedLabels := map[string]string{"foo.123.abc": "baz", "bar.456.xyz": "qwe"}
expectedAnnotations := map[string]string{"uio.ert": "dfs", "jkl": "asd"}
// Merge labels and annotations into docker labels.
dockerLabels := makeLabels(expectedLabels, expectedAnnot... | explode_data.jsonl/52783 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 175
} | [
2830,
3393,
23674,
3036,
21418,
27497,
56352,
1155,
353,
8840,
836,
8,
341,
42400,
23674,
1669,
2415,
14032,
30953,
4913,
7975,
13,
16,
17,
18,
13,
13683,
788,
330,
42573,
497,
330,
2257,
13,
19,
20,
21,
55699,
788,
330,
80,
896,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEncodeES256(t *testing.T) {
encodedX := "f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU"
decodedX, err := base64.RawURLEncoding.DecodeString(encodedX)
assert.NoError(t, err)
var x big.Int
x.SetBytes(decodedX)
encodedY := "x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0"
decodedY, err := base64.RawURLEncoding... | explode_data.jsonl/6172 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 641
} | [
2830,
3393,
32535,
1570,
17,
20,
21,
1155,
353,
8840,
836,
8,
341,
197,
19329,
55,
1669,
330,
69,
23,
18,
46,
41,
18,
35,
17,
9770,
16,
48837,
23,
85,
392,
24,
83,
2304,
16,
70,
52148,
89,
53,
22,
21,
68,
23,
51,
355,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestServer_Rejects_HeadersNoEnd_Then_ContinuationWrongStream(t *testing.T) {
testServerRejectsConn(t, func(st *serverTester) {
st.writeHeaders(HeadersFrameParam{
StreamID: 1,
BlockFragment: st.encodeHeader(),
EndStream: true,
EndHeaders: false,
})
if err := st.fr.WriteContinuation(3,... | explode_data.jsonl/71654 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 177
} | [
2830,
3393,
5475,
50693,
583,
82,
62,
10574,
2753,
3727,
62,
12209,
62,
36139,
4002,
29185,
3027,
1155,
353,
8840,
836,
8,
341,
18185,
5475,
78413,
82,
9701,
1155,
11,
2915,
5895,
353,
4030,
58699,
8,
341,
197,
18388,
3836,
10574,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestReceivesFullOnFailedUpdate(t *testing.T) {
dc := testdataclient.New([]*eskip.Route{{Id: "route1", Path: "/some-path", Backend: "https://www.example.org"}})
tr, err := newTestRouting(dc)
if err != nil {
t.Error(err)
return
}
defer tr.close()
tr.log.Reset()
dc.FailNext()
dc.Update([]*eskip.Route{{I... | explode_data.jsonl/58571 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 241
} | [
2830,
3393,
693,
346,
1886,
9432,
1925,
9408,
4289,
1155,
353,
8840,
836,
8,
341,
87249,
1669,
1273,
691,
2972,
7121,
85288,
288,
13389,
58004,
2979,
764,
25,
330,
8966,
16,
497,
7933,
25,
3521,
14689,
33095,
497,
55260,
25,
330,
2428... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestPatchUpdateFactWithErrorInGet(t *testing.T) {
errorMessage := "error during GET"
get := func(*http.Request) (*http.Response, error) {
return nil, errors.New(errorMessage)
}
fakeClient := newClientForTest(get, nil)
facts := facts{
client: fakeClient,
ns: "default",
}
updated, err := facts.Pa... | explode_data.jsonl/45999 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 157
} | [
2830,
3393,
43622,
4289,
17417,
66102,
641,
1949,
1155,
353,
8840,
836,
8,
341,
18290,
2052,
1669,
330,
841,
2337,
7890,
698,
10366,
1669,
2915,
4071,
1254,
9659,
8,
4609,
1254,
12574,
11,
1465,
8,
341,
197,
853,
2092,
11,
5975,
7121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInMemoryIndexCache_MaxNumberOfItemsHit(t *testing.T) {
defer leaktest.CheckTimeout(t, 10*time.Second)()
metrics := prometheus.NewRegistry()
cache, err := NewInMemoryIndexCache(log.NewNopLogger(), metrics, Opts{
MaxItemSizeBytes: 2*sliceHeaderSize + 10,
MaxSizeBytes: 2*sliceHeaderSize + 10,
})
tes... | explode_data.jsonl/1717 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 654
} | [
2830,
3393,
641,
10642,
1552,
8233,
58843,
40619,
4353,
19498,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
10600,
7636,
1155,
11,
220,
16,
15,
77053,
32435,
8,
2822,
2109,
13468,
1669,
2706,
39705,
7121,
15603,
741,
52680,
11,
184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFindPairDifferences(t *testing.T) {
pairList := []string{"BTC-USD", "ETH-USD", "LTC-USD"}
// Test new pair update
newPairs, removedPairs := FindPairDifferences(pairList, []string{"DASH-USD"})
if len(newPairs) != 1 && len(removedPairs) != 3 {
t.Error("Test failed. TestFindPairDifferences: Unexpected valu... | explode_data.jsonl/55842 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 381
} | [
2830,
3393,
9885,
12443,
35,
58326,
1155,
353,
8840,
836,
8,
341,
3223,
1310,
852,
1669,
3056,
917,
4913,
59118,
12,
26749,
497,
330,
7625,
12,
26749,
497,
330,
43,
7749,
12,
26749,
63159,
197,
322,
3393,
501,
6716,
2647,
198,
8638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestRunWithExplicitSNI(t *testing.T) {
ctx := context.Background()
measurer := tlstool.NewExperimentMeasurer(tlstool.Config{
SNI: "dns.google",
})
measurement := new(model.Measurement)
measurement.Input = "8.8.8.8:853"
err := measurer.Run(
ctx,
&mockable.Session{},
measurement,
model.NewPrinterCall... | explode_data.jsonl/4137 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 167
} | [
2830,
3393,
51918,
98923,
50,
14912,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
49294,
56294,
1669,
29796,
267,
1749,
7121,
77780,
7823,
56294,
1155,
36687,
1749,
10753,
515,
197,
7568,
14912,
25,
330,
45226,
5713,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNative_Compile_InvalidType(t *testing.T) {
// setup context
gin.SetMode(gin.TestMode)
resp := httptest.NewRecorder()
_, engine := gin.CreateTestContext(resp)
// setup mock server
engine.GET("/api/v3/repos/foo/bar/contents/:path", func(c *gin.Context) {
c.Header("Content-Type", "application/json")
c... | explode_data.jsonl/24135 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1630
} | [
2830,
3393,
20800,
16946,
12192,
62,
7928,
929,
1155,
353,
8840,
836,
8,
341,
197,
322,
6505,
2266,
198,
3174,
258,
4202,
3636,
3268,
258,
8787,
3636,
692,
34653,
1669,
54320,
70334,
7121,
47023,
741,
197,
6878,
4712,
1669,
46183,
7251,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOpaque(t *testing.T) {
got := fmt.Errorf("foo: %+v", errors.Opaque(errorT{}))
want := "foo: errorT"
if got.Error() != want {
t.Errorf("error without Format: got %v; want %v", got, want)
}
got = fmt.Errorf("foo: %+v", errors.Opaque(errorD{}))
want = "foo: errorD:\n detail"
if got.Error() != want {
... | explode_data.jsonl/5223 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 167
} | [
2830,
3393,
69398,
1155,
353,
8840,
836,
8,
341,
3174,
354,
1669,
8879,
13080,
445,
7975,
25,
68524,
85,
497,
5975,
8382,
53422,
6390,
51,
6257,
1171,
50780,
1669,
330,
7975,
25,
1465,
51,
698,
743,
2684,
6141,
368,
961,
1366,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestDirectoryResolver_FilesByGlobSingle(t *testing.T) {
resolver, err := newDirectoryResolver("./test-fixtures")
assert.NoError(t, err)
refs, err := resolver.FilesByGlob("**/image-symlinks/*1.txt")
assert.NoError(t, err)
assert.Len(t, refs, 1)
assert.Equal(t, "image-symlinks/file-1.txt", refs[0].RealPath)
} | explode_data.jsonl/50116 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
9310,
18190,
1400,
3658,
1359,
38,
1684,
10888,
1155,
353,
8840,
836,
8,
341,
10202,
7921,
11,
1848,
1669,
501,
9310,
18190,
13988,
1944,
70913,
18513,
1138,
6948,
35699,
1155,
11,
1848,
340,
197,
16149,
11,
1848,
1669,
3622... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestServe(t *testing.T) {
d := NewDirectory("aDirectory", GetTemplate(t))
d.AddEntry("file", false)
d.AddEntry("dir", true)
w := httptest.NewRecorder()
r := httptest.NewRequest("GET", "http://example.com/aDirectory/", nil)
d.Serve(w, r)
resp := w.Result()
assert.Equal(t, http.StatusOK, resp.StatusCode)
b... | explode_data.jsonl/967 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 261
} | [
2830,
3393,
60421,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
1532,
9310,
445,
64,
9310,
497,
2126,
7275,
1155,
1171,
2698,
1904,
5874,
445,
1192,
497,
895,
340,
2698,
1904,
5874,
445,
3741,
497,
830,
692,
6692,
1669,
54320,
70334,
712... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRowTableAddInvalidForm(t *testing.T) {
map_dao := &DaoImpl{}
service := service.MakeTableRowService(map_dao)
uri_params := map[string]string{"table_id": "42"}
values := url.Values{}
values.Set("with_geometry", "1")
request := makeRequest(http.MethodPost, uri_params, values, true)
result := service.Add(r... | explode_data.jsonl/15447 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 143
} | [
2830,
3393,
3102,
2556,
2212,
7928,
1838,
1155,
353,
8840,
836,
8,
341,
19567,
814,
3441,
1669,
609,
12197,
9673,
16094,
52934,
1669,
2473,
50133,
38558,
1860,
9147,
814,
3441,
340,
197,
6070,
6745,
1669,
2415,
14032,
30953,
4913,
2005,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLoadBlob(t *testing.T) {
repo, cleanup := repository.TestRepository(t)
defer cleanup()
length := 1000000
buf := restic.NewBlobBuffer(length)
_, err := io.ReadFull(rnd, buf)
rtest.OK(t, err)
id, _, err := repo.SaveBlob(context.TODO(), restic.DataBlob, buf, restic.ID{}, false)
rtest.OK(t, err)
rtest.O... | explode_data.jsonl/71939 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 350
} | [
2830,
3393,
5879,
37985,
1155,
353,
8840,
836,
8,
341,
17200,
5368,
11,
21290,
1669,
12542,
8787,
4624,
1155,
340,
16867,
21290,
2822,
49046,
1669,
220,
16,
15,
15,
15,
15,
15,
15,
198,
26398,
1669,
2732,
292,
7121,
37985,
4095,
21370... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestUserAgent(t *testing.T) {
handler := &myHandler{}
server := httptest.NewServer(handler)
defer server.Close()
client := &http.Client{}
s, err := storage.New(client)
if err != nil {
t.Fatalf("unable to create service: %v", err)
}
s.BasePath = server.URL
s.UserAgent = "myagent/1.0"
f := strings.NewR... | explode_data.jsonl/56691 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 367
} | [
2830,
3393,
1474,
16810,
1155,
353,
8840,
836,
8,
341,
53326,
1669,
609,
2408,
3050,
16094,
41057,
1669,
54320,
70334,
7121,
5475,
36514,
340,
16867,
3538,
10421,
2822,
25291,
1669,
609,
1254,
11716,
16094,
1903,
11,
1848,
1669,
5819,
712... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestSetFactoriesInvalidArgs(t *testing.T) {
err := setFactories(&FactoryOpts{
ProviderName: "SW",
SwOpts: &SwOpts{},
})
assert.Error(t, err)
assert.Contains(t, err.Error(), "Failed initializing SW.BCCSP")
err = setFactories(&FactoryOpts{
ProviderName: "PKCS11",
Pkcs11Opts: &pkcs11.PKCS11Opts{... | explode_data.jsonl/6057 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 181
} | [
2830,
3393,
1649,
17417,
2433,
7928,
4117,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
738,
17417,
2433,
2099,
4153,
43451,
515,
197,
197,
5179,
675,
25,
330,
16844,
756,
197,
7568,
86,
43451,
25,
981,
609,
13218,
43451,
38837,
197,
351... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestClientSetBuildConfigurationTemplateReset(t *testing.T) {
client, err := NewRealTestClient(t)
require.NoError(t, err, "Expected no error")
err = client.DeleteBuildConfiguration("Empty_TestClientSetBuildConfigurationTemplateReset")
require.NoError(t, err, "Expected no error")
err = client.DeleteBuildConfigu... | explode_data.jsonl/40092 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 504
} | [
2830,
3393,
2959,
1649,
11066,
7688,
7275,
14828,
1155,
353,
8840,
836,
8,
341,
25291,
11,
1848,
1669,
1532,
12768,
2271,
2959,
1155,
340,
17957,
35699,
1155,
11,
1848,
11,
330,
18896,
902,
1465,
1138,
9859,
284,
2943,
18872,
11066,
768... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewGraph(t *testing.T) {
var title = "Sample Title"
graph := NewGraph(title)
if graph.GraphPanel == nil {
t.Error("should be not nil")
}
if graph.TextPanel != nil {
t.Error("should be nil")
}
if graph.DashlistPanel != nil {
t.Error("should be nil")
}
if graph.SinglestatPanel != nil {
t.Error... | explode_data.jsonl/31046 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 167
} | [
2830,
3393,
3564,
11212,
1155,
353,
8840,
836,
8,
341,
2405,
2265,
284,
330,
17571,
10869,
1837,
66616,
1669,
1532,
11212,
12504,
692,
743,
4771,
40237,
4381,
621,
2092,
341,
197,
3244,
6141,
445,
5445,
387,
537,
2092,
1138,
197,
532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestUpdateBuild(t *testing.T) {
t.Parallel()
Convey("BootstrapConfig.UpdateBuild", t, func() {
Convey("updates build with gitiles commit, builder properties, $build/chromium_bootstrap module properties and build properties", func() {
config := &BootstrapConfig{
commit: &gitilesCommit{&buildbucketpb.Gi... | explode_data.jsonl/17735 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1862
} | [
2830,
3393,
4289,
11066,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
93070,
5617,
445,
45511,
2648,
16689,
11066,
497,
259,
11,
2915,
368,
1476,
197,
93070,
5617,
445,
49661,
1936,
448,
16345,
3658,
5266,
11,
7363,
5888,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMySQLTypes(t *testing.T) {
store, clean := realtikvtest.CreateMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustQuery(`select 0x01 + 1, x'4D7953514C' = "MySQL"`).Check(testkit.Rows("2 1"))
tk.MustQuery(`select 0b01 + 1, 0b01000001 = "A"`).Check(testkit.... | explode_data.jsonl/5793 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 146
} | [
2830,
3393,
59224,
4173,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1931,
83,
1579,
85,
1944,
7251,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_Histogram(t *testing.T) {
resource := pdata.NewResource()
metric := pdata.NewMetric()
metric.SetName("hist-metric")
metric.SetDataType(pdata.MetricDataTypeHistogram)
dp := metric.Histogram().DataPoints().AppendEmpty()
dp.SetTimestamp(createTimestamp())
dp.SetCount(4)
dp.SetBucketCounts([]uint64{1, 3,... | explode_data.jsonl/43643 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 502
} | [
2830,
3393,
2039,
28499,
1155,
353,
8840,
836,
8,
341,
50346,
1669,
70311,
7121,
4783,
741,
2109,
16340,
1669,
70311,
7121,
54310,
741,
2109,
16340,
4202,
675,
445,
21158,
1448,
16340,
1138,
2109,
16340,
4202,
22653,
1295,
691,
1321,
1634... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestErrorsWithSameParameters(t *testing.T) {
const description = "some description"
e1 := Errorf(codes.AlreadyExists, description)
e2 := Errorf(codes.AlreadyExists, description)
if e1 == e2 || !reflect.DeepEqual(e1, e2) {
t.Fatalf("Errors should be equivalent but unique - e1: %v, %v e2: %p, %v", e1.(*status... | explode_data.jsonl/57160 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 138
} | [
2830,
3393,
13877,
2354,
19198,
9706,
1155,
353,
8840,
836,
8,
341,
4777,
4008,
284,
330,
14689,
4008,
698,
7727,
16,
1669,
4600,
69,
1337,
2539,
9636,
2307,
15575,
11,
4008,
340,
7727,
17,
1669,
4600,
69,
1337,
2539,
9636,
2307,
1557... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestValidateServerPermissions_InvalidInput(t *testing.T) {
var tests = []struct {
name string
permissionsInput []models.Permission
}{
{"Invalid Permission info",
[]models.Permission{
models.Permission{
"",
"",
"",
"",
"",
"",
[]string{},
models.Con... | explode_data.jsonl/71215 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 544
} | [
2830,
3393,
17926,
5475,
23851,
62,
7928,
2505,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
11609,
1797,
914,
198,
197,
197,
29900,
2505,
3056,
6507,
73409,
198,
197,
59403,
197,
197,
4913,
7928,
18135,
3546,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestApplyBatchChange(t *testing.T) {
if testing.Short() {
t.Skip()
}
ctx := context.Background()
db := dbtesting.GetDB(t)
userID := ct.CreateTestUser(t, db, true).ID
now := timeutil.Now()
clock := func() time.Time { return now }
cstore := store.NewWithClock(db, clock)
repoStore := database.ReposWith(... | explode_data.jsonl/13588 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1497
} | [
2830,
3393,
28497,
21074,
4072,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
741,
197,
630,
20985,
1669,
2266,
19047,
741,
20939,
1669,
2927,
8840,
2234,
3506,
1155,
692,
19060,
915,
1669,
20251,
7251,
227... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCPUAvgPerc(t *testing.T) {
ts := signalutils.NewTimeseries(10 * time.Second)
ts.Add(10)
time.Sleep(1 * time.Second)
ts.Add(10.6)
v, ok := TimeLoadPerc(&ts, 500*time.Millisecond)
assert.True(t, ok)
assert.InDeltaf(t, 0.6, v, 0.01, "")
} | explode_data.jsonl/71251 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 117
} | [
2830,
3393,
31615,
39447,
47,
2962,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
8286,
6031,
7121,
18889,
4699,
7,
16,
15,
353,
882,
32435,
340,
57441,
1904,
7,
16,
15,
340,
21957,
31586,
7,
16,
353,
882,
32435,
340,
57441,
1904,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAlertingRule(t *testing.T) {
suite, err := promql.NewTest(t, `
load 5m
http_requests{job="app-server", instance="0", group="canary", severity="overwrite-me"} 75 85 95 105 105 95 85
http_requests{job="app-server", instance="1", group="canary", severity="overwrite-me"} 80 90 100 110 120 130 140
`)
... | explode_data.jsonl/40286 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1397
} | [
2830,
3393,
9676,
287,
11337,
1155,
353,
8840,
836,
8,
341,
96572,
11,
1848,
1669,
2706,
1470,
7121,
2271,
1155,
11,
22074,
197,
49386,
220,
20,
76,
198,
298,
28080,
37216,
90,
8799,
428,
676,
26300,
497,
2867,
428,
15,
497,
1874,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPluginStartChangingInputKeysAndValues(t *testing.T) {
ctx := context.Background()
fixture := newTestFixture(t)
defer fixture.server.stop()
fixture.server.ch = make(chan []EventV1, 5)
var result interface{} = false
ts, err := time.Parse(time.RFC3339Nano, "2018-01-01T12:00:00.123456Z")
if err != nil {... | explode_data.jsonl/2173 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 565
} | [
2830,
3393,
11546,
3479,
59046,
2505,
8850,
3036,
6227,
1155,
353,
8840,
836,
8,
1476,
20985,
1669,
2266,
19047,
2822,
1166,
12735,
1669,
501,
69356,
1155,
340,
16867,
12507,
12638,
13227,
2822,
1166,
12735,
12638,
5329,
284,
1281,
35190,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestLoadManifestWithDependencies(t *testing.T) {
c := NewTestConfig(t)
c.SetupPorterHome()
c.TestContext.AddTestFile("testdata/porter.yaml", Name)
c.TestContext.AddTestDirectory("testdata/bundles", "bundles")
require.NoError(t, c.LoadManifest())
assert.NotNil(t, c.Manifest)
assert.Equal(t, []string{"helm... | explode_data.jsonl/10944 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
5879,
38495,
2354,
48303,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
2271,
2648,
1155,
340,
1444,
39820,
7084,
261,
7623,
2822,
1444,
8787,
1972,
1904,
2271,
1703,
445,
92425,
71377,
261,
33406,
497,
3988,
340,
1444,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCreateAssetTxSyntacticVerify(t *testing.T) {
ctx := NewContext(t)
_, c := setupCodec()
tx := &CreateAssetTx{
BaseTx: BaseTx{BaseTx: avax.BaseTx{
NetworkID: networkID,
BlockchainID: chainID,
}},
Name: "BRADY",
Symbol: "TOM",
Denomination: 0,
States: []*InitialState{{
Fx... | explode_data.jsonl/73214 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 221
} | [
2830,
3393,
4021,
16604,
31584,
34667,
406,
23170,
32627,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
1532,
1972,
1155,
340,
197,
6878,
272,
1669,
6505,
36913,
2822,
46237,
1669,
609,
4021,
16604,
31584,
515,
197,
66732,
31584,
25,
5351,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestReadMigrationContent(t *testing.T) {
fs := afero.NewMemMapFs()
fsystem := &ImplFilesystem{Fs: fs}
file := MigrationFile{Up: "mig_123_up.sql", Down: "mig_123_down.sql", Timestamp: 123}
config := Config{}
afero.WriteFile(fs, "mig_123_up.sql", []byte("up mig"), 0666)
afero.WriteFile(fs, "mig_123_down.sql"... | explode_data.jsonl/81671 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 310
} | [
2830,
3393,
4418,
20168,
2762,
1155,
353,
8840,
836,
8,
341,
53584,
1669,
264,
802,
78,
7121,
18816,
2227,
48300,
741,
1166,
8948,
1669,
609,
9673,
1703,
8948,
90,
48300,
25,
8619,
630,
17661,
1669,
21248,
1703,
90,
2324,
25,
330,
76,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestExecuteBackup(t *testing.T) {
// Set up local backup directory
backupRoot := "testdata/builtinbackup_test"
*filebackupstorage.FileBackupStorageRoot = backupRoot
require.NoError(t, createBackupDir(backupRoot, "innodb", "log", "datadir"))
defer os.RemoveAll(backupRoot)
ctx := context.Background()
// Set... | explode_data.jsonl/66816 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1233
} | [
2830,
3393,
17174,
56245,
1155,
353,
8840,
836,
8,
341,
197,
322,
2573,
705,
2205,
15725,
6220,
198,
197,
31371,
8439,
1669,
330,
92425,
3470,
25628,
31371,
4452,
698,
197,
9,
1192,
31371,
16172,
8576,
56245,
5793,
8439,
284,
15725,
843... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReader_SliceToInt(t *testing.T) {
type fields struct {
bits []uint8
}
type args struct {
offset uint64
length uint64
}
tests := []struct {
name string
fields fields
args args
want uint64
wantErr bool
}{
{
name: "success from 0",
fields: fields{
bits: []uint8{1, 0, 1,... | explode_data.jsonl/45052 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1332
} | [
2830,
3393,
5062,
1098,
4754,
38544,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
2233,
1199,
3056,
2496,
23,
198,
197,
532,
13158,
2827,
2036,
341,
197,
40668,
2622,
21,
19,
198,
197,
49046,
2622,
21,
19,
198,
197,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestSafeJS(t *testing.T) {
for i, this := range []struct {
str string
tmplStr string
expectWithoutEscape string
expectWithEscape string
}{
{`619c16f`, `<script>var x{{ . }};</script>`, `<script>var x"619c16f";</script>`, `<script>var x619c16f;</script>`},
} {
tmpl, err... | explode_data.jsonl/9251 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 555
} | [
2830,
3393,
25663,
12545,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
419,
1669,
2088,
3056,
1235,
341,
197,
11355,
338,
914,
198,
197,
3244,
54010,
2580,
1797,
914,
198,
197,
24952,
26040,
48124,
914,
198,
197,
24952,
2354,
48124,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestSupported(t *testing.T) {
tests := []struct {
algorithm string
isSupported bool
}{
{algorithm: "gzip", isSupported: true},
{algorithm: "deflate", isSupported: true},
{algorithm: "*", isSupported: true},
{algorithm: "something else", isSupported: false},
}
for _, tc := range tests {
t.Run(f... | explode_data.jsonl/52420 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 207
} | [
2830,
3393,
34636,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
197,
19688,
256,
914,
198,
197,
19907,
34636,
1807,
198,
197,
59403,
197,
197,
90,
19688,
25,
330,
70996,
497,
374,
34636,
25,
830,
1583,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLDSFilter(t *testing.T) {
rh, cc, done := setup(t)
defer done()
// s1 is a tls secret
s1 := &v1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: "secret",
Namespace: "default",
},
Type: "kubernetes.io/tls",
Data: map[string][]byte{
v1.TLSCertKey: []byte("certificate"),
v1.TLSPri... | explode_data.jsonl/22820 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 866
} | [
2830,
3393,
43,
5936,
5632,
1155,
353,
8840,
836,
8,
341,
7000,
71,
11,
12527,
11,
2814,
1669,
6505,
1155,
340,
16867,
2814,
2822,
197,
322,
274,
16,
374,
264,
55026,
6234,
198,
1903,
16,
1669,
609,
85,
16,
74779,
515,
197,
23816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUpdateUserMfa(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
th.App.Srv().SetLicense(model.NewTestLicense("mfa"))
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableMultifactorAuthentication = true })
session, _ := th.App.GetSession(th.Client.AuthToken)
session.IsO... | explode_data.jsonl/47524 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 254
} | [
2830,
3393,
4289,
1474,
44,
3632,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
70479,
5105,
808,
10553,
1005,
1649,
9827,
7635,
7121,
2271,
9827,
445,
76,
3632,
5455,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestImplGlobalResync(t *testing.T) {
r := &CountingReconciler{}
impl := NewImplWithStats(r, TestLogger(t), "Testing", &FakeStatsReporter{})
ctx, cancel := context.WithCancel(context.Background())
doneCh := make(chan struct{})
go func() {
defer close(doneCh)
StartAll(ctx, impl)
}()
t.Cleanup(func() {
... | explode_data.jsonl/45294 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 393
} | [
2830,
3393,
9673,
11646,
1061,
1721,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
609,
2507,
287,
693,
40446,
5769,
16094,
197,
6383,
1669,
1532,
9673,
2354,
16635,
2601,
11,
3393,
7395,
1155,
701,
330,
16451,
497,
609,
52317,
16635,
52766... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCreateKeyPair(t *testing.T) {
conn := clientConn(t)
defer conn.Close()
biID := uuid.New()
payload := CreateKeyPairRequestPayload{}
payload.CommonTemplateAttribute = &TemplateAttribute{}
payload.CommonTemplateAttribute.Append(kmip14.TagCryptographicAlgorithm, kmip14.CryptographicAlgorithmRSA)
payload.C... | explode_data.jsonl/27934 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 675
} | [
2830,
3393,
4021,
1592,
12443,
1155,
353,
8840,
836,
8,
341,
32917,
1669,
2943,
9701,
1155,
340,
16867,
4534,
10421,
2822,
2233,
72,
915,
1669,
16040,
7121,
2822,
76272,
1669,
4230,
1592,
12443,
1900,
29683,
16094,
76272,
16010,
7275,
390... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPlainHTTPServer(t *testing.T) {
defer leaktest.AfterTest(t)()
s, _, _ := serverutils.StartServer(t, base.TestServerArgs{
// The default context uses embedded certs.
Insecure: true,
})
defer s.Stopper().Stop(context.TODO())
// First, make sure that the TestServer's built-in client interface
// still ... | explode_data.jsonl/70828 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 463
} | [
2830,
3393,
26982,
9230,
5475,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
1903,
11,
8358,
716,
1669,
3538,
6031,
12101,
5475,
1155,
11,
2331,
8787,
5475,
4117,
515,
197,
197,
322,
576,
1638,
2266,
571... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNumber(t *testing.T) {
for _, ext := range []string{"", "%", "px+"} {
expectPrinted(t, "a { width: 0."+ext+"; }", "a {\n width: 0."+ext+";\n}\n")
expectPrinted(t, "a { width: 0.1"+ext+"; }", "a {\n width: 0.1"+ext+";\n}\n")
expectPrinted(t, "a { width: +0."+ext+"; }", "a {\n width: +0."+ext+";\n}\n")... | explode_data.jsonl/32615 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 576
} | [
2830,
3393,
2833,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1303,
1669,
2088,
3056,
917,
4913,
497,
5962,
497,
330,
1767,
5172,
92,
341,
197,
24952,
8994,
291,
1155,
11,
330,
64,
314,
2374,
25,
220,
15,
67047,
427,
10,
5123,
335,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCollectionReplica_hasSegment(t *testing.T) {
node := newQueryNodeMock()
collectionID := UniqueID(0)
initTestMeta(t, node, collectionID, 0)
const segmentNum = 3
for i := 0; i < segmentNum; i++ {
err := node.historical.replica.addSegment(UniqueID(i), defaultPartitionID, collectionID, "", segmentTypeGrow... | explode_data.jsonl/11491 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 287
} | [
2830,
3393,
6482,
18327,
15317,
21778,
21086,
1155,
353,
8840,
836,
8,
341,
20831,
1669,
501,
2859,
1955,
11571,
741,
1444,
1908,
915,
1669,
28650,
915,
7,
15,
340,
28248,
2271,
12175,
1155,
11,
2436,
11,
4426,
915,
11,
220,
15,
692,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test900(t *testing.T) {
s, c := makeTestServer()
defer s.Shutdown()
for i := 600; i < 4000; i += 1 {
c.blksize = i
testSendReceive(t, c, 9000+int64(i))
}
} | explode_data.jsonl/17546 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
24,
15,
15,
1155,
353,
8840,
836,
8,
341,
1903,
11,
272,
1669,
1281,
2271,
5475,
741,
16867,
274,
10849,
18452,
741,
2023,
600,
1669,
220,
21,
15,
15,
26,
600,
366,
220,
19,
15,
15,
15,
26,
600,
1421,
220,
16,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMultiWidthCodedIndex_StableIterate(t *testing.T) {
rng := rand.New(rand.NewSource(1414))
records := generateIndexRecords(t, multihash.SHA2_256, rng)
records = append(records, generateIndexRecords(t, multihash.SHA2_512, rng)...)
records = append(records, generateIndexRecords(t, multihash.IDENTITY, rng)...)
... | explode_data.jsonl/71543 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 399
} | [
2830,
3393,
20358,
3327,
34,
6737,
1552,
70645,
480,
8537,
349,
1155,
353,
8840,
836,
8,
341,
7000,
968,
1669,
10382,
7121,
37595,
7121,
3608,
7,
16,
19,
16,
19,
1171,
197,
26203,
1669,
6923,
1552,
25876,
1155,
11,
2745,
6996,
988,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSolveOperators_TransferApiOwnership(t *testing.T) {
Provides1 := APISet{opregistry.APIKey{"g", "v", "k", "ks"}: struct{}{}}
Requires1 := APISet{opregistry.APIKey{"g", "v", "k", "ks"}: struct{}{}}
Provides2 := APISet{opregistry.APIKey{"g2", "v", "k", "ks"}: struct{}{}}
ProvidesBoth := Provides1.Union(Provid... | explode_data.jsonl/43813 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1798
} | [
2830,
3393,
50,
3948,
77760,
34932,
802,
6563,
77166,
1155,
353,
8840,
836,
8,
341,
197,
49022,
16,
1669,
10106,
1637,
295,
90,
453,
29172,
24922,
1592,
4913,
70,
497,
330,
85,
497,
330,
74,
497,
330,
2787,
9207,
25,
2036,
6257,
625... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestGetAccessModes(t *testing.T) {
plugMgr := volume.VolumePluginMgr{}
plugMgr.InitPlugins(ProbeVolumePlugins(volume.VolumeConfig{}), nil /* prober */, volumetest.NewFakeVolumeHost("/tmp/fake", nil, nil))
plug, err := plugMgr.FindPersistentPluginByName("kubernetes.io/host-path")
if err != nil {
t.Errorf("Ca... | explode_data.jsonl/66773 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 193
} | [
2830,
3393,
1949,
6054,
70035,
1155,
353,
8840,
836,
8,
341,
197,
47474,
25567,
1669,
8123,
79106,
11546,
25567,
16094,
197,
47474,
25567,
26849,
45378,
7,
81426,
18902,
45378,
74706,
79106,
2648,
6257,
701,
2092,
1391,
462,
652,
36572,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestValidateHasLabel(t *testing.T) {
successCase := metav1.ObjectMeta{
Name: "123",
Namespace: "ns",
Labels: map[string]string{
"other": "blah",
"foo": "bar",
},
}
if errs := ValidateHasLabel(successCase, field.NewPath("field"), "foo", "bar"); len(errs) != 0 {
t.Errorf("expected success: ... | explode_data.jsonl/1061 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 388
} | [
2830,
3393,
17926,
10281,
2476,
1155,
353,
8840,
836,
8,
341,
30553,
4207,
1669,
77520,
16,
80222,
515,
197,
21297,
25,
414,
330,
16,
17,
18,
756,
197,
90823,
25,
330,
4412,
756,
197,
197,
23674,
25,
2415,
14032,
30953,
515,
298,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestCoercibility(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
type testCase struct {
expr string
result int
}
testFunc := func(cases []testCase, suffix string) {
for _, tc := range cases {
tk.MustQuery(fmt.Sprintf("select coercibilit... | explode_data.jsonl/65514 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 587
} | [
2830,
3393,
7339,
2962,
3147,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
692,
13158,
54452,
2036,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestWrapOnewayHandlerValid(t *testing.T) {
tests := []struct {
Name string
Func interface{}
}{
{
"foo",
func(context.Context, *struct{}) error {
return nil
},
},
{
"bar",
func(context.Context, map[string]interface{}) error {
return nil
},
},
{
"baz",
func(context.Con... | explode_data.jsonl/6 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 255
} | [
2830,
3393,
26787,
46,
931,
352,
3050,
4088,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
21297,
914,
198,
197,
197,
9626,
3749,
16094,
197,
59403,
197,
197,
515,
298,
197,
1,
7975,
756,
298,
29244,
5378,
9328,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLookupResolverIPNoAddressReturned(t *testing.T) {
rlc := resolverLookupClient{}
addr, err := rlc.do(context.Background(), brokenHostLookupper{})
if !errors.Is(err, ErrNoIPAddressReturned) {
t.Fatalf("not the error we expected: %+v", err)
}
if len(addr) != 0 {
t.Fatal("expected an empty address")
}
} | explode_data.jsonl/79474 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 121
} | [
2830,
3393,
34247,
18190,
3298,
2753,
4286,
84804,
1155,
353,
8840,
836,
8,
341,
197,
2381,
66,
1669,
36220,
34247,
2959,
16094,
53183,
11,
1848,
1669,
435,
17257,
16521,
5378,
19047,
1507,
10865,
9296,
10380,
13574,
37790,
743,
753,
7650... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestReconcilder(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecsWithDefaultAndCustomReporters(t,
"OAM Core Resource Controller Unit test Suite",
[]Reporter{printer.NewlineReporter{}})
} | explode_data.jsonl/68100 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 69
} | [
2830,
3393,
693,
40446,
20776,
1155,
353,
8840,
836,
8,
341,
79096,
19524,
3050,
7832,
604,
692,
85952,
8327,
16056,
3675,
3036,
10268,
10361,
388,
1155,
345,
197,
197,
1,
46,
1402,
9518,
11765,
9771,
7954,
1273,
20977,
756,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestQuotedProperty(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry.js": `
import * as ns from 'ext'
console.log(ns.mustBeUnquoted, ns['mustBeQuoted'])
`,
},
entryPaths: []string{"/entry.js"},
options: config.Options{
Mode: config.ModeBundl... | explode_data.jsonl/38609 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 227
} | [
2830,
3393,
2183,
9253,
3052,
1155,
353,
8840,
836,
8,
341,
11940,
57239,
25952,
33,
1241,
832,
1155,
11,
51450,
515,
197,
74075,
25,
2415,
14032,
30953,
515,
298,
197,
3115,
4085,
2857,
788,
22074,
571,
21918,
353,
438,
12268,
504,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCoding(t *testing.T) {
text := "7d444840-9dc0-11d1-b245-5ffdce74fad2"
urn := "urn:uuid:7d444840-9dc0-11d1-b245-5ffdce74fad2"
data := UUID{
0x7d, 0x44, 0x48, 0x40,
0x9d, 0xc0,
0x11, 0xd1,
0xb2, 0x45,
0x5f, 0xfd, 0xce, 0x74, 0xfa, 0xd2,
}
if v := data.String(); v != text {
t.Errorf("%x: encoded ... | explode_data.jsonl/31940 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 314
} | [
2830,
3393,
77513,
1155,
353,
8840,
836,
8,
341,
15425,
1669,
330,
22,
67,
19,
19,
19,
23,
19,
15,
12,
24,
7628,
15,
12,
16,
16,
67,
16,
1455,
17,
19,
20,
12,
20,
72554,
346,
22,
19,
83059,
17,
698,
197,
399,
1669,
330,
399,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestWithdraw(t *testing.T) {
h.SetDefaults()
TestSetup(t)
var withdrawCryptoRequest = exchange.WithdrawRequest{
Amount: 100,
Currency: currency.BTC,
Address: "1F5zVDgNjorJ51oGebSvNCrSAHpwGkUdDB",
Description: "WITHDRAW IT ALL",
}
if areTestAPIKeysSet() && !canManipulateRealOrders {
t.Sk... | explode_data.jsonl/24352 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 261
} | [
2830,
3393,
92261,
1155,
353,
8840,
836,
8,
341,
9598,
4202,
16273,
741,
73866,
21821,
1155,
340,
2405,
14798,
58288,
1900,
284,
9289,
26124,
7633,
1900,
515,
197,
197,
10093,
25,
414,
220,
16,
15,
15,
345,
197,
6258,
5088,
25,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestSaveImageOK(t *testing.T) {
testServer(func(s *core.Server) {
//test create
filePath := ""
fileName = "gophers.png"
file, err := os.Open(filePath + fileName)
if err != nil {
t.Fatalf("unable to open image: %v", err)
}
defer file.Close()
fileReader := bufio.NewReader(file)
metadata := ma... | explode_data.jsonl/42221 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 587
} | [
2830,
3393,
8784,
1906,
3925,
1155,
353,
8840,
836,
8,
341,
18185,
5475,
18552,
1141,
353,
2153,
22997,
8,
341,
197,
197,
322,
1944,
1855,
198,
197,
17661,
1820,
1669,
8389,
197,
17661,
675,
284,
330,
70,
5127,
388,
3508,
698,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestBitMatrixParser_ReadVersion(t *testing.T) {
img, _ := gozxing.ParseStringToBitMatrix(qrstr, "##", " ")
p, _ := NewBitMatrixParser(img)
ver, e := p.ReadVersion()
if e != nil {
t.Fatalf("ReadVersion returns error, %v", e)
}
if r := ver.GetVersionNumber(); r != 1 {
t.Fatalf("VersionNumber = %v, expect... | explode_data.jsonl/32240 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 652
} | [
2830,
3393,
8344,
6689,
6570,
38381,
5637,
1155,
353,
8840,
836,
8,
1476,
39162,
11,
716,
1669,
728,
66700,
287,
8937,
703,
1249,
8344,
6689,
10583,
81,
495,
11,
330,
565,
497,
330,
220,
14167,
3223,
11,
716,
1669,
1532,
8344,
6689,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestWriteWithNilBytes(t *testing.T) {
writer := NewStdWriter(ioutil.Discard, Stdout)
n, err := writer.Write(nil)
if err != nil {
t.Fatalf("Shouldn't have fail when given no data")
}
if n > 0 {
t.Fatalf("Write should have written 0 byte, but has written %d", n)
}
} | explode_data.jsonl/52154 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
7985,
2354,
19064,
7078,
1155,
353,
8840,
836,
8,
341,
38959,
1669,
1532,
22748,
6492,
1956,
30158,
909,
47560,
11,
42517,
411,
340,
9038,
11,
1848,
1669,
6916,
4073,
27907,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestVersion(t *testing.T) {
t.Parallel()
r := NewKnRunResultCollector(t)
defer r.DumpIfFailed()
out := kn{}.Run("version")
r.AssertNoError(out)
assert.Check(t, util.ContainsAll(out.Stdout, "Version"))
} | explode_data.jsonl/41700 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
3393,
5637,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
7000,
1669,
1532,
36253,
6727,
2077,
53694,
1155,
340,
16867,
435,
909,
1510,
2679,
9408,
2822,
13967,
1669,
1148,
46391,
6727,
445,
4366,
1138,
7000,
11711,
2753,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestBadSeekInfoPayload(t *testing.T) {
m := newMockD()
defer close(m.recvChan)
ds := initializeDeliverHandler()
go ds.Handle(m)
m.recvChan <- &cb.Envelope{
Payload: utils.MarshalOrPanic(&cb.Payload{
Header: &cb.Header{
ChannelHeader: utils.MarshalOrPanic(&cb.ChannelHeader{
ChannelId: systemCha... | explode_data.jsonl/36276 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 282
} | [
2830,
3393,
17082,
39350,
1731,
29683,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
501,
11571,
35,
741,
16867,
3265,
1255,
40433,
46019,
692,
83336,
1669,
9468,
16532,
1524,
3050,
741,
30680,
11472,
31421,
1255,
692,
2109,
40433,
46019,
911... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestMosaicSupplyChangeTransactionSerialization(t *testing.T) {
id := bigIntToMosaicId(big.NewInt(6300565133566699912))
tx, err := NewMosaicSupplyChangeTransaction(fakeDeadline, id, Increase, big.NewInt(10), MijinTest)
assert.Nilf(t, err, "NewMosaicSupplyChangeTransaction returned error: %s", err)
b, err := t... | explode_data.jsonl/69191 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 176
} | [
2830,
3393,
44,
44783,
51296,
4072,
8070,
35865,
1155,
353,
8840,
836,
8,
341,
15710,
1669,
2409,
1072,
1249,
44,
44783,
764,
75616,
7121,
1072,
7,
21,
18,
15,
15,
20,
21,
20,
16,
18,
18,
20,
21,
21,
21,
24,
24,
24,
16,
17,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestKafkaClient_partitionConsumer(t *testing.T) {
module := fixtureModule()
module.Configure("test", "consumer.test")
// Channels for testing
messageChan := make(chan *sarama.ConsumerMessage)
errorChan := make(chan *sarama.ConsumerError)
consumer := &helpers.MockSaramaPartitionConsumer{}
consumer.On("Asyn... | explode_data.jsonl/34252 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 305
} | [
2830,
3393,
42,
21883,
2959,
43840,
29968,
1155,
353,
8840,
836,
8,
341,
54020,
1669,
12507,
3332,
741,
54020,
78281,
445,
1944,
497,
330,
46764,
5958,
5130,
197,
322,
62900,
369,
7497,
198,
24753,
46019,
1669,
1281,
35190,
353,
82,
637... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestResolveScrapeTarget(t *testing.T) {
pa := kpa(testNamespace, testRevision, WithPAMetricsService("echo"))
tc := &testConfigStore{config: defaultConfig()}
if got, want := resolveScrapeTarget(tc.ToContext(context.Background()), pa), "echo"; got != want {
t.Errorf("reconcileMetricSN()= %s, want %s", got, wan... | explode_data.jsonl/35447 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 300
} | [
2830,
3393,
56808,
3326,
19842,
6397,
1155,
353,
8840,
836,
8,
341,
3223,
64,
1669,
595,
6595,
8623,
22699,
11,
1273,
33602,
11,
3085,
47,
1402,
13468,
1860,
445,
3047,
5455,
78255,
1669,
609,
1944,
2648,
6093,
90,
1676,
25,
1638,
264... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestPostHandlerfunc4(t *testing.T) {
req := httptest.NewRequest("POST", "/handlerFunc4", nil)
resp := httptest.NewRecorder()
sample.Index(resp, req)
data, err := ioutil.ReadAll(resp.Body)
if err != nil {
t.Errorf("Failed to read response body %v\n", err)
}
fmt.Print... | explode_data.jsonl/51970 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 147
} | [
2830,
3393,
4133,
3050,
2830,
19,
1155,
353,
8840,
836,
8,
341,
262,
4232,
1669,
54320,
70334,
75274,
445,
2946,
497,
3521,
17905,
9626,
19,
497,
2092,
340,
262,
9039,
1669,
54320,
70334,
7121,
47023,
2822,
1066,
262,
6077,
18338,
20267... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGetEventResults(t *testing.T) {
for _, test := range eventResultTestCases {
t.Run(test.name, func(t *testing.T) {
runEventResultTestCase(t, test)
})
}
} | explode_data.jsonl/58007 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 70
} | [
2830,
3393,
1949,
1556,
9801,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
1538,
2077,
2271,
37302,
341,
197,
3244,
16708,
8623,
2644,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
56742,
1556,
2077,
16458,
1155,
11,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestVarBytesWire(t *testing.T) {
pver := ProtocolVersion
// bytes256 is a byte array that takes a 2-byte varint to encode.
bytes256 := bytes.Repeat([]byte{0x01}, 256)
tests := []struct {
in []byte // Byte Array to write
buf []byte // Wire encoding
pver uint32 // Protocol version for wire encoding
}... | explode_data.jsonl/15303 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 573
} | [
2830,
3393,
3962,
7078,
37845,
1155,
353,
8840,
836,
8,
341,
3223,
423,
1669,
24572,
5637,
271,
197,
322,
5820,
17,
20,
21,
374,
264,
4922,
1334,
429,
4990,
264,
220,
17,
53952,
762,
396,
311,
16164,
624,
70326,
17,
20,
21,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestSimultaneousQueries(t *testing.T) {
db := newTestDB(t, "people")
defer closeDB(t, db)
tx, err := db.Begin()
if err != nil {
t.Fatal(err)
}
defer tx.Rollback()
r1, err := tx.Query("SELECT|people|name|")
if err != nil {
t.Fatal(err)
}
defer r1.Close()
r2, err := tx.Query("SELECT|people|name|")
... | explode_data.jsonl/16001 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 174
} | [
2830,
3393,
14027,
494,
17666,
55261,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
501,
2271,
3506,
1155,
11,
330,
16069,
1138,
16867,
3265,
3506,
1155,
11,
2927,
692,
46237,
11,
1848,
1669,
2927,
28467,
741,
743,
1848,
961,
2092,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func Test_extractSQLIDPrefix(t *testing.T) {
tests := []struct {
name string
rawSQL string
wantPrefix string
wantLastPos int
}{
{
name: "001",
rawSQL: "/*$ID$7Q26wU5GR0*/UPDATE `customer_entity_int` SET `attribute_id`=?, `entity_id`=?, `value`=? WHERE (`value_id` = ?)",
wan... | explode_data.jsonl/11096 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 548
} | [
2830,
3393,
39123,
6688,
915,
14335,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
76559,
6688,
414,
914,
198,
197,
50780,
14335,
220,
914,
198,
197,
50780,
5842,
4859,
526,
198,
197,
5940... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestJobCountShouldReturnCorrectValue(t *testing.T) {
startCh := make(chan struct{})
quitCh := make(chan struct{})
workers := 5
// start a worker with max 5 concurrently running jobs
worker := work.NewWorker(workers, func(p work.Payload) interface{} {
startCh <- struct{}{}
<-quitCh
return nil
}, true)
... | explode_data.jsonl/11920 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 277
} | [
2830,
3393,
12245,
2507,
14996,
5598,
33092,
1130,
1155,
353,
8840,
836,
8,
341,
21375,
1143,
1669,
1281,
35190,
2036,
37790,
197,
31537,
1143,
1669,
1281,
35190,
2036,
37790,
197,
54958,
1669,
220,
20,
198,
197,
322,
1191,
264,
11864,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_encode_int16(t *testing.T) {
should := require.New(t)
for _, c := range test.Combinations {
stream := c.CreateStream()
stream.WriteInt16(-1)
iter := c.CreateIterator(stream.Buffer())
should.Equal(int16(-1), iter.ReadInt16())
}
} | explode_data.jsonl/36755 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 98
} | [
2830,
3393,
11224,
4042,
16,
21,
1155,
353,
8840,
836,
8,
341,
197,
5445,
1669,
1373,
7121,
1155,
340,
2023,
8358,
272,
1669,
2088,
1273,
727,
2855,
12634,
341,
197,
44440,
1669,
272,
7251,
3027,
741,
197,
44440,
4073,
1072,
16,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCucumberExpressionTokenizer(t *testing.T) {
directory := "testdata/tokens/"
files, err := ioutil.ReadDir(directory)
require.NoError(t, err)
for _, file := range files {
contents, err := ioutil.ReadFile(directory + file.Name())
require.NoError(t, err)
t.Run(fmt.Sprintf("%s", file.Name()), func(t *te... | explode_data.jsonl/23269 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 290
} | [
2830,
3393,
34,
40912,
9595,
37434,
1155,
353,
8840,
836,
8,
1476,
2698,
4758,
1669,
330,
92425,
5523,
9713,
29555,
74075,
11,
1848,
1669,
43144,
6503,
6184,
38608,
340,
17957,
35699,
1155,
11,
1848,
692,
2023,
8358,
1034,
1669,
2088,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSync(t *testing.T) {
sleep = func(time.Duration) {}
defer func() { sleep = time.Sleep }()
mergeableA := testPR("org", "repo", "A", 5, githubql.MergeableStateMergeable)
unmergeableA := testPR("org", "repo", "A", 6, githubql.MergeableStateConflicting)
unmergeableB := testPR("org", "repo", "B", 7, githubql.... | explode_data.jsonl/42788 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2301
} | [
2830,
3393,
12154,
1155,
353,
8840,
836,
8,
341,
52533,
284,
2915,
9730,
33795,
8,
5613,
16867,
2915,
368,
314,
6084,
284,
882,
31586,
335,
2822,
197,
19052,
480,
32,
1669,
1273,
6480,
445,
1775,
497,
330,
23476,
497,
330,
32,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.