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 TestExpirationNoSecretEnvelope(t *testing.T) {
l, err := zap.NewDevelopment()
assert.NoError(t, err)
removed := make(chan struct{})
logger := flogging.NewFabricLogger(l, zap.Hooks(func(entry zapcore.Entry) error {
if strings.Contains(entry.Message, "Removing member: Endpoint: foo") {
removed <- struct{}{... | explode_data.jsonl/62272 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 458
} | [
2830,
3393,
66301,
2753,
19773,
62712,
1155,
353,
8840,
836,
8,
341,
8810,
11,
1848,
1669,
32978,
7121,
39419,
741,
6948,
35699,
1155,
11,
1848,
692,
197,
45756,
1669,
1281,
35190,
2036,
37790,
17060,
1669,
282,
25263,
7121,
81731,
7395,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplicationRouterClearAllBinding(t *testing.T) {
router := createApplicationRouter(ctx, testSettings)
req, err := http.NewRequest(http.MethodDelete, "/clear", nil)
require.NoError(t, err)
resp := httptest.NewRecorder()
router.ServeHTTP(resp, req)
require.Equal(t, http.StatusOK, resp.Code)
require.Equal... | explode_data.jsonl/20251 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 135
} | [
2830,
3393,
4988,
9523,
14008,
2403,
15059,
1155,
353,
8840,
836,
8,
341,
67009,
1669,
1855,
4988,
9523,
7502,
11,
1273,
6086,
692,
24395,
11,
1848,
1669,
1758,
75274,
19886,
20798,
6435,
11,
3521,
7422,
497,
2092,
340,
17957,
35699,
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 TestTableNameRestore(t *testing.T) {
testCases := []NodeRestoreTestCase{
{"dbb.`tbb1`", "`dbb`.`tbb1`"},
{"`tbb2`", "`tbb2`"},
{"tbb3", "`tbb3`"},
{"dbb.`hello-world`", "`dbb`.`hello-world`"},
{"`dbb`.`hello-world`", "`dbb`.`hello-world`"},
{"`dbb.HelloWorld`", "`dbb.HelloWorld`"},
}
extractNodeFunc... | explode_data.jsonl/27566 | {
"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,
33227,
56284,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1955,
56284,
16458,
515,
197,
197,
4913,
1999,
65,
14908,
83,
6066,
16,
63,
497,
35973,
1999,
65,
28905,
83,
6066,
16,
63,
7115,
197,
197,
4913,
63,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRuntimeBcryptCompare(t *testing.T) {
modules := map[string]string{
"test": `
local nakama = require("nakama")
function test(ctx, payload)
return tostring(nakama.bcrypt_compare(payload, "something_to_encrypt"))
end
nakama.register_rpc(test, "test")`,
}
runtime, err := runtimeWithModules(t, modules)
if e... | explode_data.jsonl/59790 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 294
} | [
2830,
3393,
15123,
33,
48125,
27374,
1155,
353,
8840,
836,
8,
341,
42228,
2425,
1669,
2415,
14032,
30953,
515,
197,
197,
1,
1944,
788,
22074,
2438,
40886,
3029,
284,
1373,
445,
42874,
3029,
1138,
1688,
1273,
7502,
11,
7729,
340,
853,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOCIPacker(t *testing.T) {
test.DropPrivilege(t)
defer test.ResetPrivilege(t)
b, err := types.NewBundle("", "sbuild-oci")
if err != nil {
return
}
b.Recipe, err = types.NewDefinitionFromURI(dockerURI)
if err != nil {
t.Fatalf("unable to parse URI %s: %v\n", dockerURI, err)
}
ocp := &sources.OCIC... | explode_data.jsonl/48102 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 297
} | [
2830,
3393,
7612,
3298,
9683,
1155,
353,
8840,
836,
8,
341,
18185,
21688,
32124,
42769,
1155,
340,
16867,
1273,
36660,
32124,
42769,
1155,
692,
2233,
11,
1848,
1669,
4494,
7121,
8409,
19814,
330,
82,
5834,
12,
2119,
1138,
743,
1848,
961... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnclaveRegistry_Register(t *testing.T) {
ercc := NewTestErcc()
stub := shim.NewMockStub("ercc", ercc)
stub.Decorations["keyPEM"] = []byte(mock.MOCK_KeyPEM)
stub.Decorations["certPEM"] = []byte(mock.MOCK_CertPEM)
// Init
th.CheckInit(t, stub, [][]byte{})
// invoke registerEnclave
th.CheckInvoke(t, stu... | explode_data.jsonl/74156 | {
"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,
1702,
40533,
15603,
73124,
1155,
353,
8840,
836,
8,
341,
197,
261,
638,
1669,
1532,
2271,
19462,
638,
741,
18388,
392,
1669,
62132,
7121,
11571,
33838,
445,
261,
638,
497,
2714,
638,
340,
18388,
392,
22442,
269,
804,
1183,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWithinDurationWrapper(t *testing.T) {
assert := New(t)
mockAssert := New(new(testing.T))
a := time.Now()
b := a.Add(10 * time.Second)
assert.True(mockAssert.WithinDuration(a, b, 10*time.Second), "A 10s difference is within a 10s time difference")
assert.True(mockAssert.WithinDuration(b, a, 10*time.Secon... | explode_data.jsonl/54984 | {
"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,
41961,
12945,
11542,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
1532,
1155,
340,
77333,
8534,
1669,
1532,
1755,
8623,
287,
836,
1171,
11323,
1669,
882,
13244,
741,
2233,
1669,
264,
1904,
7,
16,
15,
353,
882,
32435,
692,
694... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGet(t *testing.T) {
tests := []struct {
name string
key func(string) interface{}
}{
{name: "string", key: s2sKey},
{name: "[]byte", key: s2bKey},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
m := &HashMap{}
elephant := "elephant"
val, ok := m.Get(tt.key("animal")) /... | explode_data.jsonl/24425 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 378
} | [
2830,
3393,
1949,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
23634,
220,
2915,
3609,
8,
3749,
16094,
197,
59403,
197,
197,
47006,
25,
330,
917,
497,
1376,
25,
274,
17,
82,
1592,
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 TestCertsSubCommandsHasFlags(t *testing.T) {
subCmds := getCertsSubCommands(phaseTestK8sVersion)
commonFlags := []string{
"cert-dir",
"config",
}
var tests = []struct {
command string
additionalFlags []string
}{
{
command: "all",
additionalFlags: []string{
"apiserver-advertise-a... | explode_data.jsonl/74288 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 546
} | [
2830,
3393,
34,
15546,
3136,
30479,
10281,
9195,
1155,
353,
8840,
836,
8,
1476,
28624,
15613,
82,
1669,
43099,
15546,
3136,
30479,
97085,
2271,
42,
23,
82,
5637,
692,
83825,
9195,
1669,
3056,
917,
515,
197,
197,
1,
12246,
45283,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestExecutorDriverRunTaskEvent(t *testing.T) {
setTestEnv(t)
ch := make(chan bool, 2)
// Mock Slave process to respond to registration event.
server := testutil.NewMockSlaveHttpServer(t, func(rsp http.ResponseWriter, req *http.Request) {
reqPath, err := url.QueryUnescape(req.URL.String())
assert.NoError(t,... | explode_data.jsonl/76149 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 548
} | [
2830,
3393,
25255,
11349,
6727,
6262,
1556,
1155,
353,
8840,
836,
8,
341,
8196,
2271,
14359,
1155,
340,
23049,
1669,
1281,
35190,
1807,
11,
220,
17,
340,
197,
322,
14563,
59368,
1882,
311,
5889,
311,
12227,
1538,
624,
41057,
1669,
1273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewP2SHScriptPubKey(t *testing.T) {
testRedeemScriptHashString := "51d9ac622c2133ca4aaf58d4a4239526eb42c348"
testScriptPubKeyHex := "a91451d9ac622c2133ca4aaf58d4a4239526eb42c34887"
redeemScriptHash, _ := hex.DecodeString(testRedeemScriptHashString)
scriptPubKey, err := NewP2SHScriptPubKey(redeemScriptHash... | explode_data.jsonl/67117 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 229
} | [
2830,
3393,
3564,
47,
17,
8590,
5910,
29162,
1592,
1155,
353,
8840,
836,
8,
341,
18185,
6033,
68,
336,
5910,
6370,
703,
1669,
330,
20,
16,
67,
24,
580,
21,
17,
17,
66,
17,
16,
18,
18,
924,
19,
64,
2577,
20,
23,
67,
19,
64,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApigeeFaultHeader(t *testing.T) {
headers := map[string]string{
headerAPI: "api",
}
envSpec := createAuthEnvSpec()
envSpec.APIs[0].Authentication.Disabled = true
specExt, err := config.NewEnvironmentSpecExt(&envSpec)
if err != nil {
t.Fatalf("%v", err)
}
specExtID := "fineSpecBadRequest"
req := t... | explode_data.jsonl/73194 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 915
} | [
2830,
3393,
10611,
343,
2127,
58780,
4047,
1155,
353,
8840,
836,
8,
341,
67378,
1669,
2415,
14032,
30953,
515,
197,
20883,
7082,
25,
330,
2068,
756,
197,
532,
57538,
8327,
1669,
1855,
5087,
14359,
8327,
741,
57538,
8327,
24922,
82,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCollection_Aggregate(t *testing.T) {
mgoClient := Ins()
cursor, err := mgoClient.C("test").Aggregate(bson.A{bson.D{bson.E{Key: "$skip", Value: 1}}})
if err != nil {
t.Errorf("Aggregate error: %s", err)
t.FailNow()
}
resultAll := bson.A{}
if err := cursor.All(&resultAll); err != nil {
t.Errorf("Agg... | explode_data.jsonl/30097 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 170
} | [
2830,
3393,
6482,
1566,
70,
14240,
1155,
353,
8840,
836,
8,
341,
2109,
3346,
2959,
1669,
9726,
741,
55948,
11,
1848,
1669,
296,
3346,
2959,
727,
445,
1944,
1827,
64580,
1883,
930,
875,
90,
91723,
909,
90,
91723,
5142,
90,
1592,
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 TestPullCleanUpAfterMerge(t *testing.T) {
onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) {
session := loginUser(t, "user1")
testRepoFork(t, session, "user2", "repo1", "user1", "repo1")
testEditFileToNewBranch(t, session, "user1", "repo1", "master", "feature/test", "README.md", "Hello, World (Edited - T... | explode_data.jsonl/70637 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 506
} | [
2830,
3393,
36068,
27529,
2324,
6025,
52096,
1155,
353,
8840,
836,
8,
341,
24630,
38,
632,
64,
6727,
1155,
11,
2915,
1155,
353,
8840,
836,
11,
342,
632,
64,
3144,
353,
1085,
20893,
8,
341,
197,
25054,
1669,
87169,
1155,
11,
330,
872... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientConnPing(t *testing.T) {
st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {}, optOnlyServer)
defer st.Close()
tr := &Transport{TLSClientConfig: tlsConfigInsecure}
defer tr.CloseIdleConnections()
cc, err := tr.dialClientConn(st.ts.Listener.Addr().String(), false)
if err != nil {... | explode_data.jsonl/16134 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 160
} | [
2830,
3393,
2959,
9701,
69883,
1155,
353,
8840,
836,
8,
341,
18388,
1669,
501,
5475,
58699,
1155,
11,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
16452,
3387,
7308,
5475,
340,
16867,
357,
10421,
741,
25583,
1669,
609,
27560,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigValidate(t *testing.T) {
assert := assert.New(t)
// Install new logger + hook
var hook *test.Hook
log, hook = test.NewNullLogger()
log.ExitFunc = func(code int) {}
// Validate defualt config + rule error
c, _ := NewConfig([]string{
"--rule.1.action=bad",
})
c.Validate()
logs := hook.AllEnt... | explode_data.jsonl/33761 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 485
} | [
2830,
3393,
2648,
17926,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
197,
322,
19242,
501,
5925,
488,
9704,
198,
2405,
9704,
353,
1944,
3839,
1941,
198,
6725,
11,
9704,
284,
1273,
7121,
3280,
7395,
741,
6725,
3435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssuanceSession(t *testing.T) {
id := irma.NewAttributeTypeIdentifier("irma-demo.RU.studentCard.studentID")
request := getCombinedIssuanceRequest(id)
sessionHelper(t, request, "issue", nil)
} | explode_data.jsonl/69990 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 73
} | [
2830,
3393,
28216,
84,
681,
5283,
1155,
353,
8840,
836,
8,
341,
15710,
1669,
6216,
1728,
7121,
3907,
929,
8714,
445,
44011,
58893,
2013,
52,
40113,
5770,
40113,
915,
1138,
23555,
1669,
633,
94268,
28216,
84,
681,
1900,
3724,
340,
25054,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDockerCLIBuild(t *testing.T) {
tests := []struct {
description string
localBuild latest.LocalBuild
mode config.RunMode
extraEnv []string
expectedEnv []string
}{
{
description: "docker build",
localBuild: latest.LocalBuild{},
mode: config.RunModes.Dev,
expectedEnv: [... | explode_data.jsonl/64404 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1036
} | [
2830,
3393,
35,
13659,
3140,
3256,
1498,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
42407,
914,
198,
197,
8854,
11066,
220,
5535,
20856,
11066,
198,
197,
60247,
286,
2193,
16708,
3636,
198,
197,
8122,
2172,
14359,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMinMaxSumCountPropagatesErrors(t *testing.T) {
// ErrNoData should be returned by both the Min and Max values of
// a MinMaxSumCount Aggregator. Use this fact to check the error is
// correctly returned.
mmsc := minmaxsumcount.New(&metric.Descriptor{})
_, _, _, _, err := minMaxSumCountValues(mmsc)
assert... | explode_data.jsonl/70790 | {
"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,
92304,
9190,
2507,
2008,
351,
973,
13877,
1155,
353,
8840,
836,
8,
341,
197,
322,
15495,
2753,
1043,
1265,
387,
5927,
553,
2176,
279,
3386,
323,
7487,
2750,
315,
198,
197,
322,
264,
3386,
5974,
9190,
2507,
4598,
58131,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRpiDriver_GetPWMChannel(t *testing.T) {
s := Settings{}
s.PWMFreq = 100
pd, rec := pwm.Noop()
d, err := NewAdapter(s, pd, NoopPinFactory)
if err != nil {
t.Error(err)
}
pwmDriver := hal.PWMDriver(d)
ch, err := pwmDriver.PWMChannel(0)
if err != nil {
t.Errorf("unexpected error getting pwm channel ... | explode_data.jsonl/73378 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 310
} | [
2830,
3393,
49,
2493,
11349,
13614,
80474,
9629,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
11296,
16094,
1903,
1069,
15210,
55096,
284,
220,
16,
15,
15,
198,
3223,
67,
11,
1395,
1669,
64551,
16766,
453,
741,
2698,
11,
1848,
1669,
1532... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHeaderParserWithoutAcceptHeader(t *testing.T) {
req, _ := http.NewRequest("GET", "/", nil)
req.Header.Set(RawQueryHTTPHeader, "foobar")
logger := log.New(log.Error)
handler := HeaderParser(func(_ http.ResponseWriter, r *http.Request) {
rawQuery := r.Context().Value(RawQueryContextKey)
if rawQuery != ni... | explode_data.jsonl/75105 | {
"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,
4047,
6570,
26040,
16646,
4047,
1155,
353,
8840,
836,
8,
341,
24395,
11,
716,
1669,
1758,
75274,
445,
3806,
497,
64657,
2092,
340,
24395,
15753,
4202,
2785,
672,
2859,
98752,
11,
330,
50267,
1138,
17060,
1669,
1487,
7121,
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... | 2 |
func Test_StubBoletoRequest_WhenCreateAndSetBoletoRequest_ReturnBoletoRequestSuccessful(t *testing.T) {
expectedAgreementNumber := uint(1234)
expectedAgreementAgency := "1234"
expectedAgreementAccount := "123456"
expectedAmountInCents := uint64(100)
expectedExpirationDate := time.Now()
expectedOurNumber := uint(... | explode_data.jsonl/55970 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 631
} | [
2830,
3393,
62,
33838,
1233,
273,
983,
1900,
62,
4498,
4021,
3036,
1649,
1233,
273,
983,
1900,
53316,
1233,
273,
983,
1900,
36374,
1155,
353,
8840,
836,
8,
1476,
42400,
9042,
17150,
2833,
1669,
2622,
7,
16,
17,
18,
19,
340,
42400,
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... | 1 |
func TestDoltTransactionCommitOneClient(t *testing.T) {
if types.IsFormat_DOLT_1(types.Format_Default) {
t.Skip()
}
// In this test, we're setting only one client to match transaction commits to dolt commits.
// Autocommit is disabled for the enabled client, as it's the recommended way to use this feature.
harn... | explode_data.jsonl/5287 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1859
} | [
2830,
3393,
35,
6181,
8070,
33441,
3966,
2959,
1155,
353,
8840,
836,
8,
341,
743,
4494,
4506,
4061,
1557,
35320,
62,
16,
52613,
9978,
60336,
8,
341,
197,
3244,
57776,
741,
197,
630,
197,
322,
758,
419,
1273,
11,
582,
2299,
6243,
117... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnkownStorageURIPrefixFails(t *testing.T) {
g := gomega.NewGomegaWithT(t)
kfsvc := makeTestKFService()
kfsvc.Spec.Default.Predictor.Tensorflow.StorageURI = "blob://foo/bar"
g.Expect(kfsvc.ValidateCreate()).ShouldNot(gomega.Succeed())
} | explode_data.jsonl/7095 | {
"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,
1806,
74,
779,
5793,
1511,
3298,
5060,
37,
6209,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
340,
16463,
69,
58094,
1669,
1281,
2271,
65008,
1860,
741,
16463,
69,
58094,
36473,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateBlockedDependencies(t *testing.T) {
assert := assert.New(t)
assert.NoError(db.ClearCollections(task.Collection, build.Collection))
b := build.Build{Id: "build0"}
tasks := []task.Task{
{
Id: "t0",
BuildId: b.Id,
Status: evergreen.TaskFailed,
},
{
Id: "t1",
BuildId: b.I... | explode_data.jsonl/60452 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1493
} | [
2830,
3393,
4289,
95847,
48303,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
6948,
35699,
9791,
13524,
52730,
17483,
28629,
11,
1936,
28629,
4390,
2233,
1669,
1936,
25212,
90,
764,
25,
330,
5834,
15,
16707,
3244,
460... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFixedOffsetDecoder_Codec(t *testing.T) {
encoder := NewFixedOffsetEncoder()
data := encoder.MarshalBinary()
assert.Len(t, data, 0)
assert.Equal(t, 0, encoder.Size())
encoder.FromValues([]int{
0,
1,
1 << 8,
(1 << 8) + 1,
1 << 16,
(1 << 16) + 1,
1 << 24,
1<<24 + 1,
})
assert.Equal(t, 8, e... | explode_data.jsonl/13579 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 522
} | [
2830,
3393,
13520,
6446,
20732,
38084,
66,
1155,
353,
8840,
836,
8,
341,
197,
27008,
1669,
1532,
13520,
6446,
19921,
741,
8924,
1669,
23668,
37271,
21338,
741,
6948,
65819,
1155,
11,
821,
11,
220,
15,
340,
6948,
12808,
1155,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAutopilot_CleanupStaleRaftServer(t *testing.T) {
t.Parallel()
dir1, s1 := testServerDCBootstrap(t, "dc1", true)
defer os.RemoveAll(dir1)
defer s1.Shutdown()
dir2, s2 := testServerDCBootstrap(t, "dc1", false)
defer os.RemoveAll(dir2)
defer s2.Shutdown()
dir3, s3 := testServerDCBootstrap(t, "dc1", fals... | explode_data.jsonl/27414 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 515
} | [
2830,
3393,
19602,
453,
23958,
920,
60639,
623,
1574,
55535,
723,
5475,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
48532,
16,
11,
274,
16,
1669,
1273,
5475,
5626,
45511,
1155,
11,
330,
7628,
16,
497,
830,
340,
16867,
2643,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSum_IsMonotonic(t *testing.T) {
ms := NewSum()
assert.EqualValues(t, false, ms.IsMonotonic())
testValIsMonotonic := true
ms.SetIsMonotonic(testValIsMonotonic)
assert.EqualValues(t, testValIsMonotonic, ms.IsMonotonic())
} | explode_data.jsonl/32699 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 95
} | [
2830,
3393,
9190,
31879,
11095,
354,
14011,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
1532,
9190,
741,
6948,
12808,
6227,
1155,
11,
895,
11,
9829,
4506,
11095,
354,
14011,
2398,
18185,
2208,
3872,
11095,
354,
14011,
1669,
830,
198,
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... | 1 |
func TestChangeTrustMaxLimit(t *testing.T) {
kp0 := newKeypair0()
txSourceAccount := NewSimpleAccount(kp0.Address(), int64(9605939170639898))
changeTrust := ChangeTrust{
Line: CreditAsset{"ABCD", kp0.Address()},
}
tx := Transaction{
SourceAccount: &txSourceAccount,
Operations: []Operation{&changeTrust},... | explode_data.jsonl/62198 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 616
} | [
2830,
3393,
4072,
45548,
5974,
16527,
1155,
353,
8840,
836,
8,
341,
16463,
79,
15,
1669,
501,
6608,
1082,
1310,
15,
741,
46237,
3608,
7365,
1669,
1532,
16374,
7365,
5969,
79,
15,
26979,
1507,
526,
21,
19,
7,
24,
21,
15,
20,
24,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSprites(t *testing.T) {
const (
width = 512
height = 512
)
src, _ := NewImage(4, 4, FilterNearest)
src.Fill(color.RGBA{0xff, 0xff, 0xff, 0xff})
dst, _ := NewImage(width, height, FilterNearest)
for j := 0; j < height/4; j++ {
for i := 0; i < width/4; i++ {
op := &DrawImageOptions{}
op.GeoM.T... | explode_data.jsonl/10908 | {
"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,
74911,
1155,
353,
8840,
836,
8,
341,
4777,
2399,
197,
24219,
220,
284,
220,
20,
16,
17,
198,
197,
30500,
284,
220,
20,
16,
17,
198,
197,
692,
41144,
11,
716,
1669,
1532,
1906,
7,
19,
11,
220,
19,
11,
12339,
8813,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHsl(t *testing.T) {
validate := New()
s := "hsl(360,100%,50%)"
errs := validate.Var(s, "hsl")
Equal(t, errs, nil)
s = "hsl(0,0%,0%)"
errs = validate.Var(s, "hsl")
Equal(t, errs, nil)
s = "hsl(361,100%,50%)"
errs = validate.Var(s, "hsl")
NotEqual(t, errs, nil)
AssertError(t, errs, "", "", "", "",... | explode_data.jsonl/77319 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 425
} | [
2830,
3393,
39,
3226,
1155,
353,
8840,
836,
8,
1476,
197,
7067,
1669,
1532,
2822,
1903,
1669,
330,
71,
3226,
7,
18,
21,
15,
11,
16,
15,
15,
13384,
20,
15,
11334,
698,
9859,
82,
1669,
9593,
87968,
1141,
11,
330,
71,
3226,
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... | 1 |
func TestBuildByteSize(t *testing.T) {
cases := []struct {
value interface{}
isOffset bool
expected bool
}{
{"1000", false, true},
{"1000k", false, true},
{"1m", false, true},
{"10g", false, false},
{" 1m ", false, true},
{"1000kk", false, false},
{"1000km", false, false},
{"1mm", false, fals... | explode_data.jsonl/80585 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 272
} | [
2830,
3393,
11066,
7153,
1695,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
16309,
262,
3749,
16094,
197,
19907,
6446,
1807,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
4913,
16,
15,
15,
15,
497,
895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMemSeries_append(t *testing.T) {
s := newMemSeries(labels.Labels{}, 1, 500)
// Add first two samples at the very end of a chunk range and the next two
// on and after it.
// New chunk must correctly be cut at 1000.
ok, chunkCreated := s.append(998, 1)
testutil.Assert(t, ok, "append failed")
testutil.As... | explode_data.jsonl/38167 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 565
} | [
2830,
3393,
18816,
25544,
26041,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
501,
18816,
25544,
36915,
4679,
82,
22655,
220,
16,
11,
220,
20,
15,
15,
692,
197,
322,
2691,
1156,
1378,
10469,
518,
279,
1602,
835,
315,
264,
11879,
2088,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetKubeConfigPath(t *testing.T) {
conf, cleanup := testutil.InitConfig(t)
defer cleanup(t)
testPath := "/tmp/kubeconfig"
assert.NotEqual(t, testPath, conf.KubeConfigPath())
conf.SetKubeConfigPath(testPath)
assert.Equal(t, testPath, conf.KubeConfigPath())
} | explode_data.jsonl/57900 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
1649,
42,
3760,
2648,
1820,
1155,
353,
8840,
836,
8,
341,
67850,
11,
21290,
1669,
1273,
1314,
26849,
2648,
1155,
340,
16867,
21290,
1155,
692,
18185,
1820,
1669,
3521,
5173,
14109,
3760,
1676,
1837,
6948,
15000,
2993,
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 TestCreateOAuthApp(t *testing.T) {
th := Setup().InitBasic()
defer th.TearDown()
Client := th.Client
AdminClient := th.SystemAdminClient
defaultRolePermissions := th.SaveDefaultRolePermissions()
enableOAuthServiceProvider := th.App.Config().ServiceSettings.EnableOAuthServiceProvider
defer func() {
th.Res... | explode_data.jsonl/30124 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 847
} | [
2830,
3393,
4021,
57850,
2164,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
71724,
1669,
270,
11716,
198,
197,
7210,
2959,
1669,
270,
16620,
7210,
2959,
271,
11940,
9030,
238... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientTimeout(t *testing.T) {
if testing.Short() {
t.Skip("skipping timeout test in short mode") // Because it takes at least 3 seconds to run.
}
resetTest()
client := &http.Client{
Transport: NewMemoryCacheTransport(),
Timeout: time.Second,
}
started := time.Now()
resp, err := client.Get(s.serv... | explode_data.jsonl/77645 | {
"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,
2959,
7636,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
9632,
1273,
304,
2805,
3856,
899,
442,
9211,
432,
4990,
518,
3245,
220,
18,
6486,
311,
1598,
624,
197,
532,
70343,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWrapWithRawString(t *testing.T) {
assert.Equal(t, "``", wrapWithRawString("", false))
assert.Equal(t, "``", wrapWithRawString("``", false))
assert.Equal(t, "`a`", wrapWithRawString("a", false))
assert.Equal(t, "a", wrapWithRawString("a", true))
assert.Equal(t, "` `", wrapWithRawString(" ", false))
} | explode_data.jsonl/6516 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 127
} | [
2830,
3393,
26787,
2354,
20015,
703,
1155,
353,
8840,
836,
8,
341,
6948,
12808,
1155,
11,
330,
13874,
497,
15061,
2354,
20015,
703,
19814,
895,
1171,
6948,
12808,
1155,
11,
330,
13874,
497,
15061,
2354,
20015,
703,
445,
13874,
497,
895,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLimitedOrg(t *testing.T) {
defer prepareTestEnv(t)()
// not logged in user
req := NewRequest(t, "GET", "/limited_org")
MakeRequest(t, req, http.StatusNotFound)
req = NewRequest(t, "GET", "/limited_org/public_repo_on_limited_org")
MakeRequest(t, req, http.StatusNotFound)
req = NewRequest(t, "GET", "/lim... | explode_data.jsonl/47026 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 434
} | [
2830,
3393,
74477,
42437,
1155,
353,
8840,
836,
8,
341,
16867,
10549,
2271,
14359,
1155,
8,
2822,
197,
322,
537,
13726,
304,
1196,
198,
24395,
1669,
1532,
1900,
1155,
11,
330,
3806,
497,
3521,
18235,
35583,
1138,
197,
8078,
1900,
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 TestHTTPSyncResponseHeaders(t *testing.T) {
t.Parallel()
reg := apiRegMutWrapper{mut: &http.ServeMux{}}
mgr, err := manager.New(manager.NewConfig(), reg, log.Noop(), metrics.Noop())
if err != nil {
t.Fatal(err)
}
conf := input.NewConfig()
conf.HTTPServer.Path = "/testpost"
conf.HTTPServer.Response.Head... | explode_data.jsonl/40364 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 818
} | [
2830,
3393,
9230,
12154,
2582,
10574,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
37013,
1669,
6330,
3477,
51440,
11542,
90,
6984,
25,
609,
1254,
83535,
44,
2200,
6257,
532,
2109,
901,
11,
1848,
1669,
6645,
7121,
55168,
7121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestCompile_exposed_error(t *testing.T) {
_, err := expr.Compile(`1 == true`)
require.Error(t, err)
fileError, ok := err.(*file.Error)
require.True(t, ok, "error should be of type *file.Error")
require.Equal(t, "invalid operation: == (mismatched types int and bool) (1:3)\n | 1 == true\n | ..^", fileError.Err... | explode_data.jsonl/36914 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 239
} | [
2830,
3393,
46126,
2702,
3865,
4096,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
15169,
89323,
5809,
16,
621,
830,
24183,
17957,
6141,
1155,
11,
1848,
692,
17661,
1454,
11,
5394,
1669,
1848,
41399,
1192,
6141,
340,
17957,
32443... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNone(t *testing.T) {
b := New(80)
if !b.None() {
t.Error("None failed")
}
b.Set(10)
if b.None() {
t.Error("None failed")
}
} | explode_data.jsonl/73899 | {
"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,
4064,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
1532,
7,
23,
15,
692,
743,
753,
65,
18475,
368,
341,
197,
3244,
6141,
445,
4064,
4641,
1138,
197,
630,
2233,
4202,
7,
16,
15,
692,
743,
293,
18475,
368,
341,
197,
3244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 3 |
func TestPasswordAuth_Invalid(t *testing.T) {
req := bytes.NewBuffer(nil)
req.Write([]byte{2, NoAuth, UserPassAuth})
req.Write([]byte{1, 3, 'f', 'o', 'o', 3, 'b', 'a', 'z'})
var resp bytes.Buffer
cred := StaticCredentials{
"foo": "bar",
}
cator := UserPassAuthenticator{Credentials: cred}
s, _ := New(&Config{... | explode_data.jsonl/18560 | {
"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,
4876,
5087,
62,
7928,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
5820,
7121,
4095,
27907,
340,
24395,
4073,
10556,
3782,
90,
17,
11,
2308,
5087,
11,
2657,
12187,
5087,
3518,
24395,
4073,
10556,
3782,
90,
16,
11,
220,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestHash(t *testing.T) {
c := NewChance()
actual := c.Hash()
if len(actual) != 40 {
t.Errorf("Hash() was incorrect, expect: [exactly 40 characters], actual: %s.", actual)
}
} | explode_data.jsonl/8928 | {
"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,
6370,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
76070,
741,
88814,
1669,
272,
15103,
741,
743,
2422,
29721,
8,
961,
220,
19,
15,
341,
197,
3244,
13080,
445,
6370,
368,
572,
15114,
11,
1720,
25,
508,
327,
32739,
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
] | 2 |
func TestVerifyChallengeTxThreshold_invalidServerAndMultipleClientKeyNotMeetingThreshold(t *testing.T) {
serverKP := newKeypair0()
clientKP1 := newKeypair1()
clientKP2 := newKeypair2()
clientKP3 := keypair.MustRandom()
txSource := NewSimpleAccount(serverKP.Address(), -1)
op := ManageData{
SourceAccount: clientK... | explode_data.jsonl/20731 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 566
} | [
2830,
3393,
32627,
62078,
31584,
37841,
31433,
5475,
3036,
32089,
2959,
1592,
2623,
64576,
37841,
1155,
353,
8840,
836,
8,
341,
41057,
65036,
1669,
501,
6608,
1082,
1310,
15,
741,
25291,
65036,
16,
1669,
501,
6608,
1082,
1310,
16,
741,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestStatefulPodControlCreatesPods(t *testing.T) {
recorder := record.NewFakeRecorder(10)
set := newStatefulSet(3)
pod := newStatefulSetPod(set, 0)
fakeClient := &fake.Clientset{}
pvcIndexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
pvc... | explode_data.jsonl/17897 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 510
} | [
2830,
3393,
1397,
1262,
23527,
3273,
54868,
23527,
82,
1155,
353,
8840,
836,
8,
341,
67904,
1358,
1669,
3255,
7121,
52317,
47023,
7,
16,
15,
340,
8196,
1669,
36848,
1262,
1649,
7,
18,
340,
3223,
347,
1669,
36848,
1262,
1649,
23527,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteHostErrorDeletingFiles(t *testing.T) {
RegisterMockDriver(t)
api := tests.NewMockAPI(t)
api.RemoveError = true
if _, err := createHost(api, defaultMachineConfig); err != nil {
t.Errorf("createHost failed: %v", err)
}
if err := DeleteHost(api); err == nil {
t.Fatal("Expected error deleting host... | explode_data.jsonl/4189 | {
"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,
6435,
9296,
1454,
60475,
10809,
1155,
353,
8840,
836,
8,
341,
79096,
11571,
11349,
1155,
340,
54299,
1669,
7032,
7121,
11571,
7082,
1155,
340,
54299,
13270,
1454,
284,
830,
198,
743,
8358,
1848,
1669,
1855,
9296,
24827,
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... | 3 |
func TestGetResourceGroupFromDiskURI(t *testing.T) {
tests := []struct {
diskURL string
expectedResult string
expectError bool
}{
{
diskURL: "/subscriptions/4be8920b-2978-43d7-axyz-04d8549c1d05/resourceGroups/azure-k8s1102/providers/Microsoft.Compute/disks/andy-mghyb1102-dynamic-pvc-f7f014... | explode_data.jsonl/80294 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 573
} | [
2830,
3393,
1949,
4783,
2808,
3830,
47583,
10301,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
2698,
3187,
3144,
286,
914,
198,
197,
42400,
2077,
914,
198,
197,
24952,
1454,
262,
1807,
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... | 3 |
func TestMessageTransaction_SetAffectedAddress(t *testing.T) {
xmss := helper.GetAliceXMSS(6) // Master XMSS
message := "hello"
fee := uint64(1)
xmssPK := misc.UCharVectorToBytes(xmss.PK())
messageTx := NewTestMessageTransaction(message, fee, xmssPK, nil)
assert.NotNil(t, messageTx.tx)
addressesState := make(m... | explode_data.jsonl/10395 | {
"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,
2052,
8070,
14812,
81805,
4286,
1155,
353,
8840,
836,
8,
341,
10225,
76,
778,
1669,
13137,
2234,
61686,
52337,
1220,
7,
21,
8,
442,
10824,
51020,
1220,
198,
24753,
1669,
330,
14990,
698,
1166,
2127,
1669,
2622,
21,
19,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestComplex(t *testing.T) {
var tests = []struct {
num64 complex64
num128 complex128
}{
{12.0 - 3i, 3.2 + 1i},
{0.0 - 0i, 10000 + 0i},
}
for _, test := range tests {
actual64, err := Marshal(test.num64)
if err != nil {
t.Fatalf("return err %v", err.Error())
}
actual128, err := Marshal(test.... | explode_data.jsonl/21639 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 334
} | [
2830,
3393,
31137,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
22431,
21,
19,
220,
6351,
21,
19,
198,
197,
22431,
16,
17,
23,
6351,
16,
17,
23,
198,
197,
59403,
197,
197,
90,
16,
17,
13,
15,
481,
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... | 6 |
func TestCalculateScaledExchangeRate(t *testing.T) {
// equivalent to 1e9
desoToDaoCoinBaseUnitsScalingFactor := getDESOToDAOCoinBaseUnitsScalingFactor()
type testCaseType struct {
floatValue float64
expectedWholeNumberDigits int64
decimalDigitExponent int64
}
// Convenience type to def... | explode_data.jsonl/63834 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1322
} | [
2830,
3393,
47866,
94201,
31564,
11564,
1155,
353,
8840,
836,
8,
341,
197,
322,
13578,
311,
220,
16,
68,
24,
198,
2698,
28830,
1249,
12197,
41180,
3978,
26314,
59684,
20661,
1669,
633,
1150,
13880,
1249,
6352,
7612,
1961,
3978,
26314,
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... | 5 |
func TestReader(t *testing.T) {
Convey(`A Reader instance`, t, func() {
r := Reader{}
buf := bytes.Buffer{}
fw := recordio.NewWriter(&buf)
writeFrame := func(data []byte) error {
if _, err := fw.Write(data); err != nil {
return err
}
if err := fw.Flush(); err != nil {
return err
}
retur... | explode_data.jsonl/7592 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1530
} | [
2830,
3393,
5062,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
5809,
32,
25166,
2867,
7808,
259,
11,
2915,
368,
341,
197,
7000,
1669,
25166,
16094,
197,
26398,
1669,
5820,
22622,
16094,
197,
1166,
86,
1669,
3255,
815,
7121,
6492,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStorageDontDeleteDeployed(t *testing.T) {
storage := Init(driver.NewMemory())
storage.Log = t.Logf
storage.MaxHistory = 3
const name = "angry-bird"
// setup storage with test releases
setup := func() {
// release records
rls0 := ReleaseTestData{Name: name, Version: 1, Status: rspb.Status_SUPERSEDED... | explode_data.jsonl/35130 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 691
} | [
2830,
3393,
5793,
35,
544,
6435,
69464,
291,
1155,
353,
8840,
836,
8,
341,
197,
16172,
1669,
15690,
24032,
7121,
10642,
2398,
197,
16172,
5247,
284,
259,
98954,
198,
197,
16172,
14535,
13424,
284,
220,
18,
271,
4777,
829,
284,
330,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplicationRoutes(t *testing.T) {
spec.Run(t, "ApplicationRoutes", func(t *testing.T, _ spec.G, it spec.S) {
g := gomega.NewWithT(t)
it("extracts value from CNB_APP_ROUTES", func() {
defer test.ReplaceEnv(t, "CNB_APP_ROUTES", `{
"test-type-1": {
"port": 1
},
"test-type-2": {
"uri": "tes... | explode_data.jsonl/22545 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 395
} | [
2830,
3393,
4988,
26653,
1155,
353,
8840,
836,
8,
341,
98100,
16708,
1155,
11,
330,
4988,
26653,
497,
2915,
1155,
353,
8840,
836,
11,
716,
1398,
1224,
11,
432,
1398,
808,
8,
1476,
197,
3174,
1669,
342,
32696,
7121,
2354,
51,
1155,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTerragruntInitRunCmd(t *testing.T) {
t.Parallel()
cleanupTerraformFolder(t, TEST_FIXTURE_LOCAL_RUN_MULTIPLE)
stdout := bytes.Buffer{}
stderr := bytes.Buffer{}
runTerragruntCommand(t, fmt.Sprintf("terragrunt init --terragrunt-working-dir %s", TEST_FIXTURE_LOCAL_RUN_MULTIPLE), &stdout, &stderr)
errout :... | explode_data.jsonl/10181 | {
"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,
51402,
68305,
3850,
3803,
6727,
15613,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
60639,
51,
13886,
627,
13682,
1155,
11,
13602,
42635,
41486,
28399,
24068,
29207,
52819,
340,
6736,
411,
1669,
5820,
22622,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLength(t *testing.T) {
items := []int{23, 24, 2, 5, 10}
interfaceItems := make([]interface{}, len(items))
for i, v := range items {
interfaceItems[i] = v
}
a := New(interfaceItems)
if len(items) != a.Length() {
t.Log("Array should have same length as origin slice")
t.Log("Expected", len(items), ... | explode_data.jsonl/47090 | {
"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,
4373,
1155,
353,
8840,
836,
8,
341,
46413,
1669,
3056,
396,
90,
17,
18,
11,
220,
17,
19,
11,
220,
17,
11,
220,
20,
11,
220,
16,
15,
532,
58915,
1564,
4353,
1669,
1281,
10556,
4970,
22655,
2422,
24337,
4390,
2023,
600,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestIsDNS1123Subdomain(t *testing.T) {
goodValues := []string{
"a", "ab", "abc", "a1", "a-1", "a--1--2--b",
"0", "01", "012", "1a", "1-a", "1--a--b--2",
"a.a", "ab.a", "abc.a", "a1.a", "a-1.a", "a--1--2--b.a",
"a.1", "ab.1", "abc.1", "a1.1", "a-1.1", "a--1--2--b.1",
"0.a", "01.a", "012.a", "1a.a", "1-a.... | explode_data.jsonl/11821 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 777
} | [
2830,
3393,
3872,
61088,
16,
16,
17,
18,
3136,
12204,
1155,
353,
8840,
836,
8,
341,
3174,
1386,
6227,
1669,
3056,
917,
515,
197,
197,
56693,
497,
330,
370,
497,
330,
13683,
497,
330,
64,
16,
497,
330,
64,
12,
16,
497,
330,
64,
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... | 5 |
func TestSHA1(t *testing.T) {
for i := 0; i < 100; i++ {
buf := make([]byte, 10*1024-i)
if _, err := io.ReadFull(rand.Reader, buf); err != nil {
t.Fatal(err)
}
expected := sha1.Sum(buf)
got, err := SHA1(buf)
if err != nil {
t.Fatal(err)
}
if expected != got {
t.Fatal("exp:%x go... | explode_data.jsonl/23556 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 186
} | [
2830,
3393,
33145,
16,
1155,
353,
8840,
836,
8,
972,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
15,
26,
600,
1027,
972,
197,
26398,
1669,
1281,
10556,
3782,
11,
220,
16,
15,
9,
16,
15,
17,
19,
17600,
1218,
197,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestExprPushdown(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t")
tk.MustExec("create table t(id int, col1 varchar(10), col2 varchar(10), col3 int, col4 int, col5 int, index key1" +
" (... | explode_data.jsonl/65488 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1495
} | [
2830,
3393,
16041,
16644,
2923,
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,
10216,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandlePreSessionIncomingMessage(t *testing.T) {
//cfg := config.DefaultConfig()
localNode, _ := node.GenerateTestNode(t)
remoteNode, _ := node.GenerateTestNode(t)
con := NewConnectionMock(localNode.PublicKey())
remoteNet, _ := NewNet(config.ConfigValues, remoteNode)
outchan := remoteNet.SubscribeOnNewRem... | explode_data.jsonl/45580 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 573
} | [
2830,
3393,
6999,
4703,
5283,
97564,
2052,
1155,
353,
8840,
836,
8,
341,
197,
322,
14072,
1669,
2193,
13275,
2648,
741,
8854,
1955,
11,
716,
1669,
2436,
57582,
2271,
1955,
1155,
340,
197,
18147,
1955,
11,
716,
1669,
2436,
57582,
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 |
func TestShutdown(t *testing.T) {
deadline := 1 * time.Second
c := NewTestBlockedStorageClient()
dir, err := ioutil.TempDir("", "TestShutdown")
testutil.Ok(t, err)
defer os.RemoveAll(dir)
m := NewQueueManager(nil, dir, newEWMARate(ewmaWeight, shardUpdateDuration), config.DefaultQueueConfig, nil, nil, c, deadlin... | explode_data.jsonl/1308 | {
"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,
62004,
1155,
353,
8840,
836,
8,
341,
197,
78788,
1669,
220,
16,
353,
882,
32435,
198,
1444,
1669,
1532,
2271,
95847,
5793,
2959,
2822,
48532,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
2271,
62004,
1138,
18185,
1314,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetUserFromLDAPAPIEndpoint_UserNotFound(t *testing.T) {
getLDAPConfig = func(*setting.Cfg) (*ldap.Config, error) {
return &ldap.Config{}, nil
}
newLDAP = func(_ []*ldap.ServerConfig) multildap.IMultiLDAP {
return &LDAPMock{}
}
userSearchResult = nil
sc := getUserFromLDAPContext(t, "/api/admin/ldap... | explode_data.jsonl/34367 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 212
} | [
2830,
3393,
1949,
1474,
3830,
93497,
7082,
27380,
31339,
10372,
1155,
353,
8840,
836,
8,
341,
10366,
93497,
2648,
284,
2915,
4071,
15320,
727,
4817,
8,
4609,
38665,
10753,
11,
1465,
8,
341,
197,
853,
609,
38665,
10753,
22655,
2092,
198,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParseScript(t *testing.T) {
tests := []struct {
in string
out string
ok bool
}{
{"Latn", "Latn", true},
{"zzzz", "Zzzz", true},
{"zyyy", "Zyyy", true},
{"Latm", "Zzzz", false},
{"Zzz", "Zzzz", false},
{"", "Zzzz", false},
{"Zzzxx", "Zzzz", false},
}
for i, tt := range tests {
x, err... | explode_data.jsonl/15835 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 331
} | [
2830,
3393,
14463,
5910,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
17430,
220,
914,
198,
197,
13967,
914,
198,
197,
59268,
220,
1807,
198,
197,
59403,
197,
197,
4913,
23140,
77,
497,
330,
23140,
77,
497,
830,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShutdown(t *testing.T) {
msg := func(c string) types.Message {
p := message.NewPart([]byte(c))
msg := message.New(nil)
msg.Append(p)
return msg
}
w := &mockNBWriter{t: t, closeErr: errors.New("test err")}
out, err := NewAsyncWriter("foo", 1, w, log.Noop(), metrics.Noop())
require.NoError(t, err)
... | explode_data.jsonl/47854 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 380
} | [
2830,
3393,
62004,
1155,
353,
8840,
836,
8,
341,
21169,
1669,
2915,
1337,
914,
8,
4494,
8472,
341,
197,
3223,
1669,
1943,
7121,
5800,
10556,
3782,
1337,
1171,
197,
21169,
1669,
1943,
7121,
27907,
340,
197,
21169,
8982,
1295,
340,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIsAlphanumeric(t *testing.T) {
cases := []struct {
answer bool
text string
}{
{true, ""},
{true, "0"},
{true, "A"},
{false, "a"},
{true, " "},
{true, "."},
{true, "*"},
{false, ","},
{false, "|"},
{false, "@"},
{true, "XYZ"},
{false, "XYZ!"},
{true, "79068"},
{true, "+123 AB... | explode_data.jsonl/54187 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 301
} | [
2830,
3393,
3872,
2101,
65788,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
72570,
1807,
198,
197,
15425,
256,
914,
198,
197,
59403,
197,
197,
90,
1866,
11,
77496,
197,
197,
90,
1866,
11,
330,
15,
7115,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUnmarshal(t *testing.T) {
a := assert.New(t)
deck := ArenaDeck{
ID: "id",
Name: "name",
DeckTileID: 1,
MainDeck: []ArenaDeckCard{
ArenaDeckCard{
ID: 2,
Quantity: 3,
},
},
Sideboard: []ArenaDeckCard{},
}
data, _ := json.Marshal(deck)
var parsed ArenaDeck
json.... | explode_data.jsonl/27788 | {
"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,
1806,
27121,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
340,
197,
33425,
1669,
27047,
39368,
515,
197,
29580,
25,
260,
330,
307,
756,
197,
21297,
25,
981,
330,
606,
756,
197,
197,
39368,
15628,
915,
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 TestMapOpts(t *testing.T) {
tmpMap := make(map[string]string)
o := NewMapOpts(tmpMap, logOptsValidator)
o.Set("max-size=1")
if o.String() != "map[max-size:1]" {
t.Errorf("%s != [map[max-size:1]", o.String())
}
o.Set("max-file=2")
if len(tmpMap) != 2 {
t.Errorf("map length %d != 2", len(tmpMap))
}
if... | explode_data.jsonl/26379 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 270
} | [
2830,
3393,
2227,
43451,
1155,
353,
8840,
836,
8,
341,
20082,
2227,
1669,
1281,
9147,
14032,
30953,
340,
22229,
1669,
1532,
2227,
43451,
10368,
2227,
11,
1487,
43451,
14256,
340,
22229,
4202,
445,
2810,
7174,
28,
16,
1138,
743,
297,
643... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequestsSkip(t *testing.T) {
got := Requests{
"GET": {{}, {Skip: true}, {}},
"POST": {{}, {}},
}.Skip()
want := Requests{
"GET": {{Skip: true}, {Skip: true}, {Skip: true}},
"POST": {{Skip: true}, {Skip: true}},
}
if !reflect.DeepEqual(got, want) {
t.Errorf("got %+v, want %+v", got, want)
}
} | explode_data.jsonl/778 | {
"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,
35295,
35134,
1155,
353,
8840,
836,
8,
341,
3174,
354,
1669,
50882,
515,
197,
197,
1,
3806,
788,
220,
5867,
2137,
314,
35134,
25,
830,
2137,
4687,
1583,
197,
197,
1,
2946,
788,
5867,
2137,
4687,
1583,
197,
7810,
35134,
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 TestReversiAnz15(t *testing.T) {
r := NewReversiAnz()
r.SetEdgeSideTwoCnt(1)
if r.GetEdgeSideTwoCnt() != 1 {
t.Errorf("NG")
}
} | explode_data.jsonl/23038 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 70
} | [
2830,
3393,
693,
3004,
72,
2082,
89,
16,
20,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1532,
693,
3004,
72,
2082,
89,
741,
7000,
4202,
11656,
16384,
11613,
33747,
7,
16,
340,
743,
435,
2234,
11656,
16384,
11613,
33747,
368,
961,
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
] | 2 |
func TestMarshal(t *testing.T) {
view := NewBlockView(123455)
colTypes := mock.MockColTypes(14)
rows := uint64(64)
attrs1 := make([]int, 0)
vecs1 := make([]vector.IVector, 0)
for i, colType := range colTypes {
attrs1 = append(attrs1, i)
vec := vector.MockVector(colType, rows)
vec.ResetReadonly()
vecs1 = ... | explode_data.jsonl/42522 | {
"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,
55438,
1155,
353,
8840,
836,
8,
341,
36867,
1669,
1532,
4713,
851,
7,
16,
17,
18,
19,
20,
20,
692,
46640,
4173,
1669,
7860,
24664,
6127,
4173,
7,
16,
19,
340,
68438,
1669,
2622,
21,
19,
7,
21,
19,
340,
197,
20468,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSetOccupiedResource(t *testing.T) {
node := NewTestSchedulerNode()
r1 := common.NewResourceBuilder().
AddResource(constants.Memory, 2).
AddResource(constants.CPU, 2).
Build()
node.setOccupiedResource(r1)
assert.Equal(t, node.occupied, r1)
} | explode_data.jsonl/8407 | {
"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,
1649,
63968,
1122,
4783,
1155,
353,
8840,
836,
8,
341,
20831,
1669,
1532,
2271,
38878,
1955,
741,
7000,
16,
1669,
4185,
7121,
4783,
3297,
25829,
197,
37972,
4783,
80368,
71162,
11,
220,
17,
4292,
197,
37972,
4783,
80368,
727... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPeerGroupResolverPolicy4(t *testing.T) {
signedBy, identities, err := GetPolicies(org1, org2, org3, org4)
if err != nil {
panic(err)
}
sigPolicyEnv := &common.SignaturePolicyEnvelope{
Version: 0,
Rule: NewNOutOfPolicy(1,
signedBy[0],
NewNOutOfPolicy(2,
signedBy[1],
NewNOutOfPolicy(1,
... | explode_data.jsonl/21577 | {
"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,
30888,
2808,
18190,
13825,
19,
1155,
353,
8840,
836,
8,
341,
1903,
1542,
1359,
11,
39421,
11,
1848,
1669,
2126,
47,
42038,
36246,
16,
11,
1240,
17,
11,
1240,
18,
11,
1240,
19,
340,
743,
1848,
961,
2092,
341,
197,
30764,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_MapToMap1(t *testing.T) {
// map[int]int -> map[string]string
// empty original map.
gtest.C(t, func(t *gtest.T) {
m1 := g.MapIntInt{}
m2 := g.MapStrStr{}
t.Assert(gconv.MapToMap(m1, &m2), nil)
t.Assert(len(m1), len(m2))
})
// map[int]int -> map[string]string
gtest.C(t, func(t *gtest.T) {
m1 :... | explode_data.jsonl/41425 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 740
} | [
2830,
3393,
56992,
1249,
2227,
16,
1155,
353,
8840,
836,
8,
341,
197,
322,
2415,
18640,
63025,
1464,
2415,
14032,
30953,
198,
197,
322,
4287,
4024,
2415,
624,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
2109,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSpanProcessor_Values(t *testing.T) {
// TODO: Add test for "nil" Span. This needs support from data slices to allow to construct that.
testCases := []testCase{
{
inputName: "",
inputAttributes: nil,
outputName: "",
outputAttributes: nil,
},
{
inputName: "nil-attribut... | explode_data.jsonl/51037 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1053
} | [
2830,
3393,
12485,
22946,
62,
6227,
1155,
353,
8840,
836,
8,
341,
197,
322,
5343,
25,
2691,
1273,
369,
330,
8385,
1,
11903,
13,
1096,
3880,
1824,
504,
821,
34254,
311,
2138,
311,
9245,
429,
624,
18185,
37302,
1669,
3056,
66194,
515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRPCStorageClient(t *testing.T) {
// Setup code
s := &TestRPCStorageSuite{serverType: "XL"}
s.SetUpSuite(t)
// Run the test.
s.testRPCStorageClient(t)
// Teardown code
s.TearDownSuite(t)
} | explode_data.jsonl/33189 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 88
} | [
2830,
3393,
29528,
5793,
2959,
1155,
353,
8840,
836,
8,
341,
197,
322,
18626,
2038,
198,
1903,
1669,
609,
2271,
29528,
5793,
28000,
90,
4030,
929,
25,
330,
36530,
16707,
1903,
4202,
2324,
28000,
1155,
692,
197,
322,
6452,
279,
1273,
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 |
func TestResolveArrayUnknown(t *testing.T) {
m := &Manifest{
Parameters: []ParameterDefinition{
ParameterDefinition{
Name: "name",
},
},
}
s := &Step{
Description: "a test step",
Data: map[string]interface{}{
"Arguments": []string{
"source: bundle.parameters.person",
},
},
}
err := ... | explode_data.jsonl/10951 | {
"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,
56808,
1857,
13790,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
609,
38495,
515,
197,
197,
9706,
25,
3056,
4971,
10398,
515,
298,
197,
4971,
10398,
515,
571,
21297,
25,
330,
606,
756,
298,
197,
1583,
197,
197,
1583,
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... | 1 |
func TestHookStats_String(t *testing.T) {
v := HookStats{
TotalHooks: Int(0),
ActiveHooks: Int(0),
InactiveHooks: Int(0),
}
want := `github.HookStats{TotalHooks:0, ActiveHooks:0, InactiveHooks:0}`
if got := v.String(); got != want {
t.Errorf("HookStats.String = %v, want %v", got, want)
}
} | explode_data.jsonl/33246 | {
"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,
31679,
16635,
31777,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
28171,
16635,
515,
197,
197,
7595,
67769,
25,
262,
1333,
7,
15,
1326,
197,
197,
5728,
67769,
25,
256,
1333,
7,
15,
1326,
197,
70167,
3028,
67769,
25,
1333,
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 TestClientHandlesKeepalives(t *testing.T) {
conn := dial(channelKeepaliveSender, t)
defer conn.Close()
session, err := conn.NewSession()
if err != nil {
t.Fatal(err)
}
defer session.Close()
if err := session.Shell(); err != nil {
t.Fatalf("Unable to execute command: %v", err)
}
err = session.Wait()
i... | explode_data.jsonl/34803 | {
"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,
2959,
65928,
19434,
278,
1886,
1155,
353,
8840,
836,
8,
341,
32917,
1669,
27860,
25923,
19434,
50961,
20381,
11,
259,
340,
16867,
4534,
10421,
741,
25054,
11,
1848,
1669,
4534,
7121,
5283,
741,
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,
1,
1,
1... | 4 |
func TestMachineExecutor_Connect_NoTerminal(t *testing.T) {
e := machineExecutor{
executor: &common.MockExecutor{},
}
conn, err := e.Connect()
assert.Error(t, err)
assert.Nil(t, conn)
} | explode_data.jsonl/77476 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
21605,
25255,
15100,
2321,
36989,
47890,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
5662,
25255,
515,
197,
67328,
4831,
25,
609,
5464,
24664,
25255,
38837,
197,
630,
32917,
11,
1848,
1669,
384,
43851,
741,
6948,
6141,
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 |
func TestStartBuild(t *testing.T) {
tests := []struct {
name string
bcName string
wantErr bool
}{
{
name: "Case 1: Testing valid name",
bcName: "ruby",
wantErr: false,
},
// TODO: Currently fails. Enable once fixed.
// {
// name: "Case 2: Testing empty name",
// bcName: "",
... | explode_data.jsonl/65161 | {
"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,
3479,
11066,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
2233,
66,
675,
220,
914,
198,
197,
50780,
7747,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
262,
330,
420... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddNode(t *testing.T) {
manager, _, _, err := newTestController()
if err != nil {
t.Fatalf("error creating DaemonSets controller: %v", err)
}
node1 := newNode("node1", nil)
ds := newDaemonSet("ds")
ds.Spec.Template.Spec.NodeSelector = simpleNodeLabel
manager.dsStore.Add(ds)
manager.addNode(node1)
i... | explode_data.jsonl/50352 | {
"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,
2212,
1955,
1155,
353,
8840,
836,
8,
341,
92272,
11,
8358,
8358,
1848,
1669,
501,
2271,
2051,
741,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
841,
6825,
92236,
30175,
6461,
25,
1018,
85,
497,
1848,
340,
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... | 6 |
func TestTagDefault4(t *testing.T) {
assert.NoError(t, PrepareEngine())
type DefaultStruct4 struct {
Id int64
Created time.Time `xorm:"default(CURRENT_TIMESTAMP)"`
}
assertSync(t, new(DefaultStruct4))
tables, err := testEngine.DBMetas()
assert.NoError(t, err)
var defaultVal string
var isDefaultExis... | explode_data.jsonl/19213 | {
"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,
5668,
3675,
19,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
31166,
4571,
12367,
13158,
7899,
9422,
19,
2036,
341,
197,
67211,
414,
526,
21,
19,
198,
197,
84062,
882,
16299,
1565,
87,
493,
2974,
2258,
3025,
17497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStaticFileServer(t *testing.T) {
r := newRouter()
mockServer := httptest.NewServer(r)
// We want to hit the `GET /assets/` route to get the index.html file response
resp, err := http.Get(mockServer.URL + "/")
if err != nil {
t.Fatal(err)
}
// We want our status to be 200 (ok)
if resp.StatusCode != ... | explode_data.jsonl/10029 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 282
} | [
2830,
3393,
11690,
1703,
5475,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
501,
9523,
741,
77333,
5475,
1669,
54320,
70334,
7121,
5475,
2601,
692,
197,
322,
1205,
1366,
311,
4201,
279,
1565,
3806,
608,
5160,
14,
63,
6021,
311,
633,
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... | 4 |
func TestAppendSecrets(t *testing.T) {
ctx := context.Background()
assertRewrite(t, AppendSecrets{
Context: ctx,
Source: "https://example.com/secrets/1",
}, `
exo = "0.1"
`, `
exo = "0.1"
environment {
secrets {
source = "https://example.com/secrets/1"
}
}
`)
assertRewrite(t, AppendSecrets{
Context: ... | explode_data.jsonl/52938 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
23877,
19773,
82,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
6948,
58465,
1247,
1155,
11,
29807,
19773,
82,
515,
197,
70871,
25,
5635,
345,
197,
197,
3608,
25,
220,
330,
2428,
1110,
8687,
905,
59587,
5271... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOsSignal(t *testing.T) {
switch GOOS {
case "windows":
t.Skip("skipping signal test on Windows")
}
defer func() {
os.Remove("libgo3.a")
os.Remove("libgo3.h")
os.Remove("testp")
os.RemoveAll("pkg")
}()
cmd := exec.Command("go", "build", "-buildmode=c-archive", "-o", "libgo3.a", "libgo3")
cmd.... | explode_data.jsonl/50861 | {
"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,
28867,
26810,
1155,
353,
8840,
836,
8,
341,
8961,
12604,
3126,
341,
2722,
330,
27077,
4660,
197,
3244,
57776,
445,
4886,
5654,
8286,
1273,
389,
5515,
1138,
197,
630,
16867,
2915,
368,
341,
197,
25078,
13270,
445,
2740,
3346,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetStructType(t *testing.T) {
cases := []struct {
name string
expr ast.Expr
expected *ast.StructType
}{
{
name: "empty struct type",
expr: &ast.StructType{
Incomplete: true,
},
expected: &ast.StructType{
Incomplete: true,
},
},
{
name: "empty ident node",
... | explode_data.jsonl/51105 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 391
} | [
2830,
3393,
1949,
9422,
929,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
8122,
649,
257,
11763,
93267,
198,
197,
42400,
353,
559,
51445,
929,
198,
197,
59403,
197,
197,
515,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDraftReviewComment_String(t *testing.T) {
v := DraftReviewComment{
Path: String(""),
Position: Int(0),
Body: String(""),
}
want := `github.DraftReviewComment{Path:"", Position:0, Body:""}`
if got := v.String(); got != want {
t.Errorf("DraftReviewComment.String = %v, want %v", got, want)
}
... | explode_data.jsonl/33233 | {
"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,
50086,
19432,
10677,
31777,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
28564,
19432,
10677,
515,
197,
69640,
25,
257,
923,
445,
4461,
197,
197,
3812,
25,
1333,
7,
15,
1326,
197,
197,
5444,
25,
257,
923,
445,
4461,
197,
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... | 2 |
func TestInvalidFloat32(t *testing.T) {
os.Setenv("FLOAT32", "AAA")
defer os.Clearenv()
cfg := Config{}
assert.EqualError(t, Parse(&cfg), "env: parse error on field \"Float32\" of type \"float32\": strconv.ParseFloat: parsing \"AAA\": invalid syntax")
} | explode_data.jsonl/78763 | {
"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,
7928,
5442,
18,
17,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
445,
50915,
18,
17,
497,
330,
50107,
1138,
16867,
2643,
727,
273,
9151,
85,
2822,
50286,
1669,
5532,
16094,
6948,
12808,
1454,
1155,
11,
14775,
2099,
140... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMarshal(t *testing.T) {
got := tags.HashKey()
if exp := ",apple=orange,foo=bar,host=serverA,region=uswest"; string(got) != exp {
t.Log("got: ", string(got))
t.Log("exp: ", exp)
t.Error("invalid match")
}
} | explode_data.jsonl/16888 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 94
} | [
2830,
3393,
55438,
1155,
353,
8840,
836,
8,
341,
3174,
354,
1669,
9492,
15103,
1592,
741,
743,
1343,
1669,
3670,
22377,
28,
34164,
11,
7975,
28,
2257,
11,
3790,
28,
4030,
32,
11,
3943,
28,
355,
11039,
5123,
914,
3268,
354,
8,
961,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStartAcquisitionCat(t *testing.T) {
sources := []DataSource{
&MockCat{},
}
out := make(chan types.Event)
acquisTomb := tomb.Tomb{}
go func() {
if err := StartAcquisition(sources, out, &acquisTomb); err != nil {
t.Fatalf("unexpected error")
}
}()
count := 0
READLOOP:
for {
select {
case <... | explode_data.jsonl/29481 | {
"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,
3479,
11654,
17204,
26801,
1155,
353,
8840,
836,
8,
341,
1903,
2360,
1669,
3056,
17173,
515,
197,
197,
5,
11571,
26801,
38837,
197,
532,
13967,
1669,
1281,
35190,
4494,
6904,
340,
81200,
9202,
51,
2855,
1669,
43080,
836,
285... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Mock_On_WithFuncPanics(t *testing.T) {
// make a test impl object
var mockedService = new(TestExampleImplementation)
assert.Panics(t, func() {
mockedService.On("TheExampleMethodFunc", func(string) error { return nil })
})
} | explode_data.jsonl/8577 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 91
} | [
2830,
3393,
1245,
1176,
35482,
62,
2354,
9626,
35693,
1211,
1155,
353,
8840,
836,
8,
972,
197,
322,
1281,
264,
1273,
11605,
1633,
319,
2405,
46149,
1860,
284,
501,
31159,
13314,
36850,
7229,
6948,
1069,
276,
1211,
1155,
11,
2915,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHashIncrbyfloat(t *testing.T) {
s, err := Run()
ok(t, err)
defer s.Close()
c, err := proto.Dial(s.Addr())
ok(t, err)
defer c.Close()
// Existing key
{
s.HSet("hash", "field", "12")
mustDo(t, c,
"HINCRBYFLOAT", "hash", "field", "400.12",
proto.String("412.12"),
)
equals(t, "412.12", s.HGe... | explode_data.jsonl/11378 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 804
} | [
2830,
3393,
6370,
641,
5082,
1694,
3649,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
6452,
741,
59268,
1155,
11,
1848,
340,
16867,
274,
10421,
741,
1444,
11,
1848,
1669,
18433,
98462,
1141,
93626,
2398,
59268,
1155,
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 TestClient(t *testing.T) {
gvr := schema.GroupVersionResource{Group: "group", Version: "v1", Resource: "resource"}
writeJSON := func(t *testing.T, w http.ResponseWriter, obj runtime.Object) {
data, err := json.Marshal(obj)
if err != nil {
t.Fatal(err)
}
w.Header().Set("Content-Type", "application/jso... | explode_data.jsonl/43916 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3151
} | [
2830,
3393,
2959,
1155,
353,
8840,
836,
8,
341,
3174,
18920,
1669,
10802,
5407,
5637,
4783,
90,
2808,
25,
330,
4074,
497,
6079,
25,
330,
85,
16,
497,
11765,
25,
330,
9233,
63159,
24945,
5370,
1669,
2915,
1155,
353,
8840,
836,
11,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestInboundListenerConfig_HTTP(t *testing.T) {
for _, p := range []*model.Proxy{&proxy, &proxyHTTP10} {
// Add a service and verify it's config
testInboundListenerConfig(t, p,
buildService("test.com", wildcardIP, protocol.HTTP, tnow))
testInboundListenerConfigWithoutServices(t, p)
testInboundListenerCo... | explode_data.jsonl/61269 | {
"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,
641,
10891,
2743,
2648,
34954,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
281,
1669,
2088,
29838,
2528,
75200,
90,
5,
22803,
11,
609,
22803,
9230,
16,
15,
92,
341,
197,
197,
322,
2691,
264,
2473,
323,
10146,
432,
594,
219... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDingTalk_UpdateChat(t *testing.T) {
res, err := client.UpdateChat(
request.NewUpdateChat("chat8ff884ef696f5717678c6280edfdbbf1").
SetName("ci测试群").
SetShowHistory(0).
SetSearchable(1).
Build())
assert.Nil(t, err)
assert.NotNil(t, res)
} | explode_data.jsonl/32608 | {
"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,
35,
287,
36210,
47393,
15672,
1155,
353,
8840,
836,
8,
341,
10202,
11,
1848,
1669,
2943,
16689,
15672,
1006,
197,
23555,
7121,
4289,
15672,
445,
9686,
23,
542,
23,
23,
19,
823,
21,
24,
21,
69,
20,
22,
16,
22,
21,
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 TestCStore_Store(t *testing.T) {
type args struct {
key string
value string
}
tests := []struct {
name string
args args
want args
}{
{"key_value_ok", args{"testKey", "testValue"}, args{"testKey", "testValue"}},
{"value_empty", args{"testKey", ""}, args{"testKey", ""}},
{"key_empty", args{"", ... | explode_data.jsonl/59217 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 334
} | [
2830,
3393,
34,
6093,
92684,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
23634,
256,
914,
198,
197,
16309,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
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... | 3 |
func TestPipeline(t *testing.T) {
opts := &redis.Options{Addr: "127.0.0.1:6379"}
assert := assert.New(t)
mt := mocktracer.Start()
defer mt.Stop()
var err error
client := NewClient(opts, WithServiceName("my-redis"))
pipeline := client.Pipeline()
pipeline.Expire("pipeline_counter", time.Hour)
// Exec with cont... | explode_data.jsonl/43236 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 571
} | [
2830,
3393,
34656,
1155,
353,
8840,
836,
8,
341,
64734,
1669,
609,
21748,
22179,
90,
13986,
25,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
21,
18,
22,
24,
16707,
6948,
1669,
2060,
7121,
1155,
340,
2109,
83,
1669,
7860,
94941,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplicationContext(t *testing.T) {
t.Run("int", func(t *testing.T) {
c, ch := container()
e := int(3)
// 普通类型用属性注入
assert.Panic(t, func() {
c.Object(e)
}, "bean must be ref type")
c.Object(&e)
// 相同类型不同名称的 bean 都可注册
c.Object(&e).Name("i3")
// 相同类型不同名称的 bean 都可注册
c.Object(&e).Name(... | explode_data.jsonl/17395 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 937
} | [
2830,
3393,
19736,
1155,
353,
8840,
836,
8,
1476,
3244,
16708,
445,
396,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
1444,
11,
521,
1669,
5476,
2822,
197,
7727,
1669,
526,
7,
18,
692,
197,
197,
322,
6567,
247,
106,
31935,
31905,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEC2EipAssociationSupplier_Resources(t *testing.T) {
tests := []struct {
test string
dirName string
mock func(mock *repository.MockEC2Repository)
err error
}{
{
test: "no eip associations",
dirName: "ec2_eip_association_empty",
mock: func(mock *repository.MockEC2Repository) {
... | explode_data.jsonl/39040 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 868
} | [
2830,
3393,
7498,
17,
36,
573,
63461,
46167,
62,
11277,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
18185,
262,
914,
198,
197,
48532,
675,
914,
198,
197,
77333,
262,
2915,
30389,
353,
23319,
24664,
7498,
17,
4624,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMergeDefaultDecorationConfigThreadSafety(t *testing.T) {
const repo = "org/repo"
const cluster = "default"
p := Plank{DefaultDecorationConfigs: []*DefaultDecorationConfigEntry{
{
OrgRepo: "*",
Cluster: "*",
Config: &prowapi.DecorationConfig{
GCSConfiguration: &prowapi.GCSConfiguration{
M... | explode_data.jsonl/41046 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 520
} | [
2830,
3393,
52096,
3675,
19431,
2648,
6855,
73037,
1155,
353,
8840,
836,
8,
341,
4777,
15867,
284,
330,
1775,
10758,
5368,
698,
4777,
10652,
284,
330,
2258,
698,
3223,
1669,
1818,
1180,
90,
3675,
19431,
84905,
25,
29838,
3675,
19431,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTlfHistoryWithUnflushed(t *testing.T) {
aliceName, bobName := "alice", "bob"
aliceUID, bobUID := keybase1.MakeTestUID(1), keybase1.MakeTestUID(2)
tlfID, err := tlf.MakeRandomID(tlf.Private)
require.NoError(t, err)
nn := nextNotification{1, 0, tlfID, nil}
aliceWrite1 := nn.make("a", NotificationCreate, a... | explode_data.jsonl/34570 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 711
} | [
2830,
3393,
51,
11008,
13424,
2354,
1806,
21664,
291,
1155,
353,
8840,
836,
8,
341,
197,
63195,
675,
11,
35192,
675,
1669,
330,
63195,
497,
330,
47086,
698,
197,
63195,
6463,
11,
35192,
6463,
1669,
1376,
3152,
16,
50133,
2271,
6463,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.