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 TestRemove(t *testing.T) {
t.Parallel()
hCopy := sample(t)
equals(t, len(hCopy.records[1].Hostnames), 2)
hCopy.Remove("bazbaz")
equals(t, len(hCopy.records[1].Hostnames), 1)
ok := hCopy.records[1].Hostnames["blahbar"]
assert(t, ok, "item \"blahbar\" not found in %v", hCopy.records[1].Hostnames)
hCopy.Remov... | explode_data.jsonl/43701 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 164
} | [
2830,
3393,
13021,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
9598,
12106,
1669,
6077,
1155,
340,
197,
7176,
1155,
11,
2422,
3203,
12106,
64516,
58,
16,
936,
9296,
11400,
701,
220,
17,
340,
9598,
12106,
13270,
445,
42573,
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 TestSend(t *testing.T) {
v := &validator{}
v.queue = "send-validator"
v.start()
b := NewBroker()
b.Start(func(m ezbus.Message) error {
return nil
})
h := make(map[string]string)
h[headers.MessageName] = "validation-message"
m := ezbus.NewMessage(h, []byte("message-body-sent"))
err := b.Send("send-val... | explode_data.jsonl/61032 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 200
} | [
2830,
3393,
11505,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
609,
16112,
16094,
5195,
29598,
284,
330,
6681,
78574,
698,
5195,
4962,
2822,
2233,
1669,
1532,
65545,
741,
2233,
12101,
18552,
1255,
43320,
10338,
8472,
8,
1465,
341,
197,
85... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPageTokenDecode(t *testing.T) {
tests := []struct {
input string
expect *PageToken
pass bool
}{
{"_wMAAA==", &PageToken{Limit: 1023}, true},
{"LQAJAA==", &PageToken{Limit: 45, Page: 9}, true},
// incorrectly base64-encoded data
{"basdfasdf", nil, false},
// empty string is valid base64, ... | explode_data.jsonl/14974 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 289
} | [
2830,
3393,
2665,
3323,
32564,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
22427,
220,
914,
198,
197,
24952,
353,
2665,
3323,
198,
197,
41431,
256,
1807,
198,
197,
59403,
197,
197,
4913,
62,
86,
4835,
6029,
418,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_almaOSAnalyzer_Analyze(t *testing.T) {
tests := []struct {
name string
inputFile string
want *analyzer.AnalysisResult
wantErr string
}{
{
name: "happy path",
inputFile: "testdata/alma/almalinux-release",
want: &analyzer.AnalysisResult{
OS: &types.OS{Family: "alma", Na... | explode_data.jsonl/57170 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 450
} | [
2830,
3393,
8418,
1728,
3126,
54911,
32699,
55856,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
22427,
1703,
914,
198,
197,
50780,
414,
353,
276,
27165,
8624,
9092,
2077,
198,
197,
50780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestReconcileWithTaskResultsInFinalTasks(t *testing.T) {
names.TestingSeed()
ps := []*v1beta1.Pipeline{parse.MustParsePipeline(t, `
metadata:
name: test-pipeline
namespace: foo
spec:
finally:
- name: final-task-1
params:
- name: finalParam
value: $(tasks.dag-task-1.results.aResult)
tas... | explode_data.jsonl/27330 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2094
} | [
2830,
3393,
693,
40446,
457,
2354,
6262,
9801,
641,
19357,
25449,
1155,
353,
8840,
836,
8,
341,
93940,
8787,
287,
41471,
2822,
35009,
1669,
29838,
85,
16,
19127,
16,
1069,
8790,
90,
6400,
50463,
14463,
34656,
1155,
11,
22074,
17637,
510... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDomainRecord_String(t *testing.T) {
record := &DomainRecord{
ID: 1,
Type: "CNAME",
Name: "example",
Data: "@",
Priority: 10,
Port: 10,
TTL: 1800,
Weight: 10,
Flags: 1,
Tag: "test",
}
stringified := record.String()
expected := `godo.DomainRecord{ID:1... | explode_data.jsonl/22680 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 240
} | [
2830,
3393,
13636,
6471,
31777,
1155,
353,
8840,
836,
8,
341,
71952,
1669,
609,
13636,
6471,
515,
197,
29580,
25,
981,
220,
16,
345,
197,
27725,
25,
257,
330,
34,
7535,
756,
197,
21297,
25,
257,
330,
8687,
756,
197,
40927,
25,
257,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPut(t *testing.T) {
srv := httptest.NewServer(http.HandlerFunc(HandlePut))
defer srv.Close()
url := "http://" + srv.Listener.Addr().String()
res := structType{}
resp, err := Put(url, &fooStruct, &res, nil)
if err != nil {
t.Error(err)
}
assert.Equal(t, resp.Status(), 200)
// Server should return NO ... | explode_data.jsonl/14815 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 147
} | [
2830,
3393,
19103,
1155,
353,
8840,
836,
8,
341,
1903,
10553,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
90832,
19103,
1171,
16867,
43578,
10421,
741,
19320,
1669,
330,
1254,
52136,
488,
43578,
64091,
93626,
1005,
703,
741,
10202,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDependencies(t *testing.T) {
tests := []struct {
description string
manifests []string
expected []string
}{
{
description: "no manifest",
manifests: []string(nil),
expected: []string(nil),
},
{
description: "missing manifest file",
manifests: []string{"missing.yaml"},
... | explode_data.jsonl/52880 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 751
} | [
2830,
3393,
48303,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
42407,
914,
198,
197,
197,
42315,
82,
256,
3056,
917,
198,
197,
42400,
262,
3056,
917,
198,
197,
59403,
197,
197,
515,
298,
42407,
25,
330,
2152,
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 TestDomainUsers(t *testing.T) {
var users []DomainUser
db, err := InitializeDb()
assert.Nil(t, err)
if err != nil {
log.Fatal(err)
}
sqlCommand := "SELECT id FROM users"
rows, err := db.Query(sqlCommand)
if err != nil {
fmt.Println("ERROR: ", err)
}
assert.Nil(t, err)
defer rows.Close()
for rows.Ne... | explode_data.jsonl/74890 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 206
} | [
2830,
3393,
13636,
7137,
1155,
353,
8840,
836,
8,
341,
2405,
3847,
3056,
13636,
1474,
198,
20939,
11,
1848,
1669,
9008,
7994,
741,
6948,
59678,
1155,
11,
1848,
340,
743,
1848,
961,
2092,
341,
197,
6725,
26133,
3964,
340,
197,
532,
306... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServiceDefaultsToNoSessionPersistence(t *testing.T) {
az := getTestCloud()
svc := getTestService("service-sa-omitted", v1.ProtocolTCP, 7170)
clusterResources := getClusterResources(az, 1, 1)
lb, err := az.reconcileLoadBalancer(testClusterName, &svc, clusterResources.nodes, true /* wantLb */)
if err != ni... | explode_data.jsonl/50396 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
1860,
16273,
1249,
2753,
5283,
71562,
1155,
353,
8840,
836,
8,
341,
197,
1370,
1669,
633,
2271,
16055,
741,
1903,
7362,
1669,
633,
2271,
1860,
445,
7936,
1331,
64,
12,
316,
3762,
497,
348,
16,
54096,
49896,
11,
220,
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... | 4 |
func TestAuthorization_TCP(t *testing.T) {
framework.NewTest(t).
Run(func(ctx framework.TestContext) {
ns := namespace.NewOrFail(t, ctx, namespace.Config{
Prefix: "v1beta1-tcp-1",
Inject: true,
})
ns2 := namespace.NewOrFail(t, ctx, namespace.Config{
Prefix: "v1beta1-tcp-2",
Inject: true,
... | explode_data.jsonl/41498 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2050
} | [
2830,
3393,
18124,
50614,
1155,
353,
8840,
836,
8,
341,
1166,
5794,
7121,
2271,
1155,
4292,
197,
85952,
18552,
7502,
12626,
8787,
1972,
8,
341,
298,
84041,
1669,
4473,
7121,
46059,
1155,
11,
5635,
11,
4473,
10753,
515,
571,
10025,
5060,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInitCARESTfulVerbs(t *testing.T) {
ts := httptest.NewServer(NewHandler())
data := csrData(t)
// POST should work.
req, _ := http.NewRequest("POST", ts.URL, data)
resp, _ := http.DefaultClient.Do(req)
if resp.StatusCode != http.StatusOK {
t.Fatal(resp.Status)
}
// Test GET, PUT, DELETE and whatever, ... | explode_data.jsonl/4728 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 394
} | [
2830,
3393,
3803,
34,
74335,
1262,
10141,
1279,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
5475,
35063,
3050,
2398,
8924,
1669,
68932,
1043,
1155,
340,
197,
322,
12869,
1265,
975,
624,
24395,
11,
716,
1669,
1758,
752... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateMissingReferencesConfig(t *testing.T) {
config := clientcmdapi.NewConfig()
config.CurrentContext = "anything"
config.Contexts["anything"] = &clientcmdapi.Context{Cluster: "missing", AuthInfo: "missing"}
test := configValidationTest{
config: config,
expectedErrorSubstring: []stri... | explode_data.jsonl/13488 | {
"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,
17926,
25080,
31712,
2648,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
2943,
8710,
2068,
7121,
2648,
741,
25873,
11517,
1972,
284,
330,
72154,
698,
25873,
9328,
82,
1183,
72154,
1341,
284,
609,
2972,
8710,
2068,
9328,
90,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTeam_String(t *testing.T) {
v := Team{
ID: Int64(0),
NodeID: String(""),
Name: String(""),
Description: String(""),
URL: String(""),
Slug: String(""),
Permission: String(""),
Privacy: String(""),
MembersCount: Int(0)... | explode_data.jsonl/33291 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 386
} | [
2830,
3393,
14597,
31777,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
7909,
515,
197,
29580,
25,
1060,
1333,
21,
19,
7,
15,
1326,
197,
30217,
915,
25,
688,
923,
445,
4461,
197,
21297,
25,
310,
923,
445,
4461,
197,
47414,
25,
257,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadUnmodifiedEmptyFileSucceeds(t *testing.T) {
for _, alg := range hashAlgs {
vfsObj, root, ctx, err := newVerityRoot(t, alg)
if err != nil {
t.Fatalf("newVerityRoot: %v", err)
}
filename := "verity-test-empty-file"
fd, err := newEmptyFileFD(ctx, t, vfsObj, root, filename, 0644)
if err != nil... | explode_data.jsonl/56758 | {
"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,
4418,
1806,
27162,
3522,
1703,
50,
29264,
82,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17345,
1669,
2088,
5175,
2101,
5857,
341,
197,
5195,
3848,
5261,
11,
3704,
11,
5635,
11,
1848,
1669,
501,
10141,
487,
8439,
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... | 7 |
func TestSpanFinishWithOptionsLogs(t *testing.T) {
tracer, apmtracer, recorder := newTestTracer()
defer apmtracer.Close()
err0Time := time.Unix(42, 0).UTC()
spanStart := time.Unix(60, 0).UTC()
spanFinish := time.Unix(66, 0).UTC()
span := tracer.StartSpan("span", opentracing.StartTime(spanStart))
span.FinishWit... | explode_data.jsonl/28600 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 490
} | [
2830,
3393,
12485,
25664,
74238,
51053,
1155,
353,
8840,
836,
8,
341,
25583,
9584,
11,
1443,
76,
94941,
11,
48835,
1669,
501,
2271,
1282,
9584,
741,
16867,
1443,
76,
94941,
10421,
2822,
9859,
15,
1462,
1669,
882,
10616,
941,
7,
19,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRecordSetsListAllIntegrationFilterForNonexistentName(t *testing.T) {
c := client()
zs, err := c.ZonesListAll(ListFilter{})
if err != nil {
t.Error(err)
}
records, err := c.RecordSetsListAll(zs[0].ID, ListFilter{
NameFilter: "thisdoesnotexist",
})
if err != nil {
t.Error(err)
}
if len(records) ... | explode_data.jsonl/12125 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 169
} | [
2830,
3393,
6471,
30175,
852,
2403,
52464,
5632,
2461,
8121,
64085,
675,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2943,
741,
20832,
82,
11,
1848,
1669,
272,
13476,
3154,
852,
2403,
10278,
5632,
37790,
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 TestValidateRefs(t *testing.T) {
cases := []struct {
name string
extraRefs []prowapi.Refs
expected error
}{
{
name: "validation error for extra ref specifying the same repo for which the job is configured",
extraRefs: []prowapi.Refs{
{
Org: "org",
Repo: "repo",
},
},
... | explode_data.jsonl/8077 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 674
} | [
2830,
3393,
17926,
82807,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
8122,
2172,
82807,
3056,
79,
651,
2068,
2817,
3848,
198,
197,
42400,
220,
1465,
198,
197,
59403,
197,
197,
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 TestIndexNames(t *testing.T) {
client := setupTestClientAndCreateIndex(t)
names, err := client.IndexNames()
if err != nil {
t.Fatal(err)
}
if len(names) == 0 {
t.Fatalf("expected some index names, got: %d", len(names))
}
var found bool
for _, name := range names {
if name == testIndexName {
found ... | explode_data.jsonl/38016 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 172
} | [
2830,
3393,
1552,
7980,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
6505,
2271,
2959,
3036,
4021,
1552,
1155,
340,
93940,
11,
1848,
1669,
2943,
18338,
7980,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
743,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandler_getRepo(t *testing.T) {
loggerWriter := logrus.StandardLogger().Out
logrus.SetOutput(ioutil.Discard)
defer logrus.SetOutput(loggerWriter)
tcs := []struct {
svc *fakeService
repoName string
expectedStatus int
expectedRepo *model.RepositoryInfo
expectedErrCode sgerrors.ErrorCode
... | explode_data.jsonl/12098 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 869
} | [
2830,
3393,
3050,
3062,
25243,
1155,
353,
8840,
836,
8,
341,
17060,
6492,
1669,
1487,
20341,
53615,
7395,
1005,
2662,
198,
90822,
4202,
5097,
1956,
30158,
909,
47560,
340,
16867,
1487,
20341,
4202,
5097,
37833,
6492,
692,
3244,
4837,
1669... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestTooManySubs(t *testing.T) {
sOpts := GetDefaultOptions()
sOpts.ID = clusterName
sOpts.MaxSubscriptions = 1
s := runServerWithOpts(t, sOpts, nil)
defer s.Shutdown()
sc := NewDefaultConnection(t)
defer sc.Close()
// This should be ok
if _, err := sc.Subscribe("foo", func(_ *stan.Msg) {}); err != nil {... | explode_data.jsonl/23091 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 579
} | [
2830,
3393,
31246,
8441,
3136,
82,
1155,
353,
8840,
836,
8,
341,
1903,
43451,
1669,
2126,
3675,
3798,
741,
1903,
43451,
9910,
284,
10652,
675,
198,
1903,
43451,
14535,
3136,
29966,
284,
220,
16,
198,
1903,
1669,
1598,
5475,
2354,
43451,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntegrations(t *testing.T) {
suite := newSuite(t)
t.Run("AuditOff", suite.bind(testAuditOff))
t.Run("AuditOn", suite.bind(testAuditOn))
t.Run("BPFExec", suite.bind(testBPFExec))
t.Run("BPFInteractive", suite.bind(testBPFInteractive))
t.Run("BPFSessionDifferentiation", suite.bind(testBPFSessionDifferenti... | explode_data.jsonl/71196 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1026
} | [
2830,
3393,
1072,
14412,
804,
1155,
353,
8840,
836,
8,
341,
96572,
1669,
501,
28000,
1155,
692,
3244,
16708,
445,
74516,
4596,
497,
16182,
6090,
8623,
74516,
4596,
1171,
3244,
16708,
445,
74516,
1925,
497,
16182,
6090,
8623,
74516,
1925,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStripURLParts(t *testing.T) {
//Test cases
cases := map[string]string{
"http://google.com": "google.com",
"http://google.com/ding?true": "google.com",
"google.com/?ding=false": "google.com",
"google.com?ding=false": "google.com",
"nonexist.***": ... | explode_data.jsonl/30834 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 669
} | [
2830,
3393,
5901,
3144,
28921,
1155,
353,
8840,
836,
8,
341,
197,
322,
2271,
5048,
198,
1444,
2264,
1669,
2415,
14032,
30953,
515,
197,
197,
76932,
1110,
17485,
905,
788,
2290,
330,
17485,
905,
756,
197,
197,
76932,
1110,
17485,
905,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplicationEventGetApplicationID(t *testing.T) {
tests := []struct {
name string
appID, msg string
event events.ApplicationEventType
wantID string
}{
{TestAppIDName, "testAppId001", "testTask001", events.SubmitApplication, "testAppId001"},
}
for _, tt := range tests {
instance :... | explode_data.jsonl/9776 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 221
} | [
2830,
3393,
4988,
1556,
1949,
4988,
915,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
28236,
915,
11,
3750,
914,
198,
197,
28302,
414,
4357,
17521,
47906,
198,
197,
50780,
915,
257,
914,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestBlockReject_InnerBlockIsNotRejected(t *testing.T) {
// setup
coreVM, _, _, _, proVM, coreGenBlk, _ := initTestProposerVM(t, time.Time{}, 0)
proVM.Set(coreGenBlk.Timestamp())
// create post fork oracle block ...
oracleCoreBlk := &TestOptionsBlock{
TestBlock: snowman.TestBlock{
TestDecidable: choices.... | explode_data.jsonl/19404 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1327
} | [
2830,
3393,
4713,
78413,
25972,
1194,
4713,
3872,
2623,
77693,
1155,
353,
8840,
836,
8,
341,
197,
322,
6505,
198,
71882,
11187,
11,
8358,
8358,
8358,
462,
11187,
11,
6200,
9967,
4923,
74,
11,
716,
1669,
2930,
2271,
2008,
23438,
11187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetSpecificTicker(t *testing.T) {
e := CreateTestBot(t)
p, err := currency.NewPairFromStrings("BTC", "USD")
if err != nil {
t.Fatal(err)
}
err = ticker.ProcessTicker(&ticker.Price{
Pair: p,
Last: 1000,
AssetType: asset.Spot,
ExchangeName: testExchange})
if err != nil {
t.F... | explode_data.jsonl/59236 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 353
} | [
2830,
3393,
1949,
47514,
87278,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
4230,
2271,
23502,
1155,
340,
3223,
11,
1848,
1669,
11413,
7121,
12443,
3830,
20859,
445,
59118,
497,
330,
26749,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
2613... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewSyncerMap(t *testing.T) {
syncConfig := config.Adapter{
UserSyncURL: "some-sync-url",
}
cfg := &config.Configuration{
Adapters: map[string]config.Adapter{
string(openrtb_ext.Bidder33Across): syncConfig,
string(openrtb_ext.BidderAcuityAds): syncConfig,
string(openrtb_ext.Bidder... | explode_data.jsonl/63832 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3407
} | [
2830,
3393,
3564,
12154,
261,
2227,
1155,
353,
8840,
836,
8,
341,
1903,
1721,
2648,
1669,
2193,
34190,
515,
197,
31672,
12154,
3144,
25,
330,
14689,
65034,
25443,
756,
197,
532,
50286,
1669,
609,
1676,
17334,
515,
197,
197,
2589,
17425,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsReady(t *testing.T) {
cases := []struct {
name string
status PodAutoscalerStatus
isReady bool
}{{
name: "empty status should not be ready",
status: PodAutoscalerStatus{},
isReady: false,
}, {
name: "Different condition type should not be ready",
status: PodAutoscalerStatus{
Cond... | explode_data.jsonl/32166 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 886
} | [
2830,
3393,
3872,
19202,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
23847,
220,
16821,
19602,
436,
63084,
2522,
198,
197,
19907,
19202,
1807,
198,
197,
15170,
515,
197,
11609,
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 TestPriorityQueue_Pop(t *testing.T) {
objs := []runtime.Object{medPriorityPodInfo.Pod}
q := NewTestQueueWithObjects(context.Background(), newDefaultQueueSort(), objs)
wg := sync.WaitGroup{}
wg.Add(1)
go func() {
defer wg.Done()
if p, err := q.Pop(); err != nil || p.Pod != medPriorityPodInfo.Pod {
t.Err... | explode_data.jsonl/68186 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 274
} | [
2830,
3393,
20555,
7554,
1088,
453,
1155,
353,
8840,
836,
8,
341,
22671,
82,
1669,
3056,
22255,
8348,
90,
2061,
20555,
23527,
1731,
88823,
532,
18534,
1669,
1532,
2271,
7554,
2354,
11543,
5378,
19047,
1507,
501,
3675,
7554,
10231,
1507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestInit(t *testing.T) {
type args struct {
db *SourceMap
}
tests := []struct {
name string
args args
wantErr bool
}{
//{
// name: "test1",
// args: args{
// &SourceMap{
// Db: []string{
// "test",
// },
// Driver: "Mysql",
// Host: "localhost",
// Password... | explode_data.jsonl/74249 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 340
} | [
2830,
3393,
3803,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
20939,
353,
3608,
2227,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
198,
197,
50780,
7747,
1807,
198,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestAssociateSpaceDeveloperByUsername(t *testing.T) {
Convey("Associate developer by username", t, func() {
setup(MockRoute{"PUT", "/v2/spaces/bc7b4caf-f4b8-4d85-b126-0729b9351e56/developers", associateSpaceUserPayload, "", 201, "", nil}, t)
defer teardown()
c := &Config{
ApiAddress: server.URL,
Token... | explode_data.jsonl/59990 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 308
} | [
2830,
3393,
95540,
9914,
44911,
91519,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
95540,
15754,
553,
5934,
497,
259,
11,
2915,
368,
341,
197,
84571,
66436,
4899,
4913,
6221,
497,
3521,
85,
17,
26734,
2434,
3470,
66,
22,
65,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIn(t *testing.T) {
for i, this := range []struct {
v1 interface{}
v2 interface{}
expect bool
}{
{[]string{"a", "b", "c"}, "b", true},
{[]interface{}{"a", "b", "c"}, "b", true},
{[]interface{}{"a", "b", "c"}, "d", false},
{[]string{"a", "b", "c"}, "d", false},
{[]string{"a", "12", "c"}... | explode_data.jsonl/9218 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 406
} | [
2830,
3393,
641,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
419,
1669,
2088,
3056,
1235,
341,
197,
5195,
16,
257,
3749,
16094,
197,
5195,
17,
257,
3749,
16094,
197,
24952,
1807,
198,
197,
59403,
197,
197,
90,
1294,
917,
4913,
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... | 3 |
func TestLogicRunner_OnPulse(t *testing.T) {
table := []struct {
name string
mocks func(ctx context.Context, t minimock.Tester) *LogicRunner
}{
{
name: "broker that stays and sends messages",
mocks: func(ctx context.Context, mc minimock.Tester) *LogicRunner {
lr, err := NewLogicRunner(&configuration.... | explode_data.jsonl/67709 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 965
} | [
2830,
3393,
26751,
19486,
35482,
47,
17217,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
2109,
25183,
2915,
7502,
2266,
9328,
11,
259,
21187,
1176,
836,
5191,
8,
353,
26751,
19486,
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... | 1 |
func TestExpandResourceServiceAccountExternalPermission(t *testing.T) {
_default := kops.ServiceAccountExternalPermission{}
type args struct {
in map[string]interface{}
}
tests := []struct {
name string
args args
want kops.ServiceAccountExternalPermission
}{
{
name: "default",
args: args{
in: m... | explode_data.jsonl/22380 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 311
} | [
2830,
3393,
38946,
4783,
1860,
7365,
25913,
14966,
1155,
353,
8840,
836,
8,
341,
197,
9993,
1669,
595,
3721,
13860,
7365,
25913,
14966,
16094,
13158,
2827,
2036,
341,
197,
17430,
2415,
14032,
31344,
16094,
197,
532,
78216,
1669,
3056,
123... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHttpParser_splitResponse_midBody(t *testing.T) {
data1 := "HTTP/1.1 200 OK\r\n" +
"Date: Tue, 14 Aug 2012 22:31:45 GMT\r\n" +
"Expires: -1\r\n" +
"Cache-Control: private, max-age=0\r\n" +
"Content-Type: text/html; charset=UTF-8\r\n" +
"Content-Encoding: gzip\r\n" +
"Server: gws\r\n" +
"Content-L... | explode_data.jsonl/16499 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 409
} | [
2830,
3393,
2905,
6570,
17052,
2582,
43733,
5444,
1155,
353,
8840,
836,
8,
341,
8924,
16,
1669,
330,
9230,
14,
16,
13,
16,
220,
17,
15,
15,
10402,
12016,
1699,
1,
3610,
197,
197,
1,
1916,
25,
39167,
11,
220,
16,
19,
4928,
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... | 1 |
func TestArrayLookup(t *testing.T) {
testStr := `<?
echo $arr['one'][$two];
$var->arr[] = 2;
echo $arr[2 + 1];`
p := NewParser()
p.disableScoping = true
p.Debug = true
p.MaxErrors = 0
a, _ := p.Parse("test.php", testStr)
if len(a.Nodes) == 0 {
t.Fatalf("Array lookup did not correctly parse")
}
tree := ... | explode_data.jsonl/28446 | {
"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,
1857,
34247,
1155,
353,
8840,
836,
8,
341,
18185,
2580,
1669,
1565,
53075,
220,
1687,
400,
1118,
677,
603,
18159,
19789,
935,
220,
400,
947,
405,
1118,
1294,
284,
220,
17,
280,
220,
1687,
400,
1118,
58,
17,
488,
220,
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... | 4 |
func TestClientInterface(t *testing.T) {
t.Run("Transport", func(t *testing.T) {
c, err := NewClient(Config{Transport: &mockTransp{}})
if err != nil {
t.Fatalf("Unexpected error: %s", err)
}
if called != false { // megacheck ignore
t.Errorf("Unexpected call to transport by client")
}
c.Perform(&ht... | explode_data.jsonl/24030 | {
"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,
2959,
5051,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
27560,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
1444,
11,
1848,
1669,
1532,
2959,
33687,
90,
27560,
25,
609,
16712,
3167,
79,
90,
3417,
692,
197,
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... | 4 |
func TestNew(t *testing.T) {
c := Config{
APIKey: "apikey",
}
a, err := New(c)
assert.Implements(t, (*Apixu)(nil), a)
assert.NoError(t, err)
} | explode_data.jsonl/14936 | {
"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,
3564,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
5532,
515,
197,
197,
7082,
1592,
25,
330,
72174,
756,
197,
532,
11323,
11,
1848,
1669,
1532,
1337,
692,
6948,
26914,
4674,
1155,
11,
4609,
10611,
941,
84,
2376,
8385,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccComputeRouterInterface_basic(t *testing.T) {
t.Parallel()
testId := acctest.RandString(10)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckComputeRouterInterfaceDestroy,
Steps: []resource.TestStep{
{
... | explode_data.jsonl/73836 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 324
} | [
2830,
3393,
14603,
46254,
9523,
5051,
34729,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
18185,
764,
1669,
1613,
67880,
2013,
437,
703,
7,
16,
15,
340,
50346,
8787,
1155,
11,
5101,
31363,
515,
197,
197,
4703,
3973,
25,
257,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_convertCustomAppsToForecastleApps(t *testing.T) {
type args struct {
customApps []config.CustomApp
}
tests := []struct {
name string
args args
wantApps []forecastle.App
}{
{
name: "TestConvertCustomAppsToForecastleAppsWithNoApps",
args: args{
customApps: []config.CustomApp{},
... | explode_data.jsonl/72060 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 553
} | [
2830,
3393,
34910,
10268,
53602,
1249,
11092,
35108,
53602,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1444,
1450,
53602,
3056,
1676,
27649,
2164,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMarshalCustomTag(t *testing.T) {
c := core.NewDefault()
assert.NoError(t, c.RegisterModels(&CustomTagModel{}))
hidden := &CustomTagModel{ID: 1, VisibleCustomName: "found", HiddenField: true, OmitEmptyField: "found", CustomOmitEmpty: "found"}
modelStruct := c.MustModelStruct(hidden)
attributes := modelS... | explode_data.jsonl/47148 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 423
} | [
2830,
3393,
55438,
10268,
5668,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
6200,
7121,
3675,
741,
6948,
35699,
1155,
11,
272,
19983,
16969,
2099,
10268,
5668,
1712,
6257,
4390,
197,
6263,
1669,
609,
10268,
5668,
1712,
90,
915,
25,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestEndExecutionSpanWithNoError(t *testing.T) {
defer os.Unsetenv(functionNameEnvVar)
defer os.Unsetenv("DD_CAPTURE_LAMBDA_PAYLOAD")
os.Setenv(functionNameEnvVar, "TestFunction")
os.Setenv("DD_CAPTURE_LAMBDA_PAYLOAD", "true")
defer reset()
testString := `a5a{"resource":"/users/create","path":"/users/create",... | explode_data.jsonl/2348 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 623
} | [
2830,
3393,
3727,
20294,
12485,
2354,
2753,
1454,
1155,
353,
8840,
836,
8,
341,
16867,
2643,
10616,
746,
3160,
2920,
675,
14359,
3962,
340,
16867,
2643,
10616,
746,
3160,
445,
4103,
61801,
2351,
69200,
6352,
79493,
1138,
25078,
4202,
3160... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConnectCluster(t *testing.T) {
nodeList := createMockNodes(allocatableMap, schedulableNodeMap)
ms := &MockClusterScrapper{
mockGetAllNodes: func() ([]*v1.Node, error) {
return nodeList, nil
},
mockGetKubernetesServiceID: func() (svcID string, err error) {
return testClusterName, nil
},
}
ns ... | explode_data.jsonl/62017 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 289
} | [
2830,
3393,
14611,
28678,
1155,
353,
8840,
836,
8,
341,
20831,
852,
1669,
1855,
11571,
12288,
7,
4742,
15086,
2227,
11,
5575,
360,
480,
1955,
2227,
340,
47691,
1669,
609,
11571,
28678,
3326,
5518,
515,
197,
77333,
1949,
2403,
12288,
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 TestNoTTLStrategyFailedButTTLSecondsAfterFinished(t *testing.T) {
var err error
var un *unstructured.Unstructured
var ten int32 = 10
controller := newTTLController()
// Veirfy we do not enqueue if not completed
wf := test.LoadWorkflowFromBytes([]byte(failedWf))
wf.Spec.TTLSecondsAfterFinished = &ten
wf.S... | explode_data.jsonl/48745 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 372
} | [
2830,
3393,
2753,
51,
13470,
19816,
9408,
3983,
51,
13470,
15343,
6025,
24890,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
2405,
650,
353,
359,
51143,
10616,
51143,
198,
2405,
5779,
526,
18,
17,
284,
220,
16,
15,
271,
61615,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequestURIMapping(t *testing.T) {
t.Parallel()
r, err := buildRelabeling(config.RelabelConfig{
Split: 2,
Matches: []config.RelabelValueMatch{
{RegexpString: "^/users/[0-9]+", Replacement: "/users/:id"},
},
})
if err != nil {
t.Error(err)
}
assertMapping(t, r, "GET /users/12345 HTTP/1.1", "/u... | explode_data.jsonl/49265 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 206
} | [
2830,
3393,
1900,
1511,
1791,
3629,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
7000,
11,
1848,
1669,
1936,
6740,
780,
287,
8754,
38939,
780,
2648,
515,
197,
7568,
2292,
25,
220,
17,
345,
197,
197,
42470,
25,
3056,
1676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPassthroughDuringDrain(t *testing.T) {
flag.Set("enable_buffer", "true")
flag.Set("buffer_keyspace_shards", topoproto.KeyspaceShardString(keyspace, shard))
defer resetFlagsForTesting()
b := New()
// Buffer one request.
markRetryDone := make(chan struct{})
stopped := issueRequestAndBlockRetry(context.Ba... | explode_data.jsonl/55858 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 611
} | [
2830,
3393,
70911,
86901,
16014,
8847,
466,
1155,
353,
8840,
836,
8,
341,
30589,
4202,
445,
12552,
7776,
497,
330,
1866,
1138,
30589,
4202,
445,
7573,
3097,
8746,
3712,
2347,
497,
1909,
45926,
983,
37863,
1306,
2016,
567,
703,
4857,
874... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLimitRestore(t *testing.T) {
testCases := []NodeRestoreTestCase{
{"limit 10", "LIMIT 10"},
{"limit 10,20", "LIMIT 10,20"},
{"limit 20 offset 10", "LIMIT 10,20"},
}
extractNodeFunc := func(node Node) Node {
return node.(*SelectStmt).Limit
}
runNodeRestoreTest(t, testCases, "SELECT 1 %s", extractNod... | explode_data.jsonl/27568 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 133
} | [
2830,
3393,
16527,
56284,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1955,
56284,
16458,
515,
197,
197,
4913,
9506,
220,
16,
15,
497,
330,
57100,
220,
16,
15,
7115,
197,
197,
4913,
9506,
220,
16,
15,
11,
17,
15,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMempoolCloseWAL(t *testing.T) {
// 1. Create the temporary directory for mempool and WAL testing.
rootDir, err := ioutil.TempDir("", "mempool-test")
require.Nil(t, err, "expecting successful tmpdir creation")
// 2. Ensure that it doesn't contain any elements -- Sanity check
m1, err := filepath.Glob(filep... | explode_data.jsonl/14614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 684
} | [
2830,
3393,
44,
3262,
1749,
7925,
54,
969,
1155,
353,
8840,
836,
8,
341,
197,
322,
220,
16,
13,
4230,
279,
13340,
6220,
369,
1833,
10285,
323,
73792,
7497,
624,
33698,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
76,
3262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseIncompleteSecurityRequirement(t *testing.T) {
swagger := openapi_options.Swagger{
Security: []*openapi_options.SecurityRequirement{
{
SecurityRequirement: map[string]*openapi_options.SecurityRequirement_SecurityRequirementValue{
"key": nil,
},
},
},
}
file := descriptor.File{
F... | explode_data.jsonl/32809 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 460
} | [
2830,
3393,
14463,
96698,
15352,
75802,
1155,
353,
8840,
836,
8,
341,
77295,
10114,
1669,
1787,
2068,
8743,
808,
86,
10114,
515,
197,
7568,
18429,
25,
29838,
2508,
2068,
8743,
21567,
75802,
515,
298,
197,
515,
571,
7568,
18429,
75802,
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... | 3 |
func TestImportFromDiskWrongJson(t *testing.T) {
RegisterTestingT(t)
unit := NewHoverflyWithConfiguration(&Configuration{})
err := unit.ImportFromDisk("examples/exports/README.md")
Expect(err).ToNot(BeNil())
} | explode_data.jsonl/75448 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 76
} | [
2830,
3393,
11511,
3830,
47583,
29185,
5014,
1155,
353,
8840,
836,
8,
341,
79096,
16451,
51,
1155,
692,
81189,
1669,
1532,
34379,
21642,
2354,
7688,
2099,
7688,
6257,
692,
9859,
1669,
4982,
67275,
3830,
47583,
445,
51668,
14,
4986,
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 |
func TestPublishFlags(t *testing.T) {
assert := assert.New(t)
var f PublishFlags
assert.False(f.Dup())
assert.Equal(QoS0, f.QoS())
assert.False(f.Retain())
f.SetDup(true)
f.SetQoS(QoS1)
f.SetRetain(true)
assert.True(f.Dup())
assert.Equal(QoS1, f.QoS())
assert.True(f.Retain())
f.SetDup(false)
f.SetQoS(Q... | explode_data.jsonl/59725 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 210
} | [
2830,
3393,
50145,
9195,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
2405,
282,
23499,
9195,
271,
6948,
50757,
955,
909,
454,
2398,
6948,
12808,
6253,
72743,
15,
11,
282,
10003,
72743,
2398,
6948,
50757,
955,
52846,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidate_NoCircularFragmentSpreads_NoSpreadingItselfDirectlyWithinInlineFragment(t *testing.T) {
testutil.ExpectFailsRule(t, graphql.NoFragmentCyclesRule, `
fragment fragA on Pet {
... on Dog {
...fragA
}
}
`, []gqlerrors.FormattedError{
testutil.RuleError(`Cannot s... | explode_data.jsonl/30371 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 159
} | [
2830,
3393,
17926,
36989,
82440,
9488,
6406,
30358,
36989,
6406,
6154,
2132,
721,
16027,
398,
41961,
25324,
9488,
1155,
353,
8840,
836,
8,
341,
18185,
1314,
81893,
37,
6209,
11337,
1155,
11,
48865,
16766,
9488,
34,
15805,
11337,
11,
22074... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMatches_Total(t *testing.T) {
type fields struct {
hits map[string]int
}
tests := []struct {
name string
fields fields
want int
}{
{
"no results",
fields{hits: map[string]int{}},
0,
},
{
"some results",
fields{hits: map[string]int{
"one": 1,
"two times": 2,
... | explode_data.jsonl/22246 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 403
} | [
2830,
3393,
42470,
85933,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
9598,
1199,
2415,
14032,
63025,
198,
197,
630,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
55276,
5043,
198,
197,
50780,
256,
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 TestServer_CtlSvc_StoragePrepare(t *testing.T) {
for name, tc := range map[string]struct {
bmbc *bdev.MockBackendConfig
smbc *scm.MockBackendConfig
req StoragePrepareReq
expResp *StoragePrepareResp
}{
"success": {
smbc: &scm.MockBackendConfig{
DiscoverRes: storage.ScmModules{storage.Mo... | explode_data.jsonl/64627 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1644
} | [
2830,
3393,
5475,
920,
11544,
92766,
62,
5793,
50590,
1155,
353,
8840,
836,
8,
341,
2023,
829,
11,
17130,
1669,
2088,
2415,
14032,
60,
1235,
341,
197,
2233,
3096,
66,
262,
353,
65,
3583,
24664,
29699,
2648,
198,
197,
1903,
3096,
66,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetHelmCharts(t *testing.T) {
service := newService("../..")
res, err := service.GetHelmCharts(context.Background(), &apiclient.HelmChartsRequest{Repo: &argoappv1.Repository{}})
assert.NoError(t, err)
assert.Len(t, res.Items, 1)
item := res.Items[0]
assert.Equal(t, "my-chart", item.Name)
assert.EqualVa... | explode_data.jsonl/5692 | {
"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,
1949,
39,
23162,
64878,
1155,
353,
8840,
836,
8,
341,
52934,
1669,
501,
1860,
17409,
496,
1138,
10202,
11,
1848,
1669,
2473,
2234,
39,
23162,
64878,
5378,
19047,
1507,
609,
391,
292,
1451,
3839,
23162,
64878,
1900,
90,
25243... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddNotificationToMongo(t *testing.T) {
notificationAddResultErr := AddNotificationToMongo(mongoTestsHostURL, "", "", mongoCollectionForTests, year, ownerToUseForTests, numberToUseForCheck, prizeToUseForTests, originToUserForTests)
if notificationAddResultErr != nil {
log.Fatal(notificationAddResultErr)
}
... | explode_data.jsonl/71138 | {
"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,
2212,
11196,
1249,
54998,
1155,
353,
8840,
836,
8,
341,
197,
18553,
2212,
2077,
7747,
1669,
2691,
11196,
1249,
54998,
1255,
6363,
18200,
9296,
3144,
11,
7342,
7342,
33814,
6482,
2461,
18200,
11,
1042,
11,
6372,
1249,
10253,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCapacityGetError(t *testing.T) {
testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) {
var c1 *structs.Capacity
p.On("CapacityGet").Return(nil, fmt.Errorf("err1"))
err := c.Get("/system/capacity", stdsdk.RequestOptions{}, c1)
require.Nil(t, c1)
require.EqualError(t, err, "err1")
})
} | explode_data.jsonl/23745 | {
"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,
29392,
1949,
1454,
1155,
353,
8840,
836,
8,
341,
18185,
5475,
1155,
11,
2915,
1337,
353,
1834,
51295,
11716,
11,
281,
353,
1235,
82,
24664,
5179,
8,
341,
197,
2405,
272,
16,
353,
1235,
82,
78963,
4018,
198,
197,
3223,
80... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCorrectScopeError(t *testing.T) {
store, clean := realtikvtest.CreateMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
variable.RegisterSysVar(&variable.SysVar{Scope: variable.ScopeNone, Name: "sv_none", Value: "acdc"})
variable.RegisterSysVar(&variable.SysVar... | explode_data.jsonl/5747 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 587
} | [
2830,
3393,
33092,
10803,
1454,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1931,
83,
1579,
85,
1944,
7251,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
741,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetBundleIndex(t *testing.T) {
if index, err := getBundleIndex("ELASTICSEARCH", []Bundle{
{Bundle: "LOG_SHIPPER"},
{Bundle: "ELASTICSEARCH"},
}); err != nil || index != 1 {
t.Fatalf("Expect no error and 1, got %v and %v", err, index)
}
if index, err := getBundleIndex("ELASTICSEARCH", []Bundle{
{Bu... | explode_data.jsonl/3829 | {
"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,
1949,
8409,
1552,
1155,
353,
8840,
836,
8,
341,
743,
1922,
11,
1848,
1669,
633,
8409,
1552,
445,
2749,
6349,
1317,
43545,
497,
3056,
8409,
515,
197,
197,
90,
8409,
25,
330,
7243,
6834,
3298,
9654,
7115,
197,
197,
90,
840... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCAuserHasAttribute(t *testing.T) {
testDirClean(t)
ca, err := newCA(configFile, &CAConfig{}, &srv, false)
if err != nil {
t.Fatal("newCA failed ", err)
}
_, err = ca.userHasAttribute(string(0), string(0))
t.Log("userHasAttribute err: ", err)
if err == nil {
t.Error("userHasAttribute should have fail... | explode_data.jsonl/82699 | {
"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,
5049,
872,
10281,
3907,
1155,
353,
8840,
836,
8,
341,
18185,
6184,
27529,
1155,
340,
197,
924,
11,
1848,
1669,
501,
5049,
8754,
1703,
11,
609,
5049,
2648,
22655,
609,
40020,
11,
895,
340,
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... | 3 |
func TestTLDReplace(t *testing.T) {
out, err := strategy.TLDReplace.Generate("example", "com")
if err != nil {
t.Fail()
t.Fatal("Error should not occur !", err)
}
if len(out) == 0 {
t.FailNow()
}
if len(out) != 83 {
t.FailNow()
}
} | explode_data.jsonl/47665 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 112
} | [
2830,
3393,
51,
12335,
23107,
1155,
353,
8840,
836,
8,
341,
13967,
11,
1848,
1669,
8282,
836,
12335,
23107,
57582,
445,
8687,
497,
330,
874,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
57243,
741,
197,
3244,
26133,
445,
1454,
1265,
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... | 4 |
func TestApplicationResolver_UpdateApplication(t *testing.T) {
// GIVEN
fixName := "fix-name"
appSvc := automock.NewApplicationSvc()
defer appSvc.AssertExpectations(t)
resolver := application.NewApplicationResolver(appSvc, nil)
for tn, tc := range map[string]struct {
givenDesc *string
givenLabels gq... | explode_data.jsonl/28763 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 647
} | [
2830,
3393,
4988,
18190,
47393,
4988,
1155,
353,
8840,
836,
8,
341,
197,
322,
89836,
198,
1166,
941,
675,
1669,
330,
5743,
11494,
698,
28236,
92766,
1669,
5006,
1176,
7121,
4988,
92766,
741,
16867,
906,
92766,
11711,
17536,
804,
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 TestBrightness(t *testing.T) {
cases := []struct {
desc string
percent float64
value image.Image
expected *image.RGBA
}{
{
desc: "+100%",
percent: 1.0,
value: &image.RGBA{
Rect: image.Rect(0, 0, 2, 2),
Stride: 8,
Pix: []uint8{
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0... | explode_data.jsonl/5950 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1405
} | [
2830,
3393,
93247,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
41653,
257,
914,
198,
197,
197,
24422,
220,
2224,
21,
19,
198,
197,
16309,
262,
2168,
7528,
198,
197,
42400,
353,
1805,
80114,
32,
198,
197,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestMetric_MetricDescriptor(t *testing.T) {
ms := NewMetric()
ms.InitEmpty()
assert.EqualValues(t, true, ms.MetricDescriptor().IsNil())
ms.MetricDescriptor().InitEmpty()
assert.EqualValues(t, false, ms.MetricDescriptor().IsNil())
fillTestMetricDescriptor(ms.MetricDescriptor())
assert.EqualValues(t, generate... | explode_data.jsonl/19511 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
54310,
1245,
16340,
11709,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
1532,
54310,
741,
47691,
26849,
3522,
741,
6948,
12808,
6227,
1155,
11,
830,
11,
9829,
1321,
16340,
11709,
1005,
3872,
19064,
2398,
47691,
1321,
16340,
1170... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_getPlatformBenchmarkVersion(t *testing.T) {
type args struct {
platform Platform
}
tests := []struct {
name string
args args
want string
}{
{
name: "eks",
args: args{
platform: Platform{Name: "eks"},
},
want: "eks-1.0.1",
},
{
name: "gke 1.19",
args: args{
platform:... | explode_data.jsonl/60207 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 728
} | [
2830,
3393,
3062,
17296,
84971,
5637,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
197,
15734,
17458,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
914,
198,
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... | 2 |
func TestSnapshotShouldFail(t *testing.T) {
if test.UpdateGoldenGlobal {
t.Skip()
}
a := struct {
A string
B int
C bool
D *string
}{
A: "fo",
B: 1,
C: true,
D: swag.String("bar"),
}
b := "Hello World!"
tMock := new(mocks.TestingT)
tMock.On("Helper").Return()
tMock.On("Name").Return("TestSna... | explode_data.jsonl/17627 | {
"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,
15009,
14996,
19524,
1155,
353,
8840,
836,
8,
341,
743,
1273,
16689,
59790,
11646,
341,
197,
3244,
57776,
741,
197,
532,
11323,
1669,
2036,
341,
197,
22985,
914,
198,
197,
12791,
526,
198,
197,
6258,
1807,
198,
197,
10957,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStub(t *testing.T) {
tests := []struct {
name string
want *routev1.Route
}{
{
name: "Test stubbing out route",
want: &routev1.Route{
TypeMeta: metav1.TypeMeta{},
ObjectMeta: metav1.ObjectMeta{
Name: api.OpenShiftConsoleName,
GenerateName: "",
... | explode_data.jsonl/62121 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 658
} | [
2830,
3393,
33838,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
50780,
353,
8966,
85,
16,
58004,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
2271,
13633,
7132,
700,
6021,
756,
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 TestCachePath(t *testing.T) {
os.Unsetenv(xdg.CacheHomeEnvVar)
os.Setenv("TEMP", filepath.Join(homedir.HomeDir(), "foo"))
expected := filepath.Join(homedir.HomeDir(), "foo", appName, testFile)
if lazy.cachePath(testFile) != expected {
t.Errorf("expected '%s', got '%s'", expected, lazy.cachePath(testFile))
... | explode_data.jsonl/5286 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 231
} | [
2830,
3393,
8233,
1820,
1155,
353,
8840,
836,
8,
341,
25078,
10616,
746,
3160,
2075,
35138,
46130,
7623,
14359,
3962,
340,
25078,
4202,
3160,
445,
48343,
497,
26054,
22363,
3203,
24139,
404,
59965,
6184,
1507,
330,
7975,
28075,
42400,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOpenConversation(t *testing.T) {
http.HandleFunc("/conversations.open", openConversationHandler)
once.Do(startServer)
api := New("testing-token", OptionAPIURL("http://"+serverAddr+"/"))
params := OpenConversationParameters{ChannelID: "CXXXXXXXX"}
_, _, _, err := api.OpenConversation(¶ms)
if err != ni... | explode_data.jsonl/78552 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 139
} | [
2830,
3393,
5002,
60313,
1155,
353,
8840,
836,
8,
341,
28080,
63623,
4283,
443,
72995,
5826,
497,
1787,
60313,
3050,
340,
197,
13184,
33596,
10639,
5475,
340,
54299,
1669,
1532,
445,
8840,
34841,
497,
6959,
7082,
3144,
445,
1254,
1110,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEvent_ID(t *testing.T) {
e := Message{}
require.Equal(t, EventID{}, e.ID(), "invalid default ID")
id := MustEventID("idk")
e.SetID(id)
require.Equal(t, id, e.ID(), "invalid received ID")
} | explode_data.jsonl/47329 | {
"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,
1556,
3450,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
4856,
16094,
17957,
12808,
1155,
11,
3665,
915,
22655,
384,
9910,
1507,
330,
11808,
1638,
3034,
1138,
15710,
1669,
15465,
1556,
915,
445,
307,
74,
1138,
7727,
4202,
915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetDNSSuffix(t *testing.T) {
d := setup()
dn := DNS{}
dn.Suffix = "home.gan"
dn, err := d.SetDNSSuffix(dn)
notErr(t, err)
assert(t, dn.Suffix, "home.gan")
} | explode_data.jsonl/21123 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 87
} | [
2830,
3393,
1649,
31264,
1220,
13554,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
6505,
741,
2698,
77,
1669,
27598,
16094,
2698,
77,
808,
13554,
284,
330,
5117,
1302,
276,
698,
2698,
77,
11,
1848,
1669,
294,
4202,
31264,
1220,
13554,
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 |
func TestUnexpectedArgValue_FirstArg(t *testing.T) {
reporter, ctrl := createFixtures(t)
defer reporter.recoverUnexpectedFatal()
subject := new(Subject)
expectedArg0 := TestStruct{Number: 123, Message: "hello"}
ctrl.RecordCall(subject, "ActOnTestStructMethod", expectedArg0, 15)
reporter.assertFatal(func() {
/... | explode_data.jsonl/17274 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 340
} | [
2830,
3393,
29430,
2735,
1130,
79790,
2735,
1155,
353,
8840,
836,
8,
341,
69931,
261,
11,
23743,
1669,
1855,
25958,
18513,
1155,
340,
16867,
18960,
1327,
3688,
29430,
62396,
741,
28624,
583,
1669,
501,
7,
13019,
692,
42400,
2735,
15,
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 TestGlobAnyMatch(t *testing.T) {
assert := assert.New(t)
assert.False(globAnyMatch("", "testo"))
assert.True(globAnyMatch("*", "testo"))
assert.True(globAnyMatch("x,testo", "testo"))
assert.False(globAnyMatch("x,y", "testo"))
} | explode_data.jsonl/60253 | {
"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,
38,
1684,
8610,
8331,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
6948,
50757,
3268,
1684,
8610,
8331,
19814,
330,
1944,
78,
5455,
6948,
32443,
3268,
1684,
8610,
8331,
29592,
497,
330,
1944,
78,
5455,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAPIServerDefaults(t *testing.T) {
defaults := kubeapiservercmdoptions.NewServerRunOptions()
// This is a snapshot of the default config
// If the default changes (new fields are added, or default values change), we want to know
// Once we've reacted to the changes appropriately in BuildKubernetesMasterCon... | explode_data.jsonl/53173 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2554
} | [
2830,
3393,
2537,
1637,
2836,
16273,
1155,
353,
8840,
836,
8,
341,
11940,
82,
1669,
80958,
13725,
2836,
8710,
2875,
7121,
5475,
6727,
3798,
2822,
197,
322,
1096,
374,
264,
16295,
315,
279,
1638,
2193,
198,
197,
322,
1416,
279,
1638,
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... | 2 |
func TestCalc2(t *testing.T) {
if _, err := Calc("5/0"); err == nil {
t.Error("Calc did not work as expected.")
} else {
t.Log("Calc test passed.", err)
}
} | explode_data.jsonl/49583 | {
"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,
47168,
17,
1155,
353,
8840,
836,
8,
341,
743,
8358,
1848,
1669,
34215,
445,
20,
14,
15,
5038,
1848,
621,
2092,
341,
197,
3244,
6141,
445,
47168,
1521,
537,
975,
438,
3601,
13053,
197,
92,
770,
341,
197,
3244,
5247,
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
] | 2 |
func Test_sub(t *testing.T) {
numA, numB, expectedResult := 3, 4, -1
result := sub(numA, numB)
if result != expectedResult {
t.Fatalf("Sub error: expected %d, but got %d", expectedResult, result)
}
} | explode_data.jsonl/22787 | {
"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,
5228,
1155,
353,
8840,
836,
8,
341,
22431,
32,
11,
1629,
33,
11,
81441,
1669,
220,
18,
11,
220,
19,
11,
481,
16,
198,
9559,
1669,
1186,
8068,
32,
11,
1629,
33,
340,
743,
1102,
961,
81441,
341,
197,
3244,
30762,
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
] | 2 |
func TestRequestRecovery(t *testing.T) {
time.Sleep(1*time.Second)
mockIpList(t)
server:=runNormalBackupConfigResponse()
newAppConfig:=getTestAppConfig()
newAppConfig.Ip=server.URL
appConfig:=GetAppConfig(newAppConfig)
urlSuffix:=getConfigUrlSuffix(appConfig,newAppConfig)
o,err:=requestRecovery(appConfig,&Con... | explode_data.jsonl/5414 | {
"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,
1900,
693,
7449,
1155,
353,
8840,
836,
8,
341,
21957,
31586,
7,
16,
77053,
32435,
340,
77333,
23378,
852,
1155,
340,
41057,
14209,
6108,
12206,
56245,
2648,
2582,
741,
8638,
2164,
2648,
14209,
455,
2271,
2164,
2648,
741,
863... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestManifestGenerateTelemetry(t *testing.T) {
runTestGroup(t, testGroup{
{
desc: "all_off",
},
{
desc: "telemetry_default",
diffIgnore: "",
},
{
desc: "telemetry_k8s_settings",
diffSelect: "Deployment:*:istio-telemetry, HorizontalPodAutoscaler:*:istio-telemetry",
},
{
d... | explode_data.jsonl/48764 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 249
} | [
2830,
3393,
38495,
31115,
6639,
35958,
1155,
353,
8840,
836,
8,
341,
56742,
2271,
2808,
1155,
11,
1273,
2808,
515,
197,
197,
515,
298,
41653,
25,
330,
541,
13651,
756,
197,
197,
1583,
197,
197,
515,
298,
41653,
25,
981,
330,
665,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAction_Validate_RequireSingleMixinData(t *testing.T) {
c := NewTestConfig(t)
c.SetupPorterHome()
c.TestContext.AddTestFile("testdata/simple.porter.yaml", Name)
err := c.LoadManifest()
require.NoError(t, err)
// Sabotage!
c.Manifest.Install[0].Data["rando-mixin"] = ""
err = c.Manifest.Install.Valida... | explode_data.jsonl/10948 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
2512,
62,
17926,
62,
17959,
10888,
38456,
1043,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
2271,
2648,
1155,
340,
1444,
39820,
7084,
261,
7623,
2822,
1444,
8787,
1972,
1904,
2271,
1703,
445,
92425,
67195,
14598,
261,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBarDefaultValue(t *testing.T) {
bar := NewBar()
err := bar.Render(ioutil.Discard)
assert.NoError(t, err)
assert.Equal(t, "900px", bar.Initialization.Width)
assert.Equal(t, "500px", bar.Initialization.Height)
assert.Equal(t, "Awesome go-tachart", bar.PageTitle)
assert.Equal(t, host, bar.AssetsHost)
} | explode_data.jsonl/28524 | {
"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,
3428,
41533,
1155,
353,
8840,
836,
8,
341,
90709,
1669,
1532,
3428,
741,
9859,
1669,
3619,
27386,
1956,
30158,
909,
47560,
340,
6948,
35699,
1155,
11,
1848,
340,
6948,
12808,
1155,
11,
330,
24,
15,
15,
1767,
497,
3619,
329... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFindBundleBundleNotCached(t *testing.T) {
cfg := config.NewTestConfig(t)
c := New(cfg.Config)
path, _, ok, err := c.FindBundle(kahnlatest)
assert.NoError(t, err, "the cache dir should exist, no error should have happened")
assert.False(t, ok, "the bundle should not exist")
assert.Empty(t, path, "should n... | explode_data.jsonl/56183 | {
"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,
9885,
8409,
8409,
2623,
70293,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
2193,
7121,
2271,
2648,
1155,
340,
1444,
1669,
1532,
28272,
10753,
340,
26781,
11,
8358,
5394,
11,
1848,
1669,
272,
9998,
8409,
5969,
29560,
19350,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIstanbulConsensus_ValidateShutdown_Validator(t *testing.T) {
var tests = []struct {
name, istanbulIsValidatorResp, istanbulStatusResp string
wantErrMsg string
}{
{
name: "mintingNotStarted",
istanbulIsValidatorResp: `{"result": true}`,
... | explode_data.jsonl/59657 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 980
} | [
2830,
3393,
40,
45116,
15220,
13626,
62,
17926,
62004,
62,
14256,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
11609,
11,
5999,
276,
16110,
3872,
14256,
36555,
11,
5999,
276,
16110,
2522,
36555,
914,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSchemaResolversErr(t *testing.T) {
expected := errors.New("mock")
resolver := func(*broker.Context) (specs.Schemas, error) {
return nil, expected
}
ctx := logger.WithLogger(broker.NewBackground())
resolvers := SchemaResolvers{resolver}
_, err := resolvers.Resolve(ctx)
if err == nil {
t.Fatal("unex... | explode_data.jsonl/2211 | {
"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,
8632,
1061,
39435,
7747,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
5975,
7121,
445,
16712,
1138,
10202,
7921,
1669,
2915,
4071,
69309,
9328,
8,
320,
94531,
808,
31126,
11,
1465,
8,
341,
197,
853,
2092,
11,
3601,
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 TestFormatterHide(test *testing.T) {
formatted, err := formatter.Format("{hide}text{hide | off}")
assert.NoError(test, err)
assert.Equal(test, "\x1b[8mtext\x1b[28m", formatted)
} | explode_data.jsonl/39775 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 75
} | [
2830,
3393,
14183,
21692,
8623,
353,
8840,
836,
8,
341,
37410,
12127,
11,
1848,
1669,
24814,
9978,
13976,
8559,
92,
1318,
90,
8559,
760,
1007,
55266,
6948,
35699,
8623,
11,
1848,
340,
6948,
12808,
8623,
11,
2917,
87,
16,
65,
58,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEncodeHighLevel(t *testing.T) {
shape := SymbolShapeHint_FORCE_NONE
str := string(make([]byte, 1559))
_, e := EncodeHighLevel(str, shape, nil, nil)
if e == nil {
t.Fatalf("EncodeHighLevel must be error")
}
str = " 0A 0A 0A 0A000000"
expect := []byte{
230, 19, 111, 19, 111, 19, 111, 19, 111, 254, 1... | explode_data.jsonl/32233 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 547
} | [
2830,
3393,
32535,
11976,
4449,
1155,
353,
8840,
836,
8,
341,
197,
12231,
1669,
19612,
12301,
26987,
50092,
14904,
271,
11355,
1669,
914,
36944,
10556,
3782,
11,
220,
16,
20,
20,
24,
1171,
197,
6878,
384,
1669,
56562,
11976,
4449,
4199,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_RegistrySynchronizer_UpkeepRegisteredLog(t *testing.T) {
db, synchronizer, ethMock, lb, job := setupRegistrySync(t)
contractAddress := job.KeeperSpec.ContractAddress.Address()
fromAddress := job.KeeperSpec.FromAddress.Address()
registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.RegistryAB... | explode_data.jsonl/35262 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 531
} | [
2830,
3393,
62,
15603,
50,
14113,
3135,
88425,
13096,
41430,
2201,
1155,
353,
8840,
836,
8,
341,
20939,
11,
14121,
3135,
11,
8372,
11571,
11,
18866,
11,
2618,
1669,
6505,
15603,
12154,
1155,
692,
197,
20257,
4286,
1669,
2618,
11352,
430... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMsgTransferNFTGetSignersMethod(t *testing.T) {
newMsgTransferNFT := types.NewMsgTransferNFT(denomID, denom, id, tokenURI, uriHash, tokenData, address.String(), address2.String())
signers := newMsgTransferNFT.GetSigners()
require.Equal(t, 1, len(signers))
require.Equal(t, address.String(), signers[0].String... | explode_data.jsonl/28172 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 115
} | [
2830,
3393,
6611,
21970,
45,
3994,
1949,
7264,
388,
3523,
1155,
353,
8840,
836,
8,
341,
8638,
6611,
21970,
45,
3994,
1669,
4494,
7121,
6611,
21970,
45,
3994,
1500,
268,
316,
915,
11,
49744,
11,
877,
11,
3950,
10301,
11,
13071,
6370,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_SshDail(t *testing.T){
h:=orm.HostsList{
IP:"10.21.21.179",
User:"root",
Password:"sunrunvas",
}
fmt.Println(SshDail(h))
} | explode_data.jsonl/20540 | {
"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,
1098,
927,
35,
604,
1155,
353,
8840,
836,
1264,
9598,
14209,
493,
29840,
82,
852,
515,
197,
197,
3298,
2974,
16,
15,
13,
17,
16,
13,
17,
16,
13,
16,
22,
24,
756,
197,
31672,
2974,
2888,
756,
197,
197,
4876,
2974,
395... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_03(t *testing.T) {
fh := FileHelper{}
pathFile := fh.AdjustPathSlash("../../filesfortest/levelfilesfortest/level_01_dir/" +
"level_02_dir/iDoNotExist")
expectedPathStr := fh.AdjustPathSlash("..\\..\\filesfortest\\levelfilesfortest\\level_01_dir\\" +
"level_02_dir\\iDoNo... | explode_data.jsonl/14508 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 401
} | [
2830,
3393,
1703,
5511,
31879,
1820,
703,
62,
15,
18,
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... | 5 |
func Test_AWSPublic(t *testing.T) {
expectedCode := "aws-rds-no-public-db-access"
var tests = []struct {
name string
source string
mustIncludeResultCode string
mustExcludeResultCode string
}{
{
name: "check aws_db_instance when publicly exposed",
source: `
resource "... | explode_data.jsonl/52873 | {
"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,
1566,
54,
4592,
475,
1155,
353,
8840,
836,
8,
341,
42400,
2078,
1669,
330,
8635,
3795,
5356,
28366,
56471,
60399,
42156,
1837,
2405,
7032,
284,
3056,
1235,
341,
197,
11609,
1698,
914,
198,
197,
47418,
394,
914,
198,
197,
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 TestRepository_GetAddAffiliate(t *testing.T) {
db, err := sqlx.Connect("pgx", "host=localhost port=5432 user=postgres dbname=juno password=postgres sslmode=disable")
if err != nil {
t.Fatal(err)
}
// Create the codec
codec := simapp.MakeTestEncodingConfig()
type args struct {
accountFilter filter.Filte... | explode_data.jsonl/25489 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 828
} | [
2830,
3393,
4624,
13614,
2212,
25841,
34850,
1155,
353,
8840,
836,
8,
341,
20939,
11,
1848,
1669,
5704,
87,
43851,
445,
3517,
87,
497,
330,
3790,
84551,
2635,
28,
20,
19,
18,
17,
1196,
28,
43070,
83492,
45612,
16311,
3552,
28,
43070,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNoBrFilter(t *testing.T) {
tests := map[string]string{
"My content": "My content",
"My content \r\nHere.": "My content Here.",
"My\n content\r right\r\n here.": "My content right here.",
"My\ncontent\rright\r\nhere.": "My content right here.",
"My content.\n\nMore co... | explode_data.jsonl/62219 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 197
} | [
2830,
3393,
2753,
6828,
5632,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
30953,
515,
197,
197,
45140,
2213,
788,
3824,
330,
5050,
2213,
756,
197,
197,
45140,
2213,
1124,
81,
1699,
8420,
13,
788,
1843,
330,
5050,
2213,
569... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetFeatures(t *testing.T) {
t.Log("We need to test the GetFeatures.")
{
t.Log("\tChecking GetFeatures for response ")
{
_, msgType := common.Call(client, client.GetFeatures())
if msgType != 17 {
t.Errorf("\t\tExpected msgType=17, received %d", msgType)
} else {
t.Log("\t\tEverything we... | explode_data.jsonl/46198 | {
"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,
1949,
21336,
1155,
353,
8840,
836,
8,
1476,
3244,
5247,
445,
1654,
1184,
311,
1273,
279,
2126,
21336,
13053,
197,
515,
197,
3244,
5247,
4921,
83,
40129,
2126,
21336,
369,
2033,
14167,
197,
197,
515,
298,
197,
6878,
3750,
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... | 2 |
func TestEntryPanicf(t *testing.T) {
errBoom := fmt.Errorf("boom again")
defer func() {
p := recover()
assert.NotNil(t, p)
switch pVal := p.(type) {
case *Entry:
assert.Equal(t, "kaboom true", pVal.Message)
assert.Equal(t, errBoom, pVal.Data["err"])
default:
t.Fatalf("want type *Entry, got %T: %#... | explode_data.jsonl/13866 | {
"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,
5874,
47,
31270,
69,
1155,
353,
8840,
836,
8,
341,
9859,
94234,
1669,
8879,
13080,
445,
95316,
1549,
5130,
16867,
2915,
368,
341,
197,
3223,
1669,
11731,
741,
197,
6948,
93882,
1155,
11,
281,
692,
197,
8961,
281,
2208,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRegisterNoDefaultProviders(t *testing.T) {
runInfo := &EvalRunInfo{
Proj: &workspace.Project{Name: "test"},
Target: &Target{Name: "test"},
}
newURN := func(t tokens.Type, name string, parent resource.URN) resource.URN {
var pt tokens.Type
if parent != "" {
pt = parent.Type()
}
return resou... | explode_data.jsonl/6399 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1228
} | [
2830,
3393,
8690,
2753,
3675,
37351,
1155,
353,
8840,
836,
8,
341,
56742,
1731,
1669,
609,
54469,
6727,
1731,
515,
197,
197,
61075,
25,
256,
609,
42909,
30944,
63121,
25,
330,
1944,
7115,
197,
197,
6397,
25,
609,
6397,
63121,
25,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestStateChangeLog(t *testing.T) {
order := &Order{}
CreateOrderAndExecuteTransition(order, OrderEventCheckout, t, true)
var stateChangeLog transition.StateChangeLog
testdb.Where("refer_table = ? AND refer_id = ?", "orders", order.Id).First(&stateChangeLog)
if stateChangeLog.From != OrderStateDraft {
t.Er... | explode_data.jsonl/44771 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 147
} | [
2830,
3393,
1397,
4072,
2201,
1155,
353,
8840,
836,
8,
341,
42245,
1669,
609,
4431,
16094,
75569,
4431,
3036,
17174,
21768,
19385,
11,
7217,
1556,
55145,
11,
259,
11,
830,
692,
2405,
1584,
4072,
2201,
9142,
18942,
4072,
2201,
198,
18185... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestWriteError(t *testing.T) {
t.Parallel()
fName := "TestWriteError"
defer cleanup(fName)
writeOldFile(fName, t)
openFile = func(name string, flags int, perm os.FileMode) (*os.File, error) {
f, err := os.OpenFile(name, flags, perm)
// simulate Write() error by closing the file prematurely
f.Close()
... | explode_data.jsonl/73994 | {
"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,
7985,
1454,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
1166,
675,
1669,
330,
2271,
7985,
1454,
698,
16867,
21290,
955,
675,
340,
24945,
18284,
1703,
955,
675,
11,
259,
692,
52199,
1703,
284,
2915,
3153,
914,
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 TestStorageTerm(t *testing.T) {
ents := []pb.Entry{{Index: 3, Term: 3}, {Index: 4, Term: 4}, {Index: 5, Term: 5}}
tests := []struct {
i uint64
werr error
wterm uint64
wpanic bool
}{
{2, ErrCompacted, 0, false},
{3, nil, 3, false},
{4, nil, 4, false},
{5, nil, 5, false},
{6, nil, 0, true},
}
... | explode_data.jsonl/66751 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 399
} | [
2830,
3393,
5793,
17249,
1155,
353,
8840,
836,
8,
341,
197,
805,
1669,
3056,
16650,
22330,
2979,
1552,
25,
220,
18,
11,
17519,
25,
220,
18,
2137,
314,
1552,
25,
220,
19,
11,
17519,
25,
220,
19,
2137,
314,
1552,
25,
220,
20,
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 TestErrorReadingNonFile(t *testing.T) {
tmpdir, err := ioutil.TempDir("", "")
if err != nil {
t.Fatalf("Couldn't create tmpdir")
}
defer os.RemoveAll(tmpdir)
loadingRules := ClientConfigLoadingRules{
ExplicitPath: tmpdir,
}
_, err = loadingRules.Load()
if err == nil {
t.Fatalf("Expected error for n... | explode_data.jsonl/67849 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 180
} | [
2830,
3393,
1454,
31899,
8121,
1703,
1155,
353,
8840,
836,
8,
341,
20082,
3741,
11,
1848,
1669,
43144,
65009,
6184,
19814,
14676,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
38987,
944,
1855,
4174,
3741,
1138,
197,
532,
16867,
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... | 4 |
func TestRouter_MatchingOptions_AssignsRouteNamesOverAsMethod(t *testing.T) {
mainRouter := Router{}
_ = mainRouter.As("users.getAs").Get("/users", testHandlerFunc, MatchingOptions{"users.get", "", []string{}, map[string]string{}, map[string]string{}, nil})
_ = mainRouter.As("users.createAs").Post("/users", testHan... | explode_data.jsonl/31731 | {
"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,
9523,
1245,
31924,
3798,
62222,
622,
82,
4899,
7980,
1918,
2121,
3523,
1155,
353,
8840,
836,
8,
341,
36641,
9523,
1669,
10554,
31483,
197,
62,
284,
1887,
9523,
20242,
445,
4218,
87280,
1827,
1949,
4283,
4218,
497,
1273,
3050... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.