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 TestIDDriverValue(t *testing.T) {
id := ID{0x4d, 0x88, 0xe1, 0x5b, 0x60, 0xf4, 0x86, 0xe4, 0x28, 0x41, 0x2d, 0xc9}
data, err := id.Value()
assert.NoError(t, err)
assert.Equal(t, "9m4e2mr0ui3e8a215n4g", data)
} | explode_data.jsonl/58926 | {
"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,
915,
11349,
1130,
1155,
353,
8840,
836,
8,
341,
15710,
1669,
3034,
90,
15,
87,
19,
67,
11,
220,
15,
87,
23,
23,
11,
220,
15,
8371,
16,
11,
220,
15,
87,
20,
65,
11,
220,
15,
87,
21,
15,
11,
220,
15,
5848,
19,
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 TestLocalTemporaryTableReplace(t *testing.T) {
store, clean := realtikvtest.CreateMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("create temporary table tmp1 (id int primary key auto_increment, u int unique, v int)")
tk.MustExec("insert into tmp1 va... | explode_data.jsonl/5725 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 525
} | [
2830,
3393,
7319,
59362,
2556,
23107,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1931,
83,
1579,
85,
1944,
7251,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTopicTrie_unsubscribe(t *testing.T) {
a := assert.New(t)
trie := newTopicTrie()
for cid, v := range testUnsubscribe.subTopics {
for _, topic := range v {
trie.subscribe(cid, topic)
}
}
for cid, v := range testUnsubscribe.unsubscribe {
for _, tt := range v {
trie.unsubscribe(cid, tt)
}
}
fo... | explode_data.jsonl/72946 | {
"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,
26406,
51,
7231,
4907,
9384,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
340,
197,
8927,
1669,
501,
26406,
51,
7231,
741,
2023,
32141,
11,
348,
1669,
2088,
1273,
1806,
9384,
4309,
45003,
341,
197,
2023,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestGetCoins(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() {
t.Skip()
}
_, err := f.GetCoins(context.Background())
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/15169 | {
"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,
1949,
69602,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
341,
197,
3244,
57776,
741,
197,
532,
197,
6878,
1848,
1669,
282,
2234,
69602,
5378,
19047,
2398,
743,
1848,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTitleCase(t *testing.T) {
input := inputInfo{}
output := outputInfo{
Tags: map[string]string{
"All Lowercase Words": "all lowercase words",
"All Uppercase Words": "ALL UPPERCASE WORDS",
"All Crazy Case Words": "aLl cRaZY cASE WordS",
"W... | explode_data.jsonl/68141 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1158
} | [
2830,
3393,
3851,
4207,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
1946,
1731,
16094,
21170,
1669,
2550,
1731,
515,
197,
10261,
2032,
25,
2415,
14032,
30953,
515,
298,
197,
67049,
27536,
5638,
27630,
788,
3824,
330,
541,
42047,
4244,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFlattenShoot(t *testing.T) {
purpose := v1beta1.ShootPurposeEvaluation
nodes := "10.250.0.0/19"
pods := "100.96.0.0/11"
services := "100.64.0.0/13"
volumeType := "Standard_LRS"
caBundle := "caBundle"
policy := "policy"
quota := true
pdsLimit := int64(4)
domain := "domain"
authMode := "auth_mode"
lo... | explode_data.jsonl/26238 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3433
} | [
2830,
3393,
3882,
14456,
85195,
1155,
353,
8840,
836,
8,
341,
3223,
29249,
1669,
348,
16,
19127,
16,
10849,
1905,
74033,
82363,
198,
79756,
1669,
330,
16,
15,
13,
17,
20,
15,
13,
15,
13,
15,
14,
16,
24,
698,
3223,
29697,
1669,
330... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestVarAfterMain(t *testing.T) {
gopClTest(t, `
package main
func main() {
println(i)
}
var i int
`, `package main
import fmt "fmt"
func main() {
fmt.Println(i)
}
var i int
`)
gopClTest(t, `
package main
func f(v float64) float64 {
return v
}
func main() {
sink = f(100)
}
var sink float64
`, `package ... | explode_data.jsonl/73597 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 187
} | [
2830,
3393,
3962,
6025,
6202,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
22074,
1722,
1887,
271,
2830,
1887,
368,
341,
81168,
1956,
340,
630,
947,
600,
526,
198,
7808,
1565,
1722,
1887,
271,
474,
8879,
330,
12501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDiffGroups(t *testing.T) {
l := func(s ...string) []string { return s }
for e, engine := range []func(a, b interface{}) lcs.EditScript{
textdiff.DP, textdiff.Myers,
} {
for i, tc := range []struct {
a, b string
summary []string
}{
{"S\nA\nB\nC\nD\nE", "S\nC", l("2,3d1", "5,6d2")},
{"S\n... | explode_data.jsonl/9740 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 703
} | [
2830,
3393,
21751,
22173,
1155,
353,
8840,
836,
8,
341,
8810,
1669,
2915,
1141,
2503,
917,
8,
3056,
917,
314,
470,
274,
456,
2023,
384,
11,
4712,
1669,
2088,
3056,
2830,
2877,
11,
293,
3749,
28875,
326,
4837,
35823,
5910,
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 TestNewTemplate(t *testing.T) {
path := "./test.gold"
g := &Generator{}
tpl := NewTemplate(path, g)
if tpl.Path != path || tpl.Generator != g {
t.Errorf("The template is invalid.")
}
} | explode_data.jsonl/74606 | {
"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,
3564,
7275,
1155,
353,
8840,
836,
8,
341,
26781,
1669,
5924,
1944,
92960,
698,
3174,
1669,
609,
12561,
16094,
3244,
500,
1669,
1532,
7275,
5581,
11,
342,
340,
743,
60979,
17474,
961,
1815,
1369,
60979,
1224,
15312,
961,
342,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadTerragruntConfigFull(t *testing.T) {
t.Parallel()
cleanupTerraformFolder(t, TEST_FIXTURE_READ_CONFIG)
rootPath := util.JoinPath(TEST_FIXTURE_READ_CONFIG, "full")
runTerragrunt(t, fmt.Sprintf("terragrunt apply -auto-approve --terragrunt-non-interactive --terragrunt-working-dir %s", rootPath))
// che... | explode_data.jsonl/10156 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1903
} | [
2830,
3393,
4418,
51402,
68305,
3850,
2648,
9432,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
60639,
51,
13886,
627,
13682,
1155,
11,
13602,
42635,
41486,
13117,
12568,
340,
33698,
1820,
1669,
4094,
22363,
1820,
50320,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnvvar_Prefixes(t *testing.T) {
os.Setenv("APP_DATABASE_HOST", "localhost")
os.Setenv("APP_DATABASE_PASSWORD", "password")
os.Setenv("VAULT_ADDR", "vault:1337")
os.Setenv("MICRO_REGISTRY", "mdns")
var prefixtests = []struct {
prefixOpts []source.Option
expectedKeys []string
}{
{[]source.Option{W... | explode_data.jsonl/18089 | {
"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,
14359,
947,
1088,
5060,
288,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
445,
14707,
45510,
17213,
497,
330,
8301,
1138,
25078,
4202,
3160,
445,
14707,
45510,
23059,
497,
330,
3833,
1138,
25078,
4202,
3160,
445,
12820,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBootTime(t *testing.T) {
metadata, err := utils.GetMetadataAttribute("start-time")
if err != nil {
t.Fatalf("couldn't get start time from metadata")
}
startTime, err := strconv.Atoi(metadata)
if err != nil {
t.Fatalf("failed to convet start time %s", metadata)
}
t.Logf("image boot time is %d", time.... | explode_data.jsonl/81395 | {
"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,
17919,
1462,
1155,
353,
8840,
836,
8,
341,
2109,
7603,
11,
1848,
1669,
12439,
2234,
14610,
3907,
445,
2468,
7246,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
90962,
944,
633,
1191,
882,
504,
11160,
1138,
197,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRBACModelWithDomains(t *testing.T) {
e, _ := NewEnforcer("examples/rbac_with_domains_model.conf", "examples/rbac_with_domains_policy.csv")
testDomainEnforce(t, e, "alice", "domain1", "data1", "read", true)
testDomainEnforce(t, e, "alice", "domain1", "data1", "write", true)
testDomainEnforce(t, e, "alice",... | explode_data.jsonl/57123 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 283
} | [
2830,
3393,
29259,
1706,
1712,
2354,
74713,
1155,
353,
8840,
836,
8,
341,
7727,
11,
716,
1669,
1532,
1702,
82010,
445,
51668,
7382,
55877,
6615,
70199,
5047,
13937,
497,
330,
51668,
7382,
55877,
6615,
70199,
22773,
11219,
5130,
18185,
136... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPublishInvalidSourceIdInPayload(t *testing.T) {
payload := buildTestPayload(testSourceIdInvalid, testEventType, testEventTypeVersion, testEventID,
testEventTime, testData)
body, statusCode := performPublishRequest(t, publishServer.URL, payload)
assertExpectedError(t, body, statusCode, http.StatusBadReques... | explode_data.jsonl/74420 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 114
} | [
2830,
3393,
50145,
7928,
3608,
764,
641,
29683,
1155,
353,
8840,
836,
8,
341,
76272,
1669,
1936,
2271,
29683,
8623,
3608,
764,
7928,
11,
1273,
47906,
11,
1273,
47906,
5637,
11,
1273,
1556,
915,
345,
197,
18185,
1556,
1462,
11,
67348,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImgTest_Add_StreamingPassFail_MatchesExpectations_ZeroExitCode(t *testing.T) {
unittest.MediumTest(t)
workDir := t.TempDir()
setupAuthWithGSUtil(t, workDir)
td := testutils.TestDataDir(t)
keysFile := filepath.Join(workDir, "keys.json")
require.NoError(t, ioutil.WriteFile(keysFile, []byte(`{"os": "Andro... | explode_data.jsonl/69529 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 950
} | [
2830,
3393,
13033,
2271,
21346,
62,
76509,
12187,
19524,
1245,
9118,
17536,
804,
97672,
15339,
2078,
1155,
353,
8840,
836,
8,
341,
20479,
14267,
1321,
23090,
2271,
1155,
692,
97038,
6184,
1669,
259,
65009,
6184,
741,
84571,
5087,
2354,
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 TestResolvePlaceholdersInOutputValues(t *testing.T) {
ctx := context.Background()
wf := unmarshalWF(outputValuePlaceholders)
woc := newWoc(*wf)
woc.operate(ctx)
assert.Equal(t, wfv1.WorkflowRunning, woc.wf.Status.Phase)
pods, err := listPods(woc)
assert.NoError(t, err)
assert.True(t, len(pods.Items) > 0, "... | explode_data.jsonl/70985 | {
"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,
56808,
17371,
16662,
641,
5097,
6227,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
6692,
69,
1669,
650,
27121,
32131,
11057,
1130,
17371,
16662,
340,
6692,
509,
1669,
501,
54,
509,
4071,
43083,
340,
6692,
509... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExtendScalarType(t *testing.T) {
t.Run("extend simple scalar type", func(t *testing.T) {
run(extendScalarTypeDefinition, testDefinition, `
scalar Coordinates
extend scalar Coordinates @deprecated(reason: "some reason")
`, `
scalar Coordinates @deprecated(reason: "some reason")
exte... | explode_data.jsonl/51978 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 489
} | [
2830,
3393,
72136,
20639,
929,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
25048,
4285,
17274,
943,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
56742,
7,
25048,
20639,
929,
10398,
11,
1273,
10398,
11,
22074,
464,
1903,
59153,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDroppedMessagesOnSendToSub(t *testing.T) {
opts := GetDefaultOptions()
opts.MaxMsgs = 3
s := runServerWithOpts(t, opts, nil)
defer s.Shutdown()
sc := NewDefaultConnection(t)
defer sc.Close()
// Produce 1 message
if err := sc.Publish("foo", []byte("hello")); err != nil {
t.Fatalf("Unexpected error o... | explode_data.jsonl/23094 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 589
} | [
2830,
3393,
35,
41716,
15820,
1925,
11505,
1249,
3136,
1155,
353,
8840,
836,
8,
341,
64734,
1669,
2126,
3675,
3798,
741,
64734,
14535,
6611,
82,
284,
220,
18,
198,
1903,
1669,
1598,
5475,
2354,
43451,
1155,
11,
12185,
11,
2092,
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... | 1 |
func Test64BitErrorChecking(t *testing.T) {
defer func() {
if err := recover(); err != nil {
t.Fatal("panic due to 0xFFFFFFFF != -1 " +
"when int is 64 bits")
}
}()
db := openTestConn(t)
defer db.Close()
r, err := db.Query(`SELECT *
FROM (VALUES (0::integer, NULL::text), (1, 'test string')) AS t;`)
... | explode_data.jsonl/63443 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 175
} | [
2830,
3393,
21,
19,
8344,
1454,
40129,
1155,
353,
8840,
836,
8,
341,
16867,
2915,
368,
341,
197,
743,
1848,
1669,
11731,
2129,
1848,
961,
2092,
341,
298,
3244,
26133,
445,
19079,
4152,
311,
220,
15,
22620,
961,
481,
16,
330,
3610,
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... | 2 |
func TestClusterAdminListPartitionReassignmentsWithDiffVersion(t *testing.T) {
seedBroker := NewMockBroker(t, 1)
defer seedBroker.Close()
secondBroker := NewMockBroker(t, 2)
defer secondBroker.Close()
seedBroker.SetHandlerByMap(map[string]MockResponse{
"MetadataRequest": NewMockMetadataResponse(t).
SetContr... | explode_data.jsonl/40789 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 393
} | [
2830,
3393,
28678,
7210,
852,
49978,
693,
96310,
2354,
21751,
5637,
1155,
353,
8840,
836,
8,
341,
197,
22602,
65545,
1669,
1532,
11571,
65545,
1155,
11,
220,
16,
340,
16867,
10320,
65545,
10421,
2822,
197,
5569,
65545,
1669,
1532,
11571,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTrigger_SkipEvent(t *testing.T) {
controller := gomock.NewController(t)
defer controller.Finish()
mockUsers := mock.NewMockUserStore(controller)
mockUsers.EXPECT().Find(noContext, dummyRepo.UserID).Return(dummyUser, nil)
mockConfigService := mock.NewMockConfigService(controller)
mockConfigService.EXPEC... | explode_data.jsonl/26997 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 371
} | [
2830,
3393,
17939,
1098,
13389,
1556,
1155,
353,
8840,
836,
8,
341,
61615,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
6461,
991,
18176,
2822,
77333,
7137,
1669,
7860,
7121,
11571,
1474,
6093,
40845,
340,
77333,
7137,
22402,
7285,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIPToUInt32(t *testing.T) {
type args struct {
ip net.IP
}
tests := []struct {
name string
args args
want uint32
}{
{name: "", args: args{ip: net.IPv4(1, 2, 3, 4)}, want: 67305985},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := IPToUInt32(tt.args.ip); got != tt.... | explode_data.jsonl/13148 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 198
} | [
2830,
3393,
3298,
1249,
18777,
18,
17,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
46531,
4179,
46917,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
2622,
18,
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 TestMysql56VersionMatch(t *testing.T) {
table := map[string]bool{
"10.0.13-MariaDB-1~precise-log": false,
"5.1.63-google-log": false,
"5.6.24-log": true,
}
for input, want := range table {
if got := (&mysql56{}).VersionMatch(input); got != want {
t.Errorf("(&mysql56{}).... | explode_data.jsonl/11238 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 190
} | [
2830,
3393,
44,
14869,
20,
21,
5637,
8331,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
2415,
14032,
96436,
515,
197,
197,
1,
16,
15,
13,
15,
13,
16,
18,
5251,
10432,
3506,
12,
16,
93,
10645,
1064,
46332,
788,
895,
345,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestReverse(t *testing.T) {
tests := []struct {
sep string
want string
}{
{sep: ""},
{sep: "h"},
{sep: "ab"},
{sep: "abc"},
{sep: "abcdef"},
}
for _, test := range tests {
var want []string
for _, s := range test.sep {
want = append(want, string(s))
}
reverse(want)
test.want = stri... | explode_data.jsonl/6119 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 233
} | [
2830,
3393,
45695,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
197,
28036,
220,
914,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
90,
28036,
25,
77496,
197,
197,
90,
28036,
25,
330,
71,
7115,
197,
197,
90,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestProcessProposalBadDial(t *testing.T) {
_, err := testProcessProposal(t, "grpc://"+testAddress)
if err == nil {
t.Fatal("Process proposal should have failed")
}
} | explode_data.jsonl/45091 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 63
} | [
2830,
3393,
7423,
98637,
17082,
35,
530,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
1273,
7423,
98637,
1155,
11,
330,
56585,
1110,
5572,
1944,
4286,
340,
743,
1848,
621,
2092,
341,
197,
3244,
26133,
445,
7423,
13734,
1265,
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
] | 2 |
func TestCustomBuildDisablePush(t *testing.T) {
f := newIBDFixture(t, k8s.EnvKIND6)
defer f.TearDown()
sha := digest.Digest("sha256:11cd0eb38bc3ceb958ffb2f9bd70be3fb317ce7d255c8a4c3f4af30e298aa1aab")
f.docker.Images["gcr.io/some-project-162817/sancho:tilt-build"] = types.ImageInspect{ID: string(sha)}
manifest := ... | explode_data.jsonl/38266 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 307
} | [
2830,
3393,
10268,
11066,
25479,
16644,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
3256,
5262,
12735,
1155,
11,
595,
23,
82,
81214,
42,
5245,
21,
340,
16867,
282,
836,
682,
4454,
741,
197,
15247,
1669,
20882,
909,
15153,
445,
1524... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUserClone(t *testing.T) {
user := &User{
Username: "foo",
Password: "bar",
Permissions: &Permissions{
Publish: &SubjectPermission{
Allow: []string{"foo"},
},
Subscribe: &SubjectPermission{
Allow: []string{"bar"},
},
},
}
clone := user.clone()
if !reflect.DeepEqual(user, clone)... | explode_data.jsonl/75599 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 224
} | [
2830,
3393,
1474,
37677,
1155,
353,
8840,
836,
8,
341,
19060,
1669,
609,
1474,
515,
197,
197,
11115,
25,
330,
7975,
756,
197,
197,
4876,
25,
330,
2257,
756,
197,
197,
23851,
25,
609,
23851,
515,
298,
10025,
2538,
25,
609,
13019,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPostageHeaderError(t *testing.T) {
var (
mockStorer = mock.NewStorer()
mockStatestore = statestore.NewStateStore()
logger = logging.New(ioutil.Discard, 5)
mp = mockpost.New(mockpost.WithIssuer(postage.NewStampIssuer("", "", batchOk, 11, 10)))
client, _, _ = newTestServer(t,... | explode_data.jsonl/28017 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 770
} | [
2830,
3393,
4133,
424,
4047,
1454,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
77333,
623,
14827,
257,
284,
7860,
7121,
623,
14827,
741,
197,
77333,
1397,
4314,
284,
1584,
4314,
7121,
1397,
6093,
741,
197,
17060,
260,
284,
8392,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultiLineBody(t *testing.T) {
input1 := `
x = 1
y = 2
z = [ i | [x,y] = arr
arr[_] = i]
`
body1, err := ParseBody(input1)
if err != nil {
t.Fatalf("Unexpected parse error on enclosed body: %v", err)
}
expected1 := MustParseBody(`x = 1; y = 2; z = [i | [x,y] = arr; arr[_] = i]`)
if !bo... | explode_data.jsonl/50479 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 642
} | [
2830,
3393,
20358,
2460,
5444,
1155,
353,
8840,
836,
8,
1476,
22427,
16,
1669,
22074,
197,
10225,
284,
220,
16,
198,
197,
14522,
284,
220,
17,
198,
197,
20832,
284,
508,
600,
760,
508,
87,
7358,
60,
284,
2890,
198,
24178,
2890,
1349... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFetchAutoAsgsVmss(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
vmssName := "test-vmss"
vmssTag := "fake-tag"
vmssTagValue := "fake-value"
minString := "1"
minVal := 1
maxString := "5"
maxVal := 5
ngdo := cloudprovider.NodeGroupDiscoveryOptions{
NodeGroupAutoDiscoverySpecs: ... | explode_data.jsonl/12797 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 659
} | [
2830,
3393,
20714,
13253,
32,
1991,
82,
88124,
778,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
54879,
778,
675,
1669,
330,
1944,
12,
7338,
778,
698,
54879,
778,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrintln(t *testing.T) {
t.Log("Testing Println()")
// Println will ALWAYS add a space between the label prefix and the
// value printed. This needs correction now.
testprintlntable := []struct {
setlevel int
level int
inputtext string
outputtext string
}{
{setlevel: 2, level: 0, inputte... | explode_data.jsonl/60139 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 885
} | [
2830,
3393,
8994,
2261,
1155,
353,
8840,
836,
8,
341,
3244,
5247,
445,
16451,
8213,
2261,
368,
5130,
197,
322,
8213,
2261,
686,
67414,
912,
264,
3550,
1948,
279,
2383,
9252,
323,
279,
198,
197,
322,
897,
16709,
13,
1096,
3880,
26262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInstanceCredentialUserInfo(t *testing.T) {
// Enable the OriginatingIdentity feature
prevOrigIDEnablement := sctestutil.EnableOriginatingIdentity(t, true)
defer utilfeature.DefaultMutableFeatureGate.Set(fmt.Sprintf("%v=%v", scfeatures.OriginatingIdentity, prevOrigIDEnablement))
creatorUserName := "creator... | explode_data.jsonl/80701 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 542
} | [
2830,
3393,
2523,
48265,
36158,
1155,
353,
8840,
836,
8,
341,
197,
322,
18567,
279,
17116,
1095,
18558,
4565,
198,
50728,
62726,
915,
11084,
478,
1669,
274,
67880,
1314,
32287,
13298,
1095,
18558,
1155,
11,
830,
340,
16867,
4094,
12753,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTaskResize(t *testing.T) {
t.Parallel()
client, err := newClient(t, address)
if err != nil {
t.Fatal(err)
}
defer client.Close()
var (
image Image
ctx, cancel = testContext()
id = t.Name()
)
defer cancel()
image, err = client.GetImage(ctx, testImage)
if err != nil {
t.Fata... | explode_data.jsonl/39646 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 363
} | [
2830,
3393,
6262,
30561,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
25291,
11,
1848,
1669,
501,
2959,
1155,
11,
2621,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
2943,
10421,
2822,
2405,
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... | 7 |
func TestCallFunctionWithExplicitThis(t *testing.T) {
t.Parallel()
ctx := NewIsolate().NewContext()
this, _ := ctx.Eval(`(function(){ this.z = 3; return this; })()`, "")
add, _ := ctx.Eval(`((x,y)=>(x+y+this.z))`, "")
one, _ := ctx.Eval(`1`, "")
two, _ := ctx.Eval(`2`, "")
res, err := add.Call(this, one, two)
i... | explode_data.jsonl/81558 | {
"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,
7220,
5152,
2354,
98923,
1986,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
1532,
3872,
33066,
1005,
3564,
1972,
741,
2046,
11,
716,
1669,
5635,
5142,
831,
5809,
7,
1688,
11895,
419,
3938,
284,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestDefaultValuesNotAllowedWithSlice(t *testing.T) {
var args struct {
A []int `default:"123"` // required not allowed with default!
}
err := parse("", &args)
assert.EqualError(t, err, ".A: default values are not supported for slice fields")
} | explode_data.jsonl/13083 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 82
} | [
2830,
3393,
3675,
6227,
97634,
2354,
33236,
1155,
353,
8840,
836,
8,
341,
2405,
2827,
2036,
341,
197,
22985,
3056,
396,
1565,
2258,
2974,
16,
17,
18,
39917,
442,
2567,
537,
5420,
448,
1638,
4894,
197,
630,
9859,
1669,
4715,
19814,
609... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTypeSystem_InputObjectFieldsMustHaveInputTypes_RejectsAnEmptyInputFieldType(t *testing.T) {
_, err := schemaWithInputFieldOfType(nil)
expectedError := `BadInputObject.badField field type must be Input Type but got: <nil>.`
if err == nil || err.Error() != expectedError {
t.Fatalf("Expected error: %v, got %... | explode_data.jsonl/79187 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 114
} | [
2830,
3393,
929,
2320,
48653,
1190,
8941,
31776,
12116,
2505,
4173,
50693,
583,
82,
2082,
3522,
2505,
63733,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
10802,
2354,
2505,
1877,
34696,
27907,
340,
42400,
1454,
1669,
1565,
17082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemoveWhileRunning(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
cron := newWithSeconds()
cron.Start()
defer cron.Stop()
id, _ := cron.AddFunc("* * * * * ?", func() { wg.Done() })
cron.Remove(id)
select {
case <-time.After(OneSecond):
case <-wait(wg):
t.FailNow()
}
} | explode_data.jsonl/8300 | {
"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,
13021,
7983,
18990,
1155,
353,
8840,
836,
8,
341,
72079,
1669,
609,
12996,
28384,
2808,
16094,
72079,
1904,
7,
16,
692,
1444,
2248,
1669,
501,
2354,
15343,
741,
1444,
2248,
12101,
741,
16867,
46582,
30213,
741,
15710,
11,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientMethodWithComplexBody(t *testing.T) {
Convey("TestClientMethodWithComplexBody", t, func(c C) {
targetDir, err := ioutil.TempDir("", "")
c.So(err, ShouldBeNil)
apiDef := new(raml.APIDefinition)
err = raml.ParseFile("../fixtures/body.raml", apiDef)
c.So(err, ShouldBeNil)
client := NewClient(... | explode_data.jsonl/19337 | {
"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,
2959,
3523,
2354,
31137,
5444,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
2271,
2959,
3523,
2354,
31137,
5444,
497,
259,
11,
2915,
1337,
356,
8,
341,
197,
28861,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
14676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChangeOrgUserStatus(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
testSuccess := func(orgID, userID int64, public bool) {
assert.NoError(t, ChangeOrgUserStatus(orgID, userID, public))
orgUser := AssertExistsAndLoadBean(t, &OrgUser{OrgID: orgID, UID: userID}).(*OrgUser)
assert.Equal(t, publi... | explode_data.jsonl/71069 | {
"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,
4072,
42437,
1474,
2522,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
31166,
2271,
5988,
12367,
18185,
7188,
1669,
2915,
36246,
915,
11,
35204,
526,
21,
19,
11,
584,
1807,
8,
341,
197,
6948,
35699,
1155,
11,
10388,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIndexOfImageSignature(t *testing.T) {
for _, tc := range []struct {
name string
signatures []ImageSignature
matchType string
matchContent []byte
expectedIndex int
}{
{
name: "empty",
matchType: ImageSignatureTypeAtomicImageV1,
matchContent: []byte("blob"),
... | explode_data.jsonl/40838 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1278
} | [
2830,
3393,
27376,
1906,
25088,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
69054,
2789,
262,
3056,
1906,
25088,
198,
197,
47706,
929,
257,
914,
198,
197,
47706,
2762,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCollElgNotifier(t *testing.T) {
mockDeployedChaincodeInfoProvider := &mock.DeployedChaincodeInfoProvider{}
mockDeployedChaincodeInfoProvider.UpdatedChaincodesReturns([]*ledger.ChaincodeLifecycleInfo{
{Name: "cc1"},
}, nil)
// Returns 3 collections - the bool value indicates the eligibility of peer for c... | explode_data.jsonl/33482 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 747
} | [
2830,
3393,
15265,
6582,
70,
64729,
1155,
353,
8840,
836,
8,
341,
77333,
69464,
291,
18837,
1851,
1731,
5179,
1669,
609,
16712,
34848,
1989,
291,
18837,
1851,
1731,
5179,
16094,
77333,
69464,
291,
18837,
1851,
1731,
5179,
13,
16196,
18837... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGrid(t *testing.T) {
// Construct the following grid, taken from https://github.com/git/git/blob/master/t/t6600-test-reach.sh
// (10,10)
// / \
// (10,9) (9,10)
// / \ / \
// (10,8) (9,9) (8,10)
// / \ / \ / \
// ... | explode_data.jsonl/63462 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 917
} | [
2830,
3393,
3543,
1155,
353,
8840,
836,
8,
341,
197,
322,
18678,
279,
2701,
5827,
11,
4429,
504,
3703,
1110,
5204,
905,
60590,
60590,
34827,
23303,
5523,
5523,
21,
21,
15,
15,
16839,
5504,
610,
2395,
198,
197,
322,
1797,
320,
16,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestConcurrentShutdown(t *testing.T) {
defer runtime.GOMAXPROCS(runtime.NumCPU())
if unprivileged() {
t.Skip("skipping test in unprivileged mode.")
}
var wg sync.WaitGroup
for i := 0; i < 10; i++ {
wg.Add(1)
go func(i int) {
c, err := NewContainer(strconv.Itoa(i))
if err != nil {
t.Errorf(e... | explode_data.jsonl/2809 | {
"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,
1109,
3231,
62004,
1155,
353,
8840,
836,
8,
341,
16867,
15592,
1224,
1898,
2954,
9117,
6412,
89467,
39847,
31615,
12367,
743,
650,
97288,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
304,
650,
97288,
3856,
13053,
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 TestOperationADCWithOverflow(t *testing.T) {
cpu := testCPU
cpu.Reset()
v := -10
z := -127
cpu.a = byte(v)
cpu.addressAbs = Word(0x0100)
cpu.bus.CPUWrite(cpu.addressAbs, byte(z))
ADC(cpu)
assertTrue(t, cpu.StatusRegister(C))
assertTrue(t, cpu.StatusRegister(V))
} | explode_data.jsonl/73053 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 119
} | [
2830,
3393,
8432,
31956,
2354,
42124,
1155,
353,
8840,
836,
8,
341,
80335,
1669,
1273,
31615,
198,
80335,
36660,
741,
5195,
1669,
481,
16,
15,
198,
20832,
1669,
481,
16,
17,
22,
198,
80335,
5849,
284,
4922,
3747,
340,
80335,
13792,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReplicaWinsOverSize(t *testing.T) {
size := int32(3)
jaeger := v1.NewJaeger(types.NamespacedName{Name: "TestReplicaWinsOverSize"})
jaeger.Spec.Collector.Size = 2
jaeger.Spec.Collector.Replicas = &size
collector := NewCollector(jaeger)
dep := collector.Get()
assert.Equal(t, int32(3), *dep.Spec.Replicas)... | explode_data.jsonl/69115 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
18327,
15317,
96186,
1918,
1695,
1155,
353,
8840,
836,
8,
341,
13832,
1669,
526,
18,
17,
7,
18,
340,
197,
5580,
1878,
1669,
348,
16,
7121,
52445,
1878,
52613,
98932,
68552,
675,
63121,
25,
330,
2271,
18327,
15317,
96186,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTxNotifierHistoricalSpendDispatch(t *testing.T) {
t.Parallel()
const startingHeight = 10
hintCache := newMockHintCache()
n := chainntnfs.NewTxNotifier(startingHeight, 100, hintCache, hintCache)
// We'll start by constructing the spending details of the outpoint
// below.
spentOutpoint := zeroOutPoint... | explode_data.jsonl/69554 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 877
} | [
2830,
3393,
31584,
64729,
48983,
938,
50,
3740,
11283,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
4777,
5916,
3640,
284,
220,
16,
15,
271,
9598,
396,
8233,
1669,
501,
11571,
26987,
8233,
741,
9038,
1669,
8781,
406,
77,
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 TestFloat32_Remove(t *testing.T) {
testcases := []struct {
name string
s Float32
input []float32
expect []float32
}{
{
name: "test Float32 Remove, inputs nothing",
s: map[float32]struct{}{1: {}, 1.5: {}, 1.2: {}},
input: []float32{},
expect: []float32{1, 1.5, 1.2},
},
{
... | explode_data.jsonl/60102 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 421
} | [
2830,
3393,
5442,
18,
17,
66843,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
1903,
414,
13001,
18,
17,
198,
197,
22427,
220,
3056,
3649,
18,
17,
198,
197,
24952,
3056,
3649,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestServerAppendEntriesWithStaleTermsAreRejected(t *testing.T) {
s := newTestServer("1", &testTransporter{})
s.Start()
defer s.Stop()
s.(*server).currentTerm = 2
// Append single entry.
e, _ := newLogEntry(nil, 1, 1, &testCommand1{Val: "foo", I: 10})
entries := []*LogEntry{e}
resp := s.AppendEntries(new... | explode_data.jsonl/44065 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 251
} | [
2830,
3393,
5475,
23877,
24533,
2354,
623,
1574,
43128,
11526,
77693,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
501,
2271,
5475,
445,
16,
497,
609,
1944,
27560,
261,
6257,
692,
1903,
12101,
2822,
16867,
274,
30213,
741,
1903,
41399,
403... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_PrintInt(t *testing.T) {
cases := []int{
111, 69, 420, 000, 646545465,
}
for _, c := range cases {
output := Print(c)
assert.Equal(t, fmt.Sprintf("%+v\n", c), output)
}
} | explode_data.jsonl/43705 | {
"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,
45788,
1072,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
396,
515,
197,
197,
16,
16,
16,
11,
220,
21,
24,
11,
220,
19,
17,
15,
11,
220,
15,
15,
15,
11,
220,
21,
19,
21,
20,
19,
20,
19,
21,
20,
345,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMapProxy_EvictWithNilKey(t *testing.T) {
_, err := mp.Evict(nil)
AssertErrorNotNil(t, err, "evict did not return an error for nil key")
mp.Clear()
} | explode_data.jsonl/56985 | {
"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,
2227,
16219,
2089,
85,
849,
2354,
19064,
1592,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
10490,
5142,
85,
849,
27907,
340,
18017,
1454,
96144,
1155,
11,
1848,
11,
330,
5120,
849,
1521,
537,
470,
458,
1465,
369,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShouldGetRemovedUserGroupsFromBackend(t *testing.T) {
mock := mocks.NewMockAutheliaCtx(t)
defer mock.Close()
// Setup pointer to john so we can adjust it during the test.
user := &authentication.UserDetails{
Username: "john",
Groups: []string{
"admin",
"users",
},
Emails: []string{
"john@... | explode_data.jsonl/20204 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 852
} | [
2830,
3393,
14996,
1949,
42642,
1474,
22173,
3830,
29699,
1155,
353,
8840,
836,
8,
341,
77333,
1669,
68909,
7121,
11571,
5087,
35929,
23684,
1155,
340,
16867,
7860,
10421,
2822,
197,
322,
18626,
7445,
311,
39642,
773,
582,
646,
7500,
432,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ReplayBlocks(t *testing.T) {
t.Parallel()
app := startNewApplication(t,
withConfigSet(func(c *configtest.TestGeneralConfig) {
c.Overrides.EVMEnabled = null.BoolFrom(true)
c.Overrides.GlobalEvmNonceAutoSync = null.BoolFrom(false)
c.Overrides.GlobalBalanceMonitorEnabled = null.BoolFrom(false... | explode_data.jsonl/5264 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 233
} | [
2830,
3393,
2959,
50693,
1363,
29804,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
28236,
1669,
1191,
3564,
4988,
1155,
345,
197,
46948,
2648,
1649,
18552,
1337,
353,
1676,
1944,
8787,
15415,
2648,
8,
341,
298,
1444,
13,
80010... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckoutSuccess(t *testing.T) {
testRepo := newTestRepo(t)
defer testRepo.cleanup(t)
require.Nil(t, os.WriteFile(
testRepo.testFileName,
[]byte("hello world"),
os.FileMode(0o644),
))
res, err := command.NewWithWorkDir(
testRepo.sut.Dir(), "git", "diff", "--name-only").Run()
require.Nil(t, err)
... | explode_data.jsonl/14013 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 291
} | [
2830,
3393,
55145,
7188,
1155,
353,
8840,
836,
8,
341,
18185,
25243,
1669,
501,
2271,
25243,
1155,
340,
16867,
1273,
25243,
87689,
1155,
692,
17957,
59678,
1155,
11,
2643,
4073,
1703,
1006,
197,
18185,
25243,
5958,
10903,
345,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInvalidAdminNodeOU(t *testing.T) {
//测试数据/节点1:
//配置启用nodeous,但管理员不携带
//任何有效的结节。因此,MSP初始化必须失败
thisMSP, err := getLocalMSPWithVersionAndError(t, "testdata/nodeous1", MSPv1_1)
assert.True(t, thisMSP.(*bccspmsp).ouEnforcement)
assert.Error(t, err)
//mspv1_0不应失败
thisMSP, err = getLocalMSPWithVersionAndError(t,... | explode_data.jsonl/2648 | {
"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,
7928,
7210,
1955,
11922,
1155,
353,
8840,
836,
8,
341,
322,
81705,
20074,
14,
92374,
16,
28311,
322,
85767,
111456,
3509,
782,
3837,
77288,
95457,
16530,
107426,
198,
322,
99885,
104775,
36885,
55502,
1773,
101886,
3837,
44,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGocloak_GetServerInfo(t *testing.T) {
t.Parallel()
client := NewClientWithDebug(t)
token := GetAdminToken(t, client)
serverInfo, err := client.GetServerInfo(
token.AccessToken,
)
FailIfErr(t, err, "Failed to fetch server info")
t.Logf("Server Info: %+v", serverInfo)
FailRequest(client, nil, 1, 0)
_... | explode_data.jsonl/79504 | {
"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,
38,
509,
385,
585,
13614,
5475,
1731,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
25291,
1669,
1532,
2959,
2354,
7939,
1155,
340,
43947,
1669,
2126,
7210,
3323,
1155,
11,
2943,
340,
41057,
1731,
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... | 1 |
func TestTLSExtensionsVerifyClient(t *testing.T) {
// Server
extendVerify := map[string]interface{}{
"name": "server",
"cn": "client",
}
serverInfo := &certInfo{
CommonName: extendVerify["name"].(string),
Curve: "RSA",
}
serverConfig, err := serverInfo.CreateCertConfig()
if err != nil {
t.Errorf... | explode_data.jsonl/1523 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 732
} | [
2830,
3393,
45439,
31282,
32627,
2959,
1155,
353,
8840,
836,
8,
341,
197,
322,
8422,
198,
197,
25048,
32627,
1669,
2415,
14032,
31344,
67066,
197,
197,
31486,
788,
330,
4030,
756,
197,
197,
1,
14271,
788,
256,
330,
2972,
756,
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... | 1 |
func TestCommitList(t *testing.T) {
defer gock.Off()
mockServerVersion()
gock.New("https://try.gitea.io").
Get("/api/v1/repos/go-gitea/gitea/commits").
Reply(200).
Type("application/json").
File("testdata/commits.json")
client, _ := New("https://try.gitea.io")
got, _, err := client.Git.ListCommits(conte... | explode_data.jsonl/50607 | {
"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,
33441,
852,
1155,
353,
8840,
836,
8,
341,
16867,
728,
377,
13,
4596,
2822,
77333,
5475,
5637,
2822,
3174,
1176,
7121,
445,
2428,
1110,
1539,
1302,
632,
64,
4245,
38609,
197,
37654,
4283,
2068,
5457,
16,
49505,
25525,
2371,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMessageExportSettingsIsValidGlobalRelaySettingsInvalidCustomerType(t *testing.T) {
fs := &FileSettings{
DriverName: NewString("foo"), // bypass file location check
}
mes := &MessageExportSettings{
EnableExport: NewBool(true),
ExportFormat: NewString(COMPLIANCE_EXPORT_TYPE_GLOBALRELAY),
... | explode_data.jsonl/50688 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 275
} | [
2830,
3393,
2052,
16894,
6086,
55470,
11646,
6740,
352,
6086,
7928,
12792,
929,
1155,
353,
8840,
836,
8,
341,
53584,
1669,
609,
1703,
6086,
515,
197,
10957,
5469,
675,
25,
1532,
703,
445,
7975,
3975,
442,
30718,
1034,
3728,
1779,
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 TestMultiple(t *testing.T) {
testDuration := time.Second * 10
// number of available mathworker kites to be called
kiteNumber := 3
// number of exp kites that will call mathwork kites
clientNumber := 3
// ports are starting from 6000 up to 6000 + kiteNumber
port := 6000
transport := transportFromEnv()
... | explode_data.jsonl/68243 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 664
} | [
2830,
3393,
32089,
1155,
353,
8840,
836,
8,
341,
18185,
12945,
1669,
882,
32435,
353,
220,
16,
15,
271,
197,
322,
1372,
315,
2500,
6888,
21462,
595,
3611,
311,
387,
2598,
198,
16463,
632,
2833,
1669,
220,
18,
271,
197,
322,
1372,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStrExtract(t *testing.T) {
pat := []string{"mTOR", "AMPK", "dsf", "RNA-Seq", "RNA-seq"}
patStr := strings.Join(pat, "|")
res := StrExtract("mTOR, AMPK, DSF, RNA-Seq", patStr, 4)
if len(res) != 3 {
log.Fatalf("StrExtract faild: length of res should equals 3")
}
} | explode_data.jsonl/59574 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 119
} | [
2830,
3393,
2580,
28959,
1155,
353,
8840,
836,
8,
341,
3223,
266,
1669,
3056,
917,
4913,
76,
49658,
497,
330,
16024,
42,
497,
330,
5356,
69,
497,
330,
30720,
12,
20183,
497,
330,
30720,
7806,
80,
16707,
3223,
266,
2580,
1669,
9069,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMysql56ResetReplicationCommands(t *testing.T) {
want := []string{
"STOP SLAVE",
"RESET SLAVE ALL",
"RESET MASTER",
}
if got := (&mysql56{}).ResetReplicationCommands(); !reflect.DeepEqual(got, want) {
t.Errorf("(&mysql56{}).ResetReplicationCommands() = %#v, want %#v", got, want)
}
} | explode_data.jsonl/11239 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
44,
14869,
20,
21,
14828,
18327,
1693,
30479,
1155,
353,
8840,
836,
8,
341,
50780,
1669,
3056,
917,
515,
197,
197,
1,
50669,
16797,
9493,
756,
197,
197,
1,
50000,
16797,
9493,
13097,
756,
197,
197,
1,
50000,
71197,
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 TestGraphAttributeSetting(t *testing.T) {
g := dot.NewGraph("Test")
if g.Set("label", "foo") != nil {
t.Error("Error setting value on g", g)
}
g.Set("Damping", "x")
if g.Set("this_does_not_exist", "and_should_error") != dot.AttributeError {
t.Error("Did not get godot.AttributeError when setting invalid at... | explode_data.jsonl/409 | {
"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,
11212,
3907,
15400,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
12756,
7121,
11212,
445,
2271,
1138,
743,
342,
4202,
445,
1502,
497,
330,
7975,
899,
961,
2092,
341,
197,
3244,
6141,
445,
1454,
6243,
897,
389,
342,
497,
342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEncodeOneofNilWrapper(t *testing.T) {
m := &testpb.TestAllTypes{OneofField: (*testpb.TestAllTypes_OneofUint32)(nil)}
b, err := proto.Marshal(m)
if err != nil {
t.Fatal(err)
}
if len(b) > 0 {
t.Errorf("Marshal return non-empty, want empty")
}
} | explode_data.jsonl/1538 | {
"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,
32535,
3966,
1055,
19064,
11542,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
609,
1944,
16650,
8787,
2403,
4173,
90,
3966,
1055,
1877,
25,
4609,
1944,
16650,
8787,
2403,
4173,
68201,
1055,
21570,
18,
17,
2376,
8385,
10569,
223... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLabelsExecutor(t *testing.T) {
tests := []struct {
name string
mockDb NotificationLoader
expectedResult []contract.Notification
expectedError bool
expectedErrType error
}{
{
name: "Successful database call",
mockDb: createMockNotificiationLoaderLab... | explode_data.jsonl/31060 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 867
} | [
2830,
3393,
23674,
25255,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
77333,
7994,
688,
16571,
9181,
198,
197,
42400,
2077,
220,
3056,
20257,
49329,
198,
197,
42400,
1454,
256,
1807,
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... | 7 |
func TestIntPtr(t *testing.T) {
var args struct {
Foo *int
}
err := parse("--foo 123", &args)
require.NoError(t, err)
require.NotNil(t, args.Foo)
assert.Equal(t, 123, *args.Foo)
} | explode_data.jsonl/12990 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 86
} | [
2830,
3393,
74156,
1155,
353,
8840,
836,
8,
341,
2405,
2827,
2036,
341,
197,
12727,
2624,
353,
396,
198,
197,
532,
9859,
1669,
4715,
21549,
7975,
220,
16,
17,
18,
497,
609,
2116,
340,
17957,
35699,
1155,
11,
1848,
340,
17957,
93882,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewRequest(t *testing.T) {
opts := Options{BaseURL: apiURL}
client, err := New(opts)
require.NoError(t, err, "create client error")
t.Run("correctly create request path", func(t *testing.T) {
req, err := client.NewRequest(http.MethodGet, "my-resource", nil)
require.NoError(t, err, "new request not er... | explode_data.jsonl/66012 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 384
} | [
2830,
3393,
3564,
1900,
1155,
353,
8840,
836,
8,
341,
64734,
1669,
14566,
90,
3978,
3144,
25,
6330,
3144,
532,
25291,
11,
1848,
1669,
1532,
30885,
340,
17957,
35699,
1155,
11,
1848,
11,
330,
3182,
2943,
1465,
5130,
3244,
16708,
445,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLabelShardedMetaFilter_Filter_Hashmod(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
defer cancel()
relabelContentYamlFmt := `
- action: hashmod
source_labels: ["%s"]
target_label: shard
modulus: 3
- action: keep
source_labels: ["sh... | explode_data.jsonl/67637 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1331
} | [
2830,
3393,
2476,
2016,
20958,
12175,
5632,
68935,
2039,
988,
2593,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
7636,
5378,
19047,
1507,
220,
16,
17,
15,
77053,
32435,
340,
16867,
9121,
2822,
17200,
1502,
2762,
56,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDefaultGrpcServerSettings(t *testing.T) {
gss := &GRPCServerSettings{}
opts, err := gss.ToServerOption(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings())
_ = grpc.NewServer(opts...)
assert.NoError(t, err)
assert.Len(t, opts, 2)
} | explode_data.jsonl/80325 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 98
} | [
2830,
3393,
3675,
6464,
3992,
5475,
6086,
1155,
353,
8840,
836,
8,
341,
3174,
778,
1669,
609,
8626,
4872,
5475,
6086,
16094,
64734,
11,
1848,
1669,
342,
778,
3274,
5475,
5341,
21228,
1944,
7121,
45,
453,
9296,
1507,
3692,
1944,
7121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFailGracefullyBadLocalbootType(t *testing.T) {
err := add("localboot", []string{"not-valid"})
if err.Error() != "method needs to be grub or path" {
t.Errorf(`err.Error() = %q, want "error message: method needs to be grub or path"`, err.Error())
}
} | explode_data.jsonl/25079 | {
"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,
19524,
86543,
3641,
17082,
7319,
4619,
929,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
912,
445,
2438,
4619,
497,
3056,
917,
4913,
1921,
84810,
23625,
743,
1848,
6141,
368,
961,
330,
4393,
3880,
311,
387,
73706,
476,
1815,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntArray_Clear(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
a1 := []int{1, 2, 3, 5}
array1 := garray.NewIntArrayFrom(a1)
array1.Clear()
t.Assert(array1.Len(), 0)
})
} | explode_data.jsonl/47617 | {
"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,
95338,
57744,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11323,
16,
1669,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
20,
532,
197,
11923,
16,
1669,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestProtocolNegotiation(t *testing.T) {
cluster, _ := cassandra.NewCluster()
if !assert.NotNil(t, cluster) {
t.FailNow()
}
assert.Equal(t, cluster.ProtocolVersion, cassandra.MAX_SUPPORTED_VERSION)
session, _ := cluster.Connect()
if !assert.NotNil(t, session) {
t.FailNow()
}
defer cluster.Shutdown()
u... | explode_data.jsonl/52059 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 379
} | [
2830,
3393,
20689,
47800,
354,
7101,
1155,
353,
8840,
836,
8,
341,
197,
18855,
11,
716,
1669,
44224,
23274,
7121,
28678,
741,
743,
753,
2207,
93882,
1155,
11,
10652,
8,
341,
197,
3244,
57243,
7039,
741,
197,
532,
6948,
12808,
1155,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestIsEqual(t *testing.T) {
var e1, e2 float32
e := createRandomObject(e1)
if v, ok := e.(float32); ok {
e1 = v
}
e = createRandomObject(e2)
if v, ok := e.(float32); ok {
e2 = v
}
s1 := New()
s2 := New()
if !s1.IsEqual(s2) {
t.Error("expected 2 new sets to be equal")
}
s1.Add(e1)
s1.Add(e2)
i... | explode_data.jsonl/35012 | {
"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,
3872,
2993,
1155,
353,
8840,
836,
8,
341,
2405,
384,
16,
11,
384,
17,
2224,
18,
17,
198,
7727,
1669,
1855,
13999,
1190,
2026,
16,
340,
743,
348,
11,
5394,
1669,
384,
12832,
3649,
18,
17,
1215,
5394,
341,
197,
7727,
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... | 6 |
func TestSchemaWriteAndReadBack(t *testing.T) {
conn, cleanup, _ := testserver.NewTestServer(require.New(t), 0, memdb.DisableGC, 0, false, testfixtures.EmptyDatastore)
t.Cleanup(cleanup)
client := v1alpha1.NewSchemaServiceClient(conn)
requestedObjectDefNames := []string{"example/user"}
_, err := client.ReadSchem... | explode_data.jsonl/54545 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 388
} | [
2830,
3393,
8632,
7985,
3036,
4418,
3707,
1155,
353,
8840,
836,
8,
341,
32917,
11,
21290,
11,
716,
1669,
1273,
4030,
7121,
2271,
5475,
23482,
7121,
1155,
701,
220,
15,
11,
1833,
1999,
10166,
480,
22863,
11,
220,
15,
11,
895,
11,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPullImage(t *testing.T) {
require := require.New(t)
ctx, cleanup := context.BuildContextFixture()
defer cleanup()
p, err := PullClientFixtureWithAlpine(ctx)
require.NoError(err)
// Pull image.
_, err = p.Pull(testutil.SampleImageTag)
require.NoError(err)
_, err = p.store.Layers.GetStoreFileStat("39... | explode_data.jsonl/63635 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 213
} | [
2830,
3393,
36068,
1906,
1155,
353,
8840,
836,
8,
341,
17957,
1669,
1373,
7121,
1155,
340,
20985,
11,
21290,
1669,
2266,
25212,
1972,
18930,
741,
16867,
21290,
2822,
3223,
11,
1848,
1669,
31828,
2959,
18930,
2354,
2101,
38038,
7502,
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 TestFileHelper_IsPathString_06(t *testing.T) {
fh := FileHelper{}
pathFile := fh.AdjustPathSlash("../../filesfortest/levelfilesfortest/level_01_dir/" +
"level_02_dir/level_03_dir")
pathFile = "." + pathFile
_, _, _, err := fh.IsPathString(pathFile)
if err == nil {
t.Errorf("Expected an error... | explode_data.jsonl/14511 | {
"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,
1703,
5511,
31879,
1820,
703,
62,
15,
21,
1155,
353,
8840,
836,
8,
1476,
220,
36075,
1669,
2887,
5511,
31483,
220,
1815,
1703,
1669,
36075,
17865,
4250,
1820,
88004,
36800,
7198,
3969,
477,
14,
3449,
490,
3658,
3969,
477,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntegration(t *testing.T) {
images := tengo.SplitEnv("SKEEMA_TEST_IMAGES")
if len(images) == 0 {
fmt.Println("SKEEMA_TEST_IMAGES env var is not set, so integration tests will be skipped!")
fmt.Println("To run integration tests, you may set SKEEMA_TEST_IMAGES to a comma-separated")
fmt.Println("list of ... | explode_data.jsonl/34618 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 244
} | [
2830,
3393,
52464,
1155,
353,
8840,
836,
8,
341,
197,
3642,
1669,
66890,
19823,
14359,
445,
50,
3390,
48610,
11641,
79415,
1138,
743,
2422,
40877,
8,
621,
220,
15,
341,
197,
11009,
12419,
445,
50,
3390,
48610,
11641,
79415,
6105,
762,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRemoveClusterMetricsWhenNumberOfMetricsExceedsDefaultChannelLength_2843(t *testing.T) {
clusterID := uuid.MustRandom()
metric := prometheus.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "scylla_manager",
Subsystem: "healthcheck",
Name: "status",
}, []string{clusterKey, hostKey})
for i := 0; i < 3... | explode_data.jsonl/10928 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 259
} | [
2830,
3393,
13021,
28678,
27328,
4498,
40619,
27328,
840,
4635,
82,
3675,
9629,
4373,
62,
17,
23,
19,
18,
1155,
353,
8840,
836,
8,
341,
197,
18855,
915,
1669,
16040,
50463,
13999,
741,
2109,
16340,
1669,
2706,
39705,
7121,
38,
19392,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCopyFromReturnValue(t *testing.T) {
target := hooks{
RawPreStart: "foo",
}
source := hooks{
RawPostStart: "bar",
}
assert.False(t, target.CopyFrom(source), "Copying unrelated hooks should not trigger an override")
target = hooks{
RawPreStart: "foo",
}
source = hooks{
RawPreStart: "bar",
RawP... | explode_data.jsonl/71540 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 154
} | [
2830,
3393,
12106,
3830,
40426,
1155,
353,
8840,
836,
8,
341,
28861,
1669,
29677,
515,
197,
11143,
672,
4703,
3479,
25,
330,
7975,
756,
197,
532,
47418,
1669,
29677,
515,
197,
11143,
672,
4133,
3479,
25,
330,
2257,
756,
197,
532,
6948... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSimpleRouter(t *testing.T) {
config := &Config{
Rule: []*RoutingRule{
{
TargetTag: &RoutingRule_Tag{
Tag: "test",
},
NetworkList: &net.NetworkList{
Network: []net.Network{net.Network_TCP},
},
},
},
}
mockCtl := gomock.NewController(t)
defer mockCtl.Finish()
mockDns :=... | explode_data.jsonl/81244 | {
"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,
16374,
9523,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
609,
2648,
515,
197,
11143,
1111,
25,
29838,
24701,
11337,
515,
298,
197,
515,
571,
197,
6397,
5668,
25,
609,
24701,
11337,
78040,
515,
464,
197,
5668,
25,
330,
1944,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRetry(t *testing.T) {
testCases := []struct {
desc string
maxRequestAttempts int
wantRetryAttempts int
wantResponseStatus int
amountFaultyEndpoints int
}{
{
desc: "no retry on success",
maxRequestAttempts: 1,
wantRetryAttempts: 0,
wan... | explode_data.jsonl/44112 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1207
} | [
2830,
3393,
51560,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
1698,
914,
198,
197,
22543,
1900,
81517,
262,
526,
198,
197,
50780,
51560,
81517,
257,
526,
198,
197,
50780,
92663,
262,
526,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestVerbs(t *testing.T) {
c := testRESTClient(t, nil)
if r := c.Post(); r.verb != "POST" {
t.Errorf("Post verb is wrong")
}
if r := c.Put(); r.verb != "PUT" {
t.Errorf("Put verb is wrong")
}
if r := c.Get(); r.verb != "GET" {
t.Errorf("Get verb is wrong")
}
if r := c.Delete(); r.verb != "DELETE" {
... | explode_data.jsonl/13279 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 161
} | [
2830,
3393,
10141,
1279,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1273,
38307,
2959,
1155,
11,
2092,
340,
743,
435,
1669,
272,
23442,
2129,
435,
13,
22328,
961,
330,
2946,
1,
341,
197,
3244,
13080,
445,
4133,
18607,
374,
4969,
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... | 5 |
func TestIndexMethods(t *testing.T) {
router := MakeRouter()
router.GET("/", printMethod)
router.POST("/", printMethod)
router.PUT("/", printMethod)
router.PATCH("/", printMethod)
router.DELETE("/", printMethod)
RunRequest(router, "GET", "/", 200, "GET", t)
RunRequest(router, "POST", "/", 200, "POST", t)
RunR... | explode_data.jsonl/15102 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 192
} | [
2830,
3393,
1552,
17856,
1155,
353,
8840,
836,
8,
341,
67009,
1669,
7405,
9523,
741,
67009,
17410,
35460,
1173,
3523,
340,
67009,
14721,
35460,
1173,
3523,
340,
67009,
98371,
35460,
1173,
3523,
340,
67009,
1069,
8884,
35460,
1173,
3523,
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 TestQueryUserGroup(t *testing.T) {
type args struct {
query models.UserGroup
}
tests := []struct {
name string
args args
want int
wantErr bool
}{
{"Query all user group", args{query: models.UserGroup{GroupName: "test_group_01"}}, 1, false},
{"Query all ldap group", args{query: models.Use... | explode_data.jsonl/73815 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 383
} | [
2830,
3393,
2859,
1474,
2808,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
27274,
4119,
7344,
2808,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
198,
197,
50780,
262,
526... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerOriginServerUnreachable(t *testing.T) {
// create a server, then promptly shut it down
originServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
}))
originURL, _ := url.Parse(originServer.URL)
originServer.Close()
handler := h... | explode_data.jsonl/15689 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 257
} | [
2830,
3393,
5475,
13298,
5475,
1806,
46550,
1155,
353,
8840,
836,
8,
341,
197,
322,
1855,
264,
3538,
11,
1221,
39422,
9311,
432,
1495,
198,
197,
8611,
5475,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildPolicyName(t *testing.T) {
assert := tassert.New(t)
svc := service.MeshService{
Namespace: "default",
Name: "foo",
}
testCases := []struct {
name string
svc service.MeshService
sameNamespace bool
expectedName string
}{
{
name: "same namespace",
... | explode_data.jsonl/69771 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 337
} | [
2830,
3393,
11066,
13825,
675,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
259,
2207,
7121,
1155,
692,
1903,
7362,
1669,
2473,
50155,
1860,
515,
197,
90823,
25,
330,
2258,
756,
197,
21297,
25,
414,
330,
7975,
756,
197,
630,
18185,
37302... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestManifestGenerateComponentHubTag(t *testing.T) {
g := NewGomegaWithT(t)
objs, err := runManifestCommands("component_hub_tag", "", liveCharts)
if err != nil {
t.Fatal(err)
}
tests := []struct {
deploymentName string
containerName string
want string
}{
{
deploymentName: "prometheus... | explode_data.jsonl/48755 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 545
} | [
2830,
3393,
38495,
31115,
2189,
19316,
5668,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
692,
22671,
82,
11,
1848,
1669,
1598,
38495,
30479,
445,
8571,
93996,
9372,
497,
7342,
3887,
64878,
340,
743,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestGenerateModel_WithAllOfAndDiscriminatorAndArrayOfPolymorphs(t *testing.T) {
specDoc, err := loads.Spec("../fixtures/codegen/todolist.models.yml")
require.NoError(t, err)
definitions := specDoc.Spec().Definitions
schema := definitions["PetWithPets"]
opts := opts()
genModel, err := makeGenDefinition("PetW... | explode_data.jsonl/2534 | {
"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,
31115,
1712,
62,
2354,
2403,
2124,
3036,
23477,
94124,
3036,
62656,
14658,
1600,
16347,
82,
1155,
353,
8840,
836,
8,
341,
98100,
9550,
11,
1848,
1669,
20907,
36473,
17409,
45247,
46928,
4370,
5523,
347,
34675,
8235,
33936,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBot_DeleteWebhook(t *testing.T) {
type fields struct {
apiClient apiClient
}
tests := []struct {
name string
fields fields
wantResult bool
wantErr bool
}{
{
name: "test1",
fields: fields{
apiClient: &mockAPIClient{
method: "deleteWebhook",
interfaceMethod: func(... | explode_data.jsonl/46104 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 437
} | [
2830,
3393,
23502,
57418,
5981,
20873,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
54299,
2959,
6330,
2959,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
55276,
257,
5043,
198,
197,
50780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBestChainStateSerialization(t *testing.T) {
t.Parallel()
workSum := new(big.Int)
tests := []struct {
name string
state bestChainState
serialized []byte
}{
{
name: "genesis",
state: bestChainState{
hash: *newHashFromStr("000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f... | explode_data.jsonl/59833 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 858
} | [
2830,
3393,
14470,
18837,
1397,
35865,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
97038,
9190,
1669,
501,
75616,
7371,
340,
78216,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
24291,
414,
1850,
18837,
1397,
198,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInvokeNoPolicy(t *testing.T) {
t.Run("1.2Capability", func(t *testing.T) {
l, v, cleanup := setupLedgerAndValidatorWithV12Capabilities(t)
defer cleanup()
testInvokeNoPolicy(t, l, v)
})
t.Run("1.3Capability", func(t *testing.T) {
l, v, cleanup := setupLedgerAndValidatorWithV13Capabilities(t)
defe... | explode_data.jsonl/47796 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 154
} | [
2830,
3393,
17604,
2753,
13825,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
16,
13,
17,
63746,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
8810,
11,
348,
11,
21290,
1669,
6505,
60850,
1389,
3036,
14256,
2354,
53,
16,
17,
55315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequirementsMergeFile(t *testing.T) {
// setup the disk
rootTmpDir, err := ioutil.TempDir("", "")
require.NoError(t, err, "could not create temp dir")
fileNames, err := ioutil.ReadDir("test_data")
assert.NoError(t, err)
for _, f := range fileNames {
if f.IsDir() {
name := f.Name()
srcDir := fil... | explode_data.jsonl/22998 | {
"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,
59202,
52096,
1703,
1155,
353,
8840,
836,
8,
341,
197,
322,
6505,
279,
13364,
198,
33698,
35986,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
14676,
17957,
35699,
1155,
11,
1848,
11,
330,
28077,
537,
1855,
2730,
5419,
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... | 4 |
func Test_getRepositoryURL(t *testing.T) {
type remote struct {
name string
url string
}
var tests = []struct {
name string
expectError bool
remotes []remote
expect string
}{
{
name: "single origin",
expectError: false,
remotes: []remote{
{name: "origin", url: "ht... | explode_data.jsonl/28031 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 897
} | [
2830,
3393,
3062,
4624,
3144,
1155,
353,
8840,
836,
8,
1476,
13158,
8699,
2036,
341,
197,
11609,
914,
198,
197,
19320,
220,
914,
198,
197,
532,
2405,
7032,
284,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
24952,
1454,
1807,
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... | 9 |
func TestAdd(t *testing.T) {
for _, spec := range []struct {
tokens [][]string
want utilities.DoubleArray
}{
{
want: utilities.DoubleArray{
Encoding: make(map[string]int),
},
},
{
tokens: [][]string{{"foo"}},
want: utilities.DoubleArray{
Encoding: map[string]int{"foo": 0},
Base: ... | explode_data.jsonl/43871 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1448
} | [
2830,
3393,
2212,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1398,
1669,
2088,
3056,
1235,
341,
197,
3244,
9713,
52931,
917,
198,
197,
50780,
256,
29419,
36113,
1857,
198,
197,
59403,
197,
197,
515,
298,
50780,
25,
29419,
36113,
1857,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckForClientWithLogger(t *testing.T) {
defer func() {
client = nil
logger = nil
}()
logger = logging.NewBasicLogger()
Convey("Given a host", t, func() {
host := "testhost"
Convey("When checkForClient is called with no client", func() {
err := checkForClient(host)
Convey("Then an error shoul... | explode_data.jsonl/9670 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 152
} | [
2830,
3393,
3973,
2461,
2959,
2354,
7395,
1155,
353,
8840,
836,
8,
341,
16867,
2915,
368,
341,
197,
25291,
284,
2092,
198,
197,
17060,
284,
2092,
198,
197,
69826,
17060,
284,
8392,
7121,
15944,
7395,
741,
93070,
5617,
445,
22043,
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 TestValidRequestForProduct(t *testing.T) {
// We setup a fake http server that mocks a registration server.
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
file, err := os.Open("testdata/products-sle12.json")
if err != nil {
fmt.Fprintln(w, "FAIL!")
return
}
... | explode_data.jsonl/43079 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 281
} | [
2830,
3393,
4088,
1900,
2461,
4816,
1155,
353,
8840,
836,
8,
341,
197,
322,
1205,
6505,
264,
12418,
1758,
3538,
429,
68909,
264,
12227,
3538,
624,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
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 TestHasEdge(t *testing.T) {
t.Parallel()
var colOne = Col{Name: "Id", Type: "int", Key: "primary_key", MaxLen: sql.NullInt64{Int64: 0, Valid: false}}
var colTwo = Col{Name: "Name", Type: "string", Key: "", MaxLen: sql.NullInt64{Int64: 45, Valid: true}}
assert.Equal(t, "", colOne.GetMeta(), "should be equal")
... | explode_data.jsonl/71802 | {
"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,
10281,
11656,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2405,
1375,
3966,
284,
4254,
63121,
25,
330,
764,
497,
3990,
25,
330,
396,
497,
5309,
25,
330,
6545,
3097,
497,
7487,
11271,
25,
5704,
23979,
1072,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWeekdayAfterToday(t *testing.T) {
now := time.Now()
// Create new scheduler to have clean test env
s := NewScheduler()
// Schedule job at next week day
var weekJob *Job
switch now.Weekday() {
case time.Monday:
weekJob = s.Every(1).Tuesday()
case time.Tuesday:
weekJob = s.Every(1).Wednesday()
cas... | explode_data.jsonl/63504 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 384
} | [
2830,
3393,
17053,
1292,
6025,
15364,
1155,
353,
8840,
836,
8,
341,
80922,
1669,
882,
13244,
2822,
197,
322,
4230,
501,
28809,
311,
614,
4240,
1273,
6105,
198,
1903,
1669,
1532,
38878,
2822,
197,
322,
23512,
2618,
518,
1790,
2003,
1899,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_compute(t *testing.T) {
value := compute(1, 2, add)
fmt.Printf("add:%v\n", value)
value = compute(8, 9, mul)
fmt.Printf("mul:%v\n", value)
} | explode_data.jsonl/50589 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 74
} | [
2830,
3393,
57028,
1155,
353,
8840,
836,
8,
341,
16309,
1669,
12564,
7,
16,
11,
220,
17,
11,
912,
340,
11009,
19367,
445,
718,
7533,
85,
1699,
497,
897,
340,
16309,
284,
12564,
7,
23,
11,
220,
24,
11,
15602,
340,
11009,
19367,
445... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestDingConfig(t *testing.T) {
var (
err error
config string
)
c.Convey("Define configuration", t, func() {
config = configTpl
c.Convey("Parse configuration", func() {
err = beemod.Register(DefaultBuild).SetCfg([]byte(config), "toml").Run()
c.So(err, c.ShouldBeNil)
})
})
} | explode_data.jsonl/29793 | {
"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,
35,
287,
2648,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
9859,
262,
1465,
198,
197,
25873,
914,
198,
197,
340,
1444,
4801,
5617,
445,
35338,
6546,
497,
259,
11,
2915,
368,
341,
197,
25873,
284,
2193,
87137,
198,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestState_SubscribeRuntimeVersion(t *testing.T) {
if testing.Short() {
t.Skip("skipping end-to-end test in short mode.")
}
api, err := gsrpc.NewSubstrateAPI(config.Default().RPCURL)
assert.NoError(t, err)
sub, err := api.RPC.State.SubscribeRuntimeVersion()
assert.NoError(t, err)
defer sub.Unsubscribe()
... | explode_data.jsonl/52304 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 218
} | [
2830,
3393,
1397,
36359,
6273,
15123,
5637,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
835,
4686,
13068,
1273,
304,
2805,
3856,
13053,
197,
630,
54299,
11,
1848,
1669,
342,
15094,
3992,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.