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 TestUploadOrderMultiBufferedReaderExceedTotalParts(t *testing.T) {
s, ops, _ := loggingSvc([]string{"UploadPart"})
mgr := s3manager.NewUploaderWithClient(s, func(u *s3manager.Uploader) {
u.Concurrency = 1
u.MaxUploadParts = 2
})
resp, err := mgr.Upload(&s3manager.UploadInput{
Bucket: aws.String("Bucket")... | explode_data.jsonl/55647 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 466
} | [
2830,
3393,
13844,
4431,
20358,
4095,
17120,
840,
4635,
7595,
28921,
1155,
353,
8840,
836,
8,
341,
1903,
11,
27132,
11,
716,
1669,
8392,
92766,
10556,
917,
4913,
13844,
5800,
23625,
2109,
901,
1669,
274,
18,
13297,
7121,
67574,
2354,
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 TestOCIConveyorOCILayout(t *testing.T) {
test.DropPrivilege(t)
defer test.ResetPrivilege(t)
archive, err := getTestTar(ociArchiveURI)
if err != nil {
t.Fatalf("Could not download oci archive test file: %v", err)
}
defer os.Remove(archive)
// We need to extract the oci archive to a directory
// Don't wa... | explode_data.jsonl/48101 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 470
} | [
2830,
3393,
63983,
1109,
68869,
7612,
1715,
1407,
1155,
353,
8840,
836,
8,
341,
18185,
21688,
32124,
42769,
1155,
340,
16867,
1273,
36660,
32124,
42769,
1155,
692,
197,
16019,
11,
1848,
1669,
633,
2271,
62733,
7,
2119,
42502,
10301,
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... | 7 |
func TestGetOrderInfo(t *testing.T) {
_, err := b.GetOrderInfo("1337")
if err == nil {
t.Error("Test failed - GetOrderInfo() error", err)
}
} | explode_data.jsonl/49000 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 58
} | [
2830,
3393,
1949,
4431,
1731,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
293,
2234,
4431,
1731,
445,
16,
18,
18,
22,
1138,
743,
1848,
621,
2092,
341,
197,
3244,
6141,
445,
2271,
4641,
481,
2126,
4431,
1731,
368,
1465,
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
] | 2 |
func TestBadPC(t *testing.T) {
t.Parallel()
type pcTest struct {
script, off int
}
pcTests := []pcTest{
{
script: 2,
off: 0,
},
{
script: 0,
off: 2,
},
}
// tx with almost empty scripts.
tx := &wire.MsgTx{
Version: 1,
TxIn: []*wire.TxIn{
{
PreviousOutPoint: wire.OutPoint{
... | explode_data.jsonl/24198 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 725
} | [
2830,
3393,
17082,
4872,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
13158,
13312,
2271,
2036,
341,
197,
86956,
11,
1007,
526,
198,
197,
532,
82013,
18200,
1669,
3056,
3992,
2271,
515,
197,
197,
515,
298,
86956,
25,
220,
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... | 5 |
func TestRangeCacheEntryUpdateLease(t *testing.T) {
defer leaktest.AfterTest(t)()
rep1 := roachpb.ReplicaDescriptor{
NodeID: 1,
StoreID: 1,
ReplicaID: 1,
}
rep2 := roachpb.ReplicaDescriptor{
NodeID: 2,
StoreID: 2,
ReplicaID: 2,
}
repNonMember := roachpb.ReplicaDescriptor{
NodeID: 3,
... | explode_data.jsonl/28197 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1232
} | [
2830,
3393,
6046,
8233,
5874,
4289,
2304,
519,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
73731,
16,
1669,
926,
610,
16650,
2817,
79,
15317,
11709,
515,
197,
30217,
915,
25,
262,
220,
16,
345,
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 TestPermanentError(t *testing.T) {
err := new(fakeError)
permErr := NewPermanentError(err)
if !IsPermanentError(permErr) {
t.Errorf("Expected type %T to be a permanentError", permErr)
}
if IsPermanentError(err) {
t.Errorf("Expected type %T to not be a permanentError", err)
}
wrapPermErr := fmt.Errorf("... | explode_data.jsonl/45289 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 232
} | [
2830,
3393,
78793,
1454,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
501,
74138,
1454,
340,
197,
19913,
7747,
1669,
1532,
78793,
1454,
3964,
340,
743,
753,
3872,
78793,
1454,
7,
19913,
7747,
8,
341,
197,
3244,
13080,
445,
18896,
943,
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... | 5 |
func TestGetSessions(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
user := th.BasicUser
th.Client.Login(user.Email, user.Password)
sessions, _, err := th.Client.GetSessions(user.Id, "")
require.NoError(t, err)
for _, session := range sessions {
require.Equal(t, user.Id, session.UserId, "use... | explode_data.jsonl/47530 | {
"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,
59062,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
19060,
1669,
270,
48868,
1474,
271,
70479,
11716,
32499,
4277,
24066,
11,
1196,
25690,
692,
1903,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRulePrefixLike(t *testing.T) {
common.Log.Debug("Entering function: %s", common.GetFunctionName())
sqls := []string{
"select col from tbl where id like '%abc'",
"select col from tbl where id like '_abc'",
}
for _, sql := range sqls {
q, err := NewQuery4Audit(sql)
if err == nil {
rule := q.RulePr... | explode_data.jsonl/76743 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 229
} | [
2830,
3393,
11337,
14335,
12949,
1155,
353,
8840,
836,
8,
341,
83825,
5247,
20345,
445,
82867,
729,
25,
1018,
82,
497,
4185,
2234,
5152,
675,
2398,
30633,
82,
1669,
3056,
917,
515,
197,
197,
1,
1742,
1375,
504,
21173,
1380,
877,
1075,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMissingValidEntityToConfigure(t *testing.T) {
toggleNonInteractive()
defer toggleNonInteractive()
data := aws.GenerateAwsTfConfigurationArgs{}
err := promptAwsGenerate(&data, &aws.ExistingIamRoleDetails{}, &AwsGenerateCommandExtraState{Output: "/tmp"})
assert.Error(t, err)
assert.Equal(t, "must enable c... | explode_data.jsonl/19408 | {
"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,
25080,
4088,
3030,
1249,
28560,
1155,
353,
8840,
836,
8,
341,
3244,
5216,
8121,
71686,
741,
16867,
14999,
8121,
71686,
2822,
8924,
1669,
31521,
57582,
47359,
51,
69,
7688,
4117,
16094,
9859,
1669,
9934,
47359,
31115,
2099,
691... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReffedConn(t *testing.T) {
tracking := &closeReffedConn{}
wrapper := dialer.NewRefCountedConnWrapper(tracking, nil)
conn1 := wrapper.Ref()
conn2 := wrapper.Ref()
test.That(t, conn1.Close(), test.ShouldBeNil)
test.That(t, tracking.closeCalled, test.ShouldEqual, 0)
test.That(t, conn2.Close(), test.ShouldB... | explode_data.jsonl/35829 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 233
} | [
2830,
3393,
693,
542,
291,
9701,
1155,
353,
8840,
836,
8,
341,
25583,
8985,
1669,
609,
5552,
693,
542,
291,
9701,
16094,
6692,
5518,
1669,
27860,
261,
7121,
98537,
291,
9701,
11542,
7624,
8985,
11,
2092,
340,
32917,
16,
1669,
13261,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVariablesWithExternalLinking(t *testing.T) {
protest.MustHaveCgo(t)
// Tests that macOSDebugFrameBugWorkaround works.
// See:
// https://github.com/golang/go/issues/25841
// https://github.com/go-delve/delve/issues/2346
withTestProcessArgs("testvariables2", t, ".", []string{}, protest.BuildModeExternal... | explode_data.jsonl/56355 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 282
} | [
2830,
3393,
7827,
16056,
25913,
3939,
287,
1155,
353,
8840,
836,
8,
341,
197,
776,
1944,
50463,
12116,
34,
3346,
1155,
340,
197,
322,
20150,
429,
67178,
7939,
4369,
46773,
6776,
19454,
4278,
624,
197,
322,
3496,
510,
197,
322,
220,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_ListTestDefinitionNames(t *testing.T) {
testData := []struct {
testName string
shouldFail bool
inputDefinitions oct.TestDefinitionList
expectedResult []string
}{
{
testName: "correct list",
shouldFail: false,
inputDefinitions: oct.TestDefinitionList{
Items: []oct.Tes... | explode_data.jsonl/20536 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 600
} | [
2830,
3393,
27104,
2271,
10398,
7980,
1155,
353,
8840,
836,
8,
341,
18185,
1043,
1669,
3056,
1235,
341,
197,
18185,
675,
260,
914,
198,
197,
197,
5445,
19524,
981,
1807,
198,
197,
22427,
50542,
18491,
8787,
10398,
852,
198,
197,
42400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNonsenseKey(t *testing.T) {
var args struct {
X []string `arg:"positional, nonsense"`
}
err := parse("x", &args)
assert.Error(t, err)
} | explode_data.jsonl/13012 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 60
} | [
2830,
3393,
45,
97733,
1592,
1155,
353,
8840,
836,
8,
341,
2405,
2827,
2036,
341,
197,
22123,
3056,
917,
1565,
858,
2974,
966,
3005,
11,
40802,
8805,
197,
532,
9859,
1669,
4715,
445,
87,
497,
609,
2116,
340,
6948,
6141,
1155,
11,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStreamWriter4(t *testing.T) {
runBadgerTest(t, nil, func(t *testing.T, db *DB) {
// first insert some entries in db
for i := 0; i < 10; i++ {
err := db.Update(func(txn *Txn) error {
key := []byte(fmt.Sprintf("key-%d", i))
value := []byte(fmt.Sprintf("val-%d", i))
return txn.Set(key, value)
... | explode_data.jsonl/17982 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 334
} | [
2830,
3393,
93031,
19,
1155,
353,
8840,
836,
8,
341,
56742,
17082,
1389,
2271,
1155,
11,
2092,
11,
2915,
1155,
353,
8840,
836,
11,
2927,
353,
3506,
8,
341,
197,
197,
322,
1156,
5656,
1045,
10695,
304,
2927,
198,
197,
2023,
600,
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 TestResolvePathParam(t *testing.T) {
cxt := context.NewTestContext(t)
m := &Manifest{
Parameters: []ParameterDefinition{
{
Name: "person",
Destination: Location{
Path: "person.txt",
},
},
},
}
rm := NewRuntimeManifest(cxt.Context, ActionInstall, m)
s := &Step{
Data: map[string]int... | explode_data.jsonl/37708 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 448
} | [
2830,
3393,
56808,
93492,
1155,
353,
8840,
836,
8,
341,
1444,
2252,
1669,
2266,
7121,
2271,
1972,
1155,
340,
2109,
1669,
609,
38495,
515,
197,
197,
9706,
25,
3056,
4971,
10398,
515,
298,
197,
515,
571,
21297,
25,
330,
8987,
756,
571,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestKendall(t *testing.T) {
for i, test := range []struct {
x []float64
y []float64
weights []float64
ans float64
}{
{
x: []float64{0, 1, 2, 3},
y: []float64{0, 1, 2, 3},
weights: nil,
ans: 1,
},
{
x: []float64{0, 1},
y: []float64{1, 0},... | explode_data.jsonl/1761 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 826
} | [
2830,
3393,
42,
408,
541,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
1273,
1669,
2088,
3056,
1235,
341,
197,
10225,
981,
3056,
3649,
21,
19,
198,
197,
14522,
981,
3056,
3649,
21,
19,
198,
197,
197,
13327,
3056,
3649,
21,
19,
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 TestMatSplit(t *testing.T) {
src := IMRead("images/face.jpg", 1)
chans := Split(src)
if len(chans) != src.Channels() {
t.Error("Split Channel count differs")
}
dst := NewMat()
Merge(chans, &dst)
diff := NewMat()
AbsDiff(src, dst, &diff)
sum := diff.Sum()
if sum.Val1 != 0 || sum.Val2 != 0 || sum.Val3 !=... | explode_data.jsonl/81718 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
11575,
20193,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
6517,
4418,
445,
3642,
14,
1564,
4819,
497,
220,
16,
340,
23049,
596,
1669,
27810,
14705,
340,
743,
2422,
7520,
596,
8,
961,
2286,
6353,
6680,
368,
341,
197,
3244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestBackoffLifecycle(t *testing.T) {
count := 0
testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
count++
t.Logf("Attempt %d", count)
if count == 5 || count == 9 {
w.WriteHeader(http.StatusOK)
return
} else {
w.WriteHeader(http.StatusGatewayTimeou... | explode_data.jsonl/13271 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 527
} | [
2830,
3393,
3707,
1847,
62731,
1155,
353,
8840,
836,
8,
341,
18032,
1669,
220,
15,
198,
18185,
5475,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
4232,
353,
1254,
9659,
8,
341,
197,
18032,
22940,
197,
3244... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestCreateStorageKeyDoubleMapV10(t *testing.T) {
m := ExamplaryMetadataV10
key, err := CreateStorageKey(m, "Session", "NextKeys",
[]byte{0x34, 0x3a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x6b, 0x65, 0x79, 0x73},
[]byte{0xbe, 0x5d, 0xdb, 0x15, 0x79, 0xb7, 0x2e, 0x84, 0x52, 0x4f, 0xc2, 0x9e, 0x78, 0x... | explode_data.jsonl/3058 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 482
} | [
2830,
3393,
4021,
5793,
1592,
7378,
2227,
53,
16,
15,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
32310,
500,
658,
14610,
53,
16,
15,
198,
23634,
11,
1848,
1669,
4230,
5793,
1592,
1255,
11,
330,
5283,
497,
330,
5847,
8850,
756,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewDNSProviderConfig(t *testing.T) {
testCases := []struct {
desc string
loginToken string
expected string
}{
{
desc: "success",
loginToken: "123",
},
{
desc: "missing credentials",
expected: "dnspod: credentials missing",
},
}
for _, test := range testCases {
... | explode_data.jsonl/70414 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 311
} | [
2830,
3393,
3564,
61088,
5179,
2648,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
981,
914,
198,
197,
75755,
3323,
914,
198,
197,
42400,
256,
914,
198,
197,
59403,
197,
197,
515,
298,
41653,
25,
981,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnableJob_CrdFailure(t *testing.T) {
store, manager, job := initWithJob(t)
defer store.Close()
manager.scheduledWorkflowClient = &FakeBadScheduledWorkflowClient{}
err := manager.EnableJob(job.UUID, false)
assert.Equal(t, codes.Internal, err.(*util.UserError).ExternalStatusCode())
assert.Contains(t, err.E... | explode_data.jsonl/28383 | {
"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,
11084,
12245,
920,
6498,
17507,
1155,
353,
8840,
836,
8,
341,
57279,
11,
6645,
11,
2618,
1669,
13864,
12245,
1155,
340,
16867,
3553,
10421,
741,
92272,
514,
26644,
62768,
2959,
284,
609,
52317,
17082,
88137,
62768,
2959,
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... | 1 |
func TestInstallPluginCommand(t *testing.T) {
pluginsDir := setupFakePluginsDir(t)
c, err := commandstest.NewCliContext(map[string]string{"pluginsDir": pluginsDir})
require.NoError(t, err)
client := &commandstest.FakeGrafanaComClient{
GetPluginFunc: func(pluginId, repoUrl string) (models.Plugin, error) {
requ... | explode_data.jsonl/74303 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 585
} | [
2830,
3393,
24690,
11546,
4062,
1155,
353,
8840,
836,
8,
341,
197,
18716,
6184,
1669,
6505,
52317,
45378,
6184,
1155,
340,
1444,
11,
1848,
1669,
3210,
267,
477,
7121,
87014,
1972,
9147,
14032,
30953,
4913,
18716,
6184,
788,
17215,
6184,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_CardinalityUnsafeSet(t *testing.T) {
a := NewThreadUnsafeSet()
if a.Cardinality() != 0 {
t.Error("set should be an empty set")
}
a.Add(1)
if a.Cardinality() != 1 {
t.Error("set should have a size of 1")
}
a.Remove(1)
if a.Cardinality() != 0 {
t.Error("set should be an empty set")
}
a.Add... | explode_data.jsonl/181 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 207
} | [
2830,
3393,
920,
567,
80777,
78770,
1649,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
1532,
6855,
78770,
1649,
2822,
743,
264,
48613,
80777,
368,
961,
220,
15,
341,
197,
3244,
6141,
445,
746,
1265,
387,
458,
4287,
738,
1138,
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... | 6 |
func TestDatabaseFetchBlocksNamespaceNotOwned(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
ctx := context.NewContext()
defer ctx.Close()
d, mapCh, _ := newTestDatabase(t, ctrl, Bootstrapped)
defer func() {
close(mapCh)
}()
now := time.Now()
starts := []time.Time{now, now.Add(time.Se... | explode_data.jsonl/46528 | {
"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,
5988,
20714,
29804,
22699,
2623,
57641,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
20985,
1669,
2266,
7121,
1972,
741,
16867,
5635,
10421,
2822,
2698,
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 TestAPISIXJsonSchemaValidator_checkUpstream(t *testing.T) {
validator, err := NewAPISIXJsonSchemaValidator("main.route")
assert.Nil(t, err)
// type:chash, hash_on: consumer, missing key, ok
route := &entity.Route{}
reqBody := `{
"id": "1",
"name": "route1",
"methods": ["GET"],
"upstream": {
"node... | explode_data.jsonl/50250 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1252
} | [
2830,
3393,
2537,
1637,
5396,
5014,
8632,
14256,
7200,
2324,
4027,
1155,
353,
8840,
836,
8,
341,
197,
16112,
11,
1848,
1669,
1532,
2537,
1637,
5396,
5014,
8632,
14256,
445,
3817,
11842,
1138,
6948,
59678,
1155,
11,
1848,
692,
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 TestSubbyJSON(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedSubby(popr, true)
marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}
jsondata, err := marshaler.MarshalToString(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
... | explode_data.jsonl/697 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 312
} | [
2830,
3393,
3136,
1694,
5370,
1155,
353,
8840,
836,
8,
341,
197,
22602,
1669,
882,
13244,
1005,
55832,
83819,
741,
3223,
46288,
1669,
6888,
33864,
7121,
37270,
33864,
7121,
3608,
44163,
1171,
3223,
1669,
1532,
11598,
7757,
3136,
1694,
401... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBar(t *testing.T) {
bar := New(0)
if err := bar.Add(1); err == nil {
t.Error("should have an error for 0 bar")
}
bar = New(10)
if err := bar.Add(11); err == nil {
t.Error("should have an error for adding > bar")
}
} | explode_data.jsonl/52760 | {
"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,
3428,
1155,
353,
8840,
836,
8,
341,
90709,
1669,
1532,
7,
15,
340,
743,
1848,
1669,
3619,
1904,
7,
16,
1215,
1848,
621,
2092,
341,
197,
3244,
6141,
445,
5445,
614,
458,
1465,
369,
220,
15,
3619,
1138,
197,
532,
90709,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPbft(t *testing.T) {
q, chain, p2pnet, s, mem, exec, cs, wallet := initEnvPbft()
defer chain.Close()
defer mem.Close()
defer p2pnet.Close()
defer exec.Close()
defer s.Close()
defer cs.Close()
defer q.Close()
defer wallet.Close()
time.Sleep(5 * time.Second)
sendReplyList(q)
clearTestData()
} | explode_data.jsonl/66282 | {
"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,
47,
65,
723,
1155,
353,
8840,
836,
8,
341,
18534,
11,
8781,
11,
281,
17,
79,
4711,
11,
274,
11,
1833,
11,
3883,
11,
10532,
11,
15085,
1669,
2930,
14359,
47,
65,
723,
741,
16867,
8781,
10421,
741,
16867,
1833,
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... | 1 |
func TestIssue29WithNumericTable(t *testing.T) {
NegativeTest{
Name: "issue29 with numeric column",
Query: "CREATE TABLE 1(foo)",
}.Run(t)
} | explode_data.jsonl/31977 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 57
} | [
2830,
3393,
42006,
17,
24,
2354,
36296,
2556,
1155,
353,
8840,
836,
8,
341,
18317,
15060,
2271,
515,
197,
21297,
25,
220,
330,
11159,
17,
24,
448,
24064,
3250,
756,
197,
60362,
25,
330,
22599,
14363,
220,
16,
71880,
15752,
197,
7810,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOverlayMount(t *testing.T) {
if err := common.SupportsOverlay(); err != nil {
t.Skipf("Overlay fs not supported: %v", err)
}
tests := []overlay.MountCfg{
{"test1", "test2", "test3", "merged", ""},
{"test:1", "test:2", "test:3", "merged:1", ""},
{"test,1", "test,2", "test,3", "merged,1", ""},
}
f... | explode_data.jsonl/989 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 222
} | [
2830,
3393,
32755,
16284,
1155,
353,
8840,
836,
8,
341,
743,
1848,
1669,
4185,
79990,
82,
32755,
2129,
1848,
961,
2092,
341,
197,
3244,
57776,
69,
445,
32755,
8619,
537,
7248,
25,
1018,
85,
497,
1848,
340,
197,
630,
78216,
1669,
3056,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func Test_Mock_Return_Nothing(t *testing.T) {
// make a test impl object
var mockedService = new(TestExampleImplementation)
c := mockedService.
On("TheExampleMethod", "A", "B", true).
Return()
require.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
call := mockedService.ExpectedCalls[0]
as... | explode_data.jsonl/8587 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 222
} | [
2830,
3393,
1245,
1176,
53316,
36989,
1596,
1155,
353,
8840,
836,
8,
8022,
197,
322,
1281,
264,
1273,
11605,
1633,
319,
2405,
46149,
1860,
284,
501,
31159,
13314,
36850,
7229,
1444,
1669,
46149,
1860,
3224,
197,
86391,
445,
785,
13314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClient_Query2(t *testing.T) {
client := requireClient(t, true)
q := "Select+id,createdbyid,parentid,parent.casenumber,parent.subject,createdby.name,createdby.alias+from+casecomment"
result, err := client.Query(q)
if err != nil {
t.FailNow()
}
if len(result.Records) > 0 {
comment1 := &result.Records[... | explode_data.jsonl/27755 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 180
} | [
2830,
3393,
2959,
48042,
17,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
1373,
2959,
1155,
11,
830,
692,
18534,
1669,
330,
3379,
10,
307,
11,
7120,
1694,
307,
90616,
307,
90616,
520,
300,
268,
890,
90616,
33243,
11,
7120,
1694,
2644,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetPVCNamesFromPod(t *testing.T) {
rand.Seed(time.Now().UnixNano())
pod := v1.Pod{}
var pvcNamesWant []string
for i := 1; i <= 30; i++ {
switch rand.Intn(4) {
case 0:
pod.Spec.Volumes = append(pod.Spec.Volumes, v1.Volume{
Name: "volume" + strconv.Itoa(i),
VolumeSource: v1.VolumeSource{
... | explode_data.jsonl/28339 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 695
} | [
2830,
3393,
1949,
47,
11287,
7980,
3830,
23527,
1155,
353,
8840,
836,
8,
341,
7000,
437,
5732,
291,
9730,
13244,
1005,
55832,
83819,
2398,
3223,
347,
1669,
348,
16,
88823,
16094,
2405,
281,
7362,
7980,
28823,
3056,
917,
198,
2023,
600,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLimitSpecSerialization(t *testing.T) {
limit := &DefaultLimit{
LimitType: Default,
Limit: 10000,
Columns: []sorting.OrderByColumn{
{
Dimension: "dim1",
Direction: sorting.Ascending,
DimensionOrder: sorting.Lexicographic,
},
},
}
jsonBytes, _ := json.Marshal(limit)
ex... | explode_data.jsonl/73031 | {
"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,
16527,
8327,
35865,
1155,
353,
8840,
836,
8,
341,
8810,
2353,
1669,
609,
3675,
16527,
515,
197,
15070,
2353,
929,
25,
7899,
345,
197,
15070,
2353,
25,
257,
220,
16,
15,
15,
15,
15,
345,
197,
197,
13965,
25,
3056,
67039,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetSpecificOrderbook(t *testing.T) {
e := CreateTestBot(t)
var bids []orderbook.Item
bids = append(bids, orderbook.Item{Price: 1000, Amount: 1})
base := orderbook.Base{
Pair: currency.NewPair(currency.BTC, currency.USD),
Bids: bids,
Exchange: "Bitstamp",
Asset: asset.Spot,
}
err := ... | explode_data.jsonl/59235 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 403
} | [
2830,
3393,
1949,
47514,
4431,
2190,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
4230,
2271,
23502,
1155,
692,
2405,
43499,
3056,
1358,
2190,
9399,
198,
2233,
3365,
284,
8737,
1883,
3365,
11,
1973,
2190,
9399,
90,
6972,
25,
220,
16,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestBroadcastDatatypeBadType(t *testing.T) {
bm, cancel := newTestBroadcast(t)
defer cancel()
_, err := bm.BroadcastDatatype(context.Background(), "ns1", &fftypes.Datatype{
Validator: fftypes.ValidatorType("wrong"),
}, false)
assert.Regexp(t, "FF10132.*validator", err)
} | explode_data.jsonl/78964 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
43362,
45696,
20157,
17082,
929,
1155,
353,
8840,
836,
8,
341,
2233,
76,
11,
9121,
1669,
501,
2271,
43362,
1155,
340,
16867,
9121,
741,
197,
6878,
1848,
1669,
34868,
84788,
45696,
20157,
5378,
19047,
1507,
330,
4412,
16,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_bot_isSelfMessage(t *testing.T) {
cfg := fakeCfg{}
prc := &fakeProcessor{}
discord := &FakeDiscordClientSpy{}
discord.failOnClose = true
b := &bot{
cfg: cfg,
discord: discord,
prc: prc,
}
u := &discordgo.User{ID: "123"}
t.Run("should get a self message", func(t *testing.T) {
m := &d... | explode_data.jsonl/2140 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 344
} | [
2830,
3393,
38883,
6892,
12092,
2052,
1155,
353,
8840,
836,
8,
1476,
50286,
1669,
12418,
42467,
16094,
25653,
66,
1669,
609,
30570,
22946,
31483,
2698,
3427,
539,
1669,
609,
52317,
23477,
539,
2959,
44027,
16094,
2698,
3427,
539,
26738,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStatefulPodControlCreatePodPvcCreateFailure(t *testing.T) {
recorder := record.NewFakeRecorder(10)
set := newStatefulSet(3)
pod := newStatefulSetPod(set, 0)
fakeClient := &fake.Clientset{}
pvcIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIn... | explode_data.jsonl/17899 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 440
} | [
2830,
3393,
1397,
1262,
23527,
3273,
4021,
23527,
47,
7362,
4021,
17507,
1155,
353,
8840,
836,
8,
341,
67904,
1358,
1669,
3255,
7121,
52317,
47023,
7,
16,
15,
340,
8196,
1669,
36848,
1262,
1649,
7,
18,
340,
3223,
347,
1669,
36848,
126... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReleaseNoninternedString(t *testing.T) {
c := NewTestStorageClient()
var m *QueueManager
h := sync.Mutex{}
h.Lock()
m = NewQueueManager(nil, "", newEWMARate(ewmaWeight, shardUpdateDuration), config.DefaultQueueConfig, nil, nil, c, defaultFlushDeadline)
m.Start()
go func() {
for {
m.SeriesReset(1)... | explode_data.jsonl/22378 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 329
} | [
2830,
3393,
16077,
8121,
55444,
291,
703,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
2271,
5793,
2959,
741,
2405,
296,
353,
7554,
2043,
198,
9598,
1669,
12811,
99014,
31483,
9598,
31403,
2822,
2109,
284,
1532,
7554,
2043,
27907,
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 TestShouldCheckAuthorizationMatching(t *testing.T) {
type Rule struct {
Policy string
AuthLevel authentication.Level
ExpectedMatching authorizationMatching
}
rules := []Rule{
{"bypass", authentication.NotAuthenticated, Authorized},
{"bypass", authentication.OneFactor, Authorized},
... | explode_data.jsonl/20183 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 550
} | [
2830,
3393,
14996,
3973,
18124,
64430,
1155,
353,
8840,
836,
8,
341,
13158,
18100,
2036,
341,
197,
10025,
8018,
1843,
914,
198,
197,
197,
5087,
4449,
286,
16653,
25259,
198,
197,
197,
18896,
64430,
23715,
64430,
198,
197,
630,
7000,
242... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemoveOldUnregisteredNodes(t *testing.T) {
deletedNodes := make(chan string, 10)
now := time.Now()
ng1_1 := BuildTestNode("ng1-1", 1000, 1000)
ng1_1.Spec.ProviderID = "ng1-1"
ng1_2 := BuildTestNode("ng1-2", 1000, 1000)
ng1_2.Spec.ProviderID = "ng1-2"
provider := testprovider.NewTestCloudProvider(nil, ... | explode_data.jsonl/44989 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 600
} | [
2830,
3393,
13021,
18284,
1806,
34909,
12288,
1155,
353,
8840,
836,
8,
341,
197,
26521,
12288,
1669,
1281,
35190,
914,
11,
220,
16,
15,
692,
80922,
1669,
882,
13244,
2822,
197,
968,
16,
62,
16,
1669,
7854,
2271,
1955,
445,
968,
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 TestKnativeProxyHeader(t *testing.T) {
req, err := http.NewRequest(http.MethodGet, "http://example.com/", nil)
if err != nil {
t.Fatal("Error building request:", err)
}
if h := KnativeProxyHeader(req); h != "" {
t.Errorf("KnativeProxyHeader(req)=%v, want empty string", h)
}
const want = "activator"
req.... | explode_data.jsonl/58830 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 235
} | [
2830,
3393,
42,
29738,
16219,
4047,
1155,
353,
8840,
836,
8,
341,
24395,
11,
1848,
1669,
1758,
75274,
19886,
20798,
1949,
11,
330,
1254,
1110,
8687,
905,
28105,
2092,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
445,
1454,
4752,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPodNodeConstraintsPodUpdate(t *testing.T) {
ns := metav1.NamespaceDefault
var expectedError error
errPrefix := "PodUpdate"
prc := NewPodNodeConstraints(testConfig(), nodeidentifier.NewDefaultNodeIdentifier())
prc.(initializer.WantsAuthorizer).SetAuthorizer(fakeAuthorizer(t))
err := prc.(admission.Initial... | explode_data.jsonl/37020 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 251
} | [
2830,
3393,
23527,
1955,
12925,
23527,
4289,
1155,
353,
8840,
836,
8,
341,
84041,
1669,
77520,
16,
46011,
3675,
198,
2405,
3601,
1454,
1465,
198,
9859,
14335,
1669,
330,
23527,
4289,
698,
25653,
66,
1669,
1532,
23527,
1955,
12925,
8623,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOptionOrElse(t *testing.T) {
s := gs.Some[int](100)
f := gs.Some[int](1)
assert.Equal(t, s.IsDefined(), s.OrElse(f).IsDefined())
assert.Equal(t, s.Get(), s.OrElse(f).Get())
n := gs.None[int]()
assert.Equal(t, true, n.OrElse(f).IsDefined())
assert.Equal(t, 1, n.OrElse(f).Get())
} | explode_data.jsonl/32436 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 143
} | [
2830,
3393,
5341,
52774,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
28081,
86833,
18640,
9533,
16,
15,
15,
340,
1166,
1669,
28081,
86833,
18640,
9533,
16,
692,
6948,
12808,
1155,
11,
274,
4506,
29361,
1507,
274,
13,
52774,
955,
568,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_SendViaGet(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
query := r.URL.Query()
dnsQryParam := query.Get("dns")
require.NotEmpty(t, dnsQryParam, "expected dns query param not found")
bd, err := base64.StdEncoding.DecodeString(dnsQryParam)
... | explode_data.jsonl/81677 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 774
} | [
2830,
3393,
46267,
54428,
1949,
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,
27274,
1669,
435,
20893,
15685,
741,
197,
2698,
4412,
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... | 3 |
func TestLoadSharedFile(t *testing.T) {
c := &config{
SharedConfigFile: TestValueEnvUCloudSharedConfigFile,
SharedCredentialFile: TestValueEnvUCloudSharedCredentialFile,
}
err := c.loadFileIfExist()
assert.NoError(t, err)
checkTestConfig(t, c)
} | explode_data.jsonl/75676 | {
"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,
5879,
16997,
1703,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
609,
1676,
515,
197,
197,
16997,
2648,
1703,
25,
257,
3393,
1130,
14359,
52,
16055,
16997,
2648,
1703,
345,
197,
197,
16997,
48265,
1703,
25,
3393,
1130,
14359,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildSetDefaults(t *testing.T) {
tests := []struct {
build Build
expectedBuild Build
}{
{
Build{},
Build{
CrossCompile: false,
MainFile: defaultMainFile,
BinaryFile: "bin/spec",
VersionPackage: defaultVersionPackage,
GoVersions: defaultGoVersions,
P... | explode_data.jsonl/62824 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 489
} | [
2830,
3393,
11066,
1649,
16273,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
69371,
260,
7854,
198,
197,
42400,
11066,
7854,
198,
197,
59403,
197,
197,
515,
298,
197,
11066,
38837,
298,
197,
11066,
515,
571,
6258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInteractionsService_UpdateRestrictionsForRepo(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()
input := &InteractionRestriction{Limit: String("existing_users")}
mux.HandleFunc("/repos/o/r/interaction-limits", func(w http.ResponseWriter, r *http.Request) {
v := new(InteractionRestric... | explode_data.jsonl/3502 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 385
} | [
2830,
3393,
3306,
4020,
1860,
47393,
50360,
21439,
2461,
25243,
1155,
353,
8840,
836,
8,
341,
25291,
11,
59807,
11,
8358,
49304,
1669,
6505,
741,
16867,
49304,
2822,
22427,
1669,
609,
31311,
50360,
2479,
90,
16527,
25,
923,
445,
36895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContext_LocalePrinter(t *testing.T) {
a := assert.New(t, false)
srv := newServer(a, &Options{Tag: language.SimplifiedChinese})
b := srv.Locale().Builder()
a.NotError(b.SetString(language.MustParse("cmn-hans"), "test", "测试"))
a.NotError(b.SetString(language.MustParse("cmn-hant"), "test", "測試"))
w := htt... | explode_data.jsonl/34208 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 460
} | [
2830,
3393,
1972,
2351,
36311,
45660,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
11,
895,
340,
1903,
10553,
1669,
501,
5475,
2877,
11,
609,
3798,
90,
5668,
25,
4128,
808,
73837,
44923,
8824,
2233,
1669,
43578,
59094,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeriveSecret(t *testing.T) {
chTranscript := cipherSuitesTLS13[0].hash.New()
chTranscript.Write(parseVector(`
payload (512 octets): 01 00 01 fc 03 03 1b c3 ce b6 bb e3 9c ff
93 83 55 b5 a5 0a db 6d b2 1b 7a 6a f6 49 d7 b4 bc 41 9d 78 76
48 7d 95 00 00 06 13 01 13 03 13 02 01 00 01 cd 00 00 00 0b 00
09 0... | explode_data.jsonl/71997 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1378
} | [
2830,
3393,
22171,
533,
19773,
1155,
353,
8840,
836,
8,
341,
23049,
3167,
1228,
1669,
31088,
62898,
288,
45439,
16,
18,
58,
15,
936,
8296,
7121,
741,
23049,
3167,
1228,
4073,
27762,
3781,
61528,
76272,
320,
20,
16,
17,
18491,
1415,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_parseConfigFile(t *testing.T) {
expectedConfig := &serviceCheckConfig{
[]serviceCheck{
{
"test",
[]string{"test", "args"},
map[string]string{"env": "testenv"},
false,
},
},
}
if err := os.Chmod("./test/testconfig.yaml", 0o600); err != nil {
assert.Fail(t, err.Error())
}
confi... | explode_data.jsonl/8917 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 184
} | [
2830,
3393,
21039,
2648,
1703,
1155,
353,
8840,
836,
8,
341,
42400,
2648,
1669,
609,
7936,
3973,
2648,
515,
197,
197,
1294,
7936,
3973,
515,
298,
197,
515,
571,
197,
1,
1944,
756,
571,
197,
1294,
917,
4913,
1944,
497,
330,
2116,
711... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLiveUpdateDiffImgMultipleContainersSameContextOnlyOneLiveUpdate(t *testing.T) {
f := newBDFixture(t, k8s.EnvGKE, container.RuntimeCrio)
defer f.TearDown()
buildContext := f.Path()
sanchoSyncs := SanchoSyncSteps(f)
sanchoSyncs[0].Source = buildContext
sanchoLU := assembleLiveUpdate(sanchoSyncs, SanchoRu... | explode_data.jsonl/35158 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 493
} | [
2830,
3393,
20324,
4289,
21751,
13033,
32089,
74632,
19198,
1972,
7308,
3966,
20324,
4289,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
33,
5262,
12735,
1155,
11,
595,
23,
82,
81214,
38,
3390,
11,
5476,
16706,
34,
10383,
340,
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 TestValidateAPIEndpoint(t *testing.T) {
var tests = []struct {
name string
s *kubeadm.APIEndpoint
expected bool
}{
{
name: "Valid IPv4 address / port",
s: &kubeadm.APIEndpoint{
AdvertiseAddress: "4.5.6.7",
BindPort: 6443,
},
expected: true,
},
{
name: "Valid ... | explode_data.jsonl/39226 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 633
} | [
2830,
3393,
17926,
7082,
27380,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
1903,
286,
353,
74,
392,
3149,
76,
24922,
27380,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRetry(t *testing.T) {
siteURL := "http://localhost:8989"
closer, err := startFakeServer(":8989", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// faking digest response
if r.RequestURI == "/_api/ContextInfo" {
_, _ = fmt.Fprintf(w, `{"d":{"GetContextWebInformation":{"FormDigestValue"... | explode_data.jsonl/15489 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2774
} | [
2830,
3393,
51560,
1155,
353,
8840,
836,
8,
341,
1903,
632,
3144,
1669,
330,
1254,
1110,
8301,
25,
23,
24,
23,
24,
698,
1444,
69215,
11,
1848,
1669,
1191,
52317,
5475,
18893,
23,
24,
23,
24,
497,
1758,
89164,
18552,
3622,
1758,
3750... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTxnTraceSlowestNodesSaved(t *testing.T) {
start := time.Date(2014, time.November, 28, 1, 1, 0, 0, time.UTC)
tr := &TxnData{}
tr.TxnTrace.Enabled = true
tr.TxnTrace.StackTraceThreshold = 1 * time.Hour
tr.TxnTrace.SegmentThreshold = 0
tr.TxnTrace.maxNodes = 5
durations := []int{5, 4, 6, 3, 7, 2, 8, 1, 9}... | explode_data.jsonl/8810 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1673
} | [
2830,
3393,
31584,
77,
6550,
58289,
477,
12288,
41133,
1155,
353,
8840,
836,
8,
341,
21375,
1669,
882,
8518,
7,
17,
15,
16,
19,
11,
882,
2067,
859,
1377,
11,
220,
17,
23,
11,
220,
16,
11,
220,
16,
11,
220,
15,
11,
220,
15,
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 TestUnsubscribeThreadSafety(t *testing.T) {
count := 100000
handler1 := func(msg interface{}) {}
b := NewBroker()
subs := make([]Subscription, 0, count)
for i := 0; i < count; i++ {
subs = append(subs, b.Subscribe("topic1", handler1))
}
var wg sync.WaitGroup
wg.Add(count)
for i := 0; i < count; i++ {
... | explode_data.jsonl/37068 | {
"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,
1806,
9384,
6855,
73037,
1155,
353,
8840,
836,
8,
341,
18032,
1669,
220,
16,
15,
15,
15,
15,
15,
198,
53326,
16,
1669,
2915,
8119,
3749,
28875,
5613,
2233,
1669,
1532,
65545,
2822,
1903,
15738,
1669,
1281,
10556,
33402,
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 TestExtendInterfaceType(t *testing.T) {
t.Run("extend simple interface type by field", func(t *testing.T) {
run(extendInterfaceTypeDefinition, testDefinition, `
interface Mammal {
name: String
}
extend interface Mammal {
furType: String
}
`, `
interface Mammal {
... | explode_data.jsonl/78718 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1321
} | [
2830,
3393,
72136,
5051,
929,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
25048,
4285,
3749,
943,
553,
2070,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
56742,
7,
25048,
5051,
929,
10398,
11,
1273,
10398,
11,
22074,
464,
58915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReconcile_OptionalWorkspacesOmitted(t *testing.T) {
names.TestingSeed()
ctx := context.Background()
cfg := config.NewStore(logtesting.TestLogger(t))
ctx = cfg.ToContext(ctx)
prs := []*v1beta1.PipelineRun{{
ObjectMeta: metav1.ObjectMeta{Name: "test-pipeline-run-success", Namespace: "foo"},
Spec: v1be... | explode_data.jsonl/68307 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1648
} | [
2830,
3393,
693,
40446,
457,
2232,
560,
278,
6776,
44285,
46,
5483,
1155,
353,
8840,
836,
8,
341,
93940,
8787,
287,
41471,
2822,
20985,
1669,
2266,
19047,
741,
50286,
1669,
2193,
7121,
6093,
12531,
8840,
8787,
7395,
1155,
1171,
20985,
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 TestLabelService_FindResourceLabels(t *testing.T) {
type fields struct {
LabelService influxdb.LabelService
}
type args struct {
filter influxdb.LabelMappingFilter
permissions []influxdb.Permission
}
type wants struct {
err error
labels []*influxdb.Label
}
tests := []struct {
name stri... | explode_data.jsonl/35728 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2748
} | [
2830,
3393,
2476,
1860,
95245,
4783,
23674,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
82126,
1860,
52852,
1999,
4679,
1860,
198,
197,
532,
13158,
2827,
2036,
341,
197,
50108,
414,
52852,
1999,
4679,
6807,
5632,
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 TestArtifactoryPublishRendersPropertiesGoTemplates(t *testing.T) {
const godelYML = `exclude:
names:
- "\\..+"
- "vendor"
paths:
- "godel"
`
pluginPath, err := products.Bin("dist-plugin")
require.NoError(t, err)
err = os.Setenv("TEST_ENV_VAR", "testValue")
require.NoError(t, err)
publishert... | explode_data.jsonl/63102 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 883
} | [
2830,
3393,
9286,
333,
2919,
50145,
49,
14506,
7903,
10850,
51195,
1155,
353,
8840,
836,
8,
341,
4777,
342,
720,
56,
2668,
284,
1565,
32413,
510,
220,
5036,
510,
262,
481,
26468,
496,
10,
698,
262,
481,
330,
19213,
698,
220,
12716,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBingo(t *testing.T) {
input := `7,4,9,5,11,17,23,2,0,14,21,24,10,16,13,6,15,25,12,22,18,20,8,19,3,26,1
22 13 17 11 0
8 2 23 4 24
21 9 14 16 7
6 10 3 18 5
1 12 20 15 19
3 15 0 2 22
9 18 13 17 5
19 8 7 25 23
20 11 10 24 4
14 21 16 12 6
14 21 17 24 4
10 16 15 9 19
18 8 23 26 20
22 11 13 ... | explode_data.jsonl/60986 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 397
} | [
2830,
3393,
33,
27908,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
1565,
22,
11,
19,
11,
24,
11,
20,
11,
16,
16,
11,
16,
22,
11,
17,
18,
11,
17,
11,
15,
11,
16,
19,
11,
17,
16,
11,
17,
19,
11,
16,
15,
11,
16,
21,
11,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestIncomingDeck(t *testing.T) {
t.Parallel()
output := &bytes.Buffer{}
random := rand.New(rand.NewSource(1))
g, err := blackjack.NewBlackjackGame(
blackjack.WithOutput(output),
blackjack.WithDeckCount(3),
blackjack.WithRandom(random),
)
if err != nil {
t.Fatal(err)
}
want := g.Shoe
got := g.... | explode_data.jsonl/5928 | {
"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,
97564,
39368,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
21170,
1669,
609,
9651,
22622,
16094,
83628,
1669,
10382,
7121,
37595,
7121,
3608,
7,
16,
4390,
3174,
11,
1848,
1669,
57262,
7121,
14417,
27134,
4868,
1006,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGDPRIgnoredIfZero(t *testing.T) {
rr := doPost(`{"gdpr":0,"bidders":["appnexus", "pubmatic"]}`, nil, false, nil)
assert.Equal(t, rr.Header().Get("Content-Type"), "application/json; charset=utf-8")
assert.Equal(t, http.StatusOK, rr.Code)
assert.ElementsMatch(t, []string{"appnexus", "pubmatic"}, parseSyncs(t... | explode_data.jsonl/21685 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 163
} | [
2830,
3393,
38,
10298,
4305,
4905,
3018,
2679,
17999,
1155,
353,
8840,
836,
8,
341,
197,
634,
1669,
65156,
5809,
4913,
28584,
649,
788,
15,
1335,
65,
99129,
36799,
676,
77,
23666,
497,
330,
9585,
37244,
1341,
28350,
2092,
11,
895,
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 TestLoadTemplate(t *testing.T) {
// Setup ES
client := estest.GetTestingElasticsearch(t)
if err := client.Connect(); err != nil {
t.Fatal(err)
}
// Load template
absPath, err := filepath.Abs("../")
assert.NotNil(t, absPath)
assert.Nil(t, err)
fieldsPath := absPath + "/fields.yml"
index := "testbeat"
... | explode_data.jsonl/63861 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 331
} | [
2830,
3393,
5879,
7275,
1155,
353,
8840,
836,
8,
341,
197,
322,
18626,
19287,
198,
25291,
1669,
1788,
477,
2234,
16451,
36,
51179,
1836,
1155,
340,
743,
1848,
1669,
2943,
43851,
2129,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
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... | 2 |
func TestClientGetTimeoutSuccessConcurrent(t *testing.T) {
t.Parallel()
s := startEchoServer(t, "tcp", "127.0.0.1:")
defer s.Stop()
var wg sync.WaitGroup
for i := 0; i < 10; i++ {
wg.Add(1)
go func() {
defer wg.Done()
testClientGetTimeoutSuccess(t, &defaultClient, "http://"+s.Addr(), 100)
}()
}
wg.... | explode_data.jsonl/79362 | {
"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,
2959,
1949,
7636,
7188,
1109,
3231,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1903,
1669,
1191,
74994,
5475,
1155,
11,
330,
27161,
497,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
34403,
16867,
274,
30213,
2822... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIngestLoadRand(t *testing.T) {
mem := vfs.NewMem()
rng := rand.New(rand.NewSource(uint64(time.Now().UnixNano())))
cmp := DefaultComparer.Compare
randBytes := func(size int) []byte {
data := make([]byte, size)
for i := range data {
data[i] = byte(rng.Int() & 0xff)
}
return data
}
paths := mak... | explode_data.jsonl/40253 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 757
} | [
2830,
3393,
641,
6969,
5879,
56124,
1155,
353,
8840,
836,
8,
341,
14145,
1669,
92941,
7121,
18816,
741,
7000,
968,
1669,
10382,
7121,
37595,
7121,
3608,
8488,
21,
19,
9730,
13244,
1005,
55832,
83819,
60131,
1444,
1307,
1669,
7899,
31942,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPriorityQueue_AddUnschedulableIfNotPresent_Backoff(t *testing.T) {
q := NewTestQueue(context.Background(), newDefaultQueueSort(), WithClock(clock.NewFakeClock(time.Now())))
totalNum := 10
expectedPods := make([]v1.Pod, 0, totalNum)
for i := 0; i < totalNum; i++ {
priority := int32(i)
p := v1.Pod{
Ob... | explode_data.jsonl/68185 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 875
} | [
2830,
3393,
20555,
7554,
21346,
1806,
72243,
360,
480,
2679,
2623,
21195,
64703,
1847,
1155,
353,
8840,
836,
8,
341,
18534,
1669,
1532,
2271,
7554,
5378,
19047,
1507,
501,
3675,
7554,
10231,
1507,
3085,
26104,
90911,
7121,
52317,
26104,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateDeploymentConfigOK(t *testing.T) {
mockRepositoryRegistry := test.NewDeploymentConfigRegistry()
storage := REST{registry: mockRepositoryRegistry}
channel, err := storage.Update(kapi.NewDefaultContext(), &api.DeploymentConfig{
ObjectMeta: kapi.ObjectMeta{Name: "bar"},
})
if err != nil {
t.Errorf... | explode_data.jsonl/66992 | {
"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,
4289,
75286,
2648,
3925,
1155,
353,
8840,
836,
8,
341,
77333,
4624,
15603,
1669,
1273,
7121,
75286,
2648,
15603,
741,
197,
16172,
1669,
25414,
90,
29172,
25,
7860,
4624,
15603,
630,
71550,
11,
1848,
1669,
5819,
16689,
5969,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewCreateFormulaCmd(t *testing.T) {
cmd := NewCreateFormulaCmd(formCreator{}, inputTextMock{})
if cmd == nil {
t.Errorf("NewCreateFormulaCmd got %v", cmd)
}
if err := cmd.Execute(); err != nil {
t.Errorf("%s = %v, want %v", cmd.Use, err, nil)
}
} | explode_data.jsonl/78083 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
3564,
4021,
52676,
15613,
1155,
353,
8840,
836,
8,
341,
25920,
1669,
1532,
4021,
52676,
15613,
16760,
31865,
22655,
1946,
1178,
11571,
37790,
743,
5439,
621,
2092,
341,
197,
3244,
13080,
445,
3564,
4021,
52676,
15613,
2684,
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 TestOwnerNameAndID(t *testing.T) {
testCases := []struct {
cl *GerritCL
OwnerID int
OwnerName string
}{
{&GerritCL{}, -1, ""},
{&GerritCL{
Meta: &GitCommit{
Parents: []*GitCommit{
&GitCommit{
Author: &GitPerson{
Str: "Rick Sanchez <137@62eb7196-b449-3ce5-99f1-c037f21e1... | explode_data.jsonl/66159 | {
"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,
13801,
675,
3036,
915,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
39407,
286,
353,
38,
615,
275,
3140,
198,
197,
197,
13801,
915,
256,
526,
198,
197,
197,
13801,
675,
914,
198,
197,
59403,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestDequeueMultiple(t *testing.T) {
goqueue_tests.DequeueMultiple(t, func(size int) interface {
goqueue.Owner
goqueue.Enqueuer
goqueue.Dequeuer
} {
return finite.New(size)
})
} | explode_data.jsonl/54504 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 77
} | [
2830,
3393,
1912,
4584,
32089,
1155,
353,
8840,
836,
8,
341,
30680,
4584,
32509,
8934,
4584,
32089,
1155,
11,
2915,
6856,
526,
8,
3749,
341,
197,
30680,
4584,
49920,
198,
197,
30680,
4584,
22834,
591,
8801,
198,
197,
30680,
4584,
8934,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCorruptDB_Table(t *testing.T) {
h := newDbCorruptHarness(t)
defer h.close()
h.build(100)
h.compactMem()
h.compactRangeAt(0, "", "")
h.compactRangeAt(1, "", "")
h.closeDB()
h.corrupt(storage.TypeTable, -1, 100, 1)
h.openDB()
h.check(99, 99)
} | explode_data.jsonl/45791 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 127
} | [
2830,
3393,
10580,
6585,
3506,
42544,
1155,
353,
8840,
836,
8,
341,
9598,
1669,
501,
7994,
10580,
6585,
74248,
1155,
340,
16867,
305,
4653,
2822,
9598,
13239,
7,
16,
15,
15,
340,
9598,
39702,
531,
18816,
741,
9598,
39702,
531,
6046,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateMissingCAFileClusterInfo(t *testing.T) {
config := clientcmdapi.NewConfig()
config.Clusters["missing ca"] = &clientcmdapi.Cluster{
Server: "anything",
CertificateAuthority: "missing",
}
test := configValidationTest{
config: config,
expectedErrorSubstring: []str... | explode_data.jsonl/13491 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 163
} | [
2830,
3393,
17926,
25080,
5049,
1703,
28678,
1731,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
2943,
8710,
2068,
7121,
2648,
741,
25873,
21610,
14605,
1183,
30616,
2162,
1341,
284,
609,
2972,
8710,
2068,
72883,
515,
197,
92075,
25,
2290,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestZigzagTraverse(t *testing.T) {
t1 := &common.TreeNode{}
t2 := &common.TreeNode{nil, 1, nil}
t3 := &common.TreeNode{nil, 1, nil}
t3.Left = &common.TreeNode{nil, 2, nil}
t3.Left.Right = &common.TreeNode{nil, 3, nil}
t4 := &common.TreeNode{nil, 1, nil}
t4.Left = &common.TreeNode{nil, 2, nil}
t4.Right =... | explode_data.jsonl/58317 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 482
} | [
2830,
3393,
57,
343,
92674,
1282,
22439,
1155,
353,
8840,
836,
8,
341,
3244,
16,
1669,
609,
5464,
836,
31583,
31483,
3244,
17,
1669,
609,
5464,
836,
31583,
90,
8385,
11,
220,
16,
11,
2092,
630,
3244,
18,
1669,
609,
5464,
836,
31583,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultiRequest(t *testing.T) {
s := marshalMultiRequest("createStorage", &CreateServerRequest{DataCenterId: "Id"})
Convey("serialize multi request", t, func() {
So(s, ShouldContainSubstring, "<tns:createStorage><request>")
})
} | explode_data.jsonl/22384 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 80
} | [
2830,
3393,
20358,
1900,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
60771,
20358,
1900,
445,
3182,
5793,
497,
609,
4021,
5475,
1900,
90,
1043,
9392,
764,
25,
330,
764,
23625,
93070,
5617,
445,
24166,
7299,
1681,
497,
259,
11,
2915,
368... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestParserTextmate(t *testing.T) {
p := newSnippetParser()
assertMarker(t, *p.parse("far{{}}boo", false, false), &text{})
assertMarker(t, *p.parse("far{{123}}boo", false, false), &text{})
assertMarker(t, *p.parse("far\\{{123}}boo", false, false), &text{})
assertMarker(t, *p.parse("far$0boo", false, false), &... | explode_data.jsonl/60279 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
6570,
1178,
18052,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
501,
87852,
6570,
741,
6948,
20613,
1155,
11,
353,
79,
4632,
445,
23559,
2979,
3417,
32993,
497,
895,
11,
895,
701,
609,
1318,
37790,
6948,
20613,
1155,
11,
353,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIngressLoadBalancing(t *testing.T) {
ctx := framework.NewContext(t)
defer ctx.Done()
ctx.RequireOrSkip(environment.Kube)
g := galley.NewOrFail(t, ctx, galley.Config{})
bookinfoNs, err := namespace.New(ctx, "istio-bookinfo", true)
if err != nil {
t.Fatalf("Could not create istio-bookinfo Namespace; e... | explode_data.jsonl/81868 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 725
} | [
2830,
3393,
641,
2483,
5879,
37889,
8974,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
12626,
7121,
1972,
1155,
340,
16867,
5635,
60422,
2822,
20985,
81288,
2195,
35134,
67591,
11352,
3760,
692,
3174,
1669,
15369,
3179,
7121,
46059,
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... | 5 |
func TestManifoldDataSource_CredentialBasic(t *testing.T) {
t.Run("with a filtered configuration", func(t *testing.T) {
conf := `
data "manifold_credential" "my-credential" {
project = "terraform"
resource = "custom-resource1-1"
key = "TOKEN_ID"
}
`
resource.Test(t, resource.TestCase{
PreCheck: testProvide... | explode_data.jsonl/53735 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 771
} | [
2830,
3393,
1658,
48285,
17173,
920,
30320,
15944,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
4197,
264,
18293,
6546,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
67850,
1669,
22074,
691,
330,
1515,
48285,
666,
30320,
1,
330,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAddIssueValueLabelErrs(t *testing.T) {
p := domain.Project{}
cucm, iucm, lucm, pucm, m := prepareMocksAndRUC()
pucm.On("FindByID", mock.AnythingOfType("uint")).Return(p, nil)
tests := []struct {
body *strings.Reader
err error
mockOn bool
}{
{
strings.NewReader("projectId=1&title=test-ti... | explode_data.jsonl/60159 | {
"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,
2212,
42006,
1130,
2476,
7747,
82,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
7947,
30944,
31483,
1444,
1754,
76,
11,
600,
1754,
76,
11,
25927,
76,
11,
281,
1754,
76,
11,
296,
1669,
10549,
72577,
3036,
49,
5459,
2822,
322... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestSetGroupConcatMaxLen(t *testing.T) {
store, clean := realtikvtest.CreateMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
// Normal case
tk.MustExec("set global group_concat_max_len = 100")
tk.MustExec("set @@session.group_concat_max_len = 50")
result := tk... | explode_data.jsonl/5722 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 710
} | [
2830,
3393,
1649,
2808,
78440,
5974,
11271,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1931,
83,
1579,
85,
1944,
7251,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidate_KnownTypeNames_IgnoresTypeDefinitions(t *testing.T) {
testutil.ExpectFailsRule(t, graphql.KnownTypeNamesRule, `
type NotInTheSchema {
field: FooBar
}
interface FooBar {
field: NotInTheSchema
}
union U = A | B
input Blob {
field: UnknownType
... | explode_data.jsonl/59084 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 255
} | [
2830,
3393,
17926,
10102,
4169,
929,
7980,
7959,
70,
2152,
416,
929,
50542,
1155,
353,
8840,
836,
8,
341,
18185,
1314,
81893,
37,
6209,
11337,
1155,
11,
48865,
11352,
4169,
929,
7980,
11337,
11,
22074,
414,
943,
2806,
86093,
8632,
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... | 1 |
func TestExtractNamespaceLabelsAnnotations(t *testing.T) {
c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{})
testCases := []struct {
name string
shouldExtractNamespace bool
rules ExtractionRules
}{{
name: "empty-rules",
shouldExtr... | explode_data.jsonl/56860 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 683
} | [
2830,
3393,
28959,
22699,
23674,
21418,
1155,
353,
8840,
836,
8,
341,
1444,
11,
716,
1669,
501,
2271,
2959,
2354,
26008,
3036,
28351,
1155,
11,
94506,
26008,
22655,
45012,
37790,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
4293,
914,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadOrientation(t *testing.T) {
testCases := []struct {
path string
orient orientation
}{
{"testdata/orientation_0.jpg", 0},
{"testdata/orientation_1.jpg", 1},
{"testdata/orientation_2.jpg", 2},
{"testdata/orientation_3.jpg", 3},
{"testdata/orientation_4.jpg", 4},
{"testdata/orientation_5.j... | explode_data.jsonl/2436 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 310
} | [
2830,
3393,
4418,
22332,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
26781,
256,
914,
198,
197,
197,
14881,
16725,
198,
197,
59403,
197,
197,
4913,
92425,
5144,
1167,
367,
62,
15,
4819,
497,
220,
15,
1583,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMsgMsgBurnNFTValidateBasicMethod(t *testing.T) {
newMsgBurnNFT := types.NewMsgBurnNFT("", id, denom)
err := newMsgBurnNFT.ValidateBasic()
require.Error(t, err)
newMsgBurnNFT = types.NewMsgBurnNFT(address.String(), "", denom)
err = newMsgBurnNFT.ValidateBasic()
require.Error(t, err)
newMsgBurnNFT = typ... | explode_data.jsonl/28178 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 214
} | [
2830,
3393,
6611,
6611,
66213,
45,
3994,
17926,
15944,
3523,
1155,
353,
8840,
836,
8,
341,
8638,
6611,
66213,
45,
3994,
1669,
4494,
7121,
6611,
66213,
45,
3994,
19814,
877,
11,
49744,
340,
9859,
1669,
501,
6611,
66213,
45,
3994,
47667,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsContextNotFound(t *testing.T) {
config := clientcmdapi.NewConfig()
config.CurrentContext = "anything"
err := Validate(*config)
if !IsContextNotFound(err) {
t.Errorf("Expected context not found, but got %v", err)
}
if !IsConfigurationInvalid(err) {
t.Errorf("Expected configuration invalid, but got ... | explode_data.jsonl/13485 | {
"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,
3872,
1972,
10372,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
2943,
8710,
2068,
7121,
2648,
741,
25873,
11517,
1972,
284,
330,
72154,
1837,
9859,
1669,
23282,
4071,
1676,
340,
743,
753,
3872,
1972,
10372,
3964,
8,
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... | 3 |
func TestRedelegateSelfDelegation(t *testing.T) {
_, app, ctx := createTestInput()
addrDels := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(0))
addrVals := simapp.ConvertAddrsToValAddrs(addrDels)
startTokens := sdk.TokensFromConsensusPower(30)
startCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.Bo... | explode_data.jsonl/82055 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 919
} | [
2830,
3393,
6033,
68,
4989,
12092,
1912,
87566,
1155,
353,
8840,
836,
8,
341,
197,
6878,
906,
11,
5635,
1669,
1855,
2271,
2505,
2822,
53183,
35,
2010,
1669,
1643,
676,
1904,
2271,
2212,
5428,
38311,
278,
11462,
11,
5635,
11,
220,
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 TestSaveAndRetrieveStartTime_HandlesDifferentTimeZones(t *testing.T) {
withRepository(func(r *RedisJobRepository) {
loc, err := time.LoadLocation("Asia/Shanghai")
assert.NoError(t, err)
now := time.Now().UTC()
leasedJob := addLeasedJob(t, r, "queue1", "cluster1")
startTime := now.In(loc)
jobErrors, e... | explode_data.jsonl/32058 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 310
} | [
2830,
3393,
8784,
3036,
87665,
40203,
2039,
20125,
69123,
1462,
57,
3154,
1155,
353,
8840,
836,
8,
341,
46948,
4624,
18552,
2601,
353,
48137,
12245,
4624,
8,
341,
197,
71128,
11,
1848,
1669,
882,
13969,
4707,
445,
38463,
76202,
30070,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestModificationTime(t *testing.T) {
fs := NewFileStat()
fs.Log = testutil.Logger{}
fs.Files = []string{
filepath.Join(testdataDir, "log1.log"),
}
acc := testutil.Accumulator{}
acc.GatherError(fs.Gather)
tags1 := map[string]string{
"file": filepath.Join(testdataDir, "log1.log"),
}
require.True(t, ac... | explode_data.jsonl/59621 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 210
} | [
2830,
3393,
80795,
1462,
1155,
353,
8840,
836,
8,
341,
53584,
1669,
1532,
1703,
15878,
741,
53584,
5247,
284,
1273,
1314,
12750,
16094,
53584,
52009,
284,
3056,
917,
515,
197,
17661,
2343,
22363,
8623,
691,
6184,
11,
330,
839,
16,
1665,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFloat32_IsSuperset(t *testing.T) {
testcases := []struct {
name string
s Float32
t Float32
expect bool
}{
{
name: "test Float32 IsSuperset, s is empty",
s: Float32{},
t: map[float32]struct{}{2: {}, 1.3: {}, 4.1: {}},
expect: false,
},
{
name: "test Float... | explode_data.jsonl/60119 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 864
} | [
2830,
3393,
5442,
18,
17,
31879,
10048,
44146,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
1903,
414,
13001,
18,
17,
198,
197,
3244,
414,
13001,
18,
17,
198,
197,
24952,
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... | 3 |
func TestSelectStatement_HasWildcard(t *testing.T) {
var tests = []struct {
stmt string
wildcard bool
}{
// No wildcards
{
stmt: `SELECT value FROM cpu`,
wildcard: false,
},
// Query wildcard
{
stmt: `SELECT * FROM cpu`,
wildcard: true,
},
// No GROUP BY wildcards
{
st... | explode_data.jsonl/24808 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 674
} | [
2830,
3393,
3379,
8636,
2039,
300,
92988,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
55822,
257,
914,
198,
197,
6692,
695,
4951,
1807,
198,
197,
59403,
197,
197,
322,
2308,
8380,
25024,
198,
197,
197,
515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExplain(t *testing.T) {
type test struct {
name string
opts *Options
}
tests := []test{
{"unsharded", defaultTestOpts()},
{"selectsharded", defaultTestOpts()},
{"insertsharded", defaultTestOpts()},
{"updatesharded", defaultTestOpts()},
{"deletesharded", defaultTestOpts()},
{"comments", defau... | explode_data.jsonl/12768 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 302
} | [
2830,
3393,
840,
20772,
1155,
353,
8840,
836,
8,
341,
13158,
1273,
2036,
341,
197,
11609,
914,
198,
197,
64734,
353,
3798,
198,
197,
532,
78216,
1669,
3056,
1944,
515,
197,
197,
4913,
359,
927,
20958,
497,
1638,
2271,
43451,
78108,
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... | 2 |
func TestValidatePortName(t *testing.T) {
testCases := []struct {
name string
valid bool
}{
{
name: "",
valid: false,
},
{
name: "simple",
valid: true,
},
{
name: "full",
valid: true,
},
{
name: "toolongtoolongtoolongtoolongtoolongtoolongtoolongtoolongtoolongtoolongtoolongt... | explode_data.jsonl/56916 | {
"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,
17926,
7084,
675,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
56322,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
220,
8324,
298,
56322,
25,
895,
345,
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 TestPatchOptionReturnsForbidden(t *testing.T) {
t.Parallel()
Convey("Patch dimension option of a published instance returns forbidden", t, func() {
body := strings.NewReader(`[
{"op": "add", "path": "/order", "value": 0},
{"op": "add", "path": "/node_id", "value": "11"}
]`)
r, err := createRequestWit... | explode_data.jsonl/20831 | {
"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,
43622,
5341,
16446,
69115,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
93070,
5617,
445,
43622,
12871,
2999,
315,
264,
4652,
2867,
4675,
36813,
497,
259,
11,
2915,
368,
341,
197,
35402,
1669,
9069,
68587,
5809,
964... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewReadLogsCommandWriteLinesWithDelay(t *testing.T) {
lines1 := []string{"1", "2", "3"}
lines2 := []string{"4", "5", "6"}
f, cleanup := setupTestFile(t)
defer cleanup()
appendToFile(t, f, lines1)
cmd := newReadLogsCommand()
mockLogOutputWriter := new(mockLogOutputWriter)
defer mockLogOutputWriter.As... | explode_data.jsonl/3428 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 360
} | [
2830,
3393,
3564,
4418,
51053,
4062,
7985,
16794,
2354,
20039,
1155,
353,
8840,
836,
8,
341,
78390,
16,
1669,
3056,
917,
4913,
16,
497,
330,
17,
497,
330,
18,
16707,
78390,
17,
1669,
3056,
917,
4913,
19,
497,
330,
20,
497,
330,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBlobClientStat(t *testing.T) {
localNodeID := roachpb.NodeID(1)
remoteNodeID := roachpb.NodeID(2)
localExternalDir, remoteExternalDir, stopper, cleanUpFn := createTestResources(t)
defer cleanUpFn()
clock := hlc.NewClock(hlc.UnixNano, time.Nanosecond)
rpcContext := rpc.NewInsecureTestingContext(clock, st... | explode_data.jsonl/82494 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 775
} | [
2830,
3393,
37985,
2959,
15878,
1155,
353,
8840,
836,
8,
341,
8854,
1955,
915,
1669,
926,
610,
16650,
21714,
915,
7,
16,
340,
197,
18147,
1955,
915,
1669,
926,
610,
16650,
21714,
915,
7,
17,
340,
8854,
25913,
6184,
11,
8699,
25913,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConvertToUnix(t *testing.T) {
tests := []struct {
name string
str string
now bool
want int64
wantErr bool
}{
{
name: "RFC3339",
str: "2018-05-10T15:04:00Z",
want: 1525964640,
},
{
name: "0 value",
str: "0",
now: true,
},
{
name: "now value",
str: ... | explode_data.jsonl/31985 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 546
} | [
2830,
3393,
12012,
1249,
55832,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
11355,
257,
914,
198,
197,
80922,
257,
1807,
198,
197,
50780,
262,
526,
21,
19,
198,
197,
50780,
7747,
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... | 5 |
func TestShorten(t *testing.T) {
t.Run(
"shortening and expanding",
func(t *testing.T) {
go run()
// shorten
var body = Body{
Body: "http://www.apple.com",
}
req, err := json.Marshal(body)
require.Nil(t, err)
var dest = "http://" + addr + "/s"
res, err := http.Post(dest, "application/js... | explode_data.jsonl/81875 | {
"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,
12472,
268,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
1006,
197,
197,
1,
8676,
6019,
323,
23175,
756,
197,
29244,
1155,
353,
8840,
836,
8,
341,
298,
30680,
1598,
741,
298,
197,
322,
73381,
198,
298,
2405,
2487,
284,
139... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildHostNamesForCompositeDependency(t *testing.T) {
dependencyInst := "mydep"
components := []v1alpha2.Component{
{
ObjectMeta: metav1.ObjectMeta{
Name: "mycomponent1",
},
},
{
ObjectMeta: metav1.ObjectMeta{
Name: "mycomponent2",
},
},
}
expected := []string{
"mydep--mycompon... | explode_data.jsonl/54866 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 234
} | [
2830,
3393,
11066,
9296,
7980,
2461,
41685,
36387,
1155,
353,
8840,
836,
8,
341,
197,
53690,
8724,
1669,
330,
2408,
14891,
698,
197,
5149,
1669,
3056,
85,
16,
7141,
17,
5119,
515,
197,
197,
515,
298,
23816,
12175,
25,
77520,
16,
80222... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewMeasurement(t *testing.T) {
want := &Measurement{
Host: "google.de",
Port: 443,
Timeout: 5,
Runs: 5,
Wait: 1,
}
got := NewMeasurement("google.de", 443, 5, 5, 1)
if want.Host != got.Host {
t.Fatalf("want: %s, got %s", want.Host, got.Host)
}
if want.Port != got.Port {
t.Fatalf... | explode_data.jsonl/2462 | {
"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,
3564,
76548,
1155,
353,
8840,
836,
8,
341,
50780,
1669,
609,
76548,
515,
197,
197,
9296,
25,
262,
330,
17485,
2285,
756,
197,
98459,
25,
262,
220,
19,
19,
18,
345,
197,
197,
7636,
25,
220,
20,
345,
197,
197,
73920,
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... | 6 |
func TestIsError(t *testing.T) {
tests := []struct {
err error
code waddrmgr.ErrorCode
exp bool
}{
{
err: waddrmgr.ManagerError{
ErrorCode: waddrmgr.ErrDatabase,
},
code: waddrmgr.ErrDatabase,
exp: true,
},
{
// package should never return *ManagerError
err: &waddrmgr.ManagerError... | explode_data.jsonl/67914 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 392
} | [
2830,
3393,
3872,
1454,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
9859,
220,
1465,
198,
197,
43343,
289,
6214,
48292,
98433,
198,
197,
48558,
220,
1807,
198,
197,
59403,
197,
197,
515,
298,
9859,
25,
289,
6214,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.