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 TestChangeTodoName(t *testing.T) {
t.Run("invalid name", func(t *testing.T) {
r := &MemoryRepository{}
s := NewService(r)
todo, err := r.addTodo("gud name", nil, 1, defaultPriority())
if err != nil {
t.Fatalf("error adding todo")
}
err = s.ChangeTodoName(todo.userID, todo.id, "")
if err == nil... | explode_data.jsonl/21375 | {
"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,
4072,
24176,
675,
1155,
353,
8840,
836,
8,
1476,
3244,
16708,
445,
11808,
829,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
7000,
1669,
609,
10642,
4624,
16094,
197,
1903,
1669,
1532,
1860,
2601,
692,
197,
3244,
6004,
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... | 3 |
func Test_ToSliceUnthreadsafe(t *testing.T) {
s := makeUnsafeSet([]int{1, 2, 3})
setAsSlice := s.ToSlice()
if len(setAsSlice) != s.Cardinality() {
t.Errorf("Set length is incorrect: %v", len(setAsSlice))
}
for _, i := range setAsSlice {
if !s.Contains(i) {
t.Errorf("Set is missing element: %v", i)
}
}
} | explode_data.jsonl/214 | {
"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,
38346,
33236,
1806,
4528,
18675,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
1281,
78770,
1649,
10556,
396,
90,
16,
11,
220,
17,
11,
220,
18,
3518,
8196,
2121,
33236,
1669,
274,
3274,
33236,
741,
743,
2422,
14171,
2121,
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... | 4 |
func TestReconcileEnableAutoTLSHTTPDisabled(t *testing.T) {
table := TableTest{{
Name: "check that Route is correctly updated when Certificate is not ready",
Objects: []runtime.Object{
Route("default", "becomes-ready", WithConfigTarget("config"), WithRouteUID("12-34")),
cfg("default", "config",
WithConfi... | explode_data.jsonl/7816 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1844
} | [
2830,
3393,
693,
40446,
457,
11084,
13253,
45439,
9230,
25907,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
6633,
2271,
90,
515,
197,
21297,
25,
330,
2028,
429,
9572,
374,
12440,
6049,
979,
31402,
374,
537,
5527,
756,
197,
197,
11543,
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 TestMergeWalletStore(t *testing.T) {
nft.RegisterAction(nft.DefaultActions...)
w1 := wsFromGenesisFile(t, "./testdata/genesis.json")
w2 := wsFromFile(t, "./testdata/wallets.json")
expected := WalletStore{
Wallets: []cash.GenesisAccount{
{
Address: toWeaveAddress(t, "3AFCDAB4CFBF066E959D139251C8F0EE91E... | explode_data.jsonl/11363 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 788
} | [
2830,
3393,
52096,
38259,
6093,
1155,
353,
8840,
836,
8,
341,
9038,
723,
19983,
2512,
1445,
723,
13275,
12948,
31218,
6692,
16,
1669,
17624,
3830,
84652,
1703,
1155,
11,
5924,
92425,
14,
77894,
4323,
1138,
6692,
17,
1669,
17624,
43633,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCopyUnstableJSON(t *testing.T) {
env, cleanup := withTestEnvironment(t)
defer cleanup()
env2, cleanup2 := withTestEnvironment(t)
defer cleanup2()
// contains a symlink created using `ln -s '../i/'$'\355\246\361''d/samba' broken-symlink`
datafile := filepath.Join("testdata", "copy-unstable-json.tar.gz")
... | explode_data.jsonl/43552 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 259
} | [
2830,
3393,
12106,
1806,
27992,
5370,
1155,
353,
8840,
836,
8,
341,
57538,
11,
21290,
1669,
448,
2271,
12723,
1155,
340,
16867,
21290,
741,
57538,
17,
11,
21290,
17,
1669,
448,
2271,
12723,
1155,
340,
16867,
21290,
17,
2822,
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... | 1 |
func TestCreateSimpleGraphWithNode(t *testing.T) {
g := dot.NewGraph("Test")
expected := "digraph Test {\n}\n"
if fmt.Sprint(g) != expected {
t.Errorf("'%s' != '%s'", fmt.Sprint(g), expected)
}
g.SetType(dot.GRAPH)
expected = "graph Test {\n}\n"
if fmt.Sprint(g) != expected {
t.Errorf("'%s' != '%s'", fmt.S... | explode_data.jsonl/407 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 347
} | [
2830,
3393,
4021,
16374,
11212,
2354,
1955,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
12756,
7121,
11212,
445,
2271,
5130,
42400,
1669,
330,
44861,
1935,
3393,
28152,
77,
11035,
77,
698,
743,
8879,
808,
1350,
3268,
8,
961,
3601,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestCT_CacheHierarchiesConstructor(t *testing.T) {
v := sml.NewCT_CacheHierarchies()
if v == nil {
t.Errorf("sml.NewCT_CacheHierarchies must return a non-nil value")
}
if err := v.Validate(); err != nil {
t.Errorf("newly constructed sml.CT_CacheHierarchies should validate: %s", err)
}
} | explode_data.jsonl/28611 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 120
} | [
2830,
3393,
1162,
920,
1777,
74909,
1113,
550,
13288,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
274,
1014,
7121,
1162,
920,
1777,
74909,
1113,
550,
741,
743,
348,
621,
2092,
341,
197,
3244,
13080,
445,
82,
1014,
7121,
1162,
920,
1777,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUploadOrderSingleBufferedReader(t *testing.T) {
s, ops, _ := loggingSvc(emptyList)
mgr := s3manager.NewUploaderWithClient(s)
resp, err := mgr.Upload(&s3manager.UploadInput{
Bucket: aws.String("Bucket"),
Key: aws.String("Key"),
Body: &sizedReader{size: 1024 * 1024 * 2},
})
if err != nil {
t.E... | explode_data.jsonl/55648 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 272
} | [
2830,
3393,
13844,
4431,
10888,
4095,
17120,
1155,
353,
8840,
836,
8,
341,
1903,
11,
27132,
11,
716,
1669,
8392,
92766,
24216,
852,
340,
2109,
901,
1669,
274,
18,
13297,
7121,
67574,
2354,
2959,
1141,
340,
34653,
11,
1848,
1669,
57897,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInitApp(t *testing.T) {
app = nil
initApp()
if app == nil {
t.Errorf("app should not be nil")
}
MiddlewareStack = []negroni.Handler{}
} | explode_data.jsonl/51055 | {
"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,
3803,
2164,
1155,
353,
8840,
836,
8,
341,
28236,
284,
2092,
198,
28248,
2164,
741,
743,
906,
621,
2092,
341,
197,
3244,
13080,
445,
676,
1265,
537,
387,
2092,
1138,
197,
532,
9209,
11603,
4336,
284,
3056,
28775,
2248,
72,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReject(t *testing.T) {
policyID := "policyID"
m, err := policies.NewManagerImpl("test", providerMap(), &cb.ConfigGroup{
Policies: map[string]*cb.ConfigPolicy{
policyID: {Policy: rejectAllPolicy},
},
})
assert.NoError(t, err)
assert.NotNil(t, m)
policy, ok := m.GetPolicy(policyID)
assert.True(t, o... | explode_data.jsonl/51381 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 212
} | [
2830,
3393,
78413,
1155,
353,
8840,
836,
8,
341,
3223,
8018,
915,
1669,
330,
34790,
915,
698,
2109,
11,
1848,
1669,
10186,
7121,
2043,
9673,
445,
1944,
497,
9109,
2227,
1507,
609,
7221,
10753,
2808,
515,
197,
10025,
42038,
25,
2415,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTerraformHttpExample(t *testing.T) {
t.Parallel()
// A unique ID we can use to namespace resources so we don't clash with anything already in the AWS account or
// tests running in parallel
uniqueID := random.UniqueId()
// Give this EC2 Instance and other resources in the Terraform code a name with a un... | explode_data.jsonl/23318 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 636
} | [
2830,
3393,
51,
13886,
627,
2905,
13314,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
362,
4911,
3034,
582,
646,
990,
311,
4473,
4963,
773,
582,
1513,
944,
39903,
448,
4113,
2669,
304,
279,
23245,
2692,
476,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRpcStream_writeStreamNext(t *testing.T) {
t.Run("test", func(t *testing.T) {
assert := base.NewAssert(t)
testRange := getTestRange(streamPosBody, 2*streamBlockSize, 16, 16, 61)
for _, i := range testRange {
bytes := make([]byte, i)
dataStream := NewStream()
for n := 0; n < i; n++ {
bytes[n... | explode_data.jsonl/21198 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 582
} | [
2830,
3393,
60248,
3027,
9165,
3027,
5847,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1944,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
6948,
1669,
2331,
7121,
8534,
1155,
340,
197,
18185,
6046,
1669,
633,
2271,
6046,
20574,
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... | 4 |
func TestStringEmpty(t *testing.T) {
tests := []struct {
msg string
result bool
}{
{
result: true,
},
{
"data",
false,
},
}
for _, c := range tests {
got := IsStringEmpty(c.msg)
assert.Equal(t, c.result, got, "result must match")
}
} | explode_data.jsonl/13332 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 124
} | [
2830,
3393,
703,
3522,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
21169,
262,
914,
198,
197,
9559,
1807,
198,
197,
59403,
197,
197,
515,
298,
9559,
25,
830,
345,
197,
197,
15766,
197,
197,
515,
298,
197,
97115,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTrackerInit(t *testing.T) {
assert := assert.New(t)
tracker := InitTracker(
RequireEmitter(InitEmitter(
RequireCollectorUri("com.acme"),
OptionDbName("/home/vagrant/test.db"),
)),
OptionSubject(InitSubject()),
OptionNamespace("namespace"),
OptionAppId("app-id"),
OptionPlatform("mob"),
Opt... | explode_data.jsonl/37648 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 677
} | [
2830,
3393,
31133,
3803,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
25583,
9683,
1669,
15690,
31133,
1006,
197,
197,
17959,
21971,
7,
3803,
21971,
1006,
298,
197,
17959,
53694,
13899,
445,
874,
15399,
2660,
4461,
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... | 2 |
func TestMarshal_ChallengeReply(t *testing.T) {
t.Parallel()
bytes, _ := getResponseReference().Marshal()
assert.Equal(t, testChallengeReplyFromInitiator, hex.EncodeToString(bytes),
"Marshalling did not yield the expected result.")
} | explode_data.jsonl/54235 | {
"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,
55438,
27588,
15832,
20841,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
70326,
11,
716,
1669,
633,
2582,
8856,
1005,
55438,
741,
6948,
12808,
1155,
11,
1273,
62078,
20841,
3830,
3803,
36122,
11,
12371,
50217,
5870,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImagePixels(t *testing.T) {
img0, img, err := openEbitenImage()
if err != nil {
t.Fatal(err)
return
}
if got := img0.Bounds().Size(); got != img.Bounds().Size() {
t.Fatalf("img size: got %d; want %d", got, img.Bounds().Size())
}
w, h := img0.Bounds().Size().X, img0.Bounds().Size().Y
// Check out... | explode_data.jsonl/10886 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 306
} | [
2830,
3393,
1906,
38529,
1155,
353,
8840,
836,
8,
341,
39162,
15,
11,
4964,
11,
1848,
1669,
1787,
36,
4489,
268,
1906,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
853,
198,
197,
630,
743,
2684,
1669,
4964,
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... | 6 |
func TestMemory_race(t *testing.T) {
m, err := NewWithDefault()
require.NoError(t, err)
upca, err := upca.NewWithDefault("../upstreamca-memory/pkg/_test_data/keys/private_key.pem", "../upstreamca-memory/pkg/_test_data/keys/cert.pem")
require.NoError(t, err)
generateCsrResp, err := m.GenerateCsr(&ca.GenerateCsrRe... | explode_data.jsonl/73859 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 319
} | [
2830,
3393,
10642,
91317,
1155,
353,
8840,
836,
8,
341,
2109,
11,
1848,
1669,
1532,
2354,
3675,
741,
17957,
35699,
1155,
11,
1848,
692,
59810,
924,
11,
1848,
1669,
705,
924,
7121,
2354,
3675,
17409,
454,
4027,
924,
64096,
22523,
19632,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJsonpb(t *testing.T) {
r := &Reply{Msg: []byte("OK")}
b, err := PBToJSON(r)
assert.Nil(t, err)
assert.Equal(t, b, []byte(`{"isOk":false,"msg":"0x4f4b"}`))
var newreply Reply
err = JSONToPB(b, &newreply)
assert.Nil(t, err)
assert.Equal(t, r, &newreply)
} | explode_data.jsonl/58323 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
5014,
16650,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
609,
20841,
90,
6611,
25,
3056,
3782,
445,
3925,
42132,
2233,
11,
1848,
1669,
30934,
1249,
5370,
2601,
340,
6948,
59678,
1155,
11,
1848,
340,
6948,
12808,
1155,
11,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMegaChecks(t *testing.T) {
Convey("Should pass megachecks", t, func() {
cmd := exec.Command("megacheck")
res, _ := cmd.Output()
So(string(res[:]), ShouldBeEmpty)
})
} | explode_data.jsonl/25052 | {
"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,
44,
11188,
49820,
1155,
353,
8840,
836,
8,
1476,
93070,
5617,
445,
14996,
1494,
18740,
1777,
14553,
497,
259,
11,
2915,
368,
1476,
197,
25920,
1669,
3883,
12714,
445,
70276,
1777,
377,
1138,
197,
10202,
11,
716,
1669,
5439,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrepareCacheNow(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
orgEnable := core.PreparedPlanCacheEnabled()
defer core.SetPreparedPlanCache(orgEnable)
core.SetPreparedPlanCache(true)
se, err := session.CreateSession4TestWithOpt(store, &session.Opt{
PreparedPlanCache: kvcache.N... | explode_data.jsonl/5500 | {
"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,
50590,
8233,
7039,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
741,
87625,
11084,
1669,
6200,
28770,
7212,
20485,
8233,
5462,
741,
16867,
6200,
4202,
4703,
7212,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWorkerMaintenanceRefillLowContractFunds(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
t.Parallel()
deps := &dependencies.DependencyDisableWorker{}
wt, err := newWorkerTesterCustomDependency(t.Name(), deps, modules.ProdDependencies)
if err != nil {
t.Fatal(err)
}
defer func() {
err := wt.Clo... | explode_data.jsonl/42607 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 560
} | [
2830,
3393,
21936,
92735,
3945,
483,
24187,
14067,
37,
42950,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
7039,
741,
197,
532,
3244,
41288,
7957,
2822,
58351,
1690,
1669,
609,
54274,
49918,
25479,
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... | 2 |
func TestRoleDeleteForbidden(t *testing.T) {
h := newHelper(t)
u := h.repoMakeRole()
h.apiInit().
Delete(fmt.Sprintf("/roles/%d", u.ID)).
Header("Accept", "application/json").
Expect(t).
Status(http.StatusOK).
Assert(helpers.AssertError("not allowed to delete this role")).
End()
} | explode_data.jsonl/8343 | {
"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,
9030,
6435,
69115,
1155,
353,
8840,
836,
8,
341,
9598,
1669,
501,
5511,
1155,
340,
10676,
1669,
305,
46169,
8078,
9030,
2822,
9598,
6183,
3803,
25829,
197,
96672,
28197,
17305,
4283,
14643,
12627,
67,
497,
575,
9910,
39467,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWalletSvrWsNtfns(t *testing.T) {
t.Parallel()
tests := []struct {
name string
newNtfn func() (interface{}, error)
staticNtfn func() interface{}
marshalled string
unmarshalled interface{}
}{
{
name: "accountbalance",
newNtfn: func() (interface{}, error) {
return btcjso... | explode_data.jsonl/17063 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2503
} | [
2830,
3393,
38259,
50,
18920,
74733,
45,
8935,
4412,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
260,
914,
198,
197,
8638,
45,
83,
8822,
414,
2915,
368,
320,
4970,
22655,
1465,
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 TestProjectDeletion(t *testing.T) {
fixture.EnsureCleanState(t)
projectName := "proj-" + strconv.FormatInt(time.Now().Unix(), 10)
proj, err := fixture.AppClientset.ArgoprojV1alpha1().AppProjects(fixture.ArgoCDNamespace).Create(
context.Background(), &v1alpha1.AppProject{ObjectMeta: metav1.ObjectMeta{Name: pr... | explode_data.jsonl/58439 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 266
} | [
2830,
3393,
7849,
1912,
52625,
1155,
353,
8840,
836,
8,
341,
1166,
12735,
22834,
19098,
27529,
1397,
1155,
692,
72470,
675,
1669,
330,
30386,
27651,
488,
33317,
9978,
1072,
9730,
13244,
1005,
55832,
1507,
220,
16,
15,
340,
197,
30386,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigMarketplaceDefaults(t *testing.T) {
t.Parallel()
t.Run("no marketplace url", func(t *testing.T) {
c := Config{}
c.SetDefaults()
require.True(t, *c.PluginSettings.EnableMarketplace)
require.Equal(t, PLUGIN_SETTINGS_DEFAULT_MARKETPLACE_URL, *c.PluginSettings.MarketplaceUrl)
})
t.Run("old mar... | explode_data.jsonl/50703 | {
"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,
2648,
38822,
2007,
16273,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3244,
16708,
445,
2152,
29533,
2515,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
1444,
1669,
5532,
16094,
197,
1444,
4202,
16273,
2822,
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 TestExecutor(t *testing.T) {
exec := testexecutor.New()
t.Run("calls query on executable schema", func(t *testing.T) {
resp := query(exec, "", "{name}")
assert.Equal(t, `{"name":"test"}`, string(resp.Data))
})
t.Run("invokes operation middleware in order", func(t *testing.T) {
var calls []string
exec... | explode_data.jsonl/79116 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1752
} | [
2830,
3393,
25255,
1155,
353,
8840,
836,
8,
341,
67328,
1669,
1273,
80787,
7121,
2822,
3244,
16708,
445,
44620,
3239,
389,
32156,
10802,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
34653,
1669,
3239,
46896,
11,
7342,
13868,
606,
14451... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFontProp_MakeValid(t *testing.T) {
cases := []struct {
name string
signatureProp *props.Font
assert func(t *testing.T, prop *props.Font)
}{
{
"When family is not defined, should define arial",
&props.Font{
Family: "",
},
func(t *testing.T, prop *props.Font) {
asser... | explode_data.jsonl/68878 | {
"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,
5447,
2008,
1245,
726,
4088,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
69054,
1568,
2008,
353,
4761,
4356,
198,
197,
6948,
286,
2915,
1155,
353,
8840,
836,
11,
2004,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWorkflowGetInitialTaskTemplate(t *testing.T) {
workflow := &Workflow{
TaskTemplates: []TaskTemplate{
TaskTemplate{
TaskName: "First",
Initial: false,
},
TaskTemplate{
TaskName: "Second",
Initial: true,
},
},
}
initialTT := workflow.GetInitialTaskTemplate()
assert.Equal(t... | explode_data.jsonl/19598 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
62768,
1949,
6341,
6262,
7275,
1155,
353,
8840,
836,
8,
341,
197,
56249,
1669,
609,
62768,
515,
197,
81153,
51195,
25,
3056,
6262,
7275,
515,
298,
81153,
7275,
515,
571,
81153,
675,
25,
330,
5338,
756,
571,
197,
6341,
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 TestCAloadUsersTable(t *testing.T) {
testDirClean(t)
cfg = CAConfig{}
u := &CAConfigIdentity{Name: "a", MaxEnrollments: -10}
cfg.Registry = CAConfigRegistry{Identities: []CAConfigIdentity{*u}, MaxEnrollments: 10}
ca, err := newCA(configFile, &cfg, &srv, false)
t.Log("ca.newCA error: ", err)
if err == nil {
... | explode_data.jsonl/82707 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 802
} | [
2830,
3393,
5049,
1078,
7137,
2556,
1155,
353,
8840,
836,
8,
341,
18185,
6184,
27529,
1155,
340,
50286,
284,
9183,
2648,
16094,
10676,
1669,
609,
5049,
2648,
18558,
63121,
25,
330,
64,
497,
7487,
1702,
1100,
1368,
25,
481,
16,
15,
532... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestJobRunsController_Show_Unauthenticated(t *testing.T) {
t.Parallel()
ethClient, _, assertMocksCalled := cltest.NewEthMocksWithStartupAssertions(t)
defer assertMocksCalled()
app, cleanup := cltest.NewApplication(t,
ethClient,
)
defer cleanup()
app.Start()
resp, err := http.Get(app.Server.URL + "/v2/ru... | explode_data.jsonl/49860 | {
"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,
12245,
73920,
2051,
79665,
40687,
57707,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
769,
2959,
11,
8358,
2060,
72577,
20960,
1669,
1185,
1944,
7121,
65390,
11571,
16056,
39076,
90206,
1155,
340,
16867,
2060,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResultOutputs_GetContentDigest(t *testing.T) {
testcases := []struct {
value string
wantValue string
wantOK bool
}{
{value: "abc123", wantValue: "abc123", wantOK: true},
}
for _, tc := range testcases {
t.Run("existing metadata", func(t *testing.T) {
outputs := OutputMetadata{}
err ... | explode_data.jsonl/70427 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 258
} | [
2830,
3393,
2077,
61438,
13614,
2762,
45217,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
16309,
257,
914,
198,
197,
50780,
1130,
914,
198,
197,
50780,
3925,
262,
1807,
198,
197,
59403,
197,
197,
90,
957,
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 TestParseDestructor(t *testing.T) {
t.Parallel()
result, errs := ParseProgram(`
resource Test {
destroy() {}
}
`)
require.Empty(t, errs)
utils.AssertEqualWithDiff(t,
[]ast.Declaration{
&ast.CompositeDeclaration{
CompositeKind: common.CompositeKindResource,
Identifie... | explode_data.jsonl/35996 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 769
} | [
2830,
3393,
14463,
84961,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
9559,
11,
70817,
1669,
14775,
10690,
61528,
286,
5101,
3393,
341,
310,
6921,
368,
5613,
286,
456,
197,
24183,
17957,
11180,
1155,
11,
70817,
692,
80206,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCanvas_Tappable(t *testing.T) {
content := &touchableLabel{Label: widget.NewLabel("Hi\nHi\nHi")}
content.ExtendBaseWidget(content)
c := NewCanvas().(*mobileCanvas)
c.SetContent(content)
c.resize(fyne.NewSize(36, 24))
content.Resize(fyne.NewSize(24, 24))
c.tapDown(fyne.NewPos(15, 15), 0)
assert.True(t,... | explode_data.jsonl/43164 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 338
} | [
2830,
3393,
18226,
1139,
86384,
1155,
353,
8840,
836,
8,
341,
27751,
1669,
609,
22020,
480,
2476,
90,
2476,
25,
9086,
7121,
2476,
445,
13048,
1699,
13048,
1699,
13048,
42132,
27751,
16146,
408,
3978,
4548,
15063,
340,
1444,
1669,
1532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMonorailSearch(t *testing.T) {
unittest.SmallTest(t)
ctx := context.Background()
mc := &MonorailQueryConfig{
Instance: "skia",
Query: "test-query",
Client: "Skia",
}
reqBody := []byte(fmt.Sprintf(`{"projects": ["projects/%s"], "query": "%s", "page_token": ""}`, mc.Instance, mc.Query))
issue1 ... | explode_data.jsonl/60123 | {
"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,
11095,
269,
604,
5890,
1155,
353,
8840,
836,
8,
341,
20479,
14267,
90183,
2271,
1155,
340,
20985,
1669,
2266,
19047,
2822,
97662,
1669,
609,
11095,
269,
604,
2859,
2648,
515,
197,
197,
2523,
25,
330,
4886,
685,
756,
197,
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 TestShouldIgnoreAutoGeneratedAttributes(t *testing.T) {
modifiedScantype := scanType.DeepCopy()
modifiedScantype.ResourceVersion = "ajbsdiavof1t2hvasjhdvaj"
assert.Equal(
t,
HashScanType(scanType),
HashScanType(*modifiedScantype),
"Should ignore auto generated attributes",
)
} | explode_data.jsonl/24501 | {
"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,
14996,
12497,
13253,
15741,
10516,
1155,
353,
8840,
836,
8,
1476,
42228,
1870,
3326,
517,
499,
1669,
8569,
929,
55602,
12106,
2822,
42228,
1870,
3326,
517,
499,
20766,
5637,
284,
330,
1630,
1279,
8579,
402,
1055,
16,
83,
17,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateOrUpdateNeverRateLimiter(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
vmCreateOrUpdateErr := &retry.Error{
RawError: fmt.Errorf("azure cloud provider rate limited(%s) for operation %q", "write", "VMCreateOrUpdate"),
Retriable: true,
}
armClient := mockarmclient.NewMockI... | explode_data.jsonl/16703 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 215
} | [
2830,
3393,
4021,
56059,
26155,
11564,
43,
17700,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
54879,
4021,
56059,
7747,
1669,
609,
44848,
6141,
515,
197,
11143,
672,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExpect100ContinueAfterHandlerWrites(t *testing.T) {
const msg = "Hello"
const msg2 = "World"
doRead := make(chan bool, 1)
defer close(doRead) // fallback cleanup
st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, msg)
w.(http.Flusher).Flush()
// Do a read, w... | explode_data.jsonl/71700 | {
"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,
17536,
16,
15,
15,
23526,
6025,
3050,
93638,
1155,
353,
8840,
836,
8,
341,
4777,
3750,
284,
330,
9707,
698,
4777,
3750,
17,
284,
330,
10134,
1837,
19935,
4418,
1669,
1281,
35190,
1807,
11,
220,
16,
340,
16867,
3265,
66405,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteFileShareDBEntry(t *testing.T) {
var fileshare = &model.FileShareSpec{
BaseModel: &model.BaseModel{
Id: "bd5b12a8-a101-11e7-941e-d77981b584d8",
},
Status: model.FileShareAvailable,
ProfileId: "3769855c-a102-11e7-b772-17b880d2f537",
PoolId: "3762355c-a102-11e7-b772-17b880d2f537",
}
v... | explode_data.jsonl/29981 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1283
} | [
2830,
3393,
6435,
1703,
12115,
3506,
5874,
1155,
353,
8840,
836,
8,
341,
2405,
1034,
19368,
284,
609,
2528,
8576,
12115,
8327,
515,
197,
66732,
1712,
25,
609,
2528,
13018,
1712,
515,
298,
67211,
25,
330,
8940,
20,
65,
16,
17,
64,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateQueryingWithHandler(t *testing.T) {
keptnEvent := createKeptnEvent("sockshop", "dev", "carts")
dh, url, teardown := createQueryingWithHandler(t, keptnEvent, nil)
defer teardown()
assert.EqualValues(t, createDynatraceCredentials(t, url), dh.dtClient.Credentials())
assert.EqualValues(t, keptnEvent, d... | explode_data.jsonl/34366 | {
"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,
4021,
2859,
287,
2354,
3050,
1155,
353,
8840,
836,
8,
341,
197,
97920,
77,
1556,
1669,
1855,
6608,
417,
77,
1556,
445,
13199,
8675,
497,
330,
3583,
497,
330,
66,
7038,
1138,
2698,
71,
11,
2515,
11,
49304,
1669,
1855,
285... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigCertAndKey(t *testing.T) {
certFile, err := ioutil.TempFile(os.TempDir(), "kubeadm-external-etcd-test-certfile")
if err != nil {
t.Errorf(
"failed configCertAndKey:\n\texpected: succeed creating temp CertFile file\n\tactual:%v",
err,
)
}
defer os.Remove(certFile.Name())
if err := ioutil.Wr... | explode_data.jsonl/20510 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 620
} | [
2830,
3393,
2648,
36934,
3036,
1592,
1155,
353,
8840,
836,
8,
341,
1444,
529,
1703,
11,
1848,
1669,
43144,
65009,
1703,
9638,
65009,
6184,
1507,
330,
74,
392,
3149,
76,
12,
20921,
96010,
4385,
16839,
61034,
1192,
1138,
743,
1848,
961,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMakeLogicSigBasic(t *testing.T) {
// basic checks and contracts without delegation
var program []byte
var args [][]byte
var sk ed25519.PrivateKey
var pk MultisigAccount
// check empty LogicSig
lsig, err := MakeLogicSig(program, args, sk, pk)
require.Error(t, err)
require.Equal(t, types.LogicSig{}, ls... | explode_data.jsonl/2158 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 709
} | [
2830,
3393,
8078,
26751,
47246,
15944,
1155,
353,
8840,
836,
8,
341,
197,
322,
6770,
12341,
323,
17080,
2041,
45261,
198,
2405,
2025,
3056,
3782,
198,
2405,
2827,
52931,
3782,
198,
2405,
1901,
1578,
17,
20,
20,
16,
24,
87738,
1592,
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 TestErrBadConnReconnect(t *testing.T) {
db := newTestDB(t, "foo")
defer closeDB(t, db)
exec(t, db, "CREATE|t1|name=string,age=int32,dead=bool")
simulateBadConn := func(name string, hook *func() bool, op func() error) {
broken, retried := false, false
numOpen := db.numOpen
// simulate a broken connectio... | explode_data.jsonl/16020 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1034
} | [
2830,
3393,
7747,
17082,
9701,
693,
6459,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
501,
2271,
3506,
1155,
11,
330,
7975,
1138,
16867,
3265,
3506,
1155,
11,
2927,
340,
67328,
1155,
11,
2927,
11,
330,
22599,
91,
83,
16,
91,
606,
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... | 2 |
func TestCSClientAPIs(t *testing.T) {
for _, st := range testStores {
st := st
t.Run(st.name, func(t *testing.T) {
t.Parallel()
defer endTest(t, st)
s := startTest(t, st)
defer s.Close()
// Delete client that does not exist
storeDeleteClient(t, s, "client1")
// Delete a client before adding ... | explode_data.jsonl/28298 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 544
} | [
2830,
3393,
6412,
2959,
7082,
82,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
357,
1669,
2088,
1273,
69026,
341,
197,
18388,
1669,
357,
198,
197,
3244,
16708,
5895,
2644,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
3244,
41288,
7957,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAuthServer_LoginAccessToken(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
_, mockClients, cleanup := testutils.CreateTestAPIEnv(t)
defer cleanup()
ctx := CreateTestContext()
mockClients.MockAuth.EXPECT().Login(gomock.Any(), &authpb.LoginRequest{
AccessToken: "test-token",
}).
... | explode_data.jsonl/37839 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 270
} | [
2830,
3393,
5087,
5475,
79232,
37649,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
197,
6878,
7860,
47174,
11,
21290,
1669,
1273,
6031,
7251,
2271,
7082,
14359,
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 |
func TestEncodedLen(t *testing.T) {
for _, tt := range []struct {
enc *Encoding
n int
want int
}{
{RawStdEncoding, 0, 0},
{RawStdEncoding, 1, 2},
{RawStdEncoding, 2, 3},
{RawStdEncoding, 3, 4},
{RawStdEncoding, 7, 10},
{StdEncoding, 0, 0},
{StdEncoding, 1, 4},
{StdEncoding, 2, 4},
{StdEnco... | explode_data.jsonl/35056 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 272
} | [
2830,
3393,
46795,
11271,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
3056,
1235,
341,
197,
197,
954,
220,
353,
14690,
198,
197,
9038,
262,
526,
198,
197,
50780,
526,
198,
197,
59403,
197,
197,
90,
20015,
22748,
14690... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCRDStatusSubresourceAction(t *testing.T) {
actions := `
discovery.lua: |
actions = {}
actions["update-spec"] = {["disabled"] = false}
actions["update-status"] = {["disabled"] = false}
actions["update-both"] = {["disabled"] = false}
return actions
definitions:
- name: update-both
action.lua: |
... | explode_data.jsonl/35665 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1485
} | [
2830,
3393,
8973,
35,
2522,
3136,
9233,
2512,
1155,
353,
8840,
836,
8,
341,
197,
4020,
1669,
22074,
4243,
7449,
37011,
25,
9248,
220,
6168,
284,
5613,
220,
6168,
1183,
2386,
57794,
1341,
284,
314,
1183,
11978,
1341,
284,
895,
532,
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,
1,
1... | 1 |
func TestTimeoutHandlerRaceHeaderTimeout(t *testing.T) {
defer afterTest(t)
sendHi := make(chan bool, 1)
writeErrors := make(chan error, 1)
sayHi := HandlerFunc(func(w ResponseWriter, r *Request) {
w.Header().Set("Content-Type", "text/plain")
<-sendHi
_, werr := w.Write([]byte("hi"))
writeErrors <- werr
})... | explode_data.jsonl/22425 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 620
} | [
2830,
3393,
7636,
3050,
55991,
4047,
7636,
1155,
353,
8840,
836,
8,
341,
16867,
1283,
2271,
1155,
340,
32817,
13048,
1669,
1281,
35190,
1807,
11,
220,
16,
340,
24945,
13877,
1669,
1281,
35190,
1465,
11,
220,
16,
340,
1903,
352,
13048,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddUserToTeamByTeamId(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
t.Run("add user", func(t *testing.T) {
user := model.User{Email: strings.ToLower(model.NewId()) + "success+test@example.com", Nickname: "Darth Vader", Username: "vader" + model.NewId(), Password: "passwd1", AuthService: ... | explode_data.jsonl/30272 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 436
} | [
2830,
3393,
2212,
1474,
1249,
14597,
1359,
14597,
764,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
3244,
16708,
445,
718,
1196,
497,
2915,
1155,
353,
8840,
836,
8,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_storeTaskSpec(t *testing.T) {
ctx := context.Background()
tr := tb.TaskRun("foo", tb.TaskRunSpec(tb.TaskRunTaskRef("foo-task")))
ts := tb.Task("some-task", tb.TaskSpec(tb.TaskDescription("foo-task"))).Spec
ts1 := tb.Task("some-task", tb.TaskSpec(tb.TaskDescription("foo-task"))).Spec
want := ts.DeepCopy... | explode_data.jsonl/60099 | {
"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,
14809,
6262,
8327,
1155,
353,
8840,
836,
8,
1476,
20985,
1669,
2266,
19047,
741,
25583,
1669,
16363,
28258,
6727,
445,
7975,
497,
16363,
28258,
6727,
8327,
61414,
28258,
6727,
6262,
3945,
445,
7975,
52579,
2761,
692,
57441,
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... | 5 |
func TestRESTList(t *testing.T) {
tests := []struct {
name string
appliedToGroups []*types.AppliedToGroup
labelSelector labels.Selector
expectedObj runtime.Object
}{
{
name: "label selector selecting nothing",
appliedToGroups: []*types.AppliedToGroup{
{
Name: "foo",
},
... | explode_data.jsonl/62399 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 552
} | [
2830,
3393,
38307,
852,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
69898,
3440,
1249,
22173,
29838,
9242,
22829,
3440,
1249,
2808,
198,
197,
29277,
5877,
256,
9201,
14752,
269,
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 TestTryContinueInFinally(t *testing.T) {
const SCRIPT = `
var c3 = 0, fin3 = 0;
while (c3 < 2) {
try {
throw "ex1";
} catch(er1) {
c3 += 1;
} finally {
fin3 = 1;
continue;
}
fin3 = 0;
}
fin3;
`
testScript1(SCRIPT, intToValue(1), t)
} | explode_data.jsonl/75225 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
21453,
23526,
641,
23949,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
2405,
272,
18,
284,
220,
15,
11,
1875,
18,
284,
220,
15,
280,
5217,
320,
66,
18,
366,
220,
17,
8,
341,
19271,
6799,
341,
15287,
9581,
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 TestIntArray_Chunk(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
a1 := []int{1, 2, 3, 4, 5}
array1 := garray.NewIntArrayFrom(a1)
chunks := array1.Chunk(2)
t.Assert(len(chunks), 3)
t.Assert(chunks[0], []int{1, 2})
t.Assert(chunks[1], []int{3, 4})
t.Assert(chunks[2], []int{5})
t.Assert(array1.Chunk(... | explode_data.jsonl/47606 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 645
} | [
2830,
3393,
95338,
27588,
3122,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11323,
16,
1669,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
532,
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 TestRenderPumpStartScript(t *testing.T) {
tests := []struct {
name string
scheme string
clusterName string
LogLevel string
Namespace string
clusterDomain string
result string
}{
{
name: "basic",
scheme: "http",
clusterName: "demo",
L... | explode_data.jsonl/62184 | {
"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,
6750,
47,
1510,
3479,
5910,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
1903,
8058,
286,
914,
198,
197,
197,
18855,
675,
256,
914,
198,
197,
24201,
4449,
414,
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... | 3 |
func TestStream_PutBytes(t *testing.T) {
t.Run("test", func(t *testing.T) {
assert := base.NewAssert(t)
testRange := getTestRange(streamPosBody, 3*streamBlockSize, 10, 10, 93)
for _, i := range testRange {
for _, n := range testRange {
stream := NewStream()
stream.SetWritePos(i)
bytes := make([]by... | explode_data.jsonl/21202 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 226
} | [
2830,
3393,
3027,
1088,
332,
7078,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1944,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
6948,
1669,
2331,
7121,
8534,
1155,
340,
197,
18185,
6046,
1669,
633,
2271,
6046,
20574,
4859,
5444... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteVolume(t *testing.T) {
testCases := []struct {
name string
testFunc func(t *testing.T)
}{
{
name: "success normal",
testFunc: func(t *testing.T) {
req := &csi.DeleteVolumeRequest{
VolumeId: "vol-test",
}
expResp := &csi.DeleteVolumeResponse{}
ctx := context.Backgro... | explode_data.jsonl/61518 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1420
} | [
2830,
3393,
6435,
18902,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
18185,
9626,
2915,
1155,
353,
8840,
836,
340,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
5630,
4622,
756,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestAPISIXJsonSchemaValidator_Route_checkRemoteAddr(t *testing.T) {
tests := []struct {
caseDesc string
giveContent string
wantNewErr error
wantValidateErr error
}{
{
caseDesc: "correct remote_addr",
giveContent: `{
"id": "1",
"name": "route1",
"uri": "/*",
"upstre... | explode_data.jsonl/50252 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1646
} | [
2830,
3393,
2537,
1637,
5396,
5014,
8632,
14256,
2568,
2133,
7200,
24703,
13986,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
2722,
11065,
286,
914,
198,
197,
3174,
533,
2762,
257,
914,
198,
197,
50780,
3564,
7747,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTensorSerializationErrors(t *testing.T) {
// String tensors cannot be serialized
t1, err := NewTensor("abcd")
if err != nil {
t.Fatal(err)
}
buf := new(bytes.Buffer)
if n, err := t1.WriteContentsTo(buf); n != 0 || err == nil || buf.Len() != 0 {
t.Errorf("Got (%v, %v, %v) want (0, <non-nil>, 0)", n, e... | explode_data.jsonl/45868 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 296
} | [
2830,
3393,
25336,
35865,
13877,
1155,
353,
8840,
836,
8,
341,
197,
322,
923,
77087,
4157,
387,
32916,
198,
3244,
16,
11,
1848,
1669,
1532,
25336,
445,
68644,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
263... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetCertificate_failedAttempt(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusBadRequest)
}))
defer ts.Close()
d := createCertRetryAfter
f := testDidRemoveState
defer func() {
createCertRetryAfter = d
testDidRemoveSta... | explode_data.jsonl/65049 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 437
} | [
2830,
3393,
1949,
33202,
35060,
47052,
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,
69794,
19886,
69497,
340,
197,
44194,
16867,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJobRunsController_Update_Success(t *testing.T) {
t.Parallel()
ethClient, _, assertMocksCalled := cltest.NewEthMocksWithStartupAssertions(t)
defer assertMocksCalled()
app, cleanup := cltest.NewApplication(t,
ethClient,
)
defer cleanup()
app.Start()
tests := []struct {
name string
archived boo... | explode_data.jsonl/49851 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 660
} | [
2830,
3393,
12245,
73920,
2051,
47393,
87161,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
769,
2959,
11,
8358,
2060,
72577,
20960,
1669,
1185,
1944,
7121,
65390,
11571,
16056,
39076,
90206,
1155,
340,
16867,
2060,
72577,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFieldContains(t *testing.T) {
validate := New()
type StringTest struct {
Foo string `validate:"fieldcontains=Bar"`
Bar string
}
stringTest := &StringTest{
Foo: "foobar",
Bar: "bar",
}
errs := validate.Struct(stringTest)
Equal(t, errs, nil)
stringTest = &StringTest{
Foo: "foo",
Bar: "bar... | explode_data.jsonl/77299 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 476
} | [
2830,
3393,
1877,
23805,
1155,
353,
8840,
836,
8,
341,
197,
7067,
1669,
1532,
2822,
13158,
923,
2271,
2036,
341,
197,
12727,
2624,
914,
1565,
7067,
2974,
2566,
13372,
28,
3428,
8805,
197,
197,
3428,
914,
198,
197,
630,
11357,
2271,
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 TestParseResourceReturnType(t *testing.T) {
t.Parallel()
result, errs := ParseProgram(`
fun test(): @X {}
`)
require.Empty(t, errs)
utils.AssertEqualWithDiff(t,
[]ast.Declaration{
&ast.FunctionDeclaration{
Identifier: ast.Identifier{
Identifier: "test",
Pos: ast.Position{O... | explode_data.jsonl/35991 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 566
} | [
2830,
3393,
14463,
4783,
84362,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
9559,
11,
70817,
1669,
14775,
10690,
61528,
286,
2464,
1273,
4555,
569,
55,
5613,
197,
24183,
17957,
11180,
1155,
11,
70817,
692,
80206,
11711,
2993,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMaterializerNotASelect(t *testing.T) {
ms := &vtctldatapb.MaterializeSettings{
Workflow: "workflow",
SourceKeyspace: "sourceks",
TargetKeyspace: "targetks",
TableSettings: []*vtctldatapb.TableMaterializeSettings{{
TargetTable: "t1",
SourceExpression: "update t1 set val=1",
CreateDd... | explode_data.jsonl/61880 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 258
} | [
2830,
3393,
13415,
3135,
2623,
32,
3379,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
609,
9708,
302,
507,
266,
391,
65,
44253,
551,
6086,
515,
197,
197,
62768,
25,
981,
330,
56249,
756,
197,
197,
3608,
8850,
1306,
25,
330,
2427,
2787... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_filterArray(t *testing.T) {
as := assert.New(t)
t.Run("filterArray - success", func(t *testing.T) {
t.Run("int", func(t *testing.T) {
resp, err := lambda.
New([]int{0, 1, 2, 3}).
FilterList(func(idx int, obj interface{}) bool {
return obj.(int)%2 == 0
}).
ToIntSlice()
as.Nil(er... | explode_data.jsonl/2715 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 562
} | [
2830,
3393,
8727,
1857,
1155,
353,
8840,
836,
8,
341,
60451,
1669,
2060,
7121,
1155,
692,
3244,
16708,
445,
5315,
1857,
481,
2393,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3244,
16708,
445,
396,
497,
2915,
1155,
353,
8840,
836,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestToContainerStatsZeroCoresGeneratesError(t *testing.T) {
libcontainerStats := libcontainer.ContainerStats{
CgroupStats: &cgroups.Stats{
CpuStats: cgroups.CpuStats{
CpuUsage: cgroups.CpuUsage{
TotalUsage: 100,
},
},
},
}
_, err := toContainerStats(libcontainerStats)
if err == nil {
t... | explode_data.jsonl/400 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 149
} | [
2830,
3393,
1249,
4502,
16635,
17999,
34,
4589,
5531,
973,
1454,
1155,
353,
8840,
836,
8,
341,
93459,
3586,
16635,
1669,
3051,
3586,
33672,
16635,
515,
197,
6258,
4074,
16635,
25,
609,
66,
16753,
7758,
1862,
515,
298,
6258,
5584,
16635,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetUserStatusUnauthenticated(t *testing.T) {
r := getRouter(false)
r.GET("/", SetUserStatus(), func(c *gin.Context) {
// as the token cookie was not set, the "is_logged_in" should have been set
// to false by the SetUserStatus middleware
loggedInInterface, exists := c.Get("is_logged_in")
if exists &&... | explode_data.jsonl/57776 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 213
} | [
2830,
3393,
1649,
1474,
2522,
1806,
57707,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
633,
9523,
3576,
340,
7000,
17410,
35460,
2573,
1474,
2522,
1507,
2915,
1337,
353,
8163,
9328,
8,
341,
197,
197,
322,
438,
279,
3950,
12544,
572,
537... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccSnapshot_fromExistingSnapshot(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_snapshot", "second")
r := SnapshotResource{}
data.ResourceTest(t, r, []acceptance.TestStep{
{
Config: r.fromExistingSnapshot(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName)... | explode_data.jsonl/78020 | {
"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,
14603,
15009,
5673,
53067,
15009,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
25505,
25212,
83920,
1155,
11,
330,
1370,
324,
4195,
53265,
497,
330,
5569,
1138,
7000,
1669,
68697,
4783,
31483,
8924,
20766,
2271,
1155,
11,
435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConsumer_Transaction(t *testing.T) {
for _, tc := range []struct {
name string
td consumerdata.TraceData
}{
{name: "jaeger_full",
td: consumerdata.TraceData{SourceFormat: "jaeger",
Node: &commonpb.Node{Identifier: &commonpb.ProcessIdentifier{HostName: "host-abc"}},
Spans: []*tracepb.Span{{... | explode_data.jsonl/33583 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2118
} | [
2830,
3393,
29968,
34932,
1311,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
11609,
914,
198,
197,
76373,
256,
11502,
691,
46920,
1043,
198,
197,
59403,
197,
197,
47006,
25,
330,
5580,
1878,
16372,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrimitivePutString(t *testing.T) {
client := newPrimitiveClient()
var c *string
a, b, c := "goodrequest", "", nil
result, err := client.PutString(context.Background(), StringWrapper{Field: &a, Empty: &b, Null: c}, nil)
if err != nil {
t.Fatalf("PutString: %v", err)
}
if s := result.RawResponse.StatusC... | explode_data.jsonl/61681 | {
"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,
33313,
19103,
703,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
501,
33313,
2959,
741,
2405,
272,
353,
917,
198,
11323,
11,
293,
11,
272,
1669,
330,
18536,
2035,
497,
7342,
2092,
198,
9559,
11,
1848,
1669,
2943,
39825,
703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFIFO_addUpdate(t *testing.T) {
f := New(testFifoObjectKeyFunc)
f.Add(mkFifoObj("foo", 10)) // nolint: errcheck
f.Update(mkFifoObj("foo", 15)) // nolint: errcheck
if e, a := []interface{}{mkFifoObj("foo", 15)}, f.List(); !reflect.DeepEqual(e, a) {
t.Errorf("Expected %+v, got %+v", e, a)
}
if e, a :=... | explode_data.jsonl/69921 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 389
} | [
2830,
3393,
37,
25997,
2891,
4289,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
1532,
8623,
37,
31497,
1190,
1592,
9626,
340,
1166,
1904,
1255,
74,
37,
31497,
5261,
445,
7975,
497,
220,
16,
15,
593,
262,
442,
308,
337,
396,
25,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_DrawingObjects_DeleteDrawingObjectWithoutNodePath(t *testing.T) {
config := ReadConfiguration(t)
client, ctx := PrepareTest(t, config)
remoteDataFolder := remoteBaseTestDataFolder + "/DocumentElements/DrawingObjectss"
localFile := "Common/test_multi_pages.docx"
remoteFileName := "TestDelet... | explode_data.jsonl/60058 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
1557,
1696,
11543,
57418,
37437,
1190,
26040,
1955,
1820,
1155,
353,
8840,
836,
8,
341,
262,
2193,
1669,
4457,
7688,
1155,
340,
262,
2943,
11,
5635,
1669,
31166,
2271,
1155,
11,
2193,
340,
262,
8699,
1043,
13682,
1669,
8699,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInstallRelease_WrongKubeVersion(t *testing.T) {
c := helm.NewContext()
rs := rsFixture()
// TODO: Refactor this into a mock.
req := &services.InstallReleaseRequest{
Chart: &chart.Chart{
Metadata: &chart.Metadata{Name: "hello", KubeVersion: ">=5.0.0"},
Templates: []*chart.Template{
{Name: "temp... | explode_data.jsonl/45615 | {
"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,
24690,
16077,
2763,
14347,
42,
3760,
5637,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
33765,
7121,
1972,
741,
41231,
1669,
10036,
18930,
2822,
197,
322,
5343,
25,
8550,
5621,
419,
1119,
264,
7860,
624,
24395,
1669,
609,
12779... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSSH_UnknownDroplet(t *testing.T) {
withTestClient(t, func(config *CmdConfig, tm *tcMocks) {
tm.droplets.EXPECT().List().Return(testDropletList, nil)
config.Args = append(config.Args, "missing")
err := RunSSH(config)
assert.EqualError(t, err, "Could not find Droplet")
})
} | explode_data.jsonl/6477 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 113
} | [
2830,
3393,
62419,
62,
13790,
35,
299,
10819,
1155,
353,
8840,
836,
8,
341,
46948,
2271,
2959,
1155,
11,
2915,
8754,
353,
15613,
2648,
11,
17333,
353,
10413,
72577,
8,
341,
197,
3244,
76,
950,
299,
89492,
22402,
7285,
1005,
852,
1005,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWatchListFromZeroIndex(t *testing.T) {
codec := latest.Codec
pod := &api.Pod{JSONBase: api.JSONBase{ID: "foo"}}
fakeClient := NewFakeEtcdClient(t)
fakeClient.Data["/some/key"] = EtcdResponseWithError{
R: &etcd.Response{
Node: &etcd.Node{
Dir: true,
Nodes: etcd.Nodes{
&etcd.Node{
Va... | explode_data.jsonl/40981 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 711
} | [
2830,
3393,
14247,
852,
3830,
17999,
1552,
1155,
353,
8840,
836,
8,
341,
43343,
66,
1669,
5535,
20274,
66,
198,
3223,
347,
1669,
609,
2068,
88823,
90,
5370,
3978,
25,
6330,
18009,
3978,
90,
915,
25,
330,
7975,
9207,
630,
1166,
726,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemoteDivergedStatus(t *testing.T) {
output := `On branch chore/test
Your branch and 'origin/chore/test' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
nothing to commit, working tree clean`
mockRunner := NewMockRunner(output)
... | explode_data.jsonl/14065 | {
"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,
24703,
35,
1524,
3556,
2522,
1155,
353,
8840,
836,
8,
341,
21170,
1669,
1565,
1925,
8870,
49571,
12697,
198,
7771,
8870,
323,
364,
8611,
21284,
460,
12697,
6,
614,
36341,
3556,
345,
437,
614,
220,
16,
323,
220,
16,
2155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetCapacity(t *testing.T) {
d, _ := NewFakeDriver(t)
req := csi.GetCapacityRequest{}
resp, err := d.GetCapacity(context.Background(), &req)
assert.Nil(t, resp)
if !reflect.DeepEqual(err, status.Error(codes.Unimplemented, "")) {
t.Errorf("Unexpected error: %v", err)
}
} | explode_data.jsonl/59394 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 116
} | [
2830,
3393,
1949,
29392,
1155,
353,
8840,
836,
8,
341,
2698,
11,
716,
1669,
1532,
52317,
11349,
1155,
340,
24395,
1669,
272,
6321,
2234,
29392,
1900,
16094,
34653,
11,
1848,
1669,
294,
2234,
29392,
5378,
19047,
1507,
609,
2958,
340,
694... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMetricVec(t *testing.T) {
vec := NewGaugeVec(
GaugeOpts{
Name: "test",
Help: "helpless",
},
[]string{"l1", "l2"},
)
testMetricVec(t, vec)
} | explode_data.jsonl/14622 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 87
} | [
2830,
3393,
54310,
10050,
1155,
353,
8840,
836,
8,
341,
40213,
1669,
1532,
38,
19392,
10050,
1006,
197,
9600,
19392,
43451,
515,
298,
21297,
25,
330,
1944,
756,
298,
197,
12689,
25,
330,
8653,
1717,
756,
197,
197,
1583,
197,
197,
1294... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConverterFlushesBatches(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)
// Reset batch size setting upon test completion.
defer row.TestingSetDatumRowConverterBatchSize(0)()
// Helper to generate test name.
testName := func(format roachpb.IOFileFormat, batchSize int) string {
... | explode_data.jsonl/23766 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1234
} | [
2830,
3393,
14920,
46874,
288,
33,
9118,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
16867,
1487,
77940,
1155,
568,
7925,
1155,
340,
197,
322,
16932,
7162,
1379,
6243,
5193,
1273,
9755,
624,
16867,
2802,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreatingSubscriptionCloseCacheFirst(t *testing.T) {
cache := newSyncMapCache(t)
// create a subscription
s, err := cache.NewSubscription("ITB-1101")
if err != nil {
t.Fatalf("failed to create subscription: %s", err)
}
closeCache(t, cache)
s.Stop()
} | explode_data.jsonl/35586 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 96
} | [
2830,
3393,
24973,
33402,
7925,
8233,
5338,
1155,
353,
8840,
836,
8,
341,
52680,
1669,
501,
12154,
2227,
8233,
1155,
692,
197,
322,
1855,
264,
15142,
198,
1903,
11,
1848,
1669,
6500,
7121,
33402,
445,
952,
33,
12,
16,
16,
15,
16,
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... | 2 |
func TestSigPool(t *testing.T) {
blockHashs := make(map[int32]*common.Hash)
sigPool := NewSigPool()
sigArray := make([]*asiutil.BlockSign, 0)
for i := 1; i < 101; i++ {
descs := sigPool.MiningDescs(int32(i))
size := common.BlockSignDepth
if i <= 10 {
size = i - 1
}
if len(descs) != size {
t.Error(... | explode_data.jsonl/53801 | {
"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,
47246,
10551,
1155,
353,
8840,
836,
8,
1476,
47996,
6370,
82,
1669,
1281,
9147,
18640,
18,
17,
8465,
5464,
15103,
340,
84841,
10551,
1669,
1532,
47246,
10551,
741,
84841,
1857,
1669,
1281,
85288,
10215,
1314,
28477,
7264,
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... | 7 |
func TestGetUndeliveredEvents(t *testing.T) {
common.SetUpMockConfig()
defer func() {
err := common.TruncateDB(common.OnDisk)
if err != nil {
t.Fatalf("error: %v", err)
}
}()
eventByte := []byte(`event`)
if cerr := SaveUndeliveredEvents("destination", eventByte); cerr != nil {
t.Errorf("Error while maki... | explode_data.jsonl/49420 | {
"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,
1949,
19957,
301,
43056,
7900,
1155,
353,
8840,
836,
8,
341,
83825,
4202,
2324,
11571,
2648,
741,
16867,
2915,
368,
341,
197,
9859,
1669,
4185,
8240,
26900,
3506,
57802,
8071,
47583,
340,
197,
743,
1848,
961,
2092,
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... | 2 |
func TestContainer_getContainer(t *testing.T) {
x := Container{
Image: "my-image",
VolumeMounts: []corev1.VolumeMount{{Name: "my-vm"}},
Command: []string{"my-cmd"},
Args: []string{"my-args"},
Env: []corev1.EnvVar{{Name: "my-envvar"}},
Resources: corev1.ResourceRequirements{
... | explode_data.jsonl/72929 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 348
} | [
2830,
3393,
4502,
3062,
4502,
1155,
353,
8840,
836,
8,
341,
10225,
1669,
9678,
515,
197,
53397,
25,
286,
330,
2408,
13746,
756,
197,
17446,
4661,
16284,
82,
25,
3056,
98645,
16,
79106,
16284,
2979,
675,
25,
330,
2408,
12,
7338,
48085,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInnodbLockWaitTimeout(t *testing.T) {
store, clean := createMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop table if exists tk")
tk.MustExec("create table tk (c1 int primary key, c2 int)")
tk.MustExec("insert into tk values(1,1),(2,2),(3,3... | explode_data.jsonl/12467 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1998
} | [
2830,
3393,
641,
77,
16853,
11989,
14190,
7636,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestObjectCreateAbort(t *testing.T) {
ctx := context.Background()
c, rollback := makeConnectionWithContainer(t)
defer rollback()
out, err := c.ObjectCreate(ctx, CONTAINER, OBJECT2, true, "", "", nil)
if err != nil {
t.Fatal(err)
}
defer func() {
_ = c.ObjectDelete(ctx, CONTAINER, OBJECT2) // Ignore err... | explode_data.jsonl/12681 | {
"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,
1190,
4021,
85891,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1444,
11,
60414,
1669,
1281,
4526,
2354,
4502,
1155,
340,
16867,
60414,
2822,
13967,
11,
1848,
1669,
272,
8348,
4021,
7502,
11,
16120,
34521,
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 Test_MemoryStore_write(t *testing.T) {
m := NewMemoryStore()
m.Open()
pm := newPublishMsg(QOS_ONE, "/a/b/c", []byte{0xBE, 0xEF, 0xED})
pm.setMsgId(91)
key := ibound_mid2key(pm.MsgId())
m.Put(key, pm)
if len(m.messages) != 1 {
t.Fatalf("message not in store")
}
} | explode_data.jsonl/37295 | {
"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,
1245,
4731,
6093,
9165,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1532,
10642,
6093,
741,
2109,
12953,
2822,
86511,
1669,
501,
50145,
6611,
6253,
3126,
34727,
11,
3521,
64,
3470,
2899,
497,
3056,
3782,
90,
15,
85449,
11,
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... | 2 |
func TestResourceNames(t *testing.T) {
testCases := map[string]struct {
a api.ResourceList
expected []api.ResourceName
}{
"empty": {
a: api.ResourceList{},
expected: []api.ResourceName{},
},
"values": {
a: api.ResourceList{
api.ResourceCPU: resource.MustParse("100m"),
api.R... | explode_data.jsonl/59927 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 286
} | [
2830,
3393,
4783,
7980,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
11323,
286,
6330,
20766,
852,
198,
197,
42400,
3056,
2068,
20766,
675,
198,
197,
59403,
197,
197,
1,
3194,
788,
341,
298,
11323... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunNdt7(t *testing.T) {
if testing.Short() {
t.Skip("skip test in short mode")
}
sess := newSessionForTesting(t)
defer sess.Close()
builder, err := sess.NewExperimentBuilder("ndt7")
if err != nil {
t.Fatal(err)
}
if !builder.Interruptible() {
t.Fatal("ndt7 not marked as interruptible")
}
runexp... | explode_data.jsonl/26309 | {
"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,
6727,
45,
8047,
22,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
20599,
1273,
304,
2805,
3856,
1138,
197,
532,
1903,
433,
1669,
501,
5283,
2461,
16451,
1155,
340,
16867,
21875,
10421,
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... | 4 |
func TestWithLogger(t *testing.T) {
t.Parallel()
Convey("Given a logger and dialer", t, func() {
dialer := &mockDialerStruct{}
Convey("When Dial is called with logger", func() {
c, _ := mockDial(dialer, WithLogger(dialer.logger))
Convey("Then the client logger should be set", func() {
So(c.logger, Shou... | explode_data.jsonl/53402 | {
"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,
2354,
7395,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
93070,
5617,
445,
22043,
264,
5925,
323,
27860,
261,
497,
259,
11,
2915,
368,
341,
197,
2698,
530,
261,
1669,
609,
16712,
35,
530,
261,
9422,
16094,
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 TestSecWebSocketAccept(t *testing.T) {
nonce := []byte("dGhlIHNhbXBsZSBub25jZQ==")
expected := []byte("s3pPLMBiTxaQ9kYGzzhZRbK+xOo=")
accept, err := getNonceAccept(nonce)
if err != nil {
t.Errorf("getNonceAccept: returned error %v", err)
return
}
if !bytes.Equal(expected, accept) {
t.Errorf("getNonceAc... | explode_data.jsonl/53434 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 164
} | [
2830,
3393,
8430,
61238,
16646,
1155,
353,
8840,
836,
8,
341,
197,
39593,
1669,
3056,
3782,
445,
67,
38,
17958,
40,
43165,
49039,
59272,
82,
57,
16680,
392,
17,
20,
73,
57,
48,
418,
1138,
42400,
1669,
3056,
3782,
445,
82,
18,
79,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWebRequestEventInterfaces(t *testing.T) {
assert := assert.New(t)
ee := NewHTTPRequestEvent(&http.Request{Host: "test.com", URL: &url.URL{}}).WithHeadings("heading").WithLabel("foo", "bar")
eventProvider, isEvent := MarshalEvent(ee)
assert.True(isEvent)
assert.Equal(HTTPRequest, eventProvider.Flag())
a... | explode_data.jsonl/8485 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 213
} | [
2830,
3393,
46295,
1556,
41066,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
197,
2127,
1669,
1532,
63765,
1556,
2099,
1254,
9659,
90,
9296,
25,
330,
1944,
905,
497,
5548,
25,
609,
1085,
20893,
90,
3417,
568,
2354,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPKCSKeyGeneratorFailure(t *testing.T) {
dec := new(rsaDecrypterSigner)
dec.privateKey = rsaTestKey
generator := failingKeyGenerator{}
_, err := dec.decrypt(make([]byte, 256), RSA1_5, generator)
if err != ErrCryptoFailure {
t.Error("should return error on invalid algorithm")
}
} | explode_data.jsonl/63200 | {
"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,
22242,
6412,
1592,
12561,
17507,
1155,
353,
8840,
836,
8,
341,
197,
8169,
1669,
501,
2601,
9081,
89660,
261,
7264,
261,
340,
197,
8169,
61603,
1592,
284,
68570,
2271,
1592,
198,
3174,
15312,
1669,
21394,
1592,
12561,
16094,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnvValueWithExistingRunConfigEnv(t *testing.T) {
b := newBuilderWithMockBackend()
sb := newDispatchRequest(b, '\\', nil, newBuildArgs(make(map[string]*string)), newStagesBuildResults())
sb.state.runConfig.Env = []string{"var1=old", "var2=fromenv"}
envCommand := &instructions.EnvCommand{
Env: instructions... | explode_data.jsonl/34860 | {
"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,
14359,
1130,
2354,
53067,
6727,
2648,
14359,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
501,
3297,
2354,
11571,
29699,
741,
24842,
1669,
501,
11283,
1900,
1883,
11,
28078,
516,
2092,
11,
501,
11066,
4117,
36944,
9147,
14032,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFloat32Between(t *testing.T) {
assert := assert.New(t)
var verr error
var val float32 = 5.0
verr = Float32(&val).Between(1, 10)()
assert.Nil(verr)
verr = Float32(nil).Between(5, 10)()
assert.NotNil(verr)
assert.Nil(ErrValue(verr))
assert.Equal(ErrFloat32Min, ErrCause(verr))
val = 1.0
verr = Float... | explode_data.jsonl/11544 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 335
} | [
2830,
3393,
5442,
18,
17,
25477,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
2405,
71467,
1465,
198,
2405,
1044,
2224,
18,
17,
284,
220,
20,
13,
15,
198,
197,
423,
81,
284,
13001,
18,
17,
2099,
831,
568,
25477... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildServiceMapAddRemove(t *testing.T) {
ipt := iptablestest.NewFake()
ipvs := ipvstest.NewFake()
ipset := ipsettest.NewFake(testIPSetVersion)
fp := NewFakeProxier(ipt, ipvs, ipset, nil, nil, v1.IPv4Protocol)
services := []*v1.Service{
makeTestService("somewhere-else", "cluster-ip", func(svc *v1.Servic... | explode_data.jsonl/44363 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1968
} | [
2830,
3393,
11066,
1860,
2227,
2212,
13021,
1155,
353,
8840,
836,
8,
341,
8230,
417,
1669,
66068,
480,
267,
477,
7121,
52317,
741,
46531,
11562,
1669,
45475,
267,
477,
7121,
52317,
741,
46531,
746,
1669,
5997,
746,
1944,
7121,
52317,
86... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckMassTransferWithProofs(t *testing.T) {
to, path := createCheckerTestObjects(t)
defer func() {
to.stor.close(t)
err := common.CleanTemporaryDirs(path)
assert.NoError(t, err, "failed to clean test data dirs")
}()
entriesNum := 50
entries := generateMassTransferEntries(t, entriesNum)
tx := cre... | explode_data.jsonl/63094 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 485
} | [
2830,
3393,
3973,
25824,
21970,
2354,
31076,
82,
1155,
353,
8840,
836,
8,
341,
31709,
11,
1815,
1669,
1855,
35188,
2271,
11543,
1155,
692,
16867,
2915,
368,
341,
197,
31709,
1236,
269,
4653,
1155,
692,
197,
9859,
1669,
4185,
727,
2675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetPipelineTemplate(t *testing.T) {
store, manager, p := initWithPipeline(t)
defer store.Close()
actualTemplate, err := manager.GetPipelineTemplate(p.UUID)
assert.Nil(t, err)
assert.Equal(t, []byte(testWorkflow.ToStringForStore()), actualTemplate)
} | explode_data.jsonl/28352 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 97
} | [
2830,
3393,
1949,
34656,
7275,
1155,
353,
8840,
836,
8,
341,
57279,
11,
6645,
11,
281,
1669,
13864,
34656,
1155,
340,
16867,
3553,
10421,
741,
88814,
7275,
11,
1848,
1669,
6645,
2234,
34656,
7275,
1295,
39636,
340,
6948,
59678,
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 |
func TestUCompact_EncodeNegative(t *testing.T) {
negNumber := NewUCompact(big.NewInt(-100))
var buffer = bytes.Buffer{}
err := scale.NewEncoder(&buffer).Encode(negNumber)
assert.Error(t, err)
} | explode_data.jsonl/18412 | {
"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,
52,
98335,
93529,
534,
38489,
1155,
353,
8840,
836,
8,
341,
9038,
791,
2833,
1669,
1532,
52,
98335,
75616,
7121,
1072,
4080,
16,
15,
15,
1171,
2405,
4147,
284,
5820,
22622,
16094,
9859,
1669,
5452,
7121,
19921,
2099,
7573,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInvalidJSONFields(t *testing.T) {
env := NewTestVDBEnv(t)
env.Cleanup("testinvalidfields_")
defer env.Cleanup("testinvalidfields_")
db, err := env.DBProvider.GetDBHandle("testinvalidfields")
testutil.AssertNoError(t, err, "")
db.Open()
defer db.Close()
batch := statedb.NewUpdateBatch()
jsonValue1 ... | explode_data.jsonl/600 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 628
} | [
2830,
3393,
7928,
5370,
8941,
1155,
353,
8840,
836,
8,
1476,
57538,
1669,
1532,
2271,
53,
3506,
14359,
1155,
340,
57538,
727,
60639,
445,
1944,
11808,
9007,
62,
1138,
16867,
6105,
727,
60639,
445,
1944,
11808,
9007,
62,
5130,
20939,
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 TestUpdateQueriesPrepared(t *testing.T) {
skipPreparedTests(t)
var skipped []string
if types.IsFormat_DOLT_1(types.Format_Default) {
// skip select join for update
skipped = make([]string, 0)
for _, q := range queries.UpdateTests {
if strings.Contains(strings.ToLower(q.WriteQuery), "join") {
skippe... | explode_data.jsonl/38736 | {
"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,
4289,
55261,
4703,
7212,
1155,
353,
8840,
836,
8,
341,
1903,
13389,
4703,
7212,
18200,
1155,
340,
2405,
35157,
3056,
917,
198,
743,
4494,
4506,
4061,
1557,
35320,
62,
16,
52613,
9978,
60336,
8,
341,
197,
197,
322,
10706,
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... | 4 |
func TestMsgMsgMintNFTValidateBasicMethod(t *testing.T) {
newMsgMintNFT := types.NewMsgMintNFT(id, denom, nftName, tokenURI, uriHash, tokenData, "", address2.String())
err := newMsgMintNFT.ValidateBasic()
require.Error(t, err)
newMsgMintNFT = types.NewMsgMintNFT("", denom, nftName, tokenURI, uriHash, tokenData, ad... | explode_data.jsonl/28176 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 303
} | [
2830,
3393,
6611,
6611,
44,
396,
45,
3994,
17926,
15944,
3523,
1155,
353,
8840,
836,
8,
341,
8638,
6611,
44,
396,
45,
3994,
1669,
4494,
7121,
6611,
44,
396,
45,
3994,
3724,
11,
49744,
11,
308,
723,
675,
11,
3950,
10301,
11,
13071,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBackupRestoreSubsetCreatedStats(t *testing.T) {
defer leaktest.AfterTest(t)()
const numAccounts = 1
_, _, sqlDB, _, cleanupFn := BackupRestoreTestSetup(t, singleNode, numAccounts, InitNone)
defer cleanupFn()
sqlDB.Exec(t, `SET CLUSTER SETTING sql.stats.automatic_collection.enabled=false`)
sqlDB.Exec(t... | explode_data.jsonl/57620 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 468
} | [
2830,
3393,
56245,
56284,
70584,
11694,
16635,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
4777,
1629,
41369,
284,
220,
16,
198,
197,
6878,
8358,
5704,
3506,
11,
8358,
21290,
24911,
1669,
43438,
56284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.