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 TestRejectStaleTermMessage(t *testing.T) {
called := false
fakeStep := func(r *raft, m pb.Message) error {
called = true
return nil
}
r := newTestRaft(1, 10, 1, newTestMemoryStorage(withPeers(1, 2, 3)))
r.step = fakeStep
r.loadState(pb.HardState{Term: 2})
r.Step(pb.Message{Type: pb.MsgApp, Term: r.Term... | explode_data.jsonl/47043 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 168
} | [
2830,
3393,
78413,
623,
1574,
17249,
2052,
1155,
353,
8840,
836,
8,
341,
1444,
4736,
1669,
895,
198,
1166,
726,
8304,
1669,
2915,
2601,
353,
2944,
11,
296,
17310,
8472,
8,
1465,
341,
197,
1444,
4736,
284,
830,
198,
197,
853,
2092,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestComputeLabels(t *testing.T) {
g := Gmail{cache: newTestCache()}
g.cache.SetMsgLabels("id", []string{"a", "b"})
ls := g.computeLabels("id", []string{"c"}, []string{"b"})
sort.Strings(ls)
if len(ls) != 2 || ls[0] != "a" || ls[1] != "c" {
t.Errorf(`computeLabels("id", {"c"}, {"b"}) = %v, expected {"a", "c"... | explode_data.jsonl/902 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 152
} | [
2830,
3393,
46254,
23674,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
60946,
90,
9360,
25,
501,
2271,
8233,
23509,
3174,
20087,
4202,
6611,
23674,
445,
307,
497,
3056,
917,
4913,
64,
497,
330,
65,
23625,
197,
4730,
1669,
342,
35347,
236... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShouldNotParseHashWithNoneBase64CharsInKey(t *testing.T) {
passwordHash, err := ParseHash("$argon2id$v=19$m=65536,t=3,p=2$BpLnfgDsc2WD8F2q$^^vzA4myCqZZ36bUGsDY//8mKUYNZZaR0t4MFFSs+iM")
assert.EqualError(t, err, "Hash key contains invalid base64 characters")
assert.Nil(t, passwordHash)
} | explode_data.jsonl/40178 | {
"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,
14996,
2623,
14463,
6370,
2354,
4064,
3978,
21,
19,
32516,
641,
1592,
1155,
353,
8840,
836,
8,
341,
58199,
6370,
11,
1848,
1669,
14775,
6370,
20912,
70821,
17,
307,
65020,
28,
16,
24,
53516,
28,
21,
20,
20,
18,
21,
13960... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccKeycloakGroupRoles_basicNonExhaustive(t *testing.T) {
t.Parallel()
realmRoleName := acctest.RandomWithPrefix("tf-acc")
openIdClientName := acctest.RandomWithPrefix("tf-acc")
openIdRoleName := acctest.RandomWithPrefix("tf-acc")
samlClientName := acctest.RandomWithPrefix("tf-acc")
samlRoleName := accte... | explode_data.jsonl/47893 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 430
} | [
2830,
3393,
14603,
1592,
88751,
2808,
25116,
34729,
8121,
840,
15074,
533,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
17200,
7673,
9030,
675,
1669,
1613,
67880,
26709,
2354,
14335,
445,
8935,
12,
4475,
1138,
52199,
764,
2959,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestModuleAccountMarshalYAML(t *testing.T) {
name := "test"
moduleAcc := NewEmptyModuleAccount(name, Basic)
moduleAddress := sdk.AccAddress(crypto.AddressHash([]byte(name)))
bs, err := yaml.Marshal(moduleAcc)
require.NoError(t, err)
want := fmt.Sprintf(`|
address: %s
coins: []
pubkey: ""
accountnumb... | explode_data.jsonl/48352 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 179
} | [
2830,
3393,
3332,
7365,
55438,
56,
31102,
1155,
353,
8840,
836,
8,
341,
11609,
1669,
330,
1944,
698,
54020,
14603,
1669,
1532,
3522,
3332,
7365,
3153,
11,
14625,
340,
54020,
4286,
1669,
45402,
77538,
4286,
1337,
9444,
26979,
6370,
10556,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDomainResourcesUnmarshal(t *testing.T) {
actual := &DomainResourceReports{}
err := actual.UnmarshalJSON([]byte(domainResourcesMockJSON))
th.AssertNoErr(t, err)
th.CheckDeepEquals(t, domainMockResources, actual)
} | explode_data.jsonl/268 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 81
} | [
2830,
3393,
13636,
11277,
1806,
27121,
1155,
353,
8840,
836,
8,
341,
88814,
1669,
609,
13636,
4783,
23748,
16094,
9859,
1669,
5042,
38097,
5370,
10556,
3782,
41169,
11277,
11571,
5370,
1171,
70479,
11711,
2753,
7747,
1155,
11,
1848,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShouldVerifyAuthorizationsUsingSessionCookie(t *testing.T) {
testCases := []Pair{
{"https://test.example.com", "", nil, authentication.NotAuthenticated, 401},
{"https://bypass.example.com", "", nil, authentication.NotAuthenticated, 200},
{"https://one-factor.example.com", "", nil, authentication.NotAuth... | explode_data.jsonl/20190 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1045
} | [
2830,
3393,
14996,
32627,
7133,
8040,
16429,
5283,
20616,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
12443,
515,
197,
197,
4913,
2428,
1110,
1944,
7724,
905,
497,
7342,
2092,
11,
16653,
15000,
26712,
11,
220,
19,
15,
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... | 3 |
func TestMsgFilter_HasPrefix(t *testing.T) {
messageCreate := func(content string) interface{} {
return &disgord.MessageCreate{
Message: &disgord.Message{Content: content},
}
}
messageUpdate := func(content string) interface{} {
return &disgord.MessageUpdate{
Message: &disgord.Message{Content: content},... | explode_data.jsonl/1334 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 438
} | [
2830,
3393,
6611,
5632,
2039,
300,
14335,
1155,
353,
8840,
836,
8,
341,
24753,
4021,
1669,
2915,
15063,
914,
8,
3749,
6257,
341,
197,
853,
609,
4243,
70,
539,
8472,
4021,
515,
298,
46733,
25,
609,
4243,
70,
539,
8472,
90,
2762,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_minWindowFunc1(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := minWindowFunc1(tt.args.s, tt.args.t); got != tt.want {
t.Errorf("minWindowFunc1() = %v, want %v", got, tt.want)
}
})
}
} | explode_data.jsonl/22596 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 125
} | [
2830,
3393,
7260,
4267,
9626,
16,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
7032,
341,
197,
3244,
16708,
47152,
2644,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
743,
2684,
1669,
1308,
4267,
9626,
16,
47152,
16365,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientCluster(t *testing.T) {
db := tests.Tempfile()
defer os.Remove(db)
// Create the app
app := glusterfs.NewTestApp(db)
defer app.Close()
// Setup the server
ts := setupHeketiServer(app)
defer ts.Close()
// Create cluster with unknown user
c := NewClient(ts.URL, "asdf", "")
tests.Assert(t, c !... | explode_data.jsonl/18012 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 843
} | [
2830,
3393,
2959,
28678,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
7032,
65009,
1192,
741,
16867,
2643,
13270,
9791,
692,
197,
322,
4230,
279,
906,
198,
28236,
1669,
2770,
4993,
3848,
7121,
2271,
2164,
9791,
340,
16867,
906,
10421,
282... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHyphenInMultiPositional(t *testing.T) {
var args struct {
Foo []string `arg:"positional"`
}
err := parse("--- x - y", &args)
require.NoError(t, err)
assert.Equal(t, []string{"---", "x", "-", "y"}, args.Foo)
} | explode_data.jsonl/13070 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 93
} | [
2830,
3393,
30816,
14769,
641,
20358,
3812,
278,
1155,
353,
8840,
836,
8,
341,
2405,
2827,
2036,
341,
197,
12727,
2624,
3056,
917,
1565,
858,
2974,
966,
3005,
8805,
197,
532,
9859,
1669,
4715,
74083,
856,
481,
379,
497,
609,
2116,
340... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLexicographicallySmallest(t *testing.T) {
t.Parallel()
for _, tc := range testcases {
if result := LexicographicallySmallest(tc.str, tc.k); result != tc.expected {
t.Errorf("Expected %v, got %v", tc.expected, result)
}
}
} | explode_data.jsonl/22710 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
47778,
292,
63931,
10673,
19236,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2023,
8358,
17130,
1669,
2088,
1273,
23910,
341,
197,
743,
1102,
1669,
26819,
292,
63931,
10673,
19236,
44415,
9528,
11,
17130,
5202,
1215,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMysqlMultipleInits(t *testing.T) {
m := &Mysql{
IntervalSlow: "30s",
}
m2 := &Mysql{}
m.InitMysql()
assert.True(t, m.initDone)
assert.False(t, m2.initDone)
assert.Equal(t, m.scanIntervalSlow, uint32(30))
assert.Equal(t, m2.scanIntervalSlow, uint32(0))
m2.InitMysql()
assert.True(t, m.initDone)
as... | explode_data.jsonl/71238 | {
"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,
44,
14869,
32089,
641,
1199,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
609,
44,
14869,
515,
197,
197,
10256,
58289,
25,
330,
18,
15,
82,
756,
197,
532,
2109,
17,
1669,
609,
44,
14869,
31483,
2109,
26849,
44,
14869,
741,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSeekFirst1(t *testing.T) {
b := TreeNew(cmp)
b.Set(1, 10)
en, err := b.SeekFirst()
if err != nil {
t.Fatal(err)
}
k, v, err := en.Next()
if k != 1 || v != 10 || err != nil {
t.Fatal(k, v, err)
}
k, v, err = en.Next()
if err == nil {
t.Fatal(k, v, err)
}
} | explode_data.jsonl/80509 | {
"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,
39350,
5338,
16,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
8942,
3564,
98665,
340,
2233,
4202,
7,
16,
11,
220,
16,
15,
340,
81848,
11,
1848,
1669,
293,
76465,
5338,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue1264(t *testing.T) {
// It should be possible to set a breakpoint condition that consists only
// of evaluating a single boolean variable.
withTestProcess("issue1264", t, func(p *proc.Target, fixture protest.Fixture) {
bp := setFileBreakpoint(p, t, fixture.Source, 8)
bp.UserBreaklet().Cond = &ast.I... | explode_data.jsonl/56320 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
42006,
16,
17,
21,
19,
1155,
353,
8840,
836,
8,
341,
197,
322,
1084,
1265,
387,
3204,
311,
738,
264,
52745,
2971,
429,
17167,
1172,
198,
197,
322,
315,
37563,
264,
3175,
2710,
3890,
624,
46948,
2271,
7423,
445,
11159,
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 TestDeleteAllowed(t *testing.T) {
_, ac := newNonRunningTestResourceAdmissionController(t)
req := &admissionv1beta1.AdmissionRequest{
Operation: admissionv1beta1.Delete,
}
if resp := ac.Admit(TestContextWithLogger(t), req); !resp.Allowed {
t.Fatal("Unexpected denial of delete")
}
} | explode_data.jsonl/18329 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 107
} | [
2830,
3393,
6435,
35382,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1613,
1669,
501,
8121,
18990,
2271,
4783,
2589,
2728,
2051,
1155,
692,
24395,
1669,
609,
329,
2728,
85,
16,
19127,
16,
17865,
2728,
1900,
515,
197,
197,
8432,
25,
25293... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAuthInterceptor_UnaryInterceptor(t *testing.T) {
privateKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
require.NoError(t, err)
u := memory.NewUserDatabase(database.SystemUser)
token := memory.NewTokenDatabase()
conf := &configv2.Config{
AccessProxy: &configv2.AccessProxy{
ServerNameHost... | explode_data.jsonl/8066 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1863
} | [
2830,
3393,
5087,
32786,
40687,
658,
32786,
1155,
353,
8840,
836,
8,
341,
2455,
1592,
11,
1848,
1669,
384,
4385,
9081,
57582,
1592,
7,
613,
11442,
292,
1069,
17,
20,
21,
1507,
10382,
47431,
340,
17957,
35699,
1155,
11,
1848,
692,
1067... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDocumentExpiration(t *testing.T) {
parent := "relationships.xml"
template := "relatives-and-associates.xml"
xpath := "RelativesAndAssociates/Relatives/Relative[1]/Citizenship/ProofOfStatus/DocumentExpiration"
// Document has expiration
form := newForm(t,
"relative-greencard.json",
)
form = extractPar... | explode_data.jsonl/23954 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 234
} | [
2830,
3393,
7524,
66301,
1155,
353,
8840,
836,
8,
341,
24804,
1669,
330,
85824,
9028,
698,
22832,
1669,
330,
3748,
5859,
9777,
12,
24313,
973,
9028,
698,
10225,
2343,
1669,
330,
6740,
5859,
3036,
29815,
973,
14,
6740,
5859,
14,
28442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCrossShardSubqueryGetFields(t *testing.T) {
executor, sbc1, _, sbclookup := createLegacyExecutorEnv()
sbclookup.SetResults([]*sqltypes.Result{{
Fields: []*querypb.Field{
{Name: "col", Type: sqltypes.Int32},
},
}})
result1 := []*sqltypes.Result{{
Fields: []*querypb.Field{
{Name: "id", Type: sqlt... | explode_data.jsonl/67433 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 577
} | [
2830,
3393,
28501,
2016,
567,
3136,
1631,
1949,
8941,
1155,
353,
8840,
836,
8,
341,
67328,
4831,
11,
7898,
66,
16,
11,
8358,
7898,
66,
21020,
1669,
1855,
77415,
25255,
14359,
741,
1903,
8904,
21020,
4202,
9801,
85288,
3544,
9242,
18456,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProjectUpdate(t *testing.T) {
ctx := context.Background()
updateCalled := false
prov := sentryProvider{
sentryClient: &sentryClientMock{
updateProject: func(org sentry.Organization, proj sentry.Project) error {
assert.Equal(t, *org.Slug, "org-slug")
assert.Equal(t, *proj.DefaultEnvironment, "ne... | explode_data.jsonl/27976 | {
"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,
7849,
4289,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
27175,
20960,
1669,
895,
198,
197,
42947,
1669,
3208,
884,
5179,
515,
197,
1903,
4085,
2959,
25,
609,
82,
4085,
2959,
11571,
515,
298,
27175,
7849,
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... | 1 |
func TestDeleteNode(t *testing.T) {
locationCache := LocationCache{}
nodeName := nodes[0]
locationCache.EdgeNodes.Store(nodeName, commonconst.MessageSuccessfulContent)
tests := []struct {
name string
lc *LocationCache
nodeName string
want bool
}{
{
name: "TestDeleteNode() Case: Dele... | explode_data.jsonl/53308 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 373
} | [
2830,
3393,
6435,
1955,
1155,
353,
8840,
836,
8,
341,
53761,
8233,
1669,
9866,
8233,
16094,
20831,
675,
1669,
7798,
58,
15,
921,
53761,
8233,
13,
11656,
12288,
38047,
6958,
675,
11,
4185,
1024,
8472,
36374,
2762,
692,
78216,
1669,
3056,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoaderString(t *testing.T) {
var l Loader
want := "funscript loader (speeds:0-0) (positions:0-0)"
got := l.String()
if got != want {
t.Errorf("strings do not match, want %q, got %q", want, got)
}
l.LimitSpeed(20, 80)
l.LimitPosition(5, 95)
want = "funscript loader (speeds:20-80) (positions:5-95)"
go... | explode_data.jsonl/51102 | {
"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,
9181,
703,
1155,
353,
8840,
836,
8,
341,
2405,
326,
27811,
198,
50780,
1669,
330,
11894,
2282,
16047,
320,
20374,
82,
25,
15,
12,
15,
8,
320,
27436,
25,
15,
12,
15,
12954,
3174,
354,
1669,
326,
6431,
741,
743,
2684,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateProjectCmdWithGitMissingParam(t *testing.T) {
credentialmanager.MockAuthCreds = true
shipyardFilePath := "./shipyard.yaml"
defer testShipyard(t, shipyardFilePath, "")()
cmd := fmt.Sprintf("create project sockshop --shipyard=%s --git-user=%s --git-token=%s --mock",
shipyardFilePath, "user", "token... | explode_data.jsonl/10567 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 170
} | [
2830,
3393,
4021,
7849,
15613,
2354,
46562,
25080,
2001,
1155,
353,
8840,
836,
8,
341,
197,
66799,
13297,
24664,
5087,
34,
53369,
284,
830,
271,
197,
5270,
17428,
19090,
1669,
5924,
5270,
17428,
33406,
698,
16867,
1273,
29624,
17428,
1155... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWatchDeleteRange(t *testing.T) {
b, tmpPath := backend.NewDefaultTmpBackend()
s := newWatchableStore(zap.NewExample(), b, &lease.FakeLessor{}, nil, StoreConfig{})
defer func() {
s.store.Close()
os.Remove(tmpPath)
}()
testKeyPrefix := []byte("foo")
for i := 0; i < 3; i++ {
s.Put([]byte(fmt.Sprint... | explode_data.jsonl/39811 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 467
} | [
2830,
3393,
14247,
6435,
6046,
1155,
353,
8840,
836,
8,
341,
2233,
11,
4174,
1820,
1669,
19163,
7121,
3675,
35986,
29699,
741,
1903,
1669,
501,
14247,
480,
6093,
13174,
391,
7121,
13314,
1507,
293,
11,
609,
1623,
991,
726,
43,
8309,
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... | 1 |
func TestArrayOrString_MarshalJSON_Empty(t *testing.T) {
assert := assert.New(t)
var a ArrayOrString
data, err := a.MarshalJSON()
assert.Nil(err)
assert.Equal(`[]`, string(data))
} | explode_data.jsonl/63944 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 73
} | [
2830,
3393,
1857,
2195,
703,
1245,
28423,
5370,
76060,
1595,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
2405,
264,
2910,
2195,
703,
198,
8924,
11,
1848,
1669,
264,
37271,
5370,
741,
6948,
59678,
3964,
340,
6948,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCleanupHTTP(t *testing.T) {
mux := http.NewServeMux()
mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
fmt.Fprintf(w, "Hello world!")
})
server := &http.Server{
Addr: ":10001",
Handler: mux,
}
c := &CleanupHTTP{
Server: server,
}
c.PreCleanupPush(cleanup1, 2)
c.PreCle... | explode_data.jsonl/15568 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 199
} | [
2830,
3393,
67335,
9230,
1155,
353,
8840,
836,
8,
341,
2109,
2200,
1669,
1758,
7121,
60421,
44,
2200,
741,
2109,
2200,
63623,
35460,
2915,
3622,
1758,
37508,
11,
4232,
353,
1254,
9659,
8,
341,
197,
11009,
59559,
3622,
11,
330,
9707,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateJob_ExtraInputParameterError(t *testing.T) {
store, manager, p := initWithPipeline(t)
defer store.Close()
job := &api.Job{
Name: "pp 1",
Enabled: true,
PipelineSpec: &api.PipelineSpec{
PipelineId: p.UUID,
Parameters: []*api.Parameter{
{Name: "param2", Value: "world"},
},
},
}
... | explode_data.jsonl/28379 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 205
} | [
2830,
3393,
4021,
12245,
62,
11612,
2505,
4971,
1454,
1155,
353,
8840,
836,
8,
341,
57279,
11,
6645,
11,
281,
1669,
13864,
34656,
1155,
340,
16867,
3553,
10421,
741,
68577,
1669,
609,
2068,
45293,
515,
197,
21297,
25,
262,
330,
602,
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... | 1 |
func TestChangeTrustDeleteTrustline(t *testing.T) {
kp0 := newKeypair0()
kp1 := newKeypair1()
sourceAccount := NewSimpleAccount(kp0.Address(), int64(40385577484354))
issuedAsset := CreditAsset{"ABCD", kp1.Address()}
removeTrust := RemoveTrustlineOp(issuedAsset)
received, err := newSignedTransaction(
Transacti... | explode_data.jsonl/20675 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 456
} | [
2830,
3393,
4072,
45548,
6435,
45548,
1056,
1155,
353,
8840,
836,
8,
341,
16463,
79,
15,
1669,
501,
6608,
1082,
1310,
15,
741,
16463,
79,
16,
1669,
501,
6608,
1082,
1310,
16,
741,
47418,
7365,
1669,
1532,
16374,
7365,
5969,
79,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGlobMatchModel(t *testing.T) {
e, _ := NewEnforcer("examples/glob_model.conf", "examples/glob_policy.csv")
testEnforce(t, e, "u1", "/foo/", "read", true)
testEnforce(t, e, "u1", "/foo", "read", false)
testEnforce(t, e, "u1", "/foo/subprefix", "read", true)
testEnforce(t, e, "u1", "foo", "read", false)
t... | explode_data.jsonl/57136 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 331
} | [
2830,
3393,
38,
1684,
8331,
1712,
1155,
353,
8840,
836,
8,
341,
7727,
11,
716,
1669,
1532,
1702,
82010,
445,
51668,
4846,
1684,
5047,
13937,
497,
330,
51668,
4846,
1684,
22773,
11219,
1138,
18185,
1702,
8833,
1155,
11,
384,
11,
330,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShortName(t *testing.T) {
var testCases = map[string]struct {
name misc.ModuleShortName
modFile *modfile.File
}{
"one": {
name: misc.ModuleShortName("garage"),
modFile: &modfile.File{
Module: &modfile.Module{
Mod: module.Version{
Path: "gh.com/micheal/garage",
Version: ... | explode_data.jsonl/39686 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 415
} | [
2830,
3393,
12472,
675,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
37302,
284,
2415,
14032,
60,
1235,
341,
197,
11609,
262,
31125,
26958,
12472,
675,
198,
197,
42228,
1703,
353,
2593,
1192,
8576,
198,
197,
59403,
197,
197,
1,
603,
788,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJQMutation(t *testing.T) {
conf := NewConfig()
conf.JQ.Query = `{foo: .foo} | .foo.bar = "baz"`
jSet, err := NewJQ(conf, nil, log.Noop(), metrics.Noop())
require.NoError(t, err)
ogObj := gabs.New()
ogObj.Set("is this", "foo", "original", "content")
ogObj.Set("remove this", "bar")
ogExp := ogObj.Strin... | explode_data.jsonl/53851 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 276
} | [
2830,
3393,
41,
48,
53998,
1155,
353,
8840,
836,
8,
341,
67850,
1669,
1532,
2648,
741,
67850,
3503,
48,
15685,
284,
53692,
7975,
25,
659,
7975,
92,
760,
659,
7975,
22001,
284,
330,
42573,
48962,
12428,
1649,
11,
1848,
1669,
1532,
41,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientDoTimeoutErrorConcurrent(t *testing.T) {
t.Parallel()
c := &Client{
Dial: func(addr string) (net.Conn, error) {
return &readTimeoutConn{t: time.Second}, nil
},
MaxConnsPerHost: 1000,
}
var wg sync.WaitGroup
for i := 0; i < 10; i++ {
wg.Add(1)
go func() {
defer wg.Done()
testClie... | explode_data.jsonl/79368 | {
"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,
2959,
5404,
7636,
1454,
1109,
3231,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
1669,
609,
2959,
515,
197,
10957,
530,
25,
2915,
24497,
914,
8,
320,
4711,
50422,
11,
1465,
8,
341,
298,
853,
609,
878,
763... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStacktrace(t *testing.T) {
stacks := [][]loc{
{{4, "main.stacktraceme"}, {8, "main.func1"}, {16, "main.main"}},
{{4, "main.stacktraceme"}, {8, "main.func1"}, {12, "main.func2"}, {17, "main.main"}},
}
protest.AllowRecording(t)
withTestProcess("stacktraceprog", t, func(p *proc.Target, fixture protest.Fix... | explode_data.jsonl/56216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 457
} | [
2830,
3393,
4336,
15067,
1155,
353,
8840,
836,
8,
341,
48227,
82,
1669,
52931,
1074,
515,
197,
197,
2979,
19,
11,
330,
3817,
22420,
376,
580,
3894,
14345,
314,
23,
11,
330,
3817,
19449,
16,
14345,
314,
16,
21,
11,
330,
3817,
8880,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandleGitHubLink(t *testing.T) {
ghoptions := flagutil.GitHubOptions{Host: "github.mycompany.com"}
org, repo := "org", "repo"
handler := HandleGitHubLink(ghoptions.Host, true)
req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("/github-link?dest=%s/%s", org, repo), nil)
if err != nil {
t.Fatalf("Er... | explode_data.jsonl/66273 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 281
} | [
2830,
3393,
6999,
75615,
3939,
1155,
353,
8840,
836,
8,
341,
197,
866,
2875,
1669,
5181,
1314,
1224,
275,
19316,
3798,
90,
9296,
25,
330,
5204,
12618,
10139,
905,
16707,
87625,
11,
15867,
1669,
330,
1775,
497,
330,
23476,
698,
53326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestElideSecrets(t *testing.T) {
c, err := LoadFile("testdata/conf.good.yml")
require.NoError(t, err)
secretRe := regexp.MustCompile(`\\u003csecret\\u003e|<secret>`)
config, err := yaml.Marshal(c)
require.NoError(t, err)
yamlConfig := string(config)
matches := secretRe.FindAllStringIndex(yamlConfig, -1)
... | explode_data.jsonl/81274 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 183
} | [
2830,
3393,
6582,
577,
19773,
82,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
8893,
1703,
445,
92425,
59241,
59569,
33936,
1138,
17957,
35699,
1155,
11,
1848,
692,
197,
20474,
693,
1669,
41877,
98626,
5809,
3422,
84,
15,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequestString(t *testing.T) {
testCases := []struct {
request bRequest
description string
}{
{initiateAbortBulkOut, "Aborts a Bulk-OUT transfer."},
{readStatusByte, "Returns the IEEE 488 Status Byte."},
}
for _, testCase := range testCases {
if testCase.request.String() != testCase.descriptio... | explode_data.jsonl/35301 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 190
} | [
2830,
3393,
1900,
703,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
23555,
257,
293,
1900,
198,
197,
42407,
914,
198,
197,
59403,
197,
197,
90,
2327,
6493,
85891,
88194,
2662,
11,
330,
5830,
18955,
264,
6092... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPullCreateComment(t *testing.T) {
defer gock.Off()
gock.New("https://gitlab.com").
Post("/api/v4/projects/diaspora/diaspora/merge_requests/1/notes").
MatchParam("body", "lgtm").
Reply(201).
Type("application/json").
SetHeaders(mockHeaders).
File("testdata/merge_note.json")
input := &scm.Commen... | explode_data.jsonl/78659 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 331
} | [
2830,
3393,
36068,
4021,
10677,
1155,
353,
8840,
836,
8,
341,
16867,
728,
377,
13,
4596,
2822,
3174,
1176,
7121,
445,
2428,
1110,
12882,
14380,
905,
38609,
197,
197,
4133,
4283,
2068,
5457,
19,
39606,
3446,
3473,
70664,
3446,
3473,
7066... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrimitivePutFloat(t *testing.T) {
client := newPrimitiveClient()
a, b := float32(1.05), float32(-0.003)
result, err := client.PutFloat(context.Background(), FloatWrapper{Field1: &a, Field2: &b}, nil)
if err != nil {
t.Fatalf("PutFloat: %v", err)
}
if s := result.RawResponse.StatusCode; s != http.Status... | explode_data.jsonl/61672 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
33313,
19103,
5442,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
501,
33313,
2959,
741,
11323,
11,
293,
1669,
2224,
18,
17,
7,
16,
13,
15,
20,
701,
2224,
18,
17,
4080,
15,
13,
15,
15,
18,
340,
9559,
11,
1848,
1669,
294... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAuthBasic(t *testing.T) {
r := URL("http://localhost/")
r.Auth("admin", "safe")
var want = "Basic YWRtaW46c2FmZQ==" // admin:safe in base64
var got = r.Headers.Get("Authorization")
if want != got {
t.Errorf("Wrong auth header. Expected %s, got %s instead", want, got)
}
} | explode_data.jsonl/24731 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 115
} | [
2830,
3393,
5087,
15944,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
5548,
445,
1254,
1110,
8301,
53006,
7000,
25233,
445,
2882,
497,
330,
18675,
5130,
2405,
1366,
284,
330,
15944,
809,
17925,
2565,
54,
19,
21,
66,
17,
37,
76,
57,
48,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test2FailsAndSuccessfullySend(t *testing.T) {
policy := newRetryPolicy()
// send will fail and must be put in queue
policy.ingest(&retryPolicyRequest{
data: []byte("first"),
ingestionURL: "",
httpRequest: func(data []byte, ingestionURL string) error {
return errors.New("some connection problem... | explode_data.jsonl/40701 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 378
} | [
2830,
3393,
17,
37,
6209,
3036,
35959,
11505,
1155,
353,
8840,
836,
8,
341,
3223,
8018,
1669,
501,
51560,
13825,
2822,
197,
322,
3624,
686,
3690,
323,
1969,
387,
2182,
304,
7177,
198,
3223,
8018,
13,
287,
477,
2099,
44848,
13825,
1900... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogInfo_HidePrivate(t *testing.T) {
var config = NewConfig()
config.CollectorURL = "test"
actual, err := config.PublicFields()
assert.NoError(t, err)
_, exists := actual["collector_url"]
assert.False(t, exists)
} | explode_data.jsonl/22925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 82
} | [
2830,
3393,
2201,
1731,
2039,
577,
16787,
1155,
353,
8840,
836,
8,
341,
2405,
2193,
284,
1532,
2648,
741,
25873,
727,
24605,
269,
3144,
284,
330,
1944,
1837,
88814,
11,
1848,
1669,
2193,
49139,
8941,
741,
6948,
35699,
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 |
func TestContainsNearbyAlmostDuplicate(t *testing.T) {
tests := []struct {
name string
nums []int
k int
t int
want bool
}{
{"test 1", []int{1, 2, 3, 1}, 3, 0, true},
{"test 2", []int{1, 0, 1, 1}, 1, 2, true},
{"test 3", []int{1, 5, 9, 1, 5, 9}, 2, 3, false},
}
for _, tt := range tests {
tt ... | explode_data.jsonl/681 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 263
} | [
2830,
3393,
23805,
51962,
1694,
38682,
53979,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
22431,
82,
3056,
396,
198,
197,
16463,
262,
526,
198,
197,
3244,
262,
526,
198,
197,
50780,
1807,
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... | 2 |
func TestMarginDailyBorrowedAmounts(t *testing.T) {
t.Parallel()
_, err := f.MarginDailyBorrowedAmounts(context.Background())
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/15172 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 67
} | [
2830,
3393,
21681,
43553,
33,
7768,
291,
10093,
82,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
6878,
1848,
1669,
282,
20331,
43553,
33,
7768,
291,
10093,
82,
5378,
19047,
2398,
743,
1848,
961,
2092,
341,
197,
3244,
614... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRecorderWithFields(t *testing.T) {
r := &Recorder{}
fields, index := r.Fields()
if got, want := len(fields), 0; got != want {
t.Errorf(" got %q", got)
t.Errorf(" want %q", want)
} else if got = len(index); got != want {
t.Errorf(" got index %q", got)
t.Errorf(" want index %q", want)
}
fiel... | explode_data.jsonl/71112 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 401
} | [
2830,
3393,
47023,
2354,
8941,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
609,
47023,
16094,
55276,
11,
1922,
1669,
435,
42809,
741,
743,
2684,
11,
1366,
1669,
2422,
37701,
701,
220,
15,
26,
2684,
961,
1366,
341,
197,
3244,
13080,
445,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMatchFind(t *testing.T) {
// List of various contexts used in each tests,
// tests are run in the same order as this list.
var listFindContexts = []*findContext{
&findContext{
clnt: &s3Client{
targetURL: &clientURL{},
},
ignorePattern: "*.go",
},
&findContext{
clnt: &s3Client{
targ... | explode_data.jsonl/76925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1327
} | [
2830,
3393,
8331,
9885,
1155,
353,
8840,
836,
8,
341,
197,
322,
1759,
315,
5257,
37597,
1483,
304,
1817,
7032,
345,
197,
322,
7032,
525,
1598,
304,
279,
1852,
1973,
438,
419,
1140,
624,
2405,
1140,
9885,
1972,
82,
284,
29838,
3903,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReverseBytes(t *testing.T) {
var b = make([]byte, 0)
r := ReverseBytes(b)
assert.Equal(t, b, r)
b = []byte{1}
r = ReverseBytes(b)
assert.Equal(t, b, r)
b = []byte{1, 2}
r = ReverseBytes(b)
assert.Equal(t, []byte{2, 1}, r)
b = []byte{1, 2, 3}
r = ReverseBytes(b)
assert.Equal(t, []byte{1, 2, 3}, b... | explode_data.jsonl/9699 | {
"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,
45695,
7078,
1155,
353,
8840,
836,
8,
341,
2405,
293,
284,
1281,
10556,
3782,
11,
220,
15,
340,
7000,
1669,
24277,
7078,
1883,
340,
6948,
12808,
1155,
11,
293,
11,
435,
692,
2233,
284,
3056,
3782,
90,
16,
532,
7000,
284,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConnectIncrementActiveConnection(t *testing.T) {
c := context.New(t, defaultMTU)
defer c.Cleanup()
stats := c.Stack().Stats()
want := stats.TCP.ActiveConnectionOpenings.Value() + 1
c.CreateConnected(789, 30000, nil)
if got := stats.TCP.ActiveConnectionOpenings.Value(); got != want {
t.Errorf("got sta... | explode_data.jsonl/22272 | {
"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,
14611,
38311,
5728,
4526,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2266,
7121,
1155,
11,
1638,
8505,
52,
340,
16867,
272,
727,
60639,
2822,
79659,
1669,
272,
58646,
1005,
16635,
741,
50780,
1669,
10472,
836,
7123,
28755,
45... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRootCertificateCertificate(t *testing.T) {
root := parseCertificate(rootPEM)
ok := &api.SignResponse{
ServerPEM: api.Certificate{Certificate: parseCertificate(certPEM)},
CaPEM: api.Certificate{Certificate: parseCertificate(rootPEM)},
TLS: &tls.ConnectionState{VerifiedChains: [][]*x509.Certificate{
... | explode_data.jsonl/58879 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 472
} | [
2830,
3393,
8439,
33202,
33202,
1155,
353,
8840,
836,
8,
341,
33698,
1669,
4715,
33202,
9206,
1740,
44,
340,
59268,
1669,
609,
2068,
41152,
2582,
515,
197,
92075,
1740,
44,
25,
6330,
727,
20962,
90,
33202,
25,
4715,
33202,
87793,
1740,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMapTestGoString(t *testing.T) {
popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))
p := NewPopulatedMapTest(popr, false)
s1 := p.GoString()
s2 := fmt.Sprintf("%#v", p)
if s1 != s2 {
t.Fatalf("GoString want %v got %v", s1, s2)
}
_, err := go_parser.ParseExpr(s1)
if err != nil {
t.Fata... | explode_data.jsonl/14900 | {
"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,
2227,
2271,
10850,
703,
1155,
353,
8840,
836,
8,
341,
3223,
46288,
1669,
6888,
33864,
7121,
37270,
33864,
7121,
3608,
9730,
13244,
1005,
55832,
83819,
12145,
3223,
1669,
1532,
11598,
7757,
2227,
2271,
40148,
81,
11,
895,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrintPersistentVolume(t *testing.T) {
myScn := "my-scn"
claimRef := api.ObjectReference{
Name: "test",
Namespace: "default",
}
tests := []struct {
pv api.PersistentVolume
expected []metav1.TableRow
}{
{
// Test bound
pv: api.PersistentVolume{
ObjectMeta: metav1.ObjectMeta{
... | explode_data.jsonl/21626 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1925
} | [
2830,
3393,
8994,
53194,
18902,
1155,
353,
8840,
836,
8,
341,
13624,
3326,
77,
1669,
330,
2408,
1331,
14271,
1837,
197,
7859,
3945,
1669,
6330,
8348,
8856,
515,
197,
21297,
25,
414,
330,
1944,
756,
197,
90823,
25,
330,
2258,
756,
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... | 5 |
func TestReplaceAgg(t *testing.T) {
agg := LastValue.AggFunc()
assert.Equal(t, LastValue, agg.AggType())
assert.Equal(t, 99.0, agg.Aggregate(1, 99.0))
} | explode_data.jsonl/69054 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 67
} | [
2830,
3393,
23107,
9042,
70,
1155,
353,
8840,
836,
8,
341,
197,
15718,
1669,
7996,
1130,
875,
14398,
9626,
741,
6948,
12808,
1155,
11,
7996,
1130,
11,
50020,
875,
14398,
929,
2398,
6948,
12808,
1155,
11,
220,
24,
24,
13,
15,
11,
500... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteRouter(t *testing.T) {
var (
addressInfo = schema.Address{}
)
userInfo, err := tester.CreateUser()
if !assert.Nil(t, err) {
return
}
defer tester.DeleteUserByUserName(userInfo.Username)
header := mocker.Header{
"Authorization": token.Prefix + " " + userInfo.Token,
}
// 创建一条收货地址
{
... | explode_data.jsonl/55983 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 705
} | [
2830,
3393,
6435,
9523,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
63202,
1731,
284,
10802,
26979,
16094,
197,
692,
19060,
1731,
11,
1848,
1669,
37111,
7251,
1474,
2822,
743,
753,
2207,
59678,
1155,
11,
1848,
8,
341,
197,
853,
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... | 7 |
func TestHostClientGet(t *testing.T) {
t.Parallel()
skipIfNotUnix(t)
addr := "TestHostClientGet.unix"
s := startEchoServer(t, "unix", addr)
defer s.Stop()
c := createEchoClient(t, "unix", addr)
testHostClientGet(t, c, 100)
} | explode_data.jsonl/79381 | {
"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,
9296,
2959,
1949,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1903,
13389,
2679,
2623,
55832,
1155,
340,
53183,
1669,
330,
2271,
9296,
2959,
1949,
6307,
941,
698,
1903,
1669,
1191,
74994,
5475,
1155,
11,
330,
5664... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChatSrvTeamTypeChanged(t *testing.T) {
runWithMemberTypes(t, func(mt chat1.ConversationMembersType) {
ctc := makeChatTestContext(t, "TestChatSrvTeamTypeChanged", 2)
defer ctc.cleanup()
users := ctc.users()
// Only run this test for teams
switch mt {
case chat1.ConversationMembersType_TEAM:
defa... | explode_data.jsonl/63715 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1280
} | [
2830,
3393,
15672,
50,
10553,
14597,
929,
5389,
1155,
353,
8840,
836,
8,
341,
56742,
2354,
9366,
4173,
1155,
11,
2915,
81618,
6236,
16,
4801,
22323,
24371,
929,
8,
341,
197,
89216,
66,
1669,
1281,
15672,
2271,
1972,
1155,
11,
330,
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... | 6 |
func TestHostNetworkAllowed(t *testing.T) {
testKubelet := newTestKubelet(t)
kubelet := testKubelet.kubelet
capabilities.SetForTests(capabilities.Capabilities{
PrivilegedSources: capabilities.PrivilegedSources{
HostNetworkSources: []string{kubetypes.ApiserverSource, kubetypes.FileSource},
},
})
pod := &api... | explode_data.jsonl/43341 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 374
} | [
2830,
3393,
9296,
12320,
35382,
1155,
353,
8840,
836,
8,
341,
18185,
42,
3760,
1149,
1669,
501,
2271,
42,
3760,
1149,
1155,
340,
16463,
3760,
1149,
1669,
1273,
42,
3760,
1149,
5202,
3760,
1149,
271,
1444,
391,
8456,
4202,
2461,
18200,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUntypedFloatIssue788(t *testing.T) {
gopClTest(t, `
func foo(v int) bool {
return v > 1.1e5
}
`, `package main
func foo(v int) bool {
return v > 1.1e5
}
`)
} | explode_data.jsonl/73582 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 82
} | [
2830,
3393,
20250,
32501,
5442,
42006,
22,
23,
23,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
22074,
2830,
15229,
3747,
526,
8,
1807,
341,
262,
470,
348,
861,
220,
16,
13,
16,
68,
20,
198,
532,
7808,
1565,
1722... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInspectImage(t *testing.T) {
color.Disable(true)
defer color.Disable(false)
spec.Run(t, "InspectImage", testInspectImage, spec.Parallel(), spec.Report(report.Terminal{}))
} | explode_data.jsonl/26929 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 67
} | [
2830,
3393,
58533,
1906,
1155,
353,
8840,
836,
8,
341,
21481,
10166,
480,
3715,
340,
16867,
1894,
10166,
480,
3576,
340,
98100,
16708,
1155,
11,
330,
58533,
1906,
497,
1273,
58533,
1906,
11,
1398,
41288,
7957,
1507,
1398,
25702,
45175,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReduce(t *testing.T) {
eq := func(x, y string, e string) {
t.Helper()
out := diff.NewWords(diff.Split(x)).Reduce(diff.NewWords(diff.Split(y))).String()
if out != e {
t.Error(out, "!=", e)
}
}
eq("", "", "")
eq("", "a", "")
eq("a", "", "")
eq("abc", "abc", "abc")
eq("abc", "acb", "abc")
eq(... | explode_data.jsonl/75067 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 190
} | [
2830,
3393,
50325,
1155,
353,
8840,
836,
8,
341,
7727,
80,
1669,
2915,
2075,
11,
379,
914,
11,
384,
914,
8,
341,
197,
3244,
69282,
2822,
197,
13967,
1669,
3638,
7121,
23489,
37124,
19823,
2075,
4579,
50325,
37124,
7121,
23489,
37124,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStoreGateway_InitialSyncWithShardingDisabled(t *testing.T) {
ctx := context.Background()
gatewayCfg := mockGatewayConfig()
gatewayCfg.ShardingEnabled = false
storageCfg := mockStorageConfig(t)
bucketClient := &bucket.ClientMock{}
g, err := newStoreGateway(gatewayCfg, storageCfg, bucketClient, nil, defau... | explode_data.jsonl/57957 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 316
} | [
2830,
3393,
6093,
40709,
62,
6341,
12154,
2354,
2016,
28410,
25907,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
3174,
12043,
42467,
1669,
7860,
40709,
2648,
741,
3174,
12043,
42467,
10849,
28410,
5462,
284,
895,
198,
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 TestDockerCoordinator_No_Cleanup(t *testing.T) {
t.Parallel()
image := "foo"
imageID := uuid.Generate()
mapping := map[string]string{imageID: image}
mock := newMockImageClient(mapping, 1*time.Millisecond)
config := &dockerCoordinatorConfig{
logger: testlog.Logger(t),
cleanup: false,
client: ... | explode_data.jsonl/63473 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 332
} | [
2830,
3393,
35,
13659,
64304,
36989,
920,
60639,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
31426,
1669,
330,
7975,
698,
31426,
915,
1669,
16040,
57582,
741,
2109,
3629,
1669,
2415,
14032,
30953,
90,
1805,
915,
25,
2168,
630,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProjectionHandler_prepareExecuteBulk(t *testing.T) {
type fields struct {
Handler Handler
SequenceTable string
stmts []*Statement
pushSet bool
shouldPush *time.Timer
}
type args struct {
ctx context.Context
query SearchQuery
reduce Reduce
update Update
}
type w... | explode_data.jsonl/81376 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2389
} | [
2830,
3393,
46321,
3050,
47460,
17174,
88194,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
197,
3050,
981,
19954,
198,
197,
197,
14076,
2556,
914,
198,
197,
55822,
82,
260,
29838,
8636,
198,
197,
43155,
1649,
981,
1807,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConverterMapStructWithToReqMissingError(t *testing.T) {
fieldMap := make(map[string]codegen.FieldMapperEntry)
_, err := convertTypes(
"Foo", "Bar",
`struct NestedFoo {
1: required string one
2: optional string two
}
struct Foo {
1: required NestedFoo three
}
struct Bar {
1:... | explode_data.jsonl/62072 | {
"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,
14920,
2227,
9422,
2354,
1249,
27234,
25080,
1454,
1155,
353,
8840,
836,
8,
341,
39250,
2227,
1669,
1281,
9147,
14032,
60,
95859,
17087,
10989,
5874,
692,
197,
6878,
1848,
1669,
5508,
4173,
1006,
197,
197,
1,
40923,
497,
330... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHalving(t *testing.T) {
cases := []struct {
F []*big.Int
Target *big.Int
Expect []*big.Int
}{
// Example from [hehcc:exp], page 163.
{
F: bigints.Int64s(14),
Target: big.NewInt(382),
Expect: bigints.Int64s(14, 23, 46, 92, 184, 368),
},
// Simple powers of two case.
{
F: ... | explode_data.jsonl/3506 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 311
} | [
2830,
3393,
55941,
4405,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
12727,
414,
29838,
16154,
7371,
198,
197,
197,
6397,
353,
16154,
7371,
198,
197,
35911,
29838,
16154,
7371,
198,
197,
59403,
197,
197,
322,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFileRepositoryParent(t *testing.T) {
f := &mobileFileRepo{}
repository.Register("file", f)
p, _ := storage.Parent(storage.NewFileURI("/foo/bar"))
assert.Equal(t, "file:///foo", p.String())
p, _ = storage.Parent(storage.NewFileURI("/foo/bar/"))
assert.Equal(t, "file:///foo", p.String())
uri, _ := stor... | explode_data.jsonl/47723 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 171
} | [
2830,
3393,
1703,
4624,
8387,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
609,
14933,
1703,
25243,
16094,
17200,
3099,
19983,
445,
1192,
497,
282,
692,
3223,
11,
716,
1669,
5819,
28985,
52463,
7121,
1703,
10301,
4283,
7975,
49513,
5455,
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... | 1 |
func TestFSMsgCache(t *testing.T) {
cleanupFSDatastore(t)
defer cleanupFSDatastore(t)
// For this test, increase a bit the test values
cacheTTL = int64(250 * time.Millisecond)
defer func() {
cacheTTL = testFSDefaultCacheTTL
}()
fs := createDefaultFileStore(t)
defer fs.Close()
payload := []byte("data")
cs... | explode_data.jsonl/7776 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 901
} | [
2830,
3393,
8485,
6611,
8233,
1155,
353,
8840,
836,
8,
341,
1444,
60639,
8485,
1043,
4314,
1155,
340,
16867,
21290,
8485,
1043,
4314,
1155,
692,
197,
322,
1752,
419,
1273,
11,
5263,
264,
2699,
279,
1273,
2750,
198,
52680,
51,
13470,
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... | 1 |
func TestServiceGet(t *testing.T) {
t.Run("success", func(t *testing.T) {
// GIVEN
mockRepository := &automock.Repository{}
defer mockRepository.AssertExpectations(t)
ctx := context.TODO()
given := model.LabelDefinition{
Key: "key",
Tenant: "tenant",
}
mockRepository.On("GetByKey", ctx, "tenant"... | explode_data.jsonl/76923 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 416
} | [
2830,
3393,
1860,
1949,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5630,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
322,
89836,
198,
197,
77333,
4624,
1669,
609,
27073,
1176,
25170,
16094,
197,
16867,
7860,
4624,
11711,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDistinct(t *testing.T) {
t.Log(rx.Slice(rx.Distinct(rx.SliceIter(0, 0, 2, 1, 1, 1, 2, 3, 2, 2, 3, 3, 4))))
} | explode_data.jsonl/13718 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 62
} | [
2830,
3393,
72767,
1155,
353,
8840,
836,
8,
341,
3244,
5247,
75279,
95495,
75279,
909,
380,
7800,
75279,
95495,
8537,
7,
15,
11,
220,
15,
11,
220,
17,
11,
220,
16,
11,
220,
16,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestScanNumericTokens(t *testing.T) {
validatorentries := []struct {
input string
tokens []Token
}{
{"hello, world!", []Token{}},
{"0 0\n 0\n-1", []Token{{"0", 1, 1}, {"0", 1, 3}, {"0", 2, 2}, {"-1", 3, 1}}},
}
loop:
for _, vet := range validatorentries {
tokenizer := NewTokenizer(bytes.NewBufferStr... | explode_data.jsonl/39041 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 315
} | [
2830,
3393,
26570,
36296,
29300,
1155,
353,
8840,
836,
8,
341,
56322,
266,
23647,
4543,
1669,
3056,
1235,
341,
197,
22427,
220,
914,
198,
197,
3244,
9713,
3056,
3323,
198,
197,
59403,
197,
197,
4913,
14990,
11,
1879,
18789,
3056,
3323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFromWithBool(t *testing.T) {
assertTry(t, gs.Success(0), try.FromWithBool(0, true))
assertTry(t, gs.Failure[int](gs.ErrUnsatisfied), try.FromWithBool(0, false))
} | explode_data.jsonl/23072 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 75
} | [
2830,
3393,
3830,
2354,
11233,
1155,
353,
8840,
836,
8,
341,
6948,
21453,
1155,
11,
28081,
33320,
7,
15,
701,
1430,
11439,
2354,
11233,
7,
15,
11,
830,
1171,
6948,
21453,
1155,
11,
28081,
98190,
18640,
9533,
5857,
27862,
1806,
82,
462... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEval_exposed_error(t *testing.T) {
_, err := expr.Eval(`1/0`, nil)
require.Error(t, err)
fileError, ok := err.(*file.Error)
require.True(t, ok, "error should be of type *file.Error")
require.Equal(t, "runtime error: integer divide by zero (1:2)\n | 1/0\n | .^", fileError.Error())
require.Equal(t, 1, fil... | explode_data.jsonl/36916 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 152
} | [
2830,
3393,
54469,
2702,
3865,
4096,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
15169,
5142,
831,
5809,
16,
14,
15,
7808,
2092,
340,
17957,
6141,
1155,
11,
1848,
692,
17661,
1454,
11,
5394,
1669,
1848,
41399,
1192,
6141,
340... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBlockPullerBasicHappyPath(t *testing.T) {
//场景:单订货节点,
//拉块器拉块5到10。
osn := newClusterNode(t)
defer osn.stop()
dialer := newCountingDialer()
bp := newBlockPuller(dialer, osn.srv.Address())
//第一个SEEK请求请求请求最新的块
osn.addExpectProbeAssert()
//第一个反应是高度是10
osn.enqueueResponse(10)
//下一个搜索请求是针对块5的
osn.addExpectP... | explode_data.jsonl/47268 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 378
} | [
2830,
3393,
4713,
36068,
261,
15944,
32847,
1820,
1155,
353,
8840,
836,
8,
341,
322,
102122,
5122,
23990,
99975,
81668,
92374,
41453,
322,
72225,
99922,
31548,
72225,
99922,
20,
26939,
16,
15,
8997,
25078,
77,
1669,
501,
28678,
1955,
1155... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseWordsError(t *testing.T) {
t.Parallel()
in := "foo )"
p := NewParser()
recv := make(chan bool, 10)
errc := make(chan error, 1)
go func() {
errc <- p.Words(strings.NewReader(in), func(w *Word) bool {
recv <- true
return true
})
}()
<-recv
want := "1:5: ) is not a valid word"
got := fmt.... | explode_data.jsonl/55132 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 188
} | [
2830,
3393,
14463,
23489,
1454,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
17430,
1669,
330,
7975,
873,
698,
3223,
1669,
1532,
6570,
741,
197,
33977,
1669,
1281,
35190,
1807,
11,
220,
16,
15,
340,
9859,
66,
1669,
1281,
3519... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parseSetTimeCommand(t *testing.T) {
loc, err := time.LoadLocation("UTC")
if err != nil {
t.Fatal(err)
}
tests := []struct {
name string
msg string
want time.Time
wantErr bool
}{
{"basic", "14:00", time.Date(0, 1, 1, 14, 0, 0, 0, loc), false},
{"basic spaces", " 14:00 ", time.Date... | explode_data.jsonl/547 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 478
} | [
2830,
3393,
21039,
1649,
1462,
4062,
1155,
353,
8840,
836,
8,
341,
71128,
11,
1848,
1669,
882,
13969,
4707,
445,
21183,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
630,
78216,
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... | 3 |
func TestSourceIPRule(t *testing.T) {
assert := assert.On(t)
rule := ParseRule([]byte(`{
"type": "field",
"source": [
"10.0.0.0/8",
"192.0.0.0/24"
],
"outboundTag": "direct"
}`))
assert.Pointer(rule).IsNotNil()
cond, err := rule.BuildCondition()
assert.Error(err).IsNil()
assert.Bool... | explode_data.jsonl/30778 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 377
} | [
2830,
3393,
3608,
3298,
11337,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
8071,
1155,
692,
7000,
1111,
1669,
14775,
11337,
10556,
3782,
5809,
515,
262,
330,
1313,
788,
330,
2566,
756,
262,
330,
2427,
788,
2278,
414,
330,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMergeVolumeMounts(t *testing.T) {
tests := map[string]struct {
orig []api.VolumeMount
mod []api.VolumeMount
result []api.VolumeMount
shouldFail bool
}{
"empty original": {
mod: []api.VolumeMount{
{
Name: "simply-mounted-volume",
MountPath: "/opt/",
},
}... | explode_data.jsonl/20880 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1355
} | [
2830,
3393,
52096,
18902,
16284,
82,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
197,
4670,
981,
3056,
2068,
79106,
16284,
198,
197,
42228,
286,
3056,
2068,
79106,
16284,
198,
197,
9559,
257,
3056,
2068,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestForm(t *testing.T) {
var token string
g := newServer(Options{
Secret: "secret123",
})
g.GET("/login", func(c *gin.Context) {
token = GetToken(c)
})
g.POST("/login", func(c *gin.Context) {
c.String(http.StatusOK, "OK")
})
r1 := request(g, requestOptions{URL: "/login"})
r2 := request(g, request... | explode_data.jsonl/22729 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 275
} | [
2830,
3393,
1838,
1155,
353,
8840,
836,
8,
341,
2405,
3950,
914,
198,
3174,
1669,
501,
5475,
7,
3798,
515,
197,
7568,
50856,
25,
330,
20474,
16,
17,
18,
756,
197,
8824,
3174,
17410,
4283,
3673,
497,
2915,
1337,
353,
8163,
9328,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultiSessions(t *testing.T) {
store := New(newDB(), []byte("secret"))
countFn1 := makeCountHandler("session1", store)
countFn2 := makeCountHandler("session2", store)
r1 := req(countFn1, nil)
match(t, r1, 200, "1")
r2 := req(countFn2, nil)
match(t, r2, 200, "1")
r3 := req(countFn1, parseCookies(r1.Hea... | explode_data.jsonl/71337 | {
"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,
20358,
59062,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
1532,
1755,
3506,
1507,
3056,
3782,
445,
20474,
5455,
18032,
24911,
16,
1669,
1281,
2507,
3050,
445,
5920,
16,
497,
3553,
340,
18032,
24911,
17,
1669,
1281,
2507,
3050... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEarlyTermNoTraversalResults(t *testing.T) {
alpha := 1
vtxID := ids.ID{1}
vdr1 := ids.ShortID{1} // k = 1
vdrs := ids.ShortBag{}
vdrs.Add(vdr1)
factory := NewEarlyTermNoTraversalFactory(alpha)
poll := factory.New(vdrs)
poll.Vote(vdr1, vtxID)
if !poll.Finished() {
t.Fatalf("Poll did not terminat... | explode_data.jsonl/41155 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 260
} | [
2830,
3393,
41198,
17249,
2753,
76276,
9801,
1155,
353,
8840,
836,
8,
341,
73063,
1669,
220,
16,
271,
5195,
3998,
915,
1669,
14151,
9910,
90,
16,
630,
5195,
3612,
16,
1669,
14151,
55958,
915,
90,
16,
92,
442,
595,
284,
220,
16,
271,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNoLimit(t *testing.T) {
limiters := NewFakeLimiters()
// NoLimit() does not do rate limiting and should succeed.
m := NoLimit()
require.NoError(t, m.RateLimit(context.Background(), 99))
// There should be no rate limiters configured as NoLimit() doesn't use one.
assert.Equal(t, 0, limiters.Count)
} | explode_data.jsonl/5204 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
2753,
16527,
1155,
353,
8840,
836,
8,
341,
8810,
67645,
1669,
1532,
52317,
16527,
388,
2822,
197,
322,
2308,
16527,
368,
1558,
537,
653,
4379,
32894,
323,
1265,
11996,
624,
2109,
1669,
2308,
16527,
741,
17957,
35699,
1155,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMemstore(t *testing.T) {
graphtest.TestAll(t, func(t testing.TB) (graph.QuadStore, graph.Options, func()) {
return New(), nil, func() {}
}, &graphtest.Config{
AlwaysRunIntegration: true,
})
} | explode_data.jsonl/79099 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
18816,
4314,
1155,
353,
8840,
836,
8,
341,
90059,
391,
426,
477,
8787,
2403,
1155,
11,
2915,
1155,
7497,
836,
33,
8,
320,
4439,
98123,
6093,
11,
4771,
22179,
11,
2915,
2140,
341,
197,
853,
1532,
1507,
2092,
11,
2915,
368... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFinalizePulse_CantGteNextPulse(t *testing.T) {
ctx := inslogger.TestContext(t)
testPulse := insolar.PulseNumber(pulse.MinTimePulse)
jk := executor.NewJetKeeperMock(t)
jk.HasAllJetConfirmsMock.Return(true)
jk.TopSyncPulseMock.Return(testPulse)
pc := insolarPulse.NewCalculatorMock(t)
pc.ForwardsMock.Re... | explode_data.jsonl/68986 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 183
} | [
2830,
3393,
19357,
551,
47,
17217,
920,
517,
38,
665,
5847,
47,
17217,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
1640,
9786,
8787,
1972,
1155,
692,
18185,
47,
17217,
1669,
1640,
7417,
1069,
17217,
2833,
1295,
17217,
17070,
1462,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNormalizeServer(t *testing.T) {
for _, tt := range normalizeTests {
got := normalizeGerritServer(tt.in)
if got != tt.out {
t.Errorf("normalizeGerritServer(%q) = %q, want %q", tt.in, got, tt.out)
}
}
} | explode_data.jsonl/66156 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 100
} | [
2830,
3393,
87824,
5475,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
21694,
18200,
341,
197,
3174,
354,
1669,
21694,
38,
615,
275,
5475,
47152,
1858,
340,
197,
743,
2684,
961,
17853,
2532,
341,
298,
3244,
13080,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCountChilds(t *testing.T) {
test.DropPrivilege(t)
defer test.ResetPrivilege(t)
childs, err := CountChilds(1)
if err != nil {
t.Fatal(err)
}
if childs == 0 {
t.Fatal("init have no child processes")
}
_, err = CountChilds(0)
if err == nil {
t.Fatal("no error reported with PID 0")
}
} | explode_data.jsonl/19787 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 133
} | [
2830,
3393,
2507,
3652,
82,
1155,
353,
8840,
836,
8,
341,
18185,
21688,
32124,
42769,
1155,
340,
16867,
1273,
36660,
32124,
42769,
1155,
692,
58391,
82,
11,
1848,
1669,
4504,
3652,
82,
7,
16,
340,
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... | 4 |
func TestWorkflowCreatedAfter(t *testing.T) {
t0 := time.Time{}
t1 := t0.Add(time.Second)
assert.False(t, WorkflowCreatedAfter(t1)(Workflow{ObjectMeta: metav1.ObjectMeta{CreationTimestamp: metav1.Time{Time: t0}}}))
assert.True(t, WorkflowCreatedAfter(t0)(Workflow{ObjectMeta: metav1.ObjectMeta{CreationTimestamp: met... | explode_data.jsonl/26013 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
62768,
11694,
6025,
1155,
353,
8840,
836,
8,
341,
3244,
15,
1669,
882,
16299,
16094,
3244,
16,
1669,
259,
15,
1904,
9730,
32435,
340,
6948,
50757,
1155,
11,
60173,
11694,
6025,
1155,
16,
2376,
62768,
90,
1190,
12175,
25,
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 TestPemMarshalling(t *testing.T) {
// private, err := jwt.ParseECPrivateKeyFromPEM(privateKeyPEM)
private, alg, err := jwti.LoadPrivateKeyFromPEMString(string(privateKeyPEM))
if err != nil {
fmt.Println(string(privateKeyPEM))
t.Fatalf("Error parsing key from PEM: %v", err)
}
if alg != model.TokenSignatur... | explode_data.jsonl/50750 | {
"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,
47,
336,
79712,
16740,
1155,
353,
8840,
836,
8,
341,
197,
322,
869,
11,
1848,
1669,
24589,
8937,
7498,
75981,
3830,
1740,
44,
17550,
1592,
1740,
44,
340,
2455,
11,
17345,
11,
1848,
1669,
24589,
72,
13969,
75981,
3830,
1740... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStreamIterator(t *testing.T) {
const chunks = 3
const entries = 100
for _, chk := range []struct {
name string
new func() *chunkenc.MemChunk
}{
{"gzipChunk", func() *chunkenc.MemChunk { return chunkenc.NewMemChunk(chunkenc.EncGZIP, 256*1024, 0) }},
} {
t.Run(chk.name, func(t *testing.T) {
var... | explode_data.jsonl/46247 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 725
} | [
2830,
3393,
3027,
11951,
1155,
353,
8840,
836,
8,
341,
4777,
26757,
284,
220,
18,
198,
4777,
10695,
284,
220,
16,
15,
15,
271,
2023,
8358,
39242,
1669,
2088,
3056,
1235,
341,
197,
11609,
914,
198,
197,
8638,
220,
2915,
368,
353,
259... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCorrectProvidersCreated(t *testing.T) {
assert := assert.New(t)
bh := BoxHandler{}
boxes := []SimpleBox{
SimpleBox{Boxname: "dev", Username: "benphegan", Provider: "virtualbox", Version: "2.0"},
SimpleBox{Boxname: "dev", Username: "benphegan", Provider: "vmware", Version: "1.0"},
SimpleBox{Boxname: "d... | explode_data.jsonl/51588 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 224
} | [
2830,
3393,
33092,
37351,
11694,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
2233,
71,
1669,
8261,
3050,
16094,
197,
22204,
1669,
3056,
16374,
1611,
515,
197,
84144,
1611,
90,
1611,
606,
25,
330,
3583,
497,
29545,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRaw(t *testing.T) {
data1 := json.RawMessage(`{"key": "value"}`)
stdJsonData1, err := json.Marshal(DataRawMessage{
Data: &data1,
})
if err != nil {
t.Fatalf("%v", err)
}
data2 := Raw(`{"key": "value"}`)
stdJsonData2, err := json.Marshal(DataRaw{
Data: &data2,
})
if err != nil {
t.Fatalf("%v",... | explode_data.jsonl/69915 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 195
} | [
2830,
3393,
20015,
1155,
353,
8840,
836,
8,
341,
8924,
16,
1669,
2951,
50575,
2052,
5809,
4913,
792,
788,
330,
957,
1,
27085,
6736,
5014,
1043,
16,
11,
1848,
1669,
2951,
37271,
18959,
20015,
2052,
515,
197,
40927,
25,
609,
691,
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... | 4 |
func Test_signerFromFile(t *testing.T) {
cases := []struct {
name string
privateKey string
passphrase string
errMsg string
}{
{
name: "rsa private key wrong passphrase",
privateKey: rsaPrivateKey,
passphrase: "wrong passphrase",
errMsg: "error decrypting private key",
},
... | explode_data.jsonl/63807 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 708
} | [
2830,
3393,
11172,
261,
43633,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
2455,
1592,
914,
198,
197,
41431,
27710,
914,
198,
197,
9859,
6611,
257,
914,
198,
197,
59403,
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... | 2 |
func TestSecretAuthProviderChainedMiddleware(t *testing.T) {
ap := selector.NewSelectorMiddleware(
NewSharedSecretWithAccountAuth("super-secret", mockMiddleware("A", "1"), mockMiddleware("A", "2"), mockMiddleware("B", "3")),
NewSharedSecretWithAccountAuth("other-secret", mockMiddleware("N", "5")),
)
{
req := ... | explode_data.jsonl/17024 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 508
} | [
2830,
3393,
19773,
96443,
1143,
2627,
24684,
1155,
353,
8840,
836,
8,
341,
69898,
1669,
9367,
7121,
5877,
24684,
1006,
197,
197,
3564,
16997,
19773,
2354,
7365,
5087,
445,
9522,
68892,
497,
7860,
24684,
445,
32,
497,
330,
16,
3975,
7860... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBatcherInjector(t *testing.T) {
scenarios := map[string]struct {
original *v1.Pod
expected *v1.Pod
}{
"AddBatcher": {
original: &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "deployment",
Namespace: "default",
Annotations: map[string]string{
constants.BatcherInternalAnn... | explode_data.jsonl/17245 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1217
} | [
2830,
3393,
21074,
261,
61836,
1155,
353,
8840,
836,
8,
341,
29928,
60494,
1669,
2415,
14032,
60,
1235,
341,
197,
197,
9889,
353,
85,
16,
88823,
198,
197,
42400,
353,
85,
16,
88823,
198,
197,
59403,
197,
197,
1,
2212,
21074,
261,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewXLog(t *testing.T) {
log1 := newXLog(&logger.Config{
Level: logger.LevelDebug,
})
if log1 == nil {
t.Error("Got uninitialized XLog logger")
}
log2 := newXLog(&logger.Config{
Level: logger.LevelInfo,
Out: os.Stdout,
Err: os.Stdout,
})
if log2 == nil {
t.Error("Got uninitialized XLog lo... | explode_data.jsonl/65316 | {
"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,
3564,
55,
2201,
1155,
353,
8840,
836,
8,
341,
6725,
16,
1669,
88803,
2201,
2099,
9786,
10753,
515,
197,
197,
4449,
25,
5925,
25259,
7939,
345,
197,
3518,
743,
1487,
16,
621,
2092,
341,
197,
3244,
6141,
445,
32462,
97287,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGolastic_Exec(t *testing.T) {
golastic, err := New("http://localhost:9200")
if err != nil {
Error(t, err)
}
result, err := golastic.From("test", "product").Exec("", Query("match_all"))
if err != nil {
t.Error("An error has ocurred: " + err.Error())
}
totalHits := len(result.Hits.Hits)
if totalHi... | explode_data.jsonl/41760 | {
"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,
38,
337,
5064,
62,
10216,
1155,
353,
8840,
836,
8,
341,
3174,
337,
5064,
11,
1848,
1669,
1532,
445,
1254,
1110,
8301,
25,
24,
17,
15,
15,
1138,
743,
1848,
961,
2092,
341,
197,
58421,
1155,
11,
1848,
340,
197,
630,
9559... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseDockerVersions(t *testing.T) {
testCases := []struct {
input string
output dockerVersion
}{
{
input: "1.0",
output: dockerVersion{
major: 1,
minor: 0,
},
},
{
input: "5.2",
output: dockerVersion{
major: 5,
minor: 2,
},
},
}
for i, testCase := range testC... | explode_data.jsonl/43936 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 357
} | [
2830,
3393,
14463,
35,
13659,
69015,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
22427,
220,
914,
198,
197,
21170,
26588,
5637,
198,
197,
59403,
197,
197,
515,
298,
22427,
25,
330,
16,
13,
15,
756,
298,
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... | 3 |
func TestStatMap003(t *testing.T) {
words := []string{"", "", "", "", ""}
want := map[string]int{
"": 5,
}
got := statMapFromSlice(words)
if !equalMap(got, want) {
t.Errorf("stringToCleanSlice(words) == %q, want %q", got, want)
}
} | explode_data.jsonl/59199 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 106
} | [
2830,
3393,
15878,
2227,
15,
15,
18,
1155,
353,
8840,
836,
8,
341,
197,
5761,
1669,
3056,
917,
4913,
497,
7342,
7342,
7342,
93196,
50780,
1669,
2415,
14032,
63025,
515,
197,
197,
28796,
220,
20,
345,
197,
532,
3174,
354,
1669,
2793,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHostWhitelist(t *testing.T) {
policy := HostWhitelist("example.com", "example.org", "*.example.net")
tt := []struct {
host string
allow bool
}{
{"example.com", true},
{"example.org", true},
{"one.example.com", false},
{"two.example.org", false},
{"three.example.net", false},
{"dummy", false... | explode_data.jsonl/51429 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 247
} | [
2830,
3393,
9296,
1639,
57645,
1155,
353,
8840,
836,
8,
341,
3223,
8018,
1669,
16102,
1639,
57645,
445,
8687,
905,
497,
330,
8687,
2659,
497,
59128,
8687,
5071,
1138,
3244,
83,
1669,
3056,
1235,
341,
197,
63104,
220,
914,
198,
197,
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... | 6 |
func TestSimulateMsgWithdrawWithinBatch(t *testing.T) {
app, ctx := createTestApp(false)
// setup accounts
s := rand.NewSource(1)
r := rand.New(s)
accounts := getTestingAccounts(t, r, app, ctx, 3)
// setup random liquidity pools
setupLiquidityPools(t, r, app, ctx, accounts)
// begin a new block
app.BeginBlo... | explode_data.jsonl/32403 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 444
} | [
2830,
3393,
14027,
6334,
6611,
92261,
41961,
21074,
1155,
353,
8840,
836,
8,
341,
28236,
11,
5635,
1669,
1855,
2271,
2164,
3576,
692,
197,
322,
6505,
9618,
198,
1903,
1669,
10382,
7121,
3608,
7,
16,
340,
7000,
1669,
10382,
7121,
1141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetWindowSize(t *testing.T) {
if bi, _ := webtest.GetBrowserInfo(); bi.Environment == "sauce" {
t.Skip("fails on SauceLabs.")
}
testCases := []struct {
name string
width float64
height float64
check bool
err bool
}{
{
"valid",
600,
400,
true,
false,
},
{
"zeroes"... | explode_data.jsonl/68745 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 521
} | [
2830,
3393,
1649,
87817,
1155,
353,
8840,
836,
8,
341,
743,
6032,
11,
716,
1669,
3482,
1944,
2234,
17878,
1731,
2129,
6032,
45651,
621,
330,
82,
75790,
1,
341,
197,
3244,
57776,
445,
59631,
389,
60176,
43,
3435,
13053,
197,
630,
18185... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPorter(t *testing.T) {
wrong := 0
total := 0
for _, row := range porter_testdata {
res := Porter(row[0])
if res != row[1] {
t.Errorf("Porter(%q) => %q, expected %q", row[0], res, row[1])
wrong++
}
total++
}
if wrong > 0 {
t.Errorf("%d / %d incorrect", wrong, total)
}
} | explode_data.jsonl/58067 | {
"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,
7084,
261,
1155,
353,
8840,
836,
8,
341,
6692,
14347,
1669,
220,
15,
198,
34493,
1669,
220,
15,
271,
2023,
8358,
2802,
1669,
2088,
87186,
4452,
691,
341,
197,
10202,
1669,
37937,
7835,
58,
15,
2546,
197,
743,
592,
961,
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... | 4 |
func TestCols(t *testing.T) {
assert.NoError(t, prepareEngine())
type ColsTable struct {
Id int64
Col1 string
Col2 string
}
assertSync(t, new(ColsTable))
_, err := testEngine.Insert(&ColsTable{
Col1: "1",
Col2: "2",
})
assert.NoError(t, err)
sess := testEngine.ID(1)
_, err = sess.Cols("col1").C... | explode_data.jsonl/9276 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 269
} | [
2830,
3393,
37567,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
10549,
4571,
12367,
13158,
356,
3069,
2556,
2036,
341,
197,
67211,
256,
526,
21,
19,
198,
197,
197,
6127,
16,
914,
198,
197,
197,
6127,
17,
914,
198,
197,
630,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.