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 TestNullArray(t *testing.T) {
n, _ := get(`{"data":null}`, "data").Interface()
if n != nil {
t.Fatalf("expected '%v', got '%v'", nil, n)
}
n = get(`{}`, "data")
if reflect.DeepEqual(n, nil) {
t.Fatalf("expected '%v', got '%v'", nil, n)
}
n = get(`{"data":[]}`, "data")
... | explode_data.jsonl/62356 | {
"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,
3280,
1857,
1155,
353,
8840,
836,
8,
341,
262,
308,
11,
716,
1669,
633,
5809,
4913,
691,
788,
2921,
28350,
330,
691,
1827,
5051,
741,
262,
421,
308,
961,
2092,
341,
286,
259,
30762,
445,
7325,
7677,
85,
516,
2684,
7677,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPostingsForMatcher(t *testing.T) {
cases := []struct {
matcher *labels.Matcher
hasError bool
}{
{
// Equal label matcher will just return.
matcher: labels.MustNewMatcher(labels.MatchEqual, "test", "test"),
hasError: false,
},
{
// Regex matcher which doesn't have '|' will call Labelva... | explode_data.jsonl/50271 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 378
} | [
2830,
3393,
4133,
819,
2461,
37554,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
2109,
28058,
220,
353,
16873,
76452,
198,
197,
63255,
1454,
1807,
198,
197,
59403,
197,
197,
515,
298,
197,
322,
38474,
2383,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSimpleMetaFactoryUpdate(t *testing.T) {
factory := SimpleMetaFactory{VersionField: "V", KindField: "K"}
obj := struct {
V string
K string
}{"1", "2"}
// must pass a pointer
if err := factory.Update("test", "other", obj); err == nil {
t.Errorf("unexpected non-error")
}
if obj.V != "1" || obj.K !=... | explode_data.jsonl/34479 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 229
} | [
2830,
3393,
16374,
12175,
4153,
4289,
1155,
353,
8840,
836,
8,
341,
1166,
2919,
1669,
8993,
12175,
4153,
90,
5637,
1877,
25,
330,
53,
497,
16840,
1877,
25,
330,
42,
63159,
22671,
1669,
2036,
341,
197,
17446,
914,
198,
197,
39340,
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... | 7 |
func TestSearch(t *testing.T) {
tests := []struct {
vector []float64
want SearchResult
}{
{[]float64{1, 0, 0, 0, 0, 0}, SearchResult{1, 0}},
{[]float64{0, 1, 0, 0, 0, 0}, SearchResult{2, 0}},
{[]float64{0, 0, 1, 0, 0, 0}, SearchResult{3, 0}},
{[]float64{0, 0, 0, 1, 0, 0}, SearchResult{4, 0}},
{[]float... | explode_data.jsonl/31019 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 413
} | [
2830,
3393,
5890,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
20365,
3056,
3649,
21,
19,
198,
197,
50780,
256,
96597,
198,
197,
59403,
197,
197,
90,
1294,
3649,
21,
19,
90,
16,
11,
220,
15,
11,
220,
15,
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 TestUnknownRevision(t *testing.T) {
testenv.NeedsGo1Point(t, 14)
const unknown = `
-- go.mod --
module mod.com
require (
example.com v1.2.2
)
-- main.go --
package main
import "example.com/blah"
func main() {
var x = blah.Name
}
`
// Start from a bad state/bad IWL, and confirm that we recover.
t.Run("ba... | explode_data.jsonl/3745 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 746
} | [
2830,
3393,
13790,
33602,
1155,
353,
8840,
836,
8,
341,
18185,
3160,
2067,
68,
6767,
10850,
16,
2609,
1155,
11,
220,
16,
19,
692,
4777,
9788,
284,
22074,
313,
728,
10929,
39514,
4352,
1463,
905,
271,
4310,
2399,
8122,
1516,
905,
348,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestObjectDifficultName(t *testing.T) {
ctx := context.Background()
c, rollback := makeConnectionWithContainer(t)
defer rollback()
const name = `hello? sausage/êé/Hello, 世界/ " ' @ < > & ?/`
err := c.ObjectPutString(ctx, CONTAINER, name, CONTENTS, "")
if err != nil {
t.Fatal(err)
}
defer func() {
err = ... | explode_data.jsonl/12717 | {
"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,
1190,
21751,
3866,
675,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1444,
11,
60414,
1669,
1281,
4526,
2354,
4502,
1155,
340,
16867,
60414,
741,
4777,
829,
284,
1565,
14990,
30,
58886,
14,
5498,
963,
14,
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 TestMiddleware(t *testing.T) {
cookies := sessions.NewCookieStore([]byte("my-secret"))
mockServer := newMockIndieAuthServer(t)
// Create a server that use the lib
s, err := New(cookies, mockServer.Me)
if err != nil {
panic(err)
}
m := s.Middleware()
mux := http.NewServeMux()
mux.HandleFunc("/indieaut... | explode_data.jsonl/7019 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 488
} | [
2830,
3393,
24684,
1155,
353,
8840,
836,
8,
341,
197,
44317,
1669,
15704,
7121,
20616,
6093,
10556,
3782,
445,
2408,
68892,
28075,
77333,
5475,
1669,
501,
11571,
1425,
645,
5087,
5475,
1155,
692,
197,
322,
4230,
264,
3538,
429,
990,
279... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHandleDefaultNamespace(t *testing.T) {
testcases := []struct {
name string
given map[plugins.ConfigMapID][]ConfigMapUpdate
expected map[plugins.ConfigMapID][]ConfigMapUpdate
}{
{
name: "nil map",
given: nil,
expected: map[plugins.ConfigMapID][]ConfigMapUpdate{},
},
{
nam... | explode_data.jsonl/45259 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1385
} | [
2830,
3393,
6999,
3675,
22699,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
3174,
2071,
262,
2415,
58,
18716,
10753,
2227,
915,
45725,
2648,
2227,
4289,
198,
197,
42400,
2415,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestWatchPods(t *testing.T) {
fakeWatch := watch.NewFake()
client := &fake.Clientset{}
client.AddWatchReactor("*", core.DefaultWatchReactor(fakeWatch, nil))
manager := NewReplicaSetController(client, controller.NoResyncPeriodFunc, BurstReplicas, 0)
manager.podStoreSynced = alwaysReady
// Put one ReplicaSet ... | explode_data.jsonl/10048 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 565
} | [
2830,
3393,
14247,
23527,
82,
1155,
353,
8840,
836,
8,
341,
1166,
726,
14247,
1669,
3736,
7121,
52317,
741,
25291,
1669,
609,
30570,
11716,
746,
16094,
25291,
1904,
14247,
693,
5621,
29592,
497,
6200,
13275,
14247,
693,
5621,
74138,
14247... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRest_UpdateWithRestrictedWords(t *testing.T) {
ts, _, teardown := startupT(t)
defer teardown()
c1 := store.Comment{Text: "What the quack is that?", ParentID: "p1",
Locator: store.Locator{SiteID: "remark42", URL: "https://radio-t.com/blah1"}}
id := addComment(t, c1, ts)
client := http.Client{}
req, er... | explode_data.jsonl/37397 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 378
} | [
2830,
3393,
12416,
47393,
2354,
86405,
23489,
1155,
353,
8840,
836,
8,
341,
57441,
11,
8358,
49304,
1669,
20567,
51,
1155,
340,
16867,
49304,
2822,
1444,
16,
1669,
3553,
56730,
90,
1178,
25,
330,
3838,
279,
922,
473,
374,
429,
31011,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRejectModelSpecMissing(t *testing.T) {
g := gomega.NewGomegaWithT(t)
kfsvc := makeTestKFService()
kfsvc.Spec.Default.Predictor.Tensorflow = nil
g.Expect(kfsvc.ValidateCreate()).Should(gomega.MatchError(ExactlyOnePredictorViolatedError))
} | explode_data.jsonl/7097 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 100
} | [
2830,
3393,
78413,
1712,
8327,
25080,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
340,
16463,
69,
58094,
1669,
1281,
2271,
65008,
1860,
741,
16463,
69,
58094,
36473,
13275,
1069,
8861,
269,
442... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTabContainer_Hidden_AsChild(t *testing.T) {
c1 := widget.NewLabel("Tab 1 content")
c2 := widget.NewLabel("Tab 2 content\nTab 2 content\nTab 2 content")
ti1 := container.NewTabItem("Tab 1", c1)
ti2 := container.NewTabItem("Tab 2", c2)
tabs := container.NewAppTabs(ti1, ti2)
tabs.Refresh()
assert.True(t, ... | explode_data.jsonl/32313 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 184
} | [
2830,
3393,
8582,
4502,
2039,
2854,
62741,
3652,
1155,
353,
8840,
836,
8,
341,
1444,
16,
1669,
9086,
7121,
2476,
445,
8582,
220,
16,
2213,
1138,
1444,
17,
1669,
9086,
7121,
2476,
445,
8582,
220,
17,
2213,
1699,
8582,
220,
17,
2213,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTerragruntGenerateBlockDisableSignature(t *testing.T) {
t.Parallel()
generateTestCase := filepath.Join(TEST_FIXTURE_CODEGEN_PATH, "generate-block", "disable-signature")
cleanupTerraformFolder(t, generateTestCase)
cleanupTerragruntFolder(t, generateTestCase)
runTerragrunt(t, fmt.Sprintf("terragrunt apply... | explode_data.jsonl/10164 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 332
} | [
2830,
3393,
51402,
68305,
3850,
31115,
4713,
25479,
25088,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3174,
13220,
16458,
1669,
26054,
22363,
50320,
42635,
41486,
10020,
11085,
7944,
11,
330,
19366,
9425,
497,
330,
18015,
27953,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSourceMap(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/Users/user/project/src/entry.js": `
import {bar} from './bar'
function foo() { bar() }
foo()
`,
"/Users/user/project/src/bar.js": `
export function bar() { throw new Error('test') }
`,
... | explode_data.jsonl/38489 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 243
} | [
2830,
3393,
3608,
2227,
1155,
353,
8840,
836,
8,
341,
11940,
57239,
25952,
33,
1241,
832,
1155,
11,
51450,
515,
197,
74075,
25,
2415,
14032,
30953,
515,
298,
197,
3115,
7137,
11739,
40118,
13437,
14,
4085,
2857,
788,
22074,
571,
21918,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMfsStress(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
_, rt := setupRoot(ctx, t)
numroutines := 10
errs := make(chan error)
for i := 0; i < numroutines; i++ {
go testActor(rt, 50, errs)
}
for i := 0; i < numroutines; i++ {
err := <-errs
if err != nil ... | explode_data.jsonl/35820 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 155
} | [
2830,
3393,
44,
3848,
623,
673,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9121,
741,
197,
6878,
16677,
1669,
6505,
8439,
7502,
11,
259,
692,
22431,
81,
28628,
1669,
220,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestReconcileWithWhenExpressionsWithParameters(t *testing.T) {
names.TestingSeed()
prName := "test-pipeline-run"
ps := []*v1beta1.Pipeline{{
ObjectMeta: baseObjectMeta("test-pipeline", "foo"),
Spec: v1beta1.PipelineSpec{
Params: []v1beta1.ParamSpec{{
Name: "run",
Type: v1beta1.ParamTypeString,
... | explode_data.jsonl/68287 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2079
} | [
2830,
3393,
693,
40446,
457,
2354,
4498,
40315,
2354,
9706,
1155,
353,
8840,
836,
8,
341,
93940,
8787,
287,
41471,
741,
25653,
675,
1669,
330,
1944,
2268,
8790,
22973,
698,
35009,
1669,
29838,
85,
16,
19127,
16,
1069,
8790,
90,
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,
1... | 9 |
func TestUniqueTermFilter(t *testing.T) {
var tests = []struct {
input analysis.TokenStream
// expected indices of input which should be included in the output. We
// use indices instead of another TokenStream, since position/start/end
// should be preserved.
expectedIndices []int
}{
{
input: ... | explode_data.jsonl/48870 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 476
} | [
2830,
3393,
22811,
17249,
5632,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
22427,
6358,
32277,
3027,
198,
197,
197,
322,
3601,
14937,
315,
1946,
892,
1265,
387,
5230,
304,
279,
2550,
13,
1205,
198,
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 Test_getVersionFromKubectlOutput(t *testing.T) {
ver := getVersionFromKubectlOutput(`{
"serverVersion": {
"major": "1",
"minor": "8",
"gitVersion": "v1.8.0"
}
}`)
if ver.BaseVersion() != "1.8" {
t.Fatalf("Expected 1.8 got %s", ver.BaseVersion())
}
ver = getVersionFromKubectlOutput("Something... | explode_data.jsonl/60198 | {
"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,
3062,
5637,
3830,
42,
53380,
5097,
1155,
353,
8840,
836,
8,
341,
197,
423,
1669,
97245,
3830,
42,
53380,
5097,
5809,
515,
220,
330,
4030,
5637,
788,
341,
262,
330,
36505,
788,
330,
16,
756,
262,
330,
45670,
788,
330,
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,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestCfg_FilePath(t *testing.T) {
gtest.Case(t, func() {
c := gcfg.New("config.yml")
path := c.FilePath("tmp")
gtest.Assert(path, "")
path = c.FilePath("tmp")
gtest.Assert(path, "")
})
} | explode_data.jsonl/24455 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 97
} | [
2830,
3393,
42467,
34061,
1820,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
519,
1155,
11,
2915,
368,
341,
197,
1444,
1669,
342,
14072,
7121,
445,
1676,
33936,
1138,
197,
26781,
1669,
272,
8576,
1820,
445,
5173,
1138,
197,
3174,
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 TestNewRequestWithContext(t *testing.T) {
opts := Options{
BaseURL: apiURL,
Headers: Headers{
"some": "header",
"other": "value",
},
}
client, err := New(opts)
require.NoError(t, err, "create client error")
type testKeyCtx struct{}
contextValue := "context-value"
ctx := context.WithValue(conte... | explode_data.jsonl/66011 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1547
} | [
2830,
3393,
3564,
1900,
91101,
1155,
353,
8840,
836,
8,
341,
64734,
1669,
14566,
515,
197,
66732,
3144,
25,
6330,
3144,
345,
197,
197,
10574,
25,
21426,
515,
298,
197,
1,
14689,
788,
220,
330,
2708,
756,
298,
197,
1,
1575,
788,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestValidateStackTypechecking(t *testing.T) {
tcs := []struct {
name string
code []byte
err error
}{
{
name: "call i32",
code: []byte{
operators.Call, 0,
operators.Drop,
},
err: nil,
},
{
name: "call bad index",
code: []byte{
operators.Call, 100,
},
err: wasm.Inva... | explode_data.jsonl/16568 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1929
} | [
2830,
3393,
17926,
4336,
929,
57854,
1155,
353,
8840,
836,
8,
341,
3244,
4837,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
43343,
3056,
3782,
198,
197,
9859,
220,
1465,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
6659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddByIndex(t *testing.T) {
dll, err := generateBaseDLL(5)
if err != nil {
t.Error(err)
}
val := "index-2-inserted"
err = dll.AddByIndex(val, 2)
if err != nil {
t.Error(err)
}
if dll.head.next.next.data != val {
t.Errorf("The item with data '%s' was should be added by index 2, got %s", val, dll.h... | explode_data.jsonl/59813 | {
"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,
2212,
1359,
1552,
1155,
353,
8840,
836,
8,
341,
2698,
654,
11,
1848,
1669,
6923,
3978,
64187,
7,
20,
340,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
532,
19302,
1669,
330,
1252,
12,
17,
74550,
291,
698,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestStartReqLogger(t *testing.T) {
tests := map[string]struct {
isErr bool
request reconcile.Request
}{
"Test Positive-1": {
request: reconcile.Request{
NamespacedName: types.NamespacedName{
Name: "default",
},
},
isErr: false,
},
}
for name, mock := range tests {
t.Run(name, ... | explode_data.jsonl/32134 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 261
} | [
2830,
3393,
3479,
27234,
7395,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
19907,
7747,
256,
1807,
198,
197,
23555,
63408,
9659,
198,
197,
59403,
197,
197,
1,
2271,
43903,
12,
16,
788,
341,
298,
23555,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_AddTwoPodsToVolume_Positive(t *testing.T) {
// Arrange
volumePluginMgr, plugin := volumetesting.GetTestVolumePluginMgr(t)
asw := NewActualStateOfWorld("mynode" /* nodeName */, volumePluginMgr)
devicePath := "fake/device/path"
pod1 := &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "pod1",
UID: "p... | explode_data.jsonl/28881 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1519
} | [
2830,
3393,
21346,
11613,
23527,
82,
1249,
18902,
44246,
3404,
1155,
353,
8840,
836,
8,
341,
197,
322,
40580,
198,
5195,
4661,
11546,
25567,
11,
9006,
1669,
62820,
57824,
287,
2234,
2271,
18902,
11546,
25567,
1155,
340,
60451,
86,
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... | 9 |
func TestDomainDelete(t *testing.T) {
args := testutil.Args
scenarios := []testutil.TestScenario{
{
Args: args("domain delete --service-id 123 --version 1"),
WantError: "error parsing arguments: required flag --name not provided",
},
{
Args: args("domain delete --service-id 123 --version 1 --name ... | explode_data.jsonl/17443 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 491
} | [
2830,
3393,
13636,
6435,
1155,
353,
8840,
836,
8,
341,
31215,
1669,
1273,
1314,
51015,
198,
29928,
60494,
1669,
3056,
1944,
1314,
8787,
54031,
515,
197,
197,
515,
298,
197,
4117,
25,
414,
2827,
445,
12204,
3698,
1177,
7936,
12897,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLeaderStartReplication(t *testing.T) {
s := newTestMemoryStorage(withPeers(1, 2, 3))
r := newTestRaft(1, 10, 1, s)
r.becomeCandidate()
r.becomeLeader()
commitNoopEntry(r, s)
li := r.raftLog.lastIndex()
ents := []pb.Entry{{Data: []byte("some data")}}
r.Step(pb.Message{From: 1, To: 1, Type: pb.MsgProp, ... | explode_data.jsonl/47055 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 486
} | [
2830,
3393,
52621,
3479,
18327,
1693,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
501,
2271,
10642,
5793,
16980,
10197,
388,
7,
16,
11,
220,
17,
11,
220,
18,
1171,
7000,
1669,
501,
2271,
55535,
723,
7,
16,
11,
220,
16,
15,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestWhereStr(t *testing.T) {
v := &Value{data: []string{string("hello"), string("hello"), string("hello"), string("hello"), string("hello"), string("hello")}}
selected := v.WhereStr(func(i int, val string) bool {
return i%2 == 0
}).MustStrSlice()
assert.Equal(t, 3, len(selected))
} | explode_data.jsonl/23412 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 104
} | [
2830,
3393,
9064,
2580,
1155,
353,
8840,
836,
8,
1476,
5195,
1669,
609,
1130,
90,
691,
25,
3056,
917,
90,
917,
445,
14990,
3975,
914,
445,
14990,
3975,
914,
445,
14990,
3975,
914,
445,
14990,
3975,
914,
445,
14990,
3975,
914,
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 TestBitBufferBytes1(t *testing.T) {
bb := NewBitBuffer()
s := byte(0b_0101_1001)
bb.WriteByte(s)
// fmt.Println(bb)
ss, err := bb.ReadByte()
if ss != s || err != nil {
fmt.Printf("From %08b ==> %08b\n", s, ss)
t.Fatal(err, bb)
}
} | explode_data.jsonl/49146 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 125
} | [
2830,
3393,
8344,
4095,
7078,
16,
1155,
353,
8840,
836,
8,
1476,
2233,
65,
1669,
1532,
8344,
4095,
741,
1903,
1669,
4922,
7,
15,
65,
62,
15,
16,
15,
16,
62,
16,
15,
15,
16,
340,
2233,
65,
98026,
1141,
340,
197,
322,
8879,
12419,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGitCommandMergeStatusFiles(t *testing.T) {
type scenario struct {
testName string
oldFiles []*File
newFiles []*File
test func([]*File)
}
scenarios := []scenario{
{
"Old file and new file are the same",
[]*File{},
[]*File{
{
Name: "new_file.txt",
},
},
func(files []... | explode_data.jsonl/38360 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 697
} | [
2830,
3393,
46562,
4062,
52096,
2522,
10809,
1155,
353,
8840,
836,
8,
341,
13158,
15048,
2036,
341,
197,
18185,
675,
914,
198,
197,
61828,
10809,
29838,
1703,
198,
197,
8638,
10809,
29838,
1703,
198,
197,
18185,
257,
2915,
85288,
1703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOperatorInit(t *testing.T) {
goldenFilepath := filepath.Join(operatorRootDir, "cmd/mesh/testdata/operator/output/operator-init.yaml")
rootArgs := &rootArgs{}
oiArgs := &operatorInitArgs{
common: operatorCommonArgs{
hub: "foo.io/istio",
tag: "1.2.3",
operatorNamespace: ... | explode_data.jsonl/67548 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 440
} | [
2830,
3393,
18461,
3803,
1155,
353,
8840,
836,
8,
341,
3174,
813,
268,
1703,
2343,
1669,
26054,
22363,
79091,
8439,
6184,
11,
330,
8710,
3183,
4288,
12697,
691,
68341,
47016,
68341,
54773,
33406,
1138,
33698,
4117,
1669,
609,
2888,
4117,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMapPinFlags(t *testing.T) {
tmp := testutils.TempBPFFS(t)
spec := &MapSpec{
Name: "map",
Type: Array,
KeySize: 4,
ValueSize: 4,
MaxEntries: 1,
Pinning: PinByName,
}
m, err := NewMapWithOptions(spec, MapOptions{
PinPath: tmp,
})
qt.Assert(t, err, qt.IsNil)
m.Close()
_... | explode_data.jsonl/21659 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 255
} | [
2830,
3393,
2227,
19861,
9195,
1155,
353,
8840,
836,
8,
341,
20082,
1669,
1273,
6031,
65009,
26095,
1748,
50,
1155,
692,
98100,
1669,
609,
2227,
8327,
515,
197,
21297,
25,
981,
330,
2186,
756,
197,
27725,
25,
981,
2910,
345,
197,
5524... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidate_required(t *testing.T) {
assert := assert.New(t)
type User struct {
FirstName string `validate:"required"`
LastName *string `validate:"required"`
}
assert.EqualError(
v.Validate(User{}, valis.EachFields(tagrule.Validate)),
"(required) .LastName is required",
)
assert.NoError(
v.Vali... | explode_data.jsonl/17249 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 165
} | [
2830,
3393,
17926,
18743,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
13158,
2657,
2036,
341,
197,
197,
26584,
914,
220,
1565,
7067,
2974,
6279,
8805,
197,
197,
27920,
220,
353,
917,
1565,
7067,
2974,
6279,
8805,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestViper(t *testing.T) {
viper.SetConfigName("config") // name of config file, Does not include extension
viper.AddConfigPath("/etc/appname/") // path to look for the config file in
viper.AddConfigPath("$HOME/.appname") // call multiple times to add many search paths
viper.AddConfigPath(".") ... | explode_data.jsonl/67326 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 328
} | [
2830,
3393,
53,
12858,
1155,
353,
8840,
836,
8,
341,
5195,
12858,
4202,
2648,
675,
445,
1676,
899,
260,
442,
829,
315,
2193,
1034,
11,
12553,
537,
2924,
8894,
198,
5195,
12858,
1904,
2648,
1820,
4283,
12107,
10640,
606,
97112,
220,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNoConcurrentCallbacks(t *testing.T) {
const timeout = 2 * time.Second
type Callback struct {
Index int
Func dnode.Function
}
k := newXhrKite("callback", "0.0.1")
k.Config.DisableAuthentication = true
k.HandleFunc("call", func(r *Request) (interface{}, error) {
if r.Args == nil {
return nil, e... | explode_data.jsonl/68246 | {
"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,
2753,
1109,
3231,
44461,
1155,
353,
8840,
836,
8,
341,
4777,
9632,
284,
220,
17,
353,
882,
32435,
271,
13158,
22668,
2036,
341,
197,
197,
1552,
526,
198,
197,
197,
9626,
220,
294,
3509,
30547,
198,
197,
630,
16463,
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... | 5 |
func TestReplaceDomainsConfig_Panic(t *testing.T) {
assert := assertlib.New(t)
globalConfig := viper.New()
globalConfig.Set("domains", []int{1, 2})
application := &Application{Config: viper.New()}
assert.Panics(func() {
application.ReplaceDomainsConfig(globalConfig)
})
} | explode_data.jsonl/61950 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 100
} | [
2830,
3393,
23107,
74713,
2648,
1088,
31270,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
2740,
7121,
1155,
340,
18842,
2648,
1669,
95132,
7121,
741,
18842,
2648,
4202,
445,
59621,
497,
3056,
396,
90,
16,
11,
220,
17,
3518,
197,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLoadSnapshotChunk(t *testing.T) {
app, teardown := setupBaseAppWithSnapshots(t, 2, 5)
defer teardown()
testcases := map[string]struct {
height uint64
format uint32
chunk uint32
expectEmpty bool
}{
"Existing snapshot": {2, 1, 1, false},
"Missing height": {100, 1, 1, true},
... | explode_data.jsonl/30051 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 417
} | [
2830,
3393,
5879,
15009,
28304,
1155,
353,
8840,
836,
8,
341,
28236,
11,
49304,
1669,
6505,
3978,
2164,
2354,
61871,
27634,
1155,
11,
220,
17,
11,
220,
20,
340,
16867,
49304,
2822,
18185,
23910,
1669,
2415,
14032,
60,
1235,
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... | 2 |
func TestSyncNetwork(t *testing.T) {
accounts := make([]model.Account, 0)
if err := model.QueryAll(map[string]interface{}{}, &accounts, ""); err != nil {
t.Log("query account,", err)
return
}
for _, account := range accounts {
err := service.RefreshAccount(&service.SimpleTask{
ProviderName: account.Provid... | explode_data.jsonl/72647 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
12154,
12320,
1155,
353,
8840,
836,
8,
341,
197,
26206,
1669,
1281,
10556,
2528,
30877,
11,
220,
15,
340,
743,
1848,
1669,
1614,
15685,
2403,
9147,
14032,
31344,
6257,
22655,
609,
26206,
11,
93754,
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 TestRestartRemoved(t *testing.T) {
defer testutil.AfterTest(t)
// 1. start single-member cluster
c := NewCluster(t, 1)
for _, m := range c.Members {
m.ServerConfig.StrictReconfigCheck = true
}
c.Launch(t)
defer c.Terminate(t)
// 2. add a new member
c.AddMember(t)
c.WaitLeader(t)
oldm := c.Members[0... | explode_data.jsonl/16306 | {
"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,
59354,
42642,
1155,
353,
8840,
836,
8,
341,
16867,
1273,
1314,
36892,
2271,
1155,
692,
197,
322,
220,
16,
13,
1191,
3175,
43550,
10652,
198,
1444,
1669,
1532,
28678,
1155,
11,
220,
16,
340,
2023,
8358,
296,
1669,
2088,
272... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransport_RoundTrip(t *testing.T) {
if os.Getenv("KAFKA_ADDR") == "" {
t.Skip("set KAFKA_ADDR to run TestTransport_RoundTrip")
return
}
addrs := strings.Split(os.Getenv("KAFKA_ADDR"), ",")
tracer := mocktracer.New()
factory, cleanup := provideWriterFactory(factoryIn{
Tracer: tracer,
In: di.I... | explode_data.jsonl/70625 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 335
} | [
2830,
3393,
27560,
2568,
795,
56352,
1155,
353,
8840,
836,
8,
341,
743,
2643,
64883,
445,
42,
8276,
26444,
16058,
899,
621,
1591,
341,
197,
3244,
57776,
445,
746,
730,
8276,
26444,
16058,
311,
1598,
3393,
27560,
2568,
795,
56352,
1138,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_Web_ServeHTTP(t *testing.T) {
Convey("Serve HTTP requests", t, func() {
result := ""
m := New()
m.Use(func(c *Context) {
result += "foo"
c.Next()
result += "ban"
})
m.Use(func(c *Context) {
result += "bar"
c.Next()
result += "baz"
})
m.Get("/", func() {})
m.Action(func(res h... | explode_data.jsonl/44976 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 295
} | [
2830,
3393,
62,
5981,
1098,
5852,
9230,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
60421,
10130,
7388,
497,
259,
11,
2915,
368,
341,
197,
9559,
1669,
8389,
197,
2109,
1669,
1532,
741,
197,
2109,
9046,
18552,
1337,
353,
1972,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFallback(t *testing.T) {
cfg := v2.TLSConfig{
Status: true,
CertChain: "invalid_certificate",
PrivateKey: "invalid_key",
Fallback: true,
}
filterChains := []v2.FilterChain{
{
TLS: cfg,
},
}
lc := &v2.Listener{}
lc.FilterChains = filterChains
serverMgr, err := NewTLSServerContextMan... | explode_data.jsonl/1525 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 306
} | [
2830,
3393,
87206,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
348,
17,
836,
7268,
2648,
515,
197,
58321,
25,
257,
830,
345,
197,
6258,
529,
18837,
25,
220,
330,
11808,
63047,
756,
197,
197,
75981,
25,
330,
11808,
3097,
756,
197,
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... | 5 |
func TestAccCirconusCheckConsul_service(t *testing.T) {
checkName := fmt.Sprintf("Terraform test: consul.service.consul mode=service check - %s", acctest.RandString(5))
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckDes... | explode_data.jsonl/28950 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1726
} | [
2830,
3393,
14603,
34,
88276,
355,
3973,
15220,
360,
12267,
1155,
353,
8840,
836,
8,
341,
25157,
675,
1669,
8879,
17305,
445,
51,
13886,
627,
1273,
25,
74189,
5736,
63201,
360,
3856,
28,
7936,
1779,
481,
1018,
82,
497,
1613,
67880,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestVersion(t *testing.T) {
// skip the test if the VERSION environment variable has not been set
if version.Version == "" {
t.SkipNow()
}
cleanup, _, _, port := InitializeTestLCD(t, 1, []sdk.AccAddress{}, true)
defer cleanup()
// node info
res, body := Request(t, port, "GET", "/version", nil)
require.... | explode_data.jsonl/25397 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 304
} | [
2830,
3393,
5637,
1155,
353,
8840,
836,
8,
341,
197,
322,
10706,
279,
1273,
421,
279,
33792,
4573,
3890,
702,
537,
1012,
738,
198,
743,
2319,
35842,
621,
1591,
341,
197,
3244,
57776,
7039,
741,
197,
630,
1444,
60639,
11,
8358,
8358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInstanceIDFromProviderID(t *testing.T) {
testCases := []struct {
providerID string
instanceID string
fail bool
}{
{
providerID: "aws://i-0194bbdb81a49b169",
instanceID: "i-0194bbdb81a49b169",
fail: false,
},
{
providerID: "i-0194bbdb81a49b169",
instanceID: "",
fail: ... | explode_data.jsonl/12864 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 332
} | [
2830,
3393,
2523,
915,
3830,
5179,
915,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
197,
19979,
915,
914,
198,
197,
56256,
915,
914,
198,
197,
63052,
981,
1807,
198,
197,
59403,
197,
197,
515,
298,
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... | 5 |
func Test_StoreOpen(t *testing.T) {
tmpDir, _ := ioutil.TempDir("", "store_test")
s := New(tmpDir, "127.0.0.1", []string{"127.0.0.1"})
if s == nil {
t.Fatalf("failed to create store")
}
if err := s.Open(); err != nil {
t.Fatalf("failed to open store: %s", err)
}
t.Cleanup(func() {
s.Close()
os.RemoveA... | explode_data.jsonl/74886 | {
"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,
92684,
5002,
1155,
353,
8840,
836,
8,
341,
20082,
6184,
11,
716,
1669,
43144,
65009,
6184,
19814,
330,
4314,
4452,
1138,
1903,
1669,
1532,
10368,
6184,
11,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
497,
3056,
917,
4913,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListSelect(t *testing.T) {
list := New()
list.Add("a", "b", "c")
selectedList := list.Select(func(index int, value interface{}) bool {
return value.(string) >= "a" && value.(string) <= "b"
})
if actualValue, _ := selectedList.Get(0); actualValue != "a" {
t.Errorf("Got %v expected %v", actualValue, "va... | explode_data.jsonl/18295 | {
"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,
852,
3379,
1155,
353,
8840,
836,
8,
341,
14440,
1669,
1532,
741,
14440,
1904,
445,
64,
497,
330,
65,
497,
330,
66,
1138,
70631,
852,
1669,
1140,
14752,
18552,
7195,
526,
11,
897,
3749,
28875,
1807,
341,
197,
853,
897,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMqMsgStream_AsProducer(t *testing.T) {
f := &fixture{t: t}
parameters := f.setup()
defer f.teardown()
factory := &ProtoUDFactory{}
for i := range parameters {
func(client mqclient.Client) {
m, err := NewMqMsgStream(context.Background(), 100, 100, client, factory.NewUnmarshalDispatcher())
assert.N... | explode_data.jsonl/55277 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 171
} | [
2830,
3393,
44,
80,
6611,
3027,
62741,
45008,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
609,
59612,
90,
83,
25,
259,
532,
67543,
1669,
282,
25338,
741,
16867,
282,
31853,
37496,
2822,
1166,
2919,
1669,
609,
31549,
4656,
4153,
16094,
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 TestConnectionError(t *testing.T) {
l, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
t.Fatalf("dialClosedPort: Listen failed: %v", err)
}
addr := l.Addr().String()
l.Close()
_, err = DownloadHTTP(TransferDetails{Url: url.URL{Host: addr, Scheme: "http"}, Proxy: false}, filepath.Join(t.TempDir(), ... | explode_data.jsonl/22513 | {
"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,
4526,
1454,
1155,
353,
8840,
836,
8,
341,
8810,
11,
1848,
1669,
4179,
68334,
445,
27161,
497,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
15,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
67,
530,
26884,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestUsesLibraries(t *testing.T) {
bp := `
java_sdk_library {
name: "foo",
srcs: ["a.java"],
api_packages: ["foo"],
sdk_version: "current",
}
java_sdk_library {
name: "qux",
srcs: ["a.java"],
api_packages: ["qux"],
sdk_version: "current",
}
java_sdk_library {
name: "quuz",
... | explode_data.jsonl/58502 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2414
} | [
2830,
3393,
68965,
9194,
14876,
1155,
353,
8840,
836,
8,
341,
2233,
79,
1669,
22074,
197,
56171,
61783,
39461,
341,
298,
11609,
25,
330,
7975,
756,
298,
41144,
82,
25,
4383,
64,
10848,
8097,
298,
54299,
41874,
25,
4383,
7975,
8097,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDestroySnapshot(t *testing.T) {
c, err := NewContainer(ContainerName)
if err != nil {
t.Errorf(err.Error())
}
snapshot := Snapshot{Name: SnapshotName}
if err := c.DestroySnapshot(snapshot); err != nil {
t.Errorf(err.Error())
}
} | explode_data.jsonl/2812 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 96
} | [
2830,
3393,
14245,
15009,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
1532,
4502,
75145,
675,
340,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
3964,
6141,
2398,
197,
630,
1903,
9601,
1669,
68697,
63121,
25,
68697,
675,
532,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 3 |
func TestPolicyManagementEvents(t *testing.T) {
tests := []struct {
want WebhookPolicyManagement
closer bool
}{
{WebhookPolicyManagement{policyOwner{ID: "dummy1", Name: "foobar1"}}, false},
{WebhookPolicyManagement{policyOwner{ID: "dummy2", Name: "foobar2"}}, true},
}
for _, test := range tests {
event... | explode_data.jsonl/47925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 228
} | [
2830,
3393,
13825,
22237,
7900,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
50780,
256,
4895,
20873,
13825,
22237,
198,
197,
1444,
69215,
1807,
198,
197,
59403,
197,
197,
90,
5981,
20873,
13825,
22237,
90,
34790,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestHello(t *testing.T) {
want := "Hello"
if got := Hello(want); got != want {
t.Errorf("Hello()=%s, want=%s", got, want)
}
} | explode_data.jsonl/51160 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 59
} | [
2830,
3393,
9707,
1155,
353,
8840,
836,
8,
341,
50780,
1669,
330,
9707,
698,
743,
2684,
1669,
21927,
3622,
517,
1215,
2684,
961,
1366,
341,
197,
3244,
13080,
445,
9707,
368,
7846,
82,
11,
1366,
7846,
82,
497,
2684,
11,
1366,
340,
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
] | 2 |
func TestFinalization(t *testing.T) {
stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer()
require.NoError(t, err)
defer close(stopCh)
noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.ClusterScoped)
noxuVersionClient, err := testserver.CreateNewCustomReso... | explode_data.jsonl/31051 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 823
} | [
2830,
3393,
19357,
2022,
1155,
353,
8840,
836,
8,
341,
62644,
1143,
11,
6330,
12049,
2959,
11,
2943,
10551,
11,
1848,
1669,
1273,
4030,
12101,
3675,
5475,
741,
17957,
35699,
1155,
11,
1848,
340,
16867,
3265,
60170,
1143,
692,
197,
41403... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWithStatementTaintingNoBundle(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry.js": `
(() => {
let local = 1
let outer = 2
let outerDead = 3
with ({}) {
var hoisted = 4
let local = 5
hoisted++
local++
if (1) ou... | explode_data.jsonl/38519 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 316
} | [
2830,
3393,
2354,
8636,
51,
70859,
2753,
8409,
1155,
353,
8840,
836,
8,
341,
11940,
57239,
25952,
33,
1241,
832,
1155,
11,
51450,
515,
197,
74075,
25,
2415,
14032,
30953,
515,
298,
197,
3115,
4085,
2857,
788,
22074,
571,
197,
5065,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAccAWSDBInstance_namePrefix(t *testing.T) {
var v rds.DBInstance
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSDBInstanceDestroy,
Steps: []resource.TestStep{
{
Config: testAccAWSDBInstanceConfig_na... | explode_data.jsonl/33916 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 255
} | [
2830,
3393,
14603,
36136,
3506,
2523,
1269,
14335,
1155,
353,
8840,
836,
8,
341,
2405,
348,
435,
5356,
22537,
2523,
271,
50346,
8787,
1155,
11,
5101,
31363,
515,
197,
197,
4703,
3973,
25,
257,
2915,
368,
314,
1273,
14603,
4703,
3973,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFindByShortcode(t *testing.T) {
t.Run("return emoji by shortcode, if exists", func(t *testing.T) {
allEmoji := emoji.NewAllEmoji()
emojivotoService := EmojiServiceServer{
allEmoji: allEmoji,
}
emojiSearchedFor := allEmoji.List()[3]
response, err := emojivotoService.FindByShortcode(context.Backg... | explode_data.jsonl/26093 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 480
} | [
2830,
3393,
47131,
12472,
1851,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
689,
42365,
553,
75813,
11,
421,
6724,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
50960,
92731,
1669,
42365,
7121,
2403,
92731,
741,
197,
197,
6726,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrintMarkdownExplainTable(t *testing.T) {
expInfo, err := connTest.Explain("select 1", TraditionalExplainType, TraditionalFormatExplain)
if err != nil {
t.Error(err)
}
err = common.GoldenDiff(func() {
PrintMarkdownExplainTable(expInfo)
}, t.Name(), update)
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/55048 | {
"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,
8994,
68005,
840,
20772,
2556,
1155,
353,
8840,
836,
8,
341,
48558,
1731,
11,
1848,
1669,
4534,
2271,
5121,
20772,
445,
1742,
220,
16,
497,
45460,
840,
20772,
929,
11,
45460,
4061,
840,
20772,
340,
743,
1848,
961,
2092,
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 TestRepeated(t *testing.T) {
salt := []byte("12345")
h, err := DefaultFactory.GetHasherWithSalt(SHA256, salt)
if err != nil {
t.Fatal("Unable to retrieve SHA256 Hasher")
}
h12345 := "dd712114fb283417de4da3512e17486adbda004060d0d1646508c8a2740d29b4"
h1 := fmt.Sprintf("%x", h.Hash(int64(1)).H)
h2 := fmt.... | explode_data.jsonl/42614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 208
} | [
2830,
3393,
90989,
1155,
353,
8840,
836,
8,
1476,
1903,
3145,
1669,
3056,
3782,
445,
16,
17,
18,
19,
20,
5130,
9598,
11,
1848,
1669,
7899,
4153,
2234,
6370,
261,
2354,
47318,
3759,
17020,
17,
20,
21,
11,
12021,
340,
743,
1848,
961,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestEtcdCreatePodFailsWithoutNamespace(t *testing.T) {
fakeClient := tools.NewFakeEtcdClient(t)
fakeClient.TestIndex = true
registry := NewTestEtcdRegistry(fakeClient)
err := registry.CreatePod(api.NewContext(), &api.Pod{
TypeMeta: api.TypeMeta{
ID: "foo",
},
DesiredState: api.PodState{
Manifest: a... | explode_data.jsonl/8141 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 230
} | [
2830,
3393,
31860,
4385,
4021,
23527,
37,
6209,
26040,
22699,
1155,
353,
8840,
836,
8,
341,
1166,
726,
2959,
1669,
7375,
7121,
52317,
31860,
4385,
2959,
1155,
340,
1166,
726,
2959,
8787,
1552,
284,
830,
198,
197,
29172,
1669,
1532,
2271... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestThrottleRecursiveBlkioStats(t *testing.T) {
helper := NewCgroupTestUtil("blkio", t)
defer helper.cleanup()
helper.writeFileContents(map[string]string{
"blkio.io_service_bytes_recursive": "",
"blkio.io_serviced_recursive": "",
"blkio.io_queued_recursive": "",
"b... | explode_data.jsonl/45844 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1071
} | [
2830,
3393,
1001,
27535,
78542,
4923,
74,
815,
16635,
1155,
353,
8840,
836,
8,
341,
9598,
2947,
1669,
1532,
34,
4074,
2271,
2742,
445,
34989,
815,
497,
259,
340,
16867,
13137,
87689,
741,
9598,
2947,
70007,
14803,
9147,
14032,
30953,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestStrArray_Sum(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
a1 := []string{"0", "1", "2", "3", "4", "5", "6"}
a2 := []string{"0", "a", "3", "4", "5", "6"}
array1 := garray.NewStrArrayFrom(a1)
array2 := garray.NewStrArrayFrom(a2)
t.Assert(array1.Sum(), 21)
t.Assert(array2.Sum(), 18)
})
} | explode_data.jsonl/53105 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 157
} | [
2830,
3393,
2580,
1857,
1098,
372,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11323,
16,
1669,
3056,
917,
4913,
15,
497,
330,
16,
497,
330,
17,
497,
330,
18,
497,
330,
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 TestSyncPodsDoesNotSetPodsThatDidNotRunTooLongToFailed(t *testing.T) {
testKubelet := newTestKubelet(t)
fakeRuntime := testKubelet.fakeRuntime
testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil)
kubelet := testKubelet.kubelet
now := unversioned.Now()
startTime := unversioned.N... | explode_data.jsonl/43350 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 557
} | [
2830,
3393,
12154,
23527,
82,
21468,
2623,
1649,
23527,
82,
4792,
6986,
2623,
6727,
31246,
6583,
1249,
9408,
1155,
353,
8840,
836,
8,
341,
18185,
42,
3760,
1149,
1669,
501,
2271,
42,
3760,
1149,
1155,
340,
1166,
726,
15123,
1669,
1273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestIdPGPNotEldest(t *testing.T) {
tc := SetupEngineTest(t, "id")
defer tc.Cleanup()
// create new user, then add pgp key
u := CreateAndSignupFakeUser(tc, "login")
uis := libkb.UIs{LogUI: tc.G.UI.GetLogUI(), SecretUI: u.NewSecretUI()}
_, _, key := armorKey(t, tc, u.Email)
eng, err := NewPGPKeyImportEngineF... | explode_data.jsonl/52987 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 279
} | [
2830,
3393,
764,
11383,
47,
2623,
6582,
4979,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
18626,
4571,
2271,
1155,
11,
330,
307,
1138,
16867,
17130,
727,
60639,
2822,
197,
322,
1855,
501,
1196,
11,
1221,
912,
17495,
79,
1376,
198,
1067... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClose(t *testing.T) {
defer func() {
r := recover()
assert.NotNil(t, r)
}()
bc := newTestChain(t)
_, err := bc.genBlocks(10)
require.NoError(t, err)
bc.Close()
// It's a hack, but we use internal knowledge of MemoryStore
// implementation which makes it completely unusable (up to panicing)
// afte... | explode_data.jsonl/74544 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 165
} | [
2830,
3393,
7925,
1155,
353,
8840,
836,
8,
341,
16867,
2915,
368,
341,
197,
7000,
1669,
11731,
741,
197,
6948,
93882,
1155,
11,
435,
340,
197,
69826,
2233,
66,
1669,
501,
2271,
18837,
1155,
340,
197,
6878,
1848,
1669,
17916,
22822,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unnestSpecFiles(t *testing.T) {
tests := []struct {
name string
files SpecFiles
want SpecFiles
}{
{
name: "basic",
files: SpecFiles{
{
Name: "a",
Path: "a",
Children: SpecFiles{
{
Name: "b",
Path: "a/b",
},
{
Name: "c",
Path: "... | explode_data.jsonl/3241 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 761
} | [
2830,
3393,
4907,
21414,
8327,
10809,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
220,
914,
198,
197,
74075,
10956,
10809,
198,
197,
50780,
220,
10956,
10809,
198,
197,
59403,
197,
197,
515,
298,
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... | 1 |
func TestJsonSortByName(t *testing.T) {
assert := assert.New(t)
settings := testutil.Settings().WithSections().With(&print.Settings{
SortByName: true,
}).Build()
expected, err := testutil.GetExpected("json", "json-SortByName")
assert.Nil(err)
options, err := module.NewOptions().With(&module.Options{
SortBy:... | explode_data.jsonl/40844 | {
"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,
5014,
10231,
16898,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
62930,
1669,
1273,
1314,
27000,
1005,
2354,
38122,
1005,
2354,
2099,
1350,
27000,
515,
197,
7568,
371,
16898,
25,
830,
345,
197,
16630,
110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBSTree_InsertNode(t *testing.T) {
bstree := NewBSTree(6, &intComparator{})
bstree.InsertNode(7)
bstree.InsertNode(5)
bstree.InsertNode(2)
bstree.InsertNode(4)
bstree.Print()
} | explode_data.jsonl/41659 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 89
} | [
2830,
3393,
61006,
765,
76417,
1955,
1155,
353,
8840,
836,
8,
341,
2233,
267,
765,
1669,
1532,
61006,
765,
7,
21,
11,
609,
396,
38658,
6257,
692,
2233,
267,
765,
23142,
1955,
7,
22,
340,
2233,
267,
765,
23142,
1955,
7,
20,
340,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWithPathParametersWithInvalidPath(t *testing.T) {
p := "path%2*end"
m := map[string]interface{}{
"path1": p,
}
if _, err := Prepare(&http.Request{}, WithBaseURL("https://microsoft.com/"), WithPathParameters("/{path1}/", m)); err == nil {
t.Fatalf("autorest: WithPath should fail for invalid URL es... | explode_data.jsonl/20943 | {
"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,
89534,
9706,
2354,
7928,
1820,
1155,
353,
8840,
836,
8,
972,
3223,
1669,
330,
2343,
4,
17,
9,
408,
5031,
2109,
1669,
2415,
14032,
31344,
6257,
1666,
197,
197,
70688,
16,
788,
281,
1871,
197,
1771,
743,
8358,
1848,
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 TestNamespaceFlushState(t *testing.T) {
ctrl := xtest.NewController(t)
defer ctrl.Finish()
ns, closer := newTestNamespace(t)
defer closer()
var (
blockStart = xtime.Now().Truncate(2 * time.Hour)
expectedFlushState = fileOpState{
ColdVersionRetrievable: 2,
}
shard0 = NewMockdatabaseShard(c... | explode_data.jsonl/35383 | {
"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,
22699,
46874,
1397,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
856,
1944,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
84041,
11,
12128,
1669,
501,
2271,
22699,
1155,
340,
16867,
12128,
2822,
2405,
2399,
197,
47996,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTracesExporter(t *testing.T) {
cleanup, err := obsreporttest.SetupRecordedMetricsTest()
require.NoError(t, err)
defer cleanup()
factory := NewFactory()
recorder, cfg := newRecorder(t)
params := componenttest.NewNopExporterCreateSettings()
te, err := factory.CreateTracesExporter(context.Background(), pa... | explode_data.jsonl/37016 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 325
} | [
2830,
3393,
1282,
2434,
88025,
1155,
353,
8840,
836,
8,
341,
1444,
60639,
11,
1848,
1669,
7448,
11736,
1944,
39820,
6471,
291,
27328,
2271,
741,
17957,
35699,
1155,
11,
1848,
340,
16867,
21290,
2822,
1166,
2919,
1669,
1532,
4153,
741,
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 TestSerialize_TimestampUnits(t *testing.T) {
tests := []struct {
name string
timestampUnits time.Duration
expected string
}{
{
name: "default of 1s",
timestampUnits: 0,
expected: `{"fields":{"value":42},"name":"cpu","tags":{},"timestamp":1525478795}`,
},
{
... | explode_data.jsonl/47349 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 791
} | [
2830,
3393,
15680,
1139,
4702,
26314,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
1843,
914,
198,
197,
3244,
4702,
26314,
882,
33795,
198,
197,
42400,
981,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
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 TestSendAll(t *testing.T) {
t.Parallel()
testCases := []struct {
scenario string
mockStream grpcMock.ClientStreamMocker
input interface{}
expectedError string
}{
{
scenario: "input is nil",
mockStream: grpcMock.NoMockClientStream,
expectedError: `not a slice: <nil>`,
... | explode_data.jsonl/72037 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 616
} | [
2830,
3393,
11505,
2403,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
18185,
37302,
1669,
3056,
1235,
341,
197,
29928,
20413,
414,
914,
198,
197,
77333,
3027,
262,
47900,
11571,
11716,
3027,
11571,
261,
198,
197,
22427,
260,
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 TestBroadcastTxSync(t *testing.T) {
require := require.New(t)
mempool := node.MempoolReactor().Mempool
initMempoolSize := mempool.Size()
for i, c := range GetClients() {
_, _, tx := MakeTxKV()
bres, err := c.BroadcastTxSync(tx)
require.Nil(err, "%d: %+v", i, err)
require.Equal(bres.Code, abci.CodeTyp... | explode_data.jsonl/48948 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 202
} | [
2830,
3393,
43362,
31584,
12154,
1155,
353,
8840,
836,
8,
341,
17957,
1669,
1373,
7121,
1155,
692,
2109,
3262,
1749,
1669,
2436,
1321,
3262,
1749,
693,
5621,
1005,
44,
3262,
1749,
198,
28248,
44,
3262,
1749,
1695,
1669,
1833,
10285,
246... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNew(t *testing.T) {
path := pathToPhpFpm
process := phpfpm.NewProcess(path)
if want, have := path, process.Exec; want != have {
t.Errorf("expected %#v, got %#v", want, have)
}
} | explode_data.jsonl/49279 | {
"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,
3564,
1155,
353,
8840,
836,
8,
341,
26781,
1669,
1815,
1249,
50144,
37,
5187,
198,
53314,
1669,
1319,
15897,
5187,
7121,
7423,
5581,
340,
743,
1366,
11,
614,
1669,
1815,
11,
1882,
30798,
26,
1366,
961,
614,
341,
197,
3244,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestImageRef_RemoveICCProfile(t *testing.T) {
Startup(nil)
image, err := NewImageFromFile(resources + "jpg-24bit-icc-adobe-rgb.jpg")
require.NoError(t, err)
defer image.Close()
require.True(t, image.HasIPTC())
err = image.RemoveICCProfile()
require.NoError(t, err)
assert.False(t, image.HasICCProfile())... | explode_data.jsonl/38835 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 138
} | [
2830,
3393,
1906,
3945,
66843,
87202,
8526,
1155,
353,
8840,
836,
8,
341,
197,
39076,
27907,
692,
31426,
11,
1848,
1669,
1532,
1906,
43633,
52607,
488,
330,
17974,
12,
17,
19,
4489,
12,
47638,
25747,
15422,
12,
16509,
4819,
1138,
17957,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIndexerOnUpdate(t *testing.T) {
myRowID := EncodeSequence(1)
var multiKeyIndex MultiKeyIndex
ctx := NewMockContext()
storeKey := sdk.NewKVStoreKey("test")
store := prefix.NewStore(ctx.KVStore(storeKey), []byte{multiKeyIndex.prefix})
specs := map[string]struct {
srcFunc IndexerFunc
expAddedKe... | explode_data.jsonl/42810 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1550
} | [
2830,
3393,
1552,
261,
1925,
4289,
1155,
353,
8840,
836,
8,
341,
13624,
3102,
915,
1669,
56562,
14076,
7,
16,
692,
2405,
7299,
1592,
1552,
17439,
1592,
1552,
198,
20985,
1669,
1532,
11571,
1972,
741,
57279,
1592,
1669,
45402,
7121,
8270... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParse(t *testing.T) {
ap := NewParser()
if ap == nil {
t.Fatalf("expected a parser.IngressAnnotation but returned nil")
}
testCases := []struct {
annotations map[string]string
expected Config
}{
{map[string]string{aliasAnn: "www.example.com"}, Config{Host: "www.example.com"}},
{map[string]st... | explode_data.jsonl/18066 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 418
} | [
2830,
3393,
14463,
1155,
353,
8840,
836,
8,
341,
69898,
1669,
1532,
6570,
741,
743,
1443,
621,
2092,
341,
197,
3244,
30762,
445,
7325,
264,
6729,
5337,
2483,
19711,
714,
5927,
2092,
1138,
197,
630,
18185,
37302,
1669,
3056,
1235,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestName(t *testing.T) {
tests := []string{
"",
".",
"google..com",
"google.com",
"google..com.",
"google.com.",
".google.com.",
"www..google.com.",
"www.google.com.",
}
for _, test := range tests {
n, err := NewName(test)
if err != nil {
t.Errorf("Creating name for %q: %v", test, err)... | explode_data.jsonl/60549 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
675,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
917,
515,
197,
197,
39680,
197,
197,
3263,
756,
197,
197,
1,
17485,
496,
874,
756,
197,
197,
1,
17485,
905,
756,
197,
197,
1,
17485,
496,
874,
10346,
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... | 4 |
func TestSortedSetRemRangeByRank(t *testing.T) {
testRaw(t, func(c *client) {
c.Do("ZADD", "z",
"12", "zero kelvin",
"12", "minusfour",
"12", "one",
"12", "oneone",
"12", "two",
"12", "zwei",
"12", "three",
"12", "drei",
"12", "inf",
)
c.Do("ZREMRANGEBYRANK", "z", "-2", "-1")
c.Do("Z... | explode_data.jsonl/23345 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 535
} | [
2830,
3393,
51051,
1649,
6590,
6046,
1359,
22550,
1155,
353,
8840,
836,
8,
341,
18185,
20015,
1155,
11,
2915,
1337,
353,
2972,
8,
341,
197,
1444,
33596,
445,
57,
15665,
497,
330,
89,
756,
298,
197,
1,
16,
17,
497,
330,
14154,
48228,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_encode_empty_byte_array(t *testing.T) {
should := require.New(t)
bytes, err := json.Marshal([]byte{})
should.Nil(err)
should.Equal(`""`, string(bytes))
bytes, err = jsoner.DefaultAPI().Marshal([]byte{})
should.Nil(err)
should.Equal(`""`, string(bytes))
} | explode_data.jsonl/57883 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 111
} | [
2830,
3393,
11224,
15124,
19737,
3858,
1155,
353,
8840,
836,
8,
341,
197,
5445,
1669,
1373,
7121,
1155,
340,
70326,
11,
1848,
1669,
2951,
37271,
10556,
3782,
37790,
197,
5445,
59678,
3964,
340,
197,
5445,
12808,
5809,
3014,
7808,
914,
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 TestConfigDefaults(t *testing.T) {
assert := assert.New(t)
c, err := NewConfig([]string{})
assert.Nil(err)
assert.Equal("warn", c.LogLevel)
assert.Equal("text", c.LogFormat)
assert.Equal("", c.AuthHost)
assert.Len(c.CookieDomains, 0)
assert.False(c.InsecureCookie)
assert.Equal("_forward_auth", c.CookieN... | explode_data.jsonl/33751 | {
"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,
2648,
16273,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
1444,
11,
1848,
1669,
1532,
2648,
10556,
917,
37790,
6948,
59678,
3964,
692,
6948,
12808,
445,
33481,
497,
272,
5247,
4449,
340,
6948,
12808,
445,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEventIndexedWithArrayUnpack(t *testing.T) {
definition := `[{"name": "test", "type": "event", "inputs": [{"indexed": true, "name":"value1", "type":"uint8[2]"},{"indexed": false, "name":"value2", "type":"string"}]}]`
type testStruct struct {
Value1 [2]uint8
Value2 string
}
abi, err := JSON(strings.NewRe... | explode_data.jsonl/43928 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 292
} | [
2830,
3393,
1556,
69941,
2354,
1857,
1806,
4748,
1155,
353,
8840,
836,
8,
341,
7452,
4054,
1669,
77644,
4913,
606,
788,
330,
1944,
497,
330,
1313,
788,
330,
3087,
497,
330,
24941,
788,
61753,
97473,
788,
830,
11,
330,
606,
3252,
957,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsGte(t *testing.T) {
validate := New()
i := true
PanicMatches(t, func() { _ = validate.Var(i, "gte") }, "Bad field type bool")
t1 := time.Now().UTC()
t1 = t1.Add(time.Hour * 24)
errs := validate.Var(t1, "gte")
Equal(t, errs, nil)
t2 := time.Now().UTC().Add(-time.Hour)
errs = validate.Var(t2, "gte... | explode_data.jsonl/77311 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 323
} | [
2830,
3393,
3872,
38,
665,
1155,
353,
8840,
836,
8,
341,
197,
7067,
1669,
1532,
741,
8230,
1669,
830,
198,
10025,
31270,
42470,
1155,
11,
2915,
368,
314,
716,
284,
9593,
87968,
1956,
11,
330,
55067,
899,
2470,
330,
17082,
2070,
943,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCorruptedClusterID(t *testing.T) {
defer leaktest.AfterTest(t)()
e := engine.NewInMem(roachpb.Attributes{}, 1<<20)
defer e.Close()
cfg := bootstrapNodeConfig()
if _, err := bootstrapCluster(
context.TODO(), cfg, []engine.Engine{e}, cfg.Settings.Version.BootstrapVersion(), kv.MakeTxnMetrics(metric.Test... | explode_data.jsonl/52655 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 493
} | [
2830,
3393,
10580,
85954,
28678,
915,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
7727,
1669,
4712,
7121,
641,
18816,
7,
64500,
16650,
31384,
22655,
220,
16,
2442,
17,
15,
340,
16867,
384,
10421,
2822,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestService_Delete(t *testing.T) {
testCases := []struct {
repoErr error
}{
{
sgerrors.ErrNotFound,
},
{
nil,
},
}
for _, testCase := range testCases {
m := new(testutils.MockStorage)
m.On("Delete", context.Background(), mock.Anything, mock.Anything).
Return(testCase.repoErr)
service... | explode_data.jsonl/2001 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 212
} | [
2830,
3393,
1860,
57418,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
17200,
5368,
7747,
1465,
198,
197,
59403,
197,
197,
515,
298,
1903,
70,
7650,
27862,
10372,
345,
197,
197,
1583,
197,
197,
515,
298,
8413... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSNSAccessPolicy(t *testing.T) {
const arn = "arn:aws:sns:eu-west-1:111122223333:stage-package-Message"
t.Run("should return an error if the arn is invalid", func(t *testing.T) {
_, err := aws.SNSAccessPolicy("invalid")
assert.ErrorExists(t, err, true)
})
t.Run("should generate valid json", func(t *te... | explode_data.jsonl/19317 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 387
} | [
2830,
3393,
50,
2448,
6054,
13825,
1155,
353,
8840,
836,
8,
341,
4777,
796,
77,
284,
330,
1885,
25,
8635,
14495,
4412,
25,
20128,
37602,
12,
16,
25,
16,
16,
16,
16,
17,
17,
17,
17,
18,
18,
18,
18,
25,
20743,
44135,
12,
2052,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseNameValOldFormat(t *testing.T) {
directive := Directive{}
node, err := parseNameVal("foo bar", "LABEL", &directive)
assert.Check(t, err)
expected := &Node{
Value: "foo",
Next: &Node{Value: "bar"},
}
assert.DeepEqual(t, expected, node, cmpNodeOpt)
} | explode_data.jsonl/12093 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
14463,
675,
2208,
18284,
4061,
1155,
353,
8840,
836,
8,
341,
2698,
1226,
533,
1669,
56752,
16094,
20831,
11,
1848,
1669,
4715,
675,
2208,
445,
7975,
3619,
497,
330,
63290,
497,
609,
72863,
340,
6948,
10600,
1155,
11,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestArrayScanBackend(t *testing.T) {
db := openTestConn(t)
defer db.Close()
for _, tt := range []struct {
s string
d sql.Scanner
e interface{}
}{
{`ARRAY[true, false]`, new(BoolArray), &BoolArray{true, false}},
{`ARRAY[E'\\xdead', E'\\xbeef']`, new(ByteaArray), &ByteaArray{{'\xDE', '\xAD'}, {'\xBE',... | explode_data.jsonl/5351 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 428
} | [
2830,
3393,
1857,
26570,
29699,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
1787,
2271,
9701,
1155,
340,
16867,
2927,
10421,
2822,
2023,
8358,
17853,
1669,
2088,
3056,
1235,
341,
197,
1903,
914,
198,
197,
2698,
5704,
32098,
198,
197,
772... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTags(t *testing.T) {
suite := NewSuite(t, WithFeaturesPath("features/tags.feature"), WithTags("@tag"))
suite.AddStep(`fail the test`, fail)
suite.AddStep(`the test should pass`, pass)
suite.Run()
} | explode_data.jsonl/69372 | {
"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,
15930,
1155,
353,
8840,
836,
8,
341,
96572,
1669,
1532,
28000,
1155,
11,
3085,
21336,
1820,
445,
20304,
84460,
29591,
3975,
3085,
15930,
10662,
4578,
5455,
96572,
1904,
8304,
5809,
18403,
279,
1273,
7808,
3690,
340,
96572,
190... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetDownloadURLWithInternalErrorInGetAssetShouldReturnProperResponse(t *testing.T) {
rec := httptest.NewRecorder()
req, err := http.NewRequest(constants.RequestMethodGet,
fmt.Sprintf("%s?id=%s&timeout=111013", constants.AssetsURL, constants.MockID), nil)
require.NoError(t, err)
db := &test.MockDb{Err: er... | explode_data.jsonl/34294 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 304
} | [
2830,
3393,
1949,
11377,
3144,
2354,
11569,
1454,
641,
1949,
16604,
14996,
5598,
1336,
712,
2582,
1155,
353,
8840,
836,
8,
341,
67904,
1669,
54320,
70334,
7121,
47023,
741,
24395,
11,
1848,
1669,
1758,
75274,
80368,
68940,
1949,
345,
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 TestRegressionDot1QPriority(t *testing.T) {
d := &Dot1Q{
Priority: 2,
}
out := gopacket.NewSerializeBuffer()
gopacket.SerializeLayers(out, gopacket.SerializeOptions{}, d)
if err := d.DecodeFromBytes(out.Bytes(), gopacket.NilDecodeFeedback); err != nil {
t.Errorf("could not decode encoded dot1q")
} else i... | explode_data.jsonl/42265 | {
"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,
45200,
34207,
16,
48,
20555,
1155,
353,
8840,
836,
8,
341,
2698,
1669,
609,
34207,
16,
48,
515,
197,
10025,
8773,
25,
220,
17,
345,
197,
532,
13967,
1669,
342,
453,
5709,
7121,
15680,
4095,
741,
3174,
453,
5709,
32859,
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... | 3 |
func TestMessageParser_ParseMessage(t *testing.T) {
msg := newTestDataMessage("Test")
msgParser := NewParser()
msgParser.Setup()
msgParser.Parse(msg.Bytes(), nil)
msgParser.Events.MessageParsed.Attach(events.NewClosure(func(msgParsedEvent *MessageParsedEvent) {
log.Infof("parsed message")
}))
} | explode_data.jsonl/67124 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 109
} | [
2830,
3393,
2052,
6570,
77337,
2052,
1155,
353,
8840,
836,
8,
341,
21169,
1669,
501,
83920,
2052,
445,
2271,
5130,
21169,
6570,
1669,
1532,
6570,
741,
21169,
6570,
39820,
741,
21169,
6570,
8937,
8119,
36868,
1507,
2092,
692,
21169,
6570,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRobotDevicesToJSON(t *testing.T) {
r := newTestRobot("Robot99")
json := NewJSONRobot(r)
gobottest.Assert(t, len(json.Devices), r.Devices().Len())
gobottest.Assert(t, json.Devices[0].Name, "Device1")
gobottest.Assert(t, json.Devices[0].Driver, "*gobot.testDriver")
gobottest.Assert(t, json.Devices[0].Conne... | explode_data.jsonl/24443 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 163
} | [
2830,
3393,
43374,
40835,
1249,
5370,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
501,
2271,
43374,
445,
43374,
24,
24,
1138,
30847,
1669,
1532,
5370,
43374,
2601,
340,
3174,
674,
1716,
477,
11711,
1155,
11,
2422,
9304,
77611,
1216,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPushToRemoteFailureBranchNotExisting(t *testing.T) {
testRepo := newTestRepo(t)
defer testRepo.cleanup(t)
err := testRepo.sut.PushToRemote(git.DefaultRemote, "some-branch")
require.NotNil(t, err)
} | explode_data.jsonl/14033 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 85
} | [
2830,
3393,
16644,
1249,
24703,
17507,
18197,
2623,
53067,
1155,
353,
8840,
836,
8,
341,
18185,
25243,
1669,
501,
2271,
25243,
1155,
340,
16867,
1273,
25243,
87689,
1155,
692,
9859,
1669,
1273,
25243,
514,
332,
34981,
1249,
24703,
3268,
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 |
func TestAsString(t *testing.T) {
cases := []struct {
in starlark.Value
got, err string
}{
{starlark.String("foo"), "foo", ""},
{starlark.String("\"foo'"), "\"foo'", ""},
{starlark.Bool(true), "", "invalid syntax"},
}
for i, c := range cases {
got, err := AsString(c.in)
if !(err == nil && c.err... | explode_data.jsonl/20981 | {
"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,
26582,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
17430,
981,
6774,
75,
838,
6167,
198,
197,
3174,
354,
11,
1848,
914,
198,
197,
59403,
197,
197,
90,
11870,
75,
838,
6431,
445,
7975,
3975,
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... | 7 |
func TestSandboxHasNoIO(t *testing.T) {
ctx := context.Background()
sandbox, err := newService(&observation.TestContext).CreateSandbox(ctx, CreateOptions{})
if err != nil {
t.Fatalf("unexpected error creating sandbox: %s", err)
}
defer sandbox.Close()
t.Run("default", func(t *testing.T) {
script := `
io.... | explode_data.jsonl/21497 | {
"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,
50,
31536,
10281,
2753,
3810,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
2822,
1903,
31536,
11,
1848,
1669,
501,
1860,
2099,
77960,
8787,
1972,
568,
4021,
50,
31536,
7502,
11,
4230,
3798,
37790,
743,
1848,
961,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestHashSetNX(t *testing.T) {
s, err := Run()
ok(t, err)
defer s.Close()
c, err := proto.Dial(s.Addr())
ok(t, err)
defer c.Close()
// New Hash
must1(t, c, "HSETNX", "wim", "zus", "jet")
must0(t, c, "HSETNX", "wim", "zus", "jet")
// Just a new key
must1(t, c, "HSETNX", "wim", "aap", "noot")
// Wrong... | explode_data.jsonl/11368 | {
"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,
44601,
43304,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
6452,
741,
59268,
1155,
11,
1848,
340,
16867,
274,
10421,
741,
1444,
11,
1848,
1669,
18433,
98462,
1141,
93626,
2398,
59268,
1155,
11,
1848,
340,
16867,
272,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTLSConnection(t *testing.T) {
// Start up a TLS Server
server, port := setupServer(t, httptest.NewTLSServer)
defer server.Close()
// Parse its URL
serverURL, err := url.Parse(server.URL)
require.NoError(t, err)
// Determine the IP address the server's hostname resolves to
ips, err := net.LookupHost(s... | explode_data.jsonl/54636 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 431
} | [
2830,
3393,
45439,
4526,
1155,
353,
8840,
836,
8,
341,
197,
322,
5145,
705,
264,
41654,
8422,
198,
41057,
11,
2635,
1669,
6505,
5475,
1155,
11,
54320,
70334,
7121,
13470,
1220,
2836,
340,
16867,
3538,
10421,
2822,
197,
322,
14775,
1181,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteQueuedJob(t *testing.T) {
withRepository(func(r *RedisJobRepository) {
job := addTestJob(t, r, "queue1")
result, err := r.DeleteJobs([]*api.Job{job})
if err != nil {
t.Fatalf("deleting jobs failed with error %s", err)
}
err, deletionOccurred := result[job]
assert.Nil(t, err)
assert.Tru... | explode_data.jsonl/32047 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
6435,
25776,
3260,
12245,
1155,
353,
8840,
836,
8,
341,
46948,
4624,
18552,
2601,
353,
48137,
12245,
4624,
8,
341,
197,
68577,
1669,
912,
2271,
12245,
1155,
11,
435,
11,
330,
4584,
16,
5130,
197,
9559,
11,
1848,
1669,
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... | 2 |
func TestCacheError(t *testing.T) {
cache := newErrTestStatter(errors.New("cache error"))
backend := newTestStatter()
st := NewCachedBlobStatter(cache, backend)
ctx := context.Background()
dgst := digest.Digest("dontvalidate")
_, err := st.Stat(ctx, dgst)
if err != distribution.ErrBlobUnknown {
t.Fatalf("Unex... | explode_data.jsonl/33139 | {
"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,
8233,
1454,
1155,
353,
8840,
836,
8,
341,
52680,
1669,
501,
7747,
2271,
623,
1650,
38881,
7121,
445,
9360,
1465,
5455,
197,
20942,
1669,
501,
2271,
623,
1650,
741,
18388,
1669,
1532,
70293,
37985,
623,
1650,
31933,
11,
19163... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.