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 TestRunningMultipleSchedules(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(2)
cron := newWithSeconds()
cron.AddFunc("0 0 0 1 1 ?", func() {})
cron.AddFunc("0 0 0 31 12 ?", func() {})
cron.AddFunc("* * * * * ?", func() { wg.Done() })
cron.Schedule(Every(time.Minute), FuncJob(func() {}))
cron.Schedule(Ever... | explode_data.jsonl/8304 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 244
} | [
2830,
3393,
18990,
32089,
50,
49613,
1155,
353,
8840,
836,
8,
341,
72079,
1669,
609,
12996,
28384,
2808,
16094,
72079,
1904,
7,
17,
692,
1444,
2248,
1669,
501,
2354,
15343,
741,
1444,
2248,
1904,
9626,
445,
15,
220,
15,
220,
15,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRPC_ChallengeCORS(t *testing.T) {
if testing.Short() {
t.Skip("skipping in short mode")
}
//kb := getInMemoryKeybase()
genBZ, _, _, _ := fiveValidatorsOneAppGenesis()
_, _, cleanup := NewInMemoryTendermintNode(t, genBZ)
// setup the query
_, stopCli, evtChan := subscribeTo(t, tmTypes.EventNewBlock)
<... | explode_data.jsonl/44726 | {
"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,
29528,
27588,
15832,
34,
9821,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
304,
2805,
3856,
1138,
197,
532,
197,
322,
21310,
1669,
633,
641,
10642,
1592,
3152,
741,
82281,
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 TestGetSearchQueries(t *testing.T) {
stationsConfig := map[string]utils.Stations{
"Bhaisipati, Ktm, Nepal": {"Bhaisipati, KTM, Nepal", 10495, "kathmandu"},
"Us Embassy, Kathmandu, Nepal": {"US Embassy, Kathmandu, Nepal", 9468, "kathmandu"},
}
config := utils.Config{ApiKey: "abcdef", Stations: station... | explode_data.jsonl/12973 | {
"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,
1949,
5890,
55261,
1155,
353,
8840,
836,
8,
341,
18388,
804,
2648,
1669,
2415,
14032,
60,
6031,
7758,
804,
515,
197,
197,
63590,
71,
2782,
573,
9307,
11,
730,
13730,
11,
48964,
788,
981,
5212,
33,
71,
2782,
573,
9307,
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 TestIntString_Marshal(t *testing.T) {
i := sdk.NewIntString(100)
body, err := json.Marshal(i)
if err != nil {
t.Error(err)
}
if !bytes.Equal(body, []byte(`100`)) {
t.Error("Marshalled IntString is not valid: expected '100', got:", string(body))
}
} | explode_data.jsonl/81861 | {
"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,
1072,
703,
1245,
28423,
1155,
353,
8840,
836,
8,
341,
8230,
1669,
45402,
7121,
1072,
703,
7,
16,
15,
15,
692,
35402,
11,
1848,
1669,
2951,
37271,
1956,
340,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
630... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestComponents(t *testing.T) {
t.Parallel()
testComponents(t, "", ".")
testComponents(t, ".", ".")
testComponents(t, "foo", "foo")
testComponents(t, "foo/bar", "foo", "bar")
testComponents(t, "foo/bar/../baz", "foo", "bar", "..", "baz")
testComponents(t, "/foo/bar", "/", "foo", "bar")
testComponents(t, "./... | explode_data.jsonl/11903 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 174
} | [
2830,
3393,
10443,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
18185,
10443,
1155,
11,
7342,
5933,
1138,
18185,
10443,
1155,
11,
68514,
5933,
1138,
18185,
10443,
1155,
11,
330,
7975,
497,
330,
7975,
1138,
18185,
10443,
1155,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCrConflictWriteMoveAndSetMtimeFollowedByNewConflict(t *testing.T) {
targetMtime := time.Now().Add(1 * time.Minute)
test(t,
users("alice", "bob", "charlie"),
as(alice,
mkdir("a"),
),
as(bob,
write("a/b", "hello"),
disableUpdates(),
),
as(charlie,
disableUpdates(),
),
as(alice,
w... | explode_data.jsonl/31381 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 539
} | [
2830,
3393,
16001,
57974,
7985,
9860,
3036,
1649,
44,
1678,
12480,
97322,
3564,
57974,
1155,
353,
8840,
836,
8,
341,
28861,
44,
1678,
1669,
882,
13244,
1005,
2212,
7,
16,
353,
882,
75770,
340,
18185,
1155,
345,
197,
90896,
445,
63195,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShardTimeRangesCopy(t *testing.T) {
str := shardTimeRanges{0: xtime.NewRanges(xtime.Range{
Start: time.Now(),
End: time.Now().Add(time.Second),
})}
copied := str.Copy()
// Ensure is a copy not same instance
assert.NotEqual(t, fmt.Sprintf("%p", str), fmt.Sprintf("%p", copied))
assert.True(t, str.Equ... | explode_data.jsonl/4675 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 138
} | [
2830,
3393,
2016,
567,
1462,
74902,
12106,
1155,
353,
8840,
836,
8,
341,
11355,
1669,
52069,
1462,
74902,
90,
15,
25,
856,
1678,
7121,
74902,
2075,
1678,
24783,
515,
197,
65999,
25,
882,
13244,
3148,
197,
38407,
25,
256,
882,
13244,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteUsingDeploymentUUID(t *testing.T) {
testUtil.InitTestConfig()
okResponse := `
{
"data": {
"deleteDeploymentServiceAccount": {
"id": "ckbvcbqs1014t0760u4bszmcs"
}
}
}`
client := testUtil.NewTestClient(func(req *http.Request) *http.Response {
return &http.Response{
StatusCode: 200... | explode_data.jsonl/39483 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 340
} | [
2830,
3393,
6435,
16429,
75286,
24754,
1155,
353,
8840,
836,
8,
341,
18185,
2742,
26849,
2271,
2648,
741,
59268,
2582,
1669,
22074,
515,
220,
330,
691,
788,
341,
262,
330,
4542,
75286,
1860,
7365,
788,
341,
414,
330,
307,
788,
330,
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... | 1 |
func TestAnalogSensorDriver(t *testing.T) {
a := newAioTestAdaptor()
d := NewAnalogSensorDriver(a, "1")
gobottest.Refute(t, d.Connection(), nil)
// default interval
gobottest.Assert(t, d.interval, 10*time.Millisecond)
a = newAioTestAdaptor()
d = NewAnalogSensorDriver(a, "42", 30*time.Second)
gobottest.Assert(... | explode_data.jsonl/909 | {
"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,
2082,
30951,
30752,
11349,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
501,
32,
815,
2271,
2589,
32657,
741,
2698,
1669,
1532,
2082,
30951,
30752,
11349,
2877,
11,
330,
16,
1138,
3174,
674,
1716,
477,
18369,
1070,
1155,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRouter(t *testing.T) {
isReady := &atomic.Value{}
isReady.Store(true)
shutdown := make(chan bool)
r := handlers.Router(version.Info{
Name: "router-version",
Release: "1.0.0",
Commit: "f00b4r",
BuildTime: "now",
}, isReady, shutdown)
ts := httptest.NewServer(r)
defer ts.Close()
for _... | explode_data.jsonl/42765 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 502
} | [
2830,
3393,
9523,
1155,
353,
8840,
836,
8,
341,
19907,
19202,
1669,
609,
6618,
6167,
16094,
19907,
19202,
38047,
3715,
340,
36196,
18452,
1669,
1281,
35190,
1807,
692,
7000,
1669,
24083,
31413,
37770,
20132,
515,
197,
21297,
25,
414,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestCreateTournamentPlayer(t *testing.T) {
p := NewPlayer("jj", "Jens")
tournament := InitTournament()
tp := NewTournamentPlayer(p, *tournament)
if r := tp.Ranking; r != 1500 {
t.Errorf("Player should have initial ranking, got %d, want: %d.", r, 1500)
}
if r := tp.Tournament.InitialRanking; r != 1500 {
... | explode_data.jsonl/80963 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 346
} | [
2830,
3393,
4021,
51,
9783,
4476,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
1532,
4476,
445,
38811,
497,
330,
41,
724,
1138,
3244,
9783,
1669,
15690,
51,
9783,
741,
73423,
1669,
1532,
51,
9783,
4476,
1295,
11,
353,
88079,
692,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestNodeAddresses(t *testing.T) {
// Note these instances have the same name
// (we test that this produces an error)
var instance0 ec2.Instance
var instance1 ec2.Instance
var instance2 ec2.Instance
//0
instance0.InstanceId = aws.String("i-0")
instance0.PrivateDnsName = aws.String("instance-same.ec2.inter... | explode_data.jsonl/29205 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1148
} | [
2830,
3393,
1955,
52290,
1155,
353,
8840,
836,
8,
341,
197,
322,
7036,
1493,
13121,
614,
279,
1852,
829,
198,
197,
322,
320,
896,
1273,
429,
419,
18644,
458,
1465,
340,
2405,
2867,
15,
11942,
17,
12688,
198,
2405,
2867,
16,
11942,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTrackAppStateAndSyncApp(t *testing.T) {
Given(t).
Path(guestbookPath).
When().
Create().
Sync().
Then().
Expect(OperationPhaseIs(OperationSucceeded)).
Expect(SyncStatusIs(SyncStatusCodeSynced)).
Expect(HealthIs(health.HealthStatusHealthy)).
Expect(Success(fmt.Sprintf("Service %s guestbo... | explode_data.jsonl/66671 | {
"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,
15667,
89896,
3036,
12154,
2164,
1155,
353,
8840,
836,
8,
341,
9600,
2071,
1155,
4292,
197,
69640,
3268,
3045,
2190,
1820,
4292,
197,
197,
4498,
25829,
197,
75569,
25829,
197,
7568,
1721,
25829,
197,
197,
12209,
25829,
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 TestResourceTokens_CartNotExistsInStorage(t *testing.T) {
s, _, _, _, broker, err := setupHydraTest(true)
if err != nil {
t.Fatalf("setupHydraTest() failed: %v", err)
}
resp := sendResourceTokens(t, s, broker, "invalid", false)
if resp.StatusCode != http.StatusBadRequest {
t.Errorf("status = %d, wants %d... | explode_data.jsonl/18507 | {
"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,
4783,
29300,
920,
471,
2623,
15575,
641,
5793,
1155,
353,
8840,
836,
8,
341,
1903,
11,
8358,
8358,
8358,
22316,
11,
1848,
1669,
6505,
30816,
22248,
2271,
3715,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
15188,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTimer_AddTimes(t *testing.T) {
gtest.Case(t, func() {
timer := New()
array := garray.New()
timer.AddTimes(200*time.Millisecond, 2, func() {
array.Append(1)
})
time.Sleep(1000*time.Millisecond)
gtest.Assert(array.Len(), 2)
})
} | explode_data.jsonl/3719 | {
"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,
10105,
21346,
18889,
1155,
353,
8840,
836,
8,
341,
262,
342,
1944,
727,
519,
1155,
11,
2915,
368,
341,
286,
9021,
1669,
1532,
741,
286,
1334,
1669,
342,
1653,
7121,
741,
286,
9021,
1904,
18889,
7,
17,
15,
15,
77053,
7148... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAuthService_GetUserByToken(t *testing.T) {
user := createTestUser()
username := user.Username
password := "oakheart"
dao := dao.MockUserDao{}
dao.On("GetByUsername", username).Return(&user, nil)
s := AuthService{&mailer, &dao, createTestConfig()}
token, _, err := s.BasicAuthToken(username, password)
... | explode_data.jsonl/18893 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 209
} | [
2830,
3393,
90466,
13614,
1474,
1359,
3323,
1155,
353,
8840,
836,
8,
341,
19060,
1669,
1855,
2271,
1474,
741,
72358,
1669,
1196,
42777,
198,
58199,
1669,
330,
78,
585,
17735,
1837,
2698,
3441,
1669,
24775,
24664,
1474,
12197,
16094,
2698,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDuplicateRowZeroWithNoRows(t *testing.T) {
const sheet = "Sheet1"
outFile := filepath.Join("test", "TestDuplicateRow.%s.xlsx")
t.Run("ZeroWithNoRows", func(t *testing.T) {
xlsx := NewFile()
assert.EqualError(t, xlsx.DuplicateRow(sheet, 0), "invalid row number 0")
if !assert.NoError(t, xlsx.SaveAs(f... | explode_data.jsonl/30496 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 506
} | [
2830,
3393,
53979,
3102,
17999,
2354,
2753,
9024,
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,
22445,
82,
46838,
5130,
3244,
16708,
445,
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... | 4 |
func Test2(t *testing.T) {
var fileLen int64 = 1024
crc32 := "933736b0"
instanceId := "5e4d6b56"
randInt := ""
rnd := rand.New(rand.NewSource(time.Now().UnixNano()))
for i := 0; i < 3; i++ {
randInt += convert.IntToStr(rnd.Intn(10))
}
fmt.Println("rand=", randInt)
var buffer bytes.Buffer
buffer.WriteString(... | explode_data.jsonl/22069 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 447
} | [
2830,
3393,
17,
1155,
353,
8840,
836,
8,
341,
2405,
1034,
11271,
526,
21,
19,
284,
220,
16,
15,
17,
19,
198,
1444,
1287,
18,
17,
1669,
330,
24,
18,
18,
22,
18,
21,
65,
15,
698,
56256,
764,
1669,
330,
20,
68,
19,
67,
21,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSignedFullSerializeAndToken(t *testing.T) {
b := Signed(rsaSigner).Claims(&testClaims{"foo"})
jwt, err := b.FullSerialize()
require.NoError(t, err, "Error creating JWT.")
parsed, err := ParseSigned(jwt)
require.NoError(t, err, "Error parsing JWT.")
out := &testClaims{}
if assert.NoError(t, parsed.Claim... | explode_data.jsonl/63649 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 418
} | [
2830,
3393,
49312,
9432,
15680,
3036,
3323,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
52453,
2601,
9081,
7264,
261,
568,
51133,
2099,
1944,
51133,
4913,
7975,
1,
8824,
12428,
9306,
11,
1848,
1669,
293,
32038,
15680,
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... | 3 |
func TestApplyCanTransferFieldOwnershipToController(t *testing.T) {
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, genericfeatures.ServerSideApply, true)()
_, client, closeFn := setup(t)
defer closeFn()
// Applier creates a deployment with replicas set to 3
apply := []byte(`... | explode_data.jsonl/53487 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1202
} | [
2830,
3393,
28497,
6713,
21970,
1877,
77166,
1249,
2051,
1155,
353,
8840,
836,
8,
341,
16867,
4565,
70,
266,
57824,
287,
4202,
13859,
42318,
16014,
2271,
1155,
11,
4094,
12753,
13275,
13859,
42318,
11,
13954,
20304,
22997,
16384,
28497,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestErrorCodeStringer(t *testing.T) {
t.Parallel()
tests := []struct {
in btcjson.ErrorCode
want string
}{
{btcjson.ErrDuplicateMethod, "ErrDuplicateMethod"},
{btcjson.ErrInvalidUsageFlags, "ErrInvalidUsageFlags"},
{btcjson.ErrInvalidType, "ErrInvalidType"},
{btcjson.ErrEmbeddedType, "ErrEmbedded... | explode_data.jsonl/55519 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 494
} | [
2830,
3393,
30748,
703,
261,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
17430,
256,
86037,
2236,
98433,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
90,
92634,
2236,
27862,
53979,
3523,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRPCInvoker_InvokeFailinChainInit(t *testing.T) {
initenv()
config.GlobalDefinition = &model.GlobalCfg{}
invoker := core.NewRPCInvoker(core.ChainName(""))
replyOne := &helloworld.HelloReply{}
ctx := context.WithValue(context.Background(), common.ContextHeaderKey{}, map[string]string{
"X-User": "tianxiaol... | explode_data.jsonl/50952 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 245
} | [
2830,
3393,
29528,
47668,
79143,
19524,
258,
18837,
3803,
1155,
353,
8840,
836,
8,
341,
28248,
3160,
741,
25873,
27381,
10398,
284,
609,
2528,
27381,
42467,
16094,
197,
14057,
10451,
1669,
6200,
7121,
29528,
47668,
47867,
98269,
675,
73303,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetReceiptsByLookupUnmarshalFail(t *testing.T) {
assert := assert.New(t)
kvstoreMock := &mockKVStore{
getVal: []byte("!json"),
}
r := &levelDBReceipts{
conf: &LevelDBReceiptStoreConf{},
store: kvstoreMock,
}
results := r.getReceiptsByLookupKey([]string{"key1", "key2"}, 1)
assert.Empty(results)
... | explode_data.jsonl/21466 | {
"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,
1949,
67461,
82,
1359,
34247,
1806,
27121,
19524,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
16463,
85,
4314,
11571,
1669,
609,
16712,
82707,
6093,
515,
197,
10366,
2208,
25,
3056,
3782,
85166,
2236,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServiceCommands(t *testing.T) {
t.Run("GetService", func(t *testing.T) {
const ServiceName = "MSiSCSI"
client, err := v1alpha1client.NewClient()
require.Nil(t, err)
defer client.Close()
// Make sure service is stopped
_, err = runPowershellCmd(t, fmt.Sprintf(`Stop-Service -Name "%s"`, ServiceName... | explode_data.jsonl/9621 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 794
} | [
2830,
3393,
1860,
30479,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1949,
1860,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
4777,
5362,
675,
284,
330,
4826,
72,
3540,
13817,
698,
197,
25291,
11,
1848,
1669,
348,
16,
7141,
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 TestRelationshipRender(t *testing.T) {
host := NewPackage()
host.BuildID("TestHost")
peer := NewFile()
peer.BuildID("TestPeer")
dummyref := "SPDXRef-File-6c0c16be41af1064ee8fd2328b17a0a778dd5e52"
cases := []struct {
Rel Relationship
MustErr bool
Rendered string
}{
{
// Relationships with a... | explode_data.jsonl/7740 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 862
} | [
2830,
3393,
50822,
6750,
1155,
353,
8840,
836,
8,
341,
63104,
1669,
1532,
13100,
741,
63104,
25212,
915,
445,
2271,
9296,
1138,
197,
16537,
1669,
1532,
1703,
741,
197,
16537,
25212,
915,
445,
2271,
30888,
1138,
2698,
8574,
1097,
1669,
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 TestConfigeFileParse(t *testing.T) {
path := "D:\\gotest\\config.conf"
ips, err := ConfigeFileParse(path)
if err != nil {
t.Log(err)
}
for _, line := range ips {
t.Log(line)
}
} | explode_data.jsonl/40822 | {
"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,
2648,
68,
1703,
14463,
1155,
353,
8840,
836,
8,
341,
26781,
1669,
330,
35,
23817,
22390,
477,
3422,
1676,
13937,
1837,
197,
3077,
11,
1848,
1669,
5532,
68,
1703,
14463,
5581,
340,
743,
1848,
961,
2092,
341,
197,
3244,
5247... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrefixFromAction(t *testing.T) {
r, err := prefixFromAction("Block")
require.NoError(t, err)
require.Equal(t, BlockNetsPrefix, r)
r, err = prefixFromAction("Allow")
require.NoError(t, err)
require.Equal(t, AllowNetsPrefix, r)
r, err = prefixFromAction("Log")
require.NoError(t, err)
require.Equal(t, ... | explode_data.jsonl/68825 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 190
} | [
2830,
3393,
14335,
3830,
2512,
1155,
353,
8840,
836,
8,
341,
7000,
11,
1848,
1669,
9252,
3830,
2512,
445,
4713,
1138,
17957,
35699,
1155,
11,
1848,
340,
17957,
12808,
1155,
11,
8362,
45,
1415,
14335,
11,
435,
692,
7000,
11,
1848,
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 TestSignDetached(t *testing.T) {
kring, _ := ReadKeyRing(readerFromHex(testKeys1And2PrivateHex))
out := bytes.NewBuffer(nil)
message := bytes.NewBufferString(signedInput)
err := DetachSign(out, kring[0], message, nil)
if err != nil {
t.Error(err)
}
testDetachedSignature(t, kring, out, signedInput, "check... | explode_data.jsonl/28625 | {
"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,
7264,
17076,
3854,
1155,
353,
8840,
836,
8,
341,
197,
9855,
287,
11,
716,
1669,
4457,
1592,
43466,
21987,
3830,
20335,
8623,
8850,
16,
3036,
17,
16787,
20335,
1171,
13967,
1669,
5820,
7121,
4095,
27907,
340,
24753,
1669,
582... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContainsElasticsearchRole(t *testing.T) {
type testT struct {
set []v1alpha1.ElasticsearchClusterRole
lookup v1alpha1.ElasticsearchClusterRole
has bool
}
tests := []testT{
{
set: []v1alpha1.ElasticsearchClusterRole{v1alpha1.ElasticsearchRoleMaster},
lookup: v1alpha1.ElasticsearchRoleM... | explode_data.jsonl/58003 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 328
} | [
2830,
3393,
23805,
36,
51179,
1836,
9030,
1155,
353,
8840,
836,
8,
341,
13158,
1273,
51,
2036,
341,
197,
8196,
262,
3056,
85,
16,
7141,
16,
5142,
51179,
1836,
28678,
9030,
198,
197,
197,
21020,
348,
16,
7141,
16,
5142,
51179,
1836,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssue332_Part2(t *testing.T) {
// Step should skip a function's prologue
// In some parts of the prologue, for some functions, the FDE data is incorrect
// which leads to 'next' and 'stack' failing with error "could not find FDE for PC: <garbage>"
// because the incorrect FDE data leads to reading the wron... | explode_data.jsonl/56246 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 611
} | [
2830,
3393,
42006,
18,
18,
17,
97938,
17,
1155,
353,
8840,
836,
8,
341,
197,
322,
14822,
1265,
10706,
264,
729,
594,
462,
67078,
198,
197,
322,
758,
1045,
5479,
315,
279,
462,
67078,
11,
369,
1045,
5746,
11,
279,
434,
1150,
821,
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... | 7 |
func TestIMGInternet(t *testing.T) {
config := asset.Info{
Folder: "testdata",
}
fm := config.Map("/")
temp, err := template.New("test").Funcs(fm).Parse(`{{IMG "//test.gif" "Loader"}}`)
if err != nil {
t.Fatal(err)
}
buf := new(bytes.Buffer)
err = temp.Execute(buf, nil)
if err != nil {
t.Fatal(err)
... | explode_data.jsonl/46970 | {
"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,
30346,
35679,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
9329,
20132,
515,
197,
12727,
2018,
25,
330,
92425,
756,
197,
630,
1166,
76,
1669,
2193,
10104,
4283,
5130,
16280,
11,
1848,
1669,
3811,
7121,
445,
1944,
1827,
9626,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPerfTracepointFlagToTracepoints(t *testing.T) {
tests := []struct {
name string
flag []string
exTracepoints []*perfTracepoint
errStr string
}{
{
name: "valid single tracepoint",
flag: []string{"sched:sched_kthread_stop"},
exTracepoints: []*perfTracepoint{
{
... | explode_data.jsonl/30598 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 765
} | [
2830,
3393,
3889,
69,
6550,
2768,
12135,
1249,
6550,
7706,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
30589,
688,
3056,
917,
198,
197,
8122,
6550,
7706,
29838,
59545,
6550,
2768,
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... | 8 |
func TestAddDrawingVML(t *testing.T) {
// Test addDrawingVML with illegal cell coordinates.
f := NewFile()
assert.EqualError(t, f.addDrawingVML(0, "", "*", 0, 0), `cannot convert cell "*" to coordinates: invalid cell name "*"`)
} | explode_data.jsonl/36961 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 86
} | [
2830,
3393,
2212,
37437,
48504,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
912,
37437,
48504,
448,
11816,
2779,
13934,
624,
1166,
1669,
1532,
1703,
741,
6948,
12808,
1454,
1155,
11,
282,
1364,
37437,
48504,
7,
15,
11,
7342,
79936,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSingleTransactionScript(t *testing.T) {
t.Skip()
script := queries.TransactionTest{
Name: "allow commit conflicts on, conflict on dolt_merge",
SetUpScript: []string{
"CREATE TABLE test (pk int primary key, val int)",
"INSERT INTO test VALUES (0, 0)",
"SELECT DOLT_COMMIT('-a', '-m', 'initial tab... | explode_data.jsonl/38719 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1245
} | [
2830,
3393,
10888,
8070,
5910,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
2822,
86956,
1669,
19556,
29284,
2271,
515,
197,
21297,
25,
330,
7183,
5266,
25800,
389,
11,
12055,
389,
294,
6181,
20888,
756,
197,
22212,
2324,
5910,
25,
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... | 1 |
func TestCheckDown(t *testing.T) {
host, port, ip, closeEcho, err := startEchoServer(t)
require.NoError(t, err)
defer closeEcho()
configMap := common.MapStr{
"hosts": host,
"ports": port,
"timeout": "1s",
"check.receive": "BOOM", // should fail
"check.send": "echo123",
}
event... | explode_data.jsonl/54640 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 454
} | [
2830,
3393,
3973,
4454,
1155,
353,
8840,
836,
8,
341,
63104,
11,
2635,
11,
5997,
11,
3265,
74994,
11,
1848,
1669,
1191,
74994,
5475,
1155,
340,
17957,
35699,
1155,
11,
1848,
340,
16867,
3265,
74994,
2822,
25873,
2227,
1669,
4185,
10104,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAcceleratedNetworkingSupported(t *testing.T) {
cases := []struct {
input string
expectedResult bool
}{
{
input: "Standard_A1",
expectedResult: false,
},
{
input: "Standard_G4",
expectedResult: false,
},
{
input: "Standard_B3",
expectedResult... | explode_data.jsonl/7028 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 520
} | [
2830,
3393,
58182,
657,
78007,
34636,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
22427,
688,
914,
198,
197,
42400,
2077,
1807,
198,
197,
59403,
197,
197,
515,
298,
22427,
25,
688,
330,
19781,
1566,
16,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_hcsTask_DeleteExec_InitExecID_2ndExec_CreatedState_Error(t *testing.T) {
lt, init, second := setupTestHcsTask(t)
// start the init exec (required to have 2nd exec)
_ = init.Start(context.TODO())
// try to delete the init exec
pid, status, at, err := lt.DeleteExec(context.TODO(), "")
verifyExpectedErr... | explode_data.jsonl/56381 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 194
} | [
2830,
3393,
1523,
4837,
6262,
57418,
10216,
15644,
10216,
915,
62,
17,
303,
10216,
920,
2850,
1397,
28651,
1155,
353,
8840,
836,
8,
341,
197,
4832,
11,
2930,
11,
2086,
1669,
6505,
2271,
39,
4837,
6262,
1155,
692,
197,
322,
1191,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRepository_Create(t *testing.T) {
t.Run("Success", func(t *testing.T) {
// given
appModel := fixDetailedModelApplication(t, givenID(), givenTenant(), "Test app", "Test app description")
appEntity := fixDetailedEntityApplication(t, givenID(), givenTenant(), "Test app", "Test app description")
mockConv... | explode_data.jsonl/52673 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 912
} | [
2830,
3393,
4624,
34325,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
7188,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
322,
2661,
198,
197,
28236,
1712,
1669,
5046,
63484,
1712,
4988,
1155,
11,
2661,
915,
1507,
2661,
71252,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetChangeRef(t *testing.T) {
unittest.SmallTest(t)
changeInfo := &gerrit.ChangeInfo{
Issue: 443102,
// Most recent revisions are first.
Patchsets: []*gerrit.Revision{
{
Number: 1,
Kind: gerrit.PatchSetKindCodeChange,
},
{
Number: 2,
Kind: gerrit.PatchSetKindTrivialRebase,
... | explode_data.jsonl/45919 | {
"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,
1949,
4072,
3945,
1155,
353,
8840,
836,
8,
341,
20479,
14267,
90183,
2271,
1155,
692,
68380,
1731,
1669,
609,
70,
615,
275,
39348,
1731,
515,
197,
24486,
83890,
25,
220,
19,
19,
18,
16,
15,
17,
345,
197,
197,
322,
7496,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAbs(t *testing.T) {
tests := []struct {
input int
expected int
}{
{-10, 10},
{0, 0},
{10, 10},
}
for i, test := range tests {
got := Abs(test.input)
if test.expected != got {
t.Errorf("tests[%d] Expected %d got %d", i, test.expected, got)
}
}
} | explode_data.jsonl/75160 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
27778,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
22427,
262,
526,
198,
197,
42400,
526,
198,
197,
59403,
197,
197,
19999,
16,
15,
11,
220,
16,
15,
1583,
197,
197,
90,
15,
11,
220,
15,
1583,
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 TestCSVQueries2(t *testing.T) {
input := `id,time,num,num2,text
1,2010-01-01T,7867786,4565.908123,"a text, with comma"
2,2017-01-02T03:04Z,-5, 0.765111,
`
var testTable = []struct {
name string
query string
requestXML []byte // override request XML
wantResult string
}{
{
name: "sel... | explode_data.jsonl/78311 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1679
} | [
2830,
3393,
44209,
55261,
17,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
1565,
307,
53715,
35424,
35424,
17,
39010,
198,
16,
11,
17,
15,
16,
15,
12,
15,
16,
12,
15,
16,
51,
11,
22,
23,
21,
22,
22,
23,
21,
11,
19,
20,
21,
20,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCopy(t *testing.T) {
env, cleanup := withTestEnvironment(t)
defer cleanup()
env2, cleanup2 := withTestEnvironment(t)
defer cleanup2()
testSetupBackupData(t, env)
opts := BackupOptions{}
testRunBackup(t, "", []string{filepath.Join(env.testdata, "0", "0", "9")}, opts, env.gopts)
testRunBackup(t, "", []s... | explode_data.jsonl/43550 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 825
} | [
2830,
3393,
12106,
1155,
353,
8840,
836,
8,
341,
57538,
11,
21290,
1669,
448,
2271,
12723,
1155,
340,
16867,
21290,
741,
57538,
17,
11,
21290,
17,
1669,
448,
2271,
12723,
1155,
340,
16867,
21290,
17,
2822,
18185,
21821,
56245,
1043,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestLocalRunner(t *testing.T) {
taskA := &Task{
Weight: 10,
Fn: func() {
time.Sleep(time.Second)
},
Name: "TaskA",
}
tasks := []*Task{taskA}
runner := newLocalRunner(tasks, nil, 2, 2)
go runner.run()
time.Sleep(4 * time.Second)
runner.close()
} | explode_data.jsonl/11394 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 120
} | [
2830,
3393,
7319,
19486,
1155,
353,
8840,
836,
8,
341,
49115,
32,
1669,
609,
6262,
515,
197,
197,
8295,
25,
220,
16,
15,
345,
197,
12727,
77,
25,
2915,
368,
341,
298,
21957,
31586,
9730,
32435,
340,
197,
197,
1583,
197,
21297,
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 TestAccAwsDmsEndpoint_S3(t *testing.T) {
resourceName := "aws_dms_endpoint.dms_endpoint"
randId := acctest.RandString(8) + "-s3"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: dmsEndpointDestroy,
Steps: []resource.T... | explode_data.jsonl/37164 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 887
} | [
2830,
3393,
14603,
47359,
35,
1011,
27380,
1098,
18,
1155,
353,
8840,
836,
8,
341,
50346,
675,
1669,
330,
8635,
814,
1011,
36699,
950,
1011,
36699,
698,
7000,
437,
764,
1669,
1613,
67880,
2013,
437,
703,
7,
23,
8,
488,
6523,
82,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDuplicates(t *testing.T) {
artifactPath := filepath.Join(t.TempDir(), "artifact")
sigPath := filepath.Join(t.TempDir(), "signature.asc")
createdSignedArtifact(t, artifactPath, sigPath)
// Write the public key to a file
pubPath := filepath.Join(t.TempDir(), "pubKey.asc")
if err := ioutil.WriteFile(pubPa... | explode_data.jsonl/20312 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 363
} | [
2830,
3393,
76851,
1155,
353,
8840,
836,
8,
341,
197,
63722,
1820,
1669,
26054,
22363,
1155,
65009,
6184,
1507,
330,
63722,
1138,
84841,
1820,
1669,
26054,
22363,
1155,
65009,
6184,
1507,
330,
34140,
81973,
5130,
197,
7120,
49312,
85578,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenesisChainContext(t *testing.T) {
// Ensure that the chain context is stable.
stableDoc := testDoc()
// NOTE: Staking part is not stable as it generates a new public key
// on each run.
stableDoc.Staking = staking.Genesis{}
// Having to update this every single time the genesis structure
// cha... | explode_data.jsonl/8677 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 154
} | [
2830,
3393,
84652,
18837,
1972,
1155,
353,
8840,
836,
8,
341,
197,
322,
29279,
429,
279,
8781,
2266,
374,
15175,
624,
18388,
480,
9550,
1669,
1273,
9550,
741,
197,
322,
16743,
25,
794,
1765,
949,
374,
537,
15175,
438,
432,
26885,
264,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTitle_String(t *testing.T) {
got := NewPrinter().
Add(NewTitle("foo")).
Add(NewTitle("bar")).
String()
expect := "foo\n===\n\nbar\n===\n\n"
if got != expect {
t.Fatal("== expected\n", expect, "== got\n", got)
}
} | explode_data.jsonl/9995 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 106
} | [
2830,
3393,
3851,
31777,
1155,
353,
8840,
836,
8,
341,
3174,
354,
1669,
1532,
45660,
25829,
197,
37972,
35063,
3851,
445,
7975,
899,
4292,
197,
37972,
35063,
3851,
445,
2257,
899,
4292,
197,
4980,
741,
24952,
1669,
330,
7975,
1699,
8707... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAPI_GenerateEnvHTTPS(t *testing.T) {
t.Parallel()
c := &Config{
Address: "127.0.0.1:8500",
Token: "test",
TokenFile: "test.file",
Scheme: "https",
TLSConfig: TLSConfig{
CAFile: "/var/consul/ca.crt",
CAPath: "/var/consul/ca.dir",
CertFile: "/var/c... | explode_data.jsonl/44948 | {
"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,
7082,
2646,
13220,
14359,
82354,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
1669,
609,
2648,
515,
197,
98090,
25,
256,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
23,
20,
15,
15,
756,
197,
33299,
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 TestPrivateDns1(t *testing.T) {
runTestAWS(t, "privatedns1.example.com", "privatedns1", "v1alpha2", true, 1, true, false, nil)
} | explode_data.jsonl/17501 | {
"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,
16787,
35,
4412,
16,
1155,
353,
8840,
836,
8,
341,
56742,
2271,
36136,
1155,
11,
330,
11887,
657,
4412,
16,
7724,
905,
497,
330,
11887,
657,
4412,
16,
497,
330,
85,
16,
7141,
17,
497,
830,
11,
220,
16,
11,
830,
11,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestGetMessage(t *testing.T) {
mobile_number := "7600647682"
expected := "Thank you for registering! Login with \nUsername:" + mobile_number + "\n Password:" + Password(mobile_number)
actual, err := message(mobile_number)
if err == nil && strings.Compare(expected, actual) != 0 {
t.Fail()
}
mobile_number =... | explode_data.jsonl/45743 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 174
} | [
2830,
3393,
1949,
2052,
1155,
353,
8840,
836,
8,
220,
341,
2109,
3372,
5500,
1669,
330,
22,
21,
15,
15,
21,
19,
22,
21,
23,
17,
698,
42400,
1669,
330,
13060,
498,
369,
38729,
0,
8779,
448,
1124,
77,
11115,
2974,
488,
6371,
5500,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGRPCUnaryPingViaActivator(t *testing.T) {
testGRPC(t,
func(ctx *TestContext, host, domain string) {
if err := waitForActivatorEndpoints(ctx); err != nil {
t.Fatal("Never got Activator endpoints in the service:", err)
}
unaryTest(ctx, host, domain)
},
rtesting.WithConfigAnnotations(map[strin... | explode_data.jsonl/52702 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
8626,
4872,
94545,
69883,
54428,
23179,
850,
1155,
353,
8840,
836,
8,
341,
18185,
8626,
4872,
1155,
345,
197,
29244,
7502,
353,
2271,
1972,
11,
3468,
11,
7947,
914,
8,
341,
298,
743,
1848,
1669,
52223,
23179,
850,
80786,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_UniqueStrp(t *testing.T) {
assert.True(t, UniqueStrp([]*string{}))
assert.True(t, UniqueStrp([]*string{to.Strp("asd")}))
assert.True(t, UniqueStrp([]*string{to.Strp("asd"), to.Strp("asdas")}))
assert.False(t, UniqueStrp([]*string{nil}))
assert.False(t, UniqueStrp([]*string{to.Strp("asd"), to.Strp("asd")... | explode_data.jsonl/49603 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
62,
22811,
2580,
79,
1155,
353,
8840,
836,
8,
341,
6948,
32443,
1155,
11,
28650,
2580,
79,
85288,
917,
6257,
1171,
6948,
32443,
1155,
11,
28650,
2580,
79,
85288,
917,
90,
983,
27318,
79,
445,
79102,
899,
44194,
6948,
32443... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestErrorFunc(t *testing.T) {
result := ""
g := newServer(Options{
Secret: "secret123",
ErrorFunc: func(c *gin.Context) {
result = "something wrong"
},
})
g.GET("/login", func(c *gin.Context) {
GetToken(c)
})
g.POST("/login", func(c *gin.Context) {
c.String(http.StatusOK, "OK")
})
r1 := req... | explode_data.jsonl/22733 | {
"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,
1454,
9626,
1155,
353,
8840,
836,
8,
341,
9559,
1669,
8389,
3174,
1669,
501,
5475,
7,
3798,
515,
197,
7568,
50856,
25,
330,
20474,
16,
17,
18,
756,
197,
58421,
9626,
25,
2915,
1337,
353,
8163,
9328,
8,
341,
298,
9559,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIssueNewAttributeUpdateSchemeManager(t *testing.T) {
client, _ := parseStorage(t)
defer test.ClearTestStorage(t)
schemeid := irma.NewSchemeManagerIdentifier("irma-demo")
credid := irma.NewCredentialTypeIdentifier("irma-demo.RU.studentCard")
attrid := irma.NewAttributeTypeIdentifier("irma-demo.RU.studentC... | explode_data.jsonl/70002 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 286
} | [
2830,
3393,
42006,
3564,
3907,
4289,
28906,
2043,
1155,
353,
8840,
836,
8,
341,
25291,
11,
716,
1669,
4715,
5793,
1155,
340,
16867,
1273,
13524,
2271,
5793,
1155,
692,
1903,
8058,
307,
1669,
6216,
1728,
7121,
28906,
2043,
8714,
445,
440... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRecordsRemoves(t *testing.T) {
recs, l1, l2 := newTestRecordList()
ev := NewEvent("foo")
assertListenersEqual(t, recs.getList()[0], ev, "foo", []Listener{l2, l1})
recs.Remove(NewEvent("foo"), l2)
assertListenersEqual(t, recs.getList()[0], ev, "foo", []Listener{l1})
recs.Remove(NewEvent("foo"), l1)
asser... | explode_data.jsonl/25273 | {
"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,
25876,
6590,
10088,
1155,
353,
8840,
836,
8,
341,
67904,
82,
11,
326,
16,
11,
326,
17,
1669,
501,
2271,
6471,
852,
741,
74837,
1669,
1532,
1556,
445,
7975,
1138,
6948,
31570,
2993,
1155,
11,
1395,
82,
62585,
10116,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestObsoletingInvites2(t *testing.T) {
// This chain is a backwards-compatibility test to see if even if
// someone got tricked into accepting obsolete invite, such chain
// should still play and result in predictable end state.
team := runUnitFromFilename(t, "invite_obsolete_trick.json")
require.Equal(t, 0, ... | explode_data.jsonl/12251 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 162
} | [
2830,
3393,
4121,
704,
35935,
15174,
3611,
17,
1155,
353,
8840,
836,
8,
341,
197,
322,
1096,
8781,
374,
264,
28412,
11476,
53053,
1273,
311,
1490,
421,
1496,
421,
198,
197,
322,
4325,
2684,
14068,
291,
1119,
24667,
46066,
21399,
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... | 1 |
func TestUdp(t *testing.T) {
statsd := Statsd{
Log: testutil.Logger{},
Protocol: "udp",
ServiceAddress: "localhost:8125",
AllowedPendingMessages: 250000,
}
var acc testutil.Accumulator
require.NoError(t, statsd.Start(&acc))
defer statsd.Stop()
conn, err := net.Dia... | explode_data.jsonl/14389 | {
"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,
52,
9796,
1155,
353,
8840,
836,
8,
341,
79659,
67,
1669,
29927,
67,
515,
197,
24201,
25,
503,
1273,
1314,
12750,
38837,
197,
197,
20689,
25,
2290,
330,
31101,
756,
197,
91619,
4286,
25,
260,
330,
8301,
25,
23,
16,
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... | 3 |
func TestAlertManager_Send(t *testing.T) {
const baUser, baPass = "foo", "bar"
mux := http.NewServeMux()
mux.HandleFunc("/", func(_ http.ResponseWriter, _ *http.Request) {
t.Errorf("should not be called")
})
c := -1
mux.HandleFunc(alertManagerPath, func(w http.ResponseWriter, r *http.Request) {
user, pass, ok... | explode_data.jsonl/27274 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1115
} | [
2830,
3393,
9676,
2043,
46267,
1155,
353,
8840,
836,
8,
341,
4777,
12789,
1474,
11,
12789,
12187,
284,
330,
7975,
497,
330,
2257,
698,
2109,
2200,
1669,
1758,
7121,
60421,
44,
2200,
741,
2109,
2200,
63623,
35460,
2915,
2490,
1758,
37508... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTxnOnePhaseCommit(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)
s, metrics, cleanupFn := setupMetricsTest(t)
defer cleanupFn()
value := []byte("value")
ctx := context.Background()
if err := s.DB.Txn(ctx, func(ctx context.Context, txn *kv.Txn) error {
key := []byte("key-co... | explode_data.jsonl/76894 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 366
} | [
2830,
3393,
31584,
77,
3966,
30733,
33441,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
16867,
1487,
77940,
1155,
568,
7925,
1155,
340,
1903,
11,
16734,
11,
21290,
24911,
1669,
6505,
27328,
2271,
1155,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCreateJob_ThroughPipelineVersion(t *testing.T) {
// Create experiment, pipeline and pipeline version.
store, manager, experiment, pipeline := initWithExperimentAndPipeline(t)
defer store.Close()
pipelineStore, ok := store.pipelineStore.(*storage.PipelineStore)
assert.True(t, ok)
pipelineStore.SetUUIDGene... | explode_data.jsonl/77036 | {
"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,
4021,
12245,
62,
23857,
34656,
5637,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
9342,
11,
15301,
323,
15301,
2319,
624,
57279,
11,
6645,
11,
9342,
11,
15301,
1669,
13864,
77780,
3036,
34656,
1155,
340,
16867,
3553,
10421,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPlugin(t *testing.T) {
t.Parallel()
s := &IllumosNfsServer{
Fields: []string{"read", "write", "remove", "create"},
NfsVersions: []string{"v4"},
}
acc := testutil.Accumulator{}
require.NoError(t, s.Gather(&acc))
metric := acc.GetTelegrafMetrics()[0]
require.Equal(t, "nfs.server", metric.Name(... | explode_data.jsonl/45327 | {
"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,
11546,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1903,
1669,
609,
40,
5448,
436,
45,
3848,
5475,
515,
197,
197,
8941,
25,
414,
3056,
917,
4913,
878,
497,
330,
4934,
497,
330,
5399,
497,
330,
3182,
7115,
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_number_of_idle_calls_are_capped(t *testing.T) {
log.SetOutput(ioutil.Discard)
hook := test.NewGlobal()
user := model.User{ID: "42", Name: "John Doe"}
openShiftClient := &mock.OpenShiftClient{}
openShiftClient.IdleState = model.JenkinsRunning
config := &mock.Config{}
maxRetry := 3
config.MaxRetries =... | explode_data.jsonl/917 | {
"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,
5500,
3575,
47810,
45636,
56855,
666,
5677,
1155,
353,
8840,
836,
8,
341,
6725,
4202,
5097,
1956,
30158,
909,
47560,
340,
9598,
1941,
1669,
1273,
7121,
11646,
2822,
19060,
1669,
1614,
7344,
90,
915,
25,
330,
19,
17,
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... | 1 |
func TestWontPutInQueueBecauseMaxMemoryExceeds(t *testing.T) {
policy := newRetryPolicy()
policy.SetMaxSize(0)
// send will fail and won't be put in queue because it exceeds maxMemorySizeInBytes
policy.ingest(&retryPolicyRequest{
data: []byte("test"),
ingestionURL: "",
httpRequest: func(data []byte, i... | explode_data.jsonl/40702 | {
"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,
54,
544,
19103,
641,
7554,
17949,
5974,
10642,
840,
4635,
82,
1155,
353,
8840,
836,
8,
341,
3223,
8018,
1669,
501,
51560,
13825,
741,
3223,
8018,
4202,
5974,
1695,
7,
15,
340,
197,
322,
3624,
686,
3690,
323,
2765,
944,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTimestamptzTranscode(t *testing.T) {
testutil.TestSuccessfulTranscodeEqFunc(t, "timestamptz", []interface{}{
(zeronull.Timestamptz)(time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC)),
(zeronull.Timestamptz)(time.Time{}),
}, func(a, b interface{}) bool {
at := a.(zeronull.Timestamptz)
bt := b.(zeronull.Time... | explode_data.jsonl/30779 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 172
} | [
2830,
3393,
51,
4255,
309,
417,
89,
3167,
1851,
1155,
353,
8840,
836,
8,
341,
18185,
1314,
8787,
36374,
3167,
1851,
27312,
9626,
1155,
11,
330,
83,
4255,
309,
417,
89,
497,
3056,
4970,
67066,
197,
197,
7,
7070,
263,
617,
836,
4255,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUintFill(t *testing.T) {
assert := assertWrap(t)
_ = os.Setenv("A", "")
_ = os.Setenv("B", "")
_ = os.Setenv("C", "")
_ = os.Setenv("D", "")
_ = os.Setenv("E", "")
//_ = os.Setenv("F", "")
{
test := TestUintFillEnv{}
err := Fill(&test, OptEnv)
assert("tes... | explode_data.jsonl/7015 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 930
} | [
2830,
3393,
21570,
14449,
1155,
353,
8840,
836,
8,
341,
262,
2060,
1669,
2060,
26787,
1155,
340,
262,
716,
284,
2643,
4202,
3160,
445,
32,
497,
14676,
262,
716,
284,
2643,
4202,
3160,
445,
33,
497,
14676,
262,
716,
284,
2643,
4202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteFileFromUserHomeDir(t *testing.T) {
hds := NewHomedirService()
content := []byte(`t`)
pathToFile := "testfile"
user, _ := user.Current()
err := hds.DeleteFileFromUserHomeDir(pathToFile)
assert.Error(t, err)
err = hds.WriteFileToUserHomeDir(content, pathToFile)
assert.Nil(t, err)
err = hds.Delete... | explode_data.jsonl/35864 | {
"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,
6435,
1703,
3830,
1474,
7623,
6184,
1155,
353,
8840,
836,
8,
341,
9598,
5356,
1669,
1532,
39,
24139,
404,
1860,
741,
27751,
1669,
3056,
3782,
5809,
83,
24183,
26781,
41550,
1669,
330,
1944,
1192,
698,
19060,
11,
716,
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 TestWorkflowFinishedBefore(t *testing.T) {
t0 := time.Time{}.Add(time.Second)
t1 := t0.Add(time.Second)
assert.False(t, WorkflowFinishedBefore(t0)(Workflow{}))
assert.False(t, WorkflowFinishedBefore(t1)(Workflow{}))
assert.False(t, WorkflowFinishedBefore(t0)(Workflow{Status: WorkflowStatus{FinishedAt: metav1.... | explode_data.jsonl/26014 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 175
} | [
2830,
3393,
62768,
24890,
10227,
1155,
353,
8840,
836,
8,
341,
3244,
15,
1669,
882,
16299,
46391,
2212,
9730,
32435,
340,
3244,
16,
1669,
259,
15,
1904,
9730,
32435,
340,
6948,
50757,
1155,
11,
60173,
24890,
10227,
1155,
15,
2376,
62768... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMessage_PrivateRecall(t *testing.T) {
rc := NewRongCloud(
os.Getenv("APP_KEY"),
os.Getenv("APP_SECRET"),
)
err := rc.PrivateRecall(
"7Szq13MKRVortoknTAk7W8",
"4kIvGJmETlYqDoVFgWdYdM",
"B7CE-U880-31M6-D3EE",
1543566558208,
)
t.Log(err)
} | explode_data.jsonl/38994 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
2052,
43830,
3820,
541,
1155,
353,
8840,
836,
8,
1476,
30295,
1669,
1532,
49,
644,
16055,
1006,
197,
25078,
64883,
445,
14707,
6600,
4461,
197,
25078,
64883,
445,
14707,
31408,
4461,
197,
692,
9859,
1669,
10192,
87738,
3820,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSGracefulShutdown(t *testing.T) {
m := newMockD()
ds := NewHandlerImpl(nil)
close(m.recvChan)
assert.NoError(t, ds.Handle(m), "Expected no error for hangup")
} | explode_data.jsonl/36267 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 72
} | [
2830,
3393,
50,
86543,
1262,
62004,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
501,
11571,
35,
741,
83336,
1669,
1532,
3050,
9673,
27907,
692,
27873,
1255,
40433,
46019,
340,
6948,
35699,
1155,
11,
11472,
31421,
1255,
701,
330,
18896,
90... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValueString(t *testing.T) {
rv := ValueOf(Impl{})
if rv.String() != "<reflect_test.Impl Value>" {
t.Errorf("ValueOf(Impl{}).String() = %q, want %q", rv.String(), "<reflect_test.Impl Value>")
}
method := rv.Method(0)
if method.String() != "<func() Value>" {
t.Errorf("ValueOf(Impl{}).Method(0).String()... | explode_data.jsonl/29625 | {
"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,
1130,
703,
1155,
353,
8840,
836,
8,
341,
78484,
1669,
5162,
2124,
7,
9673,
37790,
743,
17570,
6431,
368,
961,
4055,
34913,
4452,
13,
9673,
5162,
9877,
341,
197,
3244,
13080,
445,
1130,
2124,
7,
9673,
6257,
568,
703,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestExtensionUpgrade(t *testing.T) {
var err error
var version string
ctx := context.Background()
buildPromscaleImageFromRepo(t)
_, dbContainer, closer := startDB(t, ctx)
defer closer.Close()
defer testhelpers.StopContainer(ctx, dbContainer, false)
// as the default installed version ext is rc4 in the te... | explode_data.jsonl/79303 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 952
} | [
2830,
3393,
12049,
43861,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
2405,
2319,
914,
198,
20985,
1669,
2266,
19047,
741,
69371,
35186,
12445,
1906,
3830,
25243,
1155,
340,
197,
6878,
2927,
4502,
11,
12128,
1669,
1191,
3506,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJson2Struct_struct_slice(t *testing.T) {
ret, err := Json2Struct("auto_name", `{"23":{"int_slice": [23,12], "string": "2323"}, "1": {"int": 23, "string": "2323", "float": 23.2}}`, GoStructType)
fmt.Printf("ret:\n %s, %v\n", ret, err)
} | explode_data.jsonl/72758 | {
"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,
5014,
17,
9422,
15126,
26488,
1155,
353,
8840,
836,
8,
341,
11262,
11,
1848,
1669,
8308,
17,
9422,
445,
3902,
1269,
497,
1565,
4913,
17,
18,
22317,
396,
26488,
788,
508,
17,
18,
11,
16,
17,
1125,
330,
917,
788,
330,
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 TestHardLink(t *testing.T) {
// this test assumes a test set with a single directory containing hard linked files
env, cleanup := withTestEnvironment(t)
defer cleanup()
datafile := filepath.Join("testdata", "test.hl.tar.gz")
fd, err := os.Open(datafile)
if os.IsNotExist(errors.Cause(err)) {
t.Skipf("unabl... | explode_data.jsonl/43573 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 557
} | [
2830,
3393,
26907,
3939,
1155,
353,
8840,
836,
8,
341,
197,
322,
419,
1273,
21484,
264,
1273,
738,
448,
264,
3175,
6220,
8482,
2588,
10592,
3542,
198,
57538,
11,
21290,
1669,
448,
2271,
12723,
1155,
340,
16867,
21290,
2822,
8924,
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 TestCreateAccountListen(t *testing.T) {
server, _ := GetStartedTestServer(t)
client := NewClient(server.config)
res, err := client.CreateAccount(1000)
if err != nil {
t.Error(err)
}
t.Log(res)
res, err = client.Listen("0")
if err != nil {
t.Error(err)
}
t.Log(res)
_ = res
} | explode_data.jsonl/44705 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 124
} | [
2830,
3393,
4021,
7365,
38714,
1155,
353,
8840,
836,
8,
341,
41057,
11,
716,
1669,
2126,
32527,
2271,
5475,
1155,
340,
25291,
1669,
1532,
2959,
21421,
5423,
340,
10202,
11,
1848,
1669,
2943,
7251,
7365,
7,
16,
15,
15,
15,
340,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestGetBuildConfigFromName(t *testing.T) {
tests := []struct {
name string
buildName string
returnedBuildConfig buildv1.BuildConfig
wantErr bool
}{
{
name: "buildConfig with existing bc",
buildName: "nodejs",
returnedBuildConfig: buildv1.BuildConfig{
... | explode_data.jsonl/65151 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 670
} | [
2830,
3393,
1949,
11066,
2648,
3830,
675,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
394,
914,
198,
197,
69371,
675,
1843,
914,
198,
197,
853,
291,
11066,
2648,
1936,
85,
16,
25212,
2648,
198,
197,
50780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestResolver_UpdateEventAPI(t *testing.T) {
// given
testErr := errors.New("Test error")
id := "bar"
gqlAPIDefinitionInput := fixGQLEventAPIDefinitionInput()
modelAPIDefinitionInput := fixModelEventAPIDefinitionInput()
gqlAPIDefinition := fixGQLEventAPIDefinition(id, "placeholder")
modelAPIDefinition := fi... | explode_data.jsonl/2242 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1753
} | [
2830,
3393,
18190,
47393,
1556,
7082,
1155,
353,
8840,
836,
8,
341,
197,
322,
2661,
198,
18185,
7747,
1669,
5975,
7121,
445,
2271,
1465,
5130,
15710,
1669,
330,
2257,
698,
3174,
1470,
2537,
915,
823,
4054,
2505,
1669,
5046,
38,
48,
86... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOmahaResponseWithUpdate(t *testing.T) {
parsed, err := ParseResponse("", strings.NewReader(sampleResponse))
if err != nil {
t.Fatalf("ParseResponse failed: %v", err)
}
expected := &Response{
XMLName: xml.Name{Local: "response"},
Protocol: "3.0",
DayStart: DayStart{ElapsedSeconds: "49008"},
Apps... | explode_data.jsonl/79416 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 586
} | [
2830,
3393,
63488,
13546,
2582,
2354,
4289,
1155,
353,
8840,
836,
8,
341,
3223,
18112,
11,
1848,
1669,
14775,
2582,
19814,
9069,
68587,
32968,
2582,
1171,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
14463,
2582,
4641,
25,
1018,
85... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPgRepository_GetLowestOwnerForResource(t *testing.T) {
runtimeID := "runtimeID"
t.Run("Success", func(t *testing.T) {
db, dbMock := testdb.MockDatabase(t)
defer dbMock.AssertExpectations(t)
rowsToReturn := sqlmock.NewRows([]string{"tenant_id"}).AddRow(testID)
dbMock.ExpectQuery(regexp.QuoteMeta(`(SE... | explode_data.jsonl/23367 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 700
} | [
2830,
3393,
82540,
4624,
13614,
24187,
477,
13801,
90100,
1155,
353,
8840,
836,
8,
341,
7000,
4466,
915,
1669,
330,
22255,
915,
1837,
3244,
16708,
445,
7188,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
20939,
11,
2927,
11571,
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 TestDecodeZip(t *testing.T) {
buf := new(bytes.Buffer)
w := zip.NewWriter(buf)
var files = []struct {
Name, Body string
}{
{
"a.json",
`{"a":"b"}`,
},
{
"b.ndjson",
`{"a":"b"}` + "\n" + `{"c":"d"}`,
},
{
"c.ndjson",
"{\n\t" + `"a":"b"` + "\n}\n{\n\t" + `"c":"d"` + "\n}",
},
}
... | explode_data.jsonl/20806 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 416
} | [
2830,
3393,
32564,
31047,
1155,
353,
8840,
836,
8,
341,
26398,
1669,
501,
23158,
22622,
340,
6692,
1669,
10308,
7121,
6492,
10731,
340,
2405,
3542,
284,
3056,
1235,
341,
197,
21297,
11,
13958,
914,
198,
197,
59403,
197,
197,
515,
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... | 4 |
func TestFavoritesGetAll(t *testing.T) {
mockCtrl, config, ctx := favTestInit(t, false)
f := NewFavorites(config)
f.Initialize(ctx)
defer favTestShutdown(t, mockCtrl, config, f)
// Prep
teamID := keybase1.MakeTestTeamID(0xdeadbeef, false)
fol := keybase1.Folder{
Name: "fake folder",
Private: true,
... | explode_data.jsonl/14686 | {
"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,
85221,
1949,
2403,
1155,
353,
8840,
836,
8,
341,
77333,
15001,
11,
2193,
11,
5635,
1669,
9244,
2271,
3803,
1155,
11,
895,
340,
1166,
1669,
1532,
85221,
8754,
340,
1166,
45829,
7502,
340,
16867,
9244,
2271,
62004,
1155,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestLogsExporter_Default_ReturnError(t *testing.T) {
ld := pdata.NewLogs()
want := errors.New("my_error")
le, err := NewLogsExporter(&fakeLogsExporterConfig, componenttest.NewNopExporterCreateSettings(), newPushLogsData(want))
require.NoError(t, err)
require.NotNil(t, le)
require.Equal(t, want, le.ConsumeLog... | explode_data.jsonl/59606 | {
"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,
51053,
88025,
60336,
53316,
1454,
1155,
353,
8840,
836,
8,
341,
197,
507,
1669,
70311,
7121,
51053,
741,
50780,
1669,
5975,
7121,
445,
2408,
4096,
1138,
197,
273,
11,
1848,
1669,
1532,
51053,
88025,
2099,
30570,
51053,
88025,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPeerAddress(t *testing.T) {
// Simple tests because already tested in stun.
a := PeerAddress{
IP: net.IPv4(111, 11, 1, 2),
Port: 333,
}
t.Run("String", func(t *testing.T) {
if a.String() != "111.11.1.2:333" {
t.Error("invalid string")
}
})
m := new(stun.Message)
if err := a.AddTo(m); err !=... | explode_data.jsonl/7651 | {
"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,
30888,
4286,
1155,
353,
8840,
836,
8,
341,
197,
322,
8993,
7032,
1576,
2669,
12510,
304,
65428,
624,
11323,
1669,
45147,
4286,
515,
197,
197,
3298,
25,
256,
4179,
46917,
85,
19,
7,
16,
16,
16,
11,
220,
16,
16,
11,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCaptiveGetLedger_ErrClosingAfterLastLedger(t *testing.T) {
tt := assert.New(t)
metaChan := make(chan metaResult, 100)
for i := 64; i <= 66; i++ {
meta := buildLedgerCloseMeta(testLedgerHeader{sequence: uint32(i)})
metaChan <- metaResult{
LedgerCloseMeta: &meta,
}
}
ctx := context.Background()
... | explode_data.jsonl/7329 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 469
} | [
2830,
3393,
34,
27781,
1949,
60850,
1389,
93623,
36294,
6025,
5842,
60850,
1389,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
2060,
7121,
1155,
340,
84004,
46019,
1669,
1281,
35190,
8823,
2077,
11,
220,
16,
15,
15,
692,
2023,
600,
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 TestTeamsService_AddTeamRepoBySlug(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()
opt := &TeamAddTeamRepoOptions{Permission: "admin"}
mux.HandleFunc("/orgs/org/teams/slug/repos/owner/repo", func(w http.ResponseWriter, r *http.Request) {
v := new(TeamAddTeamRepoOptions)
json.NewDecod... | explode_data.jsonl/4535 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 434
} | [
2830,
3393,
60669,
1860,
21346,
14597,
25243,
1359,
54968,
1155,
353,
8840,
836,
8,
341,
25291,
11,
59807,
11,
8358,
49304,
1669,
6505,
741,
16867,
49304,
2822,
64838,
1669,
609,
14597,
2212,
14597,
25243,
3798,
90,
14966,
25,
330,
2882,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPathPrependAsnToNewAsPathAttr(t *testing.T) {
assert := assert.New(t)
origin := bgp.NewPathAttributeOrigin(0)
nexthop := bgp.NewPathAttributeNextHop("192.168.50.1")
pathAttributes := []bgp.PathAttributeInterface{
origin,
nexthop,
}
nlri := []*bgp.IPAddrPrefix{bgp.NewIPAddrPrefix(24, "10.10.10.0")}
... | explode_data.jsonl/57488 | {
"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,
1820,
4703,
3740,
2121,
77,
1249,
3564,
2121,
1820,
13371,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
197,
8611,
1669,
8951,
79,
7121,
1820,
3907,
13298,
7,
15,
340,
9038,
327,
339,
453,
1669,
8951,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProcessDockerEvents(t *testing.T) {
processor := NewDockerEventsProcessor(10)
dockerClient, err := NewDockerClient()
if err != nil {
t.Fatal(err)
}
processor.getDockerClient = func() (*client.Client, error) {
return dockerClient, nil
}
// Mock Handler
handledEvents := make(chan *events.Message, 1... | explode_data.jsonl/50895 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 855
} | [
2830,
3393,
7423,
35,
13659,
7900,
1155,
353,
8840,
836,
8,
341,
197,
29474,
1669,
1532,
35,
13659,
7900,
22946,
7,
16,
15,
692,
2698,
13659,
2959,
11,
1848,
1669,
1532,
35,
13659,
2959,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChannelsService_Get(t *testing.T) {
setup()
defer teardown()
mux.HandleFunc("/channels/1", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
testFormURLValues(t, r, values{
"fields": "name",
})
fmt.Fprint(w, `{"name": "Test"}`)
})
channel, _, err := client.Channels.Get("1... | explode_data.jsonl/49783 | {
"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,
35925,
1860,
13614,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
32425,
14,
16,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
18185,
3523,
1155,
11,
435,
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 TestShouldVerifyWrongCredentials(t *testing.T) {
mock := mocks.NewMockAutheliaCtx(t)
defer mock.Close()
mock.UserProviderMock.EXPECT().
CheckUserPassword(gomock.Eq("john"), gomock.Eq("password")).
Return(false, nil)
url, _ := url.ParseRequestURI("https://test.example.com")
_, _, _, _, _, err := verifyBa... | explode_data.jsonl/20184 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 175
} | [
2830,
3393,
14996,
32627,
29185,
27025,
1155,
353,
8840,
836,
8,
341,
77333,
1669,
68909,
7121,
11571,
5087,
35929,
23684,
1155,
340,
16867,
7860,
10421,
2822,
77333,
7344,
5179,
11571,
22402,
7285,
25829,
197,
69472,
1474,
4876,
3268,
316,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExchangeDataNotSupported(t *testing.T) {
t.Parallel()
mnt, err := fstestutil.MountedT(t, fstestutil.SimpleFS{&fstestutil.ChildMap{
"one": &exchangeData{},
"two": &exchangeData{},
}}, nil)
if err != nil {
t.Fatal(err)
}
defer mnt.Close()
if err := unix.Exchangedata(mnt.Dir+"/one", mnt.Dir+"/two", ... | explode_data.jsonl/3232 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 183
} | [
2830,
3393,
31564,
1043,
2623,
34636,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2109,
406,
11,
1848,
1669,
48434,
477,
1314,
1321,
629,
291,
51,
1155,
11,
48434,
477,
1314,
24252,
8485,
90,
5,
49494,
477,
1314,
28506,
2227... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateProjectName(t *testing.T) {
// Any project-specific name validations can be added here
testCases := map[string]testCase{
"contains emoji": {
input: "😀",
want: errValueBadFormat,
},
}
for name, tc := range basicNameTestCases {
t.Run(name, func(t *testing.T) {
got := validateAppName... | explode_data.jsonl/34542 | {
"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,
17926,
7849,
675,
1155,
353,
8840,
836,
8,
341,
197,
322,
5765,
2390,
18906,
829,
83388,
646,
387,
3694,
1588,
198,
18185,
37302,
1669,
2415,
14032,
60,
66194,
515,
197,
197,
1,
13372,
42365,
788,
341,
298,
22427,
25,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestConfigSetPluginDir(t *testing.T) {
f, err := ioutil.TempDir("/tmp", "newrelic")
assert.NoError(t, err)
defer os.RemoveAll(f)
// Initialize the new configuration directory
c, err := LoadConfig(f)
assert.NoError(t, err)
assert.Equal(t, c.configDir, f)
err = c.Set("pluginDir", "test")
assert.NoError(t,... | explode_data.jsonl/68832 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
2648,
1649,
11546,
6184,
1155,
353,
8840,
836,
8,
341,
1166,
11,
1848,
1669,
43144,
65009,
6184,
4283,
5173,
497,
330,
931,
265,
415,
1138,
6948,
35699,
1155,
11,
1848,
340,
16867,
2643,
84427,
955,
692,
197,
322,
9008,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGroupFloat32(t *testing.T) {
v := &Value{data: []float32{float32(1), float32(1), float32(1), float32(1), float32(1), float32(1)}}
grouped := v.GroupFloat32(func(i int, val float32) string {
return fmt.Sprintf("%v", i%2 == 0)
}).data.(map[string][]float32)
assert.Equal(t, 2, len(grouped))
assert.Equal... | explode_data.jsonl/23509 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 168
} | [
2830,
3393,
2808,
5442,
18,
17,
1155,
353,
8840,
836,
8,
1476,
5195,
1669,
609,
1130,
90,
691,
25,
3056,
3649,
18,
17,
90,
3649,
18,
17,
7,
16,
701,
2224,
18,
17,
7,
16,
701,
2224,
18,
17,
7,
16,
701,
2224,
18,
17,
7,
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 TestRetryFunctionality(t *testing.T) {
//test the max retry functionality
initNum := 0
testFunc := func(c context.Context) error {
if initNum < 3 {
initNum += 1
return fmt.Errorf("should be at least 3")
}
return nil
}
gover, err := New(time.Hour, testFunc)
assert.NoError(t, err)
gover.MaxRetry ... | explode_data.jsonl/63039 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 964
} | [
2830,
3393,
51560,
5152,
2719,
1155,
353,
8840,
836,
8,
341,
197,
322,
1944,
279,
1932,
22683,
14944,
198,
28248,
4651,
1669,
220,
15,
198,
18185,
9626,
1669,
2915,
1337,
2266,
9328,
8,
1465,
341,
197,
743,
2930,
4651,
366,
220,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGenerateNonce(t *testing.T) {
nonce := GenerateNonce()
if nonce == nil {
t.Fatal("expected non-nil nonce")
}
// don't check for exact bitlength match, since leading 0's don't count
// towards length.
if nonce.BitLen() < nonceBytes*8/2 {
t.Fatalf("expected %d bit nonce, got %d", nonceBytes*8, nonce.B... | explode_data.jsonl/23989 | {
"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,
31115,
90528,
1155,
353,
8840,
836,
8,
341,
197,
39593,
1669,
19813,
90528,
741,
743,
39676,
621,
2092,
341,
197,
3244,
26133,
445,
7325,
2477,
83248,
39676,
1138,
197,
630,
197,
322,
1513,
944,
1779,
369,
4734,
2699,
4129,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateRequestBody_StableMarshal(t *testing.T) {
requestFrom := generateCreateSessionRequestBody("Owner ID")
transport := new(grpc.CreateRequest_Body)
t.Run("non empty", func(t *testing.T) {
wire, err := requestFrom.StableMarshal(nil)
require.NoError(t, err)
err = goproto.Unmarshal(wire, transport)
... | explode_data.jsonl/79967 | {
"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,
4021,
33334,
70645,
480,
55438,
1155,
353,
8840,
836,
8,
341,
23555,
3830,
1669,
6923,
4021,
5283,
33334,
445,
13801,
3034,
1138,
197,
26445,
1669,
501,
35963,
3992,
7251,
1900,
1668,
1076,
692,
3244,
16708,
445,
6280,
4287,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAgentConnectCARoots_empty(t *testing.T) {
t.Parallel()
require := require.New(t)
a := NewTestAgent(t.Name(), "connect { enabled = false }")
defer a.Shutdown()
req, _ := http.NewRequest("GET", "/v1/agent/connect/ca/roots", nil)
resp := httptest.NewRecorder()
_, err := a.srv.AgentConnectCARoots(resp, re... | explode_data.jsonl/33650 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
16810,
14611,
36390,
1905,
82,
15124,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
17957,
1669,
1373,
7121,
1155,
340,
11323,
1669,
1532,
2271,
16810,
1155,
2967,
1507,
330,
6459,
314,
8970,
284,
895,
335,
1138,
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 TestRest(t *testing.T) {
assert := require.New(t)
var input interface{}
assert.Nil(Rest(nil))
assert.Nil(Rest(input))
input = []int{1}
assert.Nil(Rest(input))
input = []int{1, 3, 5}
assert.Equal([]interface{}{3, 5}, Rest(input))
} | explode_data.jsonl/45558 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 104
} | [
2830,
3393,
12416,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
1373,
7121,
1155,
340,
2405,
1946,
3749,
31483,
6948,
59678,
2785,
477,
27907,
1171,
6948,
59678,
2785,
477,
5384,
4390,
22427,
284,
3056,
396,
90,
16,
532,
6948,
59678,
2785,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssuerForIngress(t *testing.T) {
type testT struct {
Ingress *networkingv1.Ingress
DefaultName string
DefaultKind string
DefaultGroup string
ExpectedName string
ExpectedKind string
ExpectedGroup string
ExpectedError error
}
tests := []testT{
{
Ingress: buildIngress("name", ... | explode_data.jsonl/53189 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1176
} | [
2830,
3393,
98902,
2461,
641,
2483,
1155,
353,
8840,
836,
8,
341,
13158,
1273,
51,
2036,
341,
197,
70167,
2483,
981,
353,
17511,
287,
85,
16,
5337,
2483,
198,
197,
91084,
675,
256,
914,
198,
197,
91084,
10629,
256,
914,
198,
197,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetSingleChangedElasticsearchSizeAndPurpose(t *testing.T) {
helper := func(kibanaSize, masterSize, dataSize, expectedNewSize string, kibana, dedicatedMaster, expectErr bool, expectedNodePurpose NodePurpose) {
newSize, nodePurpose, err := getSingleChangedElasticsearchSizeAndPurpose(kibanaSize, masterSize, da... | explode_data.jsonl/3825 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 932
} | [
2830,
3393,
1949,
10888,
5389,
36,
51179,
1836,
1695,
3036,
74033,
1155,
353,
8840,
836,
8,
341,
9598,
2947,
1669,
2915,
5969,
579,
3362,
1695,
11,
7341,
1695,
11,
89961,
11,
3601,
3564,
1695,
914,
11,
595,
579,
3362,
11,
12235,
18041... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRoundTrip(t *testing.T) {
syncGit(t)
for _, xmldir := range xmldirs {
xmlfiles, err := ioutil.ReadDir(xmldir)
if err != nil {
t.Fatal(err)
}
for _, xmlfile := range xmlfiles {
if !xmlfile.IsDir() && strings.HasSuffix(xmlfile.Name(), ".xml") {
fname := xmldir + "/" + xmlfile.Name()
_, o... | explode_data.jsonl/63479 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 271
} | [
2830,
3393,
27497,
56352,
1155,
353,
8840,
836,
8,
341,
1903,
1721,
46562,
1155,
340,
2023,
8358,
55249,
507,
404,
1669,
2088,
55249,
507,
16838,
341,
197,
48460,
7198,
11,
1848,
1669,
43144,
6503,
6184,
2075,
76,
507,
404,
340,
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... | 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.