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 TestCompileManifests(t *testing.T) {
var tests = []struct {
manifest string
data interface{}
expected bool
}{
{
manifest: KubeProxyConfigMap,
data: struct{ MasterEndpoint string }{
MasterEndpoint: "foo",
},
expected: true,
},
{
manifest: KubeProxyDaemonSet,
data: struct{ Ima... | explode_data.jsonl/65722 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 622
} | [
2830,
3393,
46126,
38495,
82,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
197,
42315,
914,
198,
197,
8924,
257,
3749,
16094,
197,
42400,
1807,
198,
197,
59403,
197,
197,
515,
298,
197,
42315,
25,
730,
3760,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientSecret(t *testing.T) {
mocksecretname := "mocksecret"
mocksecretnamenoexist := "mocksecretnoexist"
mocksecretnamespace := "default"
mocksecretdata := map[string][]byte{
"mockdata": []byte("mockdata"),
}
// clean
if _, err := mockcli.GetSecret(context.TODO(), mocksecretnamespace, mocksecretname)... | explode_data.jsonl/30934 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1563
} | [
2830,
3393,
2959,
19773,
1155,
353,
8840,
836,
8,
341,
77333,
20474,
606,
1669,
330,
16712,
20474,
698,
77333,
325,
837,
1517,
309,
11790,
28575,
1669,
330,
16712,
325,
837,
1517,
78,
28575,
698,
77333,
325,
837,
1517,
1680,
1669,
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 TestComparable(t *testing.T) {
for _, tt := range comparableTests {
if ok := tt.typ.Comparable(); ok != tt.ok {
t.Errorf("TypeOf(%v).Comparable() = %v, want %v", tt.typ, ok, tt.ok)
}
}
} | explode_data.jsonl/29591 | {
"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,
62635,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
29039,
18200,
341,
197,
743,
5394,
1669,
17853,
49286,
2961,
49156,
2129,
5394,
961,
17853,
18165,
341,
298,
3244,
13080,
445,
929,
2124,
15238,
85,
568,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPluginInterfaceResolveType(t *testing.T) {
grpcClientMock, teardown := setupPluginDriverTests(t)
defer teardown(t)
plug := plugin.NewPlugin(plugin.Config{
Cmd: "fake-plugin-command",
})
defer plug.Close()
data := []struct {
in driver.InterfaceResolveTypeInput
out driver.InterfaceResolveTypeO... | explode_data.jsonl/37053 | {
"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,
11546,
5051,
56808,
929,
1155,
353,
8840,
836,
8,
341,
197,
56585,
2959,
11571,
11,
49304,
1669,
6505,
11546,
11349,
18200,
1155,
340,
16867,
49304,
1155,
340,
197,
47474,
1669,
9006,
7121,
11546,
46801,
10753,
515,
197,
6258,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLocation_PrettyPrint(t *testing.T) {
m1 := &Location{
LocationID: 1,
BookNumber: sql.NullInt32{Int32: 2, Valid: true},
ChapterNumber: sql.NullInt32{Int32: 3, Valid: true},
DocumentID: sql.NullInt32{Int32: 4, Valid: true},
Track: sql.NullInt32{Int32: 5, Valid: true},
IssueTagN... | explode_data.jsonl/60844 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 624
} | [
2830,
3393,
4707,
1088,
21322,
8994,
1155,
353,
8840,
836,
8,
341,
2109,
16,
1669,
609,
4707,
515,
197,
197,
4707,
915,
25,
257,
220,
16,
345,
197,
197,
7134,
2833,
25,
257,
5704,
23979,
1072,
18,
17,
90,
1072,
18,
17,
25,
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 TestWithdraw(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() || !canManipulateRealOrders {
t.Skip("skipping test, either api keys or canManipulateRealOrders isnt set correctly")
}
_, err := f.Withdraw(context.Background(),
currency.NewCode("bTc"), core.BitcoinDonationAddress, "", "", "957378", 0.0009)... | explode_data.jsonl/15183 | {
"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,
92261,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
1369,
753,
4814,
92876,
6334,
12768,
24898,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
11,
2987,
6330,
6894,
476,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReauthEndLoop(t *testing.T) {
var info = struct {
reauthAttempts int
maxReauthReached bool
mut *sync.RWMutex
}{
0,
false,
new(sync.RWMutex),
}
numconc := 20
mut := new(sync.RWMutex)
p := new(gophercloud.ProviderClient)
p.UseTokenLock()
p.SetToken(client.TokenID)
p.ReauthFu... | explode_data.jsonl/5890 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 730
} | [
2830,
3393,
693,
3242,
3727,
14620,
1155,
353,
8840,
836,
8,
341,
2405,
3546,
284,
2036,
341,
197,
17200,
3242,
81517,
256,
526,
198,
197,
22543,
693,
3242,
98526,
1807,
198,
197,
2109,
332,
1060,
353,
12996,
2013,
15210,
9371,
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... | 2 |
func TestOutputService6ProtocolTestMapsCase1(t *testing.T) {
svc := NewOutputService6ProtocolTest(nil)
buf := bytes.NewReader([]byte("{\"MapMember\": {\"a\": [1, 2], \"b\": [3, 4]}}"))
req, out := svc.OutputService6TestCaseOperation1Request(nil)
req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCl... | explode_data.jsonl/8444 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 306
} | [
2830,
3393,
5097,
1860,
21,
20689,
2271,
36562,
4207,
16,
1155,
353,
8840,
836,
8,
341,
1903,
7362,
1669,
1532,
5097,
1860,
21,
20689,
2271,
27907,
692,
26398,
1669,
5820,
68587,
10556,
3782,
99141,
2227,
9366,
11693,
314,
2105,
64,
116... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestStoreSendWithZeroTime(t *testing.T) {
defer leaktest.AfterTest(t)
store, mc, stopper := createTestStore(t)
defer stopper.Stop()
args := getArgs([]byte("a"))
// Set clock to time 1.
mc.Set(1)
resp, err := client.SendWrapped(store.testSender(), nil, &args)
if err != nil {
t.Fatal(err)
}
reply := res... | explode_data.jsonl/44470 | {
"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,
6093,
11505,
2354,
17999,
1462,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
340,
57279,
11,
19223,
11,
2936,
712,
1669,
1855,
2271,
6093,
1155,
340,
16867,
2936,
712,
30213,
741,
31215,
1669,
633,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeletePicture(t *testing.T) {
f, err := OpenFile(filepath.Join("test", "Book1.xlsx"))
assert.NoError(t, err)
assert.NoError(t, f.DeletePicture("Sheet1", "A1"))
assert.NoError(t, f.AddPicture("Sheet1", "P1", filepath.Join("test", "images", "excel.jpg"), ""))
assert.NoError(t, f.DeletePicture("Sheet1", "P1"... | explode_data.jsonl/51749 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 288
} | [
2830,
3393,
6435,
24669,
1155,
353,
8840,
836,
8,
341,
1166,
11,
1848,
1669,
5264,
1703,
34793,
22363,
445,
1944,
497,
330,
7134,
16,
46838,
5455,
6948,
35699,
1155,
11,
1848,
340,
6948,
35699,
1155,
11,
282,
18872,
24669,
445,
10541,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestClone_CheckoutMergeNoneExisting(t *testing.T) {
// Initialize the git repo.
repoDir, cleanup := initRepo(t)
defer cleanup()
// Add a commit to branch 'branch' that's not on master.
runCmd(t, repoDir, "git", "checkout", "branch")
runCmd(t, repoDir, "touch", "branch-file")
runCmd(t, repoDir, "git", "add"... | explode_data.jsonl/17057 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 755
} | [
2830,
3393,
37677,
28188,
411,
52096,
4064,
53067,
1155,
353,
8840,
836,
8,
341,
197,
322,
9008,
279,
16345,
15867,
624,
17200,
5368,
6184,
11,
21290,
1669,
2930,
25243,
1155,
340,
16867,
21290,
2822,
197,
322,
2691,
264,
5266,
311,
887... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewRequestTunnelingIsPossible(t *testing.T) {
client := newClient()
client.ProxyURL = &url.URL{Scheme: "socks5", Host: "[::1]:54321"}
req, err := client.NewRequest(
context.Background(), "GET", "/", nil, nil,
)
if err != nil {
t.Fatal(err)
}
cmp := cmp.Diff(dialer.ContextProxyURL(req.Context()), cli... | explode_data.jsonl/60967 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 155
} | [
2830,
3393,
3564,
1900,
51,
40292,
287,
3872,
65222,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
501,
2959,
741,
25291,
75200,
3144,
284,
609,
1085,
20893,
90,
28906,
25,
330,
13199,
82,
20,
497,
16102,
25,
10545,
486,
16,
5669,
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... | 3 |
func Test_WorkspaceCapping_Status_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
t.Parallel()
parameters := gopter.DefaultTestParameters()
parameters.MaxSize = 10
properties := gopter.NewProperties(parameters)
properties.Property(
"Round trip from WorkspaceCapping_Status to WorkspaceCapping_Status... | explode_data.jsonl/43368 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 182
} | [
2830,
3393,
87471,
8746,
34,
3629,
36449,
62,
4498,
7903,
61941,
2568,
795,
21884,
1690,
26040,
39838,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
67543,
1669,
728,
73137,
13275,
2271,
9706,
741,
67543,
14535,
1695,
284,
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 TestClusterMembers(t *testing.T) {
cls := &cluster{
members: map[types.ID]*Member{
1: &Member{ID: 1},
20: &Member{ID: 20},
100: &Member{ID: 100},
5: &Member{ID: 5},
50: &Member{ID: 50},
},
}
w := []*Member{
&Member{ID: 1},
&Member{ID: 5},
&Member{ID: 20},
&Member{ID: 50},
&Mem... | explode_data.jsonl/52340 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 226
} | [
2830,
3393,
28678,
24371,
1155,
353,
8840,
836,
8,
341,
197,
18074,
1669,
609,
18855,
515,
197,
2109,
7062,
25,
2415,
58,
9242,
9910,
8465,
9366,
515,
298,
197,
16,
25,
256,
609,
9366,
90,
915,
25,
220,
16,
1583,
298,
197,
17,
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 TestStateProposerSelection2(t *testing.T) {
cs1, vss := randState(4) // test needs more work for more than 3 validators
height := cs1.Height
newRoundCh := subscribe(cs1.eventBus, types.EventQueryNewRound)
// this time we jump in at round 2
incrementRound(vss[1:]...)
incrementRound(vss[1:]...)
round := 2
... | explode_data.jsonl/81641 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 435
} | [
2830,
3393,
1397,
2008,
23438,
11177,
17,
1155,
353,
8840,
836,
8,
341,
71899,
16,
11,
348,
778,
1669,
10382,
1397,
7,
19,
8,
442,
1273,
3880,
803,
975,
369,
803,
1091,
220,
18,
38588,
198,
30500,
1669,
10532,
16,
17743,
198,
8638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_DomainMultiCreate(t *testing.T) {
client := NewClient("", "", false)
nodesResponse, _, err := client.Node.List()
require.Nil(t, err, err)
if len(nodesResponse.Results) == 0 {
t.SkipNow()
}
randomNode := nodesResponse.Results[rand.Intn(len(nodesResponse.Results))]
config := new(DomainMultiCreateConf... | explode_data.jsonl/12042 | {
"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,
1557,
3121,
20358,
4021,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
1532,
2959,
19814,
7342,
895,
692,
79756,
2582,
11,
8358,
1848,
1669,
2943,
21714,
5814,
741,
17957,
59678,
1155,
11,
1848,
11,
1848,
340,
743,
2422,
38705,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSliceEqualFunc(t *testing.T) {
tests := []struct {
name string
input []int
input2 []int
want bool
}{
{
name: "case",
input: []int{1, 2},
input2: []int{1, 2},
want: true,
},
{
name: "case",
input: []int{1, 2},
input2: []int{1, 2},
want: true,
},
{
na... | explode_data.jsonl/55744 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 417
} | [
2830,
3393,
33236,
2993,
9626,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
22427,
220,
3056,
396,
198,
197,
22427,
17,
3056,
396,
198,
197,
50780,
256,
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 TestResourceMetricsSlice_MoveAndAppendTo(t *testing.T) {
// Test MoveAndAppendTo to empty
expectedSlice := generateTestResourceMetricsSlice()
dest := NewResourceMetricsSlice()
src := generateTestResourceMetricsSlice()
src.MoveAndAppendTo(dest)
assert.EqualValues(t, generateTestResourceMetricsSlice(), dest)
... | explode_data.jsonl/19490 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 349
} | [
2830,
3393,
4783,
27328,
33236,
66352,
3036,
23877,
1249,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
14561,
3036,
23877,
1249,
311,
4287,
198,
42400,
33236,
1669,
6923,
2271,
4783,
27328,
33236,
741,
49616,
1669,
1532,
4783,
27328,
332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSend(t *testing.T) {
t.Parallel()
submitRequest := &orderer.SubmitRequest{Channel: "mychannel"}
submitResponse := &orderer.StepResponse{
Payload: &orderer.StepResponse_SubmitRes{
SubmitRes: &orderer.SubmitResponse{Status: common.Status_SUCCESS},
},
}
consensusRequest := &orderer.ConsensusRequest{
... | explode_data.jsonl/77745 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1813
} | [
2830,
3393,
11505,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
28624,
1763,
1900,
1669,
609,
1358,
261,
98309,
1900,
90,
9629,
25,
330,
2408,
10119,
16707,
28624,
1763,
2582,
1669,
609,
1358,
261,
68402,
2582,
515,
197,
10025,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInsertProject_withWrongKey(t *testing.T) {
db, cache, end := test.SetupPG(t, bootstrap.InitiliazeDB)
defer end()
u, _ := assets.InsertAdminUser(db)
proj := sdk.Project{
Name: "test proj",
Key: "error key",
}
assert.Error(t, project.Insert(db, cache, &proj, u))
} | explode_data.jsonl/76251 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 117
} | [
2830,
3393,
13780,
7849,
6615,
29185,
1592,
1155,
353,
8840,
836,
8,
341,
20939,
11,
6500,
11,
835,
1669,
1273,
39820,
11383,
1155,
11,
26925,
26849,
24078,
2986,
3506,
340,
16867,
835,
741,
10676,
11,
716,
1669,
11770,
23142,
7210,
147... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPatchDimensionsReturnsBadRequest(t *testing.T) {
t.Parallel()
Convey("Given a Dataset API instance with a mocked datastore GetInstance", t, func() {
w := httptest.NewRecorder()
mockedDataStore, isLocked := storeMockWithLock(false)
datasetAPI := getAPIWithCMDMocks(testContext, mockedDataStore, &mocks.... | explode_data.jsonl/20848 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1597
} | [
2830,
3393,
43622,
21351,
16446,
46015,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
93070,
5617,
445,
22043,
264,
39183,
5333,
2867,
448,
264,
46149,
64986,
2126,
2523,
497,
259,
11,
2915,
368,
341,
197,
6692,
1669,
54320,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_createBootClone_into_existing_git_repo_fails(t *testing.T) {
log.SetOutput(ioutil.Discard)
bootDir, err := ioutil.TempDir("", "boot-test")
require.NoError(t, err)
defer func() {
_ = os.RemoveAll(bootDir)
}()
factory := cmd_mocks.NewMockFactory()
commonOpts := opts.NewCommonOptionsWithFactory(factory... | explode_data.jsonl/63008 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 337
} | [
2830,
3393,
8657,
17919,
37677,
45514,
62630,
68801,
37784,
761,
6209,
1155,
353,
8840,
836,
8,
341,
6725,
4202,
5097,
1956,
30158,
909,
47560,
340,
197,
4619,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
4619,
16839,
1138,
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,
1... | 1 |
func TestTags_Has(t *testing.T) {
c := NewComment()
c.Tags.Add("wow")
if !c.Tags.Has("wow") {
t.Error("Expected to have the tag \"wow\" but it did not!")
}
if c.Tags.Has("such") {
t.Error("Expected to don't have the tag \"such\" but it did!")
}
} | explode_data.jsonl/58849 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
15930,
2039,
300,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
10677,
741,
1444,
73522,
1904,
445,
57454,
1138,
743,
753,
66,
73522,
16152,
445,
57454,
899,
341,
197,
3244,
6141,
445,
18896,
311,
614,
279,
4772,
7245,
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... | 3 |
func TestAccAWSS3BucketObject_content(t *testing.T) {
var obj s3.GetObjectOutput
resourceName := "aws_s3_bucket_object.object"
rInt := acctest.RandInt()
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSS3Buck... | explode_data.jsonl/64955 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 274
} | [
2830,
3393,
14603,
14419,
1220,
18,
36018,
1190,
7495,
1155,
353,
8840,
836,
8,
341,
2405,
2839,
274,
18,
25618,
5097,
198,
50346,
675,
1669,
330,
8635,
643,
18,
38749,
5314,
6035,
698,
7000,
1072,
1669,
1613,
67880,
2013,
437,
1072,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCancelJobs(t *testing.T) {
ctx := context.Background()
s, err := standard.New(ctx, standard.WithLogLevel(zerolog.Disabled), standard.WithMonitor(&nullmetrics.Service{}))
require.NoError(t, err)
require.NotNil(t, s)
run := 0
runFunc := func(ctx context.Context, data interface{}) {
run++
}
require.No... | explode_data.jsonl/44210 | {
"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,
9269,
40667,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1903,
11,
1848,
1669,
5297,
7121,
7502,
11,
5297,
26124,
72676,
7,
7070,
1609,
89576,
701,
5297,
26124,
30098,
2099,
2921,
43262,
13860,
6257,
1171,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPolicy_String(t *testing.T) {
tests := []struct {
name string
p *Policy
want string
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.p.String(); got != tt.want {
t.Errorf("Policy.String() = %v, want %v", got, tt.want)
}
})
}... | explode_data.jsonl/10346 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 151
} | [
2830,
3393,
13825,
31777,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
3223,
262,
353,
13825,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
322,
5343,
25,
2691,
1273,
5048,
624,
197,
532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestInterpretCharacterLiteralType(t *testing.T) {
t.Parallel()
inter := parseCheckAndInterpret(t, `
fun test(): Type {
let c: Character = "x"
return c.getType()
}
`)
result, err := inter.Invoke("test")
require.NoError(t, err)
require.Equal(t,
interpreter.TypeValue{Type: inte... | explode_data.jsonl/73421 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 151
} | [
2830,
3393,
3306,
8043,
12404,
17350,
929,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
58915,
1669,
4715,
3973,
3036,
3306,
8043,
1155,
11,
22074,
262,
2464,
1273,
4555,
3990,
341,
286,
1077,
272,
25,
15633,
284,
330,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetTracemallocEnabled(t *testing.T) {
// Reset memory counters
helpers.ResetMemoryStats()
code := `assert datadog_agent.tracemalloc_enabled()`
_, err := run(code)
if err != nil {
t.Fatal(err)
}
// Check for leaks
helpers.AssertMemoryUsage(t)
} | explode_data.jsonl/24546 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
1949,
1282,
580,
336,
4742,
5462,
1155,
353,
8840,
836,
8,
341,
197,
322,
16932,
4938,
31532,
198,
197,
21723,
36660,
10642,
16635,
2822,
43343,
1669,
1565,
2207,
3258,
329,
538,
25730,
5427,
580,
336,
4742,
18220,
368,
3989... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPodSpiffeId(t *testing.T) {
for _, testCase := range []struct {
name string
expectedSpiffeID string
configLabel string
podLabel string
configAnnotation string
podAnnotation string
podNamespace string
podServiceAccount string
}{
{
name: ... | explode_data.jsonl/32156 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 864
} | [
2830,
3393,
23527,
6406,
43414,
764,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
54452,
1669,
2088,
3056,
1235,
341,
197,
11609,
1060,
914,
198,
197,
42400,
6406,
43414,
915,
220,
914,
198,
197,
25873,
2476,
981,
914,
198,
197,
3223,
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... | 5 |
func TestIsReportFinished(t *testing.T) {
const (
testNamespace = "default"
testReportName = "test-report"
testQueryName = "test-query"
testReportMessage = "test-message"
)
schedule := &metering.ReportSchedule{
Period: metering.ReportPeriodCron,
Cron: &metering.ReportScheduleCron{Expression... | explode_data.jsonl/8849 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2003
} | [
2830,
3393,
3872,
10361,
24890,
1155,
353,
8840,
836,
8,
341,
4777,
2399,
197,
18185,
22699,
257,
284,
330,
2258,
698,
197,
18185,
10361,
675,
262,
284,
330,
1944,
47411,
698,
197,
18185,
2859,
675,
257,
284,
330,
1944,
65489,
698,
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 TestSeries_Trim(t *testing.T) {
// assert that function returns correctly trimmed series
s := NewSeries("test", "foo ", " BAR", " BaZ ", "march")
assert.Equal(t, NewSeries("TrimSpace(test)", "foo", "BAR", "BaZ", "march"), s.Trim())
} | explode_data.jsonl/54085 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 89
} | [
2830,
3393,
25544,
1139,
6283,
1155,
353,
8840,
836,
8,
341,
197,
322,
2060,
429,
729,
4675,
12440,
50981,
4013,
198,
1903,
1669,
1532,
25544,
445,
1944,
497,
330,
7975,
3670,
330,
44187,
497,
330,
220,
14322,
57,
220,
3670,
330,
76,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDecodeWord(t *testing.T) {
tests := []struct {
src, exp string
hasErr bool
}{
{"=?UTF-8?Q?=C2=A1Hola,_se=C3=B1or!?=", "¡Hola, señor!", false},
{"=?UTF-8?Q?Fran=C3=A7ois-J=C3=A9r=C3=B4me?=", "François-Jérôme", false},
{"=?UTF-8?q?ascii?=", "ascii", false},
{"=?utf-8?B?QW5kcsOp?=", "André", false... | explode_data.jsonl/36204 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 564
} | [
2830,
3393,
32564,
10879,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
41144,
11,
1343,
914,
198,
197,
63255,
7747,
256,
1807,
198,
197,
59403,
197,
197,
4913,
19884,
8561,
12,
23,
30,
48,
59567,
34,
17,
46623,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMVCCStatsDelDelCommitMovesTimestamp(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)
for _, engineImpl := range mvccEngineImpls {
t.Run(engineImpl.name, func(t *testing.T) {
engine := engineImpl.create()
defer engine.Close()
ctx := context.Background()
aggMS := &engin... | explode_data.jsonl/70079 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1926
} | [
2830,
3393,
66626,
3706,
16635,
16532,
16532,
33441,
45789,
20812,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
16867,
1487,
77940,
1155,
568,
7925,
1155,
340,
2023,
8358,
4712,
9673,
1669,
2088,
23164,
638... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStoreDDBError(t *testing.T) {
ddbMock := &mockDynamoDB{}
ddbClient = ddbMock
ddbMock.On("PutItem", mock.Anything).Return(&dynamodb.PutItemOutput{}, errors.New("error"))
assert.Error(t, Store(testAlertDedupEvent))
} | explode_data.jsonl/39034 | {
"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,
6093,
35,
3506,
1454,
1155,
353,
8840,
836,
8,
341,
197,
89723,
11571,
1669,
609,
16712,
35,
85608,
3506,
16094,
197,
89723,
2959,
284,
294,
1999,
11571,
271,
197,
89723,
11571,
8071,
445,
19103,
1234,
497,
7860,
13311,
1596... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEditor_Read(t *testing.T) {
s := "hello world"
buf := make([]byte, len(s))
e := new(Editor)
e.SetText(s)
_, err := e.Seek(0, io.SeekStart)
if err != nil {
t.Error(err)
}
n, err := io.ReadFull(e, buf)
if err != nil {
t.Error(err)
}
if got, want := n, len(s); got != want {
t.Errorf("got %d; wan... | explode_data.jsonl/27270 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 205
} | [
2830,
3393,
9410,
38381,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
330,
14990,
1879,
698,
26398,
1669,
1281,
10556,
3782,
11,
2422,
1141,
1171,
7727,
1669,
501,
87136,
340,
7727,
92259,
1141,
692,
197,
6878,
1848,
1669,
384,
76465,
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... | 5 |
func TestEdgeutilInterpolateAntipodal(t *testing.T) {
p1 := PointFromCoords(0.1, 1e-30, 0.3)
// Test that interpolation on a 180 degree edge (antipodal endpoints) yields
// a result with the correct distance from each endpoint.
for dist := 0.0; dist <= 1.0; dist += 0.125 {
actual := Interpolate(dist, p1, Point{p... | explode_data.jsonl/74790 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 221
} | [
2830,
3393,
11656,
1314,
3306,
45429,
17117,
573,
57597,
1155,
353,
8840,
836,
8,
341,
3223,
16,
1669,
5126,
3830,
34344,
7,
15,
13,
16,
11,
220,
16,
68,
12,
18,
15,
11,
220,
15,
13,
18,
692,
197,
322,
3393,
429,
36487,
389,
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... | 3 |
func TestSetNonce(t *testing.T) {
ms, _ := create()
var addr common.Address
ms.SetNonce(addr, 10)
if ms.GetNonce(addr) != 10 {
t.Error("Expected nonce of 10, got", ms.GetNonce(addr))
}
addr[0] = 1
ms.StateDB.SetNonce(addr, 1)
if ms.GetNonce(addr) != 1 {
t.Error("Expected nonce of 1, got", ms.GetNonce(ad... | explode_data.jsonl/57787 | {
"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,
1649,
90528,
1155,
353,
8840,
836,
8,
341,
47691,
11,
716,
1669,
1855,
2822,
2405,
10789,
4185,
26979,
198,
47691,
4202,
90528,
24497,
11,
220,
16,
15,
692,
743,
9829,
2234,
90528,
24497,
8,
961,
220,
16,
15,
341,
197,
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 TestStringFlagSet(t *testing.T) {
sv := new(StringFlag)
err := sv.Set("foo")
if err != nil {
t.Fatalf("err: %s", err)
}
err = sv.Set("bar")
if err != nil {
t.Fatalf("err: %s", err)
}
expected := []string{"foo", "bar"}
if !reflect.DeepEqual([]string(*sv), expected) {
t.Fatalf("Bad: %#v", sv)
}
} | explode_data.jsonl/6642 | {
"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,
703,
12135,
1649,
1155,
353,
8840,
836,
8,
341,
1903,
85,
1669,
501,
2242,
12135,
340,
9859,
1669,
13559,
4202,
445,
7975,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
615,
25,
1018,
82,
497,
1848,
340,
197,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestPrintStreamInfo(t *testing.T) {
var buf bytes.Buffer
c := New()
c.Verbose = true
c.out = &buf
fakeStreamName := "fake-stream-name"
fakeStreamCreationTimestamp := time.Now()
fakeEncryptionType := "fake-encryption-type"
fakeRetentionPeriodHours := int64(336)
fakeEndingSeqNum := "fake-ending-sequence-nu... | explode_data.jsonl/57241 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 595
} | [
2830,
3393,
8994,
3027,
1731,
1155,
353,
8840,
836,
8,
341,
2405,
6607,
5820,
22622,
198,
1444,
1669,
1532,
741,
1444,
42505,
8297,
284,
830,
198,
1444,
2532,
284,
609,
5909,
271,
1166,
726,
3027,
675,
1669,
330,
30570,
38723,
11494,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAddition(t *testing.T) {
tev, fl := initialize(t)
defer tev.tearDown()
prevHash := fl.lastHash
fl.Append(ledger.CreateNextBlock(fl, []*cb.Envelope{&cb.Envelope{Payload: []byte("My Data")}}))
assert.Equal(t, uint64(2), fl.height, "Block height should be 2")
block, found := fl.readBlock(1)
assert.NotNil(... | explode_data.jsonl/35028 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 185
} | [
2830,
3393,
2212,
680,
1155,
353,
8840,
836,
8,
341,
197,
665,
85,
11,
1320,
1669,
9468,
1155,
340,
16867,
1013,
85,
31853,
59342,
741,
50728,
6370,
1669,
1320,
9110,
6370,
198,
1166,
75,
8982,
7,
50704,
7251,
5847,
4713,
49747,
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 TestIntegLogMetricDeployment_Deploy(t *testing.T) {
var err error
var creds *google.Credentials
var core deploy.Core
core.SolutionSettings.Hosting.ProjectID, creds = itst.GetIntegrationTestsProjectID()
core.Ctx = context.Background()
core.Services.LoggingService, err = logging.NewService(core.Ctx, option.Wit... | explode_data.jsonl/58789 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 898
} | [
2830,
3393,
1072,
791,
2201,
54310,
75286,
90680,
1989,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
2405,
73177,
353,
17485,
727,
15735,
198,
2405,
6200,
10517,
12777,
198,
71882,
808,
3214,
6086,
54097,
30944,
915,
11,
73177,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRoutingHandlerPagination(t *testing.T) {
dc, _ := testdataclient.NewDoc(`
route1: CustomPredicate("custom1") -> "https://route1.example.org";
route2: CustomPredicate("custom2") -> "https://route2.example.org";
catchAll: * -> "https://route.example.org"
`)
cps := []routing.PredicateSpec{&predicate{}, ... | explode_data.jsonl/58585 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 547
} | [
2830,
3393,
24701,
3050,
44265,
1155,
353,
8840,
836,
8,
341,
87249,
11,
716,
1669,
1273,
691,
2972,
7121,
9550,
61528,
197,
7000,
2133,
16,
25,
8406,
36329,
445,
9163,
16,
899,
1464,
330,
2428,
1110,
8966,
16,
7724,
2659,
876,
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... | 5 |
func TestValidateSupplyChainItem(t *testing.T) {
cases := map[string]struct {
Arg SupplyChainItem
Expected string
}{
"empty name": {SupplyChainItem{Name: ""}, "name cannot be empty"},
"material rule": {
SupplyChainItem{
Name: "test",
ExpectedMaterials: [][]string{{"invalid"}}},
... | explode_data.jsonl/51768 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 302
} | [
2830,
3393,
17926,
51296,
18837,
1234,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
2415,
14032,
60,
1235,
341,
197,
197,
2735,
414,
29809,
18837,
1234,
198,
197,
197,
18896,
914,
198,
197,
59403,
197,
197,
1,
3194,
829,
788,
314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRFC1034Label(t *testing.T) {
tests := []struct {
in, want string
}{
{"a", "a"},
{"123", "-23"},
{"a.b.c", "a-b-c"},
{"a-b", "a-b"},
{"a:b", "a-b"},
{"a?b", "a-b"},
{"αβγ", "---"},
{"💩", "--"},
{"My App", "My-App"},
{"...", ""},
{".-.", "--"},
}
for _, tc := range tests {
if got ... | explode_data.jsonl/17101 | {
"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,
64371,
16,
15,
18,
19,
2476,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
17430,
11,
1366,
914,
198,
197,
59403,
197,
197,
4913,
64,
497,
330,
64,
7115,
197,
197,
4913,
16,
17,
18,
497,
6523,
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 Test_metricsForwarder_processReconcileError(t *testing.T) {
nsn := types.NamespacedName{
Namespace: "foo",
Name: "bar",
}
mf := &metricsForwarder{
namespacedName: nsn,
}
mf.initGlobalTags()
tests := []struct {
name string
loadFunc func() (*metricsForwarder, *fakeMetricsForwarder)
err ... | explode_data.jsonl/8873 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1601
} | [
2830,
3393,
37686,
25925,
261,
11305,
693,
40446,
457,
1454,
1155,
353,
8840,
836,
8,
341,
84041,
77,
1669,
4494,
98932,
68552,
675,
515,
197,
90823,
25,
330,
7975,
756,
197,
21297,
25,
414,
330,
2257,
756,
197,
532,
2109,
69,
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 TestParsesATextOnlyTemplate(t *testing.T) {
template, _ := ParseString("it's over 9000", nil)
assert.Equal(t, len(template.Code), 1)
assertLiteral(t, template, 0, "it's over 9000")
} | explode_data.jsonl/42406 | {
"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,
47,
1561,
288,
828,
427,
7308,
7275,
1155,
353,
8840,
836,
8,
341,
22832,
11,
716,
1669,
14775,
703,
445,
275,
594,
916,
220,
24,
15,
15,
15,
497,
2092,
340,
6948,
12808,
1155,
11,
2422,
29963,
20274,
701,
220,
16,
340... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOrdersAdd(t *testing.T) {
OrdersSetup(t)
err := Bot.OrderManager.orderStore.Add(&order.Detail{
Exchange: testExchange,
ID: "TestOrdersAdd",
})
if err != nil {
t.Error(err)
}
err = Bot.OrderManager.orderStore.Add(&order.Detail{
Exchange: "testTest",
ID: "TestOrdersAdd",
})
if err =... | explode_data.jsonl/22035 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 280
} | [
2830,
3393,
24898,
2212,
1155,
353,
8840,
836,
8,
341,
197,
24898,
21821,
1155,
340,
9859,
1669,
23007,
19664,
2043,
14041,
6093,
1904,
2099,
1358,
74396,
515,
197,
197,
31564,
25,
1273,
31564,
345,
197,
29580,
25,
981,
330,
2271,
24898... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDuplicateFields(t *testing.T) {
testCases := []struct {
desc string
fields FieldList
errMsg string // Non-empty if we expect an error
}{
{
desc: "multi string",
fields: FieldList{{Name: "FieldA", Value: "val1"}, {Name: "FieldA", Value: "val2"}, {Name: "FieldA", Value: "val3"}},
},
{
... | explode_data.jsonl/27956 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 511
} | [
2830,
3393,
53979,
8941,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
256,
914,
198,
197,
55276,
8601,
852,
198,
197,
9859,
6611,
914,
442,
11581,
39433,
421,
582,
1720,
458,
1465,
198,
197,
59403,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestTransportPersistConnContextLeakMaxConnsPerHost(t *testing.T) {
defer afterTest(t)
ts := httptest.NewServer(HandlerFunc(func(w ResponseWriter, r *Request) {
runtime.Gosched()
w.WriteHeader(StatusOK)
}))
defer ts.Close()
c := ts.Client()
c.Transport.(*Transport).MaxConnsPerHost = 1
ctx := context.B... | explode_data.jsonl/14097 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 505
} | [
2830,
3393,
27560,
61267,
9701,
1972,
2304,
585,
5974,
1109,
4412,
3889,
9296,
1155,
353,
8840,
836,
8,
341,
16867,
1283,
2271,
1155,
692,
57441,
1669,
54320,
70334,
7121,
5475,
7,
3050,
9626,
18552,
3622,
5949,
6492,
11,
435,
353,
1900... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestResourceMetricsSlice_RemoveIf(t *testing.T) {
// Test RemoveIf on empty slice
emptySlice := NewResourceMetricsSlice()
emptySlice.RemoveIf(func(el ResourceMetrics) bool {
t.Fail()
return false
})
// Test RemoveIf
filtered := generateTestResourceMetricsSlice()
pos := 0
filtered.RemoveIf(func(el Reso... | explode_data.jsonl/32668 | {
"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,
4783,
27328,
33236,
66843,
2679,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
10783,
2679,
389,
4287,
15983,
198,
197,
3194,
33236,
1669,
1532,
4783,
27328,
33236,
741,
197,
3194,
33236,
13270,
2679,
18552,
18584,
11765,
2732... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_GetAdd_Consistency(t *testing.T) {
rand.Seed(time.Now().UnixNano())
var expects []int
for i := 0; i < 100000; i++ {
expects = append(expects, rand.Intn(100000000))
}
encoder := NewFixedOffsetEncoder()
encoder.FromValues(expects)
decoder := NewFixedOffsetDecoder(encoder.MarshalBinary())
for i := 0; ... | explode_data.jsonl/13584 | {
"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,
13614,
2212,
920,
2382,
47094,
1155,
353,
8840,
836,
8,
341,
7000,
437,
5732,
291,
9730,
13244,
1005,
55832,
83819,
2398,
2405,
24297,
3056,
396,
198,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
15,
15,
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... | 3 |
func TestStartServerTLSVersion(t *testing.T) {
s, err := NewServer()
require.NoError(t, err)
testDir, _ := fileutils.FindDir("tests")
s.UpdateConfig(func(cfg *model.Config) {
*cfg.ServiceSettings.ListenAddress = ":0"
*cfg.ServiceSettings.ConnectionSecurity = "TLS"
*cfg.ServiceSettings.TLSMinVer = "1.2"
*cf... | explode_data.jsonl/47830 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 501
} | [
2830,
3393,
3479,
5475,
45439,
5637,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
1532,
5475,
741,
17957,
35699,
1155,
11,
1848,
692,
18185,
6184,
11,
716,
1669,
1034,
6031,
9998,
6184,
445,
23841,
1138,
1903,
16689,
2648,
18552,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_builder_RESTConfig(t *testing.T) {
cases := []struct {
name string
overrideURL string
overrideActive bool
usePrimary bool
useSecondary bool
expectedHost string
}{
{
name: "no override",
expectedHost: apiURL,
},
{
name: "no override, use primary... | explode_data.jsonl/35044 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 922
} | [
2830,
3393,
28532,
55133,
2648,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
1843,
914,
198,
197,
50284,
3144,
262,
914,
198,
197,
50284,
5728,
1807,
198,
197,
41819,
15972,
257,
1807,
198,
197,
41819,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInterpreterPartition(t *testing.T) {
s, err := parseFile("src/parse/asp/test_data/interpreter/partition.build")
assert.NoError(t, err)
assert.EqualValues(t, "27", s.Lookup("major"))
assert.EqualValues(t, ".0.", s.Lookup("mid"))
assert.EqualValues(t, "3", s.Lookup("minor"))
assert.EqualValues(t, "begin ",... | explode_data.jsonl/81078 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 179
} | [
2830,
3393,
58426,
49978,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
4715,
1703,
445,
3548,
14,
6400,
14,
13367,
12697,
1769,
14,
90554,
48981,
680,
13239,
1138,
6948,
35699,
1155,
11,
1848,
340,
6948,
12808,
6227,
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 TestNewControllerForAllInOneAsDefault(t *testing.T) {
jaeger := v1.NewJaeger(types.NamespacedName{Name: "my-instance"})
ctrl := For(context.TODO(), jaeger)
assert.Equal(t, ctrl.Type(), v1.DeploymentStrategyAllInOne)
} | explode_data.jsonl/21841 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 89
} | [
2830,
3393,
3564,
2051,
2461,
2403,
641,
3966,
2121,
3675,
1155,
353,
8840,
836,
8,
341,
197,
5580,
1878,
1669,
348,
16,
7121,
52445,
1878,
52613,
98932,
68552,
675,
63121,
25,
330,
2408,
73655,
1,
8824,
84381,
1669,
1752,
5378,
90988,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestCache_concurrent(t *testing.T) {
testCache := &cache{}
hosts := map[string]string{
dns.Fqdn("yandex.com"): "213.180.204.62",
dns.Fqdn("google.com"): "8.8.8.8",
dns.Fqdn("www.google.com"): "8.8.4.4",
dns.Fqdn("youtube.com"): "173.194.221.198",
dns.Fqdn("car.ru"): "37.220.161.35",... | explode_data.jsonl/18908 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 275
} | [
2830,
3393,
8233,
3382,
3231,
1155,
353,
8840,
836,
8,
341,
18185,
8233,
1669,
609,
9360,
31483,
197,
44692,
1669,
2415,
14032,
30953,
515,
197,
2698,
4412,
991,
80,
17395,
445,
88,
44526,
905,
37051,
257,
330,
17,
16,
18,
13,
16,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDialWithBlockErrorOnNonTemporaryErrorDialer(t *testing.T) {
ctx, _ := context.WithTimeout(context.Background(), 100*time.Millisecond)
if _, err := DialContext(ctx, "", WithInsecure(), WithDialer(nonTemporaryErrorDialer), WithBlock(), FailOnNonTempDialError(true)); err != nonTemporaryError {
t.Fatalf("Dial(... | explode_data.jsonl/6668 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 234
} | [
2830,
3393,
35,
530,
2354,
4713,
1454,
1925,
8121,
59362,
1454,
35,
530,
261,
1155,
353,
8840,
836,
8,
341,
20985,
11,
716,
1669,
2266,
26124,
7636,
5378,
19047,
1507,
220,
16,
15,
15,
77053,
71482,
340,
743,
8358,
1848,
1669,
66155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewFsSource(t *testing.T) {
fsys := os.DirFS("test")
source, err := NewFsSource(fsys, "sample-migrations")
if err != nil {
t.Fatalf("unable to setup source: %v", err)
}
defer source.Close()
} | explode_data.jsonl/81877 | {
"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,
3564,
48300,
3608,
1155,
353,
8840,
836,
8,
341,
1166,
7791,
1669,
2643,
83757,
8485,
445,
1944,
1138,
47418,
11,
1848,
1669,
1532,
48300,
3608,
955,
7791,
11,
330,
13611,
1448,
17824,
1138,
743,
1848,
961,
2092,
341,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestDecimalDiv(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustQuery("select cast(1 as decimal(60,30)) / cast(1 as decimal(60,30)) / cast(1 as decimal(60, 30))").Check(testkit.Rows("1.000000000000000000000000000000"))
tk.MustQuery("select cas... | explode_data.jsonl/65469 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 248
} | [
2830,
3393,
11269,
12509,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50463,
2859,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPlayerAlive(t *testing.T) {
pl := newPlayer(0)
pl.Entity = entityWithProperty("m_iHealth", st.PropertyValue{IntVal: 100})
assert.Equal(t, true, pl.IsAlive(), "Should be alive")
pl.Entity = entityWithProperty("m_iHealth", st.PropertyValue{IntVal: 1})
assert.Equal(t, true, pl.IsAlive(), "Should be alive")... | explode_data.jsonl/12163 | {
"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,
4476,
32637,
1155,
353,
8840,
836,
8,
341,
72213,
1669,
501,
4476,
7,
15,
692,
72213,
9899,
284,
5387,
2354,
3052,
445,
76,
5318,
14542,
497,
357,
15727,
1130,
90,
1072,
2208,
25,
220,
16,
15,
15,
3518,
6948,
12808,
1155... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPeerHeapOrdering(t *testing.T) {
p1 := &peerScore{score: 1}
p2 := &peerScore{score: 2}
p3 := &peerScore{score: 3}
// same score as p3, but always pushed after p3, so it will be returned last.
p4 := &peerScore{score: 3}
want := []*peerScore{p1, p2, p3, p4}
tests := [][]*peerScore{
{p1, p2, p3, p4},
... | explode_data.jsonl/11673 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 265
} | [
2830,
3393,
30888,
27909,
4431,
287,
1155,
353,
8840,
836,
8,
341,
3223,
16,
1669,
609,
16537,
10570,
90,
12338,
25,
220,
16,
532,
3223,
17,
1669,
609,
16537,
10570,
90,
12338,
25,
220,
17,
532,
3223,
18,
1669,
609,
16537,
10570,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestPadHeaders(t *testing.T) {
check := func(h http.Header, limit uint32, fillerLen int) {
if h == nil {
h = make(http.Header)
}
filler := strings.Repeat("f", fillerLen)
padHeaders(t, h, uint64(limit), filler)
gotSize := headerListSize(h)
if gotSize != limit {
t.Errorf("Got size = %v; want %v", ... | explode_data.jsonl/16106 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 563
} | [
2830,
3393,
13731,
10574,
1155,
353,
8840,
836,
8,
341,
25157,
1669,
2915,
3203,
1758,
15753,
11,
3930,
2622,
18,
17,
11,
54710,
11271,
526,
8,
341,
197,
743,
305,
621,
2092,
341,
298,
9598,
284,
1281,
19886,
15753,
340,
197,
197,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestAccAzureRMLoadBalancerNatRule_zeroPortNumber(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_lb_nat_rule", "test")
r := LoadBalancerNatRule{}
data.ResourceTest(t, r, []acceptance.TestStep{
{
Config: r.zeroPortNumber(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.Res... | explode_data.jsonl/29074 | {
"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,
14603,
78107,
49,
2668,
2731,
93825,
65214,
11337,
19359,
7084,
2833,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
25505,
25212,
83920,
1155,
11,
330,
1370,
324,
4195,
63601,
38169,
21124,
497,
330,
1944,
1138,
7000,
1669,
8893,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNonexistentSubcommand(t *testing.T) {
var args struct {
sub *struct{} `arg:"subcommand"`
}
p, err := NewParser(Config{}, &args)
require.NoError(t, err)
var b bytes.Buffer
err = p.WriteUsageForSubcommand(&b, "does_not_exist")
assert.Error(t, err)
err = p.WriteHelpForSubcommand(&b, "does_not_exist")... | explode_data.jsonl/20498 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 269
} | [
2830,
3393,
8121,
64085,
3136,
5631,
1155,
353,
8840,
836,
8,
341,
2405,
2827,
2036,
341,
197,
28624,
353,
1235,
6257,
1565,
858,
2974,
1966,
5631,
8805,
197,
532,
3223,
11,
1848,
1669,
1532,
6570,
33687,
22655,
609,
2116,
340,
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,
1... | 1 |
func TestServer_Request_Get_Host(t *testing.T) {
const host = "example.com"
testServerRequest(t, func(st *serverTester) {
st.writeHeaders(HeadersFrameParam{
StreamID: 1, // clients send odd numbers
BlockFragment: st.encodeHeader(":authority", "", "host", host),
EndStream: true,
EndHeaders: t... | explode_data.jsonl/71614 | {
"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,
5475,
44024,
13614,
2039,
535,
1155,
353,
8840,
836,
8,
341,
4777,
3468,
284,
330,
8687,
905,
698,
18185,
5475,
1900,
1155,
11,
2915,
5895,
353,
4030,
58699,
8,
341,
197,
18388,
3836,
10574,
7,
10574,
4369,
2001,
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... | 1 |
func TestWorld_ColorAt(t *testing.T) {
w := NewDefaultWorld()
r := algebra.NewRay(0, 0, -5, 0, 1, 0)
c := w.ColorAt(r, 0)
res := 0.0
if !equals(c.Red(), res) {
t.Errorf("Expected %f, Got %f", res, c.Red())
}
if !equals(c.Green(), res) {
t.Errorf("Expected %f, Got %f", res, c.Green())
}
if !equals(c.Blue(),... | explode_data.jsonl/27652 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 801
} | [
2830,
3393,
10134,
43387,
1655,
1155,
353,
8840,
836,
8,
341,
6692,
1669,
1532,
3675,
10134,
741,
7000,
1669,
46876,
7121,
29187,
7,
15,
11,
220,
15,
11,
481,
20,
11,
220,
15,
11,
220,
16,
11,
220,
15,
340,
1444,
1669,
289,
6669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClient_Coins(t *testing.T) {
cs, err := client.CoinsList(CoinsParams{})
require.NoError(t, err)
require.NotEmpty(t, cs)
require.NotEmpty(t, cs[0].Id)
require.NotEmpty(t, cs[0].Symbol)
require.NotEmpty(t, cs[0].Name)
} | explode_data.jsonl/37789 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
2959,
920,
68798,
1155,
353,
8840,
836,
8,
341,
71899,
11,
1848,
1669,
2943,
52114,
1330,
852,
3025,
68798,
4870,
37790,
17957,
35699,
1155,
11,
1848,
340,
17957,
15000,
3522,
1155,
11,
10532,
340,
17957,
15000,
3522,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTxOut_IsEqual(t *testing.T) {
script := script.NewScriptRaw([]byte{opcodes.OP_RETURN, 0x01, 0x01})
txout := NewTxOut(9, script)
txout2 := NewTxOut(9, script)
assert.True(t, txout.IsEqual(txout2))
txout2.value = 8
assert.False(t, txout.IsEqual(txout2))
} | explode_data.jsonl/38887 | {
"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,
31584,
2662,
31879,
2993,
1155,
353,
8840,
836,
8,
341,
86956,
1669,
5316,
7121,
5910,
20015,
10556,
3782,
90,
453,
25814,
81563,
21909,
11,
220,
15,
87,
15,
16,
11,
220,
15,
87,
15,
16,
3518,
46237,
411,
1669,
1532,
315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestThingID(t *testing.T) {
thingCache := redis.NewThingCache(redisClient)
key, err := uuid.New().ID()
require.Nil(t, err, fmt.Sprintf("got unexpected error: %s", err))
id := "123"
err = thingCache.Save(context.Background(), key, id)
require.Nil(t, err, fmt.Sprintf("Save thing to cache: expected nil got %s"... | explode_data.jsonl/44673 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 367
} | [
2830,
3393,
52940,
915,
1155,
353,
8840,
836,
8,
341,
197,
1596,
8233,
1669,
20870,
7121,
52940,
8233,
97676,
2959,
692,
23634,
11,
1848,
1669,
16040,
7121,
1005,
915,
741,
17957,
59678,
1155,
11,
1848,
11,
8879,
17305,
445,
22390,
1650... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFillSmallerStruct(t *testing.T) {
user := User{Name: "SmallerUser", Age: 100}
DB.Save(&user)
type SimpleUser struct {
ID int64
Name string
UpdatedAt time.Time
CreatedAt time.Time
}
var simpleUser SimpleUser
if err := DB.Table("users").Where("name = ?", user.Name).First(&simpleUser).E... | explode_data.jsonl/48701 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 767
} | [
2830,
3393,
14449,
10673,
13956,
9422,
1155,
353,
8840,
836,
8,
341,
19060,
1669,
2657,
63121,
25,
330,
10673,
13956,
1474,
497,
13081,
25,
220,
16,
15,
15,
532,
45409,
13599,
2099,
872,
340,
13158,
8993,
1474,
2036,
341,
197,
29580,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFilteringServerGetSrvKeyspaceErrorPassthrough(t *testing.T) {
wantErr := fmt.Errorf("some error")
_, mock, f := newFiltering(stockFilters)
mock.SrvKeyspace = stockKeyspaces["bar"]
mock.SrvKeyspaceError = wantErr
doTestGetSrvKeyspace(t, f, "badcell", "bar", stockKeyspaces["bar"], wantErr)
} | explode_data.jsonl/2380 | {
"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,
5632,
287,
5475,
1949,
50,
10553,
8850,
1306,
1454,
70911,
86901,
1155,
353,
8840,
836,
8,
341,
50780,
7747,
1669,
8879,
13080,
445,
14689,
1465,
1138,
197,
6878,
7860,
11,
282,
1669,
501,
5632,
287,
67471,
28351,
340,
77333... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test1000(t *testing.T) {
s, c := makeTestServer()
defer s.Shutdown()
for i := int64(0); i < 5000; i++ {
filename := fmt.Sprintf("length-%d-bytes-%d", i, time.Now().UnixNano())
rf, err := c.Send(filename, "octet")
if err != nil {
t.Fatalf("requesting %s write: %v", filename, err)
}
r := io.LimitRead... | explode_data.jsonl/17547 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 242
} | [
2830,
3393,
16,
15,
15,
15,
1155,
353,
8840,
836,
8,
341,
1903,
11,
272,
1669,
1281,
2271,
5475,
741,
16867,
274,
10849,
18452,
741,
2023,
600,
1669,
526,
21,
19,
7,
15,
1215,
600,
366,
220,
20,
15,
15,
15,
26,
600,
1027,
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... | 5 |
func TestRangeCacheAssumptions(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)
expKeyMin := keys.RangeMetaKey(keys.RangeMetaKey(keys.RangeMetaKey(roachpb.RKey("test"))))
if !bytes.Equal(expKeyMin, roachpb.RKeyMin) {
t.Fatalf("RangeCache relies on RangeMetaKey returning KeyMin after two l... | explode_data.jsonl/28182 | {
"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,
6046,
8233,
5615,
372,
1300,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
16867,
1487,
77940,
1155,
568,
7925,
1155,
340,
48558,
1592,
6217,
1669,
6894,
24783,
12175,
1592,
36131,
24783,
12175,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGrant_String(t *testing.T) {
v := Grant{
ID: Int64(0),
URL: String(""),
App: &AuthorizationApp{},
CreatedAt: &Timestamp{},
UpdatedAt: &Timestamp{},
}
want := `github.Grant{ID:0, URL:"", App:github.AuthorizationApp{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Upd... | explode_data.jsonl/33244 | {
"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,
67971,
31777,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
23736,
515,
197,
29580,
25,
286,
1333,
21,
19,
7,
15,
1326,
197,
79055,
25,
981,
923,
445,
4461,
197,
59557,
25,
981,
609,
18124,
2164,
38837,
197,
84062,
1655,
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... | 2 |
func TestServeHTTP(t *testing.T) {
describeTests("Test ServeHTTP method")
router := Router{}
testMatchesRoot(router, t)
testMatchesLongPath(router, t)
testMatchesPathParam(router, t)
testDefaultNotFound(router, t)
testCustomNotFound(router, t)
} | explode_data.jsonl/34493 | {
"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,
60421,
9230,
1155,
353,
8840,
836,
8,
341,
82860,
18200,
445,
2271,
52932,
9230,
1714,
5130,
67009,
1669,
10554,
31483,
18185,
42470,
8439,
61210,
11,
259,
340,
18185,
42470,
6583,
1820,
61210,
11,
259,
340,
18185,
42470,
9349... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestUpstreamHeadersUpdate(t *testing.T) {
log.SetOutput(ioutil.Discard)
defer log.SetOutput(os.Stderr)
var actualHeaders http.Header
var actualHost string
backend := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello, client"))
actualHeaders = r.Heade... | explode_data.jsonl/64236 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 748
} | [
2830,
3393,
2324,
4027,
10574,
4289,
1155,
353,
8840,
836,
8,
341,
6725,
4202,
5097,
1956,
30158,
909,
47560,
340,
16867,
1487,
4202,
5097,
9638,
77319,
692,
2405,
5042,
10574,
1758,
15753,
198,
2405,
5042,
9296,
914,
198,
197,
20942,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEvalGetProvider(t *testing.T) {
var actual providers.Interface
n := &EvalGetProvider{
Addr: addrs.RootModuleInstance.ProviderConfigDefault("foo"),
Output: &actual,
}
provider := &MockProvider{}
ctx := &MockEvalContext{ProviderProvider: provider}
if _, err := n.Eval(ctx); err != nil {
t.Fatalf("er... | explode_data.jsonl/3216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 223
} | [
2830,
3393,
54469,
1949,
5179,
1155,
353,
8840,
836,
8,
341,
2405,
5042,
12565,
41065,
198,
9038,
1669,
609,
54469,
1949,
5179,
515,
197,
197,
13986,
25,
256,
912,
5428,
45345,
3332,
2523,
36208,
2648,
3675,
445,
7975,
4461,
197,
80487,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPulsar(t *testing.T) {
cli, err := pulsar.NewClient(pulsar.ClientOptions{
URL: "pulsar://127.0.0.1:6650",
})
if err != nil {
fmt.Println("err:", err)
t.Fail()
return
}
defer cli.Close()
// producer
pro, err := producer.NewPulsarProducer("demo", cli)
if err != nil || pro == nil {
fmt.Println("... | explode_data.jsonl/57993 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 379
} | [
2830,
3393,
47,
14295,
277,
1155,
353,
8840,
836,
8,
341,
86448,
11,
1848,
1669,
54937,
277,
7121,
2959,
1295,
14295,
277,
11716,
3798,
515,
197,
79055,
25,
330,
79,
14295,
277,
1110,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestValidatorQuery(t *testing.T) {
cleanup, valPubKeys, operAddrs, port := InitializeTestLCD(t, 1, []sdk.AccAddress{}, true)
defer cleanup()
require.Equal(t, 1, len(valPubKeys))
require.Equal(t, 1, len(operAddrs))
validator := getValidator(t, port, operAddrs[0])
require.Equal(t, validator.OperatorAddress, o... | explode_data.jsonl/25409 | {
"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,
14256,
2859,
1155,
353,
8840,
836,
8,
341,
1444,
60639,
11,
1044,
29162,
8850,
11,
1997,
2212,
5428,
11,
2635,
1669,
9008,
2271,
64003,
1155,
11,
220,
16,
11,
3056,
51295,
77538,
4286,
22655,
830,
340,
16867,
21290,
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... | 1 |
func TestPatchRequest(t *testing.T) {
setupServer()
defer teardownServer()
setupDefaultMux(`"body"`)
var req = URL("http://example.com/url")
if err := req.Patch(); err != nil {
t.Error(err)
}
assertTextualBody(t, `"body"`, req.Response.Body)
assertMethod(t, "PATCH", req.Request.Method)
} | explode_data.jsonl/24761 | {
"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,
43622,
1900,
1155,
353,
8840,
836,
8,
341,
84571,
5475,
741,
16867,
49304,
5475,
741,
84571,
3675,
44,
2200,
5809,
1,
2599,
39917,
692,
2405,
4232,
284,
5548,
445,
1254,
1110,
8687,
905,
57254,
5130,
743,
1848,
1669,
4232,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMarshal(t *testing.T) {
md := &etcdraft.Metadata{
Consenters: []*etcdraft.Consenter{
{
Host: "node-1.example.com",
Port: 7050,
ClientTlsCert: []byte("testdata/tls-client-1.pem"),
ServerTlsCert: []byte("testdata/tls-server-1.pem"),
},
{
Host: "node-2.ex... | explode_data.jsonl/12940 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 605
} | [
2830,
3393,
55438,
1155,
353,
8840,
836,
8,
341,
84374,
1669,
609,
295,
4385,
2944,
46475,
515,
197,
197,
15220,
306,
388,
25,
29838,
295,
4385,
2944,
94594,
1950,
515,
298,
197,
515,
571,
197,
9296,
25,
688,
330,
3509,
12,
16,
7724... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPersistRevisionHistory(t *testing.T) {
app := newFakeApp()
app.Status.OperationState = nil
app.Status.History = nil
defaultProject := &v1alpha1.AppProject{
ObjectMeta: v1.ObjectMeta{
Namespace: test.FakeArgoCDNamespace,
Name: "default",
},
}
data := fakeData{
apps: []runtime.Object{app,... | explode_data.jsonl/56513 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 481
} | [
2830,
3393,
61267,
33602,
13424,
1155,
353,
8840,
836,
8,
341,
28236,
1669,
501,
52317,
2164,
741,
28236,
10538,
56297,
1397,
284,
2092,
198,
28236,
10538,
3839,
2579,
284,
2092,
271,
11940,
7849,
1669,
609,
85,
16,
7141,
16,
5105,
7849... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_WorkspaceCapping_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
t.Parallel()
parameters := gopter.DefaultTestParameters()
parameters.MaxSize = 10
properties := gopter.NewProperties(parameters)
properties.Property(
"Round trip from WorkspaceCapping to WorkspaceCapping via AssignProperties... | explode_data.jsonl/43366 | {
"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,
87471,
8746,
34,
3629,
62,
4498,
7903,
61941,
2568,
795,
21884,
1690,
26040,
39838,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
67543,
1669,
728,
73137,
13275,
2271,
9706,
741,
67543,
14535,
1695,
284,
220,
16,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestToken_lexString(t *testing.T) {
tests := []struct {
string bool
value string
}{
{
string: false,
value: "a",
},
{
string: true,
value: "'abc'",
},
{
string: true,
value: "'a b'",
},
{
string: true,
value: "'a' ",
},
{
string: true,
value: "'a '' b'",
... | explode_data.jsonl/60000 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 376
} | [
2830,
3393,
3323,
74547,
703,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11357,
1807,
198,
197,
16309,
220,
914,
198,
197,
59403,
197,
197,
515,
298,
11357,
25,
895,
345,
298,
16309,
25,
220,
330,
64,
756,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestCancelled(t *testing.T) {
testutils.WithTestServer(t, nil, func(t testing.TB, ts *testutils.TestServer) {
ts.Register(raw.Wrap(newTestHandler(t)), "echo")
ctx, cancel := NewContext(time.Second)
// Make a call first to make sure we have a connection.
// We want to test the BeginCall path.
_, _, _, e... | explode_data.jsonl/78182 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 261
} | [
2830,
3393,
39473,
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,
57441,
19983,
22460,
38968,
1755,
2271,
3050,
1155,
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 TestPAC_SignatureData_Unmarshal_KDC_Signature(t *testing.T) {
t.Parallel()
b, err := hex.DecodeString(testdata.MarshaledPAC_KDC_Signature)
if err != nil {
t.Fatal("Could not decode test data hex string")
}
var k SignatureData
bz, err := k.Unmarshal(b)
if err != nil {
t.Fatalf("Error unmarshaling test da... | explode_data.jsonl/60579 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 315
} | [
2830,
3393,
47,
1706,
1098,
622,
1568,
1043,
40687,
27121,
10102,
5626,
1098,
622,
1568,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2233,
11,
1848,
1669,
12371,
56372,
703,
8623,
691,
83691,
75303,
47,
1706,
10102,
5626,
1098... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReserve(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
MockReserveResponse(t)
err := volumeactions.Reserve(client.ServiceClient(), "cd281d77-8217-4830-be95-9528227c105c").ExtractErr()
th.AssertNoErr(t, err)
} | explode_data.jsonl/20628 | {
"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,
1061,
5852,
1155,
353,
8840,
836,
8,
341,
70479,
39820,
9230,
741,
16867,
270,
94849,
37496,
9230,
2822,
9209,
1176,
1061,
5852,
2582,
1155,
692,
9859,
1669,
8123,
4020,
8377,
5852,
12805,
13860,
2959,
1507,
330,
4385,
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... | 1 |
func TestIssue1101(t *testing.T) {
// If a breakpoint is hit close to process death on a thread that isn't the
// group leader the process could die while we are trying to stop it.
//
// This can be easily reproduced by having the goroutine that's executing
// main.main (which will almost always run on the thread ... | explode_data.jsonl/56303 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 630
} | [
2830,
3393,
42006,
16,
16,
15,
16,
1155,
353,
8840,
836,
8,
341,
197,
322,
1416,
264,
52745,
374,
4201,
3265,
311,
1882,
4545,
389,
264,
4516,
429,
4436,
944,
279,
198,
197,
322,
1874,
7653,
279,
1882,
1410,
2746,
1393,
582,
525,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPropertyAs(t *testing.T) {
// GIVEN
graphName := "mygraph"
g := NewGraph(graphName)
require.NotNil(t, g)
v := NewVertexG(g)
require.NotNil(t, v)
p := NewPropertyV(v)
require.NotNil(t, p)
label := "label1"
// WHEN
p = p.As(label)
// THEN
assert.NotNil(t, p)
assert.Equal(t, fmt.Sprintf("%s.as(\"... | explode_data.jsonl/38220 | {
"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,
3052,
2121,
1155,
353,
8840,
836,
8,
1476,
197,
322,
89836,
198,
66616,
675,
1669,
330,
2408,
4439,
698,
3174,
1669,
1532,
11212,
24312,
675,
340,
17957,
93882,
1155,
11,
342,
340,
5195,
1669,
1532,
8320,
38,
3268,
340,
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 TestAllChains(t *testing.T) {
tc := SetupTest(t, "test_all_chains", 1)
defer tc.Cleanup()
var testList TestList
err := json.Unmarshal([]byte(testvectors.ChainTests), &testList)
require.NoError(t, err, "failed to unmarshal the chain tests")
// Always do the tests in alphabetical order.
testNames := []string... | explode_data.jsonl/60508 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 223
} | [
2830,
3393,
2403,
1143,
1735,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
18626,
2271,
1155,
11,
330,
1944,
5705,
4138,
1735,
497,
220,
16,
340,
16867,
17130,
727,
60639,
2822,
2405,
1273,
852,
3393,
852,
198,
9859,
1669,
2951,
38097,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMoveTable(t *testing.T) {
t.Parallel()
ctrl := gomock.NewController(t)
mo := mock_owner.NewMockOwner(ctrl)
cp := capture.NewCapture4Test(mo)
router := newRouter(cp, newStatusProvider())
// test move table succeeded
data := struct {
CaptureID string `json:"capture_id"`
TableID int64 `json:"table... | explode_data.jsonl/75117 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1108
} | [
2830,
3393,
9860,
2556,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
2109,
78,
1669,
7860,
29027,
7121,
11571,
13801,
62100,
340,
52018,
1669,
12322,
7121,
27429,
19,
2271,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPublishWithSourceIdInHeader(t *testing.T) {
subject := buildDefaultTestSubject()
requestPayload := buildDefaultTestPayloadWithoutSourceId()
sub, _ := sc.Subscribe(subject, func(m *stan.Msg) {
msg = m
})
responseBody, statusCode := performPublishRequestWithHeaders(t, publishServer.URL, requestPayload, ma... | explode_data.jsonl/74407 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 139
} | [
2830,
3393,
50145,
2354,
3608,
764,
641,
4047,
1155,
353,
8840,
836,
8,
341,
28624,
583,
1669,
1936,
3675,
2271,
13019,
741,
23555,
29683,
1669,
1936,
3675,
2271,
29683,
26040,
3608,
764,
741,
28624,
11,
716,
1669,
1136,
82628,
29128,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHeaderProviderDoCommand(t *testing.T) {
th := Setup().InitBasic()
defer th.TearDown()
hp := HeaderProvider{}
args := &model.CommandArgs{
T: func(s string, args ...interface{}) string { return s },
ChannelId: th.BasicChannel.Id,
Session: model.Session{UserId: th.BasicUser.Id, TeamMembers: [... | explode_data.jsonl/33539 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 241
} | [
2830,
3393,
4047,
5179,
5404,
4062,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
9598,
79,
1669,
12104,
5179,
16094,
31215,
1669,
609,
2528,
12714,
4117,
515,
197,
10261,
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 TestHandshakeServerALPNNotConfigured(t *testing.T) {
config := testConfig.Clone()
config.NextProtos = nil
test := &serverTest{
name: "ALPN-NotConfigured",
// Note that this needs OpenSSL 1.0.2 because that is the first
// version that supports the -alpn flag.
command: []string{"openssl", "s_client", "-... | explode_data.jsonl/36338 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 274
} | [
2830,
3393,
2314,
29661,
5475,
969,
17896,
2623,
2648,
3073,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
1273,
2648,
64463,
741,
25873,
18501,
12423,
436,
284,
2092,
271,
18185,
1669,
609,
4030,
2271,
515,
197,
11609,
25,
330,
969,
17896... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRowTableUpdateGeomUpdateStyle(t *testing.T) {
map_dao := &TableRowUpdateGeomImpl{&DaoImpl{}, "unknown", false, false, false}
service := service.MakeTableRowService(map_dao)
uri_params := map[string]string{"id": "1", "table_id": "1"}
values := url.Values{}
values.Set("column", "the_geom")
values.Set("valu... | explode_data.jsonl/15445 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 417
} | [
2830,
3393,
3102,
2556,
4289,
78708,
4289,
2323,
1155,
353,
8840,
836,
8,
341,
19567,
814,
3441,
1669,
609,
38558,
4289,
78708,
9673,
90,
5,
12197,
9673,
22655,
330,
16088,
497,
895,
11,
895,
11,
895,
532,
52934,
1669,
2473,
50133,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestMixer(t *testing.T) {
input := []wave.Audio{
&wave.Int16Interleaved{
Size: wave.ChunkInfo{Len: 1, Channels: 2, SamplingRate: 1234},
Data: []int16{1, 3},
},
&wave.Int16Interleaved{
Size: wave.ChunkInfo{Len: 3, Channels: 2, SamplingRate: 1234},
Data: []int16{2, 4, 3, 5, 4, 6},
},
}
expecte... | explode_data.jsonl/59086 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 519
} | [
2830,
3393,
44,
39014,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
3056,
30398,
51511,
515,
197,
197,
5,
30398,
7371,
16,
21,
3306,
273,
4141,
515,
298,
91224,
25,
12060,
6353,
3122,
1731,
90,
11271,
25,
220,
16,
11,
62900,
25,
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 TestMessage(t *testing.T) {
t.Run("Body", func(t *testing.T) {
tests := map[gitdomain.Message]string{
"hello": "",
"hello\n": "",
"hello\n\n": "",
"hello\nworld": "world",
"hello\n\nworld": "world",
"hello\n\nworld\nfoo": "world\nfoo"... | explode_data.jsonl/8522 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 277
} | [
2830,
3393,
2052,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5444,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
78216,
1669,
2415,
58,
12882,
12204,
8472,
30953,
515,
298,
197,
1,
14990,
788,
338,
8324,
298,
197,
1,
14990,
169... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDefaultEnv(t *testing.T) {
cases := []struct {
name string
c corev1.Container
env map[string]string
expected corev1.Container
}{
{
name: "nothing set works",
},
{
name: "add env",
env: map[string]string{
"hello": "world",
},
expected: corev1.Container{
Env... | explode_data.jsonl/78931 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 536
} | [
2830,
3393,
3675,
14359,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
1444,
286,
6200,
85,
16,
33672,
198,
197,
57538,
414,
2415,
14032,
30953,
198,
197,
42400,
6200,
85,
16,
33672,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQueuedRetry_DropOnNoRetry(t *testing.T) {
qCfg := CreateDefaultQueueSettings()
rCfg := CreateDefaultRetrySettings()
rCfg.Enabled = false
be := newBaseExporter(defaultExporterCfg, zap.NewNop(), WithRetry(rCfg), WithQueue(qCfg))
ocs := newObservabilityConsumerSender(be.qrSender.consumerSender)
be.qrSender.... | explode_data.jsonl/46005 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 368
} | [
2830,
3393,
25776,
3260,
51560,
1557,
887,
1925,
2753,
51560,
1155,
353,
8840,
836,
8,
341,
18534,
42467,
1669,
4230,
3675,
7554,
6086,
741,
7000,
42467,
1669,
4230,
3675,
51560,
6086,
741,
7000,
42467,
13690,
284,
895,
198,
73142,
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 TestTerragruntBeforeHook(t *testing.T) {
t.Parallel()
cleanupTerraformFolder(t, TEST_FIXTURE_HOOKS_BEFORE_ONLY_PATH)
tmpEnvPath := copyEnvironment(t, TEST_FIXTURE_HOOKS_BEFORE_ONLY_PATH)
rootPath := util.JoinPath(tmpEnvPath, TEST_FIXTURE_HOOKS_BEFORE_ONLY_PATH)
runTerragrunt(t, fmt.Sprintf("terragrunt apply... | explode_data.jsonl/10064 | {
"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,
51402,
68305,
3850,
10227,
31679,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
60639,
51,
13886,
627,
13682,
1155,
11,
13602,
42635,
41486,
82251,
50,
82218,
31263,
7944,
340,
20082,
14359,
1820,
1669,
2975,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.