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 TestUnmarshalCustomTag(t *testing.T) {
buf := bytes.NewBuffer(testDocBasicToml)
result := testDocCustomTag{}
err := NewDecoder(buf).SetTagName("file").Decode(&result)
if err != nil {
t.Fatal(err)
}
expected := testDocCustomTagData
if !reflect.DeepEqual(result, expected) {
resStr, _ := json.MarshalInden... | explode_data.jsonl/46337 | {
"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,
1806,
27121,
10268,
5668,
1155,
353,
8840,
836,
8,
341,
26398,
1669,
5820,
7121,
4095,
8623,
9550,
15944,
24732,
75,
692,
9559,
1669,
1273,
9550,
10268,
5668,
16094,
9859,
1669,
1532,
20732,
10731,
568,
1649,
22616,
445,
1192,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSignature(t *testing.T) {
// From twilio docs
// https://www.twilio.com/docs/api/security#validating-requests
const (
reqURL = "https://mycompany.com/myapp.php?foo=1&bar=2"
authToken = "12345"
// Twilio's example code seems to be incorrect (includes an extra `=`)
// so this is different than ... | explode_data.jsonl/1953 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 279
} | [
2830,
3393,
25088,
1155,
353,
8840,
836,
8,
1476,
197,
322,
5542,
4384,
33329,
26340,
198,
197,
322,
220,
3703,
1110,
2136,
14701,
33329,
905,
25967,
10508,
71422,
2,
1891,
1095,
12,
36242,
271,
4777,
2399,
197,
24395,
3144,
262,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUpdateWindow(t *testing.T) {
duration, _ := time.ParseDuration("1m")
internalDuration := config.Duration(duration)
c := &CloudWatch{
Namespace: "AWS/ELB",
Delay: internalDuration,
Period: internalDuration,
}
now := time.Now()
assert.True(t, c.windowEnd.IsZero())
assert.True(t, c.windowSt... | explode_data.jsonl/56721 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 301
} | [
2830,
3393,
4289,
4267,
1155,
353,
8840,
836,
8,
341,
89300,
11,
716,
1669,
882,
8937,
12945,
445,
16,
76,
1138,
33343,
12945,
1669,
2193,
33795,
48148,
692,
1444,
1669,
609,
16055,
14247,
515,
197,
90823,
25,
330,
36136,
14,
2749,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWorkflowError(t *testing.T) {
wf := NewWorkflow("testWorkflowError", nil)
step := func(args interface{}) error {
if args == nil {
return errors.New("Step args cannot be nil")
}
return nil
}
wf.With("VerifyArgsNotNil", step)
err := wf.Start()
assert.Error(t, err)
assert.Equal(t, "Step args c... | explode_data.jsonl/15566 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 133
} | [
2830,
3393,
62768,
1454,
1155,
353,
8840,
836,
8,
341,
6692,
69,
1669,
1532,
62768,
445,
1944,
62768,
1454,
497,
2092,
692,
77093,
1669,
2915,
7356,
3749,
28875,
1465,
341,
197,
743,
2827,
621,
2092,
341,
298,
853,
5975,
7121,
445,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestEventsWriter_WriteEventsUntilStopped(t *testing.T) {
groupName := "my-log-group"
testCases := map[string]struct {
setUpMocks func(m writeEventMocks)
wantedError error
}{
"error getting log events": {
setUpMocks: func(m writeEventMocks) {
m.logGetter.EXPECT().LogEvents(groupName, gomock.Any(), ... | explode_data.jsonl/75654 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1304
} | [
2830,
3393,
7900,
6492,
31825,
7900,
24493,
59803,
1155,
353,
8840,
836,
8,
341,
44260,
675,
1669,
330,
2408,
46332,
4351,
698,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
8196,
2324,
72577,
2915,
1255,
3270,
1556,
72577,
692,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDaoResTagCount(t *testing.T) {
var (
c = context.TODO()
oid = int64(0)
tp = int32(0)
)
convey.Convey("ResTagCount", t, func(ctx convey.C) {
count, err := d.ResTagCount(c, oid, tp)
ctx.Convey("Then err should be nil.count should not be nil.", func(ctx convey.C) {
ctx.So(err, convey.ShouldBeNi... | explode_data.jsonl/46397 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 178
} | [
2830,
3393,
12197,
1061,
5668,
2507,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
1444,
256,
284,
2266,
90988,
741,
197,
197,
588,
284,
526,
21,
19,
7,
15,
340,
197,
73423,
220,
284,
526,
18,
17,
7,
15,
340,
197,
340,
37203,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMultiSiteBundles(t *testing.T) {
assert := require.New(t)
b := newTestSitesBuilder(t)
b.WithConfigFile("toml", `
baseURL = "http://example.com/"
defaultContentLanguage = "en"
[languages]
[languages.en]
weight = 10
contentDir = "content/en"
[languages.nn]
weight = 20
contentDir = "content/nn"
`)
b.Wit... | explode_data.jsonl/68131 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 655
} | [
2830,
3393,
20358,
17597,
33,
49204,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
1373,
7121,
1155,
340,
2233,
1669,
501,
2271,
93690,
3297,
1155,
340,
2233,
26124,
2648,
1703,
445,
37401,
75,
497,
1565,
271,
3152,
3144,
284,
330,
1254,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseIfStatement(t *testing.T) {
p := createParser(`if x == 2 {
}`)
bvmUtils.Assert(t, isIfStatement(p), "should detect if statement")
parseIfStatement(p)
bvmUtils.AssertNow(t, len(p.errs) == 0, fmt.Sprintln(p.errs))
first := p.scope.Next()
bvmUtils.Assert(t, first.Type() == ast.IfStatement, "Asteroid ... | explode_data.jsonl/49710 | {
"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,
14463,
2679,
8636,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
1855,
6570,
5809,
333,
856,
621,
220,
17,
1476,
197,
27085,
2233,
7338,
4209,
11711,
1155,
11,
374,
2679,
8636,
1295,
701,
330,
5445,
11140,
421,
5114,
1138,
751... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStringToIPNet(t *testing.T) {
ipNetString := "192.168.0.100/24"
ipNetExpected := net.IPNet{
IP: net.IPv4(192, 168, 0, 100),
Mask: net.CIDRMask(24, 32),
}
ipNet := StringToIPNet(ipNetString)
if !reflect.DeepEqual(*ipNet, ipNetExpected) {
t.Errorf("test fails, expected %+v but got %+v", ipNetExpec... | explode_data.jsonl/52247 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 150
} | [
2830,
3393,
703,
1249,
3298,
6954,
1155,
353,
8840,
836,
8,
341,
46531,
6954,
703,
1669,
330,
16,
24,
17,
13,
16,
21,
23,
13,
15,
13,
16,
15,
15,
14,
17,
19,
698,
46531,
6954,
18896,
1669,
4179,
46917,
6954,
515,
197,
197,
3298,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseSwitchStatementExclusive(t *testing.T) {
p := createParser(`exclusive switch x {}
`)
bvmUtils.Assert(t, isSwitchStatement(p), "should detect switch statement")
parseSwitchStatement(p)
} | explode_data.jsonl/49722 | {
"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,
14463,
16837,
8636,
70405,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
1855,
6570,
5809,
89122,
3398,
856,
5613,
286,
1565,
340,
2233,
7338,
4209,
11711,
1155,
11,
374,
16837,
8636,
1295,
701,
330,
5445,
11140,
3398,
5114,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuild_WithRepositoryAlias(t *testing.T) {
// Dependency repository is aliased in Chart.yaml
checkBuildWithOptionalFields(t, "with-repository-alias", chart.Dependency{
Repository: "@test",
})
} | explode_data.jsonl/24406 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 70
} | [
2830,
3393,
11066,
62,
2354,
4624,
22720,
1155,
353,
8840,
836,
8,
341,
197,
322,
32977,
12542,
374,
18991,
1475,
304,
21266,
33406,
198,
25157,
11066,
2354,
15309,
8941,
1155,
11,
330,
4197,
5504,
3099,
12,
14956,
497,
9487,
49918,
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 |
func TestStackSize(t *testing.T) {
stacker := stack.Stack{}
stacker.Push("First")
stacker.Push("Seconds")
if stacker.Len() != 2 {
t.Errorf("Size of stack should be 2, not %d\n", stacker.Len())
}
stacker.Pop()
if stacker.Len() != 1 {
t.Errorf("Size of stack should be 1, not %d\n", stacker.Len())
}
} | explode_data.jsonl/81420 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
74026,
1155,
353,
8840,
836,
8,
341,
48227,
261,
1669,
5611,
58646,
31483,
48227,
261,
34981,
445,
5338,
1138,
48227,
261,
34981,
445,
15343,
5130,
743,
5611,
261,
65819,
368,
961,
220,
17,
341,
197,
3244,
13080,
445,
1695,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTabContainer_Resize_Empty(t *testing.T) {
tabs := container.NewAppTabs()
tabs.Resize(fyne.NewSize(10, 10))
size := tabs.Size()
assert.Equal(t, float32(10), size.Height)
assert.Equal(t, float32(10), size.Width)
} | explode_data.jsonl/32314 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 93
} | [
2830,
3393,
8582,
4502,
62,
30561,
76060,
1595,
1155,
353,
8840,
836,
8,
341,
3244,
3435,
1669,
5476,
7121,
2164,
36985,
741,
3244,
3435,
77707,
955,
81708,
7121,
1695,
7,
16,
15,
11,
220,
16,
15,
1171,
13832,
1669,
22398,
2465,
741,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFormatterObjectArguments(test *testing.T) {
formatted, err := formatter.New().Format("{.Z} {.Y} {.X} {.Z}", struct {
X, Y, Z int
}{
X: 4,
Y: 5,
Z: 6,
}, "b")
assert.NoError(test, err)
assert.Equal(test, "6 5 4 6 b", formatted)
} | explode_data.jsonl/39733 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 118
} | [
2830,
3393,
14183,
1190,
19139,
8623,
353,
8840,
836,
8,
341,
37410,
12127,
11,
1848,
1669,
24814,
7121,
1005,
4061,
13976,
13,
57,
92,
50336,
56,
92,
50336,
55,
92,
50336,
57,
9545,
2036,
341,
197,
22123,
11,
809,
11,
1863,
526,
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 TestNewClient(t *testing.T) {
// Setup our config
if err := setupConfig(); err != nil {
t.Fatalf("failed to setup config with error: %v", err.Error())
}
// Create our email client
client, err := yoemail.NewClient()
if err != nil {
t.Fatalf("failed to init client with error: %v", err.Error())
}
// Make ... | explode_data.jsonl/40767 | {
"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,
3564,
2959,
1155,
353,
8840,
836,
8,
341,
197,
322,
18626,
1039,
2193,
198,
743,
1848,
1669,
6505,
2648,
2129,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
16091,
311,
6505,
2193,
448,
1465,
25,
1018,
85,
497,
1848,
6141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func Test_MapToMapDeep(t *testing.T) {
type Ids struct {
Id int
Uid int
}
type Base struct {
Ids
Time string
}
type User struct {
Base
Name string
}
params := g.Map{
"key": g.Map{
"id": 1,
"name": "john",
},
}
gtest.C(t, func(t *gtest.T) {
m := (map[string]*User)(nil)
err := gconv.... | explode_data.jsonl/41427 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 237
} | [
2830,
3393,
56992,
1249,
2227,
33464,
1155,
353,
8840,
836,
8,
341,
13158,
5223,
82,
2036,
341,
197,
67211,
220,
526,
198,
197,
15980,
307,
526,
198,
197,
532,
13158,
5351,
2036,
341,
197,
197,
12701,
198,
197,
67567,
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... | 1 |
func TestFlattenResourceLoadBalancerSubnetSpecInto(t *testing.T) {
_default := map[string]interface{}{
"name": "",
"private_ipv4_address": nil,
"allocation_id": nil,
}
type args struct {
in kops.LoadBalancerSubnetSpec
}
tests := []struct {
name string
args args
want map[string]... | explode_data.jsonl/3625 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 671
} | [
2830,
3393,
3882,
14456,
4783,
5879,
93825,
3136,
4711,
8327,
26591,
1155,
353,
8840,
836,
8,
341,
197,
9993,
1669,
2415,
14032,
31344,
67066,
197,
197,
31486,
788,
338,
8324,
197,
197,
1,
1996,
49378,
19,
6744,
788,
2092,
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... | 1 |
func TestReplaceFileTarWrapper(t *testing.T) {
filesInArchive := 20
testcases := []struct {
doc string
filename string
modifier TarModifierFunc
expected string
fileCount int
}{
{
doc: "Modifier creates a new file",
filename: "newfile",
modifier: createModifier(t),
expected: ... | explode_data.jsonl/79261 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 556
} | [
2830,
3393,
23107,
1703,
62733,
11542,
1155,
353,
8840,
836,
8,
341,
74075,
641,
42502,
1669,
220,
17,
15,
198,
18185,
23910,
1669,
3056,
1235,
341,
197,
59536,
981,
914,
198,
197,
66434,
220,
914,
198,
197,
42228,
3049,
220,
23959,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestBuild(t *testing.T) {
ensure := ensure.New(t)
type Mocks struct {
LambgoFileLoader *mock_lambgofile.MockLoaderAPI
Builder *mock_builder.MockLambdaBuilderAPI
}
exampleError := errors.New("something went wrong")
defaultWd := func() (string, error) {
return "/test", nil
}
table := []struc... | explode_data.jsonl/63633 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1953
} | [
2830,
3393,
11066,
1155,
353,
8840,
836,
8,
341,
197,
27289,
1669,
5978,
7121,
1155,
692,
13158,
14563,
82,
2036,
341,
197,
15070,
2969,
3346,
1703,
9181,
353,
16712,
907,
2969,
70,
65273,
24664,
9181,
7082,
198,
197,
197,
3297,
688,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddHeaders(t *testing.T) {
bc := newTestChain(t)
defer bc.Close()
lastBlock := bc.topBlock.Load().(*block.Block)
h1 := newBlock(bc.config, 1, lastBlock.Hash()).Header()
h2 := newBlock(bc.config, 2, h1.Hash()).Header()
h3 := newBlock(bc.config, 3, h2.Hash()).Header()
require.NoError(t, bc.AddHeaders())
... | explode_data.jsonl/74536 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 561
} | [
2830,
3393,
2212,
10574,
1155,
353,
8840,
836,
8,
341,
2233,
66,
1669,
501,
2271,
18837,
1155,
340,
16867,
17916,
10421,
741,
33096,
4713,
1669,
17916,
8772,
4713,
13969,
1005,
4071,
4574,
28477,
340,
9598,
16,
1669,
501,
4713,
96055,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSelectEncoding(t *testing.T) {
tests := []struct {
optionalName string
given string
expected string
isErr bool
}{
{given: "", expected: "identity", optionalName: "is empty but present, only identity"},
{given: "*", expected: "*"},
{given: "gzip", expected: "gzip"},
{given: ... | explode_data.jsonl/52419 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1191
} | [
2830,
3393,
3379,
14690,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
197,
12807,
675,
914,
198,
197,
3174,
2071,
286,
914,
198,
197,
42400,
257,
914,
198,
197,
19907,
7747,
286,
1807,
198,
197,
59403,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBoxFillWriterDoesNotAlterForeground(t *testing.T) {
bfw := createBoxFillWriter(NewRect(1, 1, 5, 5), termbox.ColorCyan)
for x := 0; x < 10; x++ {
for y := 0; y < 10; y++ {
fgAttribute, _ := bfw(termbox.ColorWhite, termbox.ColorBlack, point{x, y})
assert.Equal(t, termbox.ColorWhite, fgAttribute,
"... | explode_data.jsonl/30728 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 165
} | [
2830,
3393,
1611,
14449,
6492,
21468,
2623,
74290,
25982,
1155,
353,
8840,
836,
8,
341,
2233,
20564,
1669,
1855,
1611,
14449,
6492,
35063,
4415,
7,
16,
11,
220,
16,
11,
220,
20,
11,
220,
20,
701,
4647,
2011,
6669,
34,
8339,
692,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRefreshWithUpdateError(t *testing.T) {
defer monkeyPatchGopherCloudAuth().Unpatch()
defer monkeyPatchGopherCloudComputeClientWithError().Unpatch()
clouds := fakeClouds()
errs := clouds.Refresh()
assert.NotEmpty(t, errs)
} | explode_data.jsonl/57476 | {
"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,
14567,
2354,
4289,
1454,
1155,
353,
8840,
836,
8,
341,
16867,
38703,
43622,
38,
16940,
16055,
5087,
1005,
1806,
3400,
741,
16867,
38703,
43622,
38,
16940,
16055,
46254,
2959,
66102,
1005,
1806,
3400,
741,
197,
12361,
82,
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 |
func TestInMemoryChannelGetCondition(t *testing.T) {
tests := []struct {
name string
cs *InMemoryChannelStatus
condQuery apis.ConditionType
want *apis.Condition
}{{
name: "single condition",
cs: &InMemoryChannelStatus{
Status: duckv1beta1.Status{
Conditions: []apis.Condition{
... | explode_data.jsonl/22195 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 401
} | [
2830,
3393,
641,
10642,
9629,
1949,
10547,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
71899,
286,
353,
641,
10642,
9629,
2522,
198,
197,
197,
1297,
2859,
97723,
75134,
929,
198,
197,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSyncer_isThisCluster(t *testing.T) {
tests := []struct {
name string
managedClusterName string
placement v1alpha1.Placement
want bool
}{
{"same cluster single placement", "mycluster1", v1alpha1.Placement{Clusters: []v1alpha1.Cluster{{Name: "mycluster1"}}}, true}... | explode_data.jsonl/42634 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 439
} | [
2830,
3393,
12154,
261,
6892,
1986,
28678,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
2290,
914,
198,
197,
197,
25270,
28678,
675,
914,
198,
197,
197,
16101,
688,
348,
16,
7141,
16,
21368,
6346,
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 Test_convert(t *testing.T) {
s1 := convert("PAYPALISHIRING", 3)
if s1 != "PAHNAPLSIIGYIR" {
t.Error(s1, "PAHNAPLSIIGYIR")
}
} | explode_data.jsonl/59809 | {
"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,
34910,
1155,
353,
8840,
836,
8,
341,
1903,
16,
1669,
5508,
445,
59897,
73342,
16444,
2801,
1718,
497,
220,
18,
340,
743,
274,
16,
961,
330,
8041,
43165,
2537,
7268,
40,
1914,
56,
2801,
1,
341,
197,
3244,
6141,
1141,
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
] | 2 |
func TestValidateAndBuildNodeBNameKeySuccess(t *testing.T) {
name := "name"
prefix := "RAN"
delimiter := ":"
key, err := ValidateAndBuildNodeBNameKey(name)
if err != nil{
t.Errorf("#utils_test.TestValidateAndBuildNodeBNameKey - failed to validate key parameter")
}
assert.Contains(t, key, name)
assert.Contains... | explode_data.jsonl/33036 | {
"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,
17926,
3036,
11066,
1955,
33,
675,
1592,
7188,
1155,
353,
8840,
836,
8,
341,
11609,
1669,
330,
606,
698,
3223,
5060,
1669,
330,
49,
1093,
698,
69509,
17700,
1669,
13022,
698,
23634,
11,
1848,
1669,
23282,
3036,
11066,
1955,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetFlavorRaid(t *testing.T) {
testFlavorId := "BBC-G4-01S"
rep, err := BBC_CLIENT.GetFlavorRaid(testFlavorId)
fmt.Println(rep)
ExpectEqual(t.Errorf, err, nil)
} | explode_data.jsonl/4055 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
1949,
3882,
3292,
49,
3779,
1155,
353,
8840,
836,
8,
341,
18185,
3882,
3292,
764,
1669,
330,
66755,
12010,
19,
12,
15,
16,
50,
698,
73731,
11,
1848,
1669,
18096,
22521,
2234,
3882,
3292,
49,
3779,
8623,
3882,
3292,
764,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_addSubscriber_Paracheck(t *testing.T) {
chain, mock33 := createBlockChain(t)
defer mock33.Close()
subscribe := new(types.PushSubscribeReq)
subscribe.LastSequence = 1
err := chain.procSubscribePush(subscribe)
assert.Equal(t, err, types.ErrInvalidParam)
} | explode_data.jsonl/61712 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 98
} | [
2830,
3393,
2891,
40236,
1088,
277,
1777,
377,
1155,
353,
8840,
836,
8,
341,
197,
8819,
11,
7860,
18,
18,
1669,
1855,
4713,
18837,
1155,
340,
16867,
7860,
18,
18,
10421,
741,
28624,
6273,
1669,
501,
52613,
34981,
28573,
27234,
340,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIntExpressionBIT_OR(t *testing.T) {
assertClauseSerialize(t, table1ColInt.BIT_OR(table2ColInt), "(table1.col_int | table2.col_int)")
assertClauseSerialize(t, table1ColInt.BIT_OR(Int(11)), "(table1.col_int | $1)", int64(11))
} | explode_data.jsonl/41463 | {
"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,
1072,
9595,
20917,
19834,
1155,
353,
8840,
836,
8,
341,
6948,
28482,
15680,
1155,
11,
1965,
16,
6127,
1072,
1785,
952,
19834,
15761,
17,
6127,
1072,
701,
11993,
2005,
16,
13414,
4042,
760,
1965,
17,
13414,
4042,
19107,
6948,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIDPCanHandleUnencryptedResponse(t *testing.T) {
test := NewIdentifyProviderTest(t)
test.IDP.SessionProvider = &mockSessionProvider{
GetSessionFunc: func(w http.ResponseWriter, r *http.Request, req *IdpAuthnRequest) *Session {
return &Session{ID: "f00df00df00d", UserName: "alice"}
},
}
metadata := E... | explode_data.jsonl/19836 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 590
} | [
2830,
3393,
915,
4872,
276,
6999,
1806,
36444,
2582,
1155,
353,
8840,
836,
8,
341,
18185,
1669,
1532,
28301,
1437,
5179,
2271,
1155,
340,
18185,
9910,
47,
20674,
5179,
284,
609,
16712,
5283,
5179,
515,
197,
37654,
5283,
9626,
25,
2915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMakerGhostingAfterTakerRedeem(t *testing.T) {
tLog.Info("=== SETUP")
cancelCtx, err := setup()
if err != nil {
t.Fatal(err)
}
tLog.Info("=== SETUP COMPLETED")
defer teardown(cancelCtx)
var qty, rate uint64 = 1 * lotSize, 250 * rateStep // 10 DCR at 0.00025 BTC/DCR
client1.isSeller, client2.isSeller ... | explode_data.jsonl/30473 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1112
} | [
2830,
3393,
33259,
64686,
287,
6025,
51,
4407,
6033,
68,
336,
1155,
353,
8840,
836,
8,
341,
3244,
2201,
20132,
445,
8707,
90857,
1138,
84441,
23684,
11,
1848,
1669,
6505,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
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 TestHandshakeClientECDHEECDSAAES(t *testing.T) {
test := &clientTest{
name: "ECDHE-ECDSA-AES",
args: []string{"-cipher", "ECDHE-ECDSA-AES128-SHA"},
cert: testECDSACertificate,
key: testECDSAPrivateKey,
}
runClientTestTLS10(t, test)
runClientTestTLS11(t, test)
runClientTestTLS12(t, test)
} | explode_data.jsonl/27694 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 137
} | [
2830,
3393,
2314,
29661,
2959,
36,
6484,
1799,
7498,
5936,
6029,
1570,
1155,
353,
8840,
836,
8,
341,
18185,
1669,
609,
2972,
2271,
515,
197,
11609,
25,
330,
36,
6484,
1799,
12,
7498,
72638,
6691,
1570,
756,
197,
31215,
25,
3056,
917,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSyncer_SyncAny_reject_format(t *testing.T) {
syncer, connSnapshot := setupOfferSyncer(t)
// s22 is tried first, which reject s22 and s12, then s11 will abort.
s22 := &snapshot{Height: 2, Format: 2, Chunks: 3, Hash: []byte{1, 2, 3}}
s12 := &snapshot{Height: 1, Format: 2, Chunks: 3, Hash: []byte{1, 2, 3}}
... | explode_data.jsonl/46288 | {
"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,
12154,
261,
1098,
1721,
8610,
1288,
583,
8955,
1155,
353,
8840,
836,
8,
341,
1903,
1721,
261,
11,
4534,
15009,
1669,
6505,
39462,
12154,
261,
1155,
692,
197,
322,
274,
17,
17,
374,
6679,
1156,
11,
892,
7850,
274,
17,
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 TestCommandRunHappy(t *testing.T) {
testDir, err := initTestFiles(map[string]string{
"foo.yaml": `
pipeline:
processors:
- text:
ignored: this field is ignored
operator: to_upper`,
"foo_benthos_test.yaml": `
tests:
- name: example test
target_processors: '/pipeline/processors'
enviro... | explode_data.jsonl/34067 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 487
} | [
2830,
3393,
4062,
6727,
32847,
1155,
353,
8840,
836,
8,
341,
18185,
6184,
11,
1848,
1669,
2930,
2271,
10809,
9147,
14032,
30953,
515,
197,
197,
1,
7975,
33406,
788,
22074,
51258,
510,
220,
36586,
510,
220,
481,
1467,
510,
414,
12036,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDataSourcesFailure(t *testing.T) {
Convey("Given a data source", t, func() {
ctx := NewContext(nil)
srcs := newDataSources(NTBox, "test_component")
r, s := newPipe("test", 1)
srcs.add("test_node", r)
Reset(func() {
s.close()
})
stopped := make(chan error, 1)
go func() {
stopped <- srcs.p... | explode_data.jsonl/38416 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 393
} | [
2830,
93200,
32200,
17507,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
22043,
264,
821,
2530,
497,
259,
11,
2915,
368,
341,
197,
20985,
1669,
1532,
1972,
27907,
340,
197,
41144,
82,
1669,
51523,
32200,
7,
6408,
1611,
11,
330,
1944... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCryptoUnboxBytes32NoEncryptionKey(t *testing.T) {
tc := SetupEngineTest(t, "crypto")
defer tc.Cleanup()
secretUI := &libkb.TestSecretUI{}
_, err := UnboxBytes32(tc.G, secretUI, keybase1.UnboxBytes32Arg{})
if _, ok := err.(libkb.SelfNotFoundError); !ok {
t.Errorf("expected SelfNotFoundError, got %v", e... | explode_data.jsonl/16764 | {
"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,
58288,
1806,
2011,
7078,
18,
17,
2753,
79239,
1592,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
18626,
4571,
2271,
1155,
11,
330,
35772,
1138,
16867,
17130,
727,
60639,
2822,
197,
20474,
2275,
1669,
609,
2740,
21310,
8787,
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 TestHTTPServerWSRateLimit(t *testing.T) {
t.Parallel()
reg := apiRegMutWrapper{mut: &http.ServeMux{}}
rlConf := ratelimit.NewConfig()
rlConf.Type = ratelimit.TypeLocal
rlConf.Local.Count = 1
rlConf.Local.Interval = "60s"
mgrConf := manager.NewConfig()
mgrConf.RateLimits["foorl"] = rlConf
mgr, err := ma... | explode_data.jsonl/40363 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 841
} | [
2830,
3393,
9230,
5475,
7433,
11564,
16527,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
37013,
1669,
6330,
3477,
51440,
11542,
90,
6984,
25,
609,
1254,
83535,
44,
2200,
6257,
630,
197,
2381,
15578,
1669,
11244,
301,
2353,
712... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestSHAAndTagAndVersion(t *testing.T) {
{
sset, err := makeStatefulSet(&monitoringv1.Alertmanager{
Spec: monitoringv1.AlertmanagerSpec{
Tag: "my-unrelated-tag",
Version: "v0.15.3",
},
}, defaultTestConfig, "")
if err != nil {
t.Fatalf("Unexpected error while making StatefulSet: %v", err... | explode_data.jsonl/25251 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 831
} | [
2830,
3393,
33145,
3036,
5668,
3036,
5637,
1155,
353,
8840,
836,
8,
341,
197,
515,
197,
1903,
746,
11,
1848,
1669,
1281,
1397,
1262,
1649,
2099,
32225,
287,
85,
16,
40143,
13297,
515,
298,
7568,
992,
25,
16558,
85,
16,
40143,
13297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateInitiator_FeedsErrors(t *testing.T) {
t.Parallel()
store, cleanup := cltest.NewStore(t)
defer cleanup()
bridge := &models.BridgeType{
Name: models.MustNewTaskType("testbridge"),
URL: cltest.WebURL(t, "https://testing.com/bridges"),
}
require.NoError(t, store.CreateBridgeType(bridge))
job... | explode_data.jsonl/75337 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 497
} | [
2830,
3393,
17926,
3803,
36122,
1400,
68,
6767,
13877,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
57279,
11,
21290,
1669,
1185,
1944,
7121,
6093,
1155,
340,
16867,
21290,
2822,
197,
13709,
1669,
609,
6507,
1785,
11183,
929,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTimeWithinTimeRangeNextDay(t *testing.T) {
// Now test end time before start time (e.g. overnight)
timeRange, _ := NewTimeRange("23:00-01:00")
newTime := getDateForTime(23, 30)
if !timeRange.HasTime(newTime) {
t.Fail()
}
} | explode_data.jsonl/61797 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
1462,
41961,
1462,
6046,
5847,
10159,
1155,
353,
8840,
836,
8,
341,
197,
322,
4695,
1273,
835,
882,
1573,
1191,
882,
320,
68,
1302,
13,
24398,
340,
21957,
6046,
11,
716,
1669,
1532,
1462,
6046,
445,
17,
18,
25,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestArranging_ExecuteOutbound(t *testing.T) {
const errMsg = "test error"
ctrl := gomock.NewController(t)
defer ctrl.Finish()
messenger := serviceMocks.NewMockMessenger(ctrl)
messenger.EXPECT().Send(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil)
messenger.EXPECT().Send(gomock.Any(), gomock.Any(), go... | explode_data.jsonl/66244 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 359
} | [
2830,
3393,
8838,
8595,
83453,
2662,
10891,
1155,
353,
8840,
836,
8,
341,
4777,
60078,
284,
330,
1944,
1465,
1837,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
2109,
40137,
1669,
2473,
72577,
7121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRejectControlCharacters(t *testing.T) {
tests := []string{
"http://foo.com/?foo\nbar",
"http\r://foo.com/",
"http://foo\x7f.com/",
}
for _, s := range tests {
_, err := Parse(s)
const wantSub = "net/url: invalid control character in URL"
if got := fmt.Sprint(err); !strings.Contains(got, wantSub)... | explode_data.jsonl/71740 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 247
} | [
2830,
3393,
78413,
3273,
37489,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
917,
515,
197,
197,
76932,
1110,
7975,
905,
17763,
7975,
1699,
2257,
756,
197,
197,
76932,
12016,
1110,
7975,
905,
35075,
197,
197,
76932,
1110,
7975,
3462... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMarshalUnmarshalPubKeyTable(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
t.Parallel()
sf := newTestFile()
sf.addRandomHostKeys(10)
// Marshal pubKeyTable.
raw, err := marshalPubKeyTable(sf.pubKeyTable)
if err != nil {
t.Fatal("Failed to marshal pubKeyTable", err)
}
// Unmarshal pubKeyTabl... | explode_data.jsonl/25110 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 345
} | [
2830,
3393,
55438,
1806,
27121,
29162,
1592,
2556,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
7039,
741,
197,
532,
3244,
41288,
7957,
2822,
53024,
1669,
501,
2271,
1703,
741,
53024,
1364,
13999,
9296,
88... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMatchQueryString(t *testing.T) {
hreq := &definition.Request{}
hval := make(definition.Values)
hval["test"] = []string{"test"}
hreq.QueryStringParameters = hval
mreq := &definition.Request{}
mval := make(definition.Values)
mval["test"] = []string{"test"}
mreq.QueryStringParameters = mval
m := MockM... | explode_data.jsonl/1091 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 196
} | [
2830,
3393,
8331,
67001,
1155,
353,
8840,
836,
8,
1476,
9598,
2958,
1669,
609,
18375,
9659,
16094,
9598,
831,
1669,
1281,
7,
18375,
35145,
340,
9598,
831,
1183,
1944,
1341,
284,
3056,
917,
4913,
1944,
16707,
9598,
2958,
49919,
9706,
284... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestDescribeNetworkPolicies(t *testing.T) {
expectedTime, err := time.Parse("2006-01-02 15:04:05 Z0700 MST", "2017-06-04 21:45:56 -0700 PDT")
if err != nil {
t.Errorf("unable to parse time %q error: %s", "2017-06-04 21:45:56 -0700 PDT", err)
}
expectedOut := `Name: network-policy-1
Namespace: defa... | explode_data.jsonl/34949 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2341
} | [
2830,
3393,
74785,
12320,
47,
42038,
1155,
353,
8840,
836,
8,
341,
42400,
1462,
11,
1848,
1669,
882,
8937,
445,
17,
15,
15,
21,
12,
15,
16,
12,
15,
17,
220,
16,
20,
25,
15,
19,
25,
15,
20,
1863,
15,
22,
15,
15,
84280,
497,
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 TestDaoRelationsByTid(t *testing.T) {
var (
c = context.TODO()
tid = int64(0)
start = int32(0)
end = int32(0)
)
convey.Convey("RelationsByTid", t, func(ctx convey.C) {
res, oids, err := d.RelationsByTid(c, tid, start, end)
ctx.Convey("Then err should be nil.res,oids should not be nil.", func... | explode_data.jsonl/46394 | {
"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,
12197,
74164,
1359,
51,
307,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
1444,
257,
284,
2266,
90988,
741,
197,
3244,
307,
256,
284,
526,
21,
19,
7,
15,
340,
197,
21375,
284,
526,
18,
17,
7,
15,
340,
197,
6246,
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 TestGetKind(t *testing.T) {
for _, tc := range []struct {
desc string
convertFn interface{}
wantKind reflect.Kind
wantErr bool
}{
{"convertIntToInt64Fn", convertIntToInt64Fn, reflect.Int64, false},
{"convertInt8ToInt64Fn", convertInt8ToInt64Fn, reflect.Int64, false},
{"convertInt16ToInt64Fn... | explode_data.jsonl/42974 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 613
} | [
2830,
3393,
1949,
10629,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
41653,
414,
914,
198,
197,
197,
14166,
24911,
3749,
16094,
197,
50780,
10629,
220,
8708,
54199,
198,
197,
50780,
7747,
256,
1807... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRepositoryGet(t *testing.T) {
for k, v := range samples {
model, err := sr.Get(v.ID)
if k != 3 {
if err != nil {
t.Fatalf("sr.Get: %d %v", k, err)
}
if model != v {
t.Fatalf("sr.Get != sample - %d", k)
}
} else {
if err != repo.ErrInvalidID {
t.Fatalf("sr.Get != repo.ErrInva... | explode_data.jsonl/75693 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 173
} | [
2830,
3393,
4624,
1949,
1155,
353,
8840,
836,
8,
341,
2023,
595,
11,
348,
1669,
2088,
10469,
341,
197,
19727,
11,
1848,
1669,
18962,
2234,
3747,
9910,
692,
197,
743,
595,
961,
220,
18,
341,
298,
743,
1848,
961,
2092,
341,
571,
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... | 6 |
func TestSamplingPolicyDecisionNotSampled(t *testing.T) {
const maxSize = 100
const decisionWaitSeconds = 5
// For this test explicitly control the timer calls and batcher, and set a mock
// sampling policy evaluator.
msp := new(consumertest.TracesSink)
mpe := &mockPolicyEvaluator{}
mtt := &manualTTicker{}
tsp ... | explode_data.jsonl/31675 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 880
} | [
2830,
3393,
98622,
13825,
74846,
2623,
17571,
67,
1155,
353,
8840,
836,
8,
341,
4777,
61935,
284,
220,
16,
15,
15,
198,
4777,
5480,
14190,
15343,
284,
220,
20,
198,
197,
322,
1752,
419,
1273,
20975,
2524,
279,
9021,
6738,
323,
7162,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetRoleFullnames(t *testing.T) {
host := &Host{
Roles: Roles{
"My-Service": []string{"db-master", "db-slave"},
"My-Service2": []string{"proxy"},
},
}
fullnames := host.GetRoleFullnames()
sort.Strings(fullnames)
if !reflect.DeepEqual(fullnames, []string{"My-Service2:proxy", "My-Service:db-mast... | explode_data.jsonl/63817 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 187
} | [
2830,
3393,
1949,
9030,
9432,
11400,
1155,
353,
8840,
836,
8,
341,
63104,
1669,
609,
9296,
515,
197,
11143,
7151,
25,
50907,
515,
298,
197,
45140,
12,
1860,
788,
220,
3056,
917,
4913,
1999,
50903,
497,
330,
1999,
58097,
523,
7115,
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 TestDuplicateRowInvalidRownum(t *testing.T) {
const sheet = "Sheet1"
outFile := filepath.Join("test", "TestDuplicateRowInvalidRownum.%s.xlsx")
cells := map[string]string{
"A1": "A1 Value",
"A2": "A2 Value",
"A3": "A3 Value",
"B1": "B1 Value",
"B2": "B2 Value",
"B3": "B3 Value",
}
invalidIndexes ... | explode_data.jsonl/30502 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 726
} | [
2830,
3393,
53979,
3102,
7928,
49,
779,
372,
1155,
353,
8840,
836,
8,
341,
4777,
10834,
284,
330,
10541,
16,
698,
13967,
1703,
1669,
26054,
22363,
445,
1944,
497,
330,
2271,
53979,
3102,
7928,
49,
779,
372,
22445,
82,
46838,
5130,
144... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientRTMPRead(t *testing.T) {
p, ok := testProgram("hlsDisable: yes\n")
require.Equal(t, true, ok)
defer p.close()
cnt1, err := newContainer("ffmpeg", "source", []string{
"-re",
"-stream_loop", "-1",
"-i", "emptyvideo.mkv",
"-c", "copy",
"-f", "rtsp",
"rtsp://localhost:8554/teststream",
})
... | explode_data.jsonl/63221 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 287
} | [
2830,
3393,
2959,
5350,
5781,
4418,
1155,
353,
8840,
836,
8,
341,
3223,
11,
5394,
1669,
1273,
10690,
445,
71,
4730,
25479,
25,
9834,
1699,
1138,
17957,
12808,
1155,
11,
830,
11,
5394,
340,
16867,
281,
4653,
2822,
60553,
16,
11,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestExists(t *testing.T) {
t.Run("Topic exists test", func(t *testing.T) {
Init(clientId)
_, err := Exists(topicName)
if err != nil {
t.Error(err)
} else {
log.Println("Exists topic test is successful.")
}
})
} | explode_data.jsonl/4855 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 101
} | [
2830,
3393,
15575,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
26406,
6724,
1273,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
98762,
12805,
764,
692,
197,
197,
6878,
1848,
1669,
72426,
43839,
675,
692,
197,
743,
1848,
961,
2092,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestService_UnShorten(t *testing.T) {
type fields struct {
ctx context.Context
}
type args struct {
param *RedirectLinkRequest
}
tests := []struct {
name string
fields fields
args args
want string
wantErr bool
}{
{
name: "短连接还原",
fields: fields{
ctx: context.Background(),
... | explode_data.jsonl/81478 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 364
} | [
2830,
3393,
1860,
40687,
12472,
268,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
20985,
2266,
9328,
198,
197,
532,
13158,
2827,
2036,
341,
197,
36037,
353,
17725,
3939,
1900,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestModifyCount(t *testing.T) {
t.Run("empty", func(t *testing.T) {
sql := MysqlModifier.Count("select ? from x", "")
t.Log(sql)
if strings.TrimSpace(sql) != "SELECT COUNT(0) FROM (select ? from x) AS __hp_tempCountTl" {
t.Fail()
}
})
t.Run("test", func(t *testing.T) {
sql := MysqlModifier.Count(... | explode_data.jsonl/64347 | {
"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,
44427,
2507,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
3194,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
30633,
1669,
386,
14869,
34405,
6134,
445,
1742,
937,
504,
856,
497,
14676,
197,
3244,
5247,
13148,
692,
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 TestEventCloseSyscallFailure(t *testing.T) {
event := NewEvent(5)
closeProc = SimpleMockProc(0, 0, ErrorNotSupported)
err := event.Close()
require.Error(t, err)
require.Contains(t, err.Error(), "failed to close event handle")
} | explode_data.jsonl/57219 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 84
} | [
2830,
3393,
1556,
7925,
32792,
6659,
17507,
1155,
353,
8840,
836,
8,
341,
28302,
1669,
1532,
1556,
7,
20,
340,
27873,
24508,
284,
8993,
11571,
24508,
7,
15,
11,
220,
15,
11,
4600,
2623,
34636,
340,
9859,
1669,
1538,
10421,
741,
17957,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestObjects_Delete(t *testing.T) {
m := NewClient(os.Getenv("MNUBO_CLIENT_ID"), os.Getenv("MNUBO_CLIENT_SECRET"), os.Getenv("MNUBO_HOST"))
id := uuid.New().String()
o := SimpleObject{
XDeviceID: id,
XObjectType: "rand",
}
var results interface{}
e1, e2 := m.Objects.Create(o, &results), m.Objects.Delet... | explode_data.jsonl/81382 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 202
} | [
2830,
3393,
11543,
57418,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1532,
2959,
9638,
64883,
445,
44,
3926,
4677,
22521,
3450,
3975,
2643,
64883,
445,
44,
3926,
4677,
22521,
31408,
3975,
2643,
64883,
445,
44,
3926,
4677,
17213,
5455,
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... | 3 |
func TestContext2Plan_createBefore_maintainRoot(t *testing.T) {
m := testModule(t, "plan-cbd-maintain-root")
p := testProvider("aws")
p.DiffFn = testDiffFn
ctx := testContext2(t, &ContextOpts{
Config: m,
ProviderResolver: providers.ResolverFixed(
map[string]providers.Factory{
"aws": testProviderFuncFixed... | explode_data.jsonl/28638 | {
"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,
1972,
17,
20485,
8657,
10227,
717,
1641,
466,
8439,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1273,
3332,
1155,
11,
330,
10393,
1786,
8940,
1448,
1641,
466,
39214,
1138,
3223,
1669,
1273,
5179,
445,
8635,
1138,
3223,
98063,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewBuilderMux(t *testing.T) {
tests := []struct {
description string
pipelines []latestV1.Pipeline
pipeBuilder func(latestV1.Pipeline) (PipelineBuilder, error)
shouldErr bool
expectedBuilders []string
expectedConcurrency int
}{
{
description: "only loca... | explode_data.jsonl/22141 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 962
} | [
2830,
3393,
3564,
3297,
44,
2200,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
42407,
260,
914,
198,
197,
3223,
93997,
1843,
3056,
19350,
53,
16,
1069,
8790,
198,
197,
197,
13768,
3297,
260,
2915,
2333,
13893,
53,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNilOutZerValueAppSources(t *testing.T) {
var spec *argoappv1.ApplicationSpec
{
spec = NormalizeApplicationSpec(&argoappv1.ApplicationSpec{Source: argoappv1.ApplicationSource{Kustomize: &argoappv1.ApplicationSourceKustomize{NamePrefix: "foo"}}})
assert.NotNil(t, spec.Source.Kustomize)
spec = NormalizeAp... | explode_data.jsonl/49987 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 760
} | [
2830,
3393,
19064,
2662,
57,
261,
1130,
2164,
32200,
1155,
353,
8840,
836,
8,
341,
2405,
1398,
353,
12088,
676,
85,
16,
17521,
8327,
198,
197,
515,
197,
98100,
284,
68092,
4988,
8327,
2099,
12088,
676,
85,
16,
17521,
8327,
90,
3608,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateValidation(t *testing.T) {
out := jen.NewFile("main")
sym, err := symbols.ProjectByDir(".", symbols.All)
assert.NoError(t, err, "parse")
userA, err := sym.FindSymbol("UserA", sym.Package.FindFile("gen_test.go"))
assert.NoError(t, err, "find struct UserA")
generated, err := GenerateValidation(use... | explode_data.jsonl/50765 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 206
} | [
2830,
3393,
31115,
13799,
1155,
353,
8840,
836,
8,
341,
13967,
1669,
502,
268,
7121,
1703,
445,
3817,
1138,
1903,
1600,
11,
1848,
1669,
17738,
30944,
1359,
6184,
64217,
17738,
16764,
340,
6948,
35699,
1155,
11,
1848,
11,
330,
6400,
1138... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestValidateSubLink(t *testing.T) {
validSubIface := "lo.10"
invalidSubIface1 := "lo"
invalidSubIface2 := "lo:10"
invalidSubIface3 := "foo123.456"
// test a valid parent_iface.vlan_id
_, _, err := parseVlan(validSubIface)
if err != nil {
t.Fatalf("failed subinterface validation: %v", err)
}
// test an ... | explode_data.jsonl/51912 | {
"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,
17926,
3136,
3939,
1155,
353,
8840,
836,
8,
341,
56322,
3136,
40,
1564,
1669,
330,
385,
13,
16,
15,
698,
197,
11808,
3136,
40,
1564,
16,
1669,
330,
385,
698,
197,
11808,
3136,
40,
1564,
17,
1669,
330,
385,
25,
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... | 5 |
func TestFailureBadRefs(t *testing.T) {
badRefsESSpan, err := loadESSpanFixture(1)
require.NoError(t, err)
badRefsESSpan.References = []Reference{
{
RefType: "makeOurOwnCasino",
TraceID: "1",
},
}
failingSpanTransform(t, &badRefsESSpan, "not a valid SpanRefType string makeOurOwnCasino")
} | explode_data.jsonl/5148 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 129
} | [
2830,
3393,
17507,
17082,
82807,
1155,
353,
8840,
836,
8,
341,
2233,
329,
82807,
9996,
848,
11,
1848,
1669,
2795,
9996,
848,
18930,
7,
16,
340,
17957,
35699,
1155,
11,
1848,
340,
2233,
329,
82807,
9996,
848,
2817,
4901,
284,
3056,
885... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRandomPort(t *testing.T) {
m := map[int]int{}
kub := &instance{
randomPorts: map[int]int{},
}
for i := 0; i < 100; i++ {
p := kub.RandomPort()
if p < 1024 {
t.Errorf("Invalid random port %d", p)
break
}
if _, ok := m[p]; ok {
t.Errorf("Random port collision, port %d already provided", p)... | explode_data.jsonl/50059 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 165
} | [
2830,
3393,
13999,
7084,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
2415,
18640,
63025,
16094,
16463,
392,
1669,
609,
4851,
515,
197,
83628,
68273,
25,
2415,
18640,
63025,
38837,
197,
532,
2023,
600,
1669,
220,
15,
26,
600,
366,
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... | 4 |
func TestSearchAllTeamsSanitization(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
team, resp := th.Client.CreateTeam(&model.Team{
DisplayName: t.Name() + "_1",
Name: GenerateTestTeamName(),
Email: th.GenerateTestEmail(),
Type: model.TEAM_OPEN,
AllowedDomain... | explode_data.jsonl/70719 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 978
} | [
2830,
3393,
5890,
2403,
60669,
23729,
275,
2022,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
197,
9196,
11,
9039,
1669,
270,
11716,
7251,
14597,
2099,
2528,
65842,
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... | 2 |
func TestReadConfig(t *testing.T) {
configStr := `apiVersion: v1
kind: PodNodeConstraintsConfig
nodeSelectorLabelBlacklist:
- bogus
- foo
`
buf := bytes.NewBufferString(configStr)
config, err := readConfig(buf)
if err != nil {
t.Fatalf("unexpected error reading config: %v", err)
}
if len(config.NodeSelector... | explode_data.jsonl/37023 | {
"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,
4418,
2648,
1155,
353,
8840,
836,
8,
341,
25873,
2580,
1669,
1565,
2068,
5637,
25,
348,
16,
198,
15314,
25,
16821,
1955,
12925,
2648,
198,
3509,
5877,
2476,
14417,
1607,
510,
220,
481,
59920,
198,
220,
481,
15229,
198,
398... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContext2Plan_pathVar(t *testing.T) {
cwd, err := os.Getwd()
if err != nil {
t.Fatalf("err: %s", err)
}
m := testModule(t, "plan-path-var")
p := testProvider("aws")
p.GetSchemaReturn = &ProviderSchema{
ResourceTypes: map[string]*configschema.Block{
"aws_instance": {
Attributes: map[string]*con... | explode_data.jsonl/28693 | {
"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,
1972,
17,
20485,
2638,
3962,
1155,
353,
8840,
836,
8,
341,
1444,
6377,
11,
1848,
1669,
2643,
2234,
6377,
741,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
615,
25,
1018,
82,
497,
1848,
340,
197,
630,
2109,
1669,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestSocketWriter_unixgram(t *testing.T) {
tmpdir, err := ioutil.TempDir("", "telegraf")
require.NoError(t, err)
defer os.RemoveAll(tmpdir)
sock := filepath.Join(tmpdir, "sw.TSW_unixgram.sock")
listener, err := net.ListenPacket("unixgram", sock)
require.NoError(t, err)
sw := newSocketWriter()
sw.Address =... | explode_data.jsonl/34020 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 173
} | [
2830,
3393,
10286,
6492,
80572,
1520,
1155,
353,
8840,
836,
8,
341,
20082,
3741,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
15410,
76039,
1138,
17957,
35699,
1155,
11,
1848,
340,
16867,
2643,
84427,
10368,
3741,
340,
85809,
1669,
260... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestStackTrace(t *testing.T) {
st := genStack1()
t.Logf("Stack trace:\n%s", PrintStackTrace(st))
encoded := EncodeStackTrace(st)
t.Logf("encoded:\n%s", encoded)
if !strings.Contains(encoded, `"function":"genStack1"`) ||
!strings.Contains(encoded, `"function":"genStack2"`) {
t.Fatalf("function genStack n... | explode_data.jsonl/55532 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 225
} | [
2830,
3393,
7657,
1155,
353,
8840,
836,
8,
341,
18388,
1669,
4081,
4336,
16,
2822,
3244,
98954,
445,
4336,
11655,
7190,
77,
12952,
497,
8213,
7657,
5895,
4390,
197,
19329,
1669,
56562,
7657,
5895,
340,
3244,
98954,
445,
19329,
7190,
77,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseImageStreamTagName(t *testing.T) {
tests := map[string]struct {
id string
expectedName string
expectedTag string
expectError bool
}{
"empty id": {
id: "",
expectError: true,
},
"missing semicolon": {
id: "hello",
expectError: true,
},
"too many... | explode_data.jsonl/40824 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 569
} | [
2830,
3393,
14463,
1906,
3027,
22616,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
15710,
1843,
914,
198,
197,
42400,
675,
914,
198,
197,
42400,
5668,
220,
914,
198,
197,
24952,
1454,
220,
1807,
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... | 6 |
func TestClient_CancelJobRun(t *testing.T) {
t.Parallel()
app, cleanup := cltest.NewApplication(t, cltest.EthMockRegisterChainID)
defer cleanup()
require.NoError(t, app.Start())
job := cltest.NewJobWithWebInitiator()
require.NoError(t, app.Store.CreateJob(&job))
run := cltest.NewJobRun(job)
require.NoError(t,... | explode_data.jsonl/78864 | {
"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,
2959,
97485,
12245,
6727,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
28236,
11,
21290,
1669,
1185,
1944,
7121,
4988,
1155,
11,
1185,
1944,
5142,
339,
11571,
8690,
18837,
915,
340,
16867,
21290,
741,
17957,
35699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSomething(t *testing.T) {
paths := eachDir("/foo/b//bar/")
if len(paths) != 4 {
t.Fail()
}
// TODO: fix me for windows
if runtime.GOOS != "windows" {
paths = eachDir("/")
if len(paths) != 1 && paths[0] != "/" {
t.Fail()
}
}
} | explode_data.jsonl/20889 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 118
} | [
2830,
3393,
23087,
1155,
353,
8840,
836,
8,
341,
197,
21623,
1669,
1817,
6184,
4283,
7975,
3470,
322,
2257,
53006,
743,
2422,
54728,
8,
961,
220,
19,
341,
197,
3244,
57243,
741,
197,
532,
197,
322,
5343,
25,
5046,
752,
369,
11030,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue262(t *testing.T) {
// Continue does not work when the current breakpoint is set on a NOP instruction
protest.AllowRecording(t)
withTestProcess("issue262", t, func(p *proc.Target, fixture protest.Fixture) {
setFileBreakpoint(p, t, fixture.Source, 11)
assertNoError(p.Continue(), t, "Continue()")
... | explode_data.jsonl/56235 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 195
} | [
2830,
3393,
42006,
17,
21,
17,
1155,
353,
8840,
836,
8,
341,
197,
322,
15003,
1558,
537,
975,
979,
279,
1482,
52745,
374,
738,
389,
264,
86376,
7600,
198,
197,
776,
1944,
29081,
52856,
1155,
340,
46948,
2271,
7423,
445,
11159,
17,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestModuleFailsToHandle(t *testing.T) {
// Arrange
logger, err := zap.NewDevelopment()
require.NoError(t, err, "failed to get logger")
config := getConfigWithAuthListener(t, []string{"auth"}, []int{1}, true)
loader := loaderstest.MockLoader{}
mModule1 := createMockHandlerWithReturn(nil, errors.New("failed ... | explode_data.jsonl/59972 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 356
} | [
2830,
3393,
3332,
37,
6209,
1249,
6999,
1155,
353,
8840,
836,
8,
341,
197,
322,
40580,
198,
17060,
11,
1848,
1669,
32978,
7121,
39419,
741,
17957,
35699,
1155,
11,
1848,
11,
330,
16091,
311,
633,
5925,
1138,
25873,
1669,
66763,
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 TestControllerAddEventWithGoodController(t *testing.T) {
c, tc := makeController("apps/v1", "ReplicaSet")
c.Add(simpleOwnedPod("unit", "test"))
validateSent(t, tc, sourcesv1beta1.ApiServerSourceAddRefEventType)
} | explode_data.jsonl/39263 | {
"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,
2051,
2212,
1556,
2354,
15216,
2051,
1155,
353,
8840,
836,
8,
341,
1444,
11,
17130,
1669,
1281,
2051,
445,
27635,
5457,
16,
497,
330,
18327,
15317,
1649,
1138,
1444,
1904,
1141,
6456,
57641,
23527,
445,
3843,
497,
330,
1944,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStubsVersions_NotSorted(t *testing.T) {
bp := `
cc_library {
name: "libfoo",
srcs: ["foo.c"],
stubs: {
versions: ["29", "current", "R"],
},
}
`
config := TestConfig(t.TempDir(), android.Android, nil, bp, nil)
config.TestProductVariables.Platform_version_active_codenames = []string{"R"}
... | explode_data.jsonl/53367 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 161
} | [
2830,
3393,
623,
15738,
69015,
60816,
51051,
1155,
353,
8840,
836,
8,
341,
2233,
79,
1669,
22074,
197,
63517,
39461,
341,
298,
11609,
25,
330,
2740,
7975,
756,
298,
41144,
82,
25,
4383,
7975,
520,
8097,
298,
18388,
15738,
25,
341,
571... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestShouldNotHashPasswordWithNonExistentAlgorithm(t *testing.T) {
hash, err := HashPassword("password", "BpLnfgDsc2WD8F2q", "bogus",
schema.DefaultCIPasswordConfiguration.Iterations, schema.DefaultCIPasswordConfiguration.Memory*1024,
schema.DefaultCIPasswordConfiguration.Parallelism, schema.DefaultCIPasswordC... | explode_data.jsonl/40169 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 178
} | [
2830,
3393,
14996,
2623,
6370,
4876,
2354,
8121,
840,
18128,
27847,
1155,
353,
8840,
836,
8,
341,
50333,
11,
1848,
1669,
6531,
4876,
445,
3833,
497,
330,
33,
79,
40101,
4817,
35,
2388,
17,
17563,
23,
37,
17,
80,
497,
330,
65,
538,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParse_SubscriptionPauseCanceledNotification(t *testing.T) {
result := MustParseFile("testdata/subscription_pause_canceled_notification.xml")
if n, ok := result.(*webhooks.SubscriptionNotification); !ok {
t.Fatalf("unexpected type: %T, result", n)
} else if diff := cmp.Diff(n, &webhooks.SubscriptionNotific... | explode_data.jsonl/76112 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 549
} | [
2830,
3393,
14463,
36359,
12124,
28391,
63263,
11196,
1155,
353,
8840,
836,
8,
341,
9559,
1669,
15465,
14463,
1703,
445,
92425,
14,
34404,
59989,
666,
38392,
34296,
9028,
1138,
743,
308,
11,
5394,
1669,
1102,
41399,
2911,
38560,
12391,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNamespaceIndexDisabledQuery(t *testing.T) {
ns, closer := newTestNamespace(t)
defer closer()
ctx := context.NewBackground()
query := index.Query{
Query: xidx.NewTermQuery([]byte("foo"), []byte("bar")),
}
opts := index.QueryOptions{}
_, err := ns.QueryIDs(ctx, query, opts)
require.Error(t, err)
re... | explode_data.jsonl/35380 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 133
} | [
2830,
3393,
22699,
1552,
25907,
2859,
1155,
353,
8840,
836,
8,
341,
84041,
11,
12128,
1669,
501,
2271,
22699,
1155,
340,
16867,
12128,
2822,
20985,
1669,
2266,
7121,
8706,
741,
27274,
1669,
1922,
15685,
515,
197,
60362,
25,
856,
6361,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEmptyUnmarshalOmit(t *testing.T) {
result := emptyMarshalTestStruct2{}
err := Unmarshal(emptyTestToml, &result)
expected := emptyTestData2
if err != nil {
t.Fatal(err)
}
if !reflect.DeepEqual(result, expected) {
t.Errorf("Bad empty omit unmarshal: expected %v, got %v", expected, result)
}
} | explode_data.jsonl/46319 | {
"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,
3522,
1806,
27121,
46,
1763,
1155,
353,
8840,
836,
8,
341,
9559,
1669,
4287,
55438,
2271,
9422,
17,
16094,
9859,
1669,
1230,
27121,
24216,
2271,
24732,
75,
11,
609,
1382,
340,
42400,
1669,
4287,
83920,
17,
198,
743,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestShouldUpgradeAllToLatest(t *testing.T) {
// prepare
nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"}
existing := v1alpha1.OpenTelemetryCollector{
ObjectMeta: metav1.ObjectMeta{
Name: nsn.Name,
Namespace: nsn.Namespace,
Labels: map[string]string{
"app.kubernetes.io/m... | explode_data.jsonl/36805 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 465
} | [
2830,
3393,
14996,
43861,
2403,
1249,
31992,
1155,
353,
8840,
836,
8,
341,
197,
322,
10549,
198,
84041,
77,
1669,
4494,
98932,
68552,
675,
63121,
25,
330,
2408,
73655,
497,
41962,
25,
330,
2258,
16707,
8122,
11083,
1669,
348,
16,
7141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenModel_Issue423(t *testing.T) {
specDoc, err := loads.Spec("../fixtures/bugs/423/swagger.json")
require.NoError(t, err)
definitions := specDoc.Spec().Definitions
schema := definitions["SRN"]
opts := opts()
genModel, err := makeGenDefinition("SRN", "models", schema, specDoc, opts)
require.NoError(t, e... | explode_data.jsonl/2548 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 257
} | [
2830,
3393,
9967,
1712,
7959,
83890,
19,
17,
18,
1155,
353,
8840,
836,
8,
341,
98100,
9550,
11,
1848,
1669,
20907,
36473,
17409,
45247,
14,
56176,
14,
19,
17,
18,
80930,
4323,
1138,
17957,
35699,
1155,
11,
1848,
692,
7452,
4054,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseLetStatements(t *testing.T) {
checkParseStatement(t, "let x = 42", "(let nil x 42)")
checkParseStatement(t, "let x: int = 42", "(let int x 42)")
} | explode_data.jsonl/33526 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 63
} | [
2830,
3393,
14463,
10061,
93122,
1155,
353,
8840,
836,
8,
341,
25157,
14463,
8636,
1155,
11,
330,
1149,
856,
284,
220,
19,
17,
497,
11993,
1149,
2092,
856,
220,
19,
17,
19107,
25157,
14463,
8636,
1155,
11,
330,
1149,
856,
25,
526,
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 |
func TestFailGracefullyBadMACAddress(t *testing.T) {
err := add("netboot", []string{"dhcpv6", "test"})
if err.Error() != "address test: invalid MAC address" {
t.Errorf(`err.Error() = %q, want "error message should be: address test: invalid MAC address"`, err.Error())
}
} | explode_data.jsonl/25077 | {
"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,
19524,
86543,
3641,
17082,
25788,
4286,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
912,
445,
4711,
4619,
497,
3056,
917,
4913,
96220,
85,
21,
497,
330,
1944,
23625,
743,
1848,
6141,
368,
961,
330,
4995,
1273,
25,
8318,
2288... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHTTPClientFailureHead400(t *testing.T) {
client := newHTTPClientFailureClient()
result, err := client.Head400(context.Background(), nil)
if err != nil {
t.Fatal(err)
}
if result.Success {
t.Fatal("Expected a false result")
}
} | explode_data.jsonl/54924 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 88
} | [
2830,
3393,
9230,
2959,
17507,
12346,
19,
15,
15,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
501,
9230,
2959,
17507,
2959,
741,
9559,
11,
1848,
1669,
2943,
90478,
19,
15,
15,
5378,
19047,
1507,
2092,
340,
743,
1848,
961,
2092,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestTrippableBreakerManualBreak(t *testing.T) {
c := clock.NewMock()
cb := NewBreaker()
cb.Clock = c
cb.Break()
c.Add(cb.nextBackOff + 1)
if cb.Ready() {
t.Fatal("expected breaker to still be tripped")
}
cb.Reset()
cb.Trip()
c.Add(cb.nextBackOff + 1)
if !cb.Ready() {
t.Fatal("expected breaker to b... | explode_data.jsonl/60799 | {
"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,
21884,
602,
480,
22524,
261,
52092,
22524,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
8866,
7121,
11571,
741,
63810,
1669,
1532,
22524,
261,
741,
63810,
79248,
284,
272,
198,
63810,
1785,
1108,
741,
1444,
1904,
35653,
4529,
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... | 3 |
func TestPing(t *testing.T) {
testutils.WithTestServer(t, nil, func(t testing.TB, ts *testutils.TestServer) {
ctx, cancel := NewContext(time.Second)
defer cancel()
errFrame := getErrorFrame(t)
var returnErr bool
frameRelay, close := testutils.FrameRelay(t, ts.HostPort(), func(outgoing bool, f *Frame) *Frame... | explode_data.jsonl/78179 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 357
} | [
2830,
3393,
69883,
1155,
353,
8840,
836,
8,
341,
18185,
6031,
26124,
2271,
5475,
1155,
11,
2092,
11,
2915,
1155,
7497,
836,
33,
11,
10591,
353,
1944,
6031,
8787,
5475,
8,
341,
197,
20985,
11,
9121,
1669,
1532,
1972,
9730,
32435,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestCreateNewSessionWithDefaultRegion(t *testing.T) {
// TODO Refactor for encapsulation
oldHome, err := testutils.SwitchAWSHome()
defer testutils.RestoreHome(oldHome)
os.Setenv("AWS_REGION", "")
os.Setenv("AWS_DEFAULT_REGION", "")
os.Setenv("AWS_PROFILE", "")
sess, err := session.NewAwsSessionWithoutOption... | explode_data.jsonl/68827 | {
"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,
4021,
3564,
5283,
2354,
3675,
14091,
1155,
353,
8840,
836,
8,
341,
197,
322,
5343,
8550,
5621,
369,
42569,
2914,
198,
61828,
7623,
11,
1848,
1669,
1273,
6031,
808,
5539,
36136,
7623,
741,
16867,
1273,
6031,
31129,
460,
7623,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIAMTokenSource(t *testing.T) {
tests := []struct {
name string
givenIAMErr bool
wantErr bool
}{
{
name: "normal success",
},
{
name: "iam error",
givenIAMErr: true,
wantErr: true,
},
}
for _, test := range tests {
const tokenValue = "iam-signed-jwt"
t.Run(test... | explode_data.jsonl/44402 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 842
} | [
2830,
3393,
73707,
3323,
3608,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
3174,
2071,
40,
2729,
634,
1807,
271,
197,
50780,
7747,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
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 TestEntryAddBatchTimerWithPoolAlloc(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
timerValPool := pool.NewFloatsPool([]pool.Bucket{
{Capacity: 16, Count: 1},
}, nil)
timerValPool.Init()
// Consume the element in the pool.
input := timerValPool.Get(10)
input = append(input, []float... | explode_data.jsonl/24207 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 333
} | [
2830,
3393,
5874,
2212,
21074,
10105,
2354,
10551,
25154,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
51534,
2208,
10551,
1669,
7314,
7121,
5442,
82,
10551,
10556,
1028... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCSINodeService(t *testing.T) {
RegisterFailHandler(Fail)
junitReporter := reporters.NewJUnitReporter("node-svc.xml")
RunSpecsWithDefaultAndCustomReporters(t, "CSINodeService testing suite", []Reporter{junitReporter})
} | explode_data.jsonl/5884 | {
"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,
6412,
687,
534,
1860,
1155,
353,
8840,
836,
8,
341,
79096,
19524,
3050,
7832,
604,
340,
12428,
3843,
52766,
1669,
19040,
7121,
56248,
52766,
445,
3509,
1331,
7362,
9028,
1138,
85952,
8327,
16056,
3675,
3036,
10268,
10361,
388,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEvalTakesStructD(t *testing.T) {
var values = strings.Split("a.C.D", ".")
var strNode = ArgNode{
value: "a.C.D",
values: values,
valuesLen: len(values),
}
var m = A{B: "B", C: C{D: "D"}}
var r, _ = EvalTakes(strNode, m)
fmt.Println(r)
} | explode_data.jsonl/52557 | {
"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,
54469,
51,
2050,
9422,
35,
1155,
353,
8840,
836,
8,
341,
2405,
2750,
284,
9069,
19823,
445,
64,
727,
909,
497,
5933,
1138,
2405,
607,
1955,
284,
7638,
1955,
515,
197,
16309,
25,
257,
330,
64,
727,
909,
756,
197,
45939,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_service_CreateEventLog(t *testing.T) {
tests := []struct {
name string
eventLog *EventLog
calls int
wantErr bool
}{
{
name: "simple",
eventLog: &EventLog{
Loc: &Coordinates{
DetectorId: "my-detector-id",
},
Events: []*DetectionEvent{
{
DeviceId: &Detection... | explode_data.jsonl/23267 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1139
} | [
2830,
3393,
12267,
34325,
1556,
2201,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
28302,
2201,
353,
1556,
2201,
198,
197,
1444,
5583,
262,
526,
198,
197,
50780,
7747,
220,
1807,
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... | 7 |
func TestUserCloneNil(t *testing.T) {
user := (*User)(nil)
clone := user.clone()
if clone != nil {
t.Fatalf("Expected nil, got: %+v", clone)
}
} | explode_data.jsonl/75602 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 64
} | [
2830,
3393,
1474,
37677,
19064,
1155,
353,
8840,
836,
8,
341,
19060,
1669,
4609,
1474,
2376,
8385,
340,
197,
19982,
1669,
1196,
15997,
741,
743,
14715,
961,
2092,
341,
197,
3244,
30762,
445,
18896,
2092,
11,
2684,
25,
68524,
85,
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
] | 2 |
func TestReconciler_TaintedNode_RollingUpgrade(t *testing.T) {
job := mock.Job()
job.TaskGroups[0].Update = noCanaryUpdate
// Create an existing deployment that has some placed allocs
d := structs.NewDeployment(job)
d.TaskGroups[job.TaskGroups[0].Name] = &structs.DeploymentState{
Promoted: true,
DesiredTo... | explode_data.jsonl/67269 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1039
} | [
2830,
3393,
693,
40446,
5769,
1139,
30229,
1955,
2568,
965,
287,
43861,
1155,
353,
8840,
836,
8,
341,
68577,
1669,
7860,
45293,
741,
68577,
28258,
22173,
58,
15,
936,
4289,
284,
902,
6713,
658,
4289,
271,
197,
322,
4230,
458,
6350,
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... | 5 |
func TestConformanceTests(t *testing.T) {
const dir = "testdata"
fis, err := ioutil.ReadDir(dir)
if err != nil {
t.Fatal(err)
}
wtid := watchTargetID
watchTargetID = conformanceTestWatchTargetID
defer func() { watchTargetID = wtid }()
n := 0
for _, fi := range fis {
if strings.HasSuffix(fi.Name(), ".textpr... | explode_data.jsonl/34234 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 186
} | [
2830,
3393,
1109,
11795,
18200,
1155,
353,
8840,
836,
8,
341,
4777,
5419,
284,
330,
92425,
698,
1166,
285,
11,
1848,
1669,
43144,
6503,
6184,
14161,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
6692,
24449,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestObjectGetSet(t *testing.T) {
const SCRIPT = `
input.test++;
input;
`
r := New()
o := r.NewObject()
o.Set("test", 42)
r.Set("input", o)
v, err := r.RunString(SCRIPT)
if err != nil {
t.Fatal(err)
}
if o1, ok := v.(*Object); ok {
if v1 := o1.Get("test"); v1.Export() != int64(43) {
t.Fatalf("... | explode_data.jsonl/10461 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 181
} | [
2830,
3393,
1190,
1949,
1649,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
197,
22427,
5958,
3507,
197,
22427,
280,
197,
3989,
7000,
1669,
1532,
741,
22229,
1669,
435,
7121,
1190,
741,
22229,
4202,
445,
1944,
497,
220,
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... | 4 |
func TestConvertToUTF8String(t *testing.T) {
var testTable = []struct {
charset string
input []byte
want string
}{
{"utf-8", []byte("abcABC\u2014"), "abcABC\u2014"},
{"windows-1250", []byte{'a', 'Z', 0x96}, "aZ\u2013"},
{"big5", []byte{0xa1, 0x5d, 0xa1, 0x61, 0xa1, 0x71}, "\uff08\uff5b\u3008"},
}
/... | explode_data.jsonl/69515 | {
"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,
12012,
1249,
8561,
23,
703,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
2556,
284,
3056,
1235,
341,
197,
7450,
746,
914,
198,
197,
22427,
256,
3056,
3782,
198,
197,
50780,
262,
914,
198,
197,
59403,
197,
197,
4913,
4762,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDockerError(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mockDocker := mock_docker.NewMockDocker(mockCtrl)
fs := newFakeFileSystem(testCgroupEntries)
p := newTestPlugin(
t,
withMockDocker(mockDocker),
withFileSystem(fs),
withDisabledRetryer(),
)
mockDocker.EXPEC... | explode_data.jsonl/27998 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 236
} | [
2830,
3393,
35,
13659,
1454,
1155,
353,
8840,
836,
8,
341,
77333,
15001,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
7860,
15001,
991,
18176,
741,
77333,
35,
13659,
1669,
7860,
814,
13659,
7121,
11571,
35,
13659,
30389,
15001,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.