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 TestDeleteLinkNode(t *testing.T) {
t.Parallel()
cdb, cleanUp, err := makeTestDB()
if err != nil {
t.Fatalf("unable to make test database: %v", err)
}
defer cleanUp()
_, pubKey := btcec.PrivKeyFromBytes(btcec.S256(), key[:])
addr := &net.TCPAddr{
IP: net.ParseIP("127.0.0.1"),
Port: 1337,
}
linkNo... | explode_data.jsonl/29309 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 341
} | [
2830,
3393,
6435,
3939,
1955,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
1999,
11,
4240,
2324,
11,
1848,
1669,
1281,
2271,
3506,
741,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
45928,
311,
1281,
1273,
4625,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestMySQLClusterService_GetAllOwnersByID(t *testing.T) {
asst := assert.New(t)
s := initNewMySQLService()
err := s.GetAllOwnersByID(1)
asst.Nil(err, "test GetAllOwnersByID() failed")
id := s.Owners[constant.ZeroInt].Identity()
asst.Equal(1, id, "test GetByID() failed")
} | explode_data.jsonl/6155 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
59224,
28678,
1860,
13614,
2403,
57762,
60572,
1155,
353,
8840,
836,
8,
341,
60451,
267,
1669,
2060,
7121,
1155,
692,
1903,
1669,
2930,
3564,
59224,
1860,
741,
9859,
1669,
274,
45732,
57762,
60572,
7,
16,
340,
60451,
267,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTxnCoordSenderCleanupOnCommitAfterRestart(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)
s := createTestDB(t)
defer s.Stop()
ctx := context.Background()
// Create a transaction with intent at "a".
key := roachpb.Key("a")
txn := kv.NewTxn(ctx, s.DB, 0 /* gatewayNodeID */)
if... | explode_data.jsonl/76888 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 264
} | [
2830,
3393,
31584,
77,
19437,
20381,
67335,
1925,
33441,
6025,
59354,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
16867,
1487,
77940,
1155,
568,
7925,
1155,
340,
1903,
1669,
1855,
2271,
3506,
1155,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestMTLSForwardTunnel(t *testing.T) {
httpSrv := httptest.NewServer(httpTestHandler)
defer httpSrv.Close()
sendData := make([]byte, 128)
rand.Read(sendData)
err := mtlsForwardTunnelRoundtrip(httpSrv.URL, sendData)
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/69785 | {
"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,
8505,
7268,
25925,
51,
40292,
1155,
353,
8840,
836,
8,
341,
28080,
50,
10553,
1669,
54320,
70334,
7121,
5475,
19886,
2271,
3050,
340,
16867,
1758,
50,
10553,
10421,
2822,
32817,
1043,
1669,
1281,
10556,
3782,
11,
220,
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... | 2 |
func TestEntry_OnKeyDown_BackspaceUnicode(t *testing.T) {
entry := widget.NewEntry()
test.Type(entry, "è")
assert.Equal(t, 0, entry.CursorRow)
assert.Equal(t, 1, entry.CursorColumn)
bs := &fyne.KeyEvent{Name: fyne.KeyBackspace}
entry.TypedKey(bs)
assert.Equal(t, "", entry.Text)
assert.Equal(t, 0, entry.Cursor... | explode_data.jsonl/12340 | {
"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,
5874,
35482,
24173,
1668,
7821,
1306,
33920,
1155,
353,
8840,
836,
8,
341,
48344,
1669,
9086,
7121,
5874,
2822,
18185,
10184,
18238,
11,
330,
4458,
1138,
6948,
12808,
1155,
11,
220,
15,
11,
4343,
29929,
3102,
340,
6948,
1280... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContainsPathAbs(t *testing.T) {
testContainsPathAbs(t, false, "/a.proto", "/a.proto")
testContainsPathAbs(t, true, "/", "/a.proto")
testContainsPathAbs(t, false, "/a.proto", "/")
testContainsPathAbs(t, false, "/", "/")
testContainsPathAbs(t, true, "/", "/a/b.proto")
testContainsPathAbs(t, true, "/", "/a/... | explode_data.jsonl/11910 | {
"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,
23805,
1820,
27778,
1155,
353,
8840,
836,
8,
341,
18185,
23805,
1820,
27778,
1155,
11,
895,
11,
3521,
64,
57322,
497,
3521,
64,
57322,
1138,
18185,
23805,
1820,
27778,
1155,
11,
830,
11,
64657,
3521,
64,
57322,
1138,
18185,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_CheckMovieExists_False(t *testing.T) {
val, err := conn.CheckMovieExists("doesn't exist")
if err != nil {
t.Fatal(err)
}
if val {
t.Fatal("non existent movie apparently exists")
}
} | explode_data.jsonl/22007 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
28188,
19668,
15575,
1400,
710,
1155,
353,
8840,
836,
8,
341,
19302,
11,
1848,
1669,
4534,
10600,
19668,
15575,
445,
71914,
944,
3000,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
630,
743,
1044,
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
] | 3 |
func TestApplicationContext_Properties(t *testing.T) {
t.Run("array properties", func(t *testing.T) {
b := new(ArrayProperties)
c := gs.New()
c.Object(b)
err := c.Refresh()
assert.Nil(t, err)
})
t.Run("map default value ", func(t *testing.T) {
obj := struct {
Int int `value:"${int:=5... | explode_data.jsonl/17427 | {
"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,
19736,
1088,
9249,
1155,
353,
8840,
836,
8,
1476,
3244,
16708,
445,
1653,
5888,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
2233,
1669,
501,
38192,
7903,
340,
197,
1444,
1669,
28081,
7121,
741,
197,
1444,
8348,
1883,
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 TestQuery(t *testing.T) {
app := createTestApp(t)
defer app.Close()
// Write 1024 test results to the database. These results
// have labels named label0, label1, etc. Each label's value
// is an integer whose value is (record number) / (1 << label
// number). So 1 record has each value of label0, 2 recor... | explode_data.jsonl/4950 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1243
} | [
2830,
3393,
2859,
1155,
353,
8840,
836,
8,
341,
28236,
1669,
1855,
2271,
2164,
1155,
340,
16867,
906,
10421,
2822,
197,
322,
9645,
220,
16,
15,
17,
19,
1273,
3059,
311,
279,
4625,
13,
220,
4220,
3059,
198,
197,
322,
614,
9201,
6941,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRSSelectorImmutability(t *testing.T) {
s, closeFn, clientSet := rmSimpleSetup(t)
defer closeFn()
ns := framework.CreateTestingNamespace("rs-selector-immutability", s, t)
defer framework.DeleteTestingNamespace(ns, s, t)
rs := newRS("rs", ns.Name, 0)
createRSsPods(t, clientSet, []*apps.ReplicaSet{rs}, []*v... | explode_data.jsonl/40113 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 474
} | [
2830,
3393,
68980,
18957,
269,
1427,
6984,
2897,
1155,
353,
8840,
836,
8,
341,
1903,
11,
3265,
24911,
11,
2943,
1649,
1669,
18998,
16374,
21821,
1155,
340,
16867,
3265,
24911,
741,
84041,
1669,
12626,
7251,
16451,
22699,
445,
5428,
76127,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDefaultProcessor_PrepareForSignatureRequests(t *testing.T) {
srv := &testingcommons.MockIdentityService{}
dp := DefaultProcessor(srv, nil, nil, cfg).(defaultProcessor)
ctxh := testingconfig.CreateAccountContext(t, cfg)
// failed to get self
err := dp.PrepareForSignatureRequests(context.Background(), nil... | explode_data.jsonl/57866 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 615
} | [
2830,
3393,
3675,
22946,
79561,
3380,
2461,
25088,
35295,
1155,
353,
8840,
836,
8,
341,
1903,
10553,
1669,
609,
8840,
52361,
24664,
18558,
1860,
16094,
55256,
1669,
7899,
22946,
1141,
10553,
11,
2092,
11,
2092,
11,
13286,
68615,
2258,
229... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRecordSetChangesIntegrationWithMaxItems(t *testing.T) {
c := client()
zones, err := c.ZonesListAll(ListFilter{})
if err != nil {
t.Error(err)
}
changes, err := c.RecordSetChanges(zones[0].ID, ListFilter{
MaxItems: 1,
})
if err != nil {
t.Error(err)
}
if len(changes.RecordSetChanges) > 1 {
t.... | explode_data.jsonl/12128 | {
"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,
6471,
1649,
11317,
52464,
2354,
5974,
4353,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2943,
741,
20832,
3154,
11,
1848,
1669,
272,
13476,
3154,
852,
2403,
10278,
5632,
37790,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOutboundListenerConflict_TCPWithCurrentHTTP(t *testing.T) {
// The oldest service port is HTTP. We should encounter conflicts when attempting to add the TCP ports. Purposely
// storing the services out of time order to test that it's being sorted properly.
testOutboundListenerConflict(t,
buildService("te... | explode_data.jsonl/61263 | {
"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,
2662,
10891,
2743,
57974,
50614,
2354,
5405,
9230,
1155,
353,
8840,
836,
8,
341,
197,
322,
576,
23513,
2473,
2635,
374,
10130,
13,
220,
1205,
1265,
12828,
25800,
979,
19405,
311,
912,
279,
26656,
20325,
13,
14532,
966,
974,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientInvalidMethod(t *testing.T) {
httpmock.Activate()
defer httpmock.DeactivateAndReset()
client := getTestClient()
_, err := client.executeRequest(context.Background(), "random", testURL, nil)
assert.NotNil(t, err)
assert.EqualError(t, err, "Invalid method random in request")
} | explode_data.jsonl/32375 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 100
} | [
2830,
3393,
2959,
7928,
3523,
1155,
353,
8840,
836,
8,
341,
28080,
16712,
14140,
731,
741,
16867,
1758,
16712,
8934,
16856,
3036,
14828,
2822,
25291,
1669,
633,
2271,
2959,
741,
197,
6878,
1848,
1669,
2943,
7769,
1900,
5378,
19047,
1507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenAutocomplete(t *testing.T) {
defer leaktest.AfterTest(t)()
// Get a unique path to which we can write our autocomplete files.
acdir, err := ioutil.TempDir("", "TestGenAutoComplete")
if err != nil {
t.Fatal(err)
}
defer func() {
if err := os.RemoveAll(acdir); err != nil {
t.Errorf("couldn't rem... | explode_data.jsonl/33200 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 572
} | [
2830,
3393,
9967,
19602,
20104,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
197,
322,
2126,
264,
4911,
1815,
311,
892,
582,
646,
3270,
1039,
31705,
3542,
624,
81200,
3741,
11,
1848,
1669,
43144,
65009,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseIPAddress_Valid(t *testing.T) {
tests := []struct {
input string
expected string
}{
{input: "127.0.0.1", expected: "127.0.0.1"},
{input: "192.168.0.140:456", expected: "192.168.0.140"},
{input: "192.168.0.140", expected: "192.168.0.140"},
{input: "[::1]:456", expected: "::1"},
{input: "... | explode_data.jsonl/37623 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 219
} | [
2830,
3393,
14463,
87976,
97279,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
22427,
262,
914,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
90,
1355,
25,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
497,
3601,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTrivialStatsUpdate(t *testing.T) {
// Note the healthy threshold is set to 30s.
cases := []struct {
o uint32
n uint32
expected bool
}{
// both are under 30s
{o: 0, n: 1, expected: true},
{o: 15, n: 20, expected: true},
// one is under 30s, the other isn't
{o: 2, n: 40, expecte... | explode_data.jsonl/264 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 446
} | [
2830,
3393,
1282,
26658,
16635,
4289,
1155,
353,
8840,
836,
8,
341,
197,
322,
7036,
279,
9314,
12171,
374,
738,
311,
220,
18,
15,
82,
624,
1444,
2264,
1669,
3056,
1235,
341,
197,
22229,
286,
2622,
18,
17,
198,
197,
9038,
286,
2622,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetAndSetHost(t *testing.T) {
connection := connect.NewEmptyConnectionParams()
assert.Equal(t, "", connection.Host())
connection.SetHost("localhost")
assert.Equal(t, "localhost", connection.Host())
} | explode_data.jsonl/1892 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 68
} | [
2830,
3393,
1949,
3036,
1649,
9296,
1155,
353,
8840,
836,
8,
341,
54590,
1669,
4564,
7121,
3522,
4526,
4870,
741,
6948,
12808,
1155,
11,
7342,
3633,
29840,
12367,
54590,
4202,
9296,
445,
8301,
1138,
6948,
12808,
1155,
11,
330,
8301,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestCount_Check(t *testing.T) {
as := assert.New(t)
c := trophy.Count{
Re: regexp.MustCompile(`\|`),
N: 10,
Title: "Title",
Desc: "Desc",
Grade: "Grade",
}
t.Run("10回あるとき", func(t *testing.T) {
res, err := c.Check("||||||||||", record.Record{})
as.Nil(err)
as.True(res.Cleared, "trueが返さ... | explode_data.jsonl/20904 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 326
} | [
2830,
3393,
2507,
28188,
1155,
353,
8840,
836,
8,
341,
60451,
1669,
2060,
7121,
1155,
692,
1444,
1669,
37682,
6134,
515,
197,
197,
693,
25,
262,
41877,
98626,
5809,
59,
91,
89746,
197,
18317,
25,
257,
220,
16,
15,
345,
197,
92233,
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 TestUserLDAPMapping_String(t *testing.T) {
v := UserLDAPMapping{
ID: Int64(0),
LDAPDN: String(""),
Login: String(""),
AvatarURL: String(""),
GravatarID: String(""),
Type: String(""),
SiteAdmin: Bool(false),
URL: ... | explode_data.jsonl/33298 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 463
} | [
2830,
3393,
1474,
93497,
6807,
31777,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
2657,
93497,
6807,
515,
197,
29580,
25,
394,
1333,
21,
19,
7,
15,
1326,
197,
197,
93497,
31264,
25,
310,
923,
445,
4461,
197,
197,
6231,
25,
1797,
923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetWordsIncl(t *testing.T) {
fmt.Println("-- getWordsIncl --")
// Valid case 1
filterJSON := `{
"filter_str": "est"
}`
reader = strings.NewReader(filterJSON) //Convert string to reader
request, err := client.Post(getWordsInclUrl, CONTENT_TYPE, reader) //Create request with... | explode_data.jsonl/74522 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 365
} | [
2830,
3393,
1949,
23489,
641,
564,
1155,
353,
8840,
836,
8,
341,
11009,
12419,
21549,
633,
23489,
641,
564,
1177,
5130,
197,
322,
7818,
1142,
220,
16,
271,
50108,
5370,
1669,
1565,
515,
197,
197,
1,
5315,
2895,
788,
330,
477,
698,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_checkWorkflowNotificationsValidity(t *testing.T) {
type args struct {
yaml string
}
tests := []struct {
name string
args args
want error
}{
{
name: "test multiple notifications",
want: nil,
args: args{
yaml: `name: test1
version: v2.0
workflow:
DDOS-me:
pipeline: DDOS-me
... | explode_data.jsonl/10298 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1062
} | [
2830,
3393,
7200,
62768,
34736,
69538,
1155,
353,
8840,
836,
8,
1476,
13158,
2827,
2036,
341,
197,
14522,
9467,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
1465,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMuxRouteGroups(t *testing.T) {
var stdmwInit, stdmwHandler uint64
stdmw := func(next Handler) Handler {
stdmwInit++
return HandlerFunc(func(ctx context.Context, rc *fasthttp.RequestCtx) {
stdmwHandler++
next.ServeHTTP(ctx, rc)
})
}
var stdmwInit2, stdmwHandler2 uint64
stdmw2 := func(next Han... | explode_data.jsonl/47950 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 627
} | [
2830,
3393,
44,
2200,
4899,
22173,
1155,
353,
8840,
836,
8,
341,
2405,
1460,
44128,
3803,
11,
1460,
44128,
3050,
2622,
21,
19,
271,
6736,
44128,
1669,
2915,
16913,
19954,
8,
19954,
341,
197,
6736,
44128,
3803,
22940,
197,
853,
19954,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDataToMetricDescriptorType(t *testing.T) {
tests := []struct {
name string
data telemetry.MetricData
want wire.MetricDescriptor_Type
}{
{
"Nil data",
nil,
wire.MetricDescriptor_UNSPECIFIED,
},
{
"Gauge Int64",
&metric.Int64Data{
IsGauge: true,
},
wire.MetricDescriptor_GAU... | explode_data.jsonl/80873 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 597
} | [
2830,
93200,
1249,
54310,
11709,
929,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
8924,
61037,
1321,
16340,
1043,
198,
197,
50780,
9067,
1321,
16340,
11709,
13729,
198,
197,
59403,
197,
197,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUCancelAllOpenOrders(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() || !canManipulateRealOrders {
t.Skip("skipping test: api keys not set or canManipulateRealOrders set to false")
}
_, err := b.UCancelAllOpenOrders(context.Background(), currency.NewPair(currency.BTC, currency.USDT))
if err != nil ... | explode_data.jsonl/76574 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 128
} | [
2830,
3393,
5459,
4949,
2403,
5002,
24898,
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,
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... | 4 |
func TestVolumePrunePromptNo(t *testing.T) {
// FIXME(vdemeester) make it work..
skip.If(t, runtime.GOOS == "windows", "TODO: fix test on windows")
for _, input := range []string{"n", "N", "no", "anything", "really"} {
cli := test.NewFakeCli(&fakeClient{
volumePruneFunc: simplePruneFunc,
})
cli.SetIn(comm... | explode_data.jsonl/66806 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
18902,
3533,
2886,
54615,
2753,
1155,
353,
8840,
836,
8,
341,
197,
322,
27475,
3747,
67,
3894,
5191,
8,
1281,
432,
975,
33947,
1903,
13389,
32901,
1155,
11,
15592,
97574,
3126,
621,
330,
27077,
497,
330,
14732,
25,
5046,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateCognitoSupportedLoginProviders(t *testing.T) {
validValues := []string{
"foo",
"7346241598935552",
"123456789012.apps.googleusercontent.com",
"foo_bar",
"foo;bar",
"foo/bar",
"foo-bar",
"xvz1evFS4wEEPTGEFPHBog;kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw",
strings.Repeat("W", 128),
}... | explode_data.jsonl/78623 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 398
} | [
2830,
3393,
17926,
34,
63441,
34636,
6231,
37351,
1155,
353,
8840,
836,
8,
341,
56322,
6227,
1669,
3056,
917,
515,
197,
197,
1,
7975,
756,
197,
197,
1,
22,
18,
19,
21,
17,
19,
16,
20,
24,
23,
24,
18,
20,
20,
20,
17,
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... | 5 |
func TestGenerateModel_WithItems(t *testing.T) {
specDoc, err := loads.Spec("../fixtures/codegen/todolist.models.yml")
require.NoError(t, err)
definitions := specDoc.Spec().Definitions
schema := definitions["WithItems"]
opts := opts()
tt := templateTest{t, opts.templates.MustGet("model").Lookup("schema")}
genM... | explode_data.jsonl/2523 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 316
} | [
2830,
3393,
31115,
1712,
62,
2354,
4353,
1155,
353,
8840,
836,
8,
341,
98100,
9550,
11,
1848,
1669,
20907,
36473,
17409,
45247,
46928,
4370,
5523,
347,
34675,
8235,
33936,
1138,
17957,
35699,
1155,
11,
1848,
692,
7452,
4054,
82,
1669,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHasConfigFor(t *testing.T) {
t.Parallel()
testCases := []struct {
name string
resultGenerator func(fuzzedConfig *ProwConfig) (toCheck *ProwConfig, exceptGlobal bool, expectOrgs sets.String, expectRepos sets.String)
}{
{
name: "Any non-empty config with empty branchprotection and Tide pro... | explode_data.jsonl/41054 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1773
} | [
2830,
3393,
10281,
2648,
2461,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
9559,
12561,
2915,
955,
8889,
291,
2648,
353,
47,
651,
2648,
8,
320,
983,
3973,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGatherHealthCheckV2(t *testing.T) {
expectedFields := map[string]interface{}{
"passing": 1,
"critical": 0,
"warning": 0,
}
expectedTags := map[string]string{
"node": "localhost",
"check_id": "foo.health123",
"check_name": "foo.health",
"status"... | explode_data.jsonl/6890 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 387
} | [
2830,
3393,
38,
1856,
14542,
3973,
53,
17,
1155,
353,
8840,
836,
8,
341,
42400,
8941,
1669,
2415,
14032,
31344,
67066,
197,
197,
1,
6385,
287,
788,
220,
220,
16,
345,
197,
197,
1,
41541,
788,
220,
15,
345,
197,
197,
1,
18928,
788,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMessageBroadcastRecall(t *testing.T) {
rc := NewRongCloud(
os.Getenv("APP_KEY"),
os.Getenv("APP_SECRET"),
)
content := BroadcastRecallContent{
MessageId: "BC52-ESJ0-022O-001H",
ConversationType: 6,
IsAdmin: 0,
IsDelete: 0,
}
if err := rc.MessageBroadcastRecall("123", ... | explode_data.jsonl/38991 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 196
} | [
2830,
3393,
2052,
43362,
3820,
541,
1155,
353,
8840,
836,
8,
341,
30295,
1669,
1532,
49,
644,
16055,
1006,
197,
25078,
64883,
445,
14707,
6600,
4461,
197,
25078,
64883,
445,
14707,
31408,
4461,
197,
692,
27751,
1669,
31965,
3820,
541,
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 TestValidateDaemonUpdate(t *testing.T) {
validSelector := map[string]string{"a": "b"}
validSelector2 := map[string]string{"c": "d"}
invalidSelector := map[string]string{"NoUppercaseOrSpecialCharsLike=Equals": "b"}
validPodSpecAbc := api.PodSpec{
RestartPolicy: api.RestartPolicyAlways,
DNSPolicy: api.D... | explode_data.jsonl/62802 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2769
} | [
2830,
3393,
17926,
89177,
4289,
1155,
353,
8840,
836,
8,
341,
56322,
5877,
1669,
2415,
14032,
30953,
4913,
64,
788,
330,
65,
16707,
56322,
5877,
17,
1669,
2415,
14032,
30953,
4913,
66,
788,
330,
67,
16707,
197,
11808,
5877,
1669,
2415,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestServiceLogsError(t *testing.T) {
client := &Client{
client: newMockClient(errorMock(http.StatusInternalServerError, "Server error")),
}
_, err := client.ServiceLogs(context.Background(), "service_id", types.ContainerLogsOptions{})
assert.Check(t, is.Error(err, "Error response from daemon: Server error"))... | explode_data.jsonl/6953 | {
"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,
1860,
51053,
1454,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
609,
2959,
515,
197,
25291,
25,
501,
11571,
2959,
6390,
11571,
19886,
66760,
11,
330,
5475,
1465,
30154,
197,
532,
197,
6878,
1848,
1669,
2943,
13860,
51053,
5378... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSubscribeStreamFlowControlBatching(t *testing.T) {
subscription := subscriptionPartition{"projects/123456/locations/us-central1-b/subscriptions/my-sub", 0}
msg1 := seqMsgWithOffsetAndSize(67, 200)
msg2 := seqMsgWithOffsetAndSize(68, 100)
serverErr := status.Error(codes.InvalidArgument, "verifies flow contr... | explode_data.jsonl/31636 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 468
} | [
2830,
3393,
28573,
3027,
18878,
3273,
21074,
287,
1155,
353,
8840,
836,
8,
341,
28624,
12124,
1669,
15142,
49978,
4913,
17161,
14,
16,
17,
18,
19,
20,
21,
14,
31309,
62431,
84081,
16,
1455,
37885,
29966,
34198,
17967,
497,
220,
15,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestServerLifecycle(t *testing.T) {
statsCh := make(chan metrics.StatMessage)
server := newTestServer(statsCh)
eg := errgroup.Group{}
eg.Go(server.listenAndServe)
server.listenAddr()
server.Shutdown(time.Second)
if err := eg.Wait(); err != nil {
t.Error("listenAndServe failed.", err)
}
} | explode_data.jsonl/64748 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 116
} | [
2830,
3393,
5475,
62731,
1155,
353,
8840,
836,
8,
341,
79659,
1143,
1669,
1281,
35190,
16734,
53419,
2052,
340,
41057,
1669,
501,
2271,
5475,
50714,
1143,
692,
197,
791,
1669,
1848,
4074,
5407,
16094,
197,
791,
67131,
21421,
22628,
96059,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFunc(t *testing.T) {
a := dummys.Call("mapArray", []int{1, 2, 3}, func(e int64) int64 { return e + 40 })
b := dummys.Call("mapArray", []int{1, 2, 3}, func(e ...int64) int64 { return e[0] + 40 })
if a.Index(1).Int() != 42 || b.Index(1).Int() != 42 {
t.Fail()
}
add := dummys.Get("add").Interface().(func(... | explode_data.jsonl/56787 | {
"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,
9626,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
62711,
8209,
27017,
445,
2186,
1857,
497,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
18,
2137,
2915,
2026,
526,
21,
19,
8,
526,
21,
19,
314,
470,
384,
488,
220,
19,
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 TestLoadVersionInvalid(t *testing.T) {
logger := log.NewNopLogger()
pruningOpt := SetPruning(store.PruneNothing)
db := dbm.NewMemDB()
name := t.Name()
app := NewBaseApp(name, logger, db, nil, pruningOpt)
err := app.LoadLatestVersion()
require.Nil(t, err)
// require error when loading an invalid version
... | explode_data.jsonl/67044 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 318
} | [
2830,
3393,
5879,
5637,
7928,
1155,
353,
8840,
836,
8,
341,
17060,
1669,
1487,
7121,
45,
453,
7395,
741,
25653,
37202,
21367,
1669,
2573,
3533,
37202,
31200,
17947,
2886,
23780,
340,
20939,
1669,
2927,
76,
7121,
18816,
3506,
741,
11609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJQAllParts(t *testing.T) {
conf := NewConfig()
conf.JQ.Query = ".foo.bar"
jSet, err := NewJQ(conf, nil, log.Noop(), metrics.Noop())
require.NoError(t, err)
msgIn := message.New([][]byte{
[]byte(`{"foo":{"bar":0}}`),
[]byte(`{"foo":{"bar":1}}`),
[]byte(`{"foo":{"bar":2}}`),
})
msgs, res := jSet.P... | explode_data.jsonl/53849 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 222
} | [
2830,
3393,
41,
48,
2403,
28921,
1155,
353,
8840,
836,
8,
341,
67850,
1669,
1532,
2648,
741,
67850,
3503,
48,
15685,
284,
5933,
7975,
22001,
1837,
12428,
1649,
11,
1848,
1669,
1532,
41,
48,
29879,
11,
2092,
11,
1487,
16766,
453,
1507,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateNewSchema(t *testing.T) {
if os.Getenv("DCTL_UPDATE_TEST_SCHEMA") != "true" {
t.SkipNow()
}
providerLibrary := terraform.NewProviderLibrary()
// Replace this with provider you want to create schema
realProvider, _ := InitTestAwsProvider(providerLibrary, "3.19.0")
err := realProvider.Init()
i... | explode_data.jsonl/5710 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 180
} | [
2830,
3393,
4021,
3564,
8632,
1155,
353,
8840,
836,
8,
1476,
743,
2643,
64883,
445,
35,
23871,
22408,
11641,
46220,
899,
961,
330,
1866,
1,
341,
197,
3244,
57776,
7039,
741,
197,
630,
197,
19979,
16915,
1669,
59561,
627,
7121,
5179,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientRead_AfterSetupClose(t *testing.T) {
setup := newTestSetup("closed")
setup.Close()
_, err := setup.client.NewReader(setup.ctx, "should fail")
if err == nil {
t.Errorf("NewReader(%q): err=%v", "should fail", err)
}
} | explode_data.jsonl/69546 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
3393,
2959,
4418,
1566,
1046,
21821,
7925,
1155,
353,
8840,
836,
8,
341,
84571,
1669,
501,
2271,
21821,
445,
34087,
1138,
84571,
10421,
741,
197,
6878,
1848,
1669,
6505,
6581,
68587,
14171,
454,
30608,
11,
330,
5445,
3690,
1138,
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 TestNewBitMatrixParser(t *testing.T) {
img, _ := gozxing.NewSquareBitMatrix(20)
_, e := NewBitMatrixParser(img)
if _, ok := e.(gozxing.FormatException); !ok {
t.Fatalf("NewBitMatrixParser(20x20) must be FormatException, %T", e)
}
img, _ = gozxing.NewSquareBitMatrix(22)
_, e = NewBitMatrixParser(img)
if _... | explode_data.jsonl/32236 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 397
} | [
2830,
3393,
3564,
8344,
6689,
6570,
1155,
353,
8840,
836,
8,
341,
39162,
11,
716,
1669,
728,
66700,
287,
7121,
33271,
8344,
6689,
7,
17,
15,
340,
197,
6878,
384,
1669,
1532,
8344,
6689,
6570,
11022,
340,
743,
8358,
5394,
1669,
384,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateGroupWithMissingFields(t *testing.T) {
db, cleanup := qtest.TestDB(t)
defer cleanup()
admin := qtest.CreateFakeUser(t, db, 1)
var course pb.Course
course.Provider = "fake"
// only created 1 directory, if we had created two directories ID would be 2
course.OrganizationID = 1
if err := db.CreateCo... | explode_data.jsonl/44531 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 681
} | [
2830,
3393,
4021,
2808,
2354,
25080,
8941,
1155,
353,
8840,
836,
8,
341,
20939,
11,
21290,
1669,
2804,
1944,
8787,
3506,
1155,
340,
16867,
21290,
2822,
64394,
1669,
2804,
1944,
7251,
52317,
1474,
1155,
11,
2927,
11,
220,
16,
340,
2405,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEntryAddBatchTimerWithTimerBatchSizeLimitError(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
e, _, _ := testEntry(ctrl, testEntryOptions{})
e.opts = e.opts.SetMaxTimerBatchSizePerWrite(2)
e.closed = true
bt := unaggregated.MetricUnion{
Type: metric.TimerType,
ID: ... | explode_data.jsonl/24209 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 215
} | [
2830,
3393,
5874,
2212,
21074,
10105,
2354,
10105,
21074,
1695,
16527,
1454,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
7727,
11,
8358,
716,
1669,
1273,
5874,
62100,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRegisterHandler(t *testing.T) {
server, clientConn, cancelFn := createServerAndClient(t, client.RegisterHandler)
testRegister(t, clientConn)
cancelFn()
checkClosed(t, clientConn, server)
} | explode_data.jsonl/42768 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 68
} | [
2830,
3393,
8690,
3050,
1155,
353,
8840,
836,
8,
1476,
41057,
11,
2943,
9701,
11,
9121,
24911,
1669,
1855,
5475,
3036,
2959,
1155,
11,
2943,
19983,
3050,
692,
18185,
8690,
1155,
11,
2943,
9701,
692,
84441,
24911,
741,
25157,
26884,
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 |
func TestMinimum(t *testing.T) {
GenerateValuesAsYaml(t, "minimum.test.schema.json",
func(console *tests.ConsoleWrapper, donec chan struct{}) {
defer close(donec)
// Test boolean type
console.ExpectString("Enter a value for numberValue")
console.SendLine("9.1")
console.ExpectString("Sorry, your reply ... | explode_data.jsonl/61755 | {
"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,
28695,
1155,
353,
8840,
836,
8,
341,
197,
31115,
6227,
2121,
56,
9467,
1155,
11,
330,
37988,
5958,
30892,
4323,
756,
197,
29244,
52818,
353,
23841,
46298,
11542,
11,
2814,
66,
26023,
2036,
28875,
341,
298,
16867,
3265,
34232... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPlaceContainerHuge(t *testing.T) {
s := &BinPackingPlacementStrategy{}
nodes := []*cluster.Node{}
for i := 0; i < 100; i++ {
nodes = append(nodes, createNode(fmt.Sprintf("node-%d", i), 1, 1))
}
// add 100 container 1CPU
for i := 0; i < 100; i++ {
node, err := s.PlaceContainer(createConfig(0, 1), no... | explode_data.jsonl/49366 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 362
} | [
2830,
3393,
17371,
4502,
39,
4733,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
609,
28794,
47,
8985,
28237,
19816,
31483,
79756,
1669,
29838,
18855,
21714,
16094,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
15,
26,
600,
1027,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestService_NATS(t *testing.T) {
env, _ := NewEnv("BM_NATS")
assert.NotNil(t, env)
conf := env.Config()
assert.NotNil(t, conf)
services.TestService_Generic(t, New(conf),
func(t *testing.T, s bandmaster.Service) {
c := Client(s)
assert.NotNil(t, c)
assert.Equal(t, nats.CONNECTED, c.Status())
cc ... | explode_data.jsonl/52508 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 188
} | [
2830,
3393,
1860,
1604,
49107,
1155,
353,
8840,
836,
8,
341,
57538,
11,
716,
1669,
1532,
14359,
445,
28942,
1604,
49107,
1138,
6948,
93882,
1155,
11,
6105,
340,
67850,
1669,
6105,
10753,
741,
6948,
93882,
1155,
11,
2335,
692,
1903,
2161... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAssertionAssertWhenTemplateNotSpecifiedAndNoDefault(t *testing.T) {
manifest := common.K8sManifest{}
renderedMap := map[string][]common.K8sManifest{
"existed.yaml": {manifest},
}
assertionYAML := "equal:"
assertion := new(Assertion)
yaml.Unmarshal([]byte(assertionYAML), &assertion)
a := assert.New(t)... | explode_data.jsonl/62924 | {
"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,
68639,
8534,
4498,
7275,
2623,
8327,
1870,
3036,
2753,
3675,
1155,
353,
8840,
836,
8,
341,
197,
42315,
1669,
4185,
11352,
23,
82,
38495,
16094,
33921,
291,
2227,
1669,
2415,
14032,
45725,
5464,
11352,
23,
82,
38495,
515,
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 TestPing(t *testing.T) {
Convey("get Ping data", t, WithService(func(s *Service) {
err := s.Ping(context.TODO())
So(err, ShouldBeNil)
}))
} | explode_data.jsonl/7258 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 65
} | [
2830,
3393,
69883,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
455,
48657,
821,
497,
259,
11,
3085,
1860,
18552,
1141,
353,
1860,
8,
341,
197,
9859,
1669,
274,
1069,
287,
5378,
90988,
2398,
197,
76912,
3964,
11,
12260,
3430,
19064... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRuntime_ExportToMap(t *testing.T) {
const SCRIPT = `
var m = {
"0": 1,
"1": 2,
"2": 3,
}
m;
`
vm := New()
v, err := vm.RunString(SCRIPT)
if err != nil {
t.Fatal(err)
}
var m map[int]string
err = vm.ExportTo(v, &m)
if err != nil {
t.Fatal(err)
}
if l := len(m); l != 3 {
t.Fatalf("Unex... | explode_data.jsonl/10470 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 231
} | [
2830,
3393,
15123,
62,
16894,
1249,
2227,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
2405,
296,
284,
341,
197,
197,
1,
15,
788,
220,
16,
345,
197,
197,
1,
16,
788,
220,
17,
345,
197,
197,
1,
17,
788,
220,
18,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseAWSVPCEndpointIDTLVs(t *testing.T) {
for _, tc := range awsTestCases {
t.Run(tc.name, func(t *testing.T) {
tlvs := checkTLVs(t, tc.name, tc.raw, tc.types)
tc.valid(t, tc.name, tlvs)
})
}
} | explode_data.jsonl/24902 | {
"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,
14463,
36136,
13378,
2104,
303,
2768,
915,
13470,
51737,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
31521,
2271,
37302,
341,
197,
3244,
16708,
44415,
2644,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
3244,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestByteSliceUtils(t *testing.T) {
Convey("ByteSlicePrintf", t, func() {
Convey("Formats a byteSlice according to a template & a separator", func() {
template := `prefix{%v}suffix`
separator := "%v"
byteSlice := []byte("slice")
byteSliceSprintfExpected := []byte("prefix{slice}suffix")
byteSlice... | explode_data.jsonl/38076 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 390
} | [
2830,
3393,
7153,
33236,
4209,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
7153,
33236,
42736,
497,
259,
11,
2915,
368,
1476,
197,
93070,
5617,
445,
44599,
264,
4922,
33236,
4092,
311,
264,
3811,
609,
264,
24792,
497,
2915,
368,
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 TestCS3389(t *testing.T) {
s := createPlannerSuite()
ctx := context.Background()
stmt, err := s.p.ParseOneStmt("select count(*) from t where a in (select b from t2 where a is null);", "", "")
require.NoError(t, err)
p, _, err := BuildLogicalPlanForTest(ctx, s.ctx, stmt, s.is)
require.NoError(t, err)
p, err... | explode_data.jsonl/50218 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 336
} | [
2830,
3393,
6412,
18,
18,
23,
24,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
1855,
2120,
4887,
28000,
741,
20985,
1669,
2266,
19047,
741,
55822,
11,
1848,
1669,
274,
556,
8937,
3966,
31063,
445,
1742,
1760,
28671,
504,
259,
1380,
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 Test_IndexingNestedSymLinks(t *testing.T) {
resolver, err := newDirectoryResolver("./test-fixtures/symlinks-simple")
require.NoError(t, err)
// check that we can get the real path
locations, err := resolver.FilesByPath("./readme")
require.NoError(t, err)
assert.Len(t, locations, 1)
// check that we can ac... | explode_data.jsonl/50124 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 577
} | [
2830,
3393,
50361,
287,
71986,
27912,
24089,
1155,
353,
8840,
836,
8,
341,
10202,
7921,
11,
1848,
1669,
501,
9310,
18190,
13988,
1944,
70913,
18513,
2687,
88,
1014,
15504,
65957,
1138,
17957,
35699,
1155,
11,
1848,
692,
197,
322,
1779,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValueAssignmentGetInput(t *testing.T) {
t.Parallel()
data := `{ get_input: port }`
va := ValueAssignment{}
err := yaml.Unmarshal([]byte(data), &va)
require.Nil(t, err)
require.Equal(t, ValueAssignmentFunction, va.Type)
require.Len(t, va.GetFunction().Operands, 1)
require.Equal(t, `get_input: port`, va... | explode_data.jsonl/64270 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 216
} | [
2830,
3393,
1130,
41613,
1949,
2505,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
8924,
1669,
53692,
633,
5898,
25,
2635,
335,
3989,
53911,
1669,
5162,
41613,
31483,
9859,
1669,
32246,
38097,
10556,
3782,
2592,
701,
609,
6586,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestABCIValidatorUpdate(t *testing.T) {
validator := newValidator(t, valAddr1, pk1)
abciVal := validator.ABCIValidatorUpdate()
pk, err := validator.TmConsPublicKey()
require.NoError(t, err)
require.Equal(t, pk, abciVal.PubKey)
require.Equal(t, validator.BondedTokens().Int64(), abciVal.Power)
} | explode_data.jsonl/48966 | {
"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,
1867,
11237,
14256,
4289,
1155,
353,
8840,
836,
8,
341,
197,
16112,
1669,
501,
14256,
1155,
11,
1044,
13986,
16,
11,
22458,
16,
340,
197,
370,
5855,
2208,
1669,
22935,
875,
4897,
40,
14256,
4289,
741,
3223,
74,
11,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestScalarBls12377G1Zero(t *testing.T) {
bls12377G1 := BLS12377G1()
sc := bls12377G1.Scalar.Zero()
require.True(t, sc.IsZero())
require.True(t, sc.IsEven())
} | explode_data.jsonl/15746 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 81
} | [
2830,
3393,
20639,
33,
4730,
16,
17,
18,
22,
22,
38,
16,
17999,
1155,
353,
8840,
836,
8,
341,
96421,
82,
16,
17,
18,
22,
22,
38,
16,
1669,
425,
7268,
16,
17,
18,
22,
22,
38,
16,
741,
29928,
1669,
1501,
82,
16,
17,
18,
22,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWaitUntilRunning(t *testing.T) {
ts := memorytopo.NewServer("cell1")
m := NewManager(ts)
// Start it 3 times i.e. restart it 2 times.
for i := 1; i <= 3; i++ {
// Run the manager in the background.
wg, _, cancel := StartManager(m)
// Shut it down and wait for the shutdown to complete.
cancel()
... | explode_data.jsonl/75108 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 126
} | [
2830,
3393,
14190,
24493,
18990,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
4938,
3481,
78,
7121,
5475,
445,
5873,
16,
1138,
2109,
1669,
1532,
2043,
35864,
692,
197,
322,
5145,
432,
220,
18,
3039,
600,
1734,
13,
17024,
432,
220,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRunsVschemaMigrations(t *testing.T) {
schemaDirArg := "-schema_dir=data/schema"
webDirArg := "-web_dir=web/vtctld/app"
webDir2Arg := "-web_dir2=web/vtctld2/app"
tabletHostname := "-tablet_hostname=localhost"
keyspaceArg := "-keyspaces=test_keyspace,app_customer"
numShardsArg := "-num_shards=2,2"
os.Arg... | explode_data.jsonl/66509 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 296
} | [
2830,
3393,
73920,
53,
17349,
44,
17824,
1155,
353,
8840,
836,
8,
341,
1903,
3416,
6184,
2735,
1669,
6523,
17349,
4334,
22839,
61142,
698,
97250,
6184,
2735,
1669,
6523,
2911,
4334,
28,
2911,
5457,
83,
302,
507,
10640,
698,
97250,
6184,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestOrdererWithSubstitutedConfig_WithEmptySubstituteUrl(t *testing.T) {
_, fetchedConfig := testCommonConfigOrderer(t, "orderer.example.com", "orderer.example3.com")
if fetchedConfig.URL != "orderer.example.com:7050" {
t.Fatal("Fetched Config should have the same url")
}
if fetchedConfig.GRPCOptions["ssl-t... | explode_data.jsonl/34077 | {
"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,
4431,
261,
2354,
3136,
3696,
2774,
2648,
62,
2354,
3522,
3136,
7660,
2864,
1155,
353,
8840,
836,
8,
341,
197,
6878,
41442,
2648,
1669,
1273,
10839,
2648,
4431,
261,
1155,
11,
330,
1358,
261,
7724,
905,
497,
330,
1358,
261,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCompactionFindGrandparentLimit(t *testing.T) {
cmp := DefaultComparer.Compare
var grandparents []*fileMetadata
var fileNum base.FileNum
parseMeta := func(s string) *fileMetadata {
parts := strings.Split(s, "-")
if len(parts) != 2 {
t.Fatalf("malformed table spec: %s", s)
}
fileNum++
return &f... | explode_data.jsonl/51403 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1004
} | [
2830,
3393,
13552,
1311,
9885,
40151,
3765,
16527,
1155,
353,
8840,
836,
8,
341,
1444,
1307,
1669,
7899,
31942,
32377,
198,
2405,
55335,
29838,
1192,
14610,
271,
2405,
1034,
4651,
2331,
8576,
4651,
198,
75115,
12175,
1669,
2915,
1141,
914... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestHeadDeleteSeriesWithoutSamples(t *testing.T) {
entries := []interface{}{
[]RefSeries{
{Ref: 10, Labels: labels.FromStrings("a", "1")},
},
[]RefSample{},
[]RefSeries{
{Ref: 50, Labels: labels.FromStrings("a", "2")},
},
[]RefSample{
{Ref: 50, T: 80, V: 1},
{Ref: 50, T: 90, V: 1},
},
}... | explode_data.jsonl/38161 | {
"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,
12346,
6435,
25544,
26040,
39571,
1155,
353,
8840,
836,
8,
341,
197,
12940,
1669,
3056,
4970,
67066,
197,
197,
1294,
3945,
25544,
515,
298,
197,
90,
3945,
25,
220,
16,
15,
11,
60996,
25,
9201,
11439,
20859,
445,
64,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWeightedUndirected(t *testing.T) {
t.Run("EdgeExistence", func(t *testing.T) {
testgraph.EdgeExistence(t, weightedUndirectedBuilder)
})
t.Run("NodeExistence", func(t *testing.T) {
testgraph.NodeExistence(t, weightedUndirectedBuilder)
})
t.Run("ReturnAdjacentNodes", func(t *testing.T) {
testgraph.Ret... | explode_data.jsonl/24925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 361
} | [
2830,
3393,
8295,
291,
19957,
74612,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
11656,
25613,
763,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
18185,
4439,
13,
11656,
25613,
763,
1155,
11,
36824,
19957,
74612,
3297,
340,
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... | 1 |
func TestFuzzManyPeers(t *testing.T) {
peerCount := 50000
if detectrace.WithRace() {
peerCount = 100
}
for i := 0; i < peerCount; i++ {
_, err := FullMeshConnected(context.Background(), 2)
if err != nil {
t.Fatal(err)
}
}
} | explode_data.jsonl/19247 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 103
} | [
2830,
3393,
37,
8889,
8441,
10197,
388,
1155,
353,
8840,
836,
8,
341,
197,
16537,
2507,
1669,
220,
20,
15,
15,
15,
15,
198,
743,
11140,
41183,
26124,
55991,
368,
341,
197,
197,
16537,
2507,
284,
220,
16,
15,
15,
198,
197,
532,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestInjectAssign(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry.js": `
test = true
`,
"/inject.js": `
export let test = false
`,
},
entryPaths: []string{"/entry.js"},
options: config.Options{
Mode: config.ModeBundle,
AbsOutputFi... | explode_data.jsonl/38588 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
13738,
28933,
1155,
353,
8840,
836,
8,
341,
11940,
57239,
25952,
33,
1241,
832,
1155,
11,
51450,
515,
197,
74075,
25,
2415,
14032,
30953,
515,
298,
197,
3115,
4085,
2857,
788,
22074,
571,
18185,
284,
830,
198,
298,
197,
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 |
func TestBytesOutputsInputBytesUnchanged(t *testing.T) {
t.Parallel()
want := []byte{8, 0, 0, 16}
input := bytes.NewReader(want)
got, err := script.NewPipe().WithReader(input).Bytes()
if err != nil {
t.Fatal(err)
}
if !cmp.Equal(want, got) {
t.Error(cmp.Diff(want, got))
}
} | explode_data.jsonl/51520 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 123
} | [
2830,
3393,
7078,
61438,
2505,
7078,
1806,
17353,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
50780,
1669,
3056,
3782,
90,
23,
11,
220,
15,
11,
220,
15,
11,
220,
16,
21,
532,
22427,
1669,
5820,
68587,
3622,
517,
340,
3174,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateUnprotectedKeys(t *testing.T) {
// FIXME: move this to testing.TempDir once we require >= Go 1.15
tmpdir, err := ioutil.TempDir("", "generate-keys")
require.NoError(t, err)
defer os.RemoveAll(tmpdir)
err = GeneratED25519Key(nil, path.Join(tmpdir, "private_key.pem"), path.Join(tmpdir, "public_key.... | explode_data.jsonl/58518 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 136
} | [
2830,
3393,
31115,
1806,
5764,
8850,
1155,
353,
8840,
836,
8,
341,
197,
322,
27475,
25,
3271,
419,
311,
7497,
65009,
6184,
3055,
582,
1373,
2604,
5994,
220,
16,
13,
16,
20,
198,
20082,
3741,
11,
1848,
1669,
43144,
65009,
6184,
19814,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNestedDirectives(t *testing.T) {
d := NewDecoder(strings.NewReader(nestedDirectivesInput))
for i, want := range nestedDirectivesTokens {
have, err := d.Token()
if err != nil {
t.Fatalf("token %d: unexpected error: %s", i, err)
}
if !reflect.DeepEqual(have, want) {
t.Errorf("token %d = %#v want... | explode_data.jsonl/48611 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
71986,
16027,
1886,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
1532,
20732,
51442,
68587,
1445,
9980,
16027,
1886,
2505,
4390,
2023,
600,
11,
1366,
1669,
2088,
24034,
16027,
1886,
29300,
341,
197,
9598,
523,
11,
1848,
1669,
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... | 4 |
func TestGetPods(t *testing.T) {
var (
lsPods = []*v1.Pod{
testutil.FakePodWithSingleContainer("namespace-0", "name-0", "image-0"),
testutil.FakePodWithSingleContainer("namespace-1", "name-1", "image-1"),
}
)
// Create a pod lister that will list the pods defined above.
indexer := cache.NewIndexer(cache.... | explode_data.jsonl/73401 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 338
} | [
2830,
3393,
1949,
23527,
82,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
197,
4730,
23527,
82,
284,
29838,
85,
16,
88823,
515,
298,
18185,
1314,
991,
726,
23527,
2354,
10888,
4502,
445,
2231,
12,
15,
497,
330,
606,
12,
15,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestIdFromInt(t *testing.T) {
want := Nuc(922350000)
got := IdFromInt(92235)
if got != want {
t.Errorf("want %v, got %v", want, got)
}
} | explode_data.jsonl/31992 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 69
} | [
2830,
3393,
764,
3830,
1072,
1155,
353,
8840,
836,
8,
341,
50780,
1669,
451,
1754,
7,
24,
17,
17,
18,
20,
15,
15,
15,
15,
340,
3174,
354,
1669,
5223,
3830,
1072,
7,
24,
17,
17,
18,
20,
340,
743,
2684,
961,
1366,
341,
197,
3244... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestHideProjectFolder(t *testing.T) {
tests := map[string]struct {
ProjectPath string
ProjectPathOverride string
Entity string
Expected string
}{
"auto-detected": {
ProjectPath: "/usr/temp",
Entity: "/usr/temp/project/main.go",
Expected: "project/main.go... | explode_data.jsonl/31865 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 387
} | [
2830,
3393,
21692,
7849,
13682,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
197,
7849,
1820,
260,
914,
198,
197,
197,
7849,
1820,
2177,
914,
198,
197,
85090,
1060,
914,
198,
197,
197,
18896,
310,
914,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPrimitiveGetDuration(t *testing.T) {
client := newPrimitiveClient()
result, err := client.GetDuration(context.Background(), nil)
if err != nil {
t.Fatalf("GetDuration: %v", err)
}
if r := cmp.Diff(result.DurationWrapper, DurationWrapper{
Field: to.StringPtr("P123DT22H14M12.011S"),
}); r != "" {
t.F... | explode_data.jsonl/61684 | {
"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,
33313,
1949,
12945,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
501,
33313,
2959,
741,
9559,
11,
1848,
1669,
2943,
2234,
12945,
5378,
19047,
1507,
2092,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
1949,
12945,
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... | 3 |
func TestGenerateAuth(t *testing.T) {
workDir, err := os.Getwd()
require.NoError(t, err)
ui := termui.New(&bytes.Buffer{}, ioutil.Discard, nil)
f := NewFissileApplication(".", ui)
torReleasePath := filepath.Join(workDir, "../test-assets/tor-boshrelease")
roleManifestPath := filepath.Join(workDir, "../test-asset... | explode_data.jsonl/47764 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2477
} | [
2830,
3393,
31115,
5087,
1155,
353,
8840,
836,
8,
341,
97038,
6184,
11,
1848,
1669,
2643,
2234,
6377,
741,
17957,
35699,
1155,
11,
1848,
692,
37278,
1669,
4647,
1963,
7121,
2099,
9651,
22622,
22655,
43144,
909,
47560,
11,
2092,
340,
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... | 2 |
func TestGETPlayer(t *testing.T) {
t.Run("returns Pepper's score", func(t *testing.T) {
request, _ := http.NewRequest(http.MethodGet, "/players/Pepper", nil)
response := httptest.NewRecorder()
PlayerServer(response, request)
got := response.Body.String()
want := "20"
if got != want {
t.Errorf("got %... | explode_data.jsonl/24872 | {
"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,
3806,
4476,
1155,
353,
8840,
836,
8,
220,
341,
3244,
16708,
445,
4216,
51782,
594,
5456,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
23555,
11,
716,
1669,
1758,
75274,
19886,
20798,
1949,
11,
3521,
18312,
14,
10197,
6922... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_getCronInterruptCompensateInterval1(t *testing.T) {
type args struct {
interval int64
}
tests := []struct {
name string
args args
want time.Duration
}{
{
args: args{interval: 5},
name: "normal",
want: 5 * time.Minute * 2,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *test... | explode_data.jsonl/18876 | {
"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,
3062,
34,
2248,
22528,
13552,
724,
349,
10256,
16,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
2084,
6152,
526,
21,
19,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNilApplyArg(t *testing.T) {
const SCRIPT = `
(function x(a, b) {
return a === undefined && b === 1;
}).apply(this, [,1])
`
testScript1(SCRIPT, valueTrue, t)
} | explode_data.jsonl/10493 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 81
} | [
2830,
3393,
19064,
28497,
2735,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
197,
2920,
856,
2877,
11,
293,
8,
341,
197,
853,
264,
2049,
5614,
1009,
293,
2049,
220,
16,
280,
286,
8533,
10280,
1394,
11,
78168,
16,
2546,
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 |
func TestFindExistingPrefix(t *testing.T) {
defaultPerm := os.FileMode(0750)
tests := []struct {
name string
// Function that prepares directory structure for the test under given
// base.
prepare func(base string) error
path string
expectedPath string
expectedDirs []string
expectError b... | explode_data.jsonl/76958 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1467
} | [
2830,
3393,
9885,
53067,
14335,
1155,
353,
8840,
836,
8,
341,
11940,
81245,
1669,
2643,
8576,
3636,
7,
15,
22,
20,
15,
340,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
197,
322,
5712,
429,
47442,
6220,
5944,
369,
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,
1... | 1 |
func TestCancelJobInvalidResponse(t *testing.T) {
httpmock.Activate()
defer httpmock.DeactivateAndReset()
ctx := context.Background()
responder, _ := httpmock.NewJsonResponder(200, invalidTestResponse)
httpmock.RegisterResponder("POST", fakeCancelURL, responder)
client := getTestJobManagerClient()
resp, err := ... | explode_data.jsonl/32371 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 146
} | [
2830,
3393,
9269,
12245,
7928,
2582,
1155,
353,
8840,
836,
8,
341,
28080,
16712,
14140,
731,
741,
16867,
1758,
16712,
8934,
16856,
3036,
14828,
741,
20985,
1669,
2266,
19047,
741,
10202,
20328,
11,
716,
1669,
1758,
16712,
7121,
5014,
3088... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseRevisionErr(t *testing.T) {
data := []uint32{0, 1, 0xa, 0xb, 0xc, 0x16}
for i, v := range data {
if _, err := parseRevision(v); err == nil {
t.Fatalf("#%d: unexpected success for %#x", i, v)
}
}
} | explode_data.jsonl/11565 | {
"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,
14463,
33602,
7747,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
3056,
2496,
18,
17,
90,
15,
11,
220,
16,
11,
220,
15,
9591,
11,
220,
15,
7929,
11,
220,
15,
8148,
11,
220,
15,
87,
16,
21,
532,
2023,
600,
11,
348,
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... | 3 |
func TestIDPCanHandleRequestWithExistingSession(t *testing.T) {
test := NewIdentifyProviderTest(t)
test.IDP.SessionProvider = &mockSessionProvider{
GetSessionFunc: func(w http.ResponseWriter, r *http.Request, req *IdpAuthnRequest) *Session {
return &Session{
ID: "f00df00df00d",
UserName: "alice",
... | explode_data.jsonl/19824 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 324
} | [
2830,
3393,
915,
4872,
276,
6999,
1900,
2354,
53067,
5283,
1155,
353,
8840,
836,
8,
341,
18185,
1669,
1532,
28301,
1437,
5179,
2271,
1155,
340,
18185,
9910,
47,
20674,
5179,
284,
609,
16712,
5283,
5179,
515,
197,
37654,
5283,
9626,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestController(t *testing.T) {
clientset := fake.NewSimpleClientset()
s := NewController(instanceid.NewService("my-instanceid"), events.NewEventRecorderManager(fakekube.NewSimpleClientset()), 1, 1)
ctx := context.WithValue(context.TODO(), auth.WfKey, clientset)
_, err := s.ReceiveEvent(ctx, &eventpkg.EventReq... | explode_data.jsonl/69567 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 266
} | [
2830,
3393,
2051,
1155,
353,
8840,
836,
8,
341,
25291,
746,
1669,
12418,
7121,
16374,
2959,
746,
741,
1903,
1669,
1532,
2051,
21650,
307,
7121,
1860,
445,
2408,
73655,
307,
3975,
4357,
7121,
1556,
47023,
2043,
74138,
97717,
7121,
16374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTxnMultipleCoord(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)
s := createTestDB(t)
defer s.Stop()
ctx := context.Background()
txn := kv.NewTxn(ctx, s.DB, 0 /* gatewayNodeID */)
// Start the transaction.
key := roachpb.Key("a")
if _, err := txn.Get(ctx, key); err != nil {... | explode_data.jsonl/76891 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 516
} | [
2830,
3393,
31584,
77,
32089,
19437,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
16867,
1487,
77940,
1155,
568,
7925,
1155,
340,
1903,
1669,
1855,
2271,
3506,
1155,
340,
16867,
274,
30213,
2822,
20985,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFailover(t *testing.T) {
framework.NewTest(t).
RunParallel(func(ctx framework.TestContext) {
ctx.NewSubTest("CDS").
RequiresEnvironment(environment.Kube).
// TODO(https://github.com/istio/istio/issues/13812)
Label(label.Flaky).
RunParallel(func(ctx framework.TestContext) {
ns := nam... | explode_data.jsonl/10216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1351
} | [
2830,
3393,
19524,
1975,
1155,
353,
8840,
836,
8,
341,
1166,
5794,
7121,
2271,
1155,
4292,
197,
85952,
16547,
18552,
7502,
12626,
8787,
1972,
8,
1476,
298,
20985,
7121,
3136,
2271,
445,
34,
5936,
38609,
571,
197,
46961,
12723,
67591,
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 TestValidateVolumeCapabilities(t *testing.T) {
testCases := []struct {
name string
testFunc func(t *testing.T)
}{
{
name: "Volume ID missing ",
testFunc: func(t *testing.T) {
req := csi.ValidateVolumeCapabilitiesRequest{}
d, _ := NewFakeDriver(t)
expectedErr := status.Errorf(codes.Inv... | explode_data.jsonl/59396 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1478
} | [
2830,
3393,
17926,
18902,
55315,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
18185,
9626,
2915,
1155,
353,
8840,
836,
340,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
18902,
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 TestWriterPropAdvanced(t *testing.T) {
props := parquet.NewWriterProperties(
parquet.WithCompressionFor("gzip", compress.Codecs.Gzip),
parquet.WithCompressionFor("zstd", compress.Codecs.Zstd),
parquet.WithCompression(compress.Codecs.Snappy),
parquet.WithEncoding(parquet.Encodings.DeltaBinaryPacked),
par... | explode_data.jsonl/68538 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 360
} | [
2830,
3393,
6492,
2008,
35457,
1155,
353,
8840,
836,
8,
341,
77691,
1669,
1346,
23300,
7121,
6492,
7903,
1006,
197,
197,
1732,
23300,
26124,
81411,
2461,
445,
70996,
497,
24611,
20274,
4837,
1224,
9964,
1326,
197,
197,
1732,
23300,
26124,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBase64UserDataIsCorrectWhenFileProvided(t *testing.T) {
dir, err := ioutil.TempDir("", "awsuserdata")
assert.NoError(t, err, "Unable to create temporary directory.")
defer os.RemoveAll(dir)
userdata_path := filepath.Join(dir, "test-userdata.yml")
content := []byte("#cloud-config\nhostname: userdata-tes... | explode_data.jsonl/7429 | {
"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,
3978,
21,
19,
39485,
3872,
33092,
4498,
1703,
35819,
291,
1155,
353,
8840,
836,
8,
341,
48532,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
8635,
23496,
1138,
6948,
35699,
1155,
11,
1848,
11,
330,
17075,
311,
1855,
13340,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContextGetters(t *testing.T) {
r, _ := http.NewRequest("POST", "https://examlpe.com/", nil)
if _, err := GetAppName(r); err != errAppNameMissing {
t.Error(err)
}
r, _ = http.NewRequest("POST", "https://examlpe.com/?app=qaz", nil)
if app, err := GetAppName(r); app != "qaz" || err != nil {
t.Error("GetA... | explode_data.jsonl/45254 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 285
} | [
2830,
3393,
1972,
1949,
5045,
1155,
353,
8840,
836,
8,
341,
7000,
11,
716,
1669,
1758,
75274,
445,
2946,
497,
330,
2428,
1110,
327,
9467,
375,
905,
28105,
2092,
340,
743,
8358,
1848,
1669,
2126,
87994,
2601,
1215,
1848,
961,
1848,
879... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDescribeConfigsRequestv1(t *testing.T) {
t.Parallel()
request := &DescribeConfigsRequest{
Version: 1,
Resources: []*ConfigResource{
{
Type: TopicResource,
Name: "foo",
},
},
IncludeSynonyms: true,
}
testRequest(t, "one topic, all configs", request, singleDescribeConfigsRequestAllConf... | explode_data.jsonl/40238 | {
"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,
74785,
84905,
1900,
85,
16,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
23555,
1669,
609,
74785,
84905,
1900,
515,
197,
77847,
25,
220,
16,
345,
197,
197,
11277,
25,
29838,
2648,
4783,
515,
298,
197,
515,
571,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRWFileModTimeWithOpenWriters(t *testing.T) {
r, vfs, fh, cleanup := rwHandleCreateWriteOnly(t)
defer cleanup()
if !canSetModTime(t, r) {
t.Skip("can't set mod time")
}
mtime := time.Date(2012, time.November, 18, 17, 32, 31, 0, time.UTC)
_, err := fh.Write([]byte{104, 105})
require.NoError(t, err)
... | explode_data.jsonl/7352 | {
"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,
56368,
1703,
4459,
1462,
2354,
5002,
54,
31829,
1155,
353,
8840,
836,
8,
341,
7000,
11,
92941,
11,
36075,
11,
21290,
1669,
25991,
6999,
4021,
7985,
7308,
1155,
340,
16867,
21290,
741,
743,
753,
4814,
1649,
4459,
1462,
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... | 3 |
func TestStdFixed(t *testing.T) {
testenv.MustHaveGoBuild(t)
if testing.Short() && testenv.Builder() == "" {
t.Skip("skipping in short mode")
}
testTestDir(t, filepath.Join(runtime.GOROOT(), "test", "fixedbugs"),
"bug248.go", "bug302.go", "bug369.go", // complex test instructions - ignore
"issue6889.go", ... | explode_data.jsonl/53277 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 473
} | [
2830,
3393,
22748,
13520,
1155,
353,
8840,
836,
8,
341,
18185,
3160,
50463,
12116,
10850,
11066,
1155,
692,
743,
7497,
55958,
368,
1009,
1273,
3160,
15641,
368,
621,
1591,
341,
197,
3244,
57776,
445,
4886,
5654,
304,
2805,
3856,
1138,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestIntegration(t *testing.T) {
if !utils.MeetsRequirements(requiredSuiteTools, requiredSuiteEnvs) {
fmt.Println("Missing required tools")
os.Exit(1)
}
RegisterFailHandler(Fail)
RunSpecs(t, "Build/Stapel Image/Docker Instructions Suite")
} | explode_data.jsonl/12242 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
3393,
52464,
1155,
353,
8840,
836,
8,
341,
743,
753,
6031,
53447,
1415,
59202,
40087,
28000,
16583,
11,
2567,
28000,
1702,
11562,
8,
341,
197,
11009,
12419,
445,
25080,
2567,
7375,
1138,
197,
25078,
34358,
7,
16,
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
] | 2 |
func TestBacksUpExisting(t *testing.T) {
tests := []struct {
name string
target string
existing []string
expect []string
}{
{
name: "empty",
target: "/tmp/installer",
existing: []string{},
expect: []string{},
},
{
name: "backs up file",
target: "/tmp/installer",
ex... | explode_data.jsonl/29299 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 618
} | [
2830,
3393,
3707,
82,
2324,
53067,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
28861,
256,
914,
198,
197,
8122,
11083,
3056,
917,
198,
197,
24952,
256,
3056,
917,
198,
197,
59403,
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 TestRunJobIfExists(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++
}
requir... | explode_data.jsonl/44214 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
6727,
12245,
40232,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteWithCollisions(t *testing.T) {
vec := NewGaugeVec(
GaugeOpts{
Name: "test",
Help: "helpless",
},
[]string{"l1", "l2"},
)
vec.hashAdd = func(h uint64, s string) uint64 { return 1 }
vec.hashAddByte = func(h uint64, b byte) uint64 { return 1 }
testDelete(t, vec)
} | explode_data.jsonl/14619 | {
"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,
6435,
2354,
15265,
6805,
1155,
353,
8840,
836,
8,
341,
40213,
1669,
1532,
38,
19392,
10050,
1006,
197,
9600,
19392,
43451,
515,
298,
21297,
25,
330,
1944,
756,
298,
197,
12689,
25,
330,
8653,
1717,
756,
197,
197,
1583,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateFromPassword_LongPassword(t *testing.T) {
t.Parallel()
key := NewEncryptionKey()
longPassword := make([]byte, 128)
_, err := io.ReadFull(rand.Reader, longPassword)
if err != nil {
t.Fatalf("Unexpected error reading from rand.Reader: %#v\n", err)
}
// Test that you can use 128 byte long passw... | explode_data.jsonl/54122 | {
"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,
31115,
3830,
4876,
88240,
4876,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
23634,
1669,
1532,
79239,
1592,
741,
17514,
4876,
1669,
1281,
10556,
3782,
11,
220,
16,
17,
23,
340,
197,
6878,
1848,
1669,
6399,
6503,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBulkInsertCommit(t *testing.T) {
tests := []struct {
vectors [][]float64
wants []int
}{
{
[][]float64{
{1, 0, 0, 0, 0, 0},
{0, 1, 0, 0, 0, 0},
{0, 0, 1, 0, 0, 0},
{0, 0, 0, 1, 0, 0},
{0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 1},
{1, 1, 0, 0, 0, 0},
},
[]int{1, 2, 3, 4, ... | explode_data.jsonl/31018 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 463
} | [
2830,
3393,
88194,
13780,
33441,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
5195,
10605,
52931,
3649,
21,
19,
198,
197,
6692,
1783,
256,
3056,
396,
198,
197,
59403,
197,
197,
515,
298,
197,
16613,
3649,
21,
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 TestUndoWRToDisk(t *testing.T) {
testDirPath, err := initTestEnv(t)
if err != nil {
t.Fatalf("init test environment failed: %s", err)
}
defer os.RemoveAll(testDirPath)
//block undo value is nil
blkUndo := undo.NewBlockUndo(1)
pos := block.NewDiskBlockPos(11, 12)
hash := util.HashFromString("000000002dd55... | explode_data.jsonl/39298 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 599
} | [
2830,
3393,
59815,
17925,
1249,
47583,
1155,
353,
8840,
836,
8,
341,
18185,
6184,
1820,
11,
1848,
1669,
2930,
2271,
14359,
1155,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
2327,
1273,
4573,
4641,
25,
1018,
82,
497,
1848,
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... | 8 |
func TestAgentCredentials(t *testing.T) {
// Make sure to pass travis check by disabling the logs
log := logging.NewDefaultLoggerFactory()
log.DefaultLogLevel = logging.LogLevelDisabled
// Agent should not require any of the usernames and password to be set
// If set, they should follow the default 16/128 bits ra... | explode_data.jsonl/50575 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 362
} | [
2830,
3393,
16810,
27025,
1155,
353,
8840,
836,
8,
341,
197,
322,
7405,
2704,
311,
1494,
10137,
285,
1779,
553,
60484,
279,
18422,
198,
6725,
1669,
8392,
7121,
3675,
7395,
4153,
741,
6725,
13275,
72676,
284,
8392,
5247,
4449,
25907,
271... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExemplar_FilteredLabels(t *testing.T) {
ms := NewExemplar()
assert.EqualValues(t, NewStringMap(), ms.FilteredLabels())
fillTestStringMap(ms.FilteredLabels())
testValFilteredLabels := generateTestStringMap()
assert.EqualValues(t, testValFilteredLabels, ms.FilteredLabels())
} | explode_data.jsonl/32771 | {
"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,
840,
25892,
277,
68935,
291,
23674,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
1532,
840,
25892,
277,
741,
6948,
12808,
6227,
1155,
11,
1532,
703,
2227,
1507,
9829,
31696,
291,
23674,
2398,
65848,
2271,
703,
2227,
35680,
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 Test_defaultModelBuilder_buildTargetType(t *testing.T) {
tests := []struct {
testName string
svc *corev1.Service
want elbv2.TargetType
enableIPTargetType *bool
wantErr error
}{
{
testName: "empty annotation",
svc: &corev1.Service{
Spec: cor... | explode_data.jsonl/40060 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3084
} | [
2830,
3393,
9993,
1712,
3297,
20801,
6397,
929,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
3056,
1235,
341,
197,
18185,
675,
1843,
914,
198,
197,
1903,
7362,
394,
353,
98645,
16,
13860,
198,
197,
50780,
2290,
655,
54929,
17,
35016,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.