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 TestZip(t *testing.T) {
defer leaktest.AfterTest(t)()
c := newCLITest(cliTestParams{})
defer c.cleanup()
out, err := c.RunWithCapture("debug zip " + os.DevNull)
if err != nil {
t.Fatal(err)
}
const expected = `debug zip ` + os.DevNull + `
writing ` + os.DevNull + `
debug/events
debug/rangelog
deb... | explode_data.jsonl/36253 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 738
} | [
2830,
3393,
31047,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
1444,
1669,
501,
3140,
952,
477,
70249,
2271,
4870,
37790,
16867,
272,
87689,
2822,
13967,
11,
1848,
1669,
272,
52437,
27429,
445,
8349,
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... | 3 |
func TestWatchpointCounts(t *testing.T) {
skipOn(t, "not implemented", "freebsd")
skipOn(t, "not implemented", "386")
skipOn(t, "see https://github.com/go-delve/delve/issues/2768", "windows")
protest.AllowRecording(t)
withTestProcess("databpcountstest", t, func(p *proc.Target, fixture protest.Fixture) {
setFunc... | explode_data.jsonl/56357 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 523
} | [
2830,
3393,
14247,
2768,
63731,
1155,
353,
8840,
836,
8,
341,
1903,
13389,
1925,
1155,
11,
330,
1921,
11537,
497,
330,
10593,
51835,
1138,
1903,
13389,
1925,
1155,
11,
330,
1921,
11537,
497,
330,
18,
23,
21,
1138,
1903,
13389,
1925,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHeadTracker_SwitchesToLongestChainWithHeadSamplingEnabled(t *testing.T) {
// Need separate db because ht.Stop() will cancel the ctx, causing a db connection
// close and go-txdb rollback.
config, _ := heavyweight.FullTestORM(t, "switches_longest_chain", true, true)
config.Overrides.GlobalEvmFinalityDepth =... | explode_data.jsonl/63753 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1715
} | [
2830,
3393,
12346,
31133,
1098,
5539,
288,
1249,
6583,
477,
18837,
2354,
12346,
98622,
5462,
1155,
353,
8840,
836,
8,
341,
197,
322,
14656,
8651,
2927,
1576,
34323,
30213,
368,
686,
9121,
279,
5635,
11,
14381,
264,
2927,
3633,
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 Test_validateFamily(t *testing.T) {
testCases := []struct {
family string
valid bool
}{
{ // case[0]
family: "foo",
valid: false,
},
{ // case[1]
family: ProtocolFamilyIPV4,
valid: true,
},
{ // case[2]
family: ProtocolFamilyIPV6,
valid: true,
},
{ // case[3]
family: "i... | explode_data.jsonl/74018 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 424
} | [
2830,
3393,
42681,
15192,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
1166,
5174,
914,
198,
197,
56322,
220,
1807,
198,
197,
59403,
197,
197,
90,
442,
1142,
58,
15,
921,
298,
1166,
5174,
25,
330,
7975,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImageRef_RemoveOrientation__HasEXIF(t *testing.T) {
Startup(nil)
image, err := NewImageFromFile(resources + "jpg-orientation-6.jpg")
require.NoError(t, err)
defer image.Close()
err = image.RemoveOrientation()
require.NoError(t, err)
assert.Equal(t, 0, image.GetOrientation())
} | explode_data.jsonl/38831 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 112
} | [
2830,
3393,
1906,
3945,
66843,
22332,
563,
10281,
3257,
2773,
1155,
353,
8840,
836,
8,
341,
197,
39076,
27907,
692,
31426,
11,
1848,
1669,
1532,
1906,
43633,
52607,
488,
330,
17974,
12,
24294,
12,
21,
4819,
1138,
17957,
35699,
1155,
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 TestGetRegionZoneForCustomEndpoint(t *testing.T) {
driver := NewCustomTestDriver(&fakeEC2WithLogin{})
driver.awsCredentialsFactory = NewValidAwsCredentials
options := &commandstest.FakeFlagger{
Data: map[string]interface{}{
"name": "test",
"amazonec2-endpoint": "https://someurl",
"amazo... | explode_data.jsonl/7416 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 220
} | [
2830,
3393,
1949,
14091,
15363,
2461,
10268,
27380,
1155,
353,
8840,
836,
8,
341,
33652,
1669,
1532,
10268,
2271,
11349,
2099,
30570,
7498,
17,
2354,
6231,
37790,
33652,
35166,
27025,
4153,
284,
1532,
4088,
47359,
27025,
198,
35500,
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... | 1 |
func TestPinsStream(t *testing.T) {
is := is.New(t)
s := NewShell(shellUrl)
// Add a thing, which pins it by default
h, err := s.Add(bytes.NewBufferString("go-ipfs-api pins test 0C7023F8-1FEC-4155-A8E0-432A5853F46B"))
is.Nil(err)
pinChan, err := s.PinsStream(context.Background())
is.Nil(err)
pins := accumula... | explode_data.jsonl/61083 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 325
} | [
2830,
3393,
47,
1330,
3027,
1155,
353,
8840,
836,
8,
341,
19907,
1669,
374,
7121,
1155,
340,
1903,
1669,
1532,
25287,
93558,
2864,
692,
197,
322,
2691,
264,
3166,
11,
892,
26944,
432,
553,
1638,
198,
9598,
11,
1848,
1669,
274,
1904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExecuteCommandsMajorityFailures(t *testing.T) {
n := newNetwork(3, 1)
n.CrashN(n.F()+1, 0)
cmd := command.NewTestingCommand("a")
n.duobftPeers[0].onRequest(cmd)
if n.waitExecuteInstance(cmd, true /* quorum */) {
t.Fatalf("command execution failed, cmd %+v committed", cmd)
}
} | explode_data.jsonl/49441 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 118
} | [
2830,
3393,
17174,
30479,
34475,
487,
19524,
1413,
1155,
353,
8840,
836,
8,
341,
9038,
1669,
501,
12320,
7,
18,
11,
220,
16,
340,
9038,
727,
81,
988,
45,
1445,
991,
17140,
16,
11,
220,
15,
692,
25920,
1669,
3210,
7121,
16451,
4062,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSortFiles4Layer(t *testing.T) {
original := []string{
"abc/bbc/a.txt",
"abc/bbc",
"ccd",
}
expected := []string{
"abc/bbc",
"abc/bbc/a.txt",
"ccd",
}
sorted := registry.SortFiles4Layer(original)
assert.EqualValues(t, expected, sorted)
} | explode_data.jsonl/13170 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
10231,
10809,
19,
9188,
1155,
353,
8840,
836,
8,
1476,
197,
9889,
1669,
3056,
917,
515,
197,
197,
1,
13683,
3470,
8904,
14186,
3909,
756,
197,
197,
1,
13683,
3470,
8904,
756,
197,
197,
1,
95840,
756,
197,
532,
42400,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPoller(t *testing.T) {
tests := []struct {
name string
ref string
lastProcessedCommit string
expectedInfoCommit string
expectedInfoUpdate bool
}{
{
name: "default branch same commit",
ref: DefaultBranch,
lastProcessedCommit:... | explode_data.jsonl/82515 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1269
} | [
2830,
3393,
49207,
261,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
394,
914,
198,
197,
59504,
338,
914,
198,
197,
33096,
82535,
33441,
914,
198,
197,
42400,
1731,
33441,
220,
914,
198,
197,
42400,
1731,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHttpCheck_Run(t *testing.T) {
var endpointHit bool
var stubHttp http.HandlerFunc = func(rw http.ResponseWriter, r *http.Request) {
endpointHit = true
rw.WriteHeader(207)
}
server := httptest.NewServer(stubHttp)
check := &HttpCheck{Url: server.URL, ExpectedStatusCode: 200, Timeout: 3 * time.Second}
... | explode_data.jsonl/60031 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 228
} | [
2830,
3393,
2905,
3973,
84158,
1155,
353,
8840,
836,
8,
341,
2405,
14887,
19498,
1807,
271,
2405,
13633,
2905,
1758,
89164,
284,
2915,
2601,
86,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
6246,
2768,
19498,
284,
830,
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 Test_Hoverfly_GetMiddleware_ReturnsBinaryIfJustBinarySet(t *testing.T) {
RegisterTestingT(t)
unit := NewHoverflyWithConfiguration(&Configuration{})
unit.Cfg.Middleware.SetBinary("python")
binary, script, remote := unit.GetMiddleware()
Expect(binary).To(Equal("python"))
Expect(script).To(Equal(""))
Expect(... | explode_data.jsonl/45383 | {
"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,
2039,
1975,
21642,
13614,
24684,
53316,
82,
21338,
2679,
9952,
21338,
1649,
1155,
353,
8840,
836,
8,
341,
79096,
16451,
51,
1155,
692,
81189,
1669,
1532,
34379,
21642,
2354,
7688,
2099,
7688,
37790,
81189,
727,
4817,
1321,
116... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBestChainStateDeserializeErrors(t *testing.T) {
t.Parallel()
tests := []struct {
name string
serialized []byte
errCode ErrorCode
}{
{
name: "short read",
serialized: hexToBytes("0000"),
errCode: ErrChainStateShortRead,
},
}
for _, test := range tests {
// Ensure th... | explode_data.jsonl/18320 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 324
} | [
2830,
3393,
14470,
18837,
1397,
64465,
13877,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
197,
75277,
3056,
3782,
198,
197,
9859,
2078,
262,
60084,
198,
197,
59403... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStoreWeekdays(t *testing.T) {
type args struct {
days []models.Weekday
}
tests := []struct {
name string
args args
want string
}{
{"", args{[]models.Weekday{models.Monday, models.Wednesday, models.Friday}}, "1,3,5"},
{"", args{[]models.Weekday{models.Monday, models.Tuesday, models.Wednesday, mo... | explode_data.jsonl/74980 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 299
} | [
2830,
3393,
6093,
17053,
13778,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
2698,
942,
3056,
6507,
22404,
1225,
1292,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContinueOutOfTry(t *testing.T) {
const SCRIPT = `
function A() {
var r = 0;
for (var i = 0; i < 5; i++) {
try {
if (i > 1) {
continue;
}
} catch(e) {
return 99;
}
r++;
}
return r;
}
A();
`
testScript1(SCRIPT, intToValue(2), t)
} | explode_data.jsonl/75236 | {
"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,
23526,
31731,
21453,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
7527,
362,
368,
341,
197,
2405,
435,
284,
220,
15,
280,
197,
2023,
320,
947,
600,
284,
220,
15,
26,
600,
366,
220,
20,
26,
600,
2457,
341,
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 TestGetDaemonEndpointsForHostname7(t *testing.T) { // Invalid port - double form
dEndpt, err := GetDaemonEndpointsFromString("tcp:localhost:r4 tcp:localhost:2000")
assert.NotNil(t, err)
assert.True(t, strings.Contains(fmt.Sprint(err), portErr))
assert.Nil(t, dEndpt)
} | explode_data.jsonl/49949 | {
"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,
1949,
89177,
80786,
2461,
88839,
22,
1155,
353,
8840,
836,
8,
314,
442,
13882,
2635,
481,
1990,
1352,
198,
2698,
3727,
417,
11,
1848,
1669,
2126,
89177,
80786,
44491,
445,
27161,
25,
8301,
67359,
19,
28051,
25,
8301,
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... | 1 |
func TestStringFieldIsFailure(t *testing.T) {
metrics := []telegraf.Metric{
testutil.MustMetric(
"cpu",
map[string]string{},
map[string]interface{}{
"time_idle": "foo",
},
time.Now()),
}
compares := &health.Compares{
Field: "time_idle",
GT: addr(42.0),
}
result := compar... | explode_data.jsonl/65114 | {
"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,
703,
1877,
3872,
17507,
1155,
353,
8840,
836,
8,
972,
2109,
13468,
1669,
3056,
15410,
76039,
1321,
16340,
1666,
197,
18185,
1314,
50463,
54310,
7805,
298,
197,
1,
16475,
4723,
298,
19567,
14032,
30953,
6257,
1871,
298,
19567,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckRun_String(t *testing.T) {
v := CheckRun{
ID: Int64(0),
NodeID: String(""),
HeadSHA: String(""),
ExternalID: String(""),
URL: String(""),
HTMLURL: String(""),
DetailsURL: String(""),
Status: String(""),
Conclusion: String(""),
StartedAt: &Timest... | explode_data.jsonl/33221 | {
"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,
3973,
6727,
31777,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
4248,
6727,
515,
197,
29580,
25,
688,
1333,
21,
19,
7,
15,
1326,
197,
30217,
915,
25,
414,
923,
445,
4461,
197,
197,
12346,
33145,
25,
257,
923,
445,
4461,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_BasicParsing(t *testing.T) {
parser := New()
path := createTestFile("test.tf", `
locals {
proxy = var.cats_mother
}
variable "cats_mother" {
default = "boots"
}
provider "cats" {
}
resource "cats_cat" "mittens" {
name = "mittens"
special = true
}
resource "cats_kitten" "the-great-destroyer" {
na... | explode_data.jsonl/13303 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 882
} | [
2830,
3393,
1668,
5971,
68839,
1155,
353,
8840,
836,
8,
341,
55804,
1669,
1532,
2822,
26781,
1669,
1855,
2271,
1703,
445,
1944,
68994,
497,
1565,
271,
64130,
341,
197,
22803,
284,
762,
520,
1862,
717,
1575,
198,
630,
9813,
330,
37452,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHrefTargetBlank(t *testing.T) {
var tests = []string{
// internal link
"[foo](/bar/)\n",
"<p><a href=\"/bar/\">foo</a></p>\n",
"[foo](http://example.com)\n",
"<p><a href=\"http://example.com\" target=\"_blank\">foo</a></p>\n",
}
doTestsInlineParam(t, tests, 0, HTML_SAFELINK|HTML_HREF_TARGET_BLANK... | explode_data.jsonl/57355 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 154
} | [
2830,
3393,
64919,
6397,
22770,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
917,
515,
197,
197,
322,
5306,
2656,
198,
197,
197,
36864,
7975,
9533,
14,
2257,
14,
10699,
77,
756,
197,
197,
22476,
79,
1784,
64,
1801,
98185,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMustParseAddress(t *testing.T) {
successExamples := []struct{ address, scheme, expected string }{
{"1.2.3.4:56", "http", "1.2.3.4:56"},
{"[::1]:23", "http", "::1:23"},
{"4.5.6.7", "http", "4.5.6.7:http"},
}
for i, example := range successExamples {
t.Run(strconv.Itoa(i), func(t *testing.T) {
requ... | explode_data.jsonl/72008 | {
"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,
31776,
14463,
4286,
1155,
353,
8840,
836,
8,
341,
30553,
40381,
1669,
3056,
1235,
90,
2621,
11,
12859,
11,
3601,
914,
335,
515,
197,
197,
4913,
16,
13,
17,
13,
18,
13,
19,
25,
20,
21,
497,
330,
1254,
497,
330,
16,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSignWithSecretKey(t *testing.T) {
kp0 := newKeypair0()
kp1 := newKeypair1()
txSource := NewSimpleAccount(kp0.Address(), int64(9605939170639897))
tx1Source := NewSimpleAccount(kp0.Address(), int64(9605939170639897))
createAccount := CreateAccount{
Destination: "GCCOBXW2XQNUSL467IEILE6MMCNRR66SSVL4YQADU... | explode_data.jsonl/20698 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 649
} | [
2830,
3393,
7264,
2354,
19773,
1592,
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,
46237,
3608,
1669,
1532,
16374,
7365,
5969,
79,
15,
26979,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExportImportOtherAppAdminSuperTenant(t *testing.T) {
otherUsername := subscriber.UserName
otherPassword := subscriber.Password
adminUsername := superAdminUser
adminPassword := superAdminPassword
dev := apimClients[0]
prod := apimClients[1]
app := addApp(t, dev, otherUsername, otherPassword)
args := ... | explode_data.jsonl/42433 | {
"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,
16894,
11511,
11409,
2164,
7210,
19284,
71252,
1155,
353,
8840,
836,
8,
341,
197,
1575,
11115,
1669,
32115,
43672,
198,
197,
1575,
4876,
1669,
32115,
25690,
198,
64394,
11115,
1669,
2256,
7210,
1474,
198,
64394,
4876,
1669,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckCreate(t *testing.T) {
mocks, checkService := newCheckSvcStack()
ch := mocks.pipingCoordinator.taskCreatedChan()
check := &check.Deadman{}
check.SetTaskID(4)
cc := influxdb.CheckCreate{
Check: check,
Status: influxdb.Active,
}
err := checkService.CreateCheck(context.Background(), cc, 1)
if... | explode_data.jsonl/72193 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 321
} | [
2830,
3393,
3973,
4021,
1155,
353,
8840,
836,
8,
341,
2109,
25183,
11,
1779,
1860,
1669,
501,
3973,
92766,
4336,
741,
23049,
1669,
68909,
556,
46095,
64304,
15034,
11694,
46019,
2822,
25157,
1669,
609,
2028,
909,
3149,
1515,
16094,
25157,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMgetResults(t *testing.T) {
redisrv, err := miniredis.Run()
if err != nil {
t.Fatal("can not run miniredis")
}
defer redisrv.Close()
moper := NewMultiOperator(redisrv.Addr())
redisrv.Set("a", "a")
redisrv.Set("b", "b")
redisrv.Set("c", "c")
buf, err := moper.mgetResults(&MulOp{
op: "mget",
keys... | explode_data.jsonl/10919 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 421
} | [
2830,
3393,
44,
455,
9801,
1155,
353,
8840,
836,
8,
341,
197,
21748,
10553,
11,
1848,
1669,
1308,
2690,
285,
16708,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
445,
4814,
537,
1598,
1308,
2690,
285,
1138,
197,
532,
16867,
20870,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReconcileCertificatesInsert(t *testing.T) {
var reconciler *Reconciler
ctx, _, _, _, cancel := newTestSetup(t, func(r *Reconciler) {
reconciler = r
})
defer cancel()
r := Route("test-ns", "test-route")
certificate := newCerts([]string{"*.default.example.com"}, r)
if _, err := reconciler.reconcileCert... | explode_data.jsonl/64526 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 218
} | [
2830,
3393,
693,
40446,
457,
97140,
13780,
1155,
353,
8840,
836,
8,
341,
2405,
31445,
5769,
353,
693,
40446,
5769,
198,
20985,
11,
8358,
8358,
8358,
9121,
1669,
501,
2271,
21821,
1155,
11,
2915,
2601,
353,
693,
40446,
5769,
8,
341,
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... | 1 |
func TestIdentityMatches(t *testing.T) {
set := newStatefulSet(3)
pod := newStatefulSetPod(set, 1)
if !identityMatches(set, pod) {
t.Error("Newly created Pod has a bad identity")
}
pod.Name = "foo"
if identityMatches(set, pod) {
t.Error("identity matches for a Pod with the wrong name")
}
pod = newStatefulSe... | explode_data.jsonl/68368 | {
"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,
18558,
42470,
1155,
353,
8840,
836,
8,
341,
8196,
1669,
36848,
1262,
1649,
7,
18,
340,
3223,
347,
1669,
36848,
1262,
1649,
23527,
14171,
11,
220,
16,
340,
743,
753,
16912,
42470,
14171,
11,
7509,
8,
341,
197,
3244,
6141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetDefaultTimeStyle(t *testing.T) {
f := NewFile()
// Test set default time style on not exists worksheet.
assert.EqualError(t, f.setDefaultTimeStyle("SheetN", "", 0), "sheet SheetN is not exist")
} | explode_data.jsonl/36996 | {
"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,
1649,
3675,
1462,
2323,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
1532,
1703,
741,
197,
322,
3393,
738,
1638,
882,
1707,
389,
537,
6724,
36636,
624,
6948,
12808,
1454,
1155,
11,
282,
76830,
1462,
2323,
445,
10541,
45,
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 |
func TestNew(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
s1 := gset.New()
s1.Add("a", 2)
s2 := gset.New(true)
s2.Add("b", 3)
t.Assert(s1.Contains("a"), true)
})
} | explode_data.jsonl/34389 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 101
} | [
2830,
3393,
3564,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
1903,
16,
1669,
342,
746,
7121,
741,
197,
1903,
16,
1904,
445,
64,
497,
220,
17,
340,
197,
1903,
17,
1669,
342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInstall(t *testing.T) {
// Initialize cceventmgmt Mgr
// TODO cceventmgmt singleton should be refactored out of peer in the future. See CR 16549 for details.
cceventmgmt.Initialize()
scc := New(NewMockProvider(), mockAclProvider)
scc.support = &lscc.MockSupport{}
stub := shim.NewMockStub("lscc", scc)
r... | explode_data.jsonl/46555 | {
"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,
24690,
1155,
353,
8840,
836,
8,
341,
197,
322,
9008,
272,
346,
684,
12311,
2501,
386,
901,
198,
197,
322,
5343,
272,
346,
684,
12311,
2501,
36903,
1265,
387,
2053,
531,
3018,
700,
315,
14397,
304,
279,
3853,
13,
3496,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetSecurityToNoneWhenExplicitSettingToNone(t *testing.T) {
jaeger := v1.NewJaeger(types.NamespacedName{Name: "my-instance"})
jaeger.Spec.Ingress.Security = v1.IngressSecurityNoneExplicit
normalize(context.Background(), jaeger)
assert.Equal(t, v1.IngressSecurityNoneExplicit, jaeger.Spec.Ingress.Security)
} | explode_data.jsonl/21853 | {
"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,
1649,
15352,
1249,
4064,
4498,
98923,
15400,
1249,
4064,
1155,
353,
8840,
836,
8,
341,
197,
5580,
1878,
1669,
348,
16,
7121,
52445,
1878,
52613,
98932,
68552,
675,
63121,
25,
330,
2408,
73655,
23625,
197,
5580,
1878,
36473,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPodUpdateEphemeralContainers(t *testing.T) {
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.EphemeralContainers, true)()
_, s, closeFn := framework.RunAnAPIServer(nil)
defer closeFn()
ns := framework.CreateTestingNamespace("pod-update-ephemeral-containers", ... | explode_data.jsonl/73845 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2663
} | [
2830,
3393,
23527,
4289,
36,
59941,
3253,
74632,
1155,
353,
8840,
836,
8,
341,
16867,
4565,
70,
266,
57824,
287,
4202,
13859,
42318,
16014,
2271,
1155,
11,
4094,
12753,
13275,
13859,
42318,
11,
4419,
5142,
59941,
3253,
74632,
11,
830,
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 TestWithOrchestratorParameters(t *testing.T) {
testCases := []struct {
name string
bundle *image.AppImage
expected map[string]string
}{
{
name: "AppImage with orchestrator params",
bundle: prepareBundle(withParameter(internal.ParameterOrchestratorName, "string"), withParameter(internal.Para... | explode_data.jsonl/17702 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 404
} | [
2830,
3393,
2354,
2195,
331,
15111,
850,
9706,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
2233,
4206,
256,
353,
1805,
5105,
1906,
198,
197,
42400,
2415,
14032,
30953,
198,
197,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStepVotes(t *testing.T) {
set := sortedset.New()
hash := []byte("this is a mock message")
k1 := genKeys(&set)
k2 := genKeys(&set)
subset := set
//inserting a third key in the set to better test packing and unpacking
genKeys(&set)
bitset := set.Bits(subset)
s, err := bls.Sign(k1.BLSSecretKey, k1.BLS... | explode_data.jsonl/62244 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 407
} | [
2830,
3393,
8304,
75535,
1155,
353,
8840,
836,
8,
341,
8196,
1669,
10615,
746,
7121,
2822,
50333,
1669,
3056,
3782,
445,
574,
374,
264,
7860,
1943,
1138,
16463,
16,
1669,
4081,
8850,
2099,
746,
340,
16463,
17,
1669,
4081,
8850,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Handler_PipeInPipeGroupReturnsError_ErrorFallthrougHandler(t *testing.T) {
mockError := errors.New("some error appeared in pipe")
var pipe Pipe = func(v reflect.Value, args ...interface{}) (*reflect.Value, error) {
return nil, mockError
}
h, err := New(PipeGroup{pipe}, mockStruct{}, converterMock)
as... | explode_data.jsonl/45773 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 158
} | [
2830,
3393,
41879,
1088,
3444,
641,
34077,
2808,
16446,
1454,
28651,
49772,
339,
581,
70,
3050,
1155,
353,
8840,
836,
8,
341,
77333,
1454,
1669,
5975,
7121,
445,
14689,
1465,
9723,
304,
13647,
5130,
2405,
13647,
27805,
284,
2915,
3747,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestService_NewOrganization(t *testing.T) {
type fields struct {
OrganizationsStore chronograf.OrganizationsStore
UsersStore chronograf.UsersStore
Logger chronograf.Logger
}
type args struct {
w *httptest.ResponseRecorder
r *http.Request
org *organizationRequest
user *ch... | explode_data.jsonl/13414 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3018
} | [
2830,
3393,
1860,
39582,
41574,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
197,
23227,
8040,
6093,
25986,
25058,
8382,
8443,
8040,
6093,
198,
197,
197,
7137,
6093,
260,
25986,
25058,
36782,
6093,
198,
197,
55861,
1797,
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 TestHTTP(t *testing.T) {
reset, err := GetHTTP()
if err != nil {
t.Fatal(err)
}
t.Cleanup(func() {
if reset == "" {
OffHTTP()
} else {
OnHTTP(reset)
}
})
address := "127.0.0.1:1080"
err = OnHTTP(address)
if err != nil {
t.Fatal(err)
}
got, err := GetHTTP()
if err != nil {
t.Fatal(err)... | explode_data.jsonl/45936 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 283
} | [
2830,
3393,
9230,
1155,
353,
8840,
836,
8,
341,
70343,
11,
1848,
1669,
2126,
9230,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
3244,
727,
60639,
18552,
368,
341,
197,
743,
7585,
621,
1591,
341,
298,
197,
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... | 2 |
func TestLinkRoutesAdd(t *testing.T) {
mockNetLinkOps := new(mocks.NetLinkOps)
mockLink := new(netlink_mocks.Link)
// below is defined in net_linux.go
netLinkOps = mockNetLinkOps
tests := []struct {
desc string
inputLink netlink.Link
inputGwIP net.IP
input... | explode_data.jsonl/30957 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1063
} | [
2830,
3393,
3939,
26653,
2212,
1155,
353,
8840,
836,
8,
341,
77333,
6954,
3939,
38904,
1669,
501,
1255,
25183,
16993,
3939,
38904,
340,
77333,
3939,
1669,
501,
30723,
2080,
717,
25183,
22534,
340,
197,
322,
3685,
374,
4512,
304,
4179,
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 TestCheckNoComment(t *testing.T) {
instOptions, err := testutil.GetOptions()
if err != nil {
t.Errorf("Environment Error: %v", err)
}
inst, err := aetest.NewInstance(&instOptions)
if err != nil {
t.Fatalf("Failed to create instance: %v", err)
}
defer inst.Close()
req, err := inst.NewRequest("GET", "... | explode_data.jsonl/31108 | {
"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,
3973,
2753,
10677,
1155,
353,
8840,
836,
8,
1476,
88656,
3798,
11,
1848,
1669,
1273,
1314,
2234,
3798,
741,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
12723,
4600,
25,
1018,
85,
497,
1848,
340,
197,
630,
88656,
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 TestStateSetCmd(t *testing.T) {
tmpHome := "/tmp/TestStateSetCmd"
tmpConfig := path.Join(tmpHome, ".horcrux")
chainid := "horcrux-1"
err := os.Setenv("HOME", tmpHome)
require.NoError(t, err)
err = os.MkdirAll(tmpHome, 0777)
require.NoError(t, err)
cmd := initCmd()
cmd.SetOutput(ioutil.Discard)
cmd.SetA... | explode_data.jsonl/10940 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 931
} | [
2830,
3393,
1397,
1649,
15613,
1155,
353,
8840,
836,
8,
341,
20082,
7623,
1669,
3521,
5173,
80527,
1397,
1649,
15613,
698,
20082,
2648,
1669,
1815,
22363,
10368,
7623,
11,
5933,
19530,
5082,
2200,
1138,
197,
8819,
307,
1669,
330,
19530,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCountdown(t *testing.T) {
t.Run("prints 3 to Go!", func(t *testing.T) {
buffer := &bytes.Buffer{}
Countdown(buffer, &CountdownOperationsSpy{})
got := buffer.String()
want := `3
2
1
Go!`
if got != want {
t.Errorf("got %q want %q", got, want)
}
... | explode_data.jsonl/17768 | {
"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,
2507,
2923,
1155,
353,
8840,
836,
8,
1476,
262,
259,
16708,
445,
25738,
220,
18,
311,
5994,
18789,
2915,
1155,
353,
8840,
836,
8,
341,
286,
4147,
1669,
609,
9651,
22622,
16094,
286,
86386,
12584,
11,
609,
2507,
2923,
35120... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImagePullSchema1(t *testing.T) {
client, err := newClient(t, address)
if err != nil {
t.Fatal(err)
}
defer client.Close()
ctx, cancel := testContext()
defer cancel()
schema1TestImage := "gcr.io/google_containers/pause:3.0@sha256:0d093c962a6c2dd8bb8727b661e2b5f13e9df884af9945b4cc7088d9350cd3ee"
_, er... | explode_data.jsonl/37735 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 197
} | [
2830,
3393,
1906,
36068,
8632,
16,
1155,
353,
8840,
836,
8,
341,
25291,
11,
1848,
1669,
501,
2959,
1155,
11,
2621,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
2943,
10421,
2822,
20985,
11,
9121,
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... | 3 |
func TestNumberOfRoundsNotInt(t *testing.T) {
ok, err := CheckPassword("password", "$6$rounds=abc$aFr56HjK3DrB8t3S$zhPQiS85cgBlNhUKKE6n/AHMlpqrvYSnSL3fEVkK0yHFQ.oFFAd8D4OhPAy18K5U61Z2eBhxQXExGU/eknXlY1")
assert.EqualError(t, err, "SHA512 iterations is not numeric (abc)")
assert.False(t, ok)
} | explode_data.jsonl/40194 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 151
} | [
2830,
3393,
40619,
49,
3095,
2623,
1072,
1155,
353,
8840,
836,
8,
341,
59268,
11,
1848,
1669,
4248,
4876,
445,
3833,
497,
5201,
21,
3,
1049,
82,
28,
13683,
39562,
22560,
20,
21,
39,
73,
42,
18,
8847,
33,
23,
83,
18,
50,
3,
23815... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFiles_Share(t *testing.T) {
setup()
defer teardown()
mux.HandleFunc("/v2/files/share", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "POST")
testHeader(t, r, "Content-Type", "application/x-www-form-urlencoded")
fmt.Fprintln(w, `{"status":"OK"}`)
})
ctx := context.Background()
er... | explode_data.jsonl/48325 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 345
} | [
2830,
3393,
10809,
36578,
546,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
85,
17,
33220,
33914,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
18185,
3523,
1155,
11,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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(t *testing.T) {
engine := stats.NewEngine("datadog.test", nil)
a := uint32(0)
b := uint32(0)
c := uint32(0)
addr, closer := startTestServer(t, HandlerFunc(func(m Metric, _ net.Addr) {
switch m.Name {
case "datadog.test.A":
atomic.AddUint32(&a, uint32(m.Value))
case "datadog.test.B":
... | explode_data.jsonl/44299 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 545
} | [
2830,
3393,
5475,
1155,
353,
8840,
836,
8,
341,
80118,
1669,
10472,
7121,
4571,
445,
5911,
329,
538,
5958,
497,
2092,
692,
11323,
1669,
2622,
18,
17,
7,
15,
340,
2233,
1669,
2622,
18,
17,
7,
15,
340,
1444,
1669,
2622,
18,
17,
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... | 4 |
func TestMove(t *testing.T) {
move, moveErr := pokego.GetMove("hyper-BeAm")
if moveErr != nil {
t.Error("pokego.Move(\"hyper-BeAm\") returned an error. Check options URL or JSON conversion.")
}
if move.Accuracy == 0 && move.Name == "" {
t.Error("Move not properly set, but no error was thrown")
}
} | explode_data.jsonl/47738 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 112
} | [
2830,
3393,
9860,
1155,
353,
8840,
836,
8,
341,
49288,
11,
3271,
7747,
1669,
51551,
3346,
2234,
9860,
445,
68192,
12,
3430,
6091,
5130,
743,
3271,
7747,
961,
2092,
341,
197,
3244,
6141,
445,
48098,
3346,
31195,
36014,
68192,
12,
3430,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientWithoutURL(t *testing.T) {
client, err := NewClient()
if err != nil {
t.Fatal(err)
}
// Two things should happen here:
// 1. The client starts sniffing the cluster on DefaultURL
// 2. The sniffing process should find (at least) one node in the cluster, i.e. the DefaultURL
if len(client.conns) ==... | explode_data.jsonl/37990 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 218
} | [
2830,
3393,
2959,
26040,
3144,
1155,
353,
8840,
836,
8,
341,
25291,
11,
1848,
1669,
1532,
2959,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
197,
322,
9043,
2513,
1265,
3537,
1588,
510,
197,
322,
220,
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... | 5 |
func TestReceipt(t *testing.T) {
t.Parallel()
var (
good, _ = ParseHash("0x97b25b137505e573d105be57dd4d3f7ddeb69b2c29608c86f055c5266a81c272")
bad, _ = ParseHash("0x027aa484de0a14d84f91c4e355f5aeb966c91fd9a144a68b2a704ad882b9f52d")
ugly, _ = ParseHash("0xf00ba4f00ba4f00ba4f00ba4f00ba4f00ba4f00ba4f00ba4f00ba4f00... | explode_data.jsonl/80658 | {
"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,
67461,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2405,
2399,
197,
3174,
1386,
11,
716,
284,
14775,
6370,
445,
15,
87,
24,
22,
65,
17,
20,
65,
16,
18,
22,
20,
15,
20,
68,
20,
22,
18,
67,
16,
15,
20,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClaims_Set(t *testing.T) {
type fields struct {
Claims jose.Claims
ExtraClaims map[string]interface{}
}
type args struct {
key string
value interface{}
}
tests := []struct {
name string
fields fields
args args
want *Claims
}{
{"ok nil", fields{jose.Claims{}, nil}, args{"key... | explode_data.jsonl/36563 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 453
} | [
2830,
3393,
51133,
14812,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
197,
51133,
414,
89644,
78625,
198,
197,
197,
11612,
51133,
2415,
14032,
31344,
16094,
197,
532,
13158,
2827,
2036,
341,
197,
23634,
256,
914,
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... | 2 |
func TestLaunchRequestNoDebug_BadStatus(t *testing.T) {
runTest(t, "issue1101", func(client *daptest.Client, fixture protest.Fixture) {
runNoDebugDebugSession(t, client, func() {
client.LaunchRequestWithArgs(map[string]interface{}{
"noDebug": true,
"mode": "debug",
"program": fixture.Source,
"o... | explode_data.jsonl/17348 | {
"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,
32067,
1900,
2753,
7939,
1668,
329,
2522,
1155,
353,
8840,
836,
8,
341,
56742,
2271,
1155,
11,
330,
11159,
16,
16,
15,
16,
497,
2915,
12805,
353,
91294,
1944,
11716,
11,
12507,
8665,
991,
12735,
8,
341,
197,
56742,
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,
1,
1,
1,
1,
1,
1... | 1 |
func TestPatch(t *testing.T) {
hf := New("/test")
hf.RegisterCreateHandler(static.New("create"))
hf.RegisterGetHandler(static.New("get"))
hf.RegisterDeleteHandler(static.New("delete"))
hf.RegisterUpdateHandler(static.New("update"))
hf.RegisterListHandler(static.New("list"))
hf.RegisterPatchHandler(static.New("pa... | explode_data.jsonl/10017 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 250
} | [
2830,
3393,
43622,
1155,
353,
8840,
836,
8,
341,
9598,
69,
1669,
1532,
4283,
1944,
1138,
9598,
69,
19983,
4021,
3050,
27610,
7121,
445,
3182,
5455,
9598,
69,
19983,
1949,
3050,
27610,
7121,
445,
455,
5455,
9598,
69,
19983,
6435,
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... | 3 |
func TestFilteredVarBinary(t *testing.T) {
if testing.Short() {
t.Skip()
}
execStatements(t, []string{
"create table t1(id1 int, val varbinary(128), primary key(id1))",
})
defer execStatements(t, []string{
"drop table t1",
})
engine.se.Reload(context.Background())
filter := &binlogdatapb.Filter{
Rules... | explode_data.jsonl/10405 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 944
} | [
2830,
3393,
67310,
3962,
21338,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
741,
197,
630,
67328,
93122,
1155,
11,
3056,
917,
515,
197,
197,
1,
3182,
1965,
259,
16,
3724,
16,
526,
11,
1044,
762,
25891... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOption_WithHeader(t *testing.T) {
client, err := NewClient("test", "http://httpbin.org/")
if err != nil {
t.Fatal(err)
}
client.CommonOpts = append(client.CommonOpts, WithHeader("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari... | explode_data.jsonl/68690 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 239
} | [
2830,
3393,
5341,
62,
2354,
4047,
1155,
353,
8840,
836,
8,
341,
25291,
11,
1848,
1669,
1532,
2959,
445,
1944,
497,
330,
1254,
1110,
1254,
6863,
2659,
53006,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
25291,
1601... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVersionCheck(t *testing.T) {
tests := []struct {
description string
commands util.Command
kustomizations map[string]string
shouldErr bool
error error
out string
}{
{
description: "Both kpt and kustomize versions are good",
commands: testutil.
CmdRunOu... | explode_data.jsonl/9529 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2054
} | [
2830,
3393,
5637,
3973,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
42407,
262,
914,
198,
197,
197,
24270,
981,
4094,
12714,
198,
197,
16463,
1450,
8040,
2415,
14032,
30953,
198,
197,
197,
5445,
7747,
414,
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... | 2 |
func TestApiV2DevAuthGetLimit(t *testing.T) {
t.Parallel()
// enforce specific field naming in errors returned by API
updateRestErrorFieldName()
tcases := []struct {
limit string
daLimit *model.Limit
daErr error
code int
body string
}{
{
limit: "max_devices",
daLimit: &model.Limit{
Nam... | explode_data.jsonl/638 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 553
} | [
2830,
3393,
6563,
53,
17,
14592,
5087,
1949,
16527,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
28162,
3151,
2070,
34948,
304,
5975,
5927,
553,
5333,
198,
27175,
12416,
1454,
51241,
2822,
3244,
23910,
1669,
3056,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCallPanic(t *testing.T) {
type t0 interface {
W()
w()
}
type T1 interface {
Y()
y()
}
type T2 struct {
T1
t0
}
type T struct {
t0 // 0
T1 // 1
NamedT0 t0 // 2
NamedT1 T1 // 3
NamedT2 T2 // 4
namedT0 t0 // 5
namedT1 T1 // 6
namedT2 T2 // 7
}
ok := func(f func()) { f() }
b... | explode_data.jsonl/29588 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1335
} | [
2830,
3393,
7220,
47,
31270,
1155,
353,
8840,
836,
8,
341,
13158,
259,
15,
3749,
341,
197,
17300,
741,
197,
6692,
741,
197,
532,
13158,
350,
16,
3749,
341,
197,
65322,
741,
197,
14522,
741,
197,
532,
13158,
350,
17,
2036,
341,
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 TestPRead(t *testing.T) {
ctx := contexttest.Context(t)
fd, cleanup, err := newFileFD(ctx, 0644)
if err != nil {
t.Fatal(err)
}
defer cleanup()
// Write 100 sequences of 'gVisor is awesome'.
data := bytes.Repeat([]byte("gVisor is awsome"), 100)
n, err := fd.Write(ctx, usermem.BytesIOSequence(data), vfs.... | explode_data.jsonl/82624 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 706
} | [
2830,
3393,
47,
4418,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
1944,
9328,
1155,
340,
61721,
11,
21290,
11,
1848,
1669,
501,
1703,
14596,
7502,
11,
220,
15,
21,
19,
19,
340,
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... | 7 |
func TestContinueLoop(t *testing.T) {
const SCRIPT = `
function A() {
var r = 0;
for (var i = 0; i < 5; i++) {
if (i > 1) {
continue;
}
r++;
}
return r;
}
A();
`
testScript1(SCRIPT, intToValue(2), t)
} | explode_data.jsonl/75235 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 118
} | [
2830,
3393,
23526,
14620,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
7527,
362,
368,
341,
197,
2405,
435,
284,
220,
15,
280,
197,
2023,
320,
947,
600,
284,
220,
15,
26,
600,
366,
220,
20,
26,
600,
2457,
341,
298,
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... | 1 |
func TestFetchIntoObjectPool_CollectLogStatistics(t *testing.T) {
cfg, repo, _ := testcfg.BuildWithRepo(t)
testhelper.BuildGitalyHooks(t, cfg)
locator := config.NewLocator(cfg)
logBuffer := &bytes.Buffer{}
logger := &logrus.Logger{Out: logBuffer, Formatter: &logrus.JSONFormatter{}, Level: logrus.InfoLevel}
serv... | explode_data.jsonl/1518 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 608
} | [
2830,
3393,
20714,
26591,
1190,
10551,
920,
24605,
2201,
38599,
1155,
353,
8840,
836,
8,
341,
50286,
11,
15867,
11,
716,
1669,
1273,
14072,
25212,
2354,
25243,
1155,
692,
18185,
18764,
25212,
38,
2174,
88,
67769,
1155,
11,
13286,
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,
1... | 1 |
func TestHandshakeClientECDHERSAAES128CBCSHA256(t *testing.T) {
test := &clientTest{
name: "ECDHE-RSA-AES128-SHA256",
args: []string{"-cipher", "ECDHE-RSA-AES128-SHA256"},
}
runClientTestTLS12(t, test)
} | explode_data.jsonl/27698 | {
"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,
2314,
29661,
2959,
36,
6484,
3012,
50,
6029,
1570,
16,
17,
23,
69972,
33145,
17,
20,
21,
1155,
353,
8840,
836,
8,
341,
18185,
1669,
609,
2972,
2271,
515,
197,
11609,
25,
330,
36,
6484,
1799,
10911,
7778,
6691,
1570,
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 TestRESTClientExternal(t *testing.T) {
tc := restClientTestCase{
desiredMetricValues: PodMetricsInfo{
"external-val-0": {Value: 10000}, "external-val-1": {Value: 20000}, "external-val-2": {Value: 10000},
},
metricSelector: &metav1.LabelSelector{MatchLabels: map[string]string{"label": "value"}},
m... | explode_data.jsonl/64899 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 198
} | [
2830,
3393,
38307,
2959,
25913,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
2732,
2959,
16458,
515,
197,
52912,
2690,
54310,
6227,
25,
16821,
27328,
1731,
515,
298,
197,
1,
20921,
45154,
12,
15,
788,
314,
1130,
25,
220,
16,
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 TestAmendForColumnChange(t *testing.T) {
store, clean := createMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk2 := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk2.MustExec("use test")
tk.MustExec("set tidb_enable_amend_pessimistic_txn = ON;")
tk2.MustExec("drop table if ... | explode_data.jsonl/12507 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1236
} | [
2830,
3393,
6091,
408,
2461,
2933,
4072,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1855,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUUID3Validation(t *testing.T) {
tests := []struct {
param string
expected bool
}{
{"", false},
{"412452646", false},
{"xxxa987fbc9-4bed-3078-cf07-9141ba07c9f3", false},
{"a987fbc9-4bed-4078-8f07-9141ba07c9f3", false},
{"a987fbc9-4bed-3078-cf07-9141ba07c9f3", true},
}
validate := New()
f... | explode_data.jsonl/77269 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 383
} | [
2830,
3393,
24754,
18,
13799,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
36037,
262,
914,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
4913,
497,
895,
1583,
197,
197,
4913,
19,
16,
17,
19,
20,
17,
21,
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 TestMergeTrafficPolicy(t *testing.T) {
cases := []struct {
name string
original *networking.TrafficPolicy
subset *networking.TrafficPolicy
port *model.Port
expected *networking.TrafficPolicy
}{
{
name: "all nil policies",
original: nil,
subset: nil,
port: nil,
expec... | explode_data.jsonl/44335 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3213
} | [
2830,
3393,
52096,
87229,
13825,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
197,
9889,
353,
17511,
287,
836,
956,
20615,
13825,
198,
197,
28624,
746,
256,
353,
17511,
287,
836,
956... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetLatestDigest_CurrLatestIsNotLatest(t *testing.T) {
cake := &Cake{
Repo: "test/repo",
LatestDigest: "TestCurrentDigest",
LatestDigestTime: time.Date(2020, time.May, 10, 0, 0, 0, 0, *&time.UTC),
PreviousDigest: "TestPreviousDigest",
PreviousDigestTime: time.Date(2020, time... | explode_data.jsonl/49461 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 773
} | [
2830,
3393,
1949,
31992,
45217,
920,
8027,
31992,
3872,
2623,
31992,
1155,
353,
8840,
836,
8,
341,
1444,
726,
1669,
609,
61090,
515,
197,
197,
25243,
25,
2290,
330,
1944,
10758,
5368,
756,
197,
15070,
13893,
45217,
25,
981,
330,
2271,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogW(t *testing.T) {
D := logw([]interface{}{"i", "like", "a", "dog"})
if len(D) != 2 || D[0].Key != "i" || D[0].Value != "like" || D[1].Key != "a" || D[1].Value != "dog" {
t.Fatalf("logw out put should be ' {i like} {a dog}'")
}
D = logw([]interface{}{"i", "like", "dog"})
if len(D) != 1 || D[0].Key != ... | explode_data.jsonl/1355 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 191
} | [
2830,
3393,
2201,
54,
1155,
353,
8840,
836,
8,
341,
10957,
1669,
1487,
86,
10556,
4970,
6257,
4913,
72,
497,
330,
4803,
497,
330,
64,
497,
330,
18457,
23625,
743,
2422,
5432,
8,
961,
220,
17,
1369,
422,
58,
15,
936,
1592,
961,
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... | 9 |
func TestValidateToken(t *testing.T) {
secret := model.NewRandomBase32String(MFA_SECRET_SIZE)
token := dgoogauth.ComputeCode(secret, time.Now().UTC().Unix()/30)
config := model.Config{}
config.SetDefaults()
config.ServiceSettings.EnableMultifactorAuthentication = model.NewBool(true)
configService := testutils.St... | explode_data.jsonl/64312 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 575
} | [
2830,
3393,
17926,
3323,
1155,
353,
8840,
836,
8,
341,
197,
20474,
1669,
1614,
7121,
13999,
3978,
18,
17,
703,
3189,
3627,
31408,
4098,
340,
43947,
1669,
294,
39858,
3242,
89237,
2078,
75862,
11,
882,
13244,
1005,
21183,
1005,
55832,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMistake_043(t *testing.T) {
wrong043()
right043()
right043_1()
right043_2()
right043_3()
} | explode_data.jsonl/21307 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 47
} | [
2830,
3393,
44,
380,
726,
62,
15,
19,
18,
1155,
353,
8840,
836,
8,
341,
6692,
14347,
15,
19,
18,
741,
47921,
15,
19,
18,
741,
47921,
15,
19,
18,
62,
16,
741,
47921,
15,
19,
18,
62,
17,
741,
47921,
15,
19,
18,
62,
18,
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 |
func TestPoolNew(t *testing.T) {
// disable GC so we can control when it happens.
defer debug.SetGCPercent(debug.SetGCPercent(-1))
i := 0
p := Pool{
New: func() interface{} {
i++
return i
},
}
if v := p.Get(); v != 1 {
t.Fatalf("got %v; want 1", v)
}
if v := p.Get(); v != 2 {
t.Fatalf("got %v; wa... | explode_data.jsonl/51809 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 265
} | [
2830,
3393,
10551,
3564,
1155,
353,
8840,
836,
8,
341,
197,
322,
11156,
22381,
773,
582,
646,
2524,
979,
432,
8573,
624,
16867,
7390,
4202,
22863,
32010,
42154,
4202,
22863,
32010,
4080,
16,
4390,
8230,
1669,
220,
15,
198,
3223,
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... | 1 |
func TestFrameDirty(t *testing.T) {
f := NewFrame(nil)
if f.Dirty() != false {
t.Errorf("The initial dirty should be false.")
}
f.TurnOnDirty()
if f.Dirty() != true {
t.Errorf("This should be true.")
}
f.TurnOffDirty()
if f.Dirty() != false {
t.Errorf("This should be false.")
}
} | explode_data.jsonl/52245 | {
"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,
4369,
36485,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
1532,
4369,
27907,
340,
743,
282,
909,
16531,
368,
961,
895,
341,
197,
3244,
13080,
445,
785,
2856,
18595,
1265,
387,
895,
13053,
197,
532,
1166,
836,
399,
1925,
36485... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransportRangeAndGzip(t *testing.T) {
defer afterTest(t)
reqc := make(chan *Request, 1)
ts := httptest.NewServer(HandlerFunc(func(w ResponseWriter, r *Request) {
reqc <- r
}))
defer ts.Close()
req, _ := NewRequest("GET", ts.URL, nil)
req.Header.Set("Range", "bytes=7-11")
res, err := DefaultClient.Do... | explode_data.jsonl/4921 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 280
} | [
2830,
3393,
27560,
6046,
3036,
38,
9964,
1155,
353,
8840,
836,
8,
341,
16867,
1283,
2271,
1155,
340,
24395,
66,
1669,
1281,
35190,
353,
1900,
11,
220,
16,
340,
57441,
1669,
54320,
70334,
7121,
5475,
7,
3050,
9626,
18552,
3622,
5949,
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 TestTypeSystem_FieldsArgsMustBeProperlyNamed_RejectsFieldArgWithInvalidNames(t *testing.T) {
_, err := schemaWithFieldType(graphql.NewObject(graphql.ObjectConfig{
Name: "SomeObject",
Fields: graphql.Fields{
"badField": &graphql.Field{
Type: graphql.String,
Args: graphql.FieldConfigArgument{
"b... | explode_data.jsonl/79148 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
929,
2320,
1400,
6907,
4117,
31776,
3430,
1336,
712,
398,
15810,
50693,
583,
82,
1877,
2735,
2354,
7928,
7980,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
10802,
2354,
63733,
24312,
1470,
7121,
1190,
24312,
1470,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeployWrongNsc(t *testing.T) {
g := NewWithT(t)
if testing.Short() {
t.Skip("Skip, please run without -short")
return
}
k8s, err := kubetest.NewK8s(g, true)
defer k8s.Cleanup()
g.Expect(err).To(BeNil())
nodes, err := kubetest.SetupNodes(k8s, 1, defaultTimeout)
g.Expect(err).To(BeNil())
defer k... | explode_data.jsonl/59943 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 363
} | [
2830,
3393,
69464,
29185,
45,
2388,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
2354,
51,
1155,
692,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
35134,
11,
4486,
1598,
2041,
481,
8676,
1138,
197,
853,
198,
197,
630,
16463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPerformRequestWithLogger(t *testing.T) {
var w bytes.Buffer
out := log.New(&w, "LOGGER ", log.LstdFlags)
client, err := NewClient(SetInfoLog(out), SetSniff(false))
if err != nil {
t.Fatal(err)
}
res, err := client.PerformRequest(context.TODO(), "GET", "/", nil, nil)
if err != nil {
t.Fatal(err)
}... | explode_data.jsonl/38019 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 410
} | [
2830,
3393,
46951,
1900,
2354,
7395,
1155,
353,
8840,
836,
8,
341,
2405,
289,
5820,
22622,
198,
13967,
1669,
1487,
7121,
2099,
86,
11,
330,
82400,
3670,
1487,
1214,
1834,
9195,
692,
25291,
11,
1848,
1669,
1532,
2959,
52474,
1731,
2201,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestForAllExpiredFlowRecordsDo(t *testing.T) {
messageChan := make(chan *entities.Message)
input := AggregationInput{
MessageChan: messageChan,
WorkerNum: 2,
CorrelateFields: fields,
ActiveExpiryTimeout: testActiveExpiry,
InactiveExpiryTimeout: testInactiveExpiry,
}
ap, ... | explode_data.jsonl/8708 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1391
} | [
2830,
3393,
2461,
2403,
54349,
18878,
25876,
5404,
1155,
353,
8840,
836,
8,
341,
24753,
46019,
1669,
1281,
35190,
353,
10499,
8472,
340,
22427,
1669,
4598,
34442,
2505,
515,
197,
46733,
46019,
25,
1843,
1943,
46019,
345,
197,
197,
21936,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExtractOperatingSystemDistributionFromKubeEnv(t *testing.T) {
type testCase struct {
name string
kubeEnv string
expectedOperatingSystemDistribution OperatingSystemDistribution
}
testCases := []testCase{
{
name: "cos",
kubeEnv: "ENABLE... | explode_data.jsonl/50925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2945
} | [
2830,
3393,
28959,
58147,
2320,
62377,
3830,
42,
3760,
14359,
1155,
353,
8840,
836,
8,
341,
13158,
54452,
2036,
341,
197,
11609,
1383,
914,
198,
197,
16463,
3760,
14359,
6526,
914,
198,
197,
42400,
58147,
2320,
62377,
35133,
2320,
62377,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetConfigDefaultValues(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Etag", "sample-etag")
fmt.Fprintln(w, `{}`)
}))
defer ts.Close()
if err := os.Setenv("GCE_METADATA_HOST", strings.Trim(ts.URL, "http://")); err != nil {
t.F... | explode_data.jsonl/4156 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 699
} | [
2830,
3393,
1649,
2648,
3675,
6227,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
6692,
15753,
1005,
1649,
445,
36,
4578,
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 TestDataAvailableOnlyAfterCommit(t *testing.T) {
db, delete := openTestDB(t, nil)
defer func() {
testutil.Ok(t, db.Close())
delete()
}()
app := db.Appender()
_, err := app.Add(labels.FromStrings("foo", "bar"), 0, 0)
testutil.Ok(t, err)
querier, err := db.Querier(0, 1)
testutil.Ok(t, err)
seriesSet ... | explode_data.jsonl/64360 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 314
} | [
2830,
93200,
16485,
7308,
6025,
33441,
1155,
353,
8840,
836,
8,
341,
20939,
11,
3698,
1669,
1787,
2271,
3506,
1155,
11,
2092,
340,
16867,
2915,
368,
341,
197,
18185,
1314,
54282,
1155,
11,
2927,
10421,
2398,
197,
15618,
741,
197,
66816,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransactionFetcherUnderpricedDedup(t *testing.T) {
testTransactionFetcherParallel(t, txFetcherTest{
init: func() *TxFetcher {
return NewTxFetcher(
func(common.Hash) bool { return false },
func(txs []*types.Transaction) []error {
errs := make([]error, len(txs))
for i := 0; i < len(errs);... | explode_data.jsonl/52223 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 540
} | [
2830,
3393,
8070,
97492,
16250,
649,
7572,
35,
291,
454,
1155,
353,
8840,
836,
8,
341,
18185,
8070,
97492,
16547,
1155,
11,
259,
9770,
2995,
261,
2271,
515,
197,
28248,
25,
2915,
368,
353,
51,
9770,
2995,
261,
341,
298,
853,
1532,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSpawnTasksParse_NoArgs(t *testing.T) {
Convey(`Make sure that Parse works with no arguments.`, t, func() {
c := spawnTasksRun{}
c.Init(auth.Options{})
err := c.Parse([]string{})
So(err, ShouldErrLike, "must provide -server")
})
} | explode_data.jsonl/27124 | {
"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,
41005,
25449,
14463,
36989,
4117,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
5809,
8078,
2704,
429,
14775,
4278,
448,
902,
5977,
13,
7808,
259,
11,
2915,
368,
341,
197,
1444,
1669,
18042,
25449,
6727,
16094,
197,
1444,
26849... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMySQL(t *testing.T) {
dsn := "test-mysql"
db, mock, err := sqlmock.NewWithDSN(dsn)
if err != nil {
t.Fatal(err)
}
defer db.Close()
mockPostgreSQL(mock, errors.New("syntax error"))
mockMySQL(mock, nil)
subseg, err := capturePing(dsn)
if err != nil {
t.Fatal(err)
}
assert.NoError(t, mock.Expectat... | explode_data.jsonl/69092 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 323
} | [
2830,
3393,
59224,
1155,
353,
8840,
836,
8,
341,
2698,
9613,
1669,
330,
1944,
1448,
14869,
698,
20939,
11,
7860,
11,
1848,
1669,
5704,
16712,
7121,
2354,
5936,
45,
1500,
9613,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRecordSetChangesIntegration(t *testing.T) {
c := client()
zones, err := c.ZonesListAll(ListFilter{})
if err != nil {
t.Error(err)
}
changes, err := c.RecordSetChanges(zones[0].ID, ListFilter{})
if err != nil {
t.Error(err)
}
if len(changes.RecordSetChanges) <= 0 {
t.Error("Expected RecordSetCha... | explode_data.jsonl/12127 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 135
} | [
2830,
3393,
6471,
1649,
11317,
52464,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2943,
741,
20832,
3154,
11,
1848,
1669,
272,
13476,
3154,
852,
2403,
10278,
5632,
37790,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
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... | 4 |
func TestDaoAddReplyZSetRds(t *testing.T) {
convey.Convey("AddReplyZSetRds", t, func(ctx convey.C) {
var (
name = ""
oid = int64(0)
tp = int(0)
rs = &model.ReplyScore{}
)
ctx.Convey("When everything goes positive", func(ctx convey.C) {
err := d.AddReplyZSetRds(context.Background(), name, oid,... | explode_data.jsonl/21799 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 203
} | [
2830,
3393,
12197,
2212,
20841,
57,
1649,
49,
5356,
1155,
353,
8840,
836,
8,
341,
37203,
5617,
4801,
5617,
445,
2212,
20841,
57,
1649,
49,
5356,
497,
259,
11,
2915,
7502,
20001,
727,
8,
341,
197,
2405,
2399,
298,
11609,
284,
8389,
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 TestHighPriorityFlushUnschedulableQLeftover(t *testing.T) {
c := clock.NewFakeClock(time.Now())
m := map[framework.ClusterEvent]sets.String{
NodeAdd: sets.NewString("fakePlugin"),
}
q := NewTestQueue(context.Background(), newDefaultQueueSort(), WithClock(c), WithClusterEventMap(m))
midPod := v1.Pod{
Objec... | explode_data.jsonl/68201 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 782
} | [
2830,
3393,
11976,
20555,
46874,
1806,
72243,
360,
480,
48,
5415,
1975,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
8866,
7121,
52317,
26104,
9730,
13244,
2398,
2109,
1669,
2415,
58,
3794,
72883,
1556,
60,
4917,
6431,
515,
197,
30217,
221... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_WithErrorTagHook(t *testing.T) {
opt := defaultOption()
assert.NotNil(t, opt.errorTagHook)
// apply
var hook errorTagHook = func(sp opentracing.Span, err error) {
println("i do nothing with error")
}
WithErrorTagHook(hook)(opt)
v1 := reflect.ValueOf(hook)
v2 := reflect.ValueOf(opt.errorTagHook)
a... | explode_data.jsonl/45443 | {
"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,
62,
66102,
5668,
31679,
1155,
353,
8840,
836,
8,
341,
64838,
1669,
1638,
5341,
741,
6948,
93882,
1155,
11,
3387,
4417,
5668,
31679,
692,
197,
322,
3796,
198,
2405,
9704,
1465,
5668,
31679,
284,
2915,
22580,
1179,
23745,
4527... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShortCode_NotEquals(t *testing.T) {
a, _ := valueobject.NewShortCode("00FF")
b, _ := valueobject.NewShortCode("11AA")
assert.False(t, a.Equals(b))
} | explode_data.jsonl/28955 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 65
} | [
2830,
3393,
12472,
2078,
60816,
4315,
1155,
353,
8840,
836,
8,
341,
11323,
11,
716,
1669,
897,
1700,
7121,
12472,
2078,
445,
15,
15,
1748,
1138,
2233,
11,
716,
1669,
897,
1700,
7121,
12472,
2078,
445,
16,
16,
6029,
1138,
6948,
50757,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInstancesDiscoveryAcrossProjects(t *testing.T) {
projects := []string{"proj1", "proj2", "proj3", "proj4"}
testInstances := []*testInstance{
&testInstance{
name: "ins1",
project: "proj1",
},
&testInstance{
name: "ins2",
project: "proj2",
},
&testInstance{
name: "ins3",
pro... | explode_data.jsonl/52916 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 469
} | [
2830,
3393,
42725,
67400,
91931,
29958,
1155,
353,
8840,
836,
8,
341,
197,
17161,
1669,
3056,
917,
4913,
30386,
16,
497,
330,
30386,
17,
497,
330,
30386,
18,
497,
330,
30386,
19,
16707,
18185,
42725,
1669,
29838,
1944,
2523,
515,
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... | 4 |
func TestConcurrentIngestCompact(t *testing.T) {
for i := 0; i < 2; i++ {
t.Run("", func(t *testing.T) {
mem := vfs.NewMem()
compactionReady := make(chan struct{})
compactionBegin := make(chan struct{})
d, err := Open("", &Options{
FS: mem,
EventListener: EventListener{
TableCreated: func(in... | explode_data.jsonl/40264 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1194
} | [
2830,
3393,
1109,
3231,
641,
6969,
98335,
1155,
353,
8840,
836,
8,
341,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
17,
26,
600,
1027,
341,
197,
3244,
16708,
19814,
2915,
1155,
353,
8840,
836,
8,
341,
298,
14145,
1669,
92941,
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... | 2 |
func TestMarketGetPack(t *testing.T) {
market := getMarket()
pack, err := market.GetPack("increase_pack")
if pack == nil {
t.Error("pack found expocted on increase_pack")
}
if err != nil {
t.Errorf("no error expected on increase_pack, got %s", err.Error())
}
} | explode_data.jsonl/10773 | {
"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,
38822,
1949,
30684,
1155,
353,
8840,
836,
8,
341,
2109,
54560,
1669,
633,
38822,
741,
3223,
473,
11,
1848,
1669,
3081,
2234,
30684,
445,
78501,
32995,
1138,
743,
3769,
621,
2092,
341,
197,
3244,
6141,
445,
4748,
1730,
1343,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJoinerIterateChunkAddresses(t *testing.T) {
store := mock.NewStorer()
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
// create root chunk with 2 references and the referenced data chunks
rootChunk := filetest.GenerateTestRandomFileChunk(swarm.ZeroAddress, swarm.Chun... | explode_data.jsonl/51992 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 699
} | [
2830,
3393,
12292,
261,
8537,
349,
28304,
52290,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
7860,
7121,
623,
14827,
2822,
20985,
11,
9121,
1669,
2266,
26124,
7636,
5378,
19047,
1507,
882,
32435,
340,
16867,
9121,
2822,
197,
322,
1855,
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 TestUsage(t *testing.T) {
called := false
ResetForTesting(func() { called = true })
if CommandLine.Parse([]string{"-x"}) == nil {
t.Error("parse did not fail for unknown flag")
}
if !called {
t.Error("did not call Usage for unknown flag")
}
} | explode_data.jsonl/53990 | {
"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,
14783,
1155,
353,
8840,
836,
8,
341,
1444,
4736,
1669,
895,
198,
197,
14828,
2461,
16451,
18552,
368,
314,
2598,
284,
830,
2751,
743,
78218,
8937,
10556,
917,
4913,
12,
87,
80154,
621,
2092,
341,
197,
3244,
6141,
445,
6400... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDecodeFromEmptyReader(t *testing.T) {
p, buf, err := DecodeFrom(strings.NewReader(""))
by, rerr := ioutil.ReadAll(buf)
assert.Nil(t, rerr)
assert.EqualError(t, err, "Pointer file error: invalid header")
assert.Nil(t, p)
assert.Empty(t, by)
} | explode_data.jsonl/50440 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
32564,
3830,
3522,
5062,
1155,
353,
8840,
836,
8,
341,
3223,
11,
6607,
11,
1848,
1669,
50194,
3830,
51442,
68587,
73303,
197,
1694,
11,
435,
615,
1669,
43144,
41851,
10731,
692,
6948,
59678,
1155,
11,
435,
615,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestValidateCloudFormationTemplate(t *testing.T) {
type testCases struct {
Value string
ErrCount int
}
invalidCases := []testCases{
{
Value: `{"abc":"`,
ErrCount: 1,
},
{
Value: "abc: [",
ErrCount: 1,
},
}
for _, tc := range invalidCases {
_, errors := validateCloudFormati... | explode_data.jsonl/78586 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 358
} | [
2830,
3393,
17926,
16055,
59458,
7275,
1155,
353,
8840,
836,
8,
341,
13158,
1273,
37302,
2036,
341,
197,
47399,
262,
914,
198,
197,
197,
7747,
2507,
526,
198,
197,
630,
197,
11808,
37302,
1669,
3056,
1944,
37302,
515,
197,
197,
515,
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... | 5 |
func TestGetGCUUID(t *testing.T) {
uuids := map[string]bool{}
count := 20
for i := 0; i < count; i++ {
onlineDDL, err := NewOnlineDDL("ks", "tbl", "alter table t drop column c", NewDDLStrategySetting(DDLStrategyDirect, ""), "")
assert.NoError(t, err)
gcUUID := onlineDDL.GetGCUUID()
assert.True(t, IsGCUUID(gc... | explode_data.jsonl/42825 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 169
} | [
2830,
3393,
1949,
38,
16799,
6463,
1155,
353,
8840,
836,
8,
341,
10676,
91216,
1669,
2415,
14032,
96436,
16094,
18032,
1669,
220,
17,
15,
198,
2023,
600,
1669,
220,
15,
26,
600,
366,
1760,
26,
600,
1027,
341,
197,
24630,
1056,
58781,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMaxConcurrencyWithNewlyTriggeredJobs(t *testing.T) {
tests := []struct {
name string
pjs []prowapi.ProwJob
pendingJobs map[string]int
expectedPods int
}{
{
name: "avoid starting a triggered job",
pjs: []prowapi.ProwJob{
{
ObjectMeta: metav1.ObjectMeta{
Name: "... | explode_data.jsonl/61101 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2454
} | [
2830,
3393,
5974,
79611,
2354,
3564,
398,
17939,
291,
40667,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
260,
914,
198,
197,
3223,
2519,
688,
3056,
79,
651,
2068,
1069,
651,
12245,
198,
197,
3223,
2459,
406... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue16973(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t1")
tk.Session().GetSessionVars().EnableClusteredIndex = variable.ClusteredIndexDefModeIntOnly
tk.MustExec("create table t1(i... | explode_data.jsonl/65489 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 724
} | [
2830,
3393,
42006,
16,
21,
24,
22,
18,
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,
340,
3244,
74,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_AWM_MPT(t *testing.T) {
db.InitEKTDB("test/testVM")
vm := New()
vm.Run(`
var root = AWM.mpt_init()
console.log(root)
root = AWM.mpt_save(root, "Hello", "world")
console.log(root)
console.log(AWM.mpt_get(root, "Hello"))
`)
} | explode_data.jsonl/49479 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
1566,
15210,
1245,
2828,
1155,
353,
8840,
836,
8,
341,
20939,
26849,
36,
33539,
3506,
445,
1944,
12697,
11187,
5130,
54879,
1669,
1532,
741,
54879,
16708,
61528,
197,
2405,
3704,
284,
362,
15210,
744,
417,
6137,
741,
197,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPublicKeyListText(t *testing.T) {
if testing.Short() {
t.SkipNow()
return
}
config := &quick.Config{
MaxCount: testutil.ENCODE_REPEAT_COUNT,
}
err := quick.Check(publicKeyListTextOk, config)
testutil.AssertVerboseErrorIsNil(t, err)
} | explode_data.jsonl/34477 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
61822,
852,
1178,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
7039,
741,
197,
853,
198,
197,
630,
25873,
1669,
609,
27763,
10753,
515,
197,
197,
5974,
2507,
25,
1273,
1314,
52746,
14866,
665... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGocloak_ExecuteActionsEmail_UpdatePassword(t *testing.T) {
t.Parallel()
cfg := GetConfig(t)
client := NewClientWithDebug(t)
token := GetAdminToken(t, client)
tearDown, userID := CreateUser(t, client)
defer tearDown()
params := ExecuteActionsEmail{
ClientID: cfg.GoCloak.ClientID,
UserID: userID,
... | explode_data.jsonl/79537 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 242
} | [
2830,
3393,
38,
509,
385,
585,
83453,
12948,
4781,
47393,
4876,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
50286,
1669,
2126,
2648,
1155,
340,
25291,
1669,
1532,
2959,
2354,
7939,
1155,
340,
43947,
1669,
2126,
7210,
3323,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseMultiAuthHeader(t *testing.T) {
for _, tc := range []struct {
input string
shouldErr bool
expected map[string]types.DockerAuthConfig
}{
// Empty header
{input: "", expected: nil},
// "null"
{input: "null", expected: nil},
// Invalid JSON
{input: "@", shouldErr: true},
// Success... | explode_data.jsonl/33436 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 407
} | [
2830,
3393,
14463,
20358,
5087,
4047,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
22427,
257,
914,
198,
197,
197,
5445,
7747,
1807,
198,
197,
42400,
220,
2415,
14032,
60,
9242,
909,
13659,
5087,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.